handle sr rescan and do not display too small vdi in vdi map in sr view

This commit is contained in:
Olivier Lambert
2014-02-04 21:05:59 +01:00
parent 5244820133
commit df9274be2e
2 changed files with 7 additions and 2 deletions

View File

@@ -25,3 +25,8 @@ angular.module('xoWebApp')
console.log "Delete VDI #{UUID}"
## TODO: confirmation message. Too dangerous for now, but it works
xoApi.call 'vdi.delete', {id: UUID}
$scope.rescanSr = (UUID) ->
console.log "Rescan SR #{UUID}"
xoApi.call 'sr.scan', {id: UUID}

View File

@@ -87,7 +87,7 @@
</p>
<div class="progress">
<div
ng-if="((VDI.size/SR.size)*100) > 0"
ng-if="((VDI.size/SR.size)*100) > 0.5"
ng-repeat="VDI in SR.VDIs | resolve | orderBy:'name_label'"
class="progress-bar progress-bar-vm"
role="progressbar"
@@ -119,7 +119,7 @@
<span class="quick-edit" tooltip="Edit disks" ng-click="srDisks.$show()">
<i class="fa fa-edit fa-fw"> </i>
</span>
<span class="quick-edit" tooltip="Rescan" ng-click="rescanSr()">
<span class="quick-edit" tooltip="Rescan" ng-click="rescanSr(SR.UUID)">
<i class="fa fa-refresh fa-fw"> </i>
</span>
</p>