From: <gv...@hy...> - 2008-09-16 11:31:17
|
Author: gviedma Date: 2008-09-16 11:31:13 -0700 (Tue, 16 Sep 2008) New Revision: 11165 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=11165 Modified: branches/HQ_3_2/plugins/hqagent/src/org/hyperic/hq/plugin/hqagent/AgentProductPlugin.java branches/HQ_3_2/plugins/hqagent/src/org/hyperic/hq/plugin/hqagent/AgentServerDetector.java branches/HQ_3_2/ui_plugins/health/app/HealthController.groovy branches/HQ_3_2/ui_plugins/health/etc/health_i18n.properties Log: HHQ-2309: added cprop for agent build # (reviewed by dougm) Modified: branches/HQ_3_2/plugins/hqagent/src/org/hyperic/hq/plugin/hqagent/AgentProductPlugin.java =================================================================== --- branches/HQ_3_2/plugins/hqagent/src/org/hyperic/hq/plugin/hqagent/AgentProductPlugin.java 2008-09-16 18:29:42 UTC (rev 11164) +++ branches/HQ_3_2/plugins/hqagent/src/org/hyperic/hq/plugin/hqagent/AgentProductPlugin.java 2008-09-16 18:31:13 UTC (rev 11165) @@ -55,6 +55,10 @@ "Agent Version"); schema.addOption(opt); + opt = new StringConfigOption("build", + "Agent Build"); + schema.addOption(opt); + opt = new StringConfigOption("JavaVersion", "Java Version"); schema.addOption(opt); Modified: branches/HQ_3_2/plugins/hqagent/src/org/hyperic/hq/plugin/hqagent/AgentServerDetector.java =================================================================== --- branches/HQ_3_2/plugins/hqagent/src/org/hyperic/hq/plugin/hqagent/AgentServerDetector.java 2008-09-16 18:29:42 UTC (rev 11164) +++ branches/HQ_3_2/plugins/hqagent/src/org/hyperic/hq/plugin/hqagent/AgentServerDetector.java 2008-09-16 18:31:13 UTC (rev 11165) @@ -64,6 +64,7 @@ ServerResource res; String installPath, agtName; String version = ProductProperties.getVersion(); + String build = ProductProperties.getBuild(); agtName = getPlatformName() + " HQ Agent " + version; installPath = (new File(".")).getAbsoluteFile().getParent(); @@ -76,6 +77,7 @@ // Set custom properties ConfigResponse cprop = new ConfigResponse(); cprop.setValue("version", version); + cprop.setValue("build", build); cprop.setValue("JavaVersion", System.getProperty("java.vm.version")); cprop.setValue("JavaVendor", System.getProperty("java.vm.vendor")); cprop.setValue("UserHome", System.getProperty("user.home")); Modified: branches/HQ_3_2/ui_plugins/health/app/HealthController.groovy =================================================================== --- branches/HQ_3_2/ui_plugins/health/app/HealthController.groovy 2008-09-16 18:29:42 UTC (rev 11164) +++ branches/HQ_3_2/ui_plugins/health/app/HealthController.groovy 2008-09-16 18:31:13 UTC (rev 11165) @@ -62,6 +62,10 @@ [field: AgentSortField.VERSION, width: '10%', label: {it.agent.version}], + [field: [getValue: {localeBundle.build}, + description:'build', sortable:false], + width: '5%', + label: {it.build}], [field: AgentSortField.CTIME, width: '18%', label: {it.creationTime}], @@ -91,6 +95,18 @@ res } + private getAgentCProp(Agent a, Server s, String prop) { + def overlord = subMan.one.overlordPojo + def aev = new AppdefEntityValue(new AppdefEntityID(s.resource), overlord) + def cprop = "N/A" + try { + cprop = cpropMan.one.getValue(aev, prop) + } catch (Exception e) { + // cannot recover + } + cprop + } + private getLicenseCount(Agent a) { if (!HQUtil.isEnterpriseEdition()) return "" @@ -123,6 +139,7 @@ serverHtml:linkTo(a.address, [resource:d[2].resource]), offset:metricVal, offsetHtml:linkTo(metricVal, [resource:d[3]]), + build:getAgentCProp(a, d[2], "build"), numMetrics:numMetrics, creationTime:df.format(a.creationTime), licenseCount:getLicenseCount(a)] Modified: branches/HQ_3_2/ui_plugins/health/etc/health_i18n.properties =================================================================== --- branches/HQ_3_2/ui_plugins/health/etc/health_i18n.properties 2008-09-16 18:29:42 UTC (rev 11164) +++ branches/HQ_3_2/ui_plugins/health/etc/health_i18n.properties 2008-09-16 18:31:13 UTC (rev 11165) @@ -63,3 +63,4 @@ queryOrphanedAlertDefs=Orphaned AlertDef Count queryOrphanedAuditRows=Orphaned Audit Count queryVersion=Database Version Information +build=Build # |