provide the leaner with information regarding exposed ports

This commit is contained in:
Hauke Klement
2015-03-19 18:14:54 +01:00
parent 3c8b1f30c1
commit 5ec0a82157
4 changed files with 15 additions and 2 deletions

View File

@ -600,7 +600,18 @@ $(function() {
};
var storeContainerInformation = function(event) {
$('#stop').data('container', JSON.parse(event.data));
var container_information = JSON.parse(event.data);
$('#stop').data('container', container_information);
if (_.size(container_information.port_bindings) > 0) {
$.flash.info({
icon: ['fa', 'fa-exchange'],
text: _.map(container_information.port_bindings, function(key, value) {
var url = window.location.protocol + '//' + window.location.hostname + ':' + key;
return $('#run').data('message-network').replace('%{port}', value).replace(/%{address}/g, url);
}).join('\n')
});
}
};
var storeTab = function(event) {