Skip to content

Commit

Permalink
Adding changes to process.sidepanel.js and workspace.js
Browse files Browse the repository at this point in the history
  • Loading branch information
srilathamaddineni committed May 15, 2024
1 parent 5017916 commit f5333e1
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/resources/static/css/workspace.css
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,7 @@ div.processtooltip table tr td {
padding: 5px;
border-bottom-style: dotted;

}
div.processtooltip table tr td:first-child {
width: 100px;
}
21 changes: 21 additions & 0 deletions src/main/resources/static/js/gw.process.sidepanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,29 @@ GW.process.sidepanel = {
GW.process.history_id = msg.history_id;

msgout = msg.history_output.replaceAll("\n", "<br/>");
var executionTime = (msg.history_end_time - msg.history_begin_time) / 1000;

$("#prompt-panel-process-log-window").append(msgout);
var existingHtml = GW.workspace.tooltipdiv.html();
var updatedHtml = existingHtml +
`<table>
<tr>
<td><b>output</b></td>
<td>`+GW.general.shorten_long_string(GW.general.escapeCodeforHTML(msgout), 200)+`</td>
</tr>
<tr>
<td><b>Running Status</b></td>
<td>`+msg.indicator+`</td>
</tr>
<tr>
<td><b>Execution Time</b></td>
<td>${Math.abs(executionTime)} seconds</td>
</tr>
</table>
`;

GW.workspace.tooltipdiv.html(updatedHtml).style("opacity", 0.9);

} else {
$("#prompt_panel_log_switch")
.prop("checked", false)
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/static/js/gw.workspace.js
Original file line number Diff line number Diff line change
Expand Up @@ -1274,6 +1274,7 @@ GW.workspace = {
GW.menu.details(process_id, "process", function (msg) {
//sometimes the mouse moves too quickly, the mouse is already out but the response doesn't arrive yet. The div will persist forever. So ismouseinside is used.
if (ismouseinside) {
GW.process.sidepanel.showProcessLog(GW.workflow.history_id, d.id, d.title);
GW.workspace.tooltipdiv
.transition()
.duration(200)
Expand Down

0 comments on commit f5333e1

Please sign in to comment.