Fixed interfaces saving

Change-Id: Idbe9cc003895fe12736efc95d2a70178428427c9
This commit is contained in:
jkirnosova 2013-10-21 13:16:18 +04:00
parent 7aaa1c321d
commit 67de902326
1 changed files with 5 additions and 2 deletions

View File

@ -1032,9 +1032,12 @@ function(utils, models, commonViews, dialogViews, nodesManagementPanelTemplate,
return Backbone.sync('update', new models.NodeInterfaceConfigurations(configuration));
}, this))
.done(_.bind(function() {
var interfaces = this.interfaces.toJSON();
this.nodes.each(function(node) {
node.interfaces = new models.Interfaces(_.cloneDeep(interfaces), {parse: true});
node.interfaces.each(function(ifc, index) {
ifc.set({
assigned_networks: new models.InterfaceNetworks(_.cloneDeep(this.interfaces.at(index).get('assigned_networks').toJSON()))
});
}, this);
}, this);
}, this))
.fail(_.bind(function() {