|
@@ -211,8 +211,10 @@ module.exports = {
|
|
|
data: {
|
|
|
hostNames: hostNames.join(','),
|
|
|
requestInfo: operationData.message,
|
|
|
- rackId: rackId
|
|
|
+ rackId: rackId,
|
|
|
+ hostNamesArray: hostNames
|
|
|
},
|
|
|
+ success: 'successRackId',
|
|
|
error: 'errorRackId'
|
|
|
});
|
|
|
}
|
|
@@ -221,6 +223,17 @@ module.exports = {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
+ /**
|
|
|
+ * Success callback for set rack id request
|
|
|
+ */
|
|
|
+ successRackId: function (response, request, params) {
|
|
|
+ App.Host.find().forEach(function(host){
|
|
|
+ if (params.hostNamesArray.contains(host.get('hostName'))) {
|
|
|
+ host.set('rack', params.rackId)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
/**
|
|
|
* Warn user that the rack id will not be updated
|
|
|
*/
|