feat(editor): Executions page (#4997)

* fix(editor): Create executions page

* fix(editor): lint fix

* fix(editor): Reuse execution list in both modal and page

* fix(editor): fix ts issues

* fix(editor): Reorganizing exec list components for easier redesign (everything is in its new place now)

* fix(editor): Exec list item restyling

* fix(editor): Exec list add back stripes

* fix(editor): Exec list formatting dates and times

* fix(editor): Exec list revert accidental searc and replace

* fix(editor): Exec list translations and execution IDs

* fix(editor): Exec list playing with table cell sizing

* fix(editor): Exec list playing with table cell sizing

* fix(editor): Exec list drop Element UI Table

* fix(editor): Exec list adding sticky header and View button on row hover

* fix(editor): Exec list open execution in new tab, add ellipsis menu to all rows with Delete action

* fix(editor): Global exec list update translations snd fix tabindex

* fix(editor): Global exec list redesign selection

* fix(editor): Global exec list fix scrolling container

* fix(editor): Global exec list fix running status

* fix(editor): Global exec list fix waiting status
This commit is contained in:
Csaba Tuncsik
2023-01-10 16:28:15 +01:00
committed by GitHub
parent 57e515dd4b
commit 819c4adb3c
12 changed files with 612 additions and 452 deletions

View File

@@ -1,7 +1,8 @@
import { showMessage } from '@/mixins/showMessage';
import { VIEWS } from '@/constants';
import mixins from 'vue-typed-mixins';
import dateformat from 'dateformat';
import { VIEWS } from '@/constants';
import { showMessage } from '@/mixins/showMessage';
export const genericHelpers = mixins(showMessage).extend({
data() {
@@ -21,17 +22,24 @@ export const genericHelpers = mixins(showMessage).extend({
displayTimer(msPassed: number, showMs = false): string {
if (msPassed < 60000) {
if (!showMs) {
return `${Math.floor(msPassed / 1000)} ${this.$locale.baseText('genericHelpers.sec')}`;
return `${Math.floor(msPassed / 1000)}${this.$locale.baseText(
'genericHelpers.secShort',
)}`;
}
return `${msPassed / 1000} ${this.$locale.baseText('genericHelpers.sec')}`;
return `${msPassed / 1000}${this.$locale.baseText('genericHelpers.secShort')}`;
}
const secondsPassed = Math.floor(msPassed / 1000);
const minutesPassed = Math.floor(secondsPassed / 60);
const secondsLeft = (secondsPassed - minutesPassed * 60).toString().padStart(2, '0');
return `${minutesPassed}:${secondsLeft} ${this.$locale.baseText('genericHelpers.min')}`;
return `${minutesPassed}:${secondsLeft}${this.$locale.baseText('genericHelpers.minShort')}`;
},
convertToDisplayDate(epochTime: number): { date: string; time: string } {
const formattedDate = dateformat(epochTime, 'd mmm, yyyy#HH:MM:ss');
const [date, time] = formattedDate.split('#');
return { date, time };
},
editAllowedCheck(): boolean {
if (this.isReadOnly) {