-
Notifications
You must be signed in to change notification settings - Fork 1
/
template.html
477 lines (473 loc) · 25.3 KB
/
template.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
<div xmlns="http://www.w3.org/1999/html">
<style>
.popover-class-danger {
color: #a94442;
background-color: #f2dede;
border-color: #ebccd1;
}
.popover-class-warning {
color: #8a6d3b;
background-color: #fcf8e3;
border-color: #faebcc;
}
.func-active {
background-color: #F7F7F7;
}
</style>
<div class="col-md-12">
<h2><i aria-hidden="true" class="fa fa-github" style="padding-right:5px"></i>Git for TM1</h2>
</div>
<div class="card-body">
<div class="alert alert-primary" role="alert">
TM1 Version: <label>{{productVersion}}</label>
</div>
</div>
<uib-tabset>
<uib-tab>
<uib-tab-heading>
Git Pull
</uib-tab-heading>
<uib-tabset>
<uib-tab>
<uib-tab-heading>
Pull Settings
</uib-tab-heading>
<div class="card-body" ng-if="options.message">
<button class="btn btn-warning">
<span aria-hidden="true" class="fa fa-warning"></span>
<span>{{options.message}}</span>
</button>
</div>
<div class="card">
<div class="card-header" ng-if="!options.executing && options.queryStatus"
style="padding: 5px 10px;">
<label>
Pull Action Run in {{options.responseTimeMs | num:0}} ms
</label>
</div>
<form>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text">Branch Name:</span>
</div>
<input class="form-control" id="gitpullbranch" ng-model="gitpullbranch" placeholder="source banch"
type="text">
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text">Username:</span>
</div>
<input class="form-control" id="username" ng-model="username" placeholder="Git User Name"
type="text">
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text">Password:</span>
</div>
<input class="form-control" id="gitpullpw" ng-model="gitpullpw" placeholder="Password"
type="password">
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text">Execution Mode:</span>
</div>
<select class="form-control" id="executionMode" ng-model="executionMode" rows="3">
<option>SingleCommit</option>
</select>
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text">Force:</span>
</div>
<select class="form-control" id="sel2" ng-model="gitpullforce">
<option>false</option>
<option>true</option>
</select>
</div>
<div class="input-group mb-3">
<span class="input-group-append">
<button class="btn btn-warning"
ng-click="gitPullPlan(gitpullbranch, username, gitpullpw, executionMode, force)"
ng-if="!hasPullPlanID" title="{{'EXECUTE' | translate}}"> Create Pull Plan
<i class="fa fa-fw fa-bolt" ng-if="!executing"></i>
<i class="fa fa-refresh fa-spin" ng-if="executing"></i>
</button>
<button class="btn btn-success" ng-click="gitExPullPlan()" ng-if="hasPullPlanID"
title="{{'EXECUTE' | translate}}"> Execute Plan ID: {{pullPlanID}}
<i class="fa fa-fw fa-bolt" ng-if="!executing"></i>
<i class="fa fa-refresh fa-spin" ng-if="executing"></i>
</button>
</span>
</div>
</form>
</div>
</uib-tab>
<uib-tab>
<uib-tab-heading>
Pull Results
</uib-tab-heading>
<div class="card-bdy">
<div class="row">
<div class="col-md-12 text-center">
<i class="fa fa-refresh fa-3x fa-spin" ng-if="options.executing"></i>
</div>
</div>
<div class="card" ng-if="!options.executing && options.queryStatus">
<div class="card-header" style="padding: 5px 10px;">
<span>
<span style="margin-bottom:0px">
{} Result - Run in {{options.responseTimeMs | num:0}} ms</span>
</span>
<div class="pull-right">
<span>
<input ng-model="options.resultType" type="radio" value="json-tree"/>
<span>JSON Tree</span>
</span>
<span>
<input ng-model="options.resultType" type="radio" value="json"/>
<span>JSON</span>
</span>
<span>
<input ng-model="options.resultType" type="radio" value="hjson"/>
<span>HJSON</span>
</span>
</div>
</div>
<div class="card-body" ng-if="options.message">
<div>
<button class="btn btn-warning">
<span aria-hidden="true" class="fa fa-warning"></span>
<span>{{options.message}}</span>
</button>
</div>
</div>
<div class="card-body" ng-if="!options.message">
<auto-height>
<json-formatter json="options.resultQuery" ng-if="options.resultType == 'json-tree'"
open="1"></json-formatter>
<pre ng-if="options.resultType == 'json'">{{options.resultQuery | json}}</pre>
<pre ng-if="options.resultType == 'hjson'">{{options.resultQuery | hjson}}</pre>
</auto-height>
</div>
</div>
</div>
</uib-tab>
</uib-tab>
<uib-tab>
<uib-tab-heading>
Git Push
</uib-tab-heading>
<uib-tabset>
<uib-tab>
<uib-tab-heading>
Push Settings
</uib-tab-heading>
<div class="card-body" ng-if="options.message">
<button class="btn btn-warning">
<span aria-hidden="true" class="fa fa-warning"></span>
<span>{{options.message}}</span>
</button>
</div>
<div class="card">
<div class="card-header" ng-if="!options.executing && options.queryStatus"
style="padding: 5px 10px;">
<label>
Push Action Run in {{options.responseTimeMs | num:0}} ms
</label>
</div>
<form>
<div class="input-group mb-3">
<div class="alert alert-dark" role="alert">
Author: {{activeUser}}
</div>
</div>
<div class="input-group mb-3">
<div class="alert alert-dark" role="alert">
Email: {{activeUserEmail}}
</div>
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text">Branch Name:</span>
</div>
<input class="form-control" id="branch" ng-model="branch" placeholder="master"
type="text">
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text">Username:</span>
</div>
<input class="form-control" id="username" ng-model="username" placeholder="Git User Name"
type="text">
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text">Password:</span>
</div>
<input class="form-control" id="gitpushpw" ng-model="gitpushpw" placeholder="Password"
type="password">
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text">Message:</span>
</div>
<textarea class="form-control" id="message" ng-model="pushmessage" rows="3"></textarea>
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text">Force:</span>
</div>
<select class="form-control" id="sel2" ng-model="gitpushforce">
<option>false</option>
<option>true</option>
</select>
</div>
<div class="input-group mb-3">
<span class="input-group-append">
<button class="btn btn-warning"
ng-click="gitPushPlan(branch, username, gitpushpw, pushmessage, force)"
ng-if="!hasPushPlanID" title="{{'EXECUTE' | translate}}"> Create Push Plan
<i class="fa fa-fw fa-bolt" ng-if="!executing"></i>
<i class="fa fa-refresh fa-spin" ng-if="executing"></i>
</button>
<button class="btn btn-success" ng-click="gitExPushPlan()" ng-if="hasPushPlanID"
title="{{'EXECUTE' | translate}}"> Execute Plan ID: {{pushPlanID}}
<i class="fa fa-fw fa-bolt" ng-if="!executing"></i>
<i class="fa fa-refresh fa-spin" ng-if="executing"></i>
</button>
</span>
</div>
</form>
</div>
</uib-tab>
<uib-tab>
<uib-tab-heading>
Push Results
</uib-tab-heading>
<div class="card-bdy">
<div class="row">
<div class="col-md-12 text-center">
<i class="fa fa-refresh fa-3x fa-spin" ng-if="options.executing"></i>
</div>
</div>
<div class="card" ng-if="!options.executing && options.queryStatus">
<div class="card-header" style="padding: 5px 10px;">
<span>
<span style="margin-bottom:0px">
{} Result - Run in {{options.responseTimeMs | num:0}} ms</span>
</span>
<div class="pull-right">
<span>
<input ng-model="options.resultType" type="radio" value="json-tree"/>
<span>JSON Tree</span>
</span>
<span>
<input ng-model="options.resultType" type="radio" value="json"/>
<span>JSON</span>
</span>
<span>
<input ng-model="options.resultType" type="radio" value="hjson"/>
<span>HJSON</span>
</span>
</div>
</div>
<div class="card-body" ng-if="options.message">
<div>
<button class="btn btn-warning">
<span aria-hidden="true" class="fa fa-warning"></span>
<span>{{options.message}}</span>
</button>
</div>
</div>
<div class="card-body" ng-if="!options.message">
<auto-height>
<json-formatter json="options.resultQuery" ng-if="options.resultType == 'json-tree'"
open="1"></json-formatter>
<pre ng-if="options.resultType == 'json'">{{options.resultQuery | json}}</pre>
<pre ng-if="options.resultType == 'hjson'">{{options.resultQuery | hjson}}</pre>
</auto-height>
</div>
</div>
</div>
</uib-tab>
</uib-tabset>
</uib-tab>
<uib-tab>
<uib-tab-heading>
Git Init
</uib-tab-heading>
<div class="card-body" ng-if="options.message">
<button class="btn btn-warning">
<span aria-hidden="true" class="fa fa-warning"></span>
<span>{{options.message}}</span>
</button>
</div>
<div class="card">
<div class="card-header" ng-if="!options.executing && options.queryStatus" style="padding: 5px 10px;">
<label>
Complete: {{options.responseTimeMs | num:0}} ms
</label>
</div>
<form>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">URL:</span>
</div>
<input class="form-control" id="giturl" ng-model="giturl" placeholder="https://github.com/usr/planning_sample.git"
type="url">
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon2">Username:</span>
</div>
<input aria-describedby="emailHelp" class="form-control" id="exampleInputEmail1" ng-model="gitemail"
placeholder="Enter email" type="text">
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon3">Password:</span>
</div>
<input class="form-control" id="exampleInputPassword1" ng-model="gitpw" placeholder="Password"
type="password">
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon5">Deployment:</span>
</div>
<select class="form-control" id="sel1" ng-model="gitdeployment">
<option>dev</option>
<option>qa</option>
<option>prod</option>
<option>other</option>
</select>
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon4">Force:</span>
</div>
<select class="form-control" id="sel2" ng-model="gitforce">
<option>false</option>
<option>true</option>
</select>
</div>
<div class="input-group mb-3">
<span class="input-group-append">
<button class="btn btn-warning"
ng-click="gitInit(giturl, gitemail, gitpw, gitdeployment, gitforce)" title="{{'EXECUTE' | translate}}"> Git Init
<i class="fa fa-fw fa-bolt" ng-if="!executing"></i>
<i class="fa fa-refresh fa-spin" ng-if="executing"></i>
</button>
<button class="btn btn-danger" ng-click="gitUninit()" title="{{'EXECUTE' | translate}}"> Git Uninit
<i class="fa fa-fw fa-bolt" ng-if="!executing"></i>
<i class="fa fa-refresh fa-spin" ng-if="executing"></i>
</button>
</span>
</div>
</form>
</div>
</uib-tab>
<uib-tab>
<uib-tab-heading>
TM1 Project File
</uib-tab-heading>
<uib-tabset>
<div class="card-bdy">
<div class="card-header" ng-if="!options.executing && options.queryStatus"
style="padding: 5px 10px;">
<label>
TM1Project file update completed in {{options.responseTimeMs | num:0}} ms
</label>
</div>
<div class="row">
<div class="col-md-12 text-center">
<i class="fa fa-refresh fa-3x fa-spin" ng-if="options.executing"></i>
</div>
</div>
<span class="input-group-append">
<button class="btn btn-warning" ng-click="putTm1Project()"> Update TM1 Project
<i class="fa fa-fw fa-bolt" ng-if="!executing"></i>
<i class="fa fa-refresh fa-spin" ng-if="executing"></i>
</button>
</span>
<br>
<div class="card">
<div id=editor ui-ace="{mode: 'json',
advanced: {
enableSnippets: true,
enableBasicAutocompletion: true,
enableLiveAutocompletion: true }}" ng-model=tm1Project style="height: 300px;width: 600px;font-size: 15px;">
</div>
</div>
<br>
<span class="input-group-append">
<button class="btn btn-success" ng-click="getTm1Project()"> Get TM1 Project
<i class="fa fa-fw fa-bolt" ng-if="!executing"></i>
<i class="fa fa-refresh fa-spin" ng-if="executing"></i>
</button>
</span>
<br>
<div class="card">
<div class="card-body" ng-if="!options.projectMessage" style="font-size: 15px;">
<auto-height>
<json-formatter json="options.projectQuery" ng-if="options.resultType == 'json-tree'"
open="1"></json-formatter>
<pre ng-if="options.resultType == 'json'">{{options.projectQuery | json}}</pre>
<pre ng-if="options.resultType == 'hjson'">{{options.projectQuery | hjson}}</pre>
</auto-height>
</div>
</div>
</div>
</uib-tabset>
</uib-tab>
<uib-tab>
<uib-tab-heading>
Git Status
</uib-tab-heading>
<uib-tabset>
<div class="card-bdy">
<div class="row">
<div class="col-md-12 text-center">
<i class="fa fa-refresh fa-3x fa-spin" ng-if="options.executing"></i>
</div>
</div>
<form>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon2">Username:</span>
</div>
<input aria-describedby="emailHelp" class="form-control" id="exampleInputEmail1" ng-model="gitemail"
placeholder="Enter email" type="text">
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon3">Password:</span>
</div>
<input class="form-control" id="exampleInputPassword1" ng-model="gitpw" placeholder="Password"
type="password">
</div>
<div class="input-group mb-3">
<span class="input-group-append">
<button class="btn btn-success"
ng-click="gitStatus(gitemail, gitpw)" title="{{'EXECUTE' | translate}}"> Git Status
<i class="fa fa-fw fa-bolt" ng-if="!executing"></i>
<i class="fa fa-refresh fa-spin" ng-if="executing"></i>
</button>
</span>
</div>
</form>
<br>
<div class="card">
<div class="card-body" ng-if="!options.gitStatusMessage">
<auto-height>
<json-formatter json="options.gitStatusQuery" ng-if="options.resultType == 'json-tree'"
open="1"></json-formatter>
<pre ng-if="options.resultType == 'json'">{{options.gitStatusQuery | json}}</pre>
<pre ng-if="options.resultType == 'hjson'">{{options.gitStatusQuery | hjson}}</pre>
</auto-height>
</div>
</div>
</div>
</uib-tabset>
</uib-tab>
</uib-tabset>
</div>