Revision 3796f345 snf-cyclades-app/synnefo/ui/static/snf/js/models.js
b/snf-cyclades-app/synnefo/ui/static/snf/js/models.js | ||
---|---|---|
1249 | 1249 |
return this.get_nics(function(n){ return n.get_network().is_public() === true })[0]; |
1250 | 1250 |
}, |
1251 | 1251 |
|
1252 |
get_hostname: function() { |
|
1253 |
var hostname = this.get_meta('hostname'); |
|
1254 |
if (!hostname) { |
|
1255 |
hostname = synnefo.config.vm_hostname_format.format(this.id); |
|
1256 |
} |
|
1257 |
return hostname; |
|
1258 |
}, |
|
1259 |
|
|
1252 | 1260 |
get_nic: function(net_id) { |
1253 | 1261 |
}, |
1254 | 1262 |
|
... | ... | |
1431 | 1439 |
get_connection_info: function(host_os, success, error) { |
1432 | 1440 |
var url = "/machines/connect"; |
1433 | 1441 |
params = { |
1434 |
ip_address: this.get_addresses().ip4, |
|
1442 |
ip_address: this.get_public_nic().get('ipv4'), |
|
1443 |
hostname: this.get_hostname(), |
|
1435 | 1444 |
os: this.get_os(), |
1436 | 1445 |
host_os: host_os, |
1437 | 1446 |
srv: this.id |
Also available in: Unified diff