Begin ...

This commit is contained in:
Loic GUEGAN 2016-04-17 20:11:46 +02:00
parent bb1598713c
commit a481b727d9
2 changed files with 94 additions and 24 deletions

View file

@ -0,0 +1,67 @@
<div class="modal fade" id="uploadImageModal" ng-controller="uploadImageCtrl">
<div class="modal-dialog">
<div class="modal-content"></div>
</div>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<!--<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>-->
<h4 class="modal-title">Upload Image</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" role="form">
<div class="form-group">
<label class="control-label col-sm-2" for="email">Name</label>
<div class="col-sm-10">
<p class="form-control-static">{{ machine.name}}</p>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="pwd">State</label>
<div class="col-sm-10">
<span ng-if="machine.status == 'ACTIVE'">Online</span>
<span ng-if="machine.status !== 'ACTIVE'">Offline</span>
&nbsp;
<button class="btn btn-danger" ng-if="machine.status == 'ACTIVE'" ng-click="toggleMachineState()">Turn Off</button>
<button class="btn btn-success" ng-if="machine.status !== 'ACTIVE'" ng-click="toggleMachineState()">Turn On</button>
&nbsp;<img src="images/spin/32x32/Preloader_1.gif" ng-if="machineIsStarting"></span>
</div>
</div>
<fieldset class="form-group">
<label class="control-label col-sm-2">RAM</label>
<select class="col-sm-20" id="ramSelected">
<option ng-repeat="ram in axioms.ram" ng-selected="machine.ram == ram">{{ ram}}</option>
</select>
<span>MB</span>
</fieldset>
<fieldset class="form-group">
<label class="control-label col-sm-2">Disk</label>
<select class="col-sm-20" id="ramSelected">
<option ng-repeat="disk in axioms.disk" ng-selected="machine.disk == disk">{{ disk}}</option>
</select>
</fieldset>
<fieldset class="form-group">
<label class="control-label col-sm-2">Image</label>
<select class="col-sm-20" id="ramSelected">
<option ng-repeat="image in axioms.images" ng-selected="machine.imageId == Object.keys(image)">{{ image.name}}</option>
</select>
</fieldset>
</form>
</div>
</div>
</div>
</div>

View file

@ -6,33 +6,36 @@
</div>
<div class="panel-body">
<div class="btn-group btn-group-md" role="group" aria-label="...">
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#uploadImageModal"">Upload</button>
<button type="button" class="btn btn-default">Download</button>
</div>
<p></p>
<table class="table table-hover">
<thead>
<tr>
<th>Name</th>
<th>Size</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="image in images">
<td>{{ image.name }}</td>
<td>{{ (image.size / 1048576).toFixed(2) }} MB</td>
<td><button type="button" class="btn btn-danger">Remove</button></td>
</tr>
</tbody>
</table>
<div class="btn-group btn-group-md" role="group" aria-label="...">
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#uploadImageModal"">Upload</button>
<button type="button" class="btn btn-default">Download</button>
</div>
<p></p>
<table class="table table-hover">
<thead>
<tr>
<th>Name</th>
<th>Size</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="image in images">
<td>{{ image.name}}</td>
<td>{{ (image.size / 1048576).toFixed(2)}} MB</td>
<td>
<button type="button" class="btn btn-primary">Edit</button>
<button type="button" class="btn btn-danger">Remove</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>