list_bases_ng.html.ep 5.05 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
<!DOCTYPE html>
<html ng-app="ravada.app">
%= include 'bootstrap/header'
<body id="page-top" data-spy="scroll" data-target=".navbar-fixed-top">
<div id="wrapper">
%= include 'bootstrap/navigation'
<script>
    $_anonymous=<%= ($_anonymous or 0) %>;
</script>

Francesc Guasch's avatar
Francesc Guasch committed
11
<div id="page-wrapper" ng-controller="bases" ng-init="anonymous=<%= $_anonymous or 0 %>;list_machines_user();">
12
13
%= include 'main/list_bases_ng_head'
    <!--MACHINES SELECTION-->
Fernando Verdugo's avatar
Fernando Verdugo committed
14
    <div class="card-body">
15
    <div ng-repeat="machine in machines | orderBy: 'id_clone'"
Fernando Verdugo's avatar
Fernando Verdugo committed
16
         class="col-sm-4 d-inline-block mb-2"
17
                ng-show="machine.is_public || (!machine.is_public && !only_public)">
Fernando Verdugo's avatar
Fernando Verdugo committed
18
19
20
        <div class="card card-success">
            <div class="card-header" id="step1" >
                <h3 class="card-title">
21
22
23
                    <a class="btn btn-link"
                        href="/machine/clone/{{machine.id}}.html"
                        role="button">{{machine.name}}</a>
Fernando Verdugo's avatar
Fernando Verdugo committed
24
                    <i ng-show="!machine.is_public"><i class="far fa-eye-slash fa-xs" title="<%=l 'not public' %>"></i></i>
25
26
                </h3>
                <a ng-show="machine.screenshot" href="/machine/clone/{{machine.id}}.html"><img
Francesc Guasch's avatar
Francesc Guasch committed
27
                    ng-src="{{machine.screenshot}}" class="img-thumbnail" width="260"
28
29
30
31
32
33
                    alt="{{machine.description}}"></a>
                <a ng-show="!machine.screenshot" href="/machine/clone/{{machine.id}}.html"><img
                    src="/img/default_screenshot.png" class="screenshot-default img-thumbnail"
                    alt="{{machine.description}}"
                    width="260"></a>
            </div>
Fernando Verdugo's avatar
Fernando Verdugo committed
34
            <div class="card-body" id="step2">
35
36
                <a type="button" class="btn btn-success" ng-hide="host_action == machine.id"
                   href="/machine/clone/{{machine.id}}.html"><strong><i class="fa fa-play" aria-hidden="true"></i>&nbsp;<%=l 'Start' %></strong></a>
Fernando Verdugo's avatar
Fernando Verdugo committed
37
                <a type="button" class="btn btn-danger text-white"
Francesc Guasch's avatar
Francesc Guasch committed
38
                    ng-show="machine.id_clone && !machine.is_active && machine.can_remove"
Francesc Guasch's avatar
Francesc Guasch committed
39
                    ng-click="host_restore=machine.id_clone; $parent.refresh=20"
40
41
42
43
44
                    ><strong><i class="fas fa-redo" aria-hidden="true"></i>&nbsp;<%=l 'Restore' %></strong></a>
                    <div ng-show="machine.id_clone && host_restore == machine.id_clone">
                        <b><%=l 'Restore' %></b> <%=l 'will remove all the contents of the machine' %>
                        <i><b>{{machine.name_clone}}</b></i>.
                        <%=l 'Are you sure?' %><br/>
Fernando Verdugo's avatar
Fernando Verdugo committed
45
                        <a type="button" class="btn btn-primary text-white"
Francesc Guasch's avatar
Francesc Guasch committed
46
                            ng-click="host_restore=0; host_action=0"
47
                        ><%=l 'No' %></a>
Fernando Verdugo's avatar
Fernando Verdugo committed
48
                        <a type="button" class="btn btn-danger text-white"
Francesc Guasch's avatar
Francesc Guasch committed
49
                            ng-click="restore(machine.id_clone);host_restore=0;host_action=0"
50
51
52
                            ><%=l 'Yes' %></a>
                    </div>
                 <a ng-show="machine.is_active && host_action != machine.id"
Fernando Verdugo's avatar
Fernando Verdugo committed
53
                        class="btn btn-light"
Francesc Guasch's avatar
Francesc Guasch committed
54
                        ng-click="host_action=machine.id;$parent.refresh=20"
55
                        type="button"><%=l 'action'%></a>
Fernando Verdugo's avatar
Fernando Verdugo committed
56
                    <div class="btn-group"
57
58
                            ng-show="host_action == machine.id && !host_restore"
                            >
Fernando Verdugo's avatar
Fernando Verdugo committed
59
                        <a type="button" class="btn btn-light btn-sm"
Francesc Guasch's avatar
Francesc Guasch committed
60
                            ng-show="machine.can_remove"
61
62
63
64
                            ng-click="host_restore=machine.id_clone"
                        ><%=l 'Restore' %></a>

                        <a ng-show="machine.is_active" type="button"
Fernando Verdugo's avatar
Fernando Verdugo committed
65
                                                       class="btn btn-light btn-sm"
66
67
68
                            ng-click="action(machine.id_clone,'shutdown');host_action=-1"
                        ><%=l 'Shutdown'%></a>

69
                        <a ng-show="machine.is_active && machine.can_hibernate" type="button"
Fernando Verdugo's avatar
Fernando Verdugo committed
70
                                                       class="btn btn-light btn-sm"
71
72
73
                            ng-click="action(machine.id_clone,'hibernate');host_action=-1"
                        ><%=l 'Hibernate' %></a>

Fernando Verdugo's avatar
Fernando Verdugo committed
74
                        <a
75
                           ng-click="host_action=0"
Fernando Verdugo's avatar
Fernando Verdugo committed
76
77
                           ><i class="align-bottom fas fa-chevron-circle-left"></i></a>
                    </div>
Francesc Guasch's avatar
Francesc Guasch committed
78
79
%			        if ($user
%                       && ( $user->can_change_settings || $user->can_change_settings_all)){
80
                        <a ng-show="machine.id_clone && (host_action != machine.id && host_restore != machine.id_clone)"
Fernando Verdugo's avatar
Fernando Verdugo committed
81
                            align="right" href="/machine/manage/{{machine.id_clone}}.html"><i class="fa fa-fw fa-cog" title="<%=l 'Settings' %>"></i></a>
82
83
84
85
86
%                   }

            </div>
        </div>
    </div>
Fernando Verdugo's avatar
Fernando Verdugo committed
87
    </div><!-- card body -->
88
89
90
91
92
93
94
95
96
97
98
</div><!-- page wrapper -->
%= include 'bootstrap/scripts'

</div><!-- wrapper -->

<style>
.introjs-tooltip {
    min-width: 450px;
}
</style>

99
%= include $footer
100
101
102
%= include 'bootstrap/messages'
</body>
</html>