[rhq] modules/enterprise
by lkrejci
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SubjectGWTServiceImpl.java | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 0a1e7be5fe4aa4776a55f257192cb31a43f89513
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Mon Apr 2 15:33:44 2012 +0200
[BZ 804303] - Make sure to hang on to the changed config that we need to
persist.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SubjectGWTServiceImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SubjectGWTServiceImpl.java
index 97ec22f..bbdd102 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SubjectGWTServiceImpl.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/SubjectGWTServiceImpl.java
@@ -165,7 +165,10 @@ public class SubjectGWTServiceImpl extends AbstractGWTServiceImpl implements Sub
Subject modifiedSubject;
synchronized (subjectLock) {
if (!updateSubject) {
+ //make sure to use the prefs passed to us. getSubjectById() would overwrite them
+ Configuration prefs = subjectToModify.getUserConfiguration();
subjectToModify = subjectManager.getSubjectById(subjectToModify.getId());
+ subjectToModify.setUserConfiguration(prefs);
}
Configuration persistedPrefs = SubjectPreferencesCache.getInstance().getPreferences(subjectToModify.getId());
12 years, 1 month
[rhq] modules/plugins
by Heiko W. Rupp
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit ab5ef73b8714cd6f6c172593885a4c3fc76a93b4
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Mon Apr 2 14:46:02 2012 +0200
BZ 808903 Allow to delete managed servers again.
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java
index 0308fd1..60974f2 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ManagedASDiscovery.java
@@ -86,11 +86,11 @@ public class ManagedASDiscovery extends AbstractBaseDiscovery<HostControllerComp
}
pluginConfig.put(new PropertySimple("socket-binding-port-offset", serverInfo.portOffset));
- String path = "host=" + hostName + ",server-pluginConfig=" + serverInfo.name;
+ String path = "host=" + hostName + ",server-config=" + serverInfo.name;
pluginConfig.put(new PropertySimple("path", path));
// get from the domain or other place as soon as the domain provides it.
- //XXX hardcoded separators?
+ //TODO hardcoded separators?
String serverLog = hcConfig.getSimpleValue("baseDir", "/tmp") + File.separator + "domain/servers/"
+ serverInfo.name + "/log/server.log";
initLogEventSourcesConfigProp(serverLog, pluginConfig);
12 years, 1 month
[rhq] Branch 'feature/export-reports' - modules/enterprise
by mike thompson
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/ReportExporter.java | 64 ++++++----
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/report/alert/SubsystemRecentAlertsView.java | 17 --
2 files changed, 40 insertions(+), 41 deletions(-)
New commits:
commit 45d4be0c41368b3dd17956c8e86ddf0d3defc63e
Author: Mike Thompson <mithomps(a)redhat.com>
Date: Sun Apr 1 19:53:34 2012 -0700
[BZ 800453] Export Csv Reports. DRY up code.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/ReportExporter.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/ReportExporter.java
index eb7297c..bfdda08 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/ReportExporter.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/ReportExporter.java
@@ -41,6 +41,7 @@ public class ReportExporter {
private static final String FORMAT = "csv"; //CSV is all we need right now
private String reportUrl;
+ private StringBuilder queryString;
private boolean showAllDetail;
@@ -132,13 +133,23 @@ public class ReportExporter {
this.operationRequestStatuses = operationRequestStatuses;
}
- public String determineUrl() {
- StringBuilder queryString = new StringBuilder();
+ private String buildUrl() {
+ buildQueryParameters();
+
+ // trim the last "&" off the url if exists
+ final String cleanQueryString = queryString.toString().endsWith("&") ? queryString.substring(0,queryString.toString().length() -1) : queryString.toString();
+ final String queryStringNotEndingWithQuestionMark = cleanQueryString.toString().endsWith("?") ? cleanQueryString.substring(0,cleanQueryString.toString().length() -1) : cleanQueryString.toString();
+ return URL.encode(BASE_URL + reportUrl + "." + FORMAT + "?"+ queryStringNotEndingWithQuestionMark);
+ }
+
+ private void buildQueryParameters() {
+ queryString = new StringBuilder();
if (showAllDetail) {
- queryString.append("showAllDetails=").append("true").append("&");
+ addQueryParameter("showAllDetails","true");
+
} else if (null != resourceTypeIds && !resourceTypeIds.isEmpty()) {
- queryString.append("resourceTypeId=").append(StringUtility.toString(resourceTypeIds)).append("&");
+ addQueryParameter("resourceTypeId", StringUtility.toString(resourceTypeIds));
}
if(!isEmpty(operationRequestStatuses)){
@@ -147,16 +158,16 @@ public class ReportExporter {
operationRequestStatusBuffer.append(operationRequestStatus);
operationRequestStatusBuffer.append(",");
}
-
- queryString.append("operationRequestStatus=").append(operationRequestStatusBuffer.toString()).append("&");
+ addQueryParameter("operationRequestStatus", operationRequestStatusBuffer.toString().substring(0,operationRequestStatusBuffer.toString().length() -1));
}
+
if(!isEmpty(alertPriorityFilters)){
StringBuilder alertsPriorityBuffer = new StringBuilder();
for (String alertPriority : alertPriorityFilters) {
alertsPriorityBuffer.append(alertPriority);
alertsPriorityBuffer.append(",");
}
- queryString.append("alertPriority=").append(alertsPriorityBuffer.toString()).append("&");
+ addQueryParameter("alertPriority", alertsPriorityBuffer.toString().substring(0,alertsPriorityBuffer.toString().length() -1));
}
// Drift Related
@@ -165,27 +176,27 @@ public class ReportExporter {
for (String category : driftCategories) {
driftCategoriesBuffer.append(category).append(",");
}
- queryString.append("categories=").append(driftCategoriesBuffer.toString()).append("&");
- }
- if (driftDefinition != null) {
- queryString.append("definition=").append(driftDefinition).append("&");
- }
- if (driftPath != null) {
- queryString.append("path=").append(driftDefinition).append("&");
- }
- if (driftSnapshot != null) {
- queryString.append("snapshot=").append(driftSnapshot).append("&");
+ addQueryParameter("categories", driftCategoriesBuffer.toString());
}
+ addQueryParameter("definition", driftDefinition);
+ addQueryParameter("path", driftPath);
+ addQueryParameter("snapshot", driftSnapshot);
+
// to/from Dates
- if(startDate != null){
- queryString.append("startTime=").append(startDate.getTime()).append("&");
+ addQueryParameter("startTime", startDate);
+ addQueryParameter("endTime", endDate);
+ }
+
+ private void addQueryParameter(String parameterName, String parameterValue){
+ if(parameterValue != null){
+ queryString.append(parameterName).append("=").append(parameterValue).append("&");
}
- if(endDate != null){
- queryString.append("endTime=").append(endDate.getTime()).append("&");
+ }
+ private void addQueryParameter(String parameterName, Date parameterValue){
+ if(parameterValue != null){
+ addQueryParameter(parameterName, String.valueOf(parameterValue.getTime()));
}
-
- return URL.encode(BASE_URL + reportUrl + "." + FORMAT + "?"+queryString);
}
private boolean isEmpty(String[] array) {
@@ -220,9 +231,12 @@ public class ReportExporter {
this.endDate = endDate;
}
+ /**
+ * Using the url built in buildUrl() open the RESTful CSV report in a new window.
+ */
public void export(){
- String reportUrl = determineUrl();
- Log.info("Opening Export CSV report on url: "+reportUrl);
+ String reportUrl = buildUrl();
+ Log.info("Opening Export CSV report on url: " + reportUrl);
Window.open(reportUrl, "download", null);
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/report/alert/SubsystemRecentAlertsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/report/alert/SubsystemRecentAlertsView.java
index b969313..47d64ed 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/report/alert/SubsystemRecentAlertsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/report/alert/SubsystemRecentAlertsView.java
@@ -1,14 +1,10 @@
package org.rhq.enterprise.gui.coregui.client.report.alert;
import com.smartgwt.client.widgets.grid.ListGridRecord;
-import org.rhq.core.domain.alert.AlertPriority;
import org.rhq.enterprise.gui.coregui.client.alert.SubsystemResourceAlertView;
import org.rhq.enterprise.gui.coregui.client.components.ReportExporter;
import org.rhq.enterprise.gui.coregui.client.components.table.TableAction;
-import java.util.ArrayList;
-import java.util.List;
-
public class SubsystemRecentAlertsView extends SubsystemResourceAlertView {
public SubsystemRecentAlertsView(String locatorId, boolean hasWriteAccess) {
@@ -31,19 +27,8 @@ public class SubsystemRecentAlertsView extends SubsystemResourceAlertView {
@Override
public void executeAction(ListGridRecord[] selection, Object actionValue) {
- List<AlertPriority> alertPriorityList = new ArrayList<AlertPriority>(3);
- String[] priorities = priorityFilter.getValues();
- for (String priority : priorities) {
- if(priority.equals(AlertPriority.HIGH.getDisplayName())){
- alertPriorityList.add(AlertPriority.HIGH);
- } else if(priority.equals(AlertPriority.MEDIUM.getDisplayName())){
- alertPriorityList.add(AlertPriority.MEDIUM);
- } else if(priority.equals(AlertPriority.LOW.getDisplayName())){
- alertPriorityList.add(AlertPriority.LOW);
- }
- }
ReportExporter exporter = ReportExporter.createExporterForRecentAlerts(
- "recentAlerts", alertPriorityList.toArray(new String[alertPriorityList.size()]), fromDateFilter.getValueAsDate(), toDateFilter.getValueAsDate());
+ "recentAlerts", priorityFilter.getValues(), fromDateFilter.getValueAsDate(), toDateFilter.getValueAsDate());
exporter.export();
refreshTableInfo();
}
12 years, 1 month
[rhq] 4 commits - modules/plugins
by Simeon Pinder
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java | 4
modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml | 98 ++++++----
2 files changed, 67 insertions(+), 35 deletions(-)
New commits:
commit 04f2ffcbdc9750c7703958ddf22eff15274579ae
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Sun Apr 1 19:28:13 2012 -0400
reorganize modcluster settings into appropriate functionality groups.
diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
index a76c208..74de6b8 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -2145,15 +2145,6 @@ working area for individual server instances</li></ul>"/>
<c:simple-property name="path" readOnly="true" default="subsystem=modcluster"/>
</plugin-configuration>
- <!--<operation name="add" description="Operation adding the modcluster subsystem.">
- <parameters>
- <c:simple-property name="mod-cluster-config" required="false" type="-object-" readOnly="false" description="The common modcluster configuration."/>
- </parameters>
- <results>
- <c:simple-property name="operationResult"/>
- </results>
- </operation>-->
-
<operation name="add-proxy" description="Add the proxy to the list of httpd connected to the node.">
<parameters>
<c:simple-property name="host" required="true" type="string" readOnly="false" description="Hostname of the proxy (Apache httpd)"/>
@@ -2223,12 +2214,6 @@ working area for individual server instances</li></ul>"/>
</results>
</operation>
- <!--<operation name="remove" description="Operation removing the modcluster subsystem.">
- <results>
- <c:simple-property name="operationResult"/>
- </results>
- </operation>-->
-
<operation name="remove-proxy" description="Remove the proxy to the list of httpd connected to the node.">
<parameters>
<c:simple-property name="host" required="true" type="string" readOnly="false" description="Hostname of the proxy (Apache httpd)"/>
@@ -2266,20 +2251,34 @@ working area for individual server instances</li></ul>"/>
</operation>
<resource-configuration>
- <c:simple-property name="advertise-socket" required="false" type="string" readOnly="false" defaultValue="224.0.1.105:23364"
- description="Name of Socket binding to use for the Advertise socket."/>
+
+ <c:group name="proxy" displayName="Proxy Options">
<c:simple-property name="proxy-list" required="false" type="string" readOnly="false" defaultValue="" description="List of proxies, Format (hostname:port) separed with comas."/>
<c:simple-property name="proxy-url" required="false" type="string" readOnly="false" defaultValue="/" description="Base URL for MCMP requests."/>
+ </c:group>
+
+ <c:group name="advertise" displayName="Advertise Options">
+ <c:simple-property name="advertise-socket" required="false" type="string" readOnly="false" defaultValue="224.0.1.105:23364"
+ description="Name of Socket binding to use for the Advertise socket."/>
<c:simple-property name="advertise" required="false" type="boolean" readOnly="false" defaultValue="true" description="Use Advertise logic or not."/>
<c:simple-property name="advertise-security-key" required="false" type="string" readOnly="false" description="String containing the security key for the Advertise logic."/>
+ <c:simple-property name="balancer" required="false" type="string" readOnly="false" defaultValue="mycluster" description="The balancer name."/>
+ <c:simple-property name="domain" required="false" type="string" readOnly="false" description="loadBalancingGroup name."/>
+ </c:group>
+
+ <c:group name="context" displayName="Web Context Options">
<c:simple-property name="excluded-contexts" required="false" type="string" readOnly="false" defaultValue="ROOT,admin-console,invoker,jbossws,jmx-console,juddi,web-console"
description="List of contexts mod_cluster should ignore, Format String separed with comas."/>
<c:simple-property name="auto-enable-contexts" required="false" type="boolean" readOnly="false" defaultValue="true" description="Enable contexts even if disabled in mod_cluster_manger (httpd)."/>
- <c:simple-property name="stop-context-timeout" required="false" type="integer" readOnly="false" defaultValue="10" description="Max time to wait for context to process pending requests."/>
- <c:simple-property name="socket-timeout" required="false" type="integer" readOnly="false" defaultValue="20" description="Timeout to wait for httpd to answer a MCMP message."/>
+ </c:group>
+
+ <c:group name="session" displayName="Session Options">
<c:simple-property name="sticky-session" required="false" type="boolean" readOnly="false" defaultValue="true" description="Use sticky sessions for requests."/>
<c:simple-property name="sticky-session-remove" required="false" type="boolean" readOnly="false" defaultValue="false" description="Remove session information on failover."/>
<c:simple-property name="sticky-session-force" required="false" type="boolean" readOnly="false" defaultValue="false" description="Don't failover a request with session information."/>
+ </c:group>
+
+ <c:group name="network" displayName="Network Options">
<c:simple-property name="worker-timeout" required="false" type="integer" readOnly="false" defaultValue="-1" description="Timeout to wait in httpd for an available worker to process the requests."/>
<c:simple-property name="max-attemps" required="false" type="integer" readOnly="false" defaultValue="1" description="Max attempts to process an idempotent request."/>
<c:simple-property name="flush-packets" required="false" type="boolean" readOnly="false" defaultValue="false" description="Enables/disables packet flushing in httpd."/>
@@ -2288,8 +2287,10 @@ working area for individual server instances</li></ul>"/>
<c:simple-property name="smax" required="false" type="integer" readOnly="false" description="Soft maximum idle connection count in httpd"/>
<c:simple-property name="ttl" required="false" type="integer" readOnly="false" defaultValue="60" description="Time to live (in seconds) for idle connections above smax"/>
<c:simple-property name="node-timeout" required="false" type="integer" readOnly="false" defaultValue="-1" description="Timeout (in seconds) for proxy connections to a node."/>
- <c:simple-property name="balancer" required="false" type="string" readOnly="false" defaultValue="mycluster" description="The balancer name."/>
- <c:simple-property name="domain" required="false" type="string" readOnly="false" description="loadBalancingGroup name."/>
+ <c:simple-property name="stop-context-timeout" required="false" type="integer" readOnly="false" defaultValue="10" description="Max time to wait for context to process pending requests."/>
+ <c:simple-property name="socket-timeout" required="false" type="integer" readOnly="false" defaultValue="20" description="Timeout to wait for httpd to answer a MCMP message."/>
+
+ </c:group>
</resource-configuration>
</server>
commit 8c1e346f2b305f0129e7368a582a216250dc5163
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Sun Apr 1 19:05:46 2012 -0400
Adding more webservice node handlers, but Handler descriptor component not discovered. More work here.
diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
index 6351a55..a76c208 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -2082,25 +2082,50 @@ working area for individual server instances</li></ul>"/>
<c:simple-property name="path" readOnly="true" default="endpoint-config"/>
</plugin-configuration>
-<!--
- <metric property="average-processing-time" description="Average endpoint processing time." displayType="summary" units="milliseconds"/>
- <metric property="min-processing-time" description="Minimal endpoint processing time." units="milliseconds"/>
- <metric property="max-processing-time" description="Maximal endpoint processing time." units="milliseconds"/>
- <metric property="total-processing-time" description="Total endpoint processing time." measurementType="trendsup" units="milliseconds"/>
- <metric property="request-count" description="Count of requests the endpoint processed." displayType="summary" measurementType="trendsup"/>
- <metric property="response-count" description="Count of responses the endpoint generated." measurementType="trendsup"/>
- <metric property="fault-count" description="Count of faults the endpoint generated." displayType="summary" measurementType="trendsup"/>
--->
+ <service name="Post Handler Chain"
+ discovery="SubsystemDiscovery"
+ class="BaseComponent"
+ >
+ <plugin-configuration>
+ <c:simple-property name="path" readOnly="true" default="post-handler-chain"/>
+ </plugin-configuration>
<resource-configuration>
- <!-- spinder 3/29/11: Commenting as not in the 7.1.1.Final object model.
- <c:simple-property name="name" required="true" type="string" readOnly="true" description="Webservice endpoint name."/>
- <c:simple-property name="context" required="true" type="string" readOnly="true" description="Webservice endpoint context."/>
- <c:simple-property name="class" required="false" type="string" readOnly="true" description="Webservice endpoint class."/>
- <c:simple-property name="type" required="false" type="string" readOnly="true" description="Webservice endpoint type."/>
- <c:simple-property name="wsdl-url" required="false" type="string" readOnly="true" description="Webservice endpoint WSDL URL."/>
--->
+ <c:simple-property name="protocol-bindings" required="false" type="string" readOnly="false" description="Protocol binding"/>
</resource-configuration>
+ </service>
+
+ <service name="Pre Handler Chain"
+ discovery="SubsystemDiscovery"
+ class="BaseComponent"
+ >
+ <plugin-configuration>
+ <c:simple-property name="path" readOnly="true" default="pre-handler-chain"/>
+ </plugin-configuration>
+ <resource-configuration>
+ <c:simple-property name="protocol-bindings" required="false" type="string" readOnly="false" description="Protocol binding"/>
+ </resource-configuration>
+ </service>
+<!--
+ <service name="Handler"
+ discovery="SubsystemDiscovery"
+ class="BaseComponent"
+ singleton="true"
+ >
+
+ <runs-inside>
+ <parent-resource-type name="Pre Handler Chain" plugin="jboss-as-7"/>
+ <parent-resource-type name="Post Handler Chain" plugin="jboss-as-7"/>
+ </runs-inside>
+
+ <plugin-configuration>
+ <c:simple-property name="path" readOnly="true" default="handler"/>
+ </plugin-configuration>
+ <resource-configuration>
+ <c:simple-property name="class" required="true" type="string" readOnly="false" description="Handler class"/>
+ </resource-configuration>
+ </service>-->
+
</service>
</server>
commit 57fb7a959fd80de221d12ff65957f2b8a2aa7170
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Sun Apr 1 15:07:56 2012 -0400
Remove attributes no longer a part of enpoint model.
diff --git a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
index 19b992d..6351a55 100644
--- a/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/jboss-as-7/src/main/resources/META-INF/rhq-plugin.xml
@@ -2092,11 +2092,13 @@ working area for individual server instances</li></ul>"/>
<metric property="fault-count" description="Count of faults the endpoint generated." displayType="summary" measurementType="trendsup"/>
-->
<resource-configuration>
+ <!-- spinder 3/29/11: Commenting as not in the 7.1.1.Final object model.
<c:simple-property name="name" required="true" type="string" readOnly="true" description="Webservice endpoint name."/>
<c:simple-property name="context" required="true" type="string" readOnly="true" description="Webservice endpoint context."/>
<c:simple-property name="class" required="false" type="string" readOnly="true" description="Webservice endpoint class."/>
<c:simple-property name="type" required="false" type="string" readOnly="true" description="Webservice endpoint type."/>
<c:simple-property name="wsdl-url" required="false" type="string" readOnly="true" description="Webservice endpoint WSDL URL."/>
+-->
</resource-configuration>
</service>
commit e973020c9784a8a88ff90ebfd979026c33ae450c
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Sat Mar 31 20:16:26 2012 -0400
Add note about how pluginExceptions is a valid deviation from normal JSON details exceptions usually
generated by the ASConnection class.
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
index c024db7..995ebb9 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
@@ -259,6 +259,10 @@ public class ASConnection {
try {
responseCodeString = conn.getResponseCode() + " (" + conn.getResponseMessage() + ")";
+ //spinder 3/31/12 NOTE: This means that when the Mgmt user has not been configured you will
+ // NOT get the usual json details with failure-descriptions. Most of the time this is ok as it will
+ // likely be a customer who does not have the right configuration and needs to know why without digging
+ // through agent logs.
// Process response code to generate plugin configuration exception and/or logging
int responseCode = conn.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_UNAUTHORIZED) {
12 years, 1 month
[rhq] Branch 'feature/export-reports' - modules/enterprise
by mike thompson
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/ReportExporter.java | 32 ++++------
1 file changed, 14 insertions(+), 18 deletions(-)
New commits:
commit 45e75041915a2a4e6f0da3ba35da1fde466c6b8d
Author: Mike Thompson <mithomps(a)redhat.com>
Date: Sun Apr 1 11:38:49 2012 -0700
[BZ 800453] Export Csv Reports. Fix url params. Logging of export report urls.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/ReportExporter.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/ReportExporter.java
index 2eddf11..eb7297c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/ReportExporter.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/ReportExporter.java
@@ -23,6 +23,7 @@ package org.rhq.enterprise.gui.coregui.client.components;
import com.google.gwt.core.client.GWT;
import com.google.gwt.http.client.URL;
import com.google.gwt.user.client.Window;
+import org.rhq.enterprise.gui.coregui.client.util.Log;
import org.rhq.enterprise.gui.coregui.client.util.StringUtility;
import java.util.Date;
@@ -87,12 +88,6 @@ public class ReportExporter {
return new ReportExporter(reportUrl);
}
- public static ReportExporter createStandardExporter(String reportUrl, Date fromDate, Date toDate) {
- ReportExporter newExporter = new ReportExporter(reportUrl);
- newExporter.setStartDate(fromDate);
- newExporter.setEndDate(toDate);
- return newExporter;
- }
public static ReportExporter createExporterForRecentDrift(String reportUrl, String definition,
String snapshot, String[] driftCategories, String path,
@@ -141,9 +136,9 @@ public class ReportExporter {
StringBuilder queryString = new StringBuilder();
if (showAllDetail) {
- queryString.append("showAllDetails=").append("true");
+ queryString.append("showAllDetails=").append("true").append("&");
} else if (null != resourceTypeIds && !resourceTypeIds.isEmpty()) {
- queryString.append("resourceTypeId=").append(StringUtility.toString(resourceTypeIds));
+ queryString.append("resourceTypeId=").append(StringUtility.toString(resourceTypeIds)).append("&");
}
if(!isEmpty(operationRequestStatuses)){
@@ -153,7 +148,7 @@ public class ReportExporter {
operationRequestStatusBuffer.append(",");
}
- queryString.append("operationRequestStatus=").append(operationRequestStatusBuffer.toString());
+ queryString.append("operationRequestStatus=").append(operationRequestStatusBuffer.toString()).append("&");
}
if(!isEmpty(alertPriorityFilters)){
StringBuilder alertsPriorityBuffer = new StringBuilder();
@@ -161,7 +156,7 @@ public class ReportExporter {
alertsPriorityBuffer.append(alertPriority);
alertsPriorityBuffer.append(",");
}
- queryString.append("alertPriority=").append(alertsPriorityBuffer.toString());
+ queryString.append("alertPriority=").append(alertsPriorityBuffer.toString()).append("&");
}
// Drift Related
@@ -170,27 +165,26 @@ public class ReportExporter {
for (String category : driftCategories) {
driftCategoriesBuffer.append(category).append(",");
}
- queryString.append("categories=").append(driftCategoriesBuffer.toString());
+ queryString.append("categories=").append(driftCategoriesBuffer.toString()).append("&");
}
if (driftDefinition != null) {
- queryString.append("definition=").append(driftDefinition);
+ queryString.append("definition=").append(driftDefinition).append("&");
}
if (driftPath != null) {
- queryString.append("path=").append(driftDefinition);
+ queryString.append("path=").append(driftDefinition).append("&");
}
if (driftSnapshot != null) {
- queryString.append("snapshot=").append(driftSnapshot);
+ queryString.append("snapshot=").append(driftSnapshot).append("&");
}
// to/from Dates
if(startDate != null){
- queryString.append("startTime=").append(startDate.getTime());
+ queryString.append("startTime=").append(startDate.getTime()).append("&");
}
if(endDate != null){
- queryString.append("endTime=").append(endDate.getTime());
+ queryString.append("endTime=").append(endDate.getTime()).append("&");
}
-
return URL.encode(BASE_URL + reportUrl + "." + FORMAT + "?"+queryString);
}
@@ -227,7 +221,9 @@ public class ReportExporter {
}
public void export(){
- Window.open(determineUrl(), "download", null);
+ String reportUrl = determineUrl();
+ Log.info("Opening Export CSV report on url: "+reportUrl);
+ Window.open(reportUrl, "download", null);
}
12 years, 1 month