Close VM console during reboot (fix #208).
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
angular = require 'angular'
|
||||
|
||||
contains = require('lodash.contains')
|
||||
|
||||
#=====================================================================
|
||||
|
||||
module.exports = angular.module 'xoWebApp.console', [
|
||||
@@ -26,13 +28,18 @@ module.exports = angular.module 'xoWebApp.console', [
|
||||
$scope.$watch(
|
||||
-> xoApi.get id
|
||||
(VM) ->
|
||||
$scope.consoleUrl = null
|
||||
|
||||
unless xoApi.user
|
||||
$scope.consoleUrl = ''
|
||||
$scope.VDIs = []
|
||||
return
|
||||
|
||||
$scope.VM = VM
|
||||
return unless VM? and VM.power_state is 'Running'
|
||||
return unless (
|
||||
VM? and
|
||||
VM.power_state is 'Running' and
|
||||
not contains(VM.current_operations, 'clean_reboot')
|
||||
)
|
||||
|
||||
pool = get VM.poolRef
|
||||
return unless pool
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
"gulp-watch": "^4.1.1",
|
||||
"in-publish": "^1.1.1",
|
||||
"jquery": "^2.1.3",
|
||||
"lodash.contains": "^2.4.1",
|
||||
"lodash.filter": "^3.0.0",
|
||||
"lodash.indexof": "^3.0.0",
|
||||
"lodash.throttle": "^3.0.1",
|
||||
|
||||
Reference in New Issue
Block a user