Skip to content

Commit

Permalink
Merge pull request #557 from srinijammula/issue_550
Browse files Browse the repository at this point in the history
Displays process name in history chart
  • Loading branch information
srinijammula authored Oct 4, 2024
2 parents 595bd82 + 2ecb558 commit 4c884da
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/main/resources/static/js/gw.chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [],
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/static/js/gw.process.js
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,7 @@ GW.process = {
history: function (pid, pname) {
GW.process.util.history(
pid,
pname,
"#process-history-container",
"#process_history_table",
"#closeHistory",
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/static/js/gw.process.sidepanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 3 additions & 2 deletions src/main/resources/static/js/gw.process.util.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ GW.process.util = {

history: function (
pid,
pname,
process_history_container_id,
process_history_table_id,
close_history,
Expand All @@ -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
Expand Down Expand Up @@ -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("");
Expand Down

0 comments on commit 4c884da

Please sign in to comment.