Merge "Add spec cpu2006 test case"
[yardstick.git] / gui / app / views / modal / environmentDialog.html
1 <!--environment input dialog-->
2
3 <div>
4     <div ng-if="uuidEnv==null">
5         <h4>Environment Name</h4>
6         <input type="text" ng-model="name" style="width:300px;" />
7
8         <div style="text-align:center;margin-top:20px;">
9             <button class="btn btn-default" ng-disabled=" name==null || name==''" ng-click="addEnvironment(name)">Create</button>
10         </div>
11     </div>
12
13
14     <div style="display:flex;flex-direction:row;" ng-if="uuidEnv!=null&&showImage==null">
15         <div>
16             <h3> {{name}} -- Openrc
17                 <!--<button class="btn btn-default" style="float:right" ng-click="goNext()">Next</button>-->
18                 <button class="btn btn-default" ng-click="goToImage()" style="margin-bottom:20px;float:right" ng-disabled="showNextOpenRc==null && showNextOpenRc==null ">
19                                         Next
20                                 </button>
21             </h3>
22             <!--<p>In this process, you can input your define openrc config or upload a openrc file</p>-->
23             <div>
24
25                 <!--<button style="display:inline;" class="btn btn-default" ng-click="addEnvironment()" ng-show="uuid==null">Add Name</button>-->
26             </div>
27
28             <hr/>
29             <div bs-tabs style="width:750px;">
30                 <div data-title="Detail" bs-pane ng-if="openrcInfo.openrc!=null">
31
32                     <h4>
33                         You have already set up the openrc parameters
34                     </h4>
35                     <hr />
36                     <div ng-repeat="(key,value) in openrcInfo.openrc">
37                         <nobr>
38                             <font style="font-weight:600;font-size:14px;">{{key}} : </font>
39                             <font style="font-size:14px;">{{value}}</font>
40                         </nobr>
41                     </div>
42
43                 </div>
44                 <div data-title="Update" bs-pane>
45
46                     <div style="margin-top:20px;">
47                         <button class="btn btn-default" ng-click="addInfo()" style="margin-bottom:20px;">Add</button>
48                         <div style="height:300px;width:800px;display:flex;flex-direction:column;flex-wrap:wrap;margin-left:5px;overflow-x:scroll">
49                             <div ng-repeat="info in envInfo">
50                                 <!--<div> {{info.name}}</div>-->
51
52                                 <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}}" />
53
54                                 <div class="item-info">
55                                     <input class="form-control" type="text" ng-model="info.value" />
56                                     <!--<button class="delete-button" ng-click="deleteEnvItem($index)">delete</button>-->
57                                     <img src="images/close.png" ng-click="deleteEnvItem($index)" class="delete-img" />
58                                 </div>
59
60
61
62                             </div>
63                         </div>
64                         <button class="btn btn-default" ng-click="submitOpenRcFile();" style="margin-bottom:20px;">
65                                      <div ng-if="!showloading">Submit</div>
66                                      <img src="images/loading2.gif" width="25" height="25" ng-if="showloading" />
67                                 </button>
68
69
70                     </div>
71
72                 </div>
73                 <div data-title="Upload File" bs-pane>
74                     <div style="margin-top:20px;height:405px;">
75                         <button class="btn btn-default" style="margin-bottom:20px;" ngf-select="uploadFiles($file, $invalidFiles);" ngf-max-size="5MB">
76                                     <div ng-show="!loadingOPENrc">Upload</div>
77                                      <img src="images/loading2.gif" width="25" height="25" ng-if="loadingOPENrc" />
78                                     </button>
79                         <!--<button class="btn btn-default" style="margin-bottom:20px;" ng-disabled="showNextOpenRc==null" ng-click="goToImage()">
80                                        Next
81                         </button>-->
82
83                         <!--<div ng-if="displayOpenrcFile!=null || displayOpenrcFile!=undefined">
84                             {{displayOpenrcFile.name}} last modified: {{filelastModified}}
85                         </div>-->
86                     </div>
87                 </div>
88             </div>
89
90
91
92         </div>
93
94
95     </div>
96
97     <div ng-if="showImage==1&&showPod==null">
98         <div style="display:flex;flex-direction:row;">
99             <div style="width:750px;">
100
101                 <h3>{{name}} -- Image
102
103                     <button class="btn btn-default" ng-click="goToPod()" ng-disabled="showNextPod==null" style="float:right">
104                  Next
105             </button>
106                     <button class="btn btn-default" ng-click="goToPodPrev()" style="margin-right:5px;float:right">
107                  Back
108             </button>
109
110                 </h3>
111                 <!--<p>In this process, you can input your define openrc config or upload a openrc file</p>-->
112
113                 <hr/>
114
115                 <button class="btn btn-default" ng-click="uploadImage()">
116                  <div ng-if="!showloading">Load Image</div>
117                  <img src="images/loading2.gif" width="25" height="25" ng-if="showloading" />
118
119                  </button>
120
121                 <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>
122                 <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>
123                 <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>
124
125
126                 <!--<button class="btn btn-default" ng-click="goToPod()" ng-disabled="showNextPod==null">
127                  Next
128             </button>-->
129                 <hr>
130                 <h4>Current Images</h4>
131
132                 <div>
133                     <table class="table table-striped">
134
135                         <tr>
136                             <th>name</th>
137                             <th>size</th>
138                             <th>status</th>
139                             <th>time</th>
140                         </tr>
141                         <tr ng-repeat="image in imageListData">
142                             <td>{{image.name}}</td>
143                             <td>{{image.size/1024}} mb</td>
144                             <td>{{image.status}}</td>
145                             <td>{{image.time}}</td>
146
147                         </tr>
148
149
150
151                     </table>
152                 </div>
153
154
155             </div>
156
157
158         </div>
159     </div>
160
161     <div ng-if="showPod==1&&showContainer==null">
162         <div style="display:flex;flex-direction:row;">
163             <div style="width:750px;">
164
165
166                 <h3>{{name}} -- Pod File
167                     <div style="float:right">
168                         <button class="btn btn-default" ng-click="skipPodPrev()">Back</button>
169                         <button class="btn btn-default" ng-click="skipPod()" ng-show="podData==null">Skip</button>
170                         <button class="btn btn-default" ng-click="skipPod()" ng-show="podData!=null">Next</button>
171
172                     </div>
173
174                 </h3>
175
176                 <hr/>
177
178                 <button class="btn btn-default" ngf-select="uploadFilesPod($file, $invalidFiles)" ngf-max-size="5MB">
179                                     <div ng-show="!loadingOPENrc">Upload</div>
180                                      <img src="images/loading2.gif" width="25" height="25" ng-if="loadingOPENrc" />
181             </button>
182
183
184                 <hr/>
185
186                 <div>
187                     <h4>Current Pod Configuration</h4>
188                     <table class="table table-striped">
189
190                         <tr>
191                             <th>ip</th>
192                             <th>name</th>
193                             <th>password</th>
194                             <th>role</th>
195                             <th>user</th>
196                         </tr>
197                         <tr ng-repeat="pod in podData.pod.nodes">
198                             <td>{{pod.ip}}</td>
199                             <td>{{pod.name}}</td>
200                             <td>{{pod.password}}</td>
201                             <td>{{pod.role}}</td>
202                             <td>{{pod.user}}</td>
203
204                         </tr>
205                         <tr ng-show="podData.length==0">
206                             <td>no data</td>
207
208                         </tr>
209
210
211
212                     </table>
213                 </div>
214
215
216
217
218
219
220
221
222
223
224             </div>
225
226
227         </div>
228
229     </div>
230
231     <div ng-if="showContainer!=null">
232         <div style="display:flex;flex-direction:row;">
233             <div style="width:750px;">
234
235                 <h3>{{name}} -- Container
236                     <div style="float:right">
237                         <button class="btn btn-default" ng-click="skipContainerPrev()">Back</button>
238                         <button class="btn btn-default" ng-click="skipContainer()" ng-show="ifskipOrClose!=1">
239                             Skip
240             </button>
241                         <button class="btn btn-default" ng-click="closeThisDialog(); getEnvironmentList();" ng-show="ifskipOrClose==1">
242                            Close
243             </button>
244                     </div>
245                     <!--<button class="btn btn-default" style="float:right">Go Next</button>-->
246                 </h3>
247                 <!--<p>In this process, you can input your define openrc config or upload a openrc file</p>-->
248
249                 <hr/>
250
251                 <select ng-model="selectContainer" data-ng-options="container as container.name for container in containerList">
252                 <option value="">Choose...</option>
253             </select>
254
255                 <button class="btn btn-default" ng-click="createContainer(selectContainer)" ng-disabled="selectContainer==null">
256                                     <div ng-show="!showloading">Create</div>
257                                     <img src="images/loading2.gif" width="25" height="25" ng-if="showloading" />
258             </button>
259                 <!--<button class="btn btn-default" ng-click="skipContainer()" ng-show="ifskipOrClose!=1">
260                             Skip
261             </button>
262                 <button class="btn btn-default" ng-click="closeThisDialog(); getEnvironmentList();" ng-show="ifskipOrClose==1">
263                            Close
264             </button>-->
265
266                 <hr/>
267
268                 <div>
269                     <h4>Current Contain</h4>
270                     <table class="table table-striped">
271
272                         <tr>
273                             <th>name</th>
274                             <th>status</th>
275                             <th>time</th>
276
277                         </tr>
278                         <tr ng-repeat="con in displayContainerInfo">
279                             <td>{{con.name}}</td>
280                             <td>{{con.status}}</td>
281                             <td>{{con.time}}</td>
282
283
284                         </tr>
285
286
287
288                     </table>
289                 </div>
290
291
292
293
294
295
296
297
298
299
300             </div>
301
302
303         </div>
304
305     </div>
306
307
308
309
310
311
312 </div>
313
314
315 <style>
316     input {
317         border-radius: 10px;
318         border: 1px solid #eeeeee;
319         width: 100%;
320     }
321
322     select {
323         height: 30px;
324         border-radius: 5px;
325         border: 1px solid #e8e8e8;
326         width: 135px;
327         margin-top: 20px;
328         margin-left: 20px;
329     }
330 </style>