[rhq] Branch 'release/jon3.2.x' - modules/enterprise
by Jiri Kremser
modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/bundle/list/BundleView.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 2bce44ff9f27dc58b74bd7ad679b541a2fbd2a30
Author: Jirka Kremser <jkremser(a)redhat.com>
Date: Thu Dec 5 15:17:43 2013 +0100
[BZ 1038600] - Back To All Bundles button is not working in Japanese locale - changing getTitle() -> getName(), because it is passed to URL and there are issues with some "non-ASCII" characters.
(cherry picked from commit 5afc589c2b35566bd8c5713f236f501960f0f493)
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/bundle/list/BundleView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/bundle/list/BundleView.java
index 1765d46..ee63bbf 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/bundle/list/BundleView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/bundle/list/BundleView.java
@@ -104,7 +104,7 @@ public class BundleView extends EnhancedVLayout implements BookmarkableView {
this.bundle = bundle;
- BackButton backButton = new BackButton(MSG.view_bundle_list_backToAll(), BundleTopView.VIEW_ID.getTitle());
+ BackButton backButton = new BackButton(MSG.view_bundle_list_backToAll(), BundleTopView.VIEW_ID.getName());
headerLabel = new HeaderLabel(IconEnum.BUNDLE.getIcon24x24Path(), StringUtility.escapeHtml(bundle.getName()));
tabs = new TabSet();
versionsTab = createVersionsTab();
10 years, 5 months
[rhq] Branch 'release/jon3.2.x' - modules/enterprise
by Jay Shaughnessy
modules/enterprise/agent/src/etc/java-service-wrapper/rhq-agent-wrapper.conf | 4 ++--
modules/enterprise/agent/src/etc/rhq-agent-wrapper.bat | 4 +++-
2 files changed, 5 insertions(+), 3 deletions(-)
New commits:
commit d19fd2306f60991e839566934c7fbbcf4f692226
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Thu Dec 5 09:39:49 2013 -0500
[1038256] Windows 2008 - Invalid agent service after upgrade (on remote agent machine)
This problem resulted from the work in Bug 1016609, when we introduced
the use of RHQ_JAVA_EXE_FILE_PATH and deprecated the use of
RHQ_AGENT_JAVA_EXE_FILE_PATH (among several simplifications of our
env properties). The issue with that change was the fact that existing
windows agent services (remote agents, not handled by rhqctl) included
set.RHQ_AGENT_JAVA_EXE_FILE_PATH in the service "path to executable", for
use by the service wrapper. But the new rhq-agent-wrapper.conf expected
RHQ_JAVA_EXE_FILE_PATH to be set when formulating its command string.
This was only an issue for existing agents that would be auto-upgraded. Agent
auto-upgrade does not update the existing service, it only restarts it after
the agent update. So, the "path to executable" remains unchanged and therefore
passes only the legacy property. Note that auto-upgrade does the right thing,
it should *not* replace the service in order to update its definition. Doing
this could lose the RUN_AS password, which may have been set interactively
when the agent was initially installed.
The solution should be good, the rhq-agent-wrapper.conf has been reverted to
use RHQ_AGENT_JAVA_EXE_FILE_PATH. We still completely support the
new RHQ env properties, like RHQ_JAVA_EXE_FILE_PATH, but will supply
the legacy property at service install time. That gives up backward
compatibility while keeping the use of RHQ_AGENT_JAVA_EXE_FILE_PATH
internal.
Cherry-Pick Master: 719e2c127f24f7467ecc3a371d9797f6598880c0
diff --git a/modules/enterprise/agent/src/etc/java-service-wrapper/rhq-agent-wrapper.conf b/modules/enterprise/agent/src/etc/java-service-wrapper/rhq-agent-wrapper.conf
index 3f3712e..a510ea9 100644
--- a/modules/enterprise/agent/src/etc/java-service-wrapper/rhq-agent-wrapper.conf
+++ b/modules/enterprise/agent/src/etc/java-service-wrapper/rhq-agent-wrapper.conf
@@ -33,7 +33,7 @@
# set.RHQ_AGENT_PASSWORD - the password of the user that is to
# run the service. Only used if
# RHQ_AGENT_PASSWORD_PROMPT is FALSE.
-# set.RHQ_JAVA_EXE_FILE_PATH - Java executable
+# set.RHQ_AGENT_JAVA_EXE_FILE_PATH - Java executable
#*****************************************************************************
# Load in the specific environment for the RHQ agent instance to start
@@ -43,7 +43,7 @@
# Start Properties
#*****************************************************************************
# Java JVM Executable (quotes not needed)
-wrapper.java.command=%RHQ_JAVA_EXE_FILE_PATH%
+wrapper.java.command=%RHQ_AGENT_JAVA_EXE_FILE_PATH%
# Java Main class. This class must implement the WrapperListener interface. (quotes not needed)
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
diff --git a/modules/enterprise/agent/src/etc/rhq-agent-wrapper.bat b/modules/enterprise/agent/src/etc/rhq-agent-wrapper.bat
index 90e9666..657f701 100644
--- a/modules/enterprise/agent/src/etc/rhq-agent-wrapper.bat
+++ b/modules/enterprise/agent/src/etc/rhq-agent-wrapper.bat
@@ -146,7 +146,9 @@ if /i "%1"=="install" (
if not defined RHQ_AGENT_PASSWORD_PROMPT set RHQ_AGENT_PASSWORD_PROMPT=true
)
- "%RHQ_AGENT_WRAPPER_EXE_FILE_PATH%" -i "%RHQ_AGENT_WRAPPER_CONF_FILE_PATH%" "set.RHQ_AGENT_HOME=%RHQ_AGENT_HOME%" "set.RHQ_AGENT_INSTANCE_NAME=%RHQ_AGENT_INSTANCE_NAME%" "set.RHQ_JAVA_EXE_FILE_PATH=%RHQ_JAVA_EXE_FILE_PATH%" "set.RHQ_AGENT_OS_PLATFORM=%RHQ_AGENT_OS_PLATFORM%" "set.RHQ_AGENT_WRAPPER_LOG_DIR_PATH=%RHQ_AGENT_WRAPPER_LOG_DIR_PATH%" !_WRAPPER_NTSERVICE_ACCOUNT! %_DEBUG_OPTS%
+ rem note that we set RHQ_AGENT_JAVA_EXE_FILE_PATH on purpose. The services use this legacy env var, as opposed to
+ rem RHQ_JAVA_EXE_FILE_PATH, to be backward compatible with existing services that get auto-upgraded.
+ "%RHQ_AGENT_WRAPPER_EXE_FILE_PATH%" -i "%RHQ_AGENT_WRAPPER_CONF_FILE_PATH%" "set.RHQ_AGENT_HOME=%RHQ_AGENT_HOME%" "set.RHQ_AGENT_INSTANCE_NAME=%RHQ_AGENT_INSTANCE_NAME%" "set.RHQ_AGENT_JAVA_EXE_FILE_PATH=%RHQ_JAVA_EXE_FILE_PATH%" "set.RHQ_AGENT_OS_PLATFORM=%RHQ_AGENT_OS_PLATFORM%" "set.RHQ_AGENT_WRAPPER_LOG_DIR_PATH=%RHQ_AGENT_WRAPPER_LOG_DIR_PATH%" !_WRAPPER_NTSERVICE_ACCOUNT! %_DEBUG_OPTS%
if ERRORLEVEL 1 goto error
goto done
)
10 years, 5 months
[rhq] 2 commits - modules/core modules/enterprise
by Jay Shaughnessy
modules/core/domain/src/main/java/org/rhq/core/domain/measurement/Availability.java | 10 +
modules/enterprise/agent/src/etc/java-service-wrapper/rhq-agent-wrapper.conf | 4
modules/enterprise/agent/src/etc/rhq-agent-wrapper.bat | 4
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/AvailabilityManagerBean.java | 51 +++++++---
4 files changed, 53 insertions(+), 16 deletions(-)
New commits:
commit 719e2c127f24f7467ecc3a371d9797f6598880c0
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Thu Dec 5 09:34:19 2013 -0500
[1038256] Windows 2008 - Invalid agent service after upgrade (on remote agent machine)
This problem resulted from the work in Bug 1016609, when we introduced
the use of RHQ_JAVA_EXE_FILE_PATH and deprecated the use of
RHQ_AGENT_JAVA_EXE_FILE_PATH (among several simplifications of our
env properties). The issue with that change was the fact that existing
windows agent services (remote agents, not handled by rhqctl) included
set.RHQ_AGENT_JAVA_EXE_FILE_PATH in the service "path to executable", for
use by the service wrapper. But the new rhq-agent-wrapper.conf expected
RHQ_JAVA_EXE_FILE_PATH to be set when formulating its command string.
This was only an issue for existing agents that would be auto-upgraded. Agent
auto-upgrade does not update the existing service, it only restarts it after
the agent update. So, the "path to executable" remains unchanged and therefore
passes only the legacy property. Note that auto-upgrade does the right thing,
it should *not* replace the service in order to update its definition. Doing
this could lose the RUN_AS password, which may have been set interactively
when the agent was initially installed.
The solution should be good, the rhq-agent-wrapper.conf has been reverted to
use RHQ_AGENT_JAVA_EXE_FILE_PATH. We still completely support the
new RHQ env properties, like RHQ_JAVA_EXE_FILE_PATH, but will supply
the legacy property at service install time. That gives up backward
compatibility while keeping the use of RHQ_AGENT_JAVA_EXE_FILE_PATH
internal.
diff --git a/modules/enterprise/agent/src/etc/java-service-wrapper/rhq-agent-wrapper.conf b/modules/enterprise/agent/src/etc/java-service-wrapper/rhq-agent-wrapper.conf
index 3f3712e..a510ea9 100644
--- a/modules/enterprise/agent/src/etc/java-service-wrapper/rhq-agent-wrapper.conf
+++ b/modules/enterprise/agent/src/etc/java-service-wrapper/rhq-agent-wrapper.conf
@@ -33,7 +33,7 @@
# set.RHQ_AGENT_PASSWORD - the password of the user that is to
# run the service. Only used if
# RHQ_AGENT_PASSWORD_PROMPT is FALSE.
-# set.RHQ_JAVA_EXE_FILE_PATH - Java executable
+# set.RHQ_AGENT_JAVA_EXE_FILE_PATH - Java executable
#*****************************************************************************
# Load in the specific environment for the RHQ agent instance to start
@@ -43,7 +43,7 @@
# Start Properties
#*****************************************************************************
# Java JVM Executable (quotes not needed)
-wrapper.java.command=%RHQ_JAVA_EXE_FILE_PATH%
+wrapper.java.command=%RHQ_AGENT_JAVA_EXE_FILE_PATH%
# Java Main class. This class must implement the WrapperListener interface. (quotes not needed)
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
diff --git a/modules/enterprise/agent/src/etc/rhq-agent-wrapper.bat b/modules/enterprise/agent/src/etc/rhq-agent-wrapper.bat
index 90e9666..657f701 100644
--- a/modules/enterprise/agent/src/etc/rhq-agent-wrapper.bat
+++ b/modules/enterprise/agent/src/etc/rhq-agent-wrapper.bat
@@ -146,7 +146,9 @@ if /i "%1"=="install" (
if not defined RHQ_AGENT_PASSWORD_PROMPT set RHQ_AGENT_PASSWORD_PROMPT=true
)
- "%RHQ_AGENT_WRAPPER_EXE_FILE_PATH%" -i "%RHQ_AGENT_WRAPPER_CONF_FILE_PATH%" "set.RHQ_AGENT_HOME=%RHQ_AGENT_HOME%" "set.RHQ_AGENT_INSTANCE_NAME=%RHQ_AGENT_INSTANCE_NAME%" "set.RHQ_JAVA_EXE_FILE_PATH=%RHQ_JAVA_EXE_FILE_PATH%" "set.RHQ_AGENT_OS_PLATFORM=%RHQ_AGENT_OS_PLATFORM%" "set.RHQ_AGENT_WRAPPER_LOG_DIR_PATH=%RHQ_AGENT_WRAPPER_LOG_DIR_PATH%" !_WRAPPER_NTSERVICE_ACCOUNT! %_DEBUG_OPTS%
+ rem note that we set RHQ_AGENT_JAVA_EXE_FILE_PATH on purpose. The services use this legacy env var, as opposed to
+ rem RHQ_JAVA_EXE_FILE_PATH, to be backward compatible with existing services that get auto-upgraded.
+ "%RHQ_AGENT_WRAPPER_EXE_FILE_PATH%" -i "%RHQ_AGENT_WRAPPER_CONF_FILE_PATH%" "set.RHQ_AGENT_HOME=%RHQ_AGENT_HOME%" "set.RHQ_AGENT_INSTANCE_NAME=%RHQ_AGENT_INSTANCE_NAME%" "set.RHQ_AGENT_JAVA_EXE_FILE_PATH=%RHQ_JAVA_EXE_FILE_PATH%" "set.RHQ_AGENT_OS_PLATFORM=%RHQ_AGENT_OS_PLATFORM%" "set.RHQ_AGENT_WRAPPER_LOG_DIR_PATH=%RHQ_AGENT_WRAPPER_LOG_DIR_PATH%" !_WRAPPER_NTSERVICE_ACCOUNT! %_DEBUG_OPTS%
if ERRORLEVEL 1 goto error
goto done
)
commit 544dc80ce4c22e399d3ca607108896feb6ebd5b6
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Wed Dec 4 13:36:49 2013 -0500
[1037616] Pull calls to find current availability out of the processing loop
Optimization work based on BZ-supplied patch. For a batch of Availabilities
being processed, pull latest availabilities for the resources in one DB
round trip as opposed to once for each resource. Still beiong careful to
repair issues when no, or multiple, latest entries are found.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/Availability.java b/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/Availability.java
index 2297af9..a44a2ff 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/Availability.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/measurement/Availability.java
@@ -64,6 +64,11 @@ import org.rhq.core.domain.resource.Resource;
+ " WHERE av.resource.id = :resourceId " //
+ " AND av.endTime IS NULL " //
+ "ORDER BY av.startTime ASC "), // this order by is on purpose - for handling NonUniqueResultException problems
+ @NamedQuery(name = Availability.FIND_LATEST_BY_RESOURCE_IDS, query = "" //
+ + " SELECT av " //
+ + " FROM Availability av " //
+ + " WHERE av.resource.id IN :resourceIds " //
+ + " AND av.endTime IS NULL "), //
@NamedQuery(name = Availability.FIND_BY_RESOURCE, query = "" //
+ " SELECT av " //
+ " FROM Availability av " //
@@ -88,7 +93,7 @@ import org.rhq.core.domain.resource.Resource;
+ "SELECT new org.rhq.core.domain.resource.composite.ResourceIdWithAvailabilityComposite(av.resource.id, av) " //
+ " FROM Availability av " //
+ " WHERE av.resource.agent.id = :agentId " //
- + " AND av.resource.parentResource IS NOT NULL " //
+ + " AND av.resource.parentResource IS NOT NULL " //
+ " AND ((av.availabilityType <> :availabilityType AND av.availabilityType <> :disabled AND :availabilityType IS NOT NULL) " //
+ " OR (av.availabilityType IS NOT NULL AND :availabilityType IS NULL) " //
+ " OR (av.availabilityType IS NULL AND :availabilityType IS NOT NULL)) " //
@@ -139,6 +144,7 @@ public class Availability implements Serializable {
private static final long serialVersionUID = 1L;
public static final String FIND_CURRENT_BY_RESOURCE = "Availability.findCurrentByResource";
+ public static final String FIND_LATEST_BY_RESOURCE_IDS = "Availability.findLatestByResourceIds";
public static final String FIND_BY_RESOURCE = "Availability.findByResource";
public static final String FIND_BY_RESOURCE_NO_SORT = "Availability.findByResourceNoSort";
public static final String FIND_PLATFORM_COMPOSITE_BY_AGENT_AND_NONMATCHING_TYPE = "Availability.findPlatformCompositeByAgentAndNonmatchingType";
@@ -199,7 +205,7 @@ public class Availability implements Serializable {
*
* @param resource
* @param startTime if null set to current time
- * @param type if null this will be set to UNKNOWN
+ * @param type if null this will be set to UNKNOWN
*/
public Availability(Resource resource, Long startTime, AvailabilityType type) {
if (resource == null) {
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/AvailabilityManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/AvailabilityManagerBean.java
index 76fe117..e54b167 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/AvailabilityManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/AvailabilityManagerBean.java
@@ -25,6 +25,7 @@ import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
import javax.ejb.EJB;
import javax.ejb.Stateless;
@@ -93,13 +94,15 @@ public class AvailabilityManagerBean implements AvailabilityManagerLocal, Availa
static {
+ // The value of 200 has been settled upon after testing several batch sizes. If changed it still must be less
+ // than 1000 for Oracle IN clause limitation reasons.
int mergeBatchSize = 200;
try {
mergeBatchSize = Integer.parseInt(System.getProperty("rhq.server.availability.merge.batch.size", "200"));
} catch (Throwable t) {
//
}
- MERGE_BATCH_SIZE = mergeBatchSize;
+ MERGE_BATCH_SIZE = (mergeBatchSize > 999) ? 999 : mergeBatchSize;
}
@PersistenceContext(unitName = RHQConstants.PERSISTENCE_UNIT_NAME)
@@ -811,8 +814,28 @@ public class AvailabilityManagerBean implements AvailabilityManagerLocal, Availa
// We will alert only on the avails for enabled resources. Keep track of any that are disabled.
List<Availability> disabledAvailabilities = new ArrayList<Availability>();
- Query q = entityManager.createNamedQuery(Availability.FIND_CURRENT_BY_RESOURCE);
- int count = 0;
+
+ Query q = entityManager.createNamedQuery(Availability.FIND_LATEST_BY_RESOURCE_IDS);
+ List<Integer> resourceIds = new ArrayList<Integer>(availabilities.size());
+ for (Availability reported : availabilities) {
+ resourceIds.add(reported.getResource().getId());
+ }
+ q.setParameter("resourceIds", resourceIds);
+ List<Availability> latestAvailabilitiesList = q.getResultList();
+ resourceIds.clear(); // perhaps helps GC
+
+ // populate Map of resourceIds to latestAvailability
+ // there should be a single latest avail per resource. mark any situation where we have multiple
+ Object nonUniqueMarker = new Object();
+ Map<Integer, Object> latestAvailabilities = new HashMap(availabilities.size() + 100);
+ for (Availability latestAvailability : latestAvailabilitiesList) {
+ Integer resourceId = latestAvailability.getResource().getId();
+ if (latestAvailabilities.containsKey(resourceId)) {
+ latestAvailabilities.put(resourceId, nonUniqueMarker);
+ } else {
+ latestAvailabilities.put(resourceId, latestAvailability);
+ }
+ }
for (Availability reported : availabilities) {
@@ -820,13 +843,12 @@ public class AvailabilityManagerBean implements AvailabilityManagerLocal, Availa
reported.setEndTime(null);
// get the latest avail for the reported resource
- q.setParameter("resourceId", reported.getResource().getId());
+ //q.setParameter("resourceId", reported.getResource().getId());
+ Integer resourceId = reported.getResource().getId();
+ Object latestObject = latestAvailabilities.get(resourceId);
Availability latest = null;
- try {
- latest = (Availability) q.getSingleResult();
-
- } catch (NoResultException nre) {
+ if (null == latestObject) { // this is like NoResultException
// This should not happen unless the Resource in the report is stale, which can happen in certain
// sync scenarios. A Resource is given its initial Availability/ResourceAvailability when it is
// persisted so it is guaranteed to have Availability, so, the Resource must not exist. At least
@@ -873,7 +895,7 @@ public class AvailabilityManagerBean implements AvailabilityManagerLocal, Availa
continue;
}
}
- } catch (NonUniqueResultException nure) {
+ } else if (latestObject == nonUniqueMarker) { // this is like NonUniqueResultException
// This condition should never happen. In my world of la-la land, I've done everything
// correctly so this never happens. But, due to the asynchronous nature of things,
// I have to believe that this still might happen (albeit rarely). If it does happen,
@@ -881,10 +903,13 @@ public class AvailabilityManagerBean implements AvailabilityManagerLocal, Availa
// has 2 or more availabilities with endTime of null, we need to delete all but the
// latest one (the one whose start time is the latest). This should correct the
// problem and allow us to continue processing availability reports for that resource
- log.warn("Resource [" + reported.getResource() + "] has multiple availabilities without an endtime ["
- + nure.getMessage() + "] - will attempt to remove the extra ones\n" + mergeInfo.toString(false));
+ log.warn("Resource [" + reported.getResource()
+ + "] has multiple availabilities without an endtime - will attempt to remove the extra ones\n"
+ + mergeInfo.toString(false));
try {
+ q = entityManager.createNamedQuery(Availability.FIND_CURRENT_BY_RESOURCE);
+ q.setParameter("resourceId", resourceId);
List<Availability> latestList = q.getResultList();
@@ -906,6 +931,8 @@ public class AvailabilityManagerBean implements AvailabilityManagerLocal, Availa
+ "]", t);
continue;
}
+ } else {
+ latest = (Availability) latestObject;
}
AvailabilityType latestType = latest.getAvailabilityType();
@@ -953,6 +980,8 @@ public class AvailabilityManagerBean implements AvailabilityManagerLocal, Availa
}
}
+ latestAvailabilities.clear(); // perhaps helps GC
+
// notify alert condition cache manager for all reported avails for for enabled resources
availabilities.removeAll(disabledAvailabilities);
notifyAlertConditionCacheManager("mergeAvailabilityReport",
10 years, 5 months
[rhq] modules/enterprise
by Jiri Kremser
modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/bundle/list/BundleView.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 5afc589c2b35566bd8c5713f236f501960f0f493
Author: Jirka Kremser <jkremser(a)redhat.com>
Date: Thu Dec 5 15:17:43 2013 +0100
[BZ 1038600] - Back To All Bundles button is not working in Japanese locale - changing getTitle() -> getName(), because it is passed to URL and there are issues with some "non-ASCII" characters.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/bundle/list/BundleView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/bundle/list/BundleView.java
index 1765d46..ee63bbf 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/bundle/list/BundleView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/bundle/list/BundleView.java
@@ -104,7 +104,7 @@ public class BundleView extends EnhancedVLayout implements BookmarkableView {
this.bundle = bundle;
- BackButton backButton = new BackButton(MSG.view_bundle_list_backToAll(), BundleTopView.VIEW_ID.getTitle());
+ BackButton backButton = new BackButton(MSG.view_bundle_list_backToAll(), BundleTopView.VIEW_ID.getName());
headerLabel = new HeaderLabel(IconEnum.BUNDLE.getIcon24x24Path(), StringUtility.escapeHtml(bundle.getName()));
tabs = new TabSet();
versionsTab = createVersionsTab();
10 years, 5 months
[rhq] modules/enterprise
by mike thompson
modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/AbstractMetricGraph.java | 12
modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/MetricGraphData.java | 157 ++-
modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/graphtype/StackedBarMetricGraphImpl.java | 22
modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/CoreGUI.gwt.xml | 2
modules/enterprise/gui/coregui/src/main/webapp/CoreGUI-4.10.0.css | 405 ++++++++++
modules/enterprise/gui/coregui/src/main/webapp/CoreGUI-4.9.0.css | 405 ----------
modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html | 4
modules/enterprise/gui/coregui/src/main/webapp/css/charts-4.10.0.css | 252 ++++++
modules/enterprise/gui/coregui/src/main/webapp/css/charts-4.9.0.css | 252 ------
modules/enterprise/gui/coregui/src/main/webapp/js/rhq-4.10.0.js | 189 ++++
modules/enterprise/gui/coregui/src/main/webapp/js/rhq-4.9.0.js | 183 ----
11 files changed, 974 insertions(+), 909 deletions(-)
New commits:
commit ec67bac995a335960f2d5d4a39070bc5d408f08b
Author: Mike Thompson <mithomps(a)redhat.com>
Date: Wed Dec 4 19:45:05 2013 -0800
[BZ 1035443] Chart legend not matching the same significant digits as summary metric portlet.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/AbstractMetricGraph.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/AbstractMetricGraph.java
index cc9e637..fbfe940 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/AbstractMetricGraph.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/AbstractMetricGraph.java
@@ -207,6 +207,18 @@ public abstract class AbstractMetricGraph extends VLayout implements HasD3Metric
return metricGraphData.isHideLegend();
}
+ public String getChartAverage(){
+ return metricGraphData.getChartAverage();
+ }
+
+ public String getChartMin(){
+ return metricGraphData.getChartMin();
+ }
+
+ public String getChartMax(){
+ return metricGraphData.getChartMax();
+ }
+
public void setGraphListView(AbstractD3GraphListView graphListView) {
this.graphListView = graphListView;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/MetricGraphData.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/MetricGraphData.java
index da90c55..878006e 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/MetricGraphData.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/MetricGraphData.java
@@ -30,6 +30,7 @@ import org.rhq.core.domain.util.PageList;
import org.rhq.coregui.client.CoreGUI;
import org.rhq.coregui.client.JsonMetricProducer;
import org.rhq.coregui.client.Messages;
+import org.rhq.coregui.client.inventory.common.detail.summary.AbstractActivityView;
import org.rhq.coregui.client.inventory.common.graph.graphtype.StackedBarMetricGraphImpl;
import org.rhq.coregui.client.util.Log;
import org.rhq.coregui.client.util.MeasurementConverterClient;
@@ -74,49 +75,70 @@ public class MetricGraphData implements JsonMetricProducer {
private Integer chartHeight;
private boolean isPortalGraph;
private boolean hideLegend;
-
+ private double average = 0.0;
+ private double min = Double.MAX_VALUE;
+ private double max = Double.MIN_VALUE;
private MetricGraphData(int portalId) {
isPortalGraph = true;
this.portalId = portalId;
}
- public static MetricGraphData createForDashboard(int portalId){
+ public static MetricGraphData createForDashboard(int portalId) {
return new MetricGraphData(portalId);
}
-
private MetricGraphData(int entityId, String entityName, MeasurementDefinition def,
- List<MeasurementDataNumericHighLowComposite> metricData ) {
+ List<MeasurementDataNumericHighLowComposite> metricData) {
this.entityName = entityName;
setEntityId(entityId);
setDefinitionId(def.getId());
this.definition = def;
this.metricData = metricData;
this.isPortalGraph = false;
+
+ calcMinMaxAvg(metricData);
}
public static MetricGraphData createForResourceGroup(int groupId, String groupName, MeasurementDefinition def,
- List<MeasurementDataNumericHighLowComposite> metricData ){
- return new MetricGraphData(groupId,groupName,def, metricData );
+ List<MeasurementDataNumericHighLowComposite> metricData) {
+ return new MetricGraphData(groupId, groupName, def, metricData);
}
private MetricGraphData(int entityId, String entityName, MeasurementDefinition measurementDef,
- List<MeasurementDataNumericHighLowComposite> metrics,
- PageList<MeasurementOOBComposite> measurementOOBCompositeList ) {
+ List<MeasurementDataNumericHighLowComposite> metricData,
+ PageList<MeasurementOOBComposite> measurementOOBCompositeList) {
this.entityName = entityName;
setEntityId(entityId);
setDefinitionId(measurementDef.getId());
this.definition = measurementDef;
- this.metricData = metrics;
+ this.metricData = metricData;
this.measurementOOBCompositeList = measurementOOBCompositeList;
this.isPortalGraph = false;
+ calcMinMaxAvg(metricData);
}
- public static MetricGraphData createForResource(int resourceId, String resourceName, MeasurementDefinition measurementDef,
- List<MeasurementDataNumericHighLowComposite> metrics,
- PageList<MeasurementOOBComposite> measurementOOBCompositeList ){
- return new MetricGraphData(resourceId, resourceName,measurementDef, metrics, measurementOOBCompositeList);
+ public static MetricGraphData createForResource(int resourceId, String resourceName,
+ MeasurementDefinition measurementDef, List<MeasurementDataNumericHighLowComposite> metrics,
+ PageList<MeasurementOOBComposite> measurementOOBCompositeList) {
+ return new MetricGraphData(resourceId, resourceName, measurementDef, metrics, measurementOOBCompositeList);
+ }
+
+ private void calcMinMaxAvg(List<MeasurementDataNumericHighLowComposite> metricData) {
+ int averageCount = 0;
+ for (MeasurementDataNumericHighLowComposite measurement : metricData) {
+ if (!Double.isNaN(measurement.getLowValue())) {
+ min = Math.min(min, measurement.getLowValue());
+ }
+ if (!Double.isNaN(measurement.getHighValue())) {
+ max = Math.max(max, measurement.getHighValue());
+ }
+ if (!Double.isNaN(measurement.getValue())) {
+ average = average + measurement.getValue();
+ averageCount++;
+ }
+ }
+ average = average / averageCount;
}
public int getEntityId() {
@@ -128,7 +150,6 @@ public class MetricGraphData implements JsonMetricProducer {
//this.definition = null;
}
-
public void setEntityName(String entityName) {
this.entityName = entityName;
//this.definition = null;
@@ -152,24 +173,22 @@ public class MetricGraphData implements JsonMetricProducer {
}
public String getChartId() {
- if(isPortalGraph){
- if(definition != null){
+ if (isPortalGraph) {
+ if (definition != null) {
return entityId + "-" + definition.getId();
- }else {
+ } else {
// case when portlet has not been configured yet
return "";
}
- }else {
+ } else {
return entityId + "-" + definitionId;
}
}
-
public void setMetricData(List<MeasurementDataNumericHighLowComposite> metricData) {
this.metricData = metricData;
}
-
public String getChartTitleMinLabel() {
return chartTitleMinLabel;
}
@@ -182,6 +201,30 @@ public class MetricGraphData implements JsonMetricProducer {
return chartTitlePeakLabel;
}
+ public String getChartAverage() {
+ if(average != 0.0){
+ return AbstractActivityView.convertLastValueForDisplay(average, definition);
+ }else {
+ return "";
+ }
+ }
+
+ public String getChartMax() {
+ if(max != Double.MIN_VALUE){
+ return AbstractActivityView.convertLastValueForDisplay(max, definition);
+ }else {
+ return "";
+ }
+ }
+
+ public String getChartMin() {
+ if(min != Double.MAX_VALUE){
+ return AbstractActivityView.convertLastValueForDisplay(min, definition);
+ }else {
+ return "";
+ }
+ }
+
public String getChartDateLabel() {
return chartDateLabel;
}
@@ -201,6 +244,7 @@ public class MetricGraphData implements JsonMetricProducer {
public String getChartNoDataLabel() {
return chartNoDataLabel;
}
+
public String getChartSingleValueLabel() {
return chartSingleValueLabel;
}
@@ -260,9 +304,10 @@ public class MetricGraphData implements JsonMetricProducer {
public String getChartTitle() {
- if(definition != null){
- return (entityName == null) ? definition.getDisplayName() : entityName + " - "+definition.getDisplayName();
- }else {
+ if (definition != null) {
+ return (entityName == null) ? definition.getDisplayName() : entityName + " - "
+ + definition.getDisplayName();
+ } else {
// handle case when dashboard portlet has not been configured yet.
return "";
@@ -323,28 +368,29 @@ public class MetricGraphData implements JsonMetricProducer {
sb.append(" \"baselineMax\":" + lastOOB.getBlMax() + ", ");
}
- if (!Double.isNaN(measurement.getValue())) {
-
- MeasurementNumericValueAndUnits newHigh = normalizeUnitsAndValues(measurement.getHighValue(),
- definition.getUnits());
- MeasurementNumericValueAndUnits newLow = normalizeUnitsAndValues(measurement.getLowValue(),
- definition.getUnits());
- MeasurementNumericValueAndUnits newAvg = normalizeUnitsAndValues(measurement.getValue(),
- definition.getUnits());
- if (!gotAdjustedMeasurementUnits) {
- adjustedMeasurementUnits = newAvg.getUnits();
- gotAdjustedMeasurementUnits = true;
- }
- sb.append(" \"barDuration\": \"" + barDurationString + "\", ");
- sb.append(" \"high\":" + cleanseHigh(newLow.getValue(), newAvg.getValue(),newHigh.getValue()) + ",");
- sb.append(" \"low\":" + cleanseLow(newLow.getValue(), newAvg.getValue(), newHigh.getValue()) + ",");
- sb.append(" \"y\":" + newAvg.getValue() + "},");
- } else {
- // give it some values so that we dont have NaN
- sb.append(" \"high\":0,");
- sb.append(" \"low\":0,");
- sb.append(" \"y\":0,");
- sb.append(" \"nodata\":true },");
+ if (!Double.isNaN(measurement.getValue())) {
+
+ MeasurementNumericValueAndUnits newHigh = normalizeUnitsAndValues(measurement.getHighValue(),
+ definition.getUnits());
+ MeasurementNumericValueAndUnits newLow = normalizeUnitsAndValues(measurement.getLowValue(),
+ definition.getUnits());
+ MeasurementNumericValueAndUnits newAvg = normalizeUnitsAndValues(measurement.getValue(),
+ definition.getUnits());
+ if (!gotAdjustedMeasurementUnits) {
+ adjustedMeasurementUnits = newAvg.getUnits();
+ gotAdjustedMeasurementUnits = true;
+ }
+ sb.append(" \"barDuration\": \"" + barDurationString + "\", ");
+ sb.append(" \"high\":" + cleanseHigh(newLow.getValue(), newAvg.getValue(), newHigh.getValue())
+ + ",");
+ sb.append(" \"low\":" + cleanseLow(newLow.getValue(), newAvg.getValue(), newHigh.getValue()) + ",");
+ sb.append(" \"y\":" + newAvg.getValue() + "},");
+ } else {
+ // give it some values so that we dont have NaN
+ sb.append(" \"high\":0,");
+ sb.append(" \"low\":0,");
+ sb.append(" \"y\":0,");
+ sb.append(" \"nodata\":true },");
}
if (!sb.toString().endsWith("},")) {
sb.append(" },");
@@ -353,7 +399,7 @@ public class MetricGraphData implements JsonMetricProducer {
sb.setLength(sb.length() - 1); // delete the last ','
sb.append("]");
}
- Log.debug("Json data for: "+getChartTitle());
+ Log.debug("Json data for: " + getChartTitle());
Log.debug(sb.toString());
return sb.toString();
}
@@ -368,12 +414,12 @@ public class MetricGraphData implements JsonMetricProducer {
* @param high supposed high value
* @return the real high value
*/
- private Double cleanseHigh(Double low, Double avg, Double high){
- double highLowMax = Math.max(low, high);
+ private Double cleanseHigh(Double low, Double avg, Double high) {
+ double highLowMax = Math.max(low, high);
return Math.max(highLowMax, avg);
}
- private Double cleanseLow(Double low, Double avg, Double high){
+ private Double cleanseLow(Double low, Double avg, Double high) {
double highLowMin = Math.min(low, high);
return Math.min(highLowMin, avg);
}
@@ -391,12 +437,14 @@ public class MetricGraphData implements JsonMetricProducer {
public boolean showBarAvgTrendLine() {
int numberOfAggBars = 0;
for (MeasurementDataNumericHighLowComposite measurement : metricData) {
- boolean noValuesInCurrentBarUndefined = (!Double.isNaN(measurement.getValue()) && !Double.isNaN(measurement.getHighValue()) && !Double.isNaN(measurement.getLowValue()));
- boolean foundAggregateBar = (measurement.getValue() != measurement.getHighValue() || measurement.getHighValue() != measurement.getLowValue());
+ boolean noValuesInCurrentBarUndefined = (!Double.isNaN(measurement.getValue())
+ && !Double.isNaN(measurement.getHighValue()) && !Double.isNaN(measurement.getLowValue()));
+ boolean foundAggregateBar = (measurement.getValue() != measurement.getHighValue() || measurement
+ .getHighValue() != measurement.getLowValue());
// if there exists a even one aggregate bar then I can short circuit this and exit
- if (noValuesInCurrentBarUndefined && foundAggregateBar){
+ if (noValuesInCurrentBarUndefined && foundAggregateBar) {
numberOfAggBars++;
- if(numberOfAggBars > 4){
+ if (numberOfAggBars > 4) {
return true;
}
}
@@ -422,7 +470,6 @@ public class MetricGraphData implements JsonMetricProducer {
}
}
-
private MeasurementNumericValueAndUnits normalizeUnitsAndValues(double value, MeasurementUnits measurementUnits) {
MeasurementNumericValueAndUnits newValue = MeasurementConverterClient.fit(value, measurementUnits);
MeasurementNumericValueAndUnits returnValue;
@@ -437,7 +484,6 @@ public class MetricGraphData implements JsonMetricProducer {
return returnValue;
}
-
@Override
public String toString() {
final StringBuilder sb = new StringBuilder();
@@ -464,5 +510,4 @@ public class MetricGraphData implements JsonMetricProducer {
return sb.toString();
}
-
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/graphtype/StackedBarMetricGraphImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/graphtype/StackedBarMetricGraphImpl.java
index e3d5574..33e3d97 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/graphtype/StackedBarMetricGraphImpl.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/graphtype/StackedBarMetricGraphImpl.java
@@ -72,7 +72,10 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph {
global.@org.rhq.coregui.client.inventory.common.graph.AbstractMetricGraph::getChartSingleValueLabel()(),
global.@org.rhq.coregui.client.inventory.common.graph.AbstractMetricGraph::getXAxisTimeFormatHours()(),
global.@org.rhq.coregui.client.inventory.common.graph.AbstractMetricGraph::getXAxisTimeFormatHoursMinutes()(),
- global.@org.rhq.coregui.client.inventory.common.graph.AbstractMetricGraph::isHideLegend()()
+ global.@org.rhq.coregui.client.inventory.common.graph.AbstractMetricGraph::isHideLegend()(),
+ global.@org.rhq.coregui.client.inventory.common.graph.AbstractMetricGraph::getChartAverage()(),
+ global.@org.rhq.coregui.client.inventory.common.graph.AbstractMetricGraph::getChartMin()(),
+ global.@org.rhq.coregui.client.inventory.common.graph.AbstractMetricGraph::getChartMax()()
);
@@ -216,21 +219,20 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph {
.attr("height", height + margin.top - titleHeight - titleSpace + margin.bottom)
.attr("transform", "translate(" + margin.left + "," + (+titleHeight + titleSpace + margin.top) + ")");
- legendUnDefined = (typeof min === 'undefined') || (typeof avg === 'undefined') || (typeof peak === 'undefined');
- if (!(chartContext.hideLegend && !useSmallCharts())) {
- createMinAvgPeakSidePanel(chartContext.minChartTitle, min, chartContext.avgChartTitle, avg, chartContext.peakChartTitle, peak, chartContext.yAxisUnits);
+ legendUnDefined = (chartContext.chartAverage === "");
+ if ((!chartContext.hideLegend && !useSmallCharts() && !legendUnDefined )) {
+ createMinAvgPeakSidePanel(chartContext.minChartTitle, chartContext.chartMin, chartContext.avgChartTitle, chartContext.chartAverage, chartContext.peakChartTitle, chartContext.chartMax, chartContext.yAxisUnits);
}
}
}
- function createMinAvgPeakSidePanel(minLabel, minValue, avgLabel, avgValue, highLabel, highValue, uom) {
+ function createMinAvgPeakSidePanel(minLabel, minValue, avgLabel, avgValue, highLabel, highValue ) {
var xLabel = 772,
xValue = 820,
yBase = 100,
- yInc = 25,
- decimalPlaces = 0;
+ yInc = 25;
// title/header
chart.append("g").append("rect")
@@ -256,7 +258,7 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph {
.attr("class", "highText")
.attr("x", xValue)
.attr("y", yBase)
- .text(highValue.toFixed(decimalPlaces) + " " + uom);
+ .text(highValue);
}
@@ -272,7 +274,7 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph {
.attr("class", "avgText")
.attr("x", xValue)
.attr("y", yBase + yInc)
- .text(avgValue.toFixed(decimalPlaces) + " " + uom);
+ .text(avgValue);
}
// min
@@ -287,7 +289,7 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph {
.attr("class", "minText")
.attr("x", xValue)
.attr("y", yBase + 2 * yInc)
- .text(minValue.toFixed(decimalPlaces) + " " + uom);
+ .text(minValue);
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/CoreGUI.gwt.xml b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/CoreGUI.gwt.xml
index a5cbb9c..21eb46b 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/CoreGUI.gwt.xml
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/CoreGUI.gwt.xml
@@ -51,7 +51,7 @@
</generate-with>
<script src="/coregui/js/moment-2.0.0.min.js"/>
- <script src="/coregui/js/rhq-4.9.0.js"/>
+ <script src="/coregui/js/rhq-4.10.0.js"/>
<!-- External javascript libraries -->
<!-- jquery.sparkline requires jquery.
-->
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI-4.10.0.css b/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI-4.10.0.css
new file mode 100644
index 0000000..888da4c
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI-4.10.0.css
@@ -0,0 +1,405 @@
+body {
+ color: #010101;
+}
+
+body, p, td, th, option, input, textarea, select {
+ font-family: tahoma, verdana, sans-serif !important;
+ font-size: 11px !important;
+}
+
+img {
+ border-style: none;
+}
+
+hr {
+ background-color: #AAAAAA;
+ border: 0 none;
+ color: #AAAAAA;
+ height: 1px;
+ margin-left: 0;
+ margin-right: 0;
+ text-align: center;
+ width: 100%;
+}
+
+a, a:link, a:visited, a:hover {
+ color: #4A5D75 !important;
+ font-weight: bold !important;
+}
+
+a, a:link, a:visited {
+ text-decoration: none !important;
+}
+
+a:hover {
+ text-decoration: underline !important;
+}
+
+a.menuBar, a.menuBar:link, a.menuBar:visited, a.menuBar:hover {
+ color: inherit !important;
+}
+
+
+.backLink {
+ color: #4A5D75;
+ font-weight: bold;
+ text-decoration: none;
+}
+
+
+.HeaderLabel {
+ height: 35px;
+ font-size: 11pt;
+ font-weight: bold;
+ color: #444444;
+}
+
+
+.OddRow {
+ background-color: #ffffff;
+ border-right: 1px solid rgb(217, 224, 227);
+ border-bottom: 1px solid rgb(230, 234, 239);
+}
+
+.OddRowDisabled {
+ background-color: #ffffff;
+ border-right: 1px solid rgb(217, 224, 227);
+ border-bottom: 1px solid rgb(230, 234, 239);
+}
+
+.EvenRow {
+ background-color: rgb(246, 246, 246);
+ border-right: 1px solid rgb(217, 224, 227);
+ border-bottom: 1px solid rgb(230, 234, 239);
+}
+
+.EvenRowDisabled {
+ background-color: rgb(246, 246, 246);
+ border-right: 1px solid rgb(217, 224, 227);
+ border-bottom: 1px solid rgb(230, 234, 239);
+}
+
+.inheritColor {
+ color: inherit !important;
+}
+
+.TopSectionLink, .TopSectionLinkSelected {
+ font-size: 12px !important;
+}
+
+.TopSectionLink {
+ color: #4A5D75 !important;
+}
+
+.TopSectionLinkSelected {
+ color: white !important;
+}
+
+.TopSectionLinkDiv {
+}
+
+.TopSectionLinkDivSelected {
+ background-image: url('images/header/header_bg_selected.png');
+}
+
+.BreadCrumb {
+ font-size: 10pt;
+ font-weight: bold;
+ text-decoration: none;
+ color: #363636;
+ height: 28px;
+}
+
+.SectionHeader {
+ font-size: 16pt;
+ font-weight: bold;
+}
+
+.textItemDisabled {
+ background: rgb(214, 213, 217);
+}
+
+.formTitle, .formTitleFocused {
+ font-weight: bold;
+}
+
+.subtitle {
+ color: #D6D6D6;
+ font-variant: small-caps;
+ font-weight: bold;
+ font-size: 12pt;
+}
+
+
+/* Availability Bar */
+.availBarLeftCap {
+ background-image: url("images/availBar/leftCap.png");
+ width: 8px;
+ height: 28px;
+}
+.availBarRightCap {
+ background-image: url("images/availBar/rightCap.png");
+ width: 8px;
+ height: 28px;
+}
+
+.availBarUp {
+ background-image: url("images/availBar/up.png");
+ background-repeat: repeat-x;
+ height: 28px;
+}
+
+.availBarDown {
+ background: url("images/availBar/down.png") repeat-x;
+ height: 28px;
+}
+
+
+
+.GraphTooltip {
+ background-color:#B5D5FF;
+ font-weight:bold;
+ padding:5px;
+}
+
+
+/* About Modal Window */
+.DisplayContent,.DisplayLabel {
+ font-size: 11px;
+}
+
+.DisplayLabel {
+ font-weight: bold;
+}
+
+.DisplaySubhead {
+ font-weight: bolder;
+ font-size: 16px;
+ color: #DE652D;
+}
+
+
+.SubTabButton,
+.SubTabButtonOver,
+.SubTabButtonFocused,
+.SubTabButtonFocusedOver,
+.SubTabButtonDown,
+.SubTabButtonFocusedDown,
+.SubTabButtonSelected,
+.SubTabButtonSelectedFocused,
+.SubTabButtonSelectedDown,
+.SubTabButtonSelectedFocusedDown,
+.SubTabButtonSelectedOver,
+.SubTabButtonSelectedFocusedOver,
+.SubTabButtonDisabled,
+.SubTabButtonSelectedDisabled {
+ font-family: tahoma, verdona, sans-serif;
+ font-size: 11px;
+ padding: 2px;
+ }
+
+.SubTabButtonDisabled {
+
+}
+
+.SubTabButtonDisabled,
+.SubTabButtonSelectedDisabled {
+ font-weight: normal;
+ color: #AAAAAA;
+}
+
+.SubTabButtonFocused,
+.SubTabButtonFocusedOver,
+.SubTabButtonSelectedFocused,
+.SubTabButtonSelectedFocusedOver,
+.SubTabButtonSelectedFocusedDown {
+
+}
+
+.SubTabButtonOver,
+.SubTabButtonFocusedOver,
+.SubTabButtonSelectedFocused,
+.SubTabButtonSelectedFocusedOver {
+ font-weight: bold;
+}
+
+.SubTabButtonDown,
+.SubTabButtonFocusedDown,
+.SubTabButtonSelectedDown,
+.SubTabButtonSelectedFocusedDown {
+ font-weight: bold;
+ font-size: 12px;
+}
+
+.SubTabButtonSelected,
+.SubTabButtonSelectedFocused,
+.SubTabButtonSelectedOver,
+.SubTabButtonSelectedFocusedOver,
+.SubTabButtonSelectedDisabled {
+ font-weight: bold;
+}
+
+
+
+.SimpleButton,
+.SimpleButtonOver,
+.SimpleButtonFocused,
+.SimpleButtonFocusedOver,
+.SimpleButtonDown,
+.SimpleButtonFocusedDown,
+.SimpleButtonSelected,
+.SimpleButtonSelectedFocused,
+.SimpleButtonSelectedDown,
+.SimpleButtonSelectedFocusedDown,
+.SimpleButtonSelectedOver,
+.SimpleButtonSelectedFocusedOver,
+.SimpleButtonDisabled,
+.SimpleButtonSelectedDisabled,
+.SimpleButtonDisabled,
+.SimpleButtonDisabled,
+.SimpleButtonSelectedDisabled,
+.SimpleButtonFocused,
+.SimpleButtonFocusedOver,
+.SimpleButtonSelectedFocused,
+.SimpleButtonSelectedFocusedOver,
+.SimpleButtonSelectedFocusedDown ,
+.SimpleButtonOver,
+.SimpleButtonFocusedOver,
+.SimpleButtonSelectedFocused,
+.SimpleButtonSelectedFocusedOver ,
+.SimpleButtonDown,
+.SimpleButtonFocusedDown,
+.SimpleButtonSelectedDown,
+.SimpleButtonSelectedFocusedDown ,
+.SimpleButtonSelected,
+.SimpleButtonSelectedFocused,
+.SimpleButtonSelectedOver,
+.SimpleButtonSelectedFocusedOver,
+.SimpleButtonSelectedDisabled{
+ font-family: tahoma, verdana, sans-serif;
+ font-size: 11px;
+ padding: 2px;
+ font-weight: bold;
+}
+
+
+.topMenuBar {
+ background: url('/coregui/org.rhq.coregui.CoreGUI/sc/skins/Enterprise/images/cssButton/button_stretch.png') repeat-x scroll 0 0 #DDDDDD;
+}
+
+.menuButton, .menuButtonOver, .menuButtonDown, .menuButtonDisabled, .menuButtonSelected, .menuButtonSelectedDown, .menuButtonSelectedOver, .menuButtonSelectedDisabled {
+ border: none !important;
+ font-weight: bold !important;
+}
+
+
+
+/** Not used right now **/
+.gwtMenuBar {
+ background: url('images/header/header_bg.png') repeat-x;
+ /*background-image: url("http://localhost:7080/coregui/org.rhq.coregui.CoreGUI/sc/skins/Enterprise...");*/
+ padding: 0px;
+ -moz-box-sizing: border-box;
+ overflow: hidden;
+ cursor: auto;
+}
+
+.gwtMenu, .gwt-MenuBarPopup, .gwt-MenuPopup {
+ background-color: white;
+}
+
+.gwt-MenuItem {
+ padding: 0 10px;
+ font-weight: bold;
+ color: #666666;
+ font-size: 9pt;
+}
+
+.gwt-MenuItemSeparator {
+ background-color: #666666;
+}
+
+.gwt-MenuItem-Selected {
+ background-color: #999999;
+}
+
+.selectedTag {
+ background-color: lightblue;
+ padding: 5px;
+ border: 1px solid darkblue;
+}
+
+
+/* This sets table mouse-over highlights to have an alpha component on browsers that support it.
+ It particularly helps with tables that have bar charts as a background component.
+ (e.g. problem metrics or call time)
+*/
+.tallCellOver, .tallCellOverDark {
+ background-color: rgb(230,230,230) !important; /* for browsers that don't like alpha */
+ background-color: rgba(230,230,230,0.6) !important;
+}
+
+.editableText {
+ color: #070;
+}
+
+.InfoBlock,.ConfirmationBlock,.WarnBlock,.ErrorBlock,.FatalBlock {
+ border: 1px solid;
+ color: #000000;
+}
+
+.InfoBlock,.ConfirmationBlock {
+ background-color: #BFF1B5; /* light green */
+ border-color: #00AC3D; /* medium green */
+}
+
+.WarnBlock {
+ background-color: #FFFD99; /* light yellow */
+ border-color: #FF9C15; /* medium orange */
+}
+
+.ErrorBlock {
+ background-color: #FF9999; /* light red */
+ border-color: #EE4444; /* medium red */
+}
+
+.FatalBlock {
+ background-color: #FF6666; /* slightly darker light red */
+ border-color: #EE1111; /* slightly darker medium red */
+}
+
+.InlineNote {
+ color: #C22;
+}
+
+.InlineInfo {
+ color: #00AC3D; /* medium green */
+}
+
+.InlineError {
+ color: #EE4444; /* medium red */
+}
+
+.log-panel {
+ z-index: 9999999 !important;
+}
+
+.requiredFieldMarker {
+ font-weight: bolder;
+ color: #B77 /* medium red */
+}
+
+.configurationEditorHeaderCell {
+ border: 1px solid;
+ background-color: #EEE; /* light gray */
+ font-weight: bolder;
+}
+
+.menuButton, .menuButtonOver, .menuButtonDown, .menuButtonDisabled, .menuButtonSelected, .menuButtonSelectedDown, .menuButtonSelectedOver, .menuButtonSelectedDisabled {
+ border: none;
+ font-weight: bold;
+}
+
+.noOutline {
+ outline:0;
+}
\ No newline at end of file
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI-4.9.0.css b/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI-4.9.0.css
deleted file mode 100644
index 888da4c..0000000
--- a/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI-4.9.0.css
+++ /dev/null
@@ -1,405 +0,0 @@
-body {
- color: #010101;
-}
-
-body, p, td, th, option, input, textarea, select {
- font-family: tahoma, verdana, sans-serif !important;
- font-size: 11px !important;
-}
-
-img {
- border-style: none;
-}
-
-hr {
- background-color: #AAAAAA;
- border: 0 none;
- color: #AAAAAA;
- height: 1px;
- margin-left: 0;
- margin-right: 0;
- text-align: center;
- width: 100%;
-}
-
-a, a:link, a:visited, a:hover {
- color: #4A5D75 !important;
- font-weight: bold !important;
-}
-
-a, a:link, a:visited {
- text-decoration: none !important;
-}
-
-a:hover {
- text-decoration: underline !important;
-}
-
-a.menuBar, a.menuBar:link, a.menuBar:visited, a.menuBar:hover {
- color: inherit !important;
-}
-
-
-.backLink {
- color: #4A5D75;
- font-weight: bold;
- text-decoration: none;
-}
-
-
-.HeaderLabel {
- height: 35px;
- font-size: 11pt;
- font-weight: bold;
- color: #444444;
-}
-
-
-.OddRow {
- background-color: #ffffff;
- border-right: 1px solid rgb(217, 224, 227);
- border-bottom: 1px solid rgb(230, 234, 239);
-}
-
-.OddRowDisabled {
- background-color: #ffffff;
- border-right: 1px solid rgb(217, 224, 227);
- border-bottom: 1px solid rgb(230, 234, 239);
-}
-
-.EvenRow {
- background-color: rgb(246, 246, 246);
- border-right: 1px solid rgb(217, 224, 227);
- border-bottom: 1px solid rgb(230, 234, 239);
-}
-
-.EvenRowDisabled {
- background-color: rgb(246, 246, 246);
- border-right: 1px solid rgb(217, 224, 227);
- border-bottom: 1px solid rgb(230, 234, 239);
-}
-
-.inheritColor {
- color: inherit !important;
-}
-
-.TopSectionLink, .TopSectionLinkSelected {
- font-size: 12px !important;
-}
-
-.TopSectionLink {
- color: #4A5D75 !important;
-}
-
-.TopSectionLinkSelected {
- color: white !important;
-}
-
-.TopSectionLinkDiv {
-}
-
-.TopSectionLinkDivSelected {
- background-image: url('images/header/header_bg_selected.png');
-}
-
-.BreadCrumb {
- font-size: 10pt;
- font-weight: bold;
- text-decoration: none;
- color: #363636;
- height: 28px;
-}
-
-.SectionHeader {
- font-size: 16pt;
- font-weight: bold;
-}
-
-.textItemDisabled {
- background: rgb(214, 213, 217);
-}
-
-.formTitle, .formTitleFocused {
- font-weight: bold;
-}
-
-.subtitle {
- color: #D6D6D6;
- font-variant: small-caps;
- font-weight: bold;
- font-size: 12pt;
-}
-
-
-/* Availability Bar */
-.availBarLeftCap {
- background-image: url("images/availBar/leftCap.png");
- width: 8px;
- height: 28px;
-}
-.availBarRightCap {
- background-image: url("images/availBar/rightCap.png");
- width: 8px;
- height: 28px;
-}
-
-.availBarUp {
- background-image: url("images/availBar/up.png");
- background-repeat: repeat-x;
- height: 28px;
-}
-
-.availBarDown {
- background: url("images/availBar/down.png") repeat-x;
- height: 28px;
-}
-
-
-
-.GraphTooltip {
- background-color:#B5D5FF;
- font-weight:bold;
- padding:5px;
-}
-
-
-/* About Modal Window */
-.DisplayContent,.DisplayLabel {
- font-size: 11px;
-}
-
-.DisplayLabel {
- font-weight: bold;
-}
-
-.DisplaySubhead {
- font-weight: bolder;
- font-size: 16px;
- color: #DE652D;
-}
-
-
-.SubTabButton,
-.SubTabButtonOver,
-.SubTabButtonFocused,
-.SubTabButtonFocusedOver,
-.SubTabButtonDown,
-.SubTabButtonFocusedDown,
-.SubTabButtonSelected,
-.SubTabButtonSelectedFocused,
-.SubTabButtonSelectedDown,
-.SubTabButtonSelectedFocusedDown,
-.SubTabButtonSelectedOver,
-.SubTabButtonSelectedFocusedOver,
-.SubTabButtonDisabled,
-.SubTabButtonSelectedDisabled {
- font-family: tahoma, verdona, sans-serif;
- font-size: 11px;
- padding: 2px;
- }
-
-.SubTabButtonDisabled {
-
-}
-
-.SubTabButtonDisabled,
-.SubTabButtonSelectedDisabled {
- font-weight: normal;
- color: #AAAAAA;
-}
-
-.SubTabButtonFocused,
-.SubTabButtonFocusedOver,
-.SubTabButtonSelectedFocused,
-.SubTabButtonSelectedFocusedOver,
-.SubTabButtonSelectedFocusedDown {
-
-}
-
-.SubTabButtonOver,
-.SubTabButtonFocusedOver,
-.SubTabButtonSelectedFocused,
-.SubTabButtonSelectedFocusedOver {
- font-weight: bold;
-}
-
-.SubTabButtonDown,
-.SubTabButtonFocusedDown,
-.SubTabButtonSelectedDown,
-.SubTabButtonSelectedFocusedDown {
- font-weight: bold;
- font-size: 12px;
-}
-
-.SubTabButtonSelected,
-.SubTabButtonSelectedFocused,
-.SubTabButtonSelectedOver,
-.SubTabButtonSelectedFocusedOver,
-.SubTabButtonSelectedDisabled {
- font-weight: bold;
-}
-
-
-
-.SimpleButton,
-.SimpleButtonOver,
-.SimpleButtonFocused,
-.SimpleButtonFocusedOver,
-.SimpleButtonDown,
-.SimpleButtonFocusedDown,
-.SimpleButtonSelected,
-.SimpleButtonSelectedFocused,
-.SimpleButtonSelectedDown,
-.SimpleButtonSelectedFocusedDown,
-.SimpleButtonSelectedOver,
-.SimpleButtonSelectedFocusedOver,
-.SimpleButtonDisabled,
-.SimpleButtonSelectedDisabled,
-.SimpleButtonDisabled,
-.SimpleButtonDisabled,
-.SimpleButtonSelectedDisabled,
-.SimpleButtonFocused,
-.SimpleButtonFocusedOver,
-.SimpleButtonSelectedFocused,
-.SimpleButtonSelectedFocusedOver,
-.SimpleButtonSelectedFocusedDown ,
-.SimpleButtonOver,
-.SimpleButtonFocusedOver,
-.SimpleButtonSelectedFocused,
-.SimpleButtonSelectedFocusedOver ,
-.SimpleButtonDown,
-.SimpleButtonFocusedDown,
-.SimpleButtonSelectedDown,
-.SimpleButtonSelectedFocusedDown ,
-.SimpleButtonSelected,
-.SimpleButtonSelectedFocused,
-.SimpleButtonSelectedOver,
-.SimpleButtonSelectedFocusedOver,
-.SimpleButtonSelectedDisabled{
- font-family: tahoma, verdana, sans-serif;
- font-size: 11px;
- padding: 2px;
- font-weight: bold;
-}
-
-
-.topMenuBar {
- background: url('/coregui/org.rhq.coregui.CoreGUI/sc/skins/Enterprise/images/cssButton/button_stretch.png') repeat-x scroll 0 0 #DDDDDD;
-}
-
-.menuButton, .menuButtonOver, .menuButtonDown, .menuButtonDisabled, .menuButtonSelected, .menuButtonSelectedDown, .menuButtonSelectedOver, .menuButtonSelectedDisabled {
- border: none !important;
- font-weight: bold !important;
-}
-
-
-
-/** Not used right now **/
-.gwtMenuBar {
- background: url('images/header/header_bg.png') repeat-x;
- /*background-image: url("http://localhost:7080/coregui/org.rhq.coregui.CoreGUI/sc/skins/Enterprise...");*/
- padding: 0px;
- -moz-box-sizing: border-box;
- overflow: hidden;
- cursor: auto;
-}
-
-.gwtMenu, .gwt-MenuBarPopup, .gwt-MenuPopup {
- background-color: white;
-}
-
-.gwt-MenuItem {
- padding: 0 10px;
- font-weight: bold;
- color: #666666;
- font-size: 9pt;
-}
-
-.gwt-MenuItemSeparator {
- background-color: #666666;
-}
-
-.gwt-MenuItem-Selected {
- background-color: #999999;
-}
-
-.selectedTag {
- background-color: lightblue;
- padding: 5px;
- border: 1px solid darkblue;
-}
-
-
-/* This sets table mouse-over highlights to have an alpha component on browsers that support it.
- It particularly helps with tables that have bar charts as a background component.
- (e.g. problem metrics or call time)
-*/
-.tallCellOver, .tallCellOverDark {
- background-color: rgb(230,230,230) !important; /* for browsers that don't like alpha */
- background-color: rgba(230,230,230,0.6) !important;
-}
-
-.editableText {
- color: #070;
-}
-
-.InfoBlock,.ConfirmationBlock,.WarnBlock,.ErrorBlock,.FatalBlock {
- border: 1px solid;
- color: #000000;
-}
-
-.InfoBlock,.ConfirmationBlock {
- background-color: #BFF1B5; /* light green */
- border-color: #00AC3D; /* medium green */
-}
-
-.WarnBlock {
- background-color: #FFFD99; /* light yellow */
- border-color: #FF9C15; /* medium orange */
-}
-
-.ErrorBlock {
- background-color: #FF9999; /* light red */
- border-color: #EE4444; /* medium red */
-}
-
-.FatalBlock {
- background-color: #FF6666; /* slightly darker light red */
- border-color: #EE1111; /* slightly darker medium red */
-}
-
-.InlineNote {
- color: #C22;
-}
-
-.InlineInfo {
- color: #00AC3D; /* medium green */
-}
-
-.InlineError {
- color: #EE4444; /* medium red */
-}
-
-.log-panel {
- z-index: 9999999 !important;
-}
-
-.requiredFieldMarker {
- font-weight: bolder;
- color: #B77 /* medium red */
-}
-
-.configurationEditorHeaderCell {
- border: 1px solid;
- background-color: #EEE; /* light gray */
- font-weight: bolder;
-}
-
-.menuButton, .menuButtonOver, .menuButtonDown, .menuButtonDisabled, .menuButtonSelected, .menuButtonSelectedDown, .menuButtonSelectedOver, .menuButtonSelectedDisabled {
- border: none;
- font-weight: bold;
-}
-
-.noOutline {
- outline:0;
-}
\ No newline at end of file
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html b/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html
index f56517f..6a1bbdd 100644
--- a/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html
+++ b/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html
@@ -10,9 +10,9 @@
<!-- support internationalized characters -->
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
- <link rel="stylesheet" href="CoreGUI-4.9.0.css">
+ <link rel="stylesheet" href="CoreGUI-4.10.0.css">
<!-- for d3 charting -->
- <link rel="stylesheet" href="css/charts-4.9.0.css">
+ <link rel="stylesheet" href="css/charts-4.10.0.css">
<script type="text/javascript">
var search = location.search;
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/css/charts-4.10.0.css b/modules/enterprise/gui/coregui/src/main/webapp/css/charts-4.10.0.css
new file mode 100644
index 0000000..6f8df38
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/webapp/css/charts-4.10.0.css
@@ -0,0 +1,252 @@
+/***
+ * CSS for the d3 SVG charts. This is SVG css not HTML css so some elements
+ * may look different from standard CSS.
+ * NOTE: the SVG <defs> section that contains gradients etc. is in the
+ * java class : /org/rhq/coregui/client/inventory/common/ResourceMetricD3Graph.java
+ *
+ */
+
+svg {
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ /* Trying to get SVG to act like a greedy block in all browsers */
+ display: block;
+ width:100%;
+ height:100%;
+}
+
+
+
+.axis path, .axis line {
+ fill: none;
+ stroke: #000;
+ shape-rendering: crispEdges;
+}
+
+/* Horizontal gridlines */
+
+.grid .tick {
+ stroke: #f7f7f7;
+}
+
+.y.axis .tick.minor {
+ stroke: #a7a7ac;
+}
+
+.x.axis .tick.minor {
+ stroke: #a7a7ac;
+}
+
+.y.axis text, .x.axis text {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 10px;
+ font-weight: normal;
+ font-style: normal;
+ fill: #50505a;
+ text-rendering: optimize-legibility;
+
+}
+
+.x.axis path {
+ stroke: #50505a;
+}
+
+.y.axis path {
+ stroke: #50505a;
+}
+ /* Brush related css rules */
+.brush rect.extent {
+ fill: #0757ff;
+ fill-opacity: .15;
+ shape-rendering: crispEdges;
+}
+
+.brush .resize path {
+ fill: #666;
+ fill-opacity: .8;
+ stroke: #000;
+ stroke-width: 1.5px;
+}
+
+.minLabel, .avgLabel, .highLabel {
+ font-family: Arial, Verdana, sans-serif;
+ font-size: 12px;
+ font-weight: bold;
+ text-anchor: start;
+ fill: #003168;
+ text-rendering: optimize-legibility;
+}
+
+.minText, .avgText, .highText {
+ font-family: Arial, Verdana, sans-serif;
+ font-size: 12px;
+ text-anchor: start;
+ fill: #003168;
+ text-rendering: optimize-legibility;
+}
+
+.chartTitleName {
+ font-family: Arial, Verdana, sans-serif;
+ font-size: 12px;
+ font-weight: bold;
+ fill: #003168;
+}
+.chartTitleBox {
+ fill:none;
+
+}
+
+rect.high {
+ fill: #1794bc;
+}
+
+rect.low {
+ fill: #70c4e2;
+}
+
+
+
+/* CSS for new Chart Hovers*/
+
+#availTooltip {
+ z-index: 990000;
+ position: absolute;
+ width: 150px;
+ height: auto;
+ padding: 5px;
+ background-color: #000;
+ opacity: 0.8;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+ -webkit-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
+ -moz-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
+ box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
+ pointer-events: none;
+}
+
+#availTooltip.hidden {
+ display: none;
+}
+
+#availTooltip div {
+ margin: 0;
+ font-family: Arial, Verdana, sans-serif;
+ font-size: 9px;
+ color: #d3d3d6;
+}
+
+.availTooltipLabel {
+ width: 40px;
+ font-weight: bold;
+ color: #d3d3d6;
+}
+
+/* CSS for metric graph tooltips */
+#metricGraphTooltip {
+ z-index: 990000;
+ position: absolute;
+ width: 100px;
+ height: auto;
+ padding: 5px;
+ background-color: #000;
+ opacity: 0.80;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+ -webkit-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
+ -moz-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
+ box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
+ pointer-events: none;
+}
+
+#metricGraphTooltip.hidden {
+ display: none;
+}
+
+#metricGraphTooltip div {
+ margin: 0;
+ font-family: Arial, Verdana, sans-serif;
+ font-size: 10px;
+ color: #d3d3d6;
+}
+
+#metricGraphTooltipLabel {
+ width: 40px;
+ font-weight: bold;
+ color: #d3d3d6;
+}
+
+#metricGraphTooltipMaxLabel {
+ color: #1794BC;
+}
+
+#metricGraphTooltipAvgLabel {
+ color: #2e376a;
+}
+
+#metricGraphTooltipMinLabel {
+ color: #70c4e2;
+}
+
+#noDataTooltip {
+ z-index: 990000;
+ position: absolute;
+ width: 100px;
+ height: auto;
+ padding: 5px;
+ background-color: #000;
+ opacity: 0.80;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+ -webkit-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
+ -moz-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
+ box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
+ pointer-events: none;
+}
+
+#noDataTooltip.hidden {
+ display: none;
+}
+
+#noDataTooltip div {
+ margin: 0;
+ font-family: Arial, Verdana, sans-serif;
+ font-size: 10px;
+ color: #d3d3d6;
+}
+
+
+#singleValueTooltip {
+ z-index: 990000;
+ position: absolute;
+ width: 100px;
+ height: auto;
+ padding: 5px;
+ background-color: #000;
+ opacity: 0.80;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+ -webkit-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
+ -moz-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
+ box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
+ pointer-events: none;
+}
+
+#singleValueTooltip.hidden {
+ display: none;
+}
+
+#singleValueTooltip div {
+ margin: 0;
+ font-family: Arial, Verdana, sans-serif;
+ font-size: 10px;
+ color: #d3d3d6;
+}
+
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/css/charts-4.9.0.css b/modules/enterprise/gui/coregui/src/main/webapp/css/charts-4.9.0.css
deleted file mode 100644
index 6f8df38..0000000
--- a/modules/enterprise/gui/coregui/src/main/webapp/css/charts-4.9.0.css
+++ /dev/null
@@ -1,252 +0,0 @@
-/***
- * CSS for the d3 SVG charts. This is SVG css not HTML css so some elements
- * may look different from standard CSS.
- * NOTE: the SVG <defs> section that contains gradients etc. is in the
- * java class : /org/rhq/coregui/client/inventory/common/ResourceMetricD3Graph.java
- *
- */
-
-svg {
- -webkit-touch-callout: none;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- /* Trying to get SVG to act like a greedy block in all browsers */
- display: block;
- width:100%;
- height:100%;
-}
-
-
-
-.axis path, .axis line {
- fill: none;
- stroke: #000;
- shape-rendering: crispEdges;
-}
-
-/* Horizontal gridlines */
-
-.grid .tick {
- stroke: #f7f7f7;
-}
-
-.y.axis .tick.minor {
- stroke: #a7a7ac;
-}
-
-.x.axis .tick.minor {
- stroke: #a7a7ac;
-}
-
-.y.axis text, .x.axis text {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 10px;
- font-weight: normal;
- font-style: normal;
- fill: #50505a;
- text-rendering: optimize-legibility;
-
-}
-
-.x.axis path {
- stroke: #50505a;
-}
-
-.y.axis path {
- stroke: #50505a;
-}
- /* Brush related css rules */
-.brush rect.extent {
- fill: #0757ff;
- fill-opacity: .15;
- shape-rendering: crispEdges;
-}
-
-.brush .resize path {
- fill: #666;
- fill-opacity: .8;
- stroke: #000;
- stroke-width: 1.5px;
-}
-
-.minLabel, .avgLabel, .highLabel {
- font-family: Arial, Verdana, sans-serif;
- font-size: 12px;
- font-weight: bold;
- text-anchor: start;
- fill: #003168;
- text-rendering: optimize-legibility;
-}
-
-.minText, .avgText, .highText {
- font-family: Arial, Verdana, sans-serif;
- font-size: 12px;
- text-anchor: start;
- fill: #003168;
- text-rendering: optimize-legibility;
-}
-
-.chartTitleName {
- font-family: Arial, Verdana, sans-serif;
- font-size: 12px;
- font-weight: bold;
- fill: #003168;
-}
-.chartTitleBox {
- fill:none;
-
-}
-
-rect.high {
- fill: #1794bc;
-}
-
-rect.low {
- fill: #70c4e2;
-}
-
-
-
-/* CSS for new Chart Hovers*/
-
-#availTooltip {
- z-index: 990000;
- position: absolute;
- width: 150px;
- height: auto;
- padding: 5px;
- background-color: #000;
- opacity: 0.8;
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- border-radius: 5px;
- -webkit-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
- -moz-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
- box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
- pointer-events: none;
-}
-
-#availTooltip.hidden {
- display: none;
-}
-
-#availTooltip div {
- margin: 0;
- font-family: Arial, Verdana, sans-serif;
- font-size: 9px;
- color: #d3d3d6;
-}
-
-.availTooltipLabel {
- width: 40px;
- font-weight: bold;
- color: #d3d3d6;
-}
-
-/* CSS for metric graph tooltips */
-#metricGraphTooltip {
- z-index: 990000;
- position: absolute;
- width: 100px;
- height: auto;
- padding: 5px;
- background-color: #000;
- opacity: 0.80;
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- border-radius: 5px;
- -webkit-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
- -moz-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
- box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
- pointer-events: none;
-}
-
-#metricGraphTooltip.hidden {
- display: none;
-}
-
-#metricGraphTooltip div {
- margin: 0;
- font-family: Arial, Verdana, sans-serif;
- font-size: 10px;
- color: #d3d3d6;
-}
-
-#metricGraphTooltipLabel {
- width: 40px;
- font-weight: bold;
- color: #d3d3d6;
-}
-
-#metricGraphTooltipMaxLabel {
- color: #1794BC;
-}
-
-#metricGraphTooltipAvgLabel {
- color: #2e376a;
-}
-
-#metricGraphTooltipMinLabel {
- color: #70c4e2;
-}
-
-#noDataTooltip {
- z-index: 990000;
- position: absolute;
- width: 100px;
- height: auto;
- padding: 5px;
- background-color: #000;
- opacity: 0.80;
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- border-radius: 5px;
- -webkit-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
- -moz-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
- box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
- pointer-events: none;
-}
-
-#noDataTooltip.hidden {
- display: none;
-}
-
-#noDataTooltip div {
- margin: 0;
- font-family: Arial, Verdana, sans-serif;
- font-size: 10px;
- color: #d3d3d6;
-}
-
-
-#singleValueTooltip {
- z-index: 990000;
- position: absolute;
- width: 100px;
- height: auto;
- padding: 5px;
- background-color: #000;
- opacity: 0.80;
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- border-radius: 5px;
- -webkit-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
- -moz-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
- box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
- pointer-events: none;
-}
-
-#singleValueTooltip.hidden {
- display: none;
-}
-
-#singleValueTooltip div {
- margin: 0;
- font-family: Arial, Verdana, sans-serif;
- font-size: 10px;
- color: #d3d3d6;
-}
-
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/js/rhq-4.10.0.js b/modules/enterprise/gui/coregui/src/main/webapp/js/rhq-4.10.0.js
new file mode 100644
index 0000000..50839d7
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/webapp/js/rhq-4.10.0.js
@@ -0,0 +1,189 @@
+/**
+ * RHQ Charting Javascript Functions.
+ */
+
+/**
+ * ChartContext Constructor Object
+ * Contains all of the data required to render a chart.
+ * A ChartContext can be passed to multiple chart renders to display different chart types
+ * of that data.
+ * @param chartId
+ * @param chartHeight
+ * @param metricsData
+ * @param xAxisLabel
+ * @param chartTitle
+ * @param yAxisUnits
+ * @param minChartTitle
+ * @param avgChartTitle
+ * @param peakChartTitle
+ * @param dateLabel
+ * @param timeLabel
+ * @param downLabel
+ * @param unknownLabel
+ * @param noDataLabel
+ * @param hoverStartLabel
+ * @param hoverEndLabel
+ * @param hoverPeriodLabel
+ * @param hoverBarLabel
+ * @param chartHoverTimeFormat
+ * @param chartHoverDateFormat
+ * @param isPortalGraph
+ * @param portalId
+ * @param buttonBarDateTimeFormat
+ * @param singleValueLabel
+ * @param chartXaxisTimeFormatHours
+ * @param chartXaxisTimeFormatHoursMinutes
+ * @param hideLegend
+ * @param chartAverage
+ * @param chartMin
+ * @param chartMax
+ * @constructor
+ */
+var ChartContext = function (chartId, chartHeight, metricsData, xAxisLabel, chartTitle, yAxisUnits, minChartTitle, avgChartTitle, peakChartTitle, dateLabel, timeLabel, downLabel, unknownLabel, noDataLabel, hoverStartLabel, hoverEndLabel, hoverPeriodLabel, hoverBarLabel, chartHoverTimeFormat, chartHoverDateFormat, isPortalGraph, portalId, buttonBarDateTimeFormat, singleValueLabel, chartXaxisTimeFormatHours, chartXaxisTimeFormatHoursMinutes, hideLegend, chartAverage, chartMin, chartMax) {
+ "use strict";
+ if (!(this instanceof ChartContext)) {
+ throw new Error("ChartContext function cannot be called as a function.");
+ }
+ this.chartId = chartId;
+ this.chartHeight = chartHeight;
+ this.data = jQuery.parseJSON(metricsData); // make into json
+ this.xAxisLabel = xAxisLabel;
+ this.chartTitle = chartTitle;
+ this.yAxisUnits = yAxisUnits;
+ this.minChartTitle = minChartTitle;
+ this.avgChartTitle = avgChartTitle;
+ this.peakChartTitle = peakChartTitle;
+ this.dateLabel = dateLabel;
+ this.timeLabel = timeLabel;
+ this.downLabel = downLabel;
+ this.unknownLabel = unknownLabel;
+ this.singleValueLabel = singleValueLabel;
+ this.noDataLabel = noDataLabel;
+ this.hoverStartLabel = hoverStartLabel;
+ this.hoverEndLabel = hoverEndLabel;
+ this.hoverPeriodLabel = hoverPeriodLabel;
+ this.hoverBarLabel = hoverBarLabel;
+ this.chartHoverTimeFormat = chartHoverTimeFormat;
+ this.chartHoverDateFormat = chartHoverDateFormat;
+ this.isPortalGraph = isPortalGraph;
+ this.portalId = portalId;
+ if (isPortalGraph) {
+ this.chartHandle = "rChart-" + chartId + "-" + portalId;
+ }
+ else {
+ this.chartHandle = "rChart-" + chartId;
+ }
+ this.chartSelection = this.chartHandle + " svg";
+ this.buttonBarDateTimeFormat = buttonBarDateTimeFormat;
+ this.chartXaxisTimeFormatHours = chartXaxisTimeFormatHours;
+ this.chartXaxisTimeFormatHoursMinutes = chartXaxisTimeFormatHoursMinutes;
+ this.hideLegend = hideLegend;
+ this.chartAverage = chartAverage;
+ this.chartMin = chartMin;
+ this.chartMax = chartMax;
+
+ },
+ /**
+ * Availability Context object constructor
+ * @param chartId
+ * @param availData
+ * @param dateLabel
+ * @param timeLabel
+ * @param hoverStartLabel
+ * @param hoverBarLabel
+ * @param availabilityLabel
+ * @param chartHoverTimeFormat
+ * @param chartHoverDateFormat
+ * @param chartTitle
+ * @param chartUpLabel
+ * @param chartDownLabel
+ * @param chartXaxisTimeFormatHours
+ * @param chartXaxisTimeFormatHoursMinutes
+ * @constructor
+ */
+ AvailChartContext = function (chartId, availData, dateLabel, timeLabel, hoverStartLabel, hoverBarLabel, availabilityLabel, chartHoverTimeFormat, chartHoverDateFormat, chartTitle, chartUpLabel, chartDownLabel, chartXaxisTimeFormatHours, chartXaxisTimeFormatHoursMinutes) {
+ "use strict";
+ if (!(this instanceof AvailChartContext)) {
+ throw new Error("AvailChartContext function cannot be called as a function.");
+ }
+ this.chartId = chartId;
+ this.chartHandle = "#availChart-" + this.chartId;
+ this.chartSelection = this.chartHandle + " svg";
+ this.data = jQuery.parseJSON(availData); // make into json
+ this.dateLabel = dateLabel;
+ this.timeLabel = timeLabel;
+ this.hoverStartLabel = hoverStartLabel;
+ this.hoverBarLabel = hoverBarLabel;
+ this.hoverBarAvailabilityLabel = availabilityLabel;
+ this.chartHoverTimeFormat = chartHoverTimeFormat;
+ this.chartHoverDateFormat = chartHoverDateFormat;
+ this.chartTitle = chartTitle;
+ this.chartDownLabel = chartDownLabel;
+ this.chartUpLabel = chartUpLabel;
+ this.chartXaxisTimeFormatHours = chartXaxisTimeFormatHours;
+ this.chartXaxisTimeFormatHoursMinutes = chartXaxisTimeFormatHoursMinutes;
+
+ },
+
+ /**
+ * GraphDateContext object constructor.
+ * @param startDate moment object representing startDate range
+ * @param endDate moment object representing endDate range
+ * @constructor
+ */
+ GraphDateContext = function (startDate, endDate) {
+ "use strict";
+ if (!(this instanceof GraphDateContext)) {
+ throw new Error("GraphDateContext function cannot be called as a function.");
+ }
+ this.startDate = startDate;
+ this.endDate = endDate;
+ },
+ rhqCommon = (function () {
+ "use strict";
+
+
+ var timeFormat = function (formats) {
+ return function(date) {
+ var i = formats.length - 1, f = formats[i];
+ while (!f[1](date)) f = formats[--i];
+ return f[0](date);
+ };
+ };
+
+ return {
+ getD3CustomTimeFormat: function (xAxisTimeFormatHours, xAxisTimeFormatHoursMinutes) {
+ return timeFormat([
+ [d3.time.format("%Y"), function () {
+ return true;
+ }],
+ [d3.time.format("%B"), function (d) {
+ return d.getMonth();
+ }],
+ [d3.time.format("%b %d"), function (d) {
+ return d.getDate() != 1;
+ }],
+ [d3.time.format("%a %d"), function (d) {
+ return d.getDay() && d.getDate() != 1;
+ }],
+ [d3.time.format(xAxisTimeFormatHours), function (d) {
+ return d.getHours();
+ }],
+ [d3.time.format(xAxisTimeFormatHoursMinutes), function (d) {
+ return d.getMinutes();
+ }],
+ [d3.time.format(":%S"), function (d) {
+ return d.getSeconds();
+ }],
+ [d3.time.format(".%L"), function (d) {
+ return d.getMilliseconds();
+ }]
+ ]);
+ }
+
+ };
+ })();
+
+
+
+
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/js/rhq-4.9.0.js b/modules/enterprise/gui/coregui/src/main/webapp/js/rhq-4.9.0.js
deleted file mode 100644
index 7e89bb1..0000000
--- a/modules/enterprise/gui/coregui/src/main/webapp/js/rhq-4.9.0.js
+++ /dev/null
@@ -1,183 +0,0 @@
-/**
- * RHQ Charting Javascript Functions.
- */
-
-/**
- * ChartContext Constructor Object
- * Contains all of the data required to render a chart.
- * A ChartContext can be passed to multiple chart renders to display different chart types
- * of that data.
- * @param chartId
- * @param chartHeight
- * @param metricsData
- * @param xAxisLabel
- * @param chartTitle
- * @param yAxisUnits
- * @param minChartTitle
- * @param avgChartTitle
- * @param peakChartTitle
- * @param dateLabel
- * @param timeLabel
- * @param downLabel
- * @param unknownLabel
- * @param noDataLabel
- * @param hoverStartLabel
- * @param hoverEndLabel
- * @param hoverPeriodLabel
- * @param hoverBarLabel
- * @param chartHoverTimeFormat
- * @param chartHoverDateFormat
- * @param isPortalGraph
- * @param portalId
- * @param buttonBarDateTimeFormat
- * @param singleValueLabel
- * @param chartXaxisTimeFormatHours
- * @param chartXaxisTimeFormatHoursMinutes
- * @param hideLegend
- * @constructor
- */
-var ChartContext = function (chartId, chartHeight, metricsData, xAxisLabel, chartTitle, yAxisUnits, minChartTitle, avgChartTitle, peakChartTitle, dateLabel, timeLabel, downLabel, unknownLabel, noDataLabel, hoverStartLabel, hoverEndLabel, hoverPeriodLabel, hoverBarLabel, chartHoverTimeFormat, chartHoverDateFormat, isPortalGraph, portalId, buttonBarDateTimeFormat, singleValueLabel, chartXaxisTimeFormatHours, chartXaxisTimeFormatHoursMinutes, hideLegend) {
- "use strict";
- if (!(this instanceof ChartContext)) {
- throw new Error("ChartContext function cannot be called as a function.");
- }
- this.chartId = chartId;
- this.chartHeight = chartHeight;
- this.data = jQuery.parseJSON(metricsData); // make into json
- this.xAxisLabel = xAxisLabel;
- this.chartTitle = chartTitle;
- this.yAxisUnits = yAxisUnits;
- this.minChartTitle = minChartTitle;
- this.avgChartTitle = avgChartTitle;
- this.peakChartTitle = peakChartTitle;
- this.dateLabel = dateLabel;
- this.timeLabel = timeLabel;
- this.downLabel = downLabel;
- this.unknownLabel = unknownLabel;
- this.singleValueLabel = singleValueLabel;
- this.noDataLabel = noDataLabel;
- this.hoverStartLabel = hoverStartLabel;
- this.hoverEndLabel = hoverEndLabel;
- this.hoverPeriodLabel = hoverPeriodLabel;
- this.hoverBarLabel = hoverBarLabel;
- this.chartHoverTimeFormat = chartHoverTimeFormat;
- this.chartHoverDateFormat = chartHoverDateFormat;
- this.isPortalGraph = isPortalGraph;
- this.portalId = portalId;
- if (isPortalGraph) {
- this.chartHandle = "rChart-" + chartId + "-" + portalId;
- }
- else {
- this.chartHandle = "rChart-" + chartId;
- }
- this.chartSelection = this.chartHandle + " svg";
- this.buttonBarDateTimeFormat = buttonBarDateTimeFormat;
- this.chartXaxisTimeFormatHours = chartXaxisTimeFormatHours;
- this.chartXaxisTimeFormatHoursMinutes = chartXaxisTimeFormatHoursMinutes;
- this.hideLegend = hideLegend;
-
- },
- /**
- * Availability Context object constructor
- * @param chartId
- * @param availData
- * @param dateLabel
- * @param timeLabel
- * @param hoverStartLabel
- * @param hoverBarLabel
- * @param availabilityLabel
- * @param chartHoverTimeFormat
- * @param chartHoverDateFormat
- * @param chartTitle
- * @param chartUpLabel
- * @param chartDownLabel
- * @param chartXaxisTimeFormatHours
- * @param chartXaxisTimeFormatHoursMinutes
- * @constructor
- */
- AvailChartContext = function (chartId, availData, dateLabel, timeLabel, hoverStartLabel, hoverBarLabel, availabilityLabel, chartHoverTimeFormat, chartHoverDateFormat, chartTitle, chartUpLabel, chartDownLabel, chartXaxisTimeFormatHours, chartXaxisTimeFormatHoursMinutes) {
- "use strict";
- if (!(this instanceof AvailChartContext)) {
- throw new Error("AvailChartContext function cannot be called as a function.");
- }
- this.chartId = chartId;
- this.chartHandle = "#availChart-" + this.chartId;
- this.chartSelection = this.chartHandle + " svg";
- this.data = jQuery.parseJSON(availData); // make into json
- this.dateLabel = dateLabel;
- this.timeLabel = timeLabel;
- this.hoverStartLabel = hoverStartLabel;
- this.hoverBarLabel = hoverBarLabel;
- this.hoverBarAvailabilityLabel = availabilityLabel;
- this.chartHoverTimeFormat = chartHoverTimeFormat;
- this.chartHoverDateFormat = chartHoverDateFormat;
- this.chartTitle = chartTitle;
- this.chartDownLabel = chartDownLabel;
- this.chartUpLabel = chartUpLabel;
- this.chartXaxisTimeFormatHours = chartXaxisTimeFormatHours;
- this.chartXaxisTimeFormatHoursMinutes = chartXaxisTimeFormatHoursMinutes;
-
- },
-
- /**
- * GraphDateContext object constructor.
- * @param startDate moment object representing startDate range
- * @param endDate moment object representing endDate range
- * @constructor
- */
- GraphDateContext = function (startDate, endDate) {
- "use strict";
- if (!(this instanceof GraphDateContext)) {
- throw new Error("GraphDateContext function cannot be called as a function.");
- }
- this.startDate = startDate;
- this.endDate = endDate;
- },
- rhqCommon = (function () {
- "use strict";
-
-
- var timeFormat = function (formats) {
- return function(date) {
- var i = formats.length - 1, f = formats[i];
- while (!f[1](date)) f = formats[--i];
- return f[0](date);
- };
- };
-
- return {
- getD3CustomTimeFormat: function (xAxisTimeFormatHours, xAxisTimeFormatHoursMinutes) {
- return timeFormat([
- [d3.time.format("%Y"), function () {
- return true;
- }],
- [d3.time.format("%B"), function (d) {
- return d.getMonth();
- }],
- [d3.time.format("%b %d"), function (d) {
- return d.getDate() != 1;
- }],
- [d3.time.format("%a %d"), function (d) {
- return d.getDay() && d.getDate() != 1;
- }],
- [d3.time.format(xAxisTimeFormatHours), function (d) {
- return d.getHours();
- }],
- [d3.time.format(xAxisTimeFormatHoursMinutes), function (d) {
- return d.getMinutes();
- }],
- [d3.time.format(":%S"), function (d) {
- return d.getSeconds();
- }],
- [d3.time.format(".%L"), function (d) {
- return d.getMilliseconds();
- }]
- ]);
- }
-
- };
- })();
-
-
-
-
10 years, 5 months
[rhq] 4 commits - modules/enterprise
by Jiri Kremser
modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/dashboard/portlets/resource/ResourceMetricsPortlet.java | 389 +++++-----
modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/resource/detail/DashboardLinkUtility.java | 116 --
modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/resource/detail/ResourceTreeView.java | 4
modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml | 118 +--
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StorageNodeManagerBean.java | 4
5 files changed, 281 insertions(+), 350 deletions(-)
New commits:
commit df44d50f6fbbfd570335a7f40a8b98d9d8152a9a
Author: Jirka Kremser <jkremser(a)redhat.com>
Date: Wed Dec 4 20:04:49 2013 +0100
[BZ 1038270] - NPE when accessing the storage node view immediately after the install - NPE check added
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StorageNodeManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StorageNodeManagerBean.java
index 7946411..089719a 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StorageNodeManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/cloud/StorageNodeManagerBean.java
@@ -848,7 +848,9 @@ public class StorageNodeManagerBean implements StorageNodeManagerLocal, StorageN
try {
Map<Integer, StorageNode> resourceIdToStorageNodeMap = new TreeMap<Integer, StorageNode>();
for (StorageNode storageNode : storageNodes) {
- resourceIdToStorageNodeMap.put(storageNode.getResource().getId(), storageNode);
+ if (storageNode.getResource() != null) { // handling the case before the s.n. autoimport
+ resourceIdToStorageNodeMap.put(storageNode.getResource().getId(), storageNode);
+ }
}
Map<Integer, Integer> storageNodeAlertCounts = new TreeMap<Integer, Integer>();
commit 985cf07bc5835ab816d661008f1f752a355f3d4e
Author: Jirka Kremser <jkremser(a)redhat.com>
Date: Wed Dec 4 19:20:10 2013 +0100
[BZ 1038067] - Resource Summary/Activity shows summary of disabled metrics - adding a check that finds out whether the resource has those metrics scheduled. This is done in parallel using the countdown latch pattern.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/dashboard/portlets/resource/ResourceMetricsPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/dashboard/portlets/resource/ResourceMetricsPortlet.java
index ddd70a3..df4e659 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/dashboard/portlets/resource/ResourceMetricsPortlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/dashboard/portlets/resource/ResourceMetricsPortlet.java
@@ -21,6 +21,7 @@ package org.rhq.coregui.client.dashboard.portlets.resource;
import java.util.Arrays;
import java.util.EnumSet;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -41,13 +42,15 @@ import com.smartgwt.client.widgets.form.fields.events.ClickHandler;
import com.smartgwt.client.widgets.layout.VLayout;
import org.rhq.core.domain.common.EntityContext;
+import org.rhq.core.domain.criteria.MeasurementScheduleCriteria;
import org.rhq.core.domain.criteria.ResourceCriteria;
-import org.rhq.core.domain.dashboard.DashboardPortlet;
import org.rhq.core.domain.measurement.MeasurementDefinition;
+import org.rhq.core.domain.measurement.MeasurementSchedule;
import org.rhq.core.domain.measurement.composite.MeasurementDataNumericHighLowComposite;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.domain.resource.composite.ResourceComposite;
+import org.rhq.core.domain.util.PageControl;
import org.rhq.core.domain.util.PageList;
import org.rhq.coregui.client.LinkManager;
import org.rhq.coregui.client.dashboard.Portlet;
@@ -60,6 +63,8 @@ import org.rhq.coregui.client.inventory.resource.detail.monitoring.D3GraphListVi
import org.rhq.coregui.client.inventory.resource.type.ResourceTypeRepository;
import org.rhq.coregui.client.util.BrowserUtility;
import org.rhq.coregui.client.util.Log;
+import org.rhq.coregui.client.util.async.Command;
+import org.rhq.coregui.client.util.async.CountDownLatch;
/**
* This portlet allows the end user to customize the metric display
@@ -72,7 +77,7 @@ public class ResourceMetricsPortlet extends GroupMetricsPortlet {
public static final String KEY = "ResourceMetrics";
// A default displayed, persisted name for the portlet
public static final String NAME = MSG.view_portlet_defaultName_resource_metrics();
-
+
private int resourceId = -1;
private ChartViewWindow window;
@@ -82,6 +87,9 @@ public class ResourceMetricsPortlet extends GroupMetricsPortlet {
super(EntityContext.forResource(-1));
this.resourceId = resourceId;
}
+
+ private volatile List<MeasurementSchedule> enabledSchedules = null;
+ private volatile Resource resource = null;
public static final class Factory implements PortletViewFactory {
public static final PortletViewFactory INSTANCE = new Factory();
@@ -101,12 +109,31 @@ public class ResourceMetricsPortlet extends GroupMetricsPortlet {
* digits.
*/
@Override
- protected void getRecentMetrics() {
- final DashboardPortlet storedPortlet = this.portletWindow.getStoredPortlet();
+ protected void getRecentMetrics() {
+
//display container
final VLayout column = new VLayout();
column.setHeight(10);//pack
column.setWidth100();
+
+ final CountDownLatch latch = CountDownLatch.create(2, new Command() {
+
+ @Override
+ public void execute() {
+ showEnabledMetrics(enabledSchedules == null ? null : getEnabledDefinitions(enabledSchedules), column, resource);
+ }
+
+ private Set<MeasurementDefinition> getEnabledDefinitions(List<MeasurementSchedule> enabledSchedules) {
+ Set<MeasurementDefinition> enabledDefinitions = new HashSet<MeasurementDefinition>(enabledSchedules.size());
+ for (MeasurementSchedule schedule : enabledSchedules) {
+ enabledDefinitions.add(schedule.getDefinition());
+ }
+ return enabledDefinitions;
+ }
+ });
+
+ //fetch only enabled schedules
+ fetchEnabledSchedules(latch);
//locate resource reference
ResourceCriteria criteria = new ResourceCriteria();
@@ -120,13 +147,14 @@ public class ResourceMetricsPortlet extends GroupMetricsPortlet {
Log.debug("Error retrieving resource resource composite for resource [" + resourceId + "]:"
+ caught.getMessage());
setRefreshing(false);
+ latch.countDown();
}
@Override
public void onSuccess(PageList<ResourceComposite> results) {
if (!results.isEmpty()) {
final ResourceComposite resourceComposite = results.get(0);
- final Resource resource = resourceComposite.getResource();
+ resource = resourceComposite.getResource();
// Load the fully fetched ResourceType.
ResourceType resourceType = resource.getResourceType();
ResourceTypeRepository.Cache.getInstance().getResourceTypes(resourceType.getId(),
@@ -134,176 +162,11 @@ public class ResourceMetricsPortlet extends GroupMetricsPortlet {
new ResourceTypeRepository.TypeLoadedCallback() {
public void onTypesLoaded(ResourceType type) {
resource.setResourceType(type);
- //metric definitions
- Set<MeasurementDefinition> definitions = type.getMetricDefinitions();
-
- //build id mapping for measurementDefinition instances Ex. Free Memory -> MeasurementDefinition[100071]
- final HashMap<String, MeasurementDefinition> measurementDefMap = new HashMap<String, MeasurementDefinition>();
- for (MeasurementDefinition definition : definitions) {
- measurementDefMap.put(definition.getDisplayName(), definition);
- }
- //bundle definition ids for asynch call.
- int[] definitionArrayIds = new int[definitions.size()];
- final String[] displayOrder = new String[definitions.size()];
- measurementDefMap.keySet().toArray(displayOrder);
- //sort the charting data ex. Free Memory, Free Swap Space,..System Load
- Arrays.sort(displayOrder);
-
- //organize definitionArrayIds for ordered request on server.
- int index = 0;
- for (String definitionToDisplay : displayOrder) {
- definitionArrayIds[index++] = measurementDefMap.get(definitionToDisplay)
- .getId();
- }
-
- GWTServiceLookup.getMeasurementDataService().findDataForResource(resourceId,
- definitionArrayIds, CustomDateRangeState.getInstance().getStartTime(),
- CustomDateRangeState.getInstance().getEndTime(), 60,
- new AsyncCallback<List<List<MeasurementDataNumericHighLowComposite>>>() {
- @Override
- public void onFailure(Throwable caught) {
- Log.debug("Error retrieving recent metrics charting data for resource ["
- + resourceId + "]:" + caught.getMessage());
- setRefreshing(false);
- }
-
- @Override
- public void onSuccess(
- List<List<MeasurementDataNumericHighLowComposite>> results) {
- if (!results.isEmpty()) {
- boolean someChartedData = false;
- //iterate over the retrieved charting data
- for (int index = 0; index < displayOrder.length; index++) {
- //retrieve the correct measurement definition
- final MeasurementDefinition md = measurementDefMap
- .get(displayOrder[index]);
-
- //load the data results for the given metric definition
- List<MeasurementDataNumericHighLowComposite> data = results
- .get(index);
-
- //locate last and minimum values.
- double lastValue = -1;
- double minValue = Double.MAX_VALUE;//
- for (MeasurementDataNumericHighLowComposite d : data) {
- if ((!Double.isNaN(d.getValue()))
- && (!String.valueOf(d.getValue()).contains("NaN"))) {
- if (d.getValue() < minValue) {
- minValue = d.getValue();
- }
- lastValue = d.getValue();
- }
- }
-
- //collapse the data into comma delimited list for consumption by third party javascript library(jquery.sparkline)
- String commaDelimitedList = "";
-
- for (MeasurementDataNumericHighLowComposite d : data) {
- if ((!Double.isNaN(d.getValue()))
- && (!String.valueOf(d.getValue()).contains("NaN"))) {
- commaDelimitedList += d.getValue() + ",";
- }
- }
- DynamicForm row = new DynamicForm();
- row.setNumCols(3);
- row.setColWidths(65, "*", 100);
- row.setWidth100();
- row.setAutoHeight();
- row.setOverflow(Overflow.VISIBLE);
- HTMLFlow sparklineGraph = new HTMLFlow();
- String contents = "<span id='sparkline_" + index
- + "' class='dynamicsparkline' width='0' " + "values='"
- + commaDelimitedList + "'>...</span>";
- sparklineGraph.setContents(contents);
- sparklineGraph.setContentsType(ContentsType.PAGE);
- //disable scrollbars on span
- sparklineGraph.setScrollbarSize(0);
-
- CanvasItem sparklineContainer = new CanvasItem();
- sparklineContainer.setShowTitle(false);
- sparklineContainer.setHeight(16);
- sparklineContainer.setWidth(60);
- sparklineContainer.setCanvas(sparklineGraph);
-
- //Link/title element
- final String title = md.getDisplayName();
- LinkItem link = AbstractActivityView.newLinkItem(title, null);
- link.setTooltip(title);
- link.setTitleVAlign(VerticalAlignment.TOP);
- link.setAlign(Alignment.LEFT);
- link.setClipValue(true);
- link.setWrap(true);
- link.setHeight(26);
- link.setWidth("100%");
- if (!BrowserUtility.isBrowserPreIE9()) {
- link.addClickHandler(new ClickHandler() {
- @Override
- public void onClick(ClickEvent event) {
- window = new ChartViewWindow(title,"", refreshablePortlet);
-
- graphView = D3GraphListView.createSingleGraph(
- resourceComposite.getResource(), md.getId(),
- true);
-
- window.addItem(graphView);
- window.show();
- }
- });
- } else {
- link.disable();
- }
-
- //Value
- String convertedValue;
- convertedValue = AbstractActivityView
- .convertLastValueForDisplay(lastValue, md);
- StaticTextItem value = AbstractActivityView
- .newTextItem(convertedValue);
- value.setVAlign(VerticalAlignment.TOP);
- value.setAlign(Alignment.RIGHT);
-
- row.setItems(sparklineContainer, link, value);
- row.setWidth100();
-
- //if graph content returned
- if ((!md.getName().trim().contains("Trait."))
- && (lastValue != -1)) {
- column.addMember(row);
- someChartedData = true;
- }
- }
- if (!someChartedData) {// when there are results but no chartable entries.
- DynamicForm row = AbstractActivityView.createEmptyDisplayRow(
-
- AbstractActivityView.RECENT_MEASUREMENTS_NONE);
- column.addMember(row);
- } else {
- //insert see more link
- DynamicForm row = new DynamicForm();
- String link = LinkManager
- .getResourceMonitoringGraphsLink(resourceId);
- AbstractActivityView.addSeeMoreLink(row, link, column);
- }
- //call out to 3rd party javascript lib
- new Timer() {
- @Override
- public void run() {
- BrowserUtility.graphSparkLines();
- }
- }.schedule(200);
- } else {
- DynamicForm row = AbstractActivityView
- .createEmptyDisplayRow(AbstractActivityView.RECENT_MEASUREMENTS_NONE);
- column.addMember(row);
- }
- setRefreshing(false);
- }
- }
-
- );
-
+ latch.countDown();
}
});
+ } else {
+ latch.countDown();
}
}
});
@@ -315,4 +178,184 @@ public class ResourceMetricsPortlet extends GroupMetricsPortlet {
recentMeasurementsContent.addChild(column);
recentMeasurementsContent.markForRedraw();
}
+
+ private void fetchEnabledSchedules(final CountDownLatch latch) {
+ MeasurementScheduleCriteria criteria = new MeasurementScheduleCriteria();
+ criteria.addFilterResourceId(resourceId);
+ criteria.addFilterEnabled(true);
+ criteria.fetchDefinition(true);
+ criteria.setPageControl(PageControl.getUnlimitedInstance());
+ GWTServiceLookup.getMeasurementDataService().findMeasurementSchedulesByCriteria(criteria, new AsyncCallback<PageList<MeasurementSchedule>>() {
+
+ @Override
+ public void onSuccess(PageList<MeasurementSchedule> result) {
+ enabledSchedules = result;
+ latch.countDown();
+ }
+
+ @Override
+ public void onFailure(Throwable caught) {
+ latch.countDown();
+ }
+ });
+ }
+
+
+ private void showEnabledMetrics(final Set<MeasurementDefinition> definitions, final VLayout layout, final Resource resource) {
+ if (resource == null || definitions == null) {
+ Log.warn("Unable to render recent metrics properly.");
+ return;
+ }
+
+ //build id mapping for measurementDefinition instances Ex. Free Memory -> MeasurementDefinition[100071]
+ final HashMap<String, MeasurementDefinition> measurementDefMap = new HashMap<String, MeasurementDefinition>();
+ for (MeasurementDefinition definition : definitions) {
+ measurementDefMap.put(definition.getDisplayName(), definition);
+ }
+ //bundle definition ids for async call.
+ int[] definitionArrayIds = new int[definitions.size()];
+ final String[] displayOrder = new String[definitions.size()];
+ measurementDefMap.keySet().toArray(displayOrder);
+ //sort the charting data ex. Free Memory, Free Swap Space,..System Load
+ Arrays.sort(displayOrder);
+
+ //organize definitionArrayIds for ordered request on server.
+ int index = 0;
+ for (String definitionToDisplay : displayOrder) {
+ definitionArrayIds[index++] = measurementDefMap.get(definitionToDisplay).getId();
+ }
+
+ GWTServiceLookup.getMeasurementDataService().findDataForResource(resourceId, definitionArrayIds,
+ CustomDateRangeState.getInstance().getStartTime(), CustomDateRangeState.getInstance().getEndTime(), 60,
+ new AsyncCallback<List<List<MeasurementDataNumericHighLowComposite>>>() {
+ @Override
+ public void onFailure(Throwable caught) {
+ Log.debug("Error retrieving recent metrics charting data for resource [" + resourceId + "]:"
+ + caught.getMessage());
+ setRefreshing(false);
+ }
+
+ @Override
+ public void onSuccess(List<List<MeasurementDataNumericHighLowComposite>> results) {
+ if (!results.isEmpty()) {
+ boolean someChartedData = false;
+ //iterate over the retrieved charting data
+ for (int index = 0; index < displayOrder.length; index++) {
+ //retrieve the correct measurement definition
+ final MeasurementDefinition md = measurementDefMap.get(displayOrder[index]);
+
+ //load the data results for the given metric definition
+ List<MeasurementDataNumericHighLowComposite> data = results.get(index);
+
+ //locate last and minimum values.
+ double lastValue = -1;
+ double minValue = Double.MAX_VALUE;//
+ for (MeasurementDataNumericHighLowComposite d : data) {
+ if ((!Double.isNaN(d.getValue())) && (!String.valueOf(d.getValue()).contains("NaN"))) {
+ if (d.getValue() < minValue) {
+ minValue = d.getValue();
+ }
+ lastValue = d.getValue();
+ }
+ }
+
+ //collapse the data into comma delimited list for consumption by third party javascript library(jquery.sparkline)
+ String commaDelimitedList = "";
+
+ for (MeasurementDataNumericHighLowComposite d : data) {
+ if ((!Double.isNaN(d.getValue())) && (!String.valueOf(d.getValue()).contains("NaN"))) {
+ commaDelimitedList += d.getValue() + ",";
+ }
+ }
+ DynamicForm row = new DynamicForm();
+ row.setNumCols(3);
+ row.setColWidths(65, "*", 100);
+ row.setWidth100();
+ row.setAutoHeight();
+ row.setOverflow(Overflow.VISIBLE);
+ HTMLFlow sparklineGraph = new HTMLFlow();
+ String contents = "<span id='sparkline_" + index + "' class='dynamicsparkline' width='0' "
+ + "values='" + commaDelimitedList + "'>...</span>";
+ sparklineGraph.setContents(contents);
+ sparklineGraph.setContentsType(ContentsType.PAGE);
+ //disable scrollbars on span
+ sparklineGraph.setScrollbarSize(0);
+
+ CanvasItem sparklineContainer = new CanvasItem();
+ sparklineContainer.setShowTitle(false);
+ sparklineContainer.setHeight(16);
+ sparklineContainer.setWidth(60);
+ sparklineContainer.setCanvas(sparklineGraph);
+
+ //Link/title element
+ final String title = md.getDisplayName();
+ LinkItem link = AbstractActivityView.newLinkItem(title, null);
+ link.setTooltip(title);
+ link.setTitleVAlign(VerticalAlignment.TOP);
+ link.setAlign(Alignment.LEFT);
+ link.setClipValue(true);
+ link.setWrap(true);
+ link.setHeight(26);
+ link.setWidth("100%");
+ if (!BrowserUtility.isBrowserPreIE9()) {
+ link.addClickHandler(new ClickHandler() {
+ @Override
+ public void onClick(ClickEvent event) {
+ window = new ChartViewWindow(title, "", refreshablePortlet);
+
+ graphView = D3GraphListView.createSingleGraph(resource, md.getId(), true);
+
+ window.addItem(graphView);
+ window.show();
+ }
+ });
+ } else {
+ link.disable();
+ }
+
+ //Value
+ String convertedValue;
+ convertedValue = AbstractActivityView.convertLastValueForDisplay(lastValue, md);
+ StaticTextItem value = AbstractActivityView.newTextItem(convertedValue);
+ value.setVAlign(VerticalAlignment.TOP);
+ value.setAlign(Alignment.RIGHT);
+
+ row.setItems(sparklineContainer, link, value);
+ row.setWidth100();
+
+ //if graph content returned
+ if ((!md.getName().trim().contains("Trait.")) && (lastValue != -1)) {
+ layout.addMember(row);
+ someChartedData = true;
+ }
+ }
+ if (!someChartedData) {// when there are results but no chartable entries.
+ DynamicForm row = AbstractActivityView.createEmptyDisplayRow(
+
+ AbstractActivityView.RECENT_MEASUREMENTS_NONE);
+ layout.addMember(row);
+ } else {
+ //insert see more link
+ DynamicForm row = new DynamicForm();
+ String link = LinkManager.getResourceMonitoringGraphsLink(resourceId);
+ AbstractActivityView.addSeeMoreLink(row, link, layout);
+ }
+ //call out to 3rd party javascript lib
+ new Timer() {
+ @Override
+ public void run() {
+ BrowserUtility.graphSparkLines();
+ }
+ }.schedule(200);
+ } else {
+ DynamicForm row = AbstractActivityView
+ .createEmptyDisplayRow(AbstractActivityView.RECENT_MEASUREMENTS_NONE);
+ layout.addMember(row);
+ }
+ setRefreshing(false);
+ }
+ }
+
+ );
+ }
}
commit 7355462e593ce38a8a7b88e3a0e68b4f9da2a561
Author: Jirka Kremser <jkremser(a)redhat.com>
Date: Wed Dec 4 19:17:46 2013 +0100
[BZ 1035501] - Remove Add Graph to Monitor View Menu Item in Resource Tree - Removing the option leading to the old portal war page from the context menu.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/resource/detail/DashboardLinkUtility.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/resource/detail/DashboardLinkUtility.java
index 1f6cc4e..c58e665 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/resource/detail/DashboardLinkUtility.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/resource/detail/DashboardLinkUtility.java
@@ -22,39 +22,26 @@ import java.util.HashMap;
import java.util.Map;
import java.util.TreeSet;
-import com.google.gwt.http.client.Request;
-import com.google.gwt.http.client.RequestBuilder;
-import com.google.gwt.http.client.RequestCallback;
-import com.google.gwt.http.client.RequestException;
-import com.google.gwt.http.client.Response;
-import com.google.gwt.user.client.History;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.widgets.menu.Menu;
import com.smartgwt.client.widgets.menu.MenuItem;
import com.smartgwt.client.widgets.menu.events.ClickHandler;
import com.smartgwt.client.widgets.menu.events.MenuItemClickEvent;
-import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.domain.criteria.DashboardCriteria;
-import org.rhq.core.domain.criteria.SubjectCriteria;
import org.rhq.core.domain.dashboard.Dashboard;
import org.rhq.core.domain.dashboard.DashboardPortlet;
import org.rhq.core.domain.measurement.DataType;
import org.rhq.core.domain.measurement.MeasurementDefinition;
-import org.rhq.core.domain.measurement.MeasurementSchedule;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.domain.util.PageList;
import org.rhq.coregui.client.CoreGUI;
import org.rhq.coregui.client.Messages;
-import org.rhq.coregui.client.UserSessionManager;
import org.rhq.coregui.client.dashboard.portlets.inventory.resource.graph.ResourceD3GraphPortlet;
import org.rhq.coregui.client.gwt.GWTServiceLookup;
-import org.rhq.coregui.client.util.Log;
import org.rhq.coregui.client.util.message.Message;
-import org.rhq.coregui.client.util.preferences.MeasurementUserPreferences;
-import org.rhq.coregui.client.util.preferences.UserPreferences;
/**
* Utility Class to build menus for linking to the Dashboard.
@@ -144,57 +131,6 @@ public class DashboardLinkUtility {
});
}
-
- //add new menu item for adding current graphable element to view if on Monitor/Graphs tab
- String currentViewPath = History.getToken();
- if (currentViewPath.contains("Monitoring/Metrics")) {
- MenuItem addGraphItem = new MenuItem(MSG.common_title_add_graphToView());
- defSubItem.addItem(addGraphItem);
-
- addGraphItem.addClickHandler(new ClickHandler() {
- public void onClick(MenuItemClickEvent menuItemClickEvent) {
- //generate javascript to call out to.
- //Ex. menuLayers.hide();addMetric('${metric.resourceId},${metric.scheduleId}')
- if (getScheduleDefinitionId(resource, def.getName()) > -1) {
- final String resourceGraphElements = resource.getId() + ","
- + getScheduleDefinitionId(resource, def.getName());
-
- //Once, the portal-war will be rewritten to GWT and operations performed
- //within the iframe + JSF will update the user preferences, the following
- //2 lines could be uncommented and the lines below them refactorized
- //MeasurementUserPreferences measurementPreferences = new MeasurementUserPreferences(UserSessionManager.getUserPreferences());
- //String selectedView = measurementPreferences.getSelectedView(String.valueOf(resource.getId()));
-
- final int sid = UserSessionManager.getSessionSubject().getId();
- SubjectCriteria c = new SubjectCriteria();
- c.addFilterId(sid);
-
- GWTServiceLookup.getSubjectService().findSubjectsByCriteria(c,
- new AsyncCallback<PageList<Subject>>() {
- public void onSuccess(PageList<Subject> result) {
- if (result.size() > 0) {
- UserPreferences uPreferences = new UserPreferences(result
- .get(0));
- MeasurementUserPreferences mPreferences = new MeasurementUserPreferences(
- uPreferences);
- String selectedView = mPreferences.getSelectedView(String
- .valueOf(resource.getId()));
-
- addNewMetric(String.valueOf(resource.getId()),
- selectedView, resourceGraphElements);
- } else {
- Log.warn("DashboardLinkUtility: Error obtaining subject with id:" + sid);
- }
- }
-
- public void onFailure(Throwable caught) {
- Log.warn("DashboardLinkUtility: Error obtaining subject with id:" + sid, caught);
- }
- });
- }
- }
- });
- }
}
}
@@ -203,56 +139,4 @@ public class DashboardLinkUtility {
measurements.setSubmenu(measurementsSubMenu);
return measurements;
}
-
- /** Locate the specific schedule definition using the definition identifier.
- */
- private static int getScheduleDefinitionId(Resource resource, String definitionName) {
- int id = -1;
- if (resource.getSchedules() != null) {
- boolean located = false;
- MeasurementSchedule[] schedules = new MeasurementSchedule[resource.getSchedules().size()];
- resource.getSchedules().toArray(schedules);
- for (int i = 0; (!located && i < resource.getSchedules().size()); i++) {
- MeasurementSchedule schedule = schedules[i];
- MeasurementDefinition definition = schedule.getDefinition();
- if ((definition != null) && definition.getName().equals(definitionName)) {
- located = true;
- id = schedule.getId();
- }
- }
- }
- return id;
- }
-
- private static void addNewMetric(String id, String selectedView, String resourceGraphElements) {
- //construct portal.war url to access
- String baseUrl = "/portal/resource/common/monitor/visibility/IndicatorCharts.do";
- baseUrl += "?id=" + id;
- baseUrl += "&view=" + selectedView;
- baseUrl += "&action=addChart&metric=" + resourceGraphElements;
- final String url = baseUrl;
- //initiate HTTP request
- final RequestBuilder b = new RequestBuilder(RequestBuilder.GET, baseUrl);
-
- try {
- b.setCallback(new RequestCallback() {
- public void onResponseReceived(final Request request, final Response response) {
- Log.trace("Successfully submitted request to add graph to view:" + url);
-
- //kick off a page reload.
- String currentViewPath = History.getToken();
- CoreGUI.goToView(currentViewPath, true);
- }
-
- @Override
- public void onError(Request request, Throwable t) {
- Log.trace("Error adding Metric:" + url, t);
- }
- });
- b.send();
- } catch (RequestException e) {
- Log.warn("Error adding Metric:" + url, e);
- }
-
- }
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/resource/detail/ResourceTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/resource/detail/ResourceTreeView.java
index 6277a34..c2e4784 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/resource/detail/ResourceTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/resource/detail/ResourceTreeView.java
@@ -559,10 +559,6 @@ public class ResourceTreeView extends EnhancedVLayout {
}
resourceContextMenu.addItem(operations);
- // Metric graph addition menu
- resourceContextMenu.addItem(DashboardLinkUtility.buildMetricsMenu(resourceType, resource,
- MSG.view_tree_common_contextMenu_measurements()));
-
// Create Child Menu and Manual Import Menu
final Set<ResourceType> creatableChildTypes = getCreatableChildTypes(resourceType);
final Set<ResourceType> importableChildTypes = getImportableChildTypes(resourceType);
commit cce8d75b28e55793ba222a10a6cd2b80d207191d
Author: Jirka Kremser <jkremser(a)redhat.com>
Date: Wed Dec 4 19:01:33 2013 +0100
[BZ 1036681] - Starting page listening on :7080 freezes if the server turns off itself during installation - adding logic that handles the case if the server went down during the installation (or normal startup process). Also externalizing the JavaScript to its own file and linking it to the HTML page.
diff --git a/modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml b/modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml
index 585ce10..8b257ba 100644
--- a/modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml
+++ b/modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml
@@ -456,62 +456,68 @@
<target name="prepare-welcome-content">
<echo>Changing the default welcome content</echo>
<!-- Simple redirect script written in EcmaScript checking if the server has fully started -->
- <replaceregexp file="${jboss.home}/welcome-content/index.html" flags="gis" match='<body>' replace='
- <body>

- <script type="text/JavaScript">

- <!--

- function httpGet() {

- var url = "/portal/sessionAccess";

- var xmlHttp = null;

- xmlHttp = new XMLHttpRequest();

- xmlHttp.open("GET", url, false);

- xmlHttp.send(null);

- return xmlHttp;

- }

- function showError(msg) {

- var elError = document.getElementById("error");

- if (elError != null) {

- if (msg) {

- elError.innerHTML = "Following subsystems had problem to start: <b>" + msg + "</b>";

- if (msg.indexOf("storage") != -1) elError.innerHTML += "<br /><i>NOTE: Start at least one storage node as soon as possible.</i>"

- elError.setAttribute("style", elError.getAttribute("style").replace(/display:.*/gi, "display: visible;"));

- } else elError.setAttribute("style", elError.getAttribute("style").replace(/display:.*/gi, "display: none;"));

- }

- }

- function checkIfRunning(attemptNum) {

- var response = httpGet();

- if (response.status === 200) {

- var json = JSON.parse(response.responseText);

- if (json.serverInitialized) {

- location.href = "/coregui";

- } else {

- showError(json.startupError);

- }

- }

- var elProgress = document.getElementById("progress");

- if (elProgress != null) {

- elProgress.innerHTML = elProgress.innerHTML.trim() + "." + (attemptNum % 180 == 0 ? "<br />" : "") ;

- }

- setTimeout("checkIfRunning(" + (attemptNum + 1) + ");", 3000);

- }

- checkIfRunning(16);

- -->

- </script>


- <noscript>

- <h1>Your browser does not support JavaScript!</h1>

- <h2>Please turn it on or use a different browser.</h2>

- <h2>You will NOT be automatically redirected...</h2>

- </noscript>
'/>
-
- <!-- Changing the default content of the welcome page -->
- <replaceregexp file="${jboss.home}/welcome-content/index.html" flags="gis" match='<div class="section">(.*?)</div>' replace='
- <div class="section">

- <h1>Server Initialization</h1>

- <h3>Your server is starting, please wait.</h3>

- <p class="WarnBlock" id="error" style="background-color: #DE7272; display: none;"></p>

- <p class="WarnBlock" id="progress">Starting ..</p>

- <sub>You will be automatically redirected once the server is up and running. If this takes more than 10 minutes, please check the server log for possible issues.</sub>

- </div>'/>
+ <echo file="${jboss.home}/welcome-content/backend-checker.js"><![CDATA[function httpGet() {
+ var url = "/portal/sessionAccess";
+ var xmlHttp = null;
+ xmlHttp = new XMLHttpRequest();
+ xmlHttp.open("GET", url, false);
+ xmlHttp.send(null);
+ return xmlHttp;
+}
+
+function showError(msg) {
+ var elError = document.getElementById("error");
+ if (elError) {
+ if (msg) {
+ elError.innerHTML = "Following subsystems had problem to start: <b>" + msg + "</b>";
+ if (msg.indexOf("storage") != -1) {
+ elError.innerHTML += "<br /><i>NOTE: Start at least one storage node as soon as possible.</i>"
+ }
+ elError.setAttribute("style", elError.getAttribute("style").replace(/display:.*/gi, "display: visible;"));
+ } else elError.setAttribute("style", elError.getAttribute("style").replace(/display:.*/gi, "display: none;"));
+ }
+}
+
+function checkIfRunning(attemptNum) {
+ try {
+ var response = httpGet();
+ } catch (error) {
+ showError(error.message + " Is the server running?");
+ }
+ if (response && response.status === 200) {
+ var json = JSON.parse(response.responseText);
+ if (json.serverInitialized) {
+ location.href = "/coregui";
+ } else showError(json.startupError);
+ }
+ var elProgress = document.getElementById("progress");
+ if (elProgress) {
+ elProgress.innerHTML = elProgress.innerHTML.trim() + "." + (attemptNum % 180 == 0 ? "<br />" : "") ;
+ }
+ setTimeout("checkIfRunning(" + (attemptNum + 1) + ");", 3000);
+}
+
+checkIfRunning(16);]]>
+</echo>
+
+ <!-- Adding the script and noscript elements to the welcome webpage -->
+ <replaceregexp file="${jboss.home}/welcome-content/index.html" flags="gis" match='<body>' replace='<body>

+ <script src="backend-checker.js">
+ </script>

+ <noscript>

+ <h1>Your browser does not support JavaScript!</h1>

+ <h2>Please turn it on or use a different browser.</h2>

+ <h2>You will NOT be automatically redirected...</h2>

+ </noscript>
'/>
+
+ <!-- Changing the default content of the welcome page to support our indications -->
+ <replaceregexp file="${jboss.home}/welcome-content/index.html" flags="gis" match='<div class="section">(.*?)</div>' replace='<div class="section">

+ <h1>Server Initialization</h1>

+ <h3>Your server is starting, please wait.</h3>

+ <p class="WarnBlock" id="error" style="background-color: #DE7272; display: none;"></p>

+ <p class="WarnBlock" id="progress">Starting ..</p>

+ <sub>You will be automatically redirected once the server is up and running. If this takes more than 10 minutes, please check the server log for possible issues.</sub>

+ </div>'/>
</target>
<target name="package-connectors">
10 years, 5 months
[rhq] .classpath
by mazz
.classpath | 1 +
1 file changed, 1 insertion(+)
New commits:
commit 89ae09f21c360914c6ac54b5fa9482aa2da50b85
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Dec 4 12:15:01 2013 -0500
eclipse classpath addition - new trove dep that the plugin container now uses
diff --git a/.classpath b/.classpath
index 918928b..a334ae2 100644
--- a/.classpath
+++ b/.classpath
@@ -380,6 +380,7 @@
<classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/byteman/byteman-install/1.5.2/byteman-install-1.5.2.jar" sourcepath="M2_REPO/org/jboss/byteman/byteman-install/1.5.2/byteman-install-1.5.2-sources.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/byteman/byteman-submit/1.5.2/byteman-submit-1.5.2.jar" sourcepath="M2_REPO/org/jboss/byteman/byteman-submit/1.5.2/byteman-submit-1.5.2-sources.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/byteman/byteman-bmunit/1.5.2/byteman-bmunit-1.5.2.jar" sourcepath="M2_REPO/org/jboss/byteman/byteman-bmunit/1.5.2/byteman-bmunit-1.5.2-sources.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/net/sf/trove4j/trove4j/3.0.3/trove4j-3.0.3.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/cassandra/cassandra-all/1.2.4/cassandra-all-1.2.4.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/thrift/libthrift/0.7.0/libthrift-0.7.0.jar"/>
<classpathentry kind="var" path="M2_REPO/commons-cli/commons-cli/1.2/commons-cli-1.2.jar"/>
10 years, 5 months
[rhq] modules/core modules/enterprise
by Heiko W. Rupp
modules/core/plugin-container/pom.xml | 5
modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java | 75 ++++++----
modules/core/plugin-container/src/test/java/org/rhq/core/pc/bundle/BundleManagerTest.java | 2
modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftManagerTest.java | 2
modules/enterprise/agent/ant-run.xml | 18 +-
5 files changed, 68 insertions(+), 34 deletions(-)
New commits:
commit 81b37adc3805e8eb446c1f040e0a2e996740da44
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Wed Dec 4 11:40:57 2013 +0100
BZ 997670 - Do not go linearly through the list of resources to find by id, but use a map.
Using a TroveIntObjectMap saves ~1MB heap for an inventory of 40k resources opposed to a standard HashMap
diff --git a/modules/core/plugin-container/pom.xml b/modules/core/plugin-container/pom.xml
index f2e6732..426e097 100644
--- a/modules/core/plugin-container/pom.xml
+++ b/modules/core/plugin-container/pom.xml
@@ -84,6 +84,11 @@
<artifactId>commons-io</artifactId>
</dependency>
+ <dependency>
+ <groupId>net.sf.trove4j</groupId>
+ <artifactId>trove4j</artifactId>
+ <version>3.0.3</version>
+ </dependency>
</dependencies>
<build>
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java
index 2e4d52a..5b01a26 100644
--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java
+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java
@@ -46,6 +46,9 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.locks.ReentrantReadWriteLock;
+import gnu.trove.map.TIntObjectMap;
+import gnu.trove.map.hash.TIntObjectHashMap;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jetbrains.annotations.NotNull;
@@ -195,7 +198,12 @@ public class InventoryManager extends AgentService implements ContainerService,
/**
* UUID to ResourceContainer map
*/
- private final Map<String, ResourceContainer> resourceContainers = new ConcurrentHashMap<String, ResourceContainer>(100);
+ private final Map<String, ResourceContainer> resourceContainersByUUID = new ConcurrentHashMap<String, ResourceContainer>(500);
+
+ /**
+ * ResourceID to ResourceContainer map
+ */
+ private final TIntObjectMap<ResourceContainer> resourceContainerByResourceId = new TIntObjectHashMap<ResourceContainer>(500);
/**
* Collection of event listeners to inform of changes to the inventory.
@@ -300,7 +308,8 @@ public class InventoryManager extends AgentService implements ContainerService,
this.discoveryComponentProxyFactory.shutdown();
this.availabilityCollectors.shutdown();
this.inventoryEventListeners.clear();
- this.resourceContainers.clear();
+ this.resourceContainersByUUID.clear();
+ this.resourceContainerByResourceId.clear();
}
/**
@@ -545,13 +554,13 @@ public class InventoryManager extends AgentService implements ContainerService,
@Nullable
public ResourceContainer getResourceContainer(String uuid) {
- return this.resourceContainers.get(uuid);
+ return this.resourceContainersByUUID.get(uuid);
}
@Nullable
public ResourceContainer getResourceContainer(CanonicalResourceKey canonicalId) {
ResourceContainer resourceContainer = null;
- for (Map.Entry<String, ResourceContainer> entry : resourceContainers.entrySet()) {
+ for (Map.Entry<String, ResourceContainer> entry : resourceContainersByUUID.entrySet()) {
ResourceContainer container = entry.getValue();
Resource resource = container.getResource();
if (resource != null) {
@@ -577,12 +586,12 @@ public class InventoryManager extends AgentService implements ContainerService,
String uuid = resource.getUuid();
if (uuid == null)
return null;
- return this.resourceContainers.get(uuid);
+ return this.resourceContainersByUUID.get(uuid);
}
@Nullable
- public ResourceContainer getResourceContainer(Integer resourceId) {
- if ((resourceId == null) || (resourceId == 0)) {
+ public ResourceContainer getResourceContainer(int resourceId) {
+ if (resourceId == 0) {
// I've already found one place where passing in 0 was very bad - I want to be very noisy in the log
// when this happens but not throw an exception, for fear I might break something.
// I'll just return null instead; hopefully, callers are checking for null appropriately.
@@ -596,10 +605,18 @@ public class InventoryManager extends AgentService implements ContainerService,
return null;
}
+ ResourceContainer resourceContainer = this.resourceContainerByResourceId.get(resourceId);
+ if (resourceContainer != null) {
+ return resourceContainer;
+ }
+ // We did not find the UUID in above map.
+ // Check on the classical way if the container is present and populate the
+ // resourceId -> resourceContainer map for the next call into this method.
ResourceContainer retContainer = null;
- for (ResourceContainer container : resourceContainers.values()) {
- if (resourceId.equals(container.getResource().getId())) {
+ for (ResourceContainer container : resourceContainersByUUID.values()) {
+ if (resourceId == container.getResource().getId()) {
retContainer = container;
+ this.resourceContainerByResourceId.put(resourceId, retContainer);
break;
}
}
@@ -1340,7 +1357,7 @@ public class InventoryManager extends AgentService implements ContainerService,
@Nullable
public ResourceComponent<?> getResourceComponent(Resource resource) {
- ResourceContainer resourceContainer = this.resourceContainers.get(resource.getUuid());
+ ResourceContainer resourceContainer = this.resourceContainersByUUID.get(resource.getUuid());
if (resourceContainer == null) {
return null;
@@ -1410,12 +1427,15 @@ public class InventoryManager extends AgentService implements ContainerService,
PluginContainer.getInstance().getMeasurementManager()
.unscheduleCollection(Collections.singleton(resource.getId()));
- if (this.resourceContainers.remove(resource.getUuid()) == null) {
+ if (this.resourceContainersByUUID.remove(resource.getUuid()) == null) {
if (log.isDebugEnabled()) {
log.debug("Asked to remove an unknown Resource [" + resource + "] with UUID [" + resource.getUuid()
+ "]");
}
}
+ else {
+ this.resourceContainerByResourceId.remove(resource.getId());
+ }
// Notify InventoryEventListeners a Resource has been removed.
fireResourcesRemoved(Collections.singleton(resource));
@@ -1509,7 +1529,7 @@ public class InventoryManager extends AgentService implements ContainerService,
* @return
*/
public Availability updateAvailability(Resource resource, AvailabilityType availabilityType) {
- ResourceContainer resourceContainer = this.resourceContainers.get(resource.getUuid());
+ ResourceContainer resourceContainer = resourceContainersByUUID.get(resource.getUuid());
return resourceContainer.updateAvailability(availabilityType);
}
@@ -1657,7 +1677,7 @@ public class InventoryManager extends AgentService implements ContainerService,
List<Resource> activatedResources = new ArrayList<Resource>();
this.inventoryLock.readLock().lock();
try {
- for (ResourceContainer container : this.resourceContainers.values()) {
+ for (ResourceContainer container : this.resourceContainersByUUID.values()) {
if ((container != null) && (container.getResourceComponentState() == ResourceComponentState.STARTED)) {
activatedResources.add(container.getResource());
}
@@ -1687,7 +1707,8 @@ public class InventoryManager extends AgentService implements ContainerService,
// Auto-sync if the PC is running within the embedded JBossAS console.
resourceContainer.setSynchronizationState(ResourceContainer.SynchronizationState.SYNCHRONIZED);
}
- this.resourceContainers.put(resource.getUuid(), resourceContainer);
+ this.resourceContainersByUUID.put(resource.getUuid().intern(), resourceContainer);
+ this.resourceContainerByResourceId.put(resource.getId(), resourceContainer);
} else {
// container already exists, but make sure the classloader exists too
if (resourceContainer.getResourceClassLoader() == null) {
@@ -2144,18 +2165,22 @@ public class InventoryManager extends AgentService implements ContainerService,
inventoryFile.loadInventory();
this.platform = inventoryFile.getPlatform();
- this.resourceContainers.clear();
+ this.resourceContainersByUUID.clear();
+ this.resourceContainerByResourceId.clear();
for (String uuid : inventoryFile.getResourceContainers().keySet()) {
ResourceContainer resourceContainer = inventoryFile.getResourceContainers().get(uuid);
- this.resourceContainers.put(uuid, resourceContainer);
+ this.resourceContainersByUUID.put(uuid, resourceContainer);
+ Resource resource = resourceContainer.getResource();
+ this.resourceContainerByResourceId.put(resource.getId(), resourceContainer);
}
- log.info("Inventory with size [" + this.resourceContainers.size() + "] loaded from data file in ["
+ log.info("Inventory with size [" + this.resourceContainersByUUID.size() + "] loaded from data file in ["
+ (System.currentTimeMillis() - start) + "ms]");
}
} catch (Exception e) {
this.platform = null;
- this.resourceContainers.clear();
+ this.resourceContainersByUUID.clear();
+ this.resourceContainerByResourceId.clear();
if (file != null) {
file.renameTo(new File(file.getAbsolutePath() + ".invalid")); // move it out of the way if we can, retain it for later analysis
}
@@ -2215,7 +2240,7 @@ public class InventoryManager extends AgentService implements ContainerService,
}
File file = new File(dataDir, "inventory.dat");
InventoryFile inventoryFile = new InventoryFile(file);
- inventoryFile.storeInventory(this.platform, this.resourceContainers);
+ inventoryFile.storeInventory(this.platform, this.resourceContainersByUUID);
} catch (Exception e) {
log.error("Could not persist inventory data to disk", e);
}
@@ -3209,9 +3234,11 @@ public class InventoryManager extends AgentService implements ContainerService,
+ resourceFromServer + ".");
// First grab the existing Resource's container, so we can reuse it.
- resourceContainer = this.resourceContainers.remove(existingResource.getUuid());
+ resourceContainer = this.resourceContainersByUUID.remove(existingResource.getUuid());
if (resourceContainer != null) {
- this.resourceContainers.put(resourceFromServer.getUuid(), resourceContainer);
+ this.resourceContainerByResourceId.remove(existingResource.getId());
+ this.resourceContainersByUUID.put(resourceFromServer.getUuid().intern(), resourceContainer);
+ this.resourceContainerByResourceId.put(resourceFromServer.getId(), resourceContainer);
} else {
log.error("No ResourceContainer found for existing " + existingResource + ".");
return;
@@ -3308,7 +3335,7 @@ public class InventoryManager extends AgentService implements ContainerService,
private void purgeObsoleteResources(Set<String> allUuids) {
// Remove previously synchronized Resources that no longer exist in the Server's inventory...
log.debug("Purging obsolete Resources...");
- if (this.resourceContainers == null) {
+ if (this.resourceContainersByUUID == null) {
log.debug("No containers present, immediately returning ..");
return;
}
@@ -3320,10 +3347,10 @@ public class InventoryManager extends AgentService implements ContainerService,
* can be called later without throwing ConcurrentModificationException
*/
Map<String, ResourceContainer> mapForIterating = new HashMap<String, ResourceContainer>(
- this.resourceContainers);
+ this.resourceContainersByUUID);
for (String uuid : mapForIterating.keySet()) {
if (!allUuids.contains(uuid)) {
- ResourceContainer resourceContainer = this.resourceContainers.get(uuid);
+ ResourceContainer resourceContainer = this.resourceContainersByUUID.get(uuid);
if (resourceContainer != null) {
Resource resource = resourceContainer.getResource();
// Only purge stuff that was synchronized at some point. Other stuff may just be newly discovered.
diff --git a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/bundle/BundleManagerTest.java b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/bundle/BundleManagerTest.java
index 6cb6874..3b2b477 100644
--- a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/bundle/BundleManagerTest.java
+++ b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/bundle/BundleManagerTest.java
@@ -455,7 +455,7 @@ public class BundleManagerTest {
}
@Override
- public ResourceContainer getResourceContainer(Integer resourceId) {
+ public ResourceContainer getResourceContainer(int resourceId) {
return idResourceContainerMap.get(resourceId);
}
diff --git a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftManagerTest.java b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftManagerTest.java
index e1ec00d..93832bf 100644
--- a/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftManagerTest.java
+++ b/modules/core/plugin-container/src/test/java/org/rhq/core/pc/drift/DriftManagerTest.java
@@ -393,7 +393,7 @@ public class DriftManagerTest extends DriftTest {
private Map<Integer, ResourceContainer> resourceContainers = new HashMap<Integer, ResourceContainer>();
@Override
- public ResourceContainer getResourceContainer(Integer resourceId) {
+ public ResourceContainer getResourceContainer(int resourceId) {
ResourceContainer container = resourceContainers.get(resourceId);
if (container == null) {
Resource resource = new Resource();
diff --git a/modules/enterprise/agent/ant-run.xml b/modules/enterprise/agent/ant-run.xml
index d6ebbfb..f2e6994 100644
--- a/modules/enterprise/agent/ant-run.xml
+++ b/modules/enterprise/agent/ant-run.xml
@@ -16,11 +16,12 @@ Ant Script that provides ways to package the Agent.
<property name="augeas.classifier" value="el5"/>
<property name="augeas.zip.location" value="${settings.localRepository}/net/augeas/augeas-native/${augeas.version}/"/>
<property name="augeas.zip.mask" value="*-${augeas.classifier}.zip"/>
- <property name="augeas.zip.version" value="0.9.0-4"/>
+ <property name="augeas.zip.version" value="0.9.0-4"/>
<property name="getopt.version" value="1.0.13"/>
<property name="jaxb-api.version" value="2.1"/>
<property name="jaxb-impl.version" value="2.1"/>
<property name="log4j.version" value="1.2.16"/>
+ <property name="trove.version" value="3.0.3"/>
<property name="so.exts" value="*.so.*"/>
<!--
@@ -63,6 +64,7 @@ Ant Script that provides ways to package the Agent.
<include name="org/rhq/rhq-core-client-api/${project.version}/rhq-core-client-api-${project.version}.jar" />
<include name="org/rhq/rhq-common-drift/${project.version}/rhq-common-drift-${project.version}.jar"/>
<include name="commons-io/commons-io/1.4/commons-io-1.4.jar"/>
+ <include name="net/sf/trove4j/trove4j/${trove.version}/trove4j-${trove.version}.jar"/>
</fileset>
</path>
@@ -151,18 +153,18 @@ Ant Script that provides ways to package the Agent.
<include name="${so.exts}" />
</fileset>
</move>
-
+
<move todir="${agent.distro.dir}/lib/augeas/lib64" flatten="true" overwrite="false">
<fileset dir="${agent.distro.dir}/lib/augeas-native-${augeas.zip.version}/lib64">
<include name="*.so" />
<include name="${so.exts}" />
</fileset>
</move>
-
+
<delete failonerror="false" includeEmptyDirs="true" verbose="true">
<fileset dir="${agent.distro.dir}/lib" includes="augeas-native-*/"/>
- </delete>
-
+ </delete>
+
<move todir="${agent.distro.dir}/lib" flatten="true" overwrite="false">
<fileset dir="${agent.distro.dir}/lib">
<include name="**/lib/*" />
@@ -170,14 +172,14 @@ Ant Script that provides ways to package the Agent.
</fileset>
</move>
<move file="${agent.distro.dir}/lib/sigar.jar" tofile="${agent.distro.dir}/lib/sigar-${sigar.version}.jar"
- overwrite="false"/>
+ overwrite="false"/>
<delete failonerror="false" includeEmptyDirs="true" verbose="true">
<fileset dir="${agent.distro.dir}/lib" includes="hyperic-sigar-*/"/>
- </delete>
+ </delete>
<chmod dir="${agent.distro.dir}/lib" perm="ug+rx" includes="*.so,${so.exts},*.sl,*.dylib"/>
<chmod dir="${agent.distro.dir}/lib/augeas/lib" perm="ug+rx" includes="*.so,${so.exts}"/>
<chmod dir="${agent.distro.dir}/lib/augeas/lib64" perm="ug+rx" includes="*.so,${so.exts}"/>
-
+
<copy todir="${agent.distro.dir}/bin">
<fileset dir="${basedir}/src/etc"
includes="*.bat,*.sh"/>
10 years, 5 months
[rhq] modules/enterprise
by mike thompson
modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/dashboard/DashboardsView.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 1a91f5466e59936ffdda887197981e1dcd78cd3b
Author: Mike Thompson <mithomps(a)redhat.com>
Date: Tue Dec 3 15:22:17 2013 -0800
[BZ 1037860] Too many Dashboard tabs disappear off screen. Provide a way to easy navigate many tabs by both scrolling tabs and jumping directly to a dashboard tab.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/dashboard/DashboardsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/dashboard/DashboardsView.java
index faf4d2f..b89ea46 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/dashboard/DashboardsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/dashboard/DashboardsView.java
@@ -31,6 +31,7 @@ import java.util.Set;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.types.Overflow;
+import com.smartgwt.client.types.TabBarControls;
import com.smartgwt.client.util.BooleanCallback;
import com.smartgwt.client.util.SC;
import com.smartgwt.client.widgets.Canvas;
@@ -205,7 +206,7 @@ public class DashboardsView extends EnhancedVLayout implements DashboardContaine
buttons.addMember(editButton);
buttons.addMember(newDashboardButton);
- tabSet.setTabBarControls(buttons);
+ tabSet.setTabBarControls(TabBarControls.TAB_SCROLLER, TabBarControls.TAB_PICKER, buttons );
tabSet.addTabSelectedHandler(new TabSelectedHandler() {
public void onTabSelected(TabSelectedEvent tabSelectedEvent) {
10 years, 5 months