-
Notifications
You must be signed in to change notification settings - Fork 82
/
manage_vm_pool.php
92 lines (91 loc) · 4.45 KB
/
manage_vm_pool.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
<?php
include ('functions/config.php');
require_once('functions/functions.php');
if (!check_session()){
header ("Location: $serviceurl/?error=1");
exit;
}
slash_vars();
set_lang();
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script src="inc/js/kvm-vdi.js"></script>
</head>
<body>
<div class="modal-content">
<div class="modal-header">
<div class="row">
<div class="col-md-8 text-left">
<h4 class="modal-title"><?php echo _("Add VMs to pool"); ?></h4>
</div>
<div class="col-md-3 text-right">
<div class="dropdown">
<button class="btn btn-default dropdown-toggle fa-cog" type="button" id="options" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<span class="fa fa-cog" aria-hidden="true"></span>
<span class="caret"></span>
</button>
<ul class="dropdown-menu" aria-labelledby="options">
<li><a href="#" id="ShowNonVDIVMSButton"><i data-status="" class="fa fa-square-o fa-fw" id="ShowNonVDIVMSCheckBox"></i><?php echo _("Show non-VDI VMs");?></a></li>
</ul>
</div>
</div>
<div class="col-md-1 text-right">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>
</div>
</div>
<div class="modal-body">
<div class="form-group">
<div class="row">
<div class="col-md-5">
<label for="multiselect" class="text-muted"><?php echo _("Available Vms");?></label>
<select name="multiselect" id="multiselect" class="form-control" size="20" multiple="multiple"></select>
</div>
<div class="col-md-2">
<div style="margin-top:80px;">
<button type="button" id="multiselect_rightAll" class="btn btn-block"><i class="glyphicon glyphicon-forward"></i></button>
<button type="button" id="multiselect_rightSelected" class="btn btn-block"><i class="glyphicon glyphicon-chevron-right"></i></button>
<button type="button" id="multiselect_leftSelected" class="btn btn-block"><i class="glyphicon glyphicon-chevron-left"></i></button>
<button type="button" id="multiselect_leftAll" class="btn btn-block"><i class="glyphicon glyphicon-backward"></i></button>
</div>
</div>
<div class="col-md-5">
<label for="multiselect_to" class="text-muted"><?php echo _("Vms in pool");?></label>
<select id="multiselect_to" name="multiselect_to" class="form-control" size="20" multiple="multiple"></select>
</div>
</div>
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4 text-center">
<label for="VMPoolList" class="text-muted"><?php echo _("Pool");?></label>
<select class="input-small form-control" id="VMPoolList">
<?php $group_array=get_SQL_array("SELECT * FROM pool ORDER BY name");
$x=0;
while ($x < sizeof($group_array)){
echo '<option value="' . $group_array[$x]['id'] . '">' . $group_array[$x]['name'] . '</option>';
++$x;
}?>
</select>
</div>
<div class="col-md-4"></div>
</div>
</div>
</div>
<div class="modal-footer">
<div class="clearfix"></div>
<button type="button" id="ManageVMPoolButton" class="btn btn-primary" data-dismis="modal"><?php echo _("Submit");?></button>
<button type="button" class="btn btn-default" data-dismiss="modal"><?php echo _("Close");?></button>
</div>
</div>
</body>
<script>
$(document).ready(function(){
$('#multiselect').multiselect();
$poolid=$('#VMPoolList').val();
loadVMPoolList($poolid,false);
});
</script>
</html>