mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-26 06:50:09 +03:00
Bug #4323: Add topology placeholder for empty vnets pool
This commit is contained in:
parent
1f0b9dbdbe
commit
cbd2b98756
@ -25,6 +25,7 @@ define(function(require) {
|
||||
var Vis = require('vis');
|
||||
|
||||
var TemplateDashboard = require('hbs!./vnets-topology-tab/html');
|
||||
var TemplateEmptyTable = require('hbs!utils/tab-datatable/empty-table');
|
||||
|
||||
var _network;
|
||||
var _vnetList;
|
||||
@ -120,26 +121,32 @@ define(function(require) {
|
||||
var i = 0;
|
||||
|
||||
function _getVNet(index){
|
||||
var vnetId = item_list[index].VNET.ID;
|
||||
var element = item_list[index];
|
||||
if (element !== undefined) {
|
||||
var vnetId = element.VNET.ID;
|
||||
|
||||
OpenNebula.Network.show({
|
||||
data : {
|
||||
id: vnetId
|
||||
},
|
||||
timeout:true,
|
||||
success: function(request,info){
|
||||
vnetList.push(info);
|
||||
OpenNebula.Network.show({
|
||||
data : {
|
||||
id: vnetId
|
||||
},
|
||||
timeout:true,
|
||||
success: function(request,info){
|
||||
vnetList.push(info);
|
||||
|
||||
i += 1;
|
||||
if (i == item_list.length){
|
||||
_vnetList = vnetList;
|
||||
_doTopology();
|
||||
} else {
|
||||
_getVNet(i);
|
||||
}
|
||||
},
|
||||
error: Notifier.onError
|
||||
});
|
||||
i += 1;
|
||||
if (i == item_list.length){
|
||||
_vnetList = vnetList;
|
||||
_doTopology();
|
||||
} else {
|
||||
_getVNet(i);
|
||||
}
|
||||
},
|
||||
error: Notifier.onError
|
||||
});
|
||||
} else {
|
||||
_vnetList = vnetList;
|
||||
$('#visgraph').html(TemplateEmptyTable());
|
||||
}
|
||||
}
|
||||
|
||||
_getVNet(i);
|
||||
|
@ -14,4 +14,5 @@
|
||||
{{! limitations under the License. }}
|
||||
{{! -------------------------------------------------------------------------- }}
|
||||
|
||||
<div id="visgraph" style="width: 100%; min-height: 400px; height: 75vh;"></div>
|
||||
<div id="visgraph" style="width: 100%; min-height: 400px; height: 75vh;">
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user