blob: 4c490697249ddf0b2ae5f6c65ab3505d6ccda565 (
plain)
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
|
<!--environment input dialog-->
<div>
<div ng-if="uuidEnv==null">
<h4>Environment Name</h4>
<input type="text" ng-model="name" style="width:300px;" />
<div style="text-align:center;margin-top:20px;">
<button class="btn btn-default" ng-disabled=" name==null || name==''" ng-click="addEnvironment(name)">Create</button>
</div>
</div>
<div style="display:flex;flex-direction:row;" ng-if="uuidEnv!=null&&showImage==null">
<div>
<h3> {{name}} -- Openrc
<!--<button class="btn btn-default" style="float:right" ng-click="goNext()">Next</button>-->
<button class="btn btn-default" ng-click="goToImage()" style="margin-bottom:20px;float:right" ng-disabled="showNextOpenRc==null && showNextOpenRc==null ">
Next
</button>
</h3>
<!--<p>In this process, you can input your define openrc config or upload a openrc file</p>-->
<div>
<!--<button style="display:inline;" class="btn btn-default" ng-click="addEnvironment()" ng-show="uuid==null">Add Name</button>-->
</div>
<hr/>
<div bs-tabs style="width:750px;">
<div data-title="Detail" bs-pane ng-if="openrcInfo.openrc!=null">
<h4>
You have already set up the openrc parameters
</h4>
<hr />
<div ng-repeat="(key,value) in openrcInfo.openrc">
<nobr>
<font style="font-weight:600;font-size:14px;">{{key}} : </font>
<font style="font-size:14px;">{{value}}</font>
</nobr>
</div>
</div>
<div data-title="Update" bs-pane>
<div style="margin-top:20px;">
<button class="btn btn-default" ng-click="addInfo()" style="margin-bottom:20px;">Add</button>
<div style="height:300px;width:800px;display:flex;flex-direction:column;flex-wrap:wrap;margin-left:5px;overflow-x:scroll">
<div ng-repeat="info in envInfo">
<!--<div> {{info.name}}</div>-->
<input class="edit-title" ng-model="info.name" ng-class="{'null-edit-title':info.name==null}" ng-attr-type="{{info.name.indexOf('PASSWORD')>-1 ? password : text}}" />
<div class="item-info">
<input class="form-control" type="text" ng-model="info.value" />
<!--<button class="delete-button" ng-click="deleteEnvItem($index)">delete</button>-->
<img src="images/close.png" ng-click="deleteEnvItem($index)" class="delete-img" />
</div>
</div>
</div>
<button class="btn btn-default" ng-click="submitOpenRcFile();" style="margin-bottom:20px;">
<div ng-if="!showloading">Submit</div>
<img src="images/loading2.gif" width="25" height="25" ng-if="showloading" />
</button>
</div>
</div>
<div data-title="Upload File" bs-pane>
<div style="margin-top:20px;height:405px;">
<button class="btn btn-default" style="margin-bottom:20px;" ngf-select="uploadFiles($file, $invalidFiles);" ngf-max-size="5MB">
<div ng-show="!loadingOPENrc">Upload</div>
<img src="images/loading2.gif" width="25" height="25" ng-if="loadingOPENrc" />
</button>
<!--<button class="btn btn-default" style="margin-bottom:20px;" ng-disabled="showNextOpenRc==null" ng-click="goToImage()">
Next
</button>-->
<!--<div ng-if="displayOpenrcFile!=null || displayOpenrcFile!=undefined">
{{displayOpenrcFile.name}} last modified: {{filelastModified}}
</div>-->
</div>
</div>
</div>
</div>
</div>
<div ng-if="showImage==1&&showPod==null">
<div style="display:flex;flex-direction:row;">
<div style="width:750px;">
<h3>{{name}} -- Image
<button class="btn btn-default" ng-click="goToPod()" ng-disabled="showNextPod==null" style="float:right">
Next
</button>
<button class="btn btn-default" ng-click="goToPodPrev()" style="margin-right:5px;float:right">
Back
</button>
</h3>
<!--<p>In this process, you can input your define openrc config or upload a openrc file</p>-->
<hr/>
<button class="btn btn-default" ng-click="uploadImage()">
<div ng-if="!showloading">Load Image</div>
<img src="images/loading2.gif" width="25" height="25" ng-if="showloading" />
</button>
<i class="fa fa-check" aria-hidden="true" style="margin-top:34px;margin-left:5px;color: #2ecc71;" ng-show="imageStatus==1&&showImageStatus==1">done</i>
<i class="fa fa-spinner" aria-hidden="true" style="margin-top:34px;margin-left:5px;color: #2ecc71;" ng-show="imageStatus==0&&showImageStatus==1">loading</i>
<i class="fa fa-exclamation-triangle" aria-hidden="true" style="margin-top:34px;margin-left:5px;color: red;" ng-show="imageStatus==2&&showImageStatus==1">error</i>
<!--<button class="btn btn-default" ng-click="goToPod()" ng-disabled="showNextPod==null">
Next
</button>-->
<hr>
<h4>Current Images</h4>
<div>
<table class="table table-striped">
<tr>
<th>choose</th>
<th>name</th>
<th>description</th>
<th>status</th>
</tr>
<tr ng-repeat="(name, value) in yardstickImage">
<td ng-if="selectImageList.indexOf(name) > -1"><span class="glyphicon glyphicon-check" aria-hidden="true" ng-click="unselectImage(name)"></span></td>
<td ng-if="selectImageList.indexOf(name) == -1"><span class="glyphicon glyphicon-unchecked" aria-hidden="true" ng-click="selectImage(name)"></span></td>
<td>{{name}}</td>
<td>{{value.description}}</td>
<td>{{value.status}}</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div ng-if="showPod==1&&showContainer==null">
<div style="display:flex;flex-direction:row;">
<div style="width:750px;">
<h3>{{name}} -- Pod File
<div style="float:right">
<button class="btn btn-default" ng-click="skipPodPrev()">Back</button>
<button class="btn btn-default" ng-click="skipPod()" ng-show="podData==null">Skip</button>
<button class="btn btn-default" ng-click="skipPod()" ng-show="podData!=null">Next</button>
</div>
</h3>
<hr/>
<button class="btn btn-default" ngf-select="uploadFilesPod($file, $invalidFiles)" ngf-max-size="5MB">
<div ng-show="!loadingOPENrc">Upload</div>
<img src="images/loading2.gif" width="25" height="25" ng-if="loadingOPENrc" />
</button>
<hr/>
<div>
<h4>Current Pod Configuration</h4>
<table class="table table-striped">
<tr>
<th>ip</th>
<th>name</th>
<th>password</th>
<th>role</th>
<th>user</th>
</tr>
<tr ng-repeat="pod in podData.pod.nodes">
<td>{{pod.ip}}</td>
<td>{{pod.name}}</td>
<td>{{pod.password}}</td>
<td>{{pod.role}}</td>
<td>{{pod.user}}</td>
</tr>
<tr ng-show="podData.length==0">
<td>no data</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div ng-if="showContainer!=null">
<div style="display:flex;flex-direction:row;">
<div style="width:750px;">
<h3>{{name}} -- Container
<div style="float:right">
<button class="btn btn-default" ng-click="skipContainerPrev()">Back</button>
<button class="btn btn-default" ng-click="skipContainer()" ng-show="ifskipOrClose!=1">
Skip
</button>
<button class="btn btn-default" ng-click="closeThisDialog(); getEnvironmentList();" ng-show="ifskipOrClose==1">
Close
</button>
</div>
<!--<button class="btn btn-default" style="float:right">Go Next</button>-->
</h3>
<!--<p>In this process, you can input your define openrc config or upload a openrc file</p>-->
<hr/>
<select ng-model="selectContainer" data-ng-options="container as container.name for container in containerList">
<option value="">Choose...</option>
</select>
<button class="btn btn-default" ng-click="createContainer(selectContainer)" ng-disabled="selectContainer==null">
<div ng-show="!showloading">Create</div>
<img src="images/loading2.gif" width="25" height="25" ng-if="showloading" />
</button>
<!--<button class="btn btn-default" ng-click="skipContainer()" ng-show="ifskipOrClose!=1">
Skip
</button>
<button class="btn btn-default" ng-click="closeThisDialog(); getEnvironmentList();" ng-show="ifskipOrClose==1">
Close
</button>-->
<hr/>
<div>
<h4>Current Contain</h4>
<table class="table table-striped">
<tr>
<th>name</th>
<th>status</th>
<th>time</th>
</tr>
<tr ng-repeat="con in displayContainerInfo">
<td>{{con.name}}</td>
<td>{{con.status}}</td>
<td>{{con.time}}</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<style>
input {
border-radius: 10px;
border: 1px solid #eeeeee;
width: 100%;
}
select {
height: 30px;
border-radius: 5px;
border: 1px solid #e8e8e8;
width: 135px;
margin-top: 20px;
margin-left: 20px;
}
</style>
|