Don't offer to create resource groups on disconnected servers. Fixes #1569

This commit is contained in:
Surinder Kumar 2016-08-22 12:21:33 +01:00 committed by Dave Page
parent 4c2020cdc7
commit fe54a124da
2 changed files with 6 additions and 6 deletions

View File

@ -868,6 +868,7 @@ class ServerNode(PGChildNodeView):
manager.server_type manager.server_type
), ),
'connected': True, 'connected': True,
'server_type': manager.server_type,
'type': manager.server_type, 'type': manager.server_type,
'version': manager.version, 'version': manager.version,
'db': manager.db, 'db': manager.db,

View File

@ -39,12 +39,11 @@ define(
/* Function is used to check the server type and version. /* Function is used to check the server type and version.
* Resource Group only supported in PPAS 9.4 and above. * Resource Group only supported in PPAS 9.4 and above.
*/ */
enable: function() { enable: function(node, item) {
var server_obj = arguments[0]; var treeData = this.getTreeNodeHierarchy(item),
if (server_obj.server_type === 'ppas' && server_obj.version >= 90400) server = treeData['server'];
return true; return server.connected && node.server_type === 'ppas' &&
else node.version >= 90400;
return false;
} }
},{ },{
name: 'create_resource_group_on_coll', node: 'coll-resource_group', module: this, name: 'create_resource_group_on_coll', node: 'coll-resource_group', module: this,