vm_pool.html.ep 3.26 KB
Newer Older
Francesc Guasch's avatar
Francesc Guasch committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<div class="panel panel-default">

    <div class="panel-body" ng-show="showmachine.is_base">
        <div class="row">
            <div class="col-md-2">
                Pool
            </div>
            <div class="col-md-2">
                <input type="checkbox" ng-checked="showmachine.pools==1"
                    ng-click="set_bool('pools',!showmachine.pools)"
                >
            </div>
            <div class="col-mg-4" >
            </div>
        </div>
        <div class="row">
            <div class="col-md-2">
                Clones
            </div>
            <div class="col-md-2">
Francesc Guasch's avatar
Francesc Guasch committed
21
                <input type="number" size="2" ng-model="showmachine.pool_clones"
Francesc Guasch's avatar
Francesc Guasch committed
22
                    ng-disabled="showmachine.pools==0"
Francesc Guasch's avatar
Francesc Guasch committed
23
24
25
                    ng-change="set('pool_clones')"
                    min="{{showmachine.pool_start}}"
                    style="width: 5em"
Francesc Guasch's avatar
Francesc Guasch committed
26
27
28
29
30
31
32
                >
            </div>
            <div class="col-mg-4">
                <small class="text-secondary">Virtual machines in the pool.</small>
            </div>
        </div>
        <div class="row">
33
            <div class="col-md-2" ng-hide="showmachine.volatile_clones">
Francesc Guasch's avatar
Francesc Guasch committed
34
35
                Start
            </div>
36
37
38
39
40
41
            <div class="col-md-6" ng-show="showmachine.volatile_clones">
                <small class="text-secondary">
                    <%=l 'Clones are volatile, so all the pool will be started.' %>
                </small>
            </div>
            <div class="col-md-2" ng-hide="showmachine.volatile_clones">
Francesc Guasch's avatar
Francesc Guasch committed
42
                <input type="number" size="2" ng-model="showmachine.pool_start"
Francesc Guasch's avatar
Francesc Guasch committed
43
                    ng-disabled="showmachine.pools==0"
Francesc Guasch's avatar
Francesc Guasch committed
44
45
46
                    ng-change="set('pool_start')"
                    max="{{showmachine.pool_clones}}"
                    style="width: 5em"
Francesc Guasch's avatar
Francesc Guasch committed
47
48
                >
            </div>
49
            <div class="col-mg-4" ng-hide="showmachine.volatile_clones">
Francesc Guasch's avatar
Francesc Guasch committed
50
51
52
53
54
55
56
57
58
59
60
61
                <small class="text-secondary">
                Virtual machines pre-started
                </small>
            </div>
        </div>

        <div class="row">
            <div class="col-md-12">
                <div ng-show="showmachine.pools && showmachine.pool_clones >0 && showmachine.is_base==0">Warning: this virtual machine will be prepared as a base. This may take long.
                </div>
                <div ng-show="showmachine.pool_start > showmachine.pool_clones"
                    class="alert alert-danger"
Francesc Guasch's avatar
Francesc Guasch committed
62
63
                >Error: you want to have {{showmachine.pool_start}} but there are
                    only {{showmachine.pool_clones}} clones defined.
Francesc Guasch's avatar
Francesc Guasch committed
64
65
66
67
                </div>
             </div>
         </div>
    </div>
frankiejol's avatar
frankiejol committed
68
    <div class="panel-body" ng-show="!showmachine.is_base && showmachine.id_base">
Francesc Guasch's avatar
Francesc Guasch committed
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
        <div class="row">
            <div class="col-md-2">
               Pool
            </div>
            <div class="col-md-2">
                <input type="checkbox" ng-checked="showmachine.is_pool==1"
                    ng-click="set_bool('is_pool',!showmachine.is_pool)"
                >
            </div>
            <div class="col-mg-4">
                <small class="text-secondary">
                    Assign this virtual machine to the pre-started pool
                </small>
            </div>
        </div>
    </div>
</div>