admin_machines.html.ep 25.4 KB
Newer Older
1
2
3
4
5
<!DOCTYPE html>
<html ng-app="ravada.app">
%= include 'bootstrap/header'
<body id="page-top" data-spy="scroll" data-target=".navbar-fixed-top" role="document">
    <div id="wrapper">
Francesc Guasch's avatar
Francesc Guasch committed
6
        <div ng-controller="machinesPage" ng-init="subscribe_all('<%= url_for('ws_subscribe')->to_abs %>');n_clones_hide=<%= $n_clones_hide %>;check_netdata='<%= $check_netdata %>'" >
7
8
9
    %= include 'bootstrap/navigation'
    <div id="page-wrapper">
      <div id="admin-content">
10
11
<div class="panel-body">
    <div class="col-lg-12">
joansp's avatar
joansp committed
12
      <div ng-show="pingbe_fail" class="alert alert-danger" ng-cloak>
13
        <strong><%=l 'Error!' %></strong><%=l 'Backend no available!' %>
joansp's avatar
joansp committed
14
      </div>
Francesc Guasch's avatar
Francesc Guasch committed
15
16
17
%       if ($USER->is_operator || $USER->is_admin) {
            %= include 'main/check_ws'
%       }
fv3rdugo's avatar
fv3rdugo committed
18
    <div class="row">
fv3rdugo's avatar
fv3rdugo committed
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
      <div style="margin-right: 10px;" data-netdata="system.swap"
          data-dimensions="used"
          data-append-options="percentage"
          data-chart-library="easypiechart"
          data-title="Used Swap"
          data-units="%"
          data-easypiechart-max-value="100"
          data-width="9%"
          data-before="0"
          data-after="- duration.toString()"
          data-points="duration.toString()"
          data-colors="#DD4400"
          role="application"></div>

        <div style="margin-right: 10px;" data-netdata="system.io"
            data-dimensions="in"
            data-chart-library="easypiechart"
            data-title="Disk Read"
            data-width="11%"
            data-before="0"
            data-after="- duration.toString()"
            data-points="duration.toString()"
            data-common-units="system.io.mainhead"
            role="application"></div>

        <div style="margin-right: 10px;" data-netdata="system.io"
              data-dimensions="out"
              data-chart-library="easypiechart"
              data-title="Disk Write"
              data-width="11%"
              data-before="0"
              data-after="- duration.toString()"
              data-points="duration.toString()"
              data-common-units="system.io.mainhead"
              role="application"></div>

        <div style="margin-right: 10px;" data-netdata="system.cpu"
              data-chart-library="gauge"
              data-title="CPU"
              data-units="%"
              data-gauge-max-value="100"
              data-width="20%"
              data-after="- duration.toString()"
              data-points="duration.toString()"
              role="application"></div>

        <div style="margin-right: 10px;" data-netdata="system.net"
              data-dimensions="received"
              data-chart-library="easypiechart"
              data-title="Net Inbound"
              data-width="11%"
              data-before="0"
              data-after="- duration.toString()"
              data-points="duration.toString()"
              data-common-units="system.net.mainhead"
              role="application"></div>

        <div style="margin-right: 10px;" data-netdata="system.net"
              data-dimensions="sent"
              data-chart-library="easypiechart"
              data-title="Net Outbound"
              data-width="11%"
              data-before="0"
              data-after="- duration.toString()"
              data-points="duration.toString()"
              data-common-units="system.net.mainhead"
              role="application"></div>

        <div style="margin-right: 10px;" data-netdata="system.ram"
                data-dimensions="used|buffers"
                data-append-options="percentage"
                data-chart-library="easypiechart"
                data-title="Used RAM"
                data-units="%"
                data-easypiechart-max-value="100"
                data-width="9%"
                data-after="- duration.toString()"
                data-points="duration.toString()"
                role="application"></div>
fv3rdugo's avatar
fv3rdugo committed
98
      </div>
99
        <div class="row">
Francesc Guasch's avatar
Francesc Guasch committed
100
            <div class="col-md-8"><h2><%=l 'Virtual Machines' %></h2></div>
101
            <div class="col-md-4" align="right">
102
% 		if ($_user->can_create_machine){
103
                <h2>
104
                    <button class="btn btn-warning" ng-click="list_machines={};subscribe_all('<%= url_for('ws_subscribe')->to_abs %>');"><i class="fa fa-sync-alt" aria-hidden="true"></i></button>
105
106
107
108
109
110
111
112
                    <a type="button" class="btn btn-success" href="/new_machine.html">
                        <b><%=l 'New Machine' %></b>
                    <i ng-show="download_working"
                        class="fa fa-angle-double-down" aria-hidden="true"></i>
                    <i ng-show="download_done && !download_working"
                        class="fa fa-check" aria-hidden="true"></i>
                    </a>
                </h2>
JanFontanet's avatar
JanFontanet committed
113
%		}
114
115
            </div>
        </div>
JanFontanet's avatar
JanFontanet committed
116

117
%=      include 'bootstrap/requests'
118

Francesc Guasch's avatar
Francesc Guasch committed
119
120
        <div ng-show="!list_machines"><%=l 'Loading ...' %> </div>
        <table class="table admin-cont-body" border="0" ng-show="list_machines" ng-cloak="1">
121
122
            <thead>
                <tr>
123
                    <th ><div class="lgMachName machine-button" style="display:inline;float:down">
124
                      <%=l 'Machine Name' %></div>
125
                        <div style="float:right" ng-show="n_clones">
Francesc Guasch's avatar
Francesc Guasch committed
126
                            <a ng-show="hide_clones" ng-click="showClones(true)"
Fernando Verdugo's avatar
Fernando Verdugo committed
127
                              class="badge badge-primary dropdown-toggle text-white"
fv3rdugo's avatar
fv3rdugo committed
128
                              align="right"><%=l 'show clones' %></a>
Francesc Guasch's avatar
Francesc Guasch committed
129
                            <a ng-show="!hide_clones" ng-click="showClones(false)"
Fernando Verdugo's avatar
Fernando Verdugo committed
130
                              class="badge badge-primary dropdown-toggle text-white"
131
                              align="right"><%=l 'hide clones' %></a>
gmiranda's avatar
gmiranda committed
132
                        </div>
133
                    </th>
134
                    <th class="lgMachToggle">
135
                      <span
amesones's avatar
amesones committed
136
                       ng-click="hideClones()"
137
138
                       title="<%=l 'Show/Hide clones' %>">
                       <%=l 'Base' %></span></th>
fv3rdugo's avatar
fv3rdugo committed
139
                    <th class="lgMachToggle"><%=l 'Public'%></th>
Francesc Guasch's avatar
Francesc Guasch committed
140
141
142
%                   if ($autostart) {
                        <th class="lgMachToggle"><%=l 'Autostart'%></th>
%                   }
143
                    <th class="lgMachToggle machine-button">
Fernando Verdugo's avatar
Fernando Verdugo committed
144
145
                      <div style="float:right">
                        <%=l 'Status' %></div></th>
fv3rdugo's avatar
fv3rdugo committed
146
                    <th class="lgMachActions"><%=l 'Actions' %></th>
147
                    <th class="lgMachNode"><%=l 'Node' %></th>
148
149
150
                </tr>
            </thead>
            <tbody>
151
                <tr ng-repeat-start="machine in list_machines| orderObjectBy:'name'" class="bg-light">
152
                    <td class="lgMachName">
Francesc Guasch's avatar
Francesc Guasch committed
153
154
155
                        <a align="right" href="/machine/manage/{{machine.id}}.html"
                                         ng-class="{disabled: !machine.can_manage}"
                        title ="<%=l 'Manage machine' %>"><b
156
                                                              >{{machine.name}}</b></a> {{machine.comment}}
Francesc Guasch's avatar
Francesc Guasch committed
157
158
                        <button ng-show="machine.has_clones" type="button"
                        class="badge badge-light text-blue"
159
                        ng-click="toggle_show_clones(machine.id)"
Francesc Guasch's avatar
Francesc Guasch committed
160
161
162
163
164
                        title="<%=l 'Show/Hide clones' %>">
                        <b ng-show="show_clones[machine.id]" >-</b>
                        <b ng-show="!show_clones[machine.id]">+</b>
                        </button>

165
                    </td>
166
                    <td class="lgMachToggle">
167
%                       if ($_user->can_create_base ) {
168
                        <i ng-show="{{machine.has_clones}}" class="fa fa-check" aria-hidden="true"
fv3rdugo's avatar
fv3rdugo committed
169
                        title ="<%=l 'Cannot remove base, machine has clones' %>" ng-cloak></i>
fv3rdugo's avatar
fv3rdugo committed
170
171
                        <input type="checkbox" checked
                               ng-show="can_remove_base(machine)"
172
                            ng-click="open_modal('mb_',machine)"
fv3rdugo's avatar
fv3rdugo committed
173
                            title ="<%=l 'Remove base' %>" ng-cloak>
fv3rdugo's avatar
fv3rdugo committed
174
175
                        <input type="checkbox"
                               ng-show="can_prepare_base(machine)"
176
                            ng-click="open_modal('mb_',machine)"
fv3rdugo's avatar
fv3rdugo committed
177
                            title ="<%=l 'Prepare base' %>" ng-cloak>
JanFontanet's avatar
JanFontanet committed
178
179
180
181
182
183
                        
                        <div class="modal fade" tabindex="-1" role="dialog" id="mb_{{machine.id}}">
                           <div class="modal-dialog" role="document">
                             <div class="modal-content">
                               <div class="modal-header">
                                 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
fv3rdugo's avatar
fv3rdugo committed
184
                                 <h4 class="modal-title"><%=l 'Changing Base State' %></h4>
JanFontanet's avatar
JanFontanet committed
185
186
                               </div>
                               <div class="modal-body" ng-show="can_remove_base(machine)">
fv3rdugo's avatar
fv3rdugo committed
187
                                 <p><%=l 'Are you sure you want to remove the base of' %> {{machine.name}}?</p>
JanFontanet's avatar
JanFontanet committed
188
189
                               </div>
                               <div class="modal-body" ng-show="can_prepare_base(machine)">
190
191
192
193
194
195
196
197
                                   <div ng-show="machine.info.cdrom">
                                   <p>This machine has a CD-ROM</p>
                                   <ul>
                                       <li ng-repeat="cdrom in machine.info.cdrom">{{cdrom}}</li>
                                   </ul>
                                   <input type="checkbox" ng-model="with_cd" name="with_cd"/>
                                    <label for="with_cd">Keep the CD for the clones</label>
                                   </div>
fv3rdugo's avatar
fv3rdugo committed
198
                                 <p><%=l 'Are you sure you want to prepare the base of' %> {{machine.name}}?</p>
JanFontanet's avatar
JanFontanet committed
199
                               </div>
200
                               <div class="modal-footer" ng-show="machine.info">
Fernando Verdugo's avatar
Fernando Verdugo committed
201
                                 <button type="button" class="btn btn-secondary" data-dismiss="modal" ng-click="cancel_modal()"><%=l 'No' %></button>
fv3rdugo's avatar
fv3rdugo committed
202
                                 <button type="button" class="btn btn-primary" ng-click="cancel_modal();action('machine','remove_base',machine.id)" ng-show="can_remove_base(machine)" data-dismiss="modal"><%=l 'Yes' %></button>
203
                                 <button type="button" class="btn btn-primary" ng-click="cancel_modal();request('prepare_base',{ 'id_domain': machine.id, 'with_cd': with_cd })" ng-show="can_prepare_base(machine)" data-dismiss="modal"><%=l 'Yes' %></button>
JanFontanet's avatar
JanFontanet committed
204
205
206
207
                               </div>
                             </div>
                           </div>
                         </div>
208
%                       }
joansp's avatar
joansp committed
209
                    </td>
210
                    <td class="lgMachToggle">
211
%                       if ($_user->can_create_base ) {
212
                        <input type="checkbox" checked ng-show="{{machine.is_public}}" ng-click="open_modal('mp_',machine)" title="<%=l 'Make private'%>" ng-cloak>
JanFontanet's avatar
JanFontanet committed
213

214
                         <input type="checkbox" ng-hide="!machine.is_base || machine.is_public" ng-click="open_modal('mp_',machine)" title="<%=l 'Make public' %>" ng-cloak>
215
216
                       
                        <div class="modal fade" tabindex="-1" role="dialog" id="mp_{{machine.id}}">
JanFontanet's avatar
JanFontanet committed
217
218
219
220
                           <div class="modal-dialog" role="document">
                             <div class="modal-content">
                               <div class="modal-header">
                                 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
fv3rdugo's avatar
fv3rdugo committed
221
                                 <h4 class="modal-title"><%=l 'Changing Public State' %></h4>
JanFontanet's avatar
JanFontanet committed
222
223
                               </div>
                               <div class="modal-body">
fv3rdugo's avatar
fv3rdugo committed
224
                                 <p><%=l 'Are you sure you want to change the Public state of' %> {{machine.name}} <%=l 'to' %> {{(machine.is_public==0)}}?</p>
JanFontanet's avatar
JanFontanet committed
225
226
                               </div>
                               <div class="modal-footer">
Fernando Verdugo's avatar
Fernando Verdugo committed
227
                                 <button type="button" class="btn btn-secondary" data-dismiss="modal" ng-click="cancel_modal()"><%=l 'No' %></button>
fv3rdugo's avatar
fv3rdugo committed
228
                                 <button type="button" class="btn btn-primary" ng-click="cancel_modal();set_public(machine.id, machine.is_public==0)" data-dismiss="modal"><%=l 'Yes' %></button>
JanFontanet's avatar
JanFontanet committed
229
230
231
232
                               </div>
                             </div>
                           </div>
                         </div>
233
                       </td>
234

235
                         
236
%                       if ($autostart) {
237
238
239
                            <td class="lgMachToggle">
				    <input type="checkbox" ng-hide="machine.has_clones || machine.is_base" ng-model="machine.autostart" ng-true-value="1" ng-false-value="0" ng-change="set_autostart(machine.id,machine.autostart)" title="{{ machine.autostart ? 'Disable' : 'Enable'}} autostart">
			    </td>
240
%                       }
241
%                       }
242
                    <td class="lgMachActions">
Fernando Verdugo's avatar
Fernando Verdugo committed
243
244
245
246
247
                        <span style="float:right;" ng-show="{{machine.is_paused && machine.is_active}}" class="badge label-warning" ng-cloak><%=l 'Paused' %></span>
                        <span style="float:right;" ng-show="{{!machine.is_paused && machine.is_active}}" class="badge badge-success" ng-cloak><%=l 'Running' %></span>
                        <span style="float:right;" ng-show="{{!machine.is_active && !machine.is_hibernated}}" class="badge badge-danger" ng-cloak><%=l 'Down' %></span>
                        <span style="float:right;" ng-show="{{machine.is_hibernated}}" class="badge badge-warning" ng-cloak><%=l 'Hibernated' %></span>
                        <br><span style="float:right;" ng-show="{{machine.is_active}}" class="badge badge-secondary">{{machine.remote_ip}}</span>
248
                    </td>
249
                    <td class="lgMachToggle">
250
                      <div ng-hide="{{machine.is_locked||machine.is_base}}">
251
                        <button type="button" class="btn btn-success btn-sm"
252
                         ng-click="action('machine','start',machine.id)"
253
                         ng-disabled="machine.is_active"
Francesc Guasch's avatar
Francesc Guasch committed
254
                         ng-show="machine.can_start"
255
                         title="<%=l 'Start' %>">
256
                         <i class="fa fa-play"></i>
257
258
                        </button>
                        <button type="button" class="btn btn-warning btn-sm"
Francesc Guasch's avatar
Francesc Guasch committed
259
                         ng-click="action('machine','hibernate',machine.id)"
260
                         ng-disabled="!machine.is_active"
261
262
                         ng-show="machine.can_hibernate"
                         title="<%=l 'Hibernate' %>">
263
                          <i class="fa fa-pause"></i>
264
265
                       </button>
                        <button type="button" class="btn btn-danger btn-sm"
266
267
                         ng-click="action('machine','shutdown',machine.id)"
                         ng-disabled="!machine.is_active"
Francesc Guasch's avatar
Francesc Guasch committed
268
                         ng-show="machine.can_shutdown"
fv3rdugo's avatar
fv3rdugo committed
269
                         title="<%=l 'ShutDown' %>">
270
                          <i class="fa fa-power-off"></i>
271
                       </button>
272
                        <a type="button" class="btn btn-primary btn-sm"
273
                         ng-show="machine.can_view"
274
275
276
277
                         ng-href="/machine/view/{{machine.id}}.html"
                         title="<%=l 'View' %>">
                          <i class="fa fa-desktop"></i>
                        </a>
278
                      </div>
Francesc Guasch's avatar
Francesc Guasch committed
279
                      <div ng-show="{{machine.is_locked}}" ng-cloak>Machine <a href="/request/{{machine.is_locked}}.html"><%=l 'locked' %></a></div>
280
                      <div ng-show="{{machine.is_base}} && !{{machine.is_locked}}"
Fernando Verdugo's avatar
Fernando Verdugo committed
281
                          ng-cloak><span class="badge badge-pill badge-light"><%=l 'This Machine is a base' %></span></div>
282
                    </td>
Fernando Verdugo's avatar
Fernando Verdugo committed
283
                    <td class="lgMachNode"></td>
284
                </tr>
285
                    <tr ng-show="show_clones[machine.id]" ng-repeat="child in machine.childs | orderObjectBy:'name'">
286
                      <td class="lgMachName">
287
                      &nbsp;<i title="[cloned]" class="fa fa-fw fa-long-arrow-right"
288
                              style="color:white"></i>
289
290
                          <i class="far fa-clone" title="Cloned" ng-hide="child.is_pool"></i>
                          <i class="far fa-file-alt" title="Pool" ng-show="child.is_pool"></i>
Francesc Guasch's avatar
Francesc Guasch committed
291
292
293
                          <a align="right" href="/machine/manage/{{child.id}}.html"
                                         ng-class="{disabled: !child.can_manage}"
                          title ="Manage machine"><i
294
                                                      ng-cloak>&nbsp;{{child.name}}</i></a>{{child.comment}}
295
296
                      </td>
                      <td class="lgMachToggle">
297
%                       if ($_user->can_create_base ) {
298
<span class="comment" ng-show="child.is_volatile"><%=l 'Volatile' %></span>
299
300
301
302
                          <i ng-show="{{child.has_clones}}" class="fa fa-check" aria-hidden="true"
                          title ="Cannot remove base, machine has clones" ng-cloak></i>
                          <input type="checkbox" checked
                                 ng-show="{{child.is_base}} && !{{child.has_clones}} && !{{child.is_locked}}"
303
                              ng-click="open_modal('mb_',child)"
304
305
                              title ="Remove base" ng-cloak>
                          <input type="checkbox"
306
                                 ng-show="!{{child.is_base}} && !{{child.is_locked}} && !{{child.is_volatile}}"
307
                              ng-click="open_modal('mb_',child)"
308
                              title ="Prepare base" ng-cloak>
309
310
311
312
313
314
                              
                          <div class="modal fade" tabindex="-1" role="dialog" id="mb_{{child.id}}">
                           <div class="modal-dialog" role="document">
                             <div class="modal-content">
                               <div class="modal-header">
                                 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
fv3rdugo's avatar
fv3rdugo committed
315
                                 <h4 class="modal-title"><%=l 'Changing Base State' %></h4>
316
317
                               </div>
                               <div class="modal-body" ng-show="can_remove_base(child)">
JanFontanet's avatar
JanFontanet committed
318
                                 <p><%=l 'Are you sure you want to remove the Base of' %> {{child.name}}?</p>
319
320
                               </div>
                               <div class="modal-body" ng-show="can_prepare_base(child)">
321
322
323
324
325
326
327
328
                                   <div ng-show="child.info.cdrom">
                                       <p>This machine has a CD-ROM {{with_cd}}</p>
                                   <ul>
                                       <li ng-repeat="cdrom in child.info.cdrom">{{cdrom}}</li>
                                   </ul>
                                   <input type="checkbox" ng-model="with_cd" name="with_cd"/>
                                    <label for="with_cd">Keep the CD for the clones</label>
                                   </div>
JanFontanet's avatar
JanFontanet committed
329
                                 <p><%=l 'Are you sure you want to prepare the Base of' %> {{child.name}}?</p>
330
                               </div>
331
                               <div class="modal-footer" ng-show="child.info">
Fernando Verdugo's avatar
Fernando Verdugo committed
332
                                 <button type="button" class="btn btn-secondary" data-dismiss="modal" ng-click="cancel_modal()"><%=l 'No' %></button>
fv3rdugo's avatar
fv3rdugo committed
333
                                 <button type="button" class="btn btn-primary" ng-click="cancel_modal();action('machine','remove_base',child.id)" ng-show="can_remove_base(child)" data-dismiss="modal"><%=l 'Yes' %></button>
334
                                 <button type="button" class="btn btn-primary" ng-click="cancel_modal();request('prepare_base',{ 'id_domain': child.id, 'with_cd': with_cd })" ng-show="can_prepare_base(child)" data-dismiss="modal"><%=l 'Yes' %></button>
335
336
337
338
                               </div>
                             </div>
                           </div>
                         </div>
339
%                       }
340
341
                      </td>
                      <td class="lgMachToggle">
342
%                       if ($_user->can_create_base ) {
343
                          <input type="checkbox" checked ng-show="{{child.is_public}}" ng-click="open_modal('mp_',child)" title="Make private">
344
                           <input type="checkbox" ng-hide="!child.is_base || child.is_public" ng-click="open_modal('mp_',child)" title="Make public">
345
346
347
348
349
350
351
352
353
                        
                          <div class="modal fade" tabindex="-1" role="dialog" id="mp_{{child.id}}">
                           <div class="modal-dialog" role="document">
                             <div class="modal-content">
                               <div class="modal-header">
                                 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                 <h4 class="modal-title">Changing Public State</h4>
                               </div>
                               <div class="modal-body">
JanFontanet's avatar
JanFontanet committed
354
                                 <p><%=l 'Are you sure you want to change the Public state of' %> {{child.name}} to {{(child.is_public==0)}}?</p>
355
356
                               </div>
                               <div class="modal-footer">
Fernando Verdugo's avatar
Fernando Verdugo committed
357
                                 <button type="button" class="btn btn-secondary" data-dismiss="modal" ng-click="cancel_modal()"><%=l 'No' %></button>
fv3rdugo's avatar
fv3rdugo committed
358
                                 <button type="button" class="btn btn-primary" ng-click="cancel_modal();set_public(child.id, child.is_public==0)" data-dismiss="modal"><%=l 'Yes' %></button>
359
360
361
362
363
364
                               </div>
                             </div>
                           </div>
                         </div>
                        
                        </td>
365
366
367
368
369
370
%                   if ($autostart) {
                        <td class="lgMachToggle">
                            <input type="checkbox" checked ng-show="{{child.autostart}}" ng-click="set_autostart(child.id, 0)" title="Disable Autostart">
                            <input type="checkbox" ng-hide="{{child.autostart}}" ng-click="set_autostart(child.id, 1)" title="Enable Autostart">
                        </td>
%                   }
371
%                       }
372
                      <td class="lgMachActions">
Fernando Verdugo's avatar
Fernando Verdugo committed
373
374
375
376
377
                          <span style="float:right;" ng-show="{{child.is_paused && child.is_active}}" class="badge badge-warning" ng-cloak><%=l 'Paused' %></span>
                          <span style="float:right;" ng-show="{{!child.is_paused && child.is_active}}" class="badge badge-success" ng-cloak><%=l 'Running' %></span>
                          <span style="float:right;" ng-show="{{!child.is_active && !child.is_hibernated}}" class="badge badge-danger" ng-cloak><%=l 'Down' %></span>
                          <span style="float:right;" ng-show="{{child.is_hibernated}}" class="badge badge-warning" ng-cloak><%=l 'Hibernated' %></span>
                          <br/><span style="float:right;" ng-show="{{child.is_active}}" class="badge badge-secondary">{{child.remote_ip}}</span>
378
379
380
381
                      </td>
                      <td class="lgMachToggle">

                        <div ng-hide="{{child.is_locked}}">
382
                          <button type="button" class="btn btn-success btn-sm"
383
384
                           ng-click="action('machine','start',child.id)"
                           ng-disabled="child.is_active"
Francesc Guasch's avatar
Francesc Guasch committed
385
                           ng-show="child.can_start"
386
387
                           title="<%=l 'Start' %>">
                            <i class="fa fa-play"></i>
388
389
                          </button>
                          <button type="button" class="btn btn-warning btn-sm"
Francesc Guasch's avatar
Francesc Guasch committed
390
                            ng-click="action('machine','hibernate',child.id)"
391
                            ng-disabled="!child.is_active"
392
393
                           ng-show="child.can_hibernate"
                            title="<%=l 'Hibernate' %>">
394
                            <i class="fa fa-pause"></i>
395
396
                          </button>
                          <button type="button" class="btn btn-danger btn-sm"
397
398
                           ng-click="action('machine','shutdown',child.id)"
                           ng-disabled="!child.is_active"
Francesc Guasch's avatar
Francesc Guasch committed
399
                           ng-show="child.can_shutdown"
400
401
                           title="<%=l 'ShutDown' %>">
                            <i class="fa fa-power-off"></i>
402
                         </button>
403
404
                          <a type="button" class="btn btn-primary btn-sm"
                           ng-href="/machine/view/{{child.id}}.html"
Francesc Guasch's avatar
Francesc Guasch committed
405
                           ng-show="child.can_view"
406
407
408
409
                           title="<%=l 'View' %>">
                            <i class="fa fa-desktop"></i>
                          </a>
                        </div>
Francesc Guasch's avatar
Francesc Guasch committed
410
                        <div ng-show="{{child.is_locked}}" ng-cloak><%=l 'Machine' %> <a href="/request/{{child.is_locked}}.html"> <%=l 'locked' %></a></div>
411
                      </td>
Fernando Verdugo's avatar
Fernando Verdugo committed
412
                      <td class="lgMachToggle"><span class="badge badge-info" title="<%=l 'Node'%>">{{child.node}}</span></td>
413
                    </tr>
amesones's avatar
amesones committed
414
                    <tr ng-repeat-end ng-hide="true"></tr>
415
            </tbody>
joansp's avatar
joansp committed
416
        </table>
joansp's avatar
joansp committed
417
    </div>
418
</div>
419
420
421
422
423
</div>
</div>
</div>
</div>
%= include 'bootstrap/scripts'
424
%= include $footer
425
426
%= include 'bootstrap/messages'

427
428
</body>
</html>