Support 'require_online' flag for roles on UI
Related-bug: #1461136 Change-Id: I8ab6dc4bed1acb75d2af7c159c9c6fbca4a33c0c
This commit is contained in:
parent
3830bdcb28
commit
5cd6c1236c
|
@ -26,6 +26,7 @@
|
|||
- compute
|
||||
- cinder
|
||||
has_primary: true
|
||||
require_online: true
|
||||
limits:
|
||||
min: 1
|
||||
overrides:
|
||||
|
|
|
@ -346,6 +346,21 @@ function($, _, i18n, Backbone, React, utils, models, dispatcher, controls, compo
|
|||
} else if (networkVerificationTask.match({status: 'running'})) {
|
||||
return makeComponent(i18n(this.ns + 'verification_in_progress'));
|
||||
}
|
||||
},
|
||||
// Offline nodes
|
||||
function(cluster) {
|
||||
var messages = [],
|
||||
nodes = cluster.get('nodes');
|
||||
cluster.get('release').get('role_models').each(function(role) {
|
||||
if (role.get('require_online')) {
|
||||
nodes.each(function(node) {
|
||||
if (!node.get('online') && !node.get('pending_deletion') && node.hasRole(role.get('name'))) {
|
||||
messages.push(i18n(this.ns + 'offline_nodes', {roleName: role.get('label')}));
|
||||
}
|
||||
}, this);
|
||||
}
|
||||
}, this);
|
||||
return {blocker: messages};
|
||||
}
|
||||
],
|
||||
validate: function(cluster) {
|
||||
|
|
|
@ -690,7 +690,8 @@
|
|||
"get_more_info": "For more information please visit the",
|
||||
"networks_link": "Networks tab",
|
||||
"invalid_settings": "Environment settings are invalid.",
|
||||
"settings_link": "Settings tab"
|
||||
"settings_link": "Settings tab",
|
||||
"offline_nodes": "All __roleName__ nodes must be online."
|
||||
},
|
||||
"show_node": {
|
||||
"manufacturer_label": "Manufacturer",
|
||||
|
|
Loading…
Reference in New Issue