Extended zone charts to allow for easy creation of custom charts

This commit is contained in:
Chris Suich 2013-07-31 13:44:32 -04:00 committed by Brian Federle
parent 2e56e7b02c
commit 7b6ed79659

View File

@ -18,7 +18,7 @@
/**
* Zone details chart
*/
cloudStack.uiCustom.systemChart = function(chartID) {
cloudStack.uiCustom.systemChart = function(chartID, chartFunc) {
/**
* Make view all button
*/
@ -446,7 +446,10 @@
// Fix zone context naming
args.context.zones = args.context.physicalResources;
var $chart = charts[chartID](args).addClass('system-chart').addClass(chartID);
if (chartFunc == null)
chartFunc = charts[chartID];
var $chart = chartFunc(args).addClass('system-chart').addClass(chartID);
return $chart;
};