1
|
<?xml version="1.0" encoding="utf-8"?>
|
2
|
|
3
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
4
|
version="1.0">
|
5
|
|
6
|
<xsl:output method="html" omit-xml-declaration="yes" encoding="UTF-8" standalone="no"/>
|
7
|
|
8
|
<xsl:template match="/">
|
9
|
|
10
|
<xsl:variable name="id" select="//RESOURCE_IDENTIFIER/@value"/>
|
11
|
<xsl:variable name="name" select="//WORKFLOW_NAME"/>
|
12
|
<xsl:variable name="startMode" select="//CONFIGURATION/@start"/>
|
13
|
<xsl:variable name="status" select="//CONFIGURATION/@status"/>
|
14
|
|
15
|
<xsl:variable name="interval" select="//SCHEDULING/MININTERVAL"/>
|
16
|
|
17
|
<div class="row">
|
18
|
|
19
|
<wf-graph-modal wf-id="currentGraphId" visible="showGraphModal" />
|
20
|
<wf-process-modal proc-id="currentProcId" visible="showProcModal" />
|
21
|
|
22
|
<xsl:for-each select="//DATASOURCE">
|
23
|
<repo-access-params-modal ds-id="{@id}" iface="{@interface}" protocol="{@protocol}" visible="showAccessParamsModal" />
|
24
|
</xsl:for-each>
|
25
|
|
26
|
<div class="col-xs-12 col-md-4 col-lg-2">
|
27
|
<ul class="nav nav-pills nav-stacked">
|
28
|
<li class="active" style="cursor: pointer">
|
29
|
<a data-target="#tabInfo" data-toggle="tab" ng-click="refresh()">Workflow Info</a>
|
30
|
</li>
|
31
|
<li style="cursor: pointer">
|
32
|
<a data-target="#tabParameters" data-toggle="tab">Parameters</a>
|
33
|
</li>
|
34
|
<li style="cursor: pointer">
|
35
|
<a data-target="#tabHistory" data-toggle="tab" ng-click="updateHistory('{$id}')">History</a>
|
36
|
</li>
|
37
|
<li style="cursor: pointer">
|
38
|
<a data-target="#tabSettings" data-toggle="tab">Other settings</a>
|
39
|
</li>
|
40
|
</ul>
|
41
|
</div>
|
42
|
<div class="col-xs-12 col-md-8 col-lg-10">
|
43
|
<h5>
|
44
|
<b>Workflow:</b>
|
45
|
<xsl:value-of select="concat(' ', $name)"/>
|
46
|
</h5>
|
47
|
<!-- Tab panes -->
|
48
|
<div class="tab-content" style="border: 1px solid #dddddd; border-radius: 4px; padding: 20px">
|
49
|
<div class="tab-pane active" id="tabInfo">
|
50
|
<form class="form-horizontal">
|
51
|
<xsl:for-each select="//DATASOURCE">
|
52
|
<wf-form-row-static name="Datasource" value="{@name}" url="workflows.do#/api/{@id}/{@interface}"/>
|
53
|
<wf-form-row-static name="Interface" value="{@interface}"/>
|
54
|
<wf-form-row-static name="Protocol" value="{@protocol}"/>
|
55
|
|
56
|
<xsl:if test=".//extraFields/field[@name = 'last_collection_date'] and .//extraFields/field[@name = 'last_collection_mdId'] and .//extraFields/field[@name = 'last_collection_total']">
|
57
|
<wf-form-row-store-link name="Last collection"
|
58
|
date="{.//extraFields/field[@name = 'last_collection_date']}"
|
59
|
total="{.//extraFields/field[@name = 'last_collection_total']}"
|
60
|
url="../inspector/mdstore.do?id={.//extraFields/field[@name = 'last_collection_mdId']}" />
|
61
|
</xsl:if>
|
62
|
|
63
|
<xsl:if test=".//extraFields/field[@name = 'last_aggregation_date'] and .//extraFields/field[@name = 'last_aggregation_mdId'] and .//extraFields/field[@name = 'last_aggregation_total']">
|
64
|
<wf-form-row-store-link name="Last aggregation"
|
65
|
date="{.//extraFields/field[@name = 'last_aggregation_date']}"
|
66
|
total="{.//extraFields/field[@name = 'last_aggregation_total']}"
|
67
|
url="../inspector/mdstore.do?id={.//extraFields/field[@name = 'last_aggregation_mdId']}" />
|
68
|
</xsl:if>
|
69
|
|
70
|
<xsl:if test=".//extraFields/field[@name = 'last_download_date'] and .//extraFields/field[@name = 'last_download_objId'] and .//extraFields/field[@name = 'last_download_total']">
|
71
|
<wf-form-row-store-link name="Last download"
|
72
|
date="{.//extraFields/field[@name = 'last_download_date']}"
|
73
|
total="{.//extraFields/field[@name = 'last_download_total']}"
|
74
|
url="objectstoreInspector.do#/inspect.do/{.//extraFields/field[@name = 'last_download_objId']}" />
|
75
|
</xsl:if>
|
76
|
|
77
|
<div class="form-group">
|
78
|
<div class="col-sm-offset-3 col-sm-9">
|
79
|
<button class="btn btn-sm btn-primary" ng-click="editAccessParams()">access params</button>
|
80
|
</div>
|
81
|
</div>
|
82
|
|
83
|
<hr/>
|
84
|
</xsl:for-each>
|
85
|
|
86
|
<wf-form-row-static name="Workflow" value="{$name}" value-description="{//WORKFLOW_DESCRIPTION}" url="isManager.do#/profile/{$id}"/>
|
87
|
<wf-form-row-static name="Family" value="{//WORKFLOW_FAMILY}"/>
|
88
|
|
89
|
<xsl:choose>
|
90
|
<xsl:when test="//STATUS/LAST_EXECUTION_STATUS = 'SUCCESS'">
|
91
|
<wf-form-row-label name="Last execution" value="SUCCESS" label-class="label-success" date="{//STATUS/LAST_EXECUTION_DATE}"/>
|
92
|
</xsl:when>
|
93
|
<xsl:when test="//STATUS/LAST_EXECUTION_STATUS = 'FAILURE'">
|
94
|
<wf-form-row-label name="Last execution" value="FAILURE" label-class="label-danger" date="{//STATUS/LAST_EXECUTION_DATE}"/>
|
95
|
</xsl:when>
|
96
|
<xsl:otherwise>
|
97
|
<wf-form-row-static name="Last execution" value="not yet executed" value-style="white-space: nowrap; font-style: italic;"/>
|
98
|
</xsl:otherwise>
|
99
|
</xsl:choose>
|
100
|
|
101
|
|
102
|
<xsl:if test="count(//NODE[@type='LaunchWorkflow' or @type='LaunchWorkflowTemplate']) > 0">
|
103
|
<hr />
|
104
|
<wf-sub-workflows wf-id="{$id}" graph-id="currentGraphId" show-graph-modal="showGraphModal" />
|
105
|
</xsl:if>
|
106
|
|
107
|
<div class="form-group" style="margin-top: 50px">
|
108
|
<div class="col-sm-offset-3 col-sm-9">
|
109
|
<button class="btn btn-primary" ng-click="executeWf('{$id}')">
|
110
|
<xsl:if test="$status != 'EXECUTABLE' or $startMode = 'DISABLED'">
|
111
|
<xsl:attribute name="disabled">disabled</xsl:attribute>
|
112
|
</xsl:if>
|
113
|
<span style="margin-right: 8px" class="glyphicon glyphicon-play"></span>
|
114
|
Launch
|
115
|
</button>
|
116
|
<button type="button" class="btn btn-default" ng-click="refresh()" style="margin-left: 5px;">
|
117
|
<span class="glyphicon glyphicon-refresh"></span>
|
118
|
</button>
|
119
|
|
120
|
<button type="button" class="btn btn-default pull-right" ng-click="showGraph('{$id}')">
|
121
|
<span class="glyphicon glyphicon-picture"></span> Graph
|
122
|
</button>
|
123
|
</div>
|
124
|
</div>
|
125
|
</form>
|
126
|
|
127
|
</div>
|
128
|
|
129
|
<div class="tab-pane" id="tabParameters">
|
130
|
<xsl:choose>
|
131
|
<xsl:when test="count(//CONFIGURATION/PARAMETERS/PARAM) > 0">
|
132
|
<form class="form-horizontal" name="wfParamatersForm">
|
133
|
<xsl:for-each select="//CONFIGURATION/PARAMETERS/PARAM">
|
134
|
|
135
|
<xsl:choose>
|
136
|
<xsl:when test="@managedBy='system'">
|
137
|
<wf-form-row-static name="{@name}" value="{.}" description="{@description}" value-style="font-family: monospace">
|
138
|
<xsl:if test="@category">
|
139
|
<xsl:attribute name="category">
|
140
|
<xsl:value-of select="@category" />
|
141
|
</xsl:attribute>
|
142
|
</xsl:if>
|
143
|
</wf-form-row-static>
|
144
|
</xsl:when>
|
145
|
|
146
|
<xsl:when test="@type='boolean'">
|
147
|
<wf-form-row-select name="{@name}" description="{@description}"
|
148
|
mandatory="{@required}"
|
149
|
init-value="{.}"
|
150
|
ng-model="params.{@name}"
|
151
|
ng-original-model="originalParams.{@name}"
|
152
|
values="[{{'id':'true','name':'TRUE'}},{{'id':'false','name':'FALSE'}}]">
|
153
|
<xsl:if test="@category">
|
154
|
<xsl:attribute name="category">
|
155
|
<xsl:value-of select="@category" />
|
156
|
</xsl:attribute>
|
157
|
</xsl:if>
|
158
|
</wf-form-row-select>
|
159
|
</xsl:when>
|
160
|
<xsl:when test="@function">
|
161
|
<wf-form-row-select name="{@name}" description="{@description}"
|
162
|
mandatory="{@required}"
|
163
|
init-value="{.}"
|
164
|
ng-model="params.{@name}"
|
165
|
ng-original-model="originalParams.{@name}"
|
166
|
values-function="{@function}">
|
167
|
<xsl:if test="@category">
|
168
|
<xsl:attribute name="category">
|
169
|
<xsl:value-of select="@category" />
|
170
|
</xsl:attribute>
|
171
|
</xsl:if>
|
172
|
</wf-form-row-select>
|
173
|
</xsl:when>
|
174
|
<xsl:otherwise>
|
175
|
<wf-form-row-text name="{@name}" description="{@description}"
|
176
|
mandatory="{@required}"
|
177
|
init-value="{.}"
|
178
|
ng-model="params.{@name}"
|
179
|
ng-original-model="originalParams.{@name}">
|
180
|
<xsl:attribute name="type">
|
181
|
<xsl:choose>
|
182
|
<xsl:when test="@type">
|
183
|
<xsl:value-of select="@type"/>
|
184
|
</xsl:when>
|
185
|
<xsl:otherwise>
|
186
|
string
|
187
|
</xsl:otherwise>
|
188
|
</xsl:choose>
|
189
|
</xsl:attribute>
|
190
|
<xsl:if test="@category">
|
191
|
<xsl:attribute name="category">
|
192
|
<xsl:value-of select="@category" />
|
193
|
</xsl:attribute>
|
194
|
</xsl:if>
|
195
|
</wf-form-row-text>
|
196
|
</xsl:otherwise>
|
197
|
</xsl:choose>
|
198
|
</xsl:for-each>
|
199
|
<xsl:if test="count(//CONFIGURATION/PARAMETERS/PARAM[@managedBy = 'user']) > 0">
|
200
|
<div class="form-group">
|
201
|
<div class="col-sm-offset-3 col-sm-9">
|
202
|
<button class="btn btn-primary" ng-click="updateParameters('{$id}', params)"
|
203
|
ng-disabled="wfParamatersForm.$invalid">
|
204
|
<span class="glyphicon glyphicon-ok" style="margin-right: 8px"></span>
|
205
|
Update
|
206
|
</button>
|
207
|
<button class="btn btn-default" style="margin-left:5px;" ng-click="resetParameters()">
|
208
|
<span class="glyphicon glyphicon-remove" style="margin-right:8px"></span>
|
209
|
Reset
|
210
|
</button>
|
211
|
</div>
|
212
|
</div>
|
213
|
</xsl:if>
|
214
|
</form>
|
215
|
</xsl:when>
|
216
|
<xsl:otherwise>
|
217
|
No Parameters
|
218
|
</xsl:otherwise>
|
219
|
</xsl:choose>
|
220
|
</div>
|
221
|
|
222
|
<div class="tab-pane" id="tabHistory">
|
223
|
<wf-history ng-model="history" on-refresh="updateHistory('{$id}')"/>
|
224
|
</div>
|
225
|
|
226
|
<div class="tab-pane" id="tabSettings">
|
227
|
<wf-form-update wf-id="{$id}" />
|
228
|
</div>
|
229
|
</div>
|
230
|
</div>
|
231
|
</div>
|
232
|
</xsl:template>
|
233
|
|
234
|
</xsl:stylesheet>
|
235
|
|
236
|
|
237
|
|