feat(editor): Add node execution status indicator to output panel (#8124)

## Summary
Adding node execution status indicator to the output panel ([Figma
HiFi](https://www.figma.com/file/iUduV3M4W5wZT7Gw5vgDn1/NDV-output-pane-success-state)).

## Related tickets and issues
Fixes ADO-480

## Review / Merge checklist
- [x] PR title and summary are descriptive. **Remember, the title
automatically goes into the changelog. Use `(no-changelog)` otherwise.**
([conventions](https://github.com/n8n-io/n8n/blob/master/.github/pull_request_title_conventions.md))
- [ ] [Docs updated](https://github.com/n8n-io/n8n-docs) or follow-up
ticket created.
- [x] Tests included.
> A bug is not considered fixed, unless a test is added to prevent it
from happening again.
   > A feature is not complete without tests.
This commit is contained in:
Milorad FIlipović
2023-12-22 12:50:36 +01:00
committed by GitHub
parent 3a881be6c2
commit ab74bade05
12 changed files with 135 additions and 56 deletions

View File

@@ -4,6 +4,7 @@ import { useWorkflowsStore } from '@/stores/workflows.store';
import { i18n as locale } from '@/plugins/i18n';
import { genericHelpers } from './genericHelpers';
import type { IExecutionsSummary } from 'n8n-workflow';
import { convertToDisplayDateComponents } from '@/utils/formatters/dateFormatter';
export interface IExecutionUIData {
name: string;
@@ -72,7 +73,7 @@ export const executionHelpers = defineComponent({
return status;
},
formatDate(fullDate: Date | string | number) {
const { date, time } = this.convertToDisplayDate(fullDate);
const { date, time } = convertToDisplayDateComponents(fullDate);
return locale.baseText('executionsList.started', { interpolate: { time, date } });
},
},

View File

@@ -1,6 +1,5 @@
import { defineComponent } from 'vue';
import { mapStores } from 'pinia';
import dateformat from 'dateformat';
import { VIEWS } from '@/constants';
import { useToast } from '@/composables/useToast';
import { useSourceControlStore } from '@/stores/sourceControl.store';
@@ -48,14 +47,6 @@ export const genericHelpers = defineComponent({
return `${minutesPassed}:${secondsLeft}${this.$locale.baseText('genericHelpers.minShort')}`;
},
convertToDisplayDate(fullDate: Date | string | number): { date: string; time: string } {
const mask = `d mmm${
new Date(fullDate).getFullYear() === new Date().getFullYear() ? '' : ', yyyy'
}#HH:MM:ss`;
const formattedDate = dateformat(fullDate, mask);
const [date, time] = formattedDate.split('#');
return { date, time };
},
/**
* @note Loading helpers extracted as composable in useLoadingService