diff --git a/src/main/resources/static/js/gw.chart.js b/src/main/resources/static/js/gw.chart.js index 2fba773b..4f82a163 100644 --- a/src/main/resources/static/js/gw.chart.js +++ b/src/main/resources/static/js/gw.chart.js @@ -155,7 +155,7 @@ GW.chart = { return isin; }, - renderUtil: function (type, msg, process_history_container_id) { + renderUtil: function (type, msg, pname, process_history_container_id) { this.utils.srand(Date.now()); var labels = [], @@ -349,7 +349,7 @@ GW.chart = { responsive: true, title: { display: true, - text: type + " Execution History Chart", + text: pname + " " + type + " Execution History Chart", }, tooltips: { mode: "index", @@ -385,11 +385,11 @@ GW.chart = { this.history_chart[type] = new Chart(ctx, config); }, - renderProcessHistoryChart: function (msg, process_history_container_id) { + renderProcessHistoryChart: function (msg, pname, process_history_container_id) { msg = msg.sort(function (x, y) { return x["history_begin_time"] - y["history_begin_time"]; }); - this.renderUtil("process", msg, process_history_container_id); + this.renderUtil("process", msg, pname, process_history_container_id); }, renderWorkflowHistoryChart: function (msg) { diff --git a/src/main/resources/static/js/gw.process.js b/src/main/resources/static/js/gw.process.js index fd02308a..160b5bcd 100644 --- a/src/main/resources/static/js/gw.process.js +++ b/src/main/resources/static/js/gw.process.js @@ -874,6 +874,7 @@ GW.process = { history: function (pid, pname) { GW.process.util.history( pid, + pname, "#process-history-container", "#process_history_table", "#closeHistory", diff --git a/src/main/resources/static/js/gw.process.sidepanel.js b/src/main/resources/static/js/gw.process.sidepanel.js index fb112867..515cc8aa 100644 --- a/src/main/resources/static/js/gw.process.sidepanel.js +++ b/src/main/resources/static/js/gw.process.sidepanel.js @@ -523,6 +523,7 @@ GW.process.sidepanel = { history: function (process_id, process_name) { GW.process.util.history( process_id, + process_name, "#prompt-panel-process-history-container", "#process_history_table", "#closeHistory", diff --git a/src/main/resources/static/js/gw.process.util.js b/src/main/resources/static/js/gw.process.util.js index 62ee3531..8e924b88 100644 --- a/src/main/resources/static/js/gw.process.util.js +++ b/src/main/resources/static/js/gw.process.util.js @@ -460,6 +460,7 @@ GW.process.util = { history: function ( pid, + pname, process_history_container_id, process_history_table_id, close_history, @@ -471,7 +472,7 @@ GW.process.util = { method: "POST", - data: "type=process&id=" + pid, + data: "type=process&id=" + pid + "&pname=" + pname, }) .done(function (msg) { // for process dialog @@ -500,7 +501,7 @@ GW.process.util = { var table_selector = `${process_history_container_id} ${process_history_table_id}`; GW.history.applyBootstrapTable(table_selector); - GW.chart.renderProcessHistoryChart(msg, process_history_container_id); + GW.chart.renderProcessHistoryChart(msg, pname, process_history_container_id); $(close_history).click(function () { $(process_history_container_id).html("");