list_machines.html 5.7 KB
Newer Older
joansp's avatar
joansp committed
1

2
3
<div class="panel-body">
    <div class="col-lg-12">
joansp's avatar
joansp committed
4
      <div ng-show="!pingbe" class="alert alert-danger" ng-cloak>
joansp's avatar
joansp committed
5
6
        <strong>Error!</strong> Backend no available!
      </div>
7
8
9
10
11
12
        <table class="table table-striped">
            <thead>
                <tr>
                    <th>Machine Name</th>
                    <th>Base</th>
                    <th>Active</th>
joansp's avatar
joansp committed
13
                    <th>Actions</th>
joansp's avatar
joansp committed
14

15
16
17
18
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="machine in list_machines">
19
                    <td>
20
                        <a data-toggle="modal" data-target="#modal{{machine.id}}" title="VM guest">{{machine.name}}</a>
21
                    </td>
joansp's avatar
joansp committed
22
23
24
                    <td>
                        <i ng-show="{{machine.is_base}}" class="fa fa-check" aria-hidden="true"></i>

25
                        <a ng-hide="{{machine.is_base}}" ng-click="prepare(machine.id)" href="" title="Prepare base"><i  class="fa fa-times" aria-hidden="true"></i></a>
joansp's avatar
joansp committed
26
27
28
29
30
                    </td>
                    <td>
                        <a ng-show="{{machine.is_active}}" ng-click="shutdown(machine.id)"><i class="fa fa-check" aria-hidden="true"></i></a>

                        <a ng-show="{{!machine.is_active}}" ng-click="start(machine.id)"><i class="fa fa-times" aria-hidden="true"></i></td></a>
31
                    <td>
joansp's avatar
joansp committed
32
                        <a class="btn btn-primary btn-sm" href="/machine/manage/{{machine.id}}.html">Manage</a>
joansp's avatar
joansp committed
33
34
35
36
37
38

                        <a class="btn btn-primary btn-sm" href="/machine/view/{{machine.id}}.html"><i class="fa fa-desktop" aria-hidden="true"></i>&nbsp View</a>

                        <a ng-show="{{machine.is_base}}" class="btn btn-primary btn-sm" href="/machine/clone/{{machine.id}}.html"><i class="fa fa-files-o" aria-hidden="true"></i>&nbsp Clone</a>

                        <button type="button" ng-click="screenshot(machine.id)" ng-show="{{machine.is_active}}" class="btn btn-primary btn-sm"><i class="fa fa-camera" aria-hidden="true"></i>&nbspScreenshot</button>
joansp's avatar
joansp committed
39

joansp's avatar
joansp committed
40
41
42
                        <button type="button" ng-click="shutdown(machine.id)" ng-show="{{machine.is_active}}" class="btn btn-warning btn-sm"></strong><i class="fa fa-power-off" aria-hidden="true"></i>&nbsp ShutDown</button>


joansp's avatar
joansp committed
43
                        <i id="spinn{{machine.id}}" class="fa fa-spinner fa-spin fa-fw" style="float: right; display: none;"></i>
joansp's avatar
joansp committed
44
45

                        <span style="float:right;" ng-show="{{machine.is_paused && machine.is_active}}" class="label label-warning">Paused</span>
46
                    </td>
joansp's avatar
joansp committed
47

48
49
                </tr>
            </tbody>
joansp's avatar
joansp committed
50
51
        </table>
        <div ng-repeat="machine in list_machines">
joansp's avatar
joansp committed
52
53
54
55
56
57
58
59
60
61
62
63
        <div id="modal{{machine.id}}" class="modal fade" role="dialog">
          <div class="modal-dialog">

            <!-- Modal content-->
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">
                    {{machine.name}}
                </h4>
              </div>
              <div class="modal-body">
joansp's avatar
joansp committed
64
                <div style="width:100%; margin-bottom:10px;">
fv3rdugo's avatar
fv3rdugo committed
65
                    <img src="/img/screenshots/{{machine.id}}.png" width="400" alt="No screenshot available for this machine">
joansp's avatar
joansp committed
66
                </div>
joansp's avatar
joansp committed
67

joansp's avatar
joansp committed
68
69
70
71
72
73
74
75
                <div style="width:100%; margin-bottom:10px;">
                    <a class="btn btn-primary btn-sm" href="/machine/view/{{machine.id}}.html"><i class="fa fa-desktop" aria-hidden="true"></i>&nbsp View</a>

                    <button type="button" ng-click="start(machine.id)" ng-hide="{{machine.is_active}}" class="btn btn-success btn-sm"><i class="fa fa-play" aria-hidden="true"></i>&nbsp Start</button>

                    <button type="button" ng-click="resume(machine.id)" ng-show="{{machine.is_active && machine.is_paused}}" class="btn btn-success btn-sm"><i class="fa fa-repeat" aria-hidden="true"></i>&nbsp Resume</button>

                    <button type="button" ng-click="pause(machine.id)" ng-show="{{machine.is_active && !machine.is_paused}}" class="btn btn-success btn-sm"><i class="fa fa-pause" aria-hidden="true"></i>&nbsp Pause</button>
joansp's avatar
joansp committed
76
                </div>
joansp's avatar
joansp committed
77
78
79
80

                <div style="width:100%; margin-bottom:10px;">
                    <a ng-show="{{machine.is_base}}" class="btn btn-primary btn-sm" href="/machine/clone/{{machine.id}}.html"><i class="fa fa-files-o" aria-hidden="true"></i>&nbsp Clone</a>

joansp's avatar
joansp committed
81
                    <button type="button" ng-click="prepare(machine.id)" class="btn btn-primary btn-sm"><i class="fa fa-plus" aria-hidden="true"></i>&nbsp Prepare Base</button>
joansp's avatar
joansp committed
82
83
84
85

                    <button type="button" ng-click="screenshot(machine.id)" ng-show="{{machine.is_active}}" class="btn btn-primary btn-sm"><i class="fa fa-camera" aria-hidden="true"></i>&nbsp Screenshot</button>

                    <button type="button" ng-click="shutdown(machine.id)" ng-show="{{machine.is_active}}" class="btn btn-warning btn-sm"></strong><i class="fa fa-power-off" aria-hidden="true"></i>&nbsp ShutDown</button>
joansp's avatar
joansp committed
86
                    <button type="button" ng-click="removeb(machine.id)" ng-show="{{machine.is_base}}" class="btn btn-warning btn-sm"><i class="fa fa-trash-o" aria-hidden="true"></i>&nbsp Remove Base</button>
joansp's avatar
joansp committed
87
88
89
                    <a  class="btn btn-danger btn-sm" href="/machine/remove/{{machine.id}}.html"><strong>&nbsp;<i class="fa fa-trash-o" aria-hidden="true"></i></strong> Delete</a>
                </div>

joansp's avatar
joansp committed
90
91


joansp's avatar
joansp committed
92

joansp's avatar
joansp committed
93
94
              </div>
              <div class="modal-footer">
joansp's avatar
joansp committed
95

joansp's avatar
joansp committed
96
97
98
99
100
101
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
              </div>
            </div>

          </div>
        </div>
joansp's avatar
joansp committed
102
        </div>
joansp's avatar
joansp committed
103
    </div>
104
</div>