vm_actions.html.ep 4.82 KB
Newer Older
robertperez-upc's avatar
robertperez-upc committed
1
2
3
4
5
6
7
8
9
10
<div class="card-body">
  <div ng-show="showmachine.can_start">
    <button type="button" class="btn btn-success btn-sm"
     ng-click="action('machine','start',showmachine.id)"
     ng-disabled="showmachine.is_active"
     title="<%=l 'Start' %>">
     <i class="fa fa-play"></i>
    </button>
    <span><%=l 'Start' %></span>
    <br><br>
11
  </div>
robertperez-upc's avatar
robertperez-upc committed
12

13
  <div ng-show="(confirmingMachineStopOnNewMachineStartData) && (confirmingMachineStopOnNewMachineStartData.action === 'start')" class="alert alert-warning" role="alert">
14
15
16
17
18
19
    <div>
        <span><%=l 'One of the machines that are currently running will be shutdown.' %></span>
        <br>
        <span><%=l 'Continue?' %></span>
        <br>
    </div>
20
21
22
23
24
25
26
    <div class="pull-right">
      <input type="button" class="btn btn-danger btn-xs" value="<%=l 'Yes' %>" ng-click="confirmingMachineStopOnNewMachineStartDataDone()">
      <input type="button" class="btn btn-primary btn-xs" value="<%=l 'No' %>" ng-click="confirmingMachineStopOnNewMachineStartDataCancelled()">
    </div>
    <br>
  </div>

27
  <div ng-show="showmachine.can_view">
28
29
    <button type="button" class="btn btn-primary btn-sm"
     ng-click="action('machine','view',showmachine.id)"
30
     title="<%=l 'View' %>">
31
32
     <i class="fa fa-desktop"></i>
    </button>
33
34
35
36
    <span><%=l 'View' %></span>
    <br><br>
  </div>

37
  <div type="warning" ng-show="(confirmingMachineStopOnNewMachineStartData) && (confirmingMachineStopOnNewMachineStartData.action === 'view')" class="alert alert-warning" role="alert">
38
39
40
41
42
43
    <div>
        <span><%=l 'One of the machines that are currently running will be shutdown.' %></span>
        <br>
        <span><%=l 'Continue?' %></span>
        <br>
    </div>
44
45
46
47
48
49
    <div class="pull-right">
      <input type="button" class="btn btn-primary btn-xs" value="<%=l 'Yes' %>" ng-click="confirmingMachineStopOnNewMachineStartDataDone()">
      <input type="button" class="btn btn-primary btn-xs" value="<%=l 'No' %>" ng-click="confirmingMachineStopOnNewMachineStartDataCancelled()">
    </div>
    <br>
  </div>
Roberto P. Rubio's avatar
Roberto P. Rubio committed
50

robertperez-upc's avatar
robertperez-upc committed
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
  <div ng-show="showmachine.can_hibernate">
    <button type="button" class="btn btn-warning btn-sm"
     ng-click="action('machine','hibernate',showmachine.id)"
     ng-disabled="!showmachine.is_active"
     title="<%=l 'Hibernate' %>">
      <i class="fa fa-pause"></i>
   </button>
   <span><%=l 'Hibernate' %></span>
   <br><br>
  </div>

  <div ng-show="showmachine.can_shutdown">
    <button type="button" class="btn btn-danger btn-sm"
     ng-click="action('machine','shutdown',showmachine.id)"
     ng-disabled="!showmachine.is_active"
     title="<%=l 'ShutDown' %>">
      <i class="fa fa-power-off"></i>
    </button>
    <span><%=l 'ShutDown' %></span>
    <br><br>
  </div>

Roberto P. Rubio's avatar
Roberto P. Rubio committed
73
74
75
76
77
78
79
80
  <div ng-show="showmachine.can_shutdown">
    <button type="button" class="btn btn-danger btn-sm"
     ng-click="action('machine','shutdown',showmachine.id, { force: true })"
     ng-disabled="!showmachine.is_active"
     title="<%=l 'Force ShutDown' %>">
      <i class="fa fa-power-off"></i>
    </button>
    <span><%=l 'Force ShutDown' %></span>
robertperez-upc's avatar
robertperez-upc committed
81
82
83
    <br><br>
  </div>

Roberto P. Rubio's avatar
Roberto P. Rubio committed
84
85
86
87
88
  <div ng-show="showmachine.can_reboot">
    <button type="button" class="btn btn-danger btn-sm"
     ng-click="action('machine','reboot',showmachine.id)"
     ng-disabled="!showmachine.is_active"
     title="<%=l 'Reboot' %>">
89
      <i class="fa fa-redo"></i>
Roberto P. Rubio's avatar
Roberto P. Rubio committed
90
91
92
93
    </button>
    <span><%=l 'Reboot' %></span>
    <br><br>
  </div>
Roberto P. Rubio's avatar
Roberto P. Rubio committed
94

Roberto P. Rubio's avatar
Roberto P. Rubio committed
95
96
97
98
99
  <div ng-show="showmachine.can_reboot">
    <button type="button" class="btn btn-danger btn-sm"
     ng-click="action('machine','reboot',showmachine.id, { force: true })"
     ng-disabled="!showmachine.is_active"
     title="<%=l 'Force Reboot' %>">
100
      <i class="fa fa-redo"></i>
Roberto P. Rubio's avatar
Roberto P. Rubio committed
101
102
103
104
    </button>
    <span><%=l 'Force Reboot' %></span>
    <br><br>
  </div>
105

106
107
108
</div>

<hr>
Francesc Guasch's avatar
Francesc Guasch committed
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

<div class="container">

  <div class="row mt-2">
    <div class="col-lg-2" align="right">
      <button class="btn btn-outline-dark"
        ng-disabled="showmachine.is_compacted"
        ng-click="request('compact',{'id_domain': showmachine.id , 'keep_backup': true })"
        ><%=l 'Compact' %></button>
    </div>
    <div class="col-md-7">
        <div><%=l 'Compact disk volumes' %></div>
        <div ng-show="showmachine.is_compacted">
            This virtual machine has already been compacted
        </div>
    </div>
  </div>

  <div class="row mt-2">
    <div class="col-lg-2" align="right">
      <button class="btn btn-outline-dark"
        ng-disabled="!showmachine.has_backups"
        ng-click="request('purge',{'id_domain': showmachine.id })"
        ><%=l 'Purge' %></button>
    </div>
    <div class="col-md-7">
        <span><%=l 'Purge disk volumes' %></span>
        <div ng-hide="showmachine.has_backups">
            This virtual machine has no backups to purge
        </div>
    </div>
  </div>

</div>

  <div ng-show="pending_request">
    %= include "/main/pending_request"
  </div>