Univention Bugzilla – Attachment 5952 Details for
Bug 35107
Wrong state handling: PAUSED, VNC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix PAUSED handling
35xxx_uvmm-state.diff (text/plain), 2.61 KB, created by
Philipp Hahn
on 2014-06-12 10:37 CEST
(
hide
)
Description:
Fix PAUSED handling
Filename:
MIME Type:
Creator:
Philipp Hahn
Created:
2014-06-12 10:37 CEST
Size:
2.61 KB
patch
obsolete
>diff --git a/branches/ucs-3.2/ucs-3.2-2/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm.js b/branches/ucs-3.2/ucs-3.2-2/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm.js >index 833e05d..03ca5e2 100644 >--- a/branches/ucs-3.2/ucs-3.2-2/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm.js >+++ b/branches/ucs-3.2/ucs-3.2-2/virtualization/univention-virtual-machine-manager-daemon/umc/js/uvmm.js >@@ -68,14 +68,13 @@ define([ > CheckBox, ComboBox, TextBox, Button, TreeModel, DomainPage, DomainWizard, types, _) { > > var isRunning = function(item) { >- return (item.state == 'RUNNING' || item.state == 'IDLE') && item.node_available; >+ return (item.state == 'RUNNING' || item.state == 'IDLE' || item.state == 'PAUSED') && item.node_available; > }; > > var canStart = function(item) { >- return !isRunning(item); >+ return !item.node_available || (item.state != 'RUNNING' && item.state != 'IDLE'); > }; > >- > var canVNC = function(item) { > return isRunning(item) && item.vnc_port; > }; >@@ -905,9 +904,7 @@ define([ > isStandardAction: false, > isMultiAction: true, > callback: lang.hitch(this, '_shutdown'), >- canExecute: function(item) { >- return (item.state == 'RUNNING' || item.state == 'IDLE') && item.node_available; >- } >+ canExecute: isRunning > }, { > name: 'stop', > label: _( 'Stop' ), >@@ -920,9 +917,7 @@ define([ > /* buttonLabel */ _( 'Stop' ), > /* newState */ 'SHUTOFF', > /* action */ 'stop'), >- canExecute: function(item) { >- return isRunning(item); >- } >+ canExecute: isRunning > }, { > name: 'pause', > label: _( 'Pause' ), >@@ -931,7 +926,7 @@ define([ > isMultiAction: true, > callback: lang.hitch(this, '_changeState', 'PAUSE', 'pause' ), > canExecute: function(item) { >- return isRunning(item); >+ return isRunning(item) && item.state != 'PAUSED'; > } > }, { > name: 'suspend', >@@ -977,7 +972,7 @@ define([ > isMultiAction: true, > callback: lang.hitch(this, '_migrateDomain' ), > canExecute: function(item) { >- return item.state != 'PAUSE'; // FIXME need to find out if there are more than one node of this type >+ return item.state != 'PAUSED'; // FIXME need to find out if there are more than one node of this type > } > }, { > name: 'remove', >@@ -1006,7 +1001,7 @@ define([ > var item = this._grid._grid.getItem(rowIndex); > var percentage = Math.round(item.cpuUsage); > >- if (item.state == 'RUNNING' || item.state == 'IDLE') { >+ if (isRunning(item)) { > // only show CPU info, if the machine is running > return new ProgressBar({ > value: percentage + '%'
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 35107
: 5952