|
From: <jt...@hy...> - 2007-03-30 01:34:58
|
Author: jtravis Date: 2007-03-29 17:34:55 -0800 (Thu, 29 Mar 2007) New Revision: 3970 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=3970 Modified: trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/BaseController.groovy Log: Add multi chart, single resource charts Modified: trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/BaseController.groovy =================================================================== --- trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/BaseController.groovy 2007-03-29 23:11:29 UTC (rev 3969) +++ trunk/ui_plugins/rendit_sys/org/hyperic/hq/ui/rendit/BaseController.groovy 2007-03-30 01:34:55 UTC (rev 3970) @@ -1,5 +1,6 @@ package org.hyperic.hq.ui.rendit +import org.hyperic.hq.appdef.shared.AppdefEntityID import org.hyperic.hq.ui.rendit.util.UserUtil import org.apache.commons.lang.StringEscapeUtils @@ -82,12 +83,23 @@ url += h(opts['action']) } - if (opts.containsKey('metricChart')) { - def entId = opts['metricChart'].entId - def templateId = opts['metricChart'].templateId + // Single resource, multi metric chart + if (opts.containsKey('resourceCharts')) { + def dMetrics = opts['resourceCharts'] + if (dMetrics.size() == 0) + throw new IllegalArgumentException("No charts specified") + def first = dMetrics[0] + def templateIds = "" + for (m in dMetrics) { + templateIds += "&m=${m.template.id}" + } + + def multiUrl = url = createURL("/resource/common/monitor/Visibility.do?" + - "eid=$entId&m=$templateId" + - "&mode=chartSingleMetricSingleResource") + "mode=chartMultiMetricSingleResource" + + "&rid=${first.instanceId}" + + "&type=${first.appdefType}" + + templateIds) } if (opts.containsKey('resource')) { |