Browse Source

feat: show flow id in workflow log

Ahmad Kholid 3 years ago
parent
commit
b98661ea04

+ 1 - 1
src/background/workflow-engine/engine.js

@@ -261,10 +261,10 @@ class WorkflowEngine {
           message,
           id: this.id,
           workflowId: id,
-          history: this.saveLog ? this.history : [],
           endedAt: endedTimestamp,
           parentLog: this.parentWorkflow,
           startedAt: this.startedTimestamp,
+          history: this.saveLog ? this.history : [],
           data: {
             table: this.referenceData.table,
             variables: this.referenceData.variables,

+ 1 - 0
src/locales/en/newtab.json

@@ -251,6 +251,7 @@
     }
   },
   "log": {
+    "flowId": "Flow Id",
     "goBack": "Go back to \"{name}\" log",
     "goWorkflow": "Go to workflow",
     "startedDate": "Started date",

+ 7 - 0
src/newtab/pages/logs/[id].vue

@@ -89,6 +89,13 @@
               >
                 <v-remixicon name="riExternalLinkLine" />
               </router-link>
+              <code
+                v-show="item.workerId"
+                :title="t('log.flowId')"
+                class="text-xs mr-4 bg-box-transparent rounded-lg p-1 rounded-md"
+              >
+                {{ item.workerId }}
+              </code>
               <p class="text-gray-600 dark:text-gray-200">
                 {{ countDuration(0, item.duration || 0) }}
               </p>