Browse Source

feat: show when workflow log is not saved

Ahmad Kholid 2 years ago
parent
commit
e7851c71dd

+ 6 - 0
src/components/newtab/logs/LogsHistory.vue

@@ -77,6 +77,12 @@
           class="scroll p-4 overflow-auto"
         >
           <slot name="prepend" />
+          <p
+            v-if="currentLog.history.length === 0"
+            class="text-gray-300 text-center"
+          >
+            The workflow log is not saved
+          </p>
           <div class="text-sm font-mono space-y-1 w-full overflow-auto">
             <div
               v-for="(item, index) in history"

+ 2 - 1
src/newtab/workflowEngine/WorkflowEngine.js

@@ -456,7 +456,7 @@ class WorkflowEngine {
 
       if (!this.workflow?.isTesting) {
         const { name, id, teamId } = this.workflow;
-        console.log(this.historyCtxData);
+
         await this.logger.add({
           detail: {
             name,
@@ -465,6 +465,7 @@ class WorkflowEngine {
             message,
             id: this.id,
             workflowId: id,
+            saveLog: this.saveLog,
             endedAt: endedTimestamp,
             parentLog: this.parentWorkflow,
             startedAt: this.startedTimestamp,

+ 0 - 1
src/newtab/workflowEngine/blocksHandler/handlerExecuteWorkflow.js

@@ -19,7 +19,6 @@ function workflowListener(workflow, options) {
     const engine = new WorkflowEngine(workflow, options);
     engine.init();
     engine.on('destroyed', ({ id, status, message }) => {
-      console.log(engine.referenceData.table, engine.referenceData.variables);
       options.events.onDestroyed(engine);
 
       if (status === 'error') {