Merge "Collectd Fixes"
[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>choose</th>
137                             <th>name</th>
138                             <th>description</th>
139                             <th>status</th>
140                         </tr>
141                         <tr ng-repeat="(name, value) in yardstickImage">
142                             <td ng-if="selectImageList.indexOf(name) > -1"><img src="images/checkyes.png" style="height:12px;cursor:pointer" ng-click="unselectImage(name)" /></td>
143                             <td ng-if="selectImageList.indexOf(name) == -1"><img src="images/checkno.png" style="height:12px;cursor:pointer" ng-click="selectImage(name)" /></td>
144                             <td>{{name}}</td>
145                             <td>{{value.description}}</td>
146                             <td>{{value.status}}</td>
147
148                         </tr>
149
150
151
152                     </table>
153                 </div>
154
155
156             </div>
157
158
159         </div>
160     </div>
161
162     <div ng-if="showPod==1&&showContainer==null">
163         <div style="display:flex;flex-direction:row;">
164             <div style="width:750px;">
165
166
167                 <h3>{{name}} -- Pod File
168                     <div style="float:right">
169                         <button class="btn btn-default" ng-click="skipPodPrev()">Back</button>
170                         <button class="btn btn-default" ng-click="skipPod()" ng-show="podData==null">Skip</button>
171                         <button class="btn btn-default" ng-click="skipPod()" ng-show="podData!=null">Next</button>
172
173                     </div>
174
175                 </h3>
176
177                 <hr/>
178
179                 <button class="btn btn-default" ngf-select="uploadFilesPod($file, $invalidFiles)" ngf-max-size="5MB">
180                                     <div ng-show="!loadingOPENrc">Upload</div>
181                                      <img src="images/loading2.gif" width="25" height="25" ng-if="loadingOPENrc" />
182             </button>
183
184
185                 <hr/>
186
187                 <div>
188                     <h4>Current Pod Configuration</h4>
189                     <table class="table table-striped">
190
191                         <tr>
192                             <th>ip</th>
193                             <th>name</th>
194                             <th>password</th>
195                             <th>role</th>
196                             <th>user</th>
197                         </tr>
198                         <tr ng-repeat="pod in podData.pod.nodes">
199                             <td>{{pod.ip}}</td>
200                             <td>{{pod.name}}</td>
201                             <td>{{pod.password}}</td>
202                             <td>{{pod.role}}</td>
203                             <td>{{pod.user}}</td>
204
205                         </tr>
206                         <tr ng-show="podData.length==0">
207                             <td>no data</td>
208
209                         </tr>
210
211
212
213                     </table>
214                 </div>
215
216
217
218
219
220
221
222
223
224
225             </div>
226
227
228         </div>
229
230     </div>
231
232     <div ng-if="showContainer!=null">
233         <div style="display:flex;flex-direction:row;">
234             <div style="width:750px;">
235
236                 <h3>{{name}} -- Container
237                     <div style="float:right">
238                         <button class="btn btn-default" ng-click="skipContainerPrev()">Back</button>
239                         <button class="btn btn-default" ng-click="skipContainer()" ng-show="ifskipOrClose!=1">
240                             Skip
241             </button>
242                         <button class="btn btn-default" ng-click="closeThisDialog(); getEnvironmentList();" ng-show="ifskipOrClose==1">
243                            Close
244             </button>
245                     </div>
246                     <!--<button class="btn btn-default" style="float:right">Go Next</button>-->
247                 </h3>
248                 <!--<p>In this process, you can input your define openrc config or upload a openrc file</p>-->
249
250                 <hr/>
251
252                 <select ng-model="selectContainer" data-ng-options="container as container.name for container in containerList">
253                 <option value="">Choose...</option>
254             </select>
255
256                 <button class="btn btn-default" ng-click="createContainer(selectContainer)" ng-disabled="selectContainer==null">
257                                     <div ng-show="!showloading">Create</div>
258                                     <img src="images/loading2.gif" width="25" height="25" ng-if="showloading" />
259             </button>
260                 <!--<button class="btn btn-default" ng-click="skipContainer()" ng-show="ifskipOrClose!=1">
261                             Skip
262             </button>
263                 <button class="btn btn-default" ng-click="closeThisDialog(); getEnvironmentList();" ng-show="ifskipOrClose==1">
264                            Close
265             </button>-->
266
267                 <hr/>
268
269                 <div>
270                     <h4>Current Contain</h4>
271                     <table class="table table-striped">
272
273                         <tr>
274                             <th>name</th>
275                             <th>status</th>
276                             <th>time</th>
277
278                         </tr>
279                         <tr ng-repeat="con in displayContainerInfo">
280                             <td>{{con.name}}</td>
281                             <td>{{con.status}}</td>
282                             <td>{{con.time}}</td>
283
284
285                         </tr>
286
287
288
289                     </table>
290                 </div>
291
292
293
294
295
296
297
298
299
300
301             </div>
302
303
304         </div>
305
306     </div>
307
308
309
310
311
312
313 </div>
314
315
316 <style>
317     input {
318         border-radius: 10px;
319         border: 1px solid #eeeeee;
320         width: 100%;
321     }
322
323     select {
324         height: 30px;
325         border-radius: 5px;
326         border: 1px solid #e8e8e8;
327         width: 135px;
328         margin-top: 20px;
329         margin-left: 20px;
330     }
331 </style>