File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ requirejs.config({
40
40
require ( [ 'jquery' , 'bootstrap.modal' , 'svg-pan-zoom' ] ,
41
41
function ( $ , modal , svgPanZoom ) {
42
42
// Enable svg-pan-zoom on the graph
43
- svgPanZoom ( 'svg ' , {
43
+ svgPanZoom ( '#graph ' , {
44
44
zoomEnabled : true ,
45
45
controlIconsEnabled : true
46
46
} ) ;
Original file line number Diff line number Diff line change @@ -121,16 +121,17 @@ <h2>Workflow: <span th:text="${workflow.label}">Workflow Name</span></h2>
121
121
< a id ="download-link-graph " href ="" download ="workflow.png "> </ a >
122
122
< strong > Graph: </ strong >
123
123
< button id ="view-dot " class ="btn btn-primary " type ="button " data-toggle ="modal " data-target ="#dotGraph "> View DOT</ button >
124
- < button id ="download-graph " class ="btn btn-primary " type ="button "> Download Image</ button >
124
+ < a id ="download-graph " class ="btn btn-primary " type ="button " th:href =" @{'/workflows/' + ${workflow.id} + '/graph/svg'} " download =" graph.svg " > Download Image</ a >
125
125
</ div >
126
126
</ div >
127
127
</ div >
128
128
< div class ="row ">
129
129
< div class ="col-md-12 ">
130
130
< div id ="visualisation " class ="jumbotron ">
131
131
< div id ="loading ">
132
- < img src ="../static/img/loading.svg " th:src ="@{/img/loading.svg} " />
133
- < span > Drawing Workflow...</ span >
132
+ < object id ="graph " th:data ="@{'/workflows/' + ${workflow.id} + '/graph/svg'} " type ="image/svg+xml ">
133
+ < img th:src ="@{'/workflows/' + ${workflow.id} + '/graph/png'} " alt ="workflow graph " />
134
+ </ object >
134
135
</ div >
135
136
< div id ="graph "> </ div >
136
137
</ div >
You can’t perform that action at this time.
0 commit comments