[this belongs on jopr-dev mailing list - spawning thread there]
If that's the result of this checkin, then I agree with Ian. Having the display name
shown twice provides no additional value. Plus, if we see <No Description
Available>, its an easy trigger for us to see and make us think, "hey, I should go
into the plugin descriptor and add a description for this" and go do it - that has
already happened to me once and I added a description for one that was missing.
If I see text other than <No Description Avail> or a blank, I won't know if the
description really was set or if it wasn't set and this is just the default.
----- Original Message -----
From: "Ian Springer" <ian.springer(a)redhat.com>
Sent: Thursday, March 5, 2009 10:09:25 AM GMT -05:00 US/Canada Eastern
Subject: [Fwd: [Rhq-commits] [
rhq-project.org rhq] [3295] RHQ-1599 Provide the displayName
as description if no explicit description is given in the plugin descriptor.]
I don't think I agree with this change. If there's no description, I
think it should be left so, so the GUI can display either nothing or
"<No Description Available>". With this change, the GUI will end up
displaying the display name twice, which provides no added value. It
also obscures the fact that no description is defined for that metric.
-------- Original Message --------
Subject: [Rhq-commits] [
rhq-project.org rhq] [3295] RHQ-1599 Provide
the displayName as description if no explicit description is given in
the plugin descriptor.
Date: 5 Mar 2009 13:23:20 -0000
From: hrupp(a)rhq-project.org
To: rhq-commits(a)lists.sourceforge.net
Revision
3295
Author
hrupp
Date
2009-03-05 07:23:20 -0600 (Thu, 05 Mar 2009)
Log Message
RHQ-1599 Provide the displayName as description if no explicit description is given in the
plugin descriptor.
Modified Paths
*
rhq/trunk/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/metadata/MetricsMetadataParser.java
<#rhqtrunkmodulescoreclientapisrcmainjavaorgrhqcoreclientapiagentmetadataMetricsMetadataParserjava>
Diff
Modified:
rhq/trunk/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/metadata/MetricsMetadataParser.java
(3294 => 3295)
---
rhq/trunk/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/metadata/MetricsMetadataParser.java 2009-03-05
10:34:57 UTC (rev 3294)
+++
rhq/trunk/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/metadata/MetricsMetadataParser.java 2009-03-05
13:23:20 UTC (rev 3295)
@@ -111,12 +111,16 @@
dataType), dataType,
NumericType.valueOf(metricDescriptor.getMeasurementType().toUpperCase()),
metricDescriptor.isDefaultOn(), collectionInterval, displayType);
- definition.setDescription(metricDescriptor.getDescription());
if (metricDescriptor.getDisplayName() != null) {
definition.setDisplayName(metricDescriptor.getDisplayName());
} else {
definition.setDisplayName(StringUtils.deCamelCase(definition.getName()));
}
+ if (metricDescriptor.getDescription() != null) {
+ definition.setDescription(metricDescriptor.getDescription());
+ } else {
+ definition.setDescription(definition.getDisplayName() );
+ }
definition.setDestinationType(metricDescriptor.getDestinationType());