Skip to content

Commit bd84005

Browse files
committed
Infrastructure UI: Fix list views with sub-sections
1 parent 0dd14b1 commit bd84005

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

ui/scripts/ui-custom/physicalResources.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
cloudStack.uiCustom.physicalResources = function(args) {
1919
var listView = function(targetID) {
2020
var target = args.sections.physicalResources.listView[targetID];
21+
var listViewArgs = $.isFunction(target) ? target() : target;
2122

22-
return $('<div>').listView({ listView: $.isFunction(target) ? target() : target });
23+
return $('<div>').listView(listViewArgs.listView ? listViewArgs : { listView: listViewArgs });
2324
};
2425
var $dashboard = $('#template').find('.system-dashboard-view').clone();
2526
var getData = function() {

ui/scripts/ui-custom/zoneChart.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,11 @@
5858
listView: function(targetID, context) {
5959
return function(args) {
6060
var $elem = args.$panel;
61-
var listViewArgs = cloudStack.sections.system.subsections[targetID].listView;
61+
var listView = cloudStack.sections.system.subsections[targetID];
6262

63-
$elem.listView({
64-
context: context,
65-
listView: listViewArgs
66-
});
63+
$elem.listView($.extend(true, {}, listView, {
64+
context: context
65+
}));
6766
};
6867
},
6968

0 commit comments

Comments
 (0)