Bug 1075757
Summary: | Group metric graphs for resources with quotes in name do not display graph - JSON bug | ||
---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | Elias Ross <genman> |
Component: | Core UI | Assignee: | RHQ Project Maintainer <rhq-maint> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 4.9 | CC: | hrupp, jkremser |
Target Milestone: | --- | ||
Target Release: | RHQ 4.12 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-12-15 11:35:54 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Elias Ross
2014-03-12 18:26:47 UTC
Not the correct escape characters but pretty close. See: http://stackoverflow.com/questions/3020094/how-should-i-escape-strings-in-json diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/groups/detail/monitoring/table/CompositeGroupD3GraphListView.java b index cd637ac..516f98e 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/groups/detail/monitoring/table/CompositeGroupD3GraphListView.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/groups/detail/monitoring/table/CompositeGroupD3GraphListView.java @@ -378,7 +378,7 @@ public String getJsonMetrics() { for (MultiLineGraphData multiLineGraphData : measurementForEachResource) { if(null != multiLineGraphData.getMeasurementData() && multiLineGraphData.getMeasurementData().size() > 0){ sb.append("{ \"key\": \""); - sb.append(multiLineGraphData.getResourceName()); + sb.append(multiLineGraphData.getResourceNameEscaped()); sb.append("\",\"value\" : "); sb.append(produceInnerValuesArray(multiLineGraphData.getMeasurementData())); sb.append("},"); @@ -477,6 +477,10 @@ public String getResourceName() { return resourceName; } + public String getResourceNameEscaped() { + return resourceName.replace('"', '\''); + } + public int getResourceId() { return resourceId; } 97cc62c3caa1288dac023f4 (pull request #30 - https://github.com/rhq-project/rhq/pull/30) Bulk close of items fixed in RHQ 4.12 If you think this is not solved, then please open a *new* BZ and link to this one. |