Fix for networks changes cancelling
This commit is contained in:
parent
4e5144d069
commit
672f41a834
@ -194,14 +194,12 @@ function(models, commonViews, dialogViews, networkTabTemplate, networkTabViewMod
|
|||||||
_.defaults(this, options);
|
_.defaults(this, options);
|
||||||
this.model.bind('change:tasks', this.bindEvents, this);
|
this.model.bind('change:tasks', this.bindEvents, this);
|
||||||
this.bindEvents();
|
this.bindEvents();
|
||||||
if (!this.model.get('networks')) {
|
var complete = _.after(2, _.bind(this.render, this));
|
||||||
this.networks = new models.Networks();
|
this.model.fetch().done(complete);
|
||||||
this.networks.deferred = this.networks.fetch({data: {cluster_id: this.model.id}});
|
this.networks = new models.Networks();
|
||||||
this.networks.deferred.done(_.bind(this.render, this));
|
this.networks.deferred = this.networks.fetch({data: {cluster_id: this.model.id}});
|
||||||
this.model.set({'networks': this.networks}, {silent: true});
|
this.networks.deferred.done(complete);
|
||||||
} else {
|
this.model.set({'networks': this.networks}, {silent: true});
|
||||||
this.networks = this.model.get('networks');
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
renderVerificationControl: function() {
|
renderVerificationControl: function() {
|
||||||
var verificationView = new NetworkTabVerificationControl({model: this.model, networks: this.networks});
|
var verificationView = new NetworkTabVerificationControl({model: this.model, networks: this.networks});
|
||||||
|
Loading…
Reference in New Issue
Block a user