admin_machines.html.ep 24.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">
6
        <div ng-controller="machinesPage" ng-init="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>
fv3rdugo's avatar
fv3rdugo committed
15
    <div class="row">
fv3rdugo's avatar
fv3rdugo committed
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
      <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
95
      </div>
96
        <div class="row">
Francesc Guasch's avatar
Francesc Guasch committed
97
            <div class="col-md-8"><h2><%=l 'Virtual Machines' %></h2></div>
98
            <div class="col-md-4" align="right">
99
% 		if ($_user->can_create_machine){
100
                <h2>
JanFontanet's avatar
JanFontanet committed
101
                    <button class="btn btn-warning" ng-click="refresh_machines()"><i class="fa fa-sync-alt" aria-hidden="true"></i></button>
102
103
104
105
106
107
108
109
                    <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
110
%		}
111
112
            </div>
        </div>
JanFontanet's avatar
JanFontanet committed
113

114
%=      include 'bootstrap/requests'
115

Fernando Verdugo's avatar
Fernando Verdugo committed
116
        <table class="table admin-cont-body" border="0">
117
118
            <thead>
                <tr>
119
                    <th ><div class="lgMachName machine-button" style="display:inline;float:down"
amesones's avatar
amesones committed
120
                     ng-click="orderMachineList('name','')">
Fernando Verdugo's avatar
Fernando Verdugo committed
121
                      <i class="fas fa-exchange fa-rotate-90"
122
                       ng-hide="orderParam[0] === 'name' || orderParam[0] === '-name'"></i>
Fernando Verdugo's avatar
Fernando Verdugo committed
123
                      <i class="fas fa-arrow-down" ng-cloak
124
                       ng-hide="orderParam[0] !== 'name'"></i>
Fernando Verdugo's avatar
Fernando Verdugo committed
125
                      <i class="fas fa-arrow-up" ng-cloak
126
                       ng-hide="orderParam[0] !== '-name'"></i>
127
                      <%=l 'Machine Name' %></div>
128
                        <div style="float:right" ng-show="n_clones">
gmiranda's avatar
gmiranda committed
129
                            <a ng-show="hide_clones" ng-click="hideClones()"
Fernando Verdugo's avatar
Fernando Verdugo committed
130
                              class="badge badge-primary dropdown-toggle text-white"
fv3rdugo's avatar
fv3rdugo committed
131
                              align="right"><%=l 'show clones' %></a>
gmiranda's avatar
gmiranda committed
132
                            <a ng-show="!hide_clones" ng-click="hideClones()"
Fernando Verdugo's avatar
Fernando Verdugo committed
133
                              class="badge badge-primary dropdown-toggle text-white"
134
                              align="right"><%=l 'hide clones' %></a>
gmiranda's avatar
gmiranda committed
135
                        </div>
136
                    </th>
137
                    <th class="lgMachToggle">
138
                      <span
amesones's avatar
amesones committed
139
                       ng-click="hideClones()"
140
141
                       title="<%=l 'Show/Hide clones' %>">
                       <%=l 'Base' %></span></th>
fv3rdugo's avatar
fv3rdugo committed
142
                    <th class="lgMachToggle"><%=l 'Public'%></th>
Francesc Guasch's avatar
Francesc Guasch committed
143
144
145
%                   if ($autostart) {
                        <th class="lgMachToggle"><%=l 'Autostart'%></th>
%                   }
amesones's avatar
amesones committed
146
147
                    <th class="lgMachToggle machine-button"
                     ng-click="orderMachineList('is_active','is_paused')">
Fernando Verdugo's avatar
Fernando Verdugo committed
148
149
150
151
152
                      <div style="float:right">
                        <i class="fas fa-exchange-alt fa-rotate-90" ng-hide="orderParam[0] === 'is_active' || orderParam[0] === '-is_active'"></i>
                        <i class="fas fa-arrow-down" ng-cloak ng-hide="orderParam[0] !== 'is_active'"></i>
                        <i class="fas fa-arrow-up" ng-cloak ng-hide="orderParam[0] !== '-is_active'"></i>
                        <%=l 'Status' %></div></th>
fv3rdugo's avatar
fv3rdugo committed
153
                    <th class="lgMachActions"><%=l 'Actions' %></th>
154
                    <th class="lgMachNode"><%=l 'Node' %></th>
155
156
157
                </tr>
            </thead>
            <tbody>
Fernando Verdugo's avatar
Fernando Verdugo committed
158
                <tr ng-repeat-start="machine in list_machines | orderBy : orderParam" class="bg-light">
159
                    <td class="lgMachName">
Francesc Guasch's avatar
Francesc Guasch committed
160
161
162
                        <a align="right" href="/machine/manage/{{machine.id}}.html"
                                         ng-class="{disabled: !machine.can_manage}"
                        title ="<%=l 'Manage machine' %>"><b
Francesc Guasch's avatar
Francesc Guasch committed
163
                                                              ng-cloak>{{machine.name}}</b></a> {{machine.comment}}
164
                    </td>
165
                    <td class="lgMachToggle">
166
%                       if ($_user->can_create_base ) {
167
                        <i ng-show="{{machine.has_clones}}" class="fa fa-check" aria-hidden="true"
fv3rdugo's avatar
fv3rdugo committed
168
                        title ="<%=l 'Cannot remove base, machine has clones' %>" ng-cloak></i>
fv3rdugo's avatar
fv3rdugo committed
169
170
                        <input type="checkbox" checked
                               ng-show="can_remove_base(machine)"
171
                            ng-click="open_modal('mb_',machine)"
fv3rdugo's avatar
fv3rdugo committed
172
                            title ="<%=l 'Remove base' %>" ng-cloak>
fv3rdugo's avatar
fv3rdugo committed
173
174
                        <input type="checkbox"
                               ng-show="can_prepare_base(machine)"
175
                            ng-click="open_modal('mb_',machine)"
fv3rdugo's avatar
fv3rdugo committed
176
                            title ="<%=l 'Prepare base' %>" ng-cloak>
JanFontanet's avatar
JanFontanet committed
177
178
179
180
181
182
                        
                        <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
183
                                 <h4 class="modal-title"><%=l 'Changing Base State' %></h4>
JanFontanet's avatar
JanFontanet committed
184
185
                               </div>
                               <div class="modal-body" ng-show="can_remove_base(machine)">
fv3rdugo's avatar
fv3rdugo committed
186
                                 <p><%=l 'Are you sure you want to remove the base of' %> {{machine.name}}?</p>
JanFontanet's avatar
JanFontanet committed
187
188
                               </div>
                               <div class="modal-body" ng-show="can_prepare_base(machine)">
fv3rdugo's avatar
fv3rdugo committed
189
                                 <p><%=l 'Are you sure you want to prepare the base of' %> {{machine.name}}?</p>
JanFontanet's avatar
JanFontanet committed
190
191
                               </div>
                               <div class="modal-footer">
Fernando Verdugo's avatar
Fernando Verdugo committed
192
                                 <button type="button" class="btn btn-secondary" data-dismiss="modal" ng-click="cancel_modal()"><%=l 'No' %></button>
fv3rdugo's avatar
fv3rdugo committed
193
194
                                 <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>
                                 <button type="button" class="btn btn-primary" ng-click="cancel_modal();action('machine','prepare',machine.id)" ng-show="can_prepare_base(machine)" data-dismiss="modal"><%=l 'Yes' %></button>
JanFontanet's avatar
JanFontanet committed
195
196
197
198
                               </div>
                             </div>
                           </div>
                         </div>
199
%                       }
joansp's avatar
joansp committed
200
                    </td>
201
                    <td class="lgMachToggle">
202
%                       if ($_user->can_create_base ) {
203
                        <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
204

205
                         <input type="checkbox" ng-hide="!machine.is_base || machine.is_public" ng-click="open_modal('mp_',machine)" title="<%=l 'Make public' %>" ng-cloak>
206
207
                       
                        <div class="modal fade" tabindex="-1" role="dialog" id="mp_{{machine.id}}">
JanFontanet's avatar
JanFontanet committed
208
209
210
211
                           <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
212
                                 <h4 class="modal-title"><%=l 'Changing Public State' %></h4>
JanFontanet's avatar
JanFontanet committed
213
214
                               </div>
                               <div class="modal-body">
fv3rdugo's avatar
fv3rdugo committed
215
                                 <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
216
217
                               </div>
                               <div class="modal-footer">
Fernando Verdugo's avatar
Fernando Verdugo committed
218
                                 <button type="button" class="btn btn-secondary" data-dismiss="modal" ng-click="cancel_modal()"><%=l 'No' %></button>
fv3rdugo's avatar
fv3rdugo committed
219
                                 <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
220
221
222
223
                               </div>
                             </div>
                           </div>
                         </div>
224
                       </td>
225

226
                         
227
%                       if ($autostart) {
228
229
230
                            <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>
231
%                       }
232
%                       }
233
                    <td class="lgMachActions">
Fernando Verdugo's avatar
Fernando Verdugo committed
234
235
236
237
238
                        <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>
239
                    </td>
240
                    <td class="lgMachToggle">
241
                      <div ng-hide="{{machine.is_locked||machine.is_base}}">
242
                        <button type="button" class="btn btn-success btn-sm"
243
                         ng-click="action('machine','start',machine.id)"
244
                         ng-disabled="machine.is_active"
Francesc Guasch's avatar
Francesc Guasch committed
245
                         ng-show="machine.can_start"
246
                         title="<%=l 'Start' %>">
247
                         <i class="fa fa-play"></i>
248
249
                        </button>
                        <button type="button" class="btn btn-warning btn-sm"
Francesc Guasch's avatar
Francesc Guasch committed
250
                         ng-click="action('machine','hibernate',machine.id)"
251
                         ng-disabled="!machine.is_active"
252
253
                         ng-show="machine.can_hibernate"
                         title="<%=l 'Hibernate' %>">
254
                          <i class="fa fa-pause"></i>
255
256
                       </button>
                        <button type="button" class="btn btn-danger btn-sm"
257
258
                         ng-click="action('machine','shutdown',machine.id)"
                         ng-disabled="!machine.is_active"
Francesc Guasch's avatar
Francesc Guasch committed
259
                         ng-show="machine.can_shutdown"
fv3rdugo's avatar
fv3rdugo committed
260
                         title="<%=l 'ShutDown' %>">
261
                          <i class="fa fa-power-off"></i>
262
                       </button>
263
                        <a type="button" class="btn btn-primary btn-sm"
264
                         ng-show="machine.can_view"
265
266
267
268
                         ng-href="/machine/view/{{machine.id}}.html"
                         title="<%=l 'View' %>">
                          <i class="fa fa-desktop"></i>
                        </a>
269
                      </div>
Francesc Guasch's avatar
Francesc Guasch committed
270
                      <div ng-show="{{machine.is_locked}}" ng-cloak>Machine locked by <a href="/request/{{machine.is_locked}}.html"><%=l 'process' %></a></div>
271
                      <div ng-show="{{machine.is_base}} && !{{machine.is_locked}}"
Fernando Verdugo's avatar
Fernando Verdugo committed
272
                          ng-cloak><span class="badge badge-pill badge-light"><%=l 'This Machine is a base' %></span></div>
273
                    </td>
Fernando Verdugo's avatar
Fernando Verdugo committed
274
                    <td class="lgMachNode"></td>
275
                </tr>
276
277
                    <tr ng-hide="hide_clones" ng-repeat="child in machine.childs | orderBy : orderParam">
                      <td class="lgMachName">
Francesc Guasch's avatar
Francesc Guasch committed
278
                      &nbsp;<i title="[cloned]" class="fa fa-fw fa-long-arrow-right"
279
                              style="color:white"></i>
Francesc Guasch's avatar
Francesc Guasch committed
280
281
                          <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
282
283
284
                          <a align="right" href="/machine/manage/{{child.id}}.html"
                                         ng-class="{disabled: !child.can_manage}"
                          title ="Manage machine"><i
Francesc Guasch's avatar
Francesc Guasch committed
285
                                         ng-cloak>&nbsp;{{child.name}}</i></a> {{child.comment}}
286
287
                      </td>
                      <td class="lgMachToggle">
288
%                       if ($_user->can_create_base ) {
289
<span class="comment" ng-show="child.is_volatile"><%=l 'Volatile' %></span>
290
291
292
293
                          <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}}"
294
                              ng-click="open_modal('mb_',child)"
295
296
                              title ="Remove base" ng-cloak>
                          <input type="checkbox"
297
                                 ng-show="!{{child.is_base}} && !{{child.is_locked}} && !{{child.is_volatile}}"
298
                              ng-click="open_modal('mb_',child)"
299
                              title ="Prepare base" ng-cloak>
300
301
302
303
304
305
                              
                          <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
306
                                 <h4 class="modal-title"><%=l 'Changing Base State' %></h4>
307
308
                               </div>
                               <div class="modal-body" ng-show="can_remove_base(child)">
JanFontanet's avatar
JanFontanet committed
309
                                 <p><%=l 'Are you sure you want to remove the Base of' %> {{child.name}}?</p>
310
311
                               </div>
                               <div class="modal-body" ng-show="can_prepare_base(child)">
JanFontanet's avatar
JanFontanet committed
312
                                 <p><%=l 'Are you sure you want to prepare the Base of' %> {{child.name}}?</p>
313
314
                               </div>
                               <div class="modal-footer">
Fernando Verdugo's avatar
Fernando Verdugo committed
315
                                 <button type="button" class="btn btn-secondary" data-dismiss="modal" ng-click="cancel_modal()"><%=l 'No' %></button>
fv3rdugo's avatar
fv3rdugo committed
316
317
                                 <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>
                                 <button type="button" class="btn btn-primary" ng-click="cancel_modal();action('machine','prepare',child.id)" ng-show="can_prepare_base(child)" data-dismiss="modal"><%=l 'Yes' %></button>
318
319
320
321
                               </div>
                             </div>
                           </div>
                         </div>
322
%                       }
323
324
                      </td>
                      <td class="lgMachToggle">
325
%                       if ($_user->can_create_base ) {
326
                          <input type="checkbox" checked ng-show="{{child.is_public}}" ng-click="open_modal('mp_',child)" title="Make private">
327
                           <input type="checkbox" ng-hide="!child.is_base || child.is_public" ng-click="open_modal('mp_',child)" title="Make public">
328
329
330
331
332
333
334
335
336
                        
                          <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
337
                                 <p><%=l 'Are you sure you want to change the Public state of' %> {{child.name}} to {{(child.is_public==0)}}?</p>
338
339
                               </div>
                               <div class="modal-footer">
Fernando Verdugo's avatar
Fernando Verdugo committed
340
                                 <button type="button" class="btn btn-secondary" data-dismiss="modal" ng-click="cancel_modal()"><%=l 'No' %></button>
fv3rdugo's avatar
fv3rdugo committed
341
                                 <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>
342
343
344
345
346
347
                               </div>
                             </div>
                           </div>
                         </div>
                        
                        </td>
348
349
350
351
352
353
%                   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>
%                   }
354
%                       }
355
                      <td class="lgMachActions">
Fernando Verdugo's avatar
Fernando Verdugo committed
356
357
358
359
360
                          <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>
361
362
363
364
                      </td>
                      <td class="lgMachToggle">

                        <div ng-hide="{{child.is_locked}}">
365
                          <button type="button" class="btn btn-success btn-sm"
366
367
                           ng-click="action('machine','start',child.id)"
                           ng-disabled="child.is_active"
Francesc Guasch's avatar
Francesc Guasch committed
368
                           ng-show="child.can_start"
369
370
                           title="<%=l 'Start' %>">
                            <i class="fa fa-play"></i>
371
372
                          </button>
                          <button type="button" class="btn btn-warning btn-sm"
Francesc Guasch's avatar
Francesc Guasch committed
373
                            ng-click="action('machine','hibernate',child.id)"
374
                            ng-disabled="!child.is_active"
375
376
                           ng-show="child.can_hibernate"
                            title="<%=l 'Hibernate' %>">
377
                            <i class="fa fa-pause"></i>
378
379
                          </button>
                          <button type="button" class="btn btn-danger btn-sm"
380
381
                           ng-click="action('machine','shutdown',child.id)"
                           ng-disabled="!child.is_active"
Francesc Guasch's avatar
Francesc Guasch committed
382
                           ng-show="child.can_shutdown"
383
384
                           title="<%=l 'ShutDown' %>">
                            <i class="fa fa-power-off"></i>
385
                         </button>
386
387
                          <a type="button" class="btn btn-primary btn-sm"
                           ng-href="/machine/view/{{child.id}}.html"
Francesc Guasch's avatar
Francesc Guasch committed
388
                           ng-show="child.can_view"
389
390
391
392
                           title="<%=l 'View' %>">
                            <i class="fa fa-desktop"></i>
                          </a>
                        </div>
393
                        <div ng-show="{{child.is_locked}}" ng-cloak><%=l 'Machine locked by' %><a href="/request/{{child.is_locked}}.html"> <%=l 'process' %></a></div>
394
                      </td>
Fernando Verdugo's avatar
Fernando Verdugo committed
395
                      <td class="lgMachToggle"><span class="badge badge-info" title="<%=l 'Node'%>">{{child.node}}</span></td>
396
                    </tr>
amesones's avatar
amesones committed
397
                    <tr ng-repeat-end ng-hide="true"></tr>
398
            </tbody>
joansp's avatar
joansp committed
399
        </table>
joansp's avatar
joansp committed
400
    </div>
401
</div>
402
403
404
405
406
</div>
</div>
</div>
</div>
%= include 'bootstrap/scripts'
407
%= include $footer
408
409
%= include 'bootstrap/messages'

410
411
</body>
</html>