Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding output and running status to the hoverover when we run the workflow #519

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading