Skip to content

Commit 4a9155d

Browse files
committed
Always render physical networks as list view first
1 parent 4649672 commit 4a9155d

1 file changed

Lines changed: 23 additions & 30 deletions

File tree

ui/scripts/ui-custom/zoneChart.js

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -279,39 +279,32 @@
279279
response: {
280280
success: function(args) {
281281
var data = args.data;
282-
if (data.length > 1) {
283-
// Render list view first
284-
$chart.listView({
285-
listView: $.extend(true, {}, cloudStack.sections.system.naas.networks.listView, {
286-
dataProvider: function(args) {
287-
args.response.success({ data: data });
288-
},
289-
detailView: {
290-
tabs: {
291-
network: {
292-
title: 'Network',
293-
custom: function(args) {
294-
var $chart = $('<div>').addClass('system-chart network');
295-
296-
renderChart({
297-
$chart: $chart,
298-
data: args.context.physicalNetworks[0]
299-
});
300-
301-
return $chart;
302-
}
282+
283+
$chart.listView({
284+
listView: $.extend(true, {}, cloudStack.sections.system.naas.networks.listView, {
285+
dataProvider: function(args) {
286+
args.response.success({ data: data });
287+
},
288+
detailView: {
289+
tabs: {
290+
network: {
291+
title: 'Network',
292+
custom: function(args) {
293+
var $chart = $('<div>').addClass('system-chart network');
294+
295+
renderChart({
296+
$chart: $chart,
297+
data: args.context.physicalNetworks[0]
298+
});
299+
300+
return $chart;
303301
}
304302
}
305303
}
306-
})
307-
});
308-
$loading.remove();
309-
} else {
310-
renderChart({
311-
$chart: $chart,
312-
data: data[0]
313-
});
314-
}
304+
}
305+
})
306+
});
307+
$loading.remove();
315308
}
316309
}
317310
});

0 commit comments

Comments
 (0)