Skip to content

Commit

Permalink
Add ability to invoke adaptation js code to the workers page (#121)
Browse files Browse the repository at this point in the history
Co-authored-by: zef <[email protected]>
  • Loading branch information
zonagit and zef authored Oct 12, 2022
1 parent dfe9d61 commit ac7064d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cws-ui/src/main/webapp/js/adaptation-workers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// override with js code file in your adaptation project for example like this
// cp your-cws-adaptation/src/main/resources/cws-ui/adaptation-workers.js common-workflow-service/cws-ui/src/web/main/webapp/js/adaptation-workers.js
function adaptationWorkersReady() {
return; // CWS core behavior is to do nothing here
}
4 changes: 4 additions & 0 deletions install/cws-ui/workers.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<title>CWS - Workers</title>
<script src="/${base}/js/jquery.min.js"></script>
<link href="/${base}/css/bootstrap.min.css" rel="stylesheet">
<script src="/${base}/js/adaptation-workers.js"></script>
<!-- Custom styles for this template -->
<link href="/${base}/css/dashboard.css" rel="stylesheet">
<script>
Expand Down Expand Up @@ -185,6 +186,9 @@
$("#${w.id}_minus_config").hide();
</#list>
<!--Call any potential adaptation specific updates -->
adaptationWorkersReady();
refreshStats();
pageRefId = setInterval(pageRefresh, refreshRate);
});
Expand Down

0 comments on commit ac7064d

Please sign in to comment.