Revision 02effd9c
b/snf-cyclades-app/synnefo/ui/static/snf/js/models.js | ||
---|---|---|
1308 | 1308 |
}, |
1309 | 1309 |
|
1310 | 1310 |
connect_floating_ip: function(ip, cb) { |
1311 |
synnefo.storage.ports.create({ |
|
1312 |
port: { |
|
1313 |
network_id: ip.get('floating_network_id'), |
|
1314 |
device_id: this.id, |
|
1315 |
fixed_ips: [{'ip_address': ip.get('floating_ip_address')}] |
|
1316 |
} |
|
1317 |
}, {complete: cb, skip_api_error: false}) |
|
1311 | 1318 |
// TODO: Implement |
1312 | 1319 |
}, |
1313 | 1320 |
|
b/snf-cyclades-app/synnefo/ui/static/snf/js/ui/web/ui_ips_view.js | ||
---|---|---|
62 | 62 |
return views.IconView.VM_OS_ICON_TPLS()[icon_type].format(os); |
63 | 63 |
}, |
64 | 64 |
|
65 |
ventdisconnect: function() {
|
|
65 |
disconnect: function() { |
|
66 | 66 |
this.model.actions.reset_pending(); |
67 | 67 |
this.model.set({status: 'DISCONNECTING'}); |
68 | 68 |
} |
69 |
|
|
70 | 69 |
}); |
71 | 70 |
|
72 | 71 |
views.IpView = views.ext.ModelView.extend({ |
... | ... | |
81 | 80 |
}, |
82 | 81 |
|
83 | 82 |
status_cls_map: { |
83 |
'CONNECTED': 'status-active', |
|
84 | 84 |
'CONNECTING': 'status-active', |
85 | 85 |
'DISCONNECTING': 'status-inactive', |
86 | 86 |
'DOWN': 'status-inactive', |
... | ... | |
133 | 133 |
remove: function(model, e) { |
134 | 134 |
e && e.stopPropagation(); |
135 | 135 |
this.model.actions.reset_pending(); |
136 |
this.model.set({status: 'REMOVING'}); |
|
137 |
this.model.remove(); |
|
136 |
this.model.destroy({ |
|
137 |
success: _.bind(function() { |
|
138 |
this.model.set({status: 'REMOVING'}); |
|
139 |
}, this), |
|
140 |
silent: true |
|
141 |
}); |
|
138 | 142 |
} |
139 | 143 |
}); |
140 | 144 |
|
Also available in: Unified diff