Remove node from node list after deregristration
This commit is contained in:
parent
5ce77e0aee
commit
06bf0bb728
|
@ -285,7 +285,7 @@ ItemBaseController = Ember.ArrayController.extend({
|
||||||
});
|
});
|
||||||
|
|
||||||
App.NodesShowController = Ember.ObjectController.extend({
|
App.NodesShowController = Ember.ObjectController.extend({
|
||||||
needs: ["dc"],
|
needs: ["dc", "nodes"],
|
||||||
dc: Ember.computed.alias("controllers.dc"),
|
dc: Ember.computed.alias("controllers.dc"),
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
|
@ -306,6 +306,10 @@ App.NodesShowController = Ember.ObjectController.extend({
|
||||||
'Node': node.Node
|
'Node': node.Node
|
||||||
})
|
})
|
||||||
}).then(function(response) {
|
}).then(function(response) {
|
||||||
|
var nodes = controller.get('controllers.nodes').get('nodes');
|
||||||
|
controller.get('controllers.nodes').set('nodes', nodes.filter(function(n) {
|
||||||
|
return n.Node !== node.Node;
|
||||||
|
}));
|
||||||
controller.transitionToRoute('nodes');
|
controller.transitionToRoute('nodes');
|
||||||
}).fail(function(response) {
|
}).fail(function(response) {
|
||||||
controller.set('errorMessage', 'Received error while processing: ' + response.statusText);
|
controller.set('errorMessage', 'Received error while processing: ' + response.statusText);
|
||||||
|
|
Loading…
Reference in New Issue