From 2d9d1e71c076a0c2430ebb47c60d452e972e0160 Mon Sep 17 00:00:00 2001 From: Brian Broll Date: Wed, 3 Aug 2016 08:37:24 -0500 Subject: [PATCH 1/2] Added "complete" notification if exec forked. Fixes #596 (#598) WIP #596 Added quotes around job, exec, branch for consistency --- src/plugins/ExecuteJob/ExecuteJob.js | 6 ++++++ src/plugins/ExecutePipeline/ExecutePipeline.js | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/src/plugins/ExecuteJob/ExecuteJob.js b/src/plugins/ExecuteJob/ExecuteJob.js index cf272b9db..de11623d8 100644 --- a/src/plugins/ExecuteJob/ExecuteJob.js +++ b/src/plugins/ExecuteJob/ExecuteJob.js @@ -81,6 +81,7 @@ define([ } this._callback = callback; + this.currentForkName = null; this.prepare() .then(() => this.executeJob(this.activeNode)); }; @@ -111,6 +112,7 @@ define([ var msg; if (result.status === STORAGE_CONSTANTS.FORKED) { msg = `"${name}" execution has forked to "${result.forkName}"`; + this.currentForkName = result.forkName; this.sendNotification(msg); } }); @@ -228,6 +230,10 @@ define([ this.logger.info(`Setting ${name} (${jobId}) status to ${status}`); this.clearOldMetadata(job); + if (this.currentForkName) { + // notify client that the job has completed + this.sendNotification(`"${name}" execution completed on branch "${this.currentForkName}"`); + } if (err) { this.core.setAttribute(exec, 'status', 'failed'); } else { diff --git a/src/plugins/ExecutePipeline/ExecutePipeline.js b/src/plugins/ExecutePipeline/ExecutePipeline.js index 519e28d47..f6e517e8c 100644 --- a/src/plugins/ExecutePipeline/ExecutePipeline.js +++ b/src/plugins/ExecutePipeline/ExecutePipeline.js @@ -112,6 +112,7 @@ define([ } this._callback = callback; + this.currentForkName = null; startPromise .then(() => this.core.loadSubTree(this.activeNode)) @@ -139,6 +140,7 @@ define([ .then(result => { var msg; if (result.status === STORAGE_CONSTANTS.FORKED) { + this.currentForkName = result.forkName; msg = `"${this.pipelineName}" execution has forked to "${result.forkName}"`; this.sendNotification(msg); } @@ -286,6 +288,11 @@ define([ return; } + if (this.currentForkName) { + // notify client that the job has completed + this.sendNotification(`"${this.pipelineName}" execution completed on branch "${this.currentForkName}"`); + } + this.logger.debug(`Pipeline "${name}" complete!`); this.core.setAttribute(this.activeNode, 'status', (!this.pipelineError ? 'success' : 'failed')); From a8e5876f8387fa56110ca947564e79b16973a8b6 Mon Sep 17 00:00:00 2001 From: Brian Broll Date: Wed, 3 Aug 2016 08:41:24 -0500 Subject: [PATCH 2/2] Updated fab icon colors. Fixes #588 (#599) --- src/visualizers/panels/ForgeActionButton/Actions.js | 3 +++ src/visualizers/panels/ForgeActionButton/PluginConfig.json | 1 + 2 files changed, 4 insertions(+) diff --git a/src/visualizers/panels/ForgeActionButton/Actions.js b/src/visualizers/panels/ForgeActionButton/Actions.js index fde1315ea..b00ebd8bb 100644 --- a/src/visualizers/panels/ForgeActionButton/Actions.js +++ b/src/visualizers/panels/ForgeActionButton/Actions.js @@ -103,6 +103,7 @@ define([ name: `Return to ${fromType}`, icon: 'input', priority: 2, + color: 'teal', filter: () => { return DeepForge.last[fromType]; }, @@ -112,6 +113,7 @@ define([ name: `Delete ${type} Definition`, icon: 'delete', priority: 1, + color: 'red', action: function() { // Delete and go to the last pipeline? var node = this.client.getNode(this._currentNodeId), @@ -139,6 +141,7 @@ define([ name: 'Restart ' + name, icon: 'replay', priority: 1000, + color: 'green', action: function(event) { this.runExecutionPlugin(pluginId, event.shiftKey); } diff --git a/src/visualizers/panels/ForgeActionButton/PluginConfig.json b/src/visualizers/panels/ForgeActionButton/PluginConfig.json index a1c1db79c..fafd836ac 100644 --- a/src/visualizers/panels/ForgeActionButton/PluginConfig.json +++ b/src/visualizers/panels/ForgeActionButton/PluginConfig.json @@ -5,6 +5,7 @@ }, "ExecutePipeline": { "icon": "play_arrow", + "color": "green", "priority": 1 }, "ImportTorch": {