mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
✨ Dynamic title based on workflow execution (#865)
* ✅ Added title changes based on workflow execution * ⚡ Title changes on workflow open, reset on workflow delete, fixed not showing when page refreshed * ⚡ Title icons
This commit is contained in:
@@ -12,10 +12,12 @@ import { nodeHelpers } from '@/components/mixins/nodeHelpers';
|
||||
import { showMessage } from '@/components/mixins/showMessage';
|
||||
|
||||
import mixins from 'vue-typed-mixins';
|
||||
import titleChange from './titleChange';
|
||||
|
||||
export const pushConnection = mixins(
|
||||
nodeHelpers,
|
||||
showMessage,
|
||||
titleChange
|
||||
)
|
||||
.extend({
|
||||
data () {
|
||||
@@ -147,7 +149,7 @@ export const pushConnection = mixins(
|
||||
*/
|
||||
pushMessageReceived (event: Event, isRetry?: boolean): boolean {
|
||||
const retryAttempts = 5;
|
||||
|
||||
const workflow = this.getWorkflow();
|
||||
let receivedData: IPushData;
|
||||
try {
|
||||
// @ts-ignore
|
||||
@@ -207,7 +209,7 @@ export const pushConnection = mixins(
|
||||
if (runDataExecuted.data.resultData.error && runDataExecuted.data.resultData.error.message) {
|
||||
errorMessage = `There was a problem executing the workflow:<br /><strong>"${runDataExecuted.data.resultData.error.message}"</strong>`;
|
||||
}
|
||||
|
||||
titleChange.set(workflow.name, 'ERROR');
|
||||
this.$showMessage({
|
||||
title: 'Problem executing workflow',
|
||||
message: errorMessage,
|
||||
@@ -215,6 +217,7 @@ export const pushConnection = mixins(
|
||||
});
|
||||
} else {
|
||||
// Workflow did execute without a problem
|
||||
titleChange.set(workflow.name, 'IDLE');
|
||||
this.$showMessage({
|
||||
title: 'Workflow got executed',
|
||||
message: 'Workflow did get executed successfully!',
|
||||
|
||||
Reference in New Issue
Block a user