summaryrefslogtreecommitdiff
path: root/java/src
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2013-07-26 22:22:29 +0200
committerJose <jose@zeroc.com>2013-07-26 22:22:29 +0200
commit19d2de617bc2e86f574e5f140d3f9d6ddad124bb (patch)
tree5be0a5ad8b9da954903d438c63556ad73b79feac /java/src
parentIceGrid GUI minor fix (diff)
downloadice-19d2de617bc2e86f574e5f140d3f9d6ddad124bb.tar.bz2
ice-19d2de617bc2e86f574e5f140d3f9d6ddad124bb.tar.xz
ice-19d2de617bc2e86f574e5f140d3f9d6ddad124bb.zip
ICE-5337 - Added MetricsConfigs, and update MetricsAdmin to sliced format.
Diffstat (limited to 'java/src')
-rw-r--r--java/src/IceGridGUI/LiveDeployment/MetricsViewEditor.java29
-rw-r--r--java/src/IceInternal/PropertyNames.java3
2 files changed, 29 insertions, 3 deletions
diff --git a/java/src/IceGridGUI/LiveDeployment/MetricsViewEditor.java b/java/src/IceGridGUI/LiveDeployment/MetricsViewEditor.java
index 6f5283d43d5..8f29f38974e 100644
--- a/java/src/IceGridGUI/LiveDeployment/MetricsViewEditor.java
+++ b/java/src/IceGridGUI/LiveDeployment/MetricsViewEditor.java
@@ -31,6 +31,8 @@ import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
+import java.util.Set;
+import java.util.LinkedHashSet;
import java.text.DecimalFormat;
@@ -250,10 +252,31 @@ public class MetricsViewEditor extends Editor implements MetricsFieldContext
JTree tree = root.getTree();
tree.addTreeSelectionListener(new SelectionListener());
+ Set<String> sectionSort = new LinkedHashSet<String>();
_properties = Ice.Util.createProperties();
+
_properties.load("metrics.cfg");
- _sectionSort = _properties.getPropertyAsList("IceGridGUI.Metrics");
- for(String name : _sectionSort)
+ sectionSort.addAll(java.util.Arrays.asList(_properties.getPropertyAsList("IceGridGUI.Metrics")));
+
+ Coordinator coord = root.getCoordinator();
+ String metricsDefs = coord.getProperties().getProperty("IceGridAdmin.MetricsConfigs");
+ if(!metricsDefs.isEmpty())
+ {
+ for(String s : IceUtilInternal.StringUtil.splitString(metricsDefs, ", \t\r\n"))
+ {
+ try
+ {
+ _properties.load(s);
+ }
+ catch(Ice.FileException ex)
+ {
+ coord.getCommunicator().getLogger().warning("unable to load `" + ex.path + "'");
+ }
+ sectionSort.addAll(java.util.Arrays.asList(_properties.getPropertyAsList("IceGridGUI.Metrics")));
+ }
+ }
+
+ for(String name : sectionSort)
{
String displayName = _properties.getPropertyWithDefault("IceGridGUI.Metrics." + name, "");
if(!displayName.equals(""))
@@ -261,6 +284,8 @@ public class MetricsViewEditor extends Editor implements MetricsFieldContext
_sectionNames.put(name, displayName);
}
}
+
+ _sectionSort = sectionSort.toArray(new String[sectionSort.size()]);
}
}
diff --git a/java/src/IceInternal/PropertyNames.java b/java/src/IceInternal/PropertyNames.java
index 5d6d767cfd0..9f768f8e66b 100644
--- a/java/src/IceInternal/PropertyNames.java
+++ b/java/src/IceInternal/PropertyNames.java
@@ -8,7 +8,7 @@
// **********************************************************************
//
-// Generated by makeprops.py from file ./config/PropertyNames.xml, Tue Mar 19 08:07:05 2013
+// Generated by makeprops.py from file ./config/PropertyNames.xml, Fri Jul 26 17:20:59 2013
// IMPORTANT: Do not edit this file -- any edits made here will be lost!
@@ -226,6 +226,7 @@ public final class PropertyNames
public static final Property IceGridAdminProps[] =
{
new Property("IceGridAdmin\\.AuthenticateUsingSSL", false, null),
+ new Property("IceGridAdmin\\.MetricsConfigs", false, null),
new Property("IceGridAdmin\\.Username", false, null),
new Property("IceGridAdmin\\.Password", false, null),
new Property("IceGridAdmin\\.Replica", false, null),