fix issue #181 about enabling host

This commit is contained in:
Olivier Lambert
2015-01-08 10:35:24 +01:00
parent 4a8c47dffb
commit 4afcf4900a
3 changed files with 9 additions and 0 deletions

View File

@@ -36,6 +36,9 @@ module.exports = angular.module 'xoWebApp.home', [
$scope.pool_addHost = (id) ->
xo.host.attach id
$scope.enableHost = (id) ->
xo.host.enable id
$scope.pool_removeHost = (id) ->
modal.confirm({
title: 'Remove host from pool'

View File

@@ -222,6 +222,10 @@ div(ng-if="pools.length")
a(ng-repeat="controller in [host.controller] | resolve track by controller.UUID", xo-sref="consoles_view({id: controller.UUID})")
i.xo-icon-console.fa-fw
| Console
li(ng-if="!host.enabled")
a(xo-click="enableHost(host.UUID)")
i.fa.fa-check-circle.fa-fw
| Enable
li
a(xo-click="rebootHost(host.UUID)")
i.fa.fa-refresh.fa-fw

View File

@@ -440,7 +440,9 @@ module.exports = angular.module 'xoWebApp.services', [
restart: action 'Restart host', 'host.restart'
restartToolStack: action 'Restart tool stack', 'host.restart_agent'
start: action 'Start host', 'host.start'
enable: action 'Enable host', 'host.enable'
stop: action 'Stop host', 'host.stop'
disable: action 'Disable host', 'host.disable'
new_sr: action 'New SR' #temp fix before creating SR
# TODO: attach/set