[rhq] etc/samples modules/core modules/plugins
by mazz
etc/samples/skeleton-plugin/src/main/resources/META-INF/rhq-plugin.xml | 5 -
modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/metadata/MetricsMetadataParser.java | 48 +++++-----
modules/core/client-api/src/main/resources/rhq-plugin.xsd | 20 ++--
modules/plugins/rhq-agent/src/main/resources/META-INF/rhq-plugin.xml | 1
4 files changed, 38 insertions(+), 36 deletions(-)
New commits:
commit 6f20b8c04b13e6637528cae11d9cb48e85993208
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Nov 2 11:38:09 2011 -0400
[BZ 741331] change default intervals
diff --git a/etc/samples/skeleton-plugin/src/main/resources/META-INF/rhq-plugin.xml b/etc/samples/skeleton-plugin/src/main/resources/META-INF/rhq-plugin.xml
index 2547af7..4f4966d 100644
--- a/etc/samples/skeleton-plugin/src/main/resources/META-INF/rhq-plugin.xml
+++ b/etc/samples/skeleton-plugin/src/main/resources/META-INF/rhq-plugin.xml
@@ -97,10 +97,7 @@
-->
<metric property="MeasurementName"
displayName="The Measurement Name"
- description="Describes what this measurement is actually telling you"
- defaultOn="true"
- defaultInterval="300000"
- category="performance" />
+ description="Describes what this measurement is actually telling you" />
<!--
CHANGE: Resource configuration properties are used to configure resources themselves, as compared to the plugin
diff --git a/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/metadata/MetricsMetadataParser.java b/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/metadata/MetricsMetadataParser.java
index 77ecd37..c5e294f 100644
--- a/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/metadata/MetricsMetadataParser.java
+++ b/modules/core/client-api/src/main/java/org/rhq/core/clientapi/agent/metadata/MetricsMetadataParser.java
@@ -44,11 +44,12 @@ import org.rhq.core.domain.util.StringUtils;
* @author Greg Hinkle
*/
public class MetricsMetadataParser {
- private static final long MIN_1 = 1L * 60 * 1000L;
- private static final long MIN_10 = 10L * MIN_1;
- private static final long MIN_20 = 20L * MIN_1;
- private static final long MIN_30 = 30L * MIN_1;
- private static final long MIN_60 = 60L * MIN_1;
+ private static final long MINUTE_1 = 1L * 60 * 1000L;
+ private static final long MINUTE_10 = 10L * MINUTE_1;
+ private static final long MINUTE_20 = 20L * MINUTE_1;
+ private static final long MINUTE_30 = 30L * MINUTE_1;
+ private static final long HOUR_1 = 60L * MINUTE_1;
+ private static final long HOUR_24 = HOUR_1 * 24;
public static final long MINIMUM_INTERVAL = MeasurementSchedule.MINIMUM_INTERVAL;
@@ -59,24 +60,24 @@ public class MetricsMetadataParser {
DataType dataType = DataType.valueOf(metricDescriptor.getDataType().toUpperCase());
DisplayType displayType = DisplayType.valueOf(metricDescriptor.getDisplayType().toUpperCase());
- long collectionInterval = MIN_30;
+ long collectionInterval = MINUTE_30;
MeasurementUnits units = getMeasurementUnits(metricDescriptor.getUnits(), dataType);
switch (dataType) {
case MEASUREMENT: {
switch (resourceType.getCategory()) {
case PLATFORM: {
- collectionInterval = MIN_10;
+ collectionInterval = MINUTE_10;
break;
}
case SERVER: {
- collectionInterval = MIN_20;
+ collectionInterval = MINUTE_10;
break;
}
case SERVICE: {
- collectionInterval = MIN_30;
+ collectionInterval = MINUTE_20;
break;
}
}
@@ -88,12 +89,12 @@ public class MetricsMetadataParser {
}
case TRAIT: {
- collectionInterval = (displayType == DisplayType.SUMMARY) ? MIN_30 : MIN_60;
+ collectionInterval = HOUR_24; // BZ 741331 no difference between summary and detail
break;
}
case CALLTIME: {
- collectionInterval = MIN_10;
+ collectionInterval = MINUTE_10;
if (units != MeasurementUnits.MILLISECONDS) {
throw new IllegalStateException("Units must always be set to 'milliseconds' for call-time metrics.");
}
@@ -110,10 +111,10 @@ public class MetricsMetadataParser {
(metricDescriptor.getDefaultInterval() == null) ? collectionInterval : metricDescriptor
.getDefaultInterval().longValue());
- definition = new MeasurementDefinition(metricDescriptor.getProperty(), MeasurementCategory
- .valueOf(metricDescriptor.getCategory().toUpperCase()), getMeasurementUnits(metricDescriptor.getUnits(),
- dataType), dataType, NumericType.valueOf(metricDescriptor.getMeasurementType().toUpperCase()),
- metricDescriptor.isDefaultOn(), collectionInterval, displayType);
+ definition = new MeasurementDefinition(metricDescriptor.getProperty(),
+ MeasurementCategory.valueOf(metricDescriptor.getCategory().toUpperCase()), getMeasurementUnits(
+ metricDescriptor.getUnits(), dataType), dataType, NumericType.valueOf(metricDescriptor
+ .getMeasurementType().toUpperCase()), metricDescriptor.isDefaultOn(), collectionInterval, displayType);
if (metricDescriptor.getDisplayName() != null) {
definition.setDisplayName(metricDescriptor.getDisplayName());
@@ -129,19 +130,22 @@ public class MetricsMetadataParser {
definition.setDestinationType(metricDescriptor.getDestinationType());
// Make sure that all summary properties are on by default.
- // BZ 741331 - we no longer want to imply any metric should be on by default
- // let the plugin writer tell us explicitly if it should be on by default
- // if (definition.getDisplayType() == DisplayType.SUMMARY) {
- // definition.setDefaultOn(true);
- // }
+ // It is assumed that if a plugin developer marks a metric as "summary" (which
+ // shows the metric's graph within the graph page of the UI) then he doesn't want
+ // to show an empty graph by default. Therefore, a summary metric will always be
+ // enabled by default. You can't say a metric is a "summary" metric but with
+ // defaultOn="false". The defaultOn will be overridden here and will be set to true.
+ if (definition.getDisplayType() == DisplayType.SUMMARY) {
+ definition.setDefaultOn(true);
+ }
if ((definition.getNumericType() == NumericType.TRENDSUP)
|| (definition.getNumericType() == NumericType.TRENDSDOWN)) {
ArrayList<MeasurementDefinition> definitions = new ArrayList<MeasurementDefinition>();
MeasurementDefinition perMinuteMetric = new MeasurementDefinition(definition);
- // Default to applying defaultOn, SUMMARY type, etc. to the per-minute version of the metric,
- // so only the per-minute, and not the raw, is enabled by default.
+ // Disable the raw metric since that is usually what the user will want. Typically,
+ // the user will only care about the per-minute metric.
definition.setDisplayType(DisplayType.DETAIL);
definition.setDefaultOn(false);
diff --git a/modules/core/client-api/src/main/resources/rhq-plugin.xsd b/modules/core/client-api/src/main/resources/rhq-plugin.xsd
index 927d0d7..df31a44 100644
--- a/modules/core/client-api/src/main/resources/rhq-plugin.xsd
+++ b/modules/core/client-api/src/main/resources/rhq-plugin.xsd
@@ -202,16 +202,16 @@
<xs:annotation>
<xs:documentation>
The default collection interval, in milliseconds. The metric is not necessarily
- enabled by default - see the defaultOn attribute for that. The minimum allowed
- value is 30000 (30 seconds). If unspecified, the default collection interval is
- set according to the Resource category, metric data type, and metric display
- type, as follows:
+ enabled by default - see the defaultOn and displayType attributes for that.
+ The minimum allowed value is 30000 (30 seconds).
+ If unspecified, the default collection interval is set according to the
+ resource type category, metric data type, and metric display type, as follows:
- platform numeric metrics: summary - 1m, detail - 2m
- server numeric metrics: summary - 5m, detail - 10m
- service numeric metrics: summary - 10m, detail - 20m
- traits: summary - 10m, detail - 30m
- call-time metrics: 1m
+ Platform numeric metrics: summary - 10m, detail - 20m
+ Server numeric metrics: summary - 10m, detail - 20m
+ Service numeric metrics: summary - 20m, detail - 40m
+ All Traits: summary and detail - 24 hours
+ Calltime metrics: 10m
</xs:documentation>
</xs:annotation>
<xs:simpleType>
@@ -225,6 +225,8 @@
<xs:documentation>
If true, this metric will get collected as soon as possible.
If false, a user must explicitly tell the plugin to collect this metric.
+ This is only used for metrics with a displayType of "detail". All
+ "summary" metrics are enabled by default, regardless of this value.
</xs:documentation>
</xs:annotation>
</xs:attribute>
diff --git a/modules/plugins/rhq-agent/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/rhq-agent/src/main/resources/META-INF/rhq-plugin.xml
index 69cbf8a..ee83f0c 100644
--- a/modules/plugins/rhq-agent/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/rhq-agent/src/main/resources/META-INF/rhq-plugin.xml
@@ -196,7 +196,6 @@
displayName="Agent Home Directory"
dataType="trait"
displayType="detail"
- defaultInterval="86400000"
description="The directory where the agent is installed" />
<metric property="NumberAgentRestarts"
12 years, 6 months
[rhq] Branch 'release_jon3.x' - 2 commits - modules/core modules/enterprise
by John Sanda
modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftDefinition.java | 1
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDefinitionTemplatesView.java | 50 ++++------
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java | 11 ++
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties | 3
5 files changed, 40 insertions(+), 27 deletions(-)
New commits:
commit 8955805230d595349a578326ff570946e96a80fd
Author: John Sanda <jsanda(a)redhat.com>
Date: Wed Nov 2 15:13:33 2011 -0400
[BZ 750895] Update the attached field when the definitions configuration is updated
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftDefinition.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftDefinition.java
index 081f3b6..efb9ac2 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftDefinition.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftDefinition.java
@@ -237,6 +237,7 @@ public class DriftDefinition implements Serializable {
interval = getIntervalProperty();
driftHandlingMode = getDriftHandlingModeProperty();
isPinned = getIsPinnedProperty();
+ attached = getAttachedProperty();
}
public Resource getResource() {
commit 5dfd88f388c15c02faac819268d237f07ab64d9a
Author: John Sanda <jsanda(a)redhat.com>
Date: Wed Nov 2 15:00:12 2011 -0400
[BZ 749899] Adding support for deleting drift templates
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDefinitionTemplatesView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDefinitionTemplatesView.java
index 8b0e4d5..2c5f2f0 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDefinitionTemplatesView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDefinitionTemplatesView.java
@@ -21,6 +21,7 @@ package org.rhq.enterprise.gui.coregui.client.drift;
import java.util.ArrayList;
+import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.data.SortSpecifier;
import com.smartgwt.client.types.SortDirection;
import com.smartgwt.client.widgets.Canvas;
@@ -30,12 +31,15 @@ import com.smartgwt.client.widgets.grid.ListGridRecord;
import org.rhq.core.domain.common.EntityContext;
import org.rhq.core.domain.drift.DriftCategory;
import org.rhq.core.domain.resource.ResourceType;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.ViewPath;
import org.rhq.enterprise.gui.coregui.client.admin.templates.DriftDefinitionTemplateTypeView;
import org.rhq.enterprise.gui.coregui.client.components.table.AbstractTableAction;
import org.rhq.enterprise.gui.coregui.client.components.table.TableActionEnablement;
import org.rhq.enterprise.gui.coregui.client.components.table.TableSection;
import org.rhq.enterprise.gui.coregui.client.drift.wizard.DriftAddDefinitionWizard;
+import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message;
/**
* A list view that displays a paginated table of {@link org.rhq.core.domain.drift.DriftDefinitionTemplate}s. It
@@ -121,7 +125,7 @@ public class DriftDefinitionTemplatesView extends TableSection<DriftDefinitionTe
}
});
- addTableAction("Delete", MSG.common_button_delete(), MSG.view_drift_delete_defConfirm(),
+ addTableAction("Delete", MSG.common_button_delete(), MSG.view_drift_template_delete_confirm(),
new AbstractTableAction(deleteEnablement) {
boolean result = false;
@@ -155,35 +159,27 @@ public class DriftDefinitionTemplatesView extends TableSection<DriftDefinitionTe
DriftDefinitionTemplatesView.this.refreshTableInfo();
}
- private void delete(ListGridRecord[] records) {
- // TODO
-
- // final String[] driftDefNames = new String[records.length];
- // for (int i = 0, selectionLength = records.length; i < selectionLength; i++) {
- // ListGridRecord record = records[i];
- // String driftDefName = record.getAttribute(DriftDefinitionDataSource.ATTR_NAME);
- // driftDefNames[i] = driftDefName;
- // }
+ private void delete(final ListGridRecord[] records) {
+ int[] templateIds = new int[records.length];
+ for (int i = 0; i < records.length; ++i) {
+ templateIds[i] = Integer.parseInt(records[i].getAttribute(DriftDefinitionTemplateDataSource.ATTR_ID));
+ }
+ GWTServiceLookup.getDriftService().deleteDriftDefinitionTemplates(templateIds, new AsyncCallback<Void>() {
+ @Override
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(MSG.view_drift_template_delete_failure(), caught);
+ DriftDefinitionTemplatesView.this.refresh();
+ }
- //deleteDriftDefinitionTemplatesByName(driftDefNames);
+ @Override
+ public void onSuccess(Void result) {
+ CoreGUI.getMessageCenter().notify(new Message(MSG.view_drift_template_delete_success(
+ Integer.toString(records.length)), Message.Severity.Info));
+ DriftDefinitionTemplatesView.this.refresh();
+ }
+ });
}
- // private void deleteDriftDefinitionsByName(final String[] driftDefNames) {
- // GWTServiceLookup.getDriftService().deleteDriftDefinitionsByContext(context, driftDefNames,
- // new AsyncCallback<Integer>() {
- // public void onSuccess(Integer resultCount) {
- // CoreGUI.getMessageCenter().notify(
- // new Message(MSG.view_drift_success_deleteDefs(String.valueOf(resultCount)),
- // Message.Severity.Info));
- // refresh();
- // }
- //
- // public void onFailure(Throwable caught) {
- // CoreGUI.getErrorHandler().handleError(MSG.view_drift_failure_deleteDefs(), caught);
- // }
- // });
- // }
-
@Override
public void renderView(ViewPath viewPath) {
// we have two detail views for drift def templates, the config editor and the pinned snapshot. Figure out which
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java
index 5a70bc6..7566831 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java
@@ -105,6 +105,8 @@ public interface DriftGWTService extends RemoteService {
PageList<DriftDefinitionTemplate> findDriftDefinitionTemplatesByCriteria(DriftDefinitionTemplateCriteria criteria)
throws RuntimeException;
+ void deleteDriftDefinitionTemplates(int[] templateIds) throws RuntimeException;
+
/**
* Find all drifts that match the specified criteria.
*
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
index 8ac2d4a..5302362 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
@@ -154,6 +154,17 @@ public class DriftGWTServiceImpl extends AbstractGWTServiceImpl implements Drift
}
@Override
+ public void deleteDriftDefinitionTemplates(int[] templateIds) throws RuntimeException {
+ try {
+ for (int templateId : templateIds) {
+ driftTemplateManager.deleteTemplate(getSessionSubject(), templateId);
+ }
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+ @Override
public DriftSnapshot getSnapshot(DriftSnapshotRequest request) throws RuntimeException {
try {
DriftSnapshot results = driftManager.getSnapshot(getSessionSubject(), request);
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
index 623cab9..32db3fc 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
@@ -1224,6 +1224,9 @@ view_drift_wizard_addDef_success = Successfully added new drift detection defini
view_drift_wizard_addDef_templatePrompt = Drift Definition Templates
view_drift_wizard_addDef_title = Add Drift Detection Definition for Resource of Type [{0}]
view_drift_wizard_addDef_windowTitle = Add Drift Detection Definition Wizard
+view_drift_template_delete_confirm = Warning! Deleting this template will also cause all attached drift definitions to be deleted as well. Those attached definitions along with all of their snapshots will be permanently removed from the system. Detached definitions will not be removed. Are you sure you want to continue?
+view_drift_template_delete_success = Successfully deleted {0} drift templates
+view_drift_template_delete_failure = "Failed to delete some or all of the drift templates
view_drift_wizard_addTemplate_failure = Failed to add new drift template [{0}]
view_drift_wizard_addTemplate_infoStepHelp = Each drift template is derived from an existing template. This provides a quick way to build new templates that are similar to existing templates, or originate with plugin defined templates. Like a drift definition, the template describes a set of files for which drift monitoring will be performed. Depending on the situation a definition derived from the template may or may not be allowed to alter the file set, or change other settings. Template names must be unique within a resource type.
view_drift_wizard_addTemplate_infoStepName = Select the Starting Template
12 years, 6 months
[rhq] 2 commits - modules/core modules/enterprise
by John Sanda
modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftDefinition.java | 1
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDefinitionTemplatesView.java | 50 ++++------
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java | 11 ++
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties | 3
5 files changed, 40 insertions(+), 27 deletions(-)
New commits:
commit 1eb5ab398ad4c37cee6aed9c069cb1887a1fe2b2
Author: John Sanda <jsanda(a)redhat.com>
Date: Wed Nov 2 15:13:33 2011 -0400
[BZ 750895] Update the attached field when the definitions configuration is updated
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftDefinition.java b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftDefinition.java
index 081f3b6..efb9ac2 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftDefinition.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/drift/DriftDefinition.java
@@ -237,6 +237,7 @@ public class DriftDefinition implements Serializable {
interval = getIntervalProperty();
driftHandlingMode = getDriftHandlingModeProperty();
isPinned = getIsPinnedProperty();
+ attached = getAttachedProperty();
}
public Resource getResource() {
commit 0049694dd5e7b73eb45470d6dce09ca1f350581a
Author: John Sanda <jsanda(a)redhat.com>
Date: Wed Nov 2 15:00:12 2011 -0400
[BZ 749899] Adding support for deleting drift templates
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDefinitionTemplatesView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDefinitionTemplatesView.java
index 8b0e4d5..2c5f2f0 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDefinitionTemplatesView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/drift/DriftDefinitionTemplatesView.java
@@ -21,6 +21,7 @@ package org.rhq.enterprise.gui.coregui.client.drift;
import java.util.ArrayList;
+import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.data.SortSpecifier;
import com.smartgwt.client.types.SortDirection;
import com.smartgwt.client.widgets.Canvas;
@@ -30,12 +31,15 @@ import com.smartgwt.client.widgets.grid.ListGridRecord;
import org.rhq.core.domain.common.EntityContext;
import org.rhq.core.domain.drift.DriftCategory;
import org.rhq.core.domain.resource.ResourceType;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.ViewPath;
import org.rhq.enterprise.gui.coregui.client.admin.templates.DriftDefinitionTemplateTypeView;
import org.rhq.enterprise.gui.coregui.client.components.table.AbstractTableAction;
import org.rhq.enterprise.gui.coregui.client.components.table.TableActionEnablement;
import org.rhq.enterprise.gui.coregui.client.components.table.TableSection;
import org.rhq.enterprise.gui.coregui.client.drift.wizard.DriftAddDefinitionWizard;
+import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message;
/**
* A list view that displays a paginated table of {@link org.rhq.core.domain.drift.DriftDefinitionTemplate}s. It
@@ -121,7 +125,7 @@ public class DriftDefinitionTemplatesView extends TableSection<DriftDefinitionTe
}
});
- addTableAction("Delete", MSG.common_button_delete(), MSG.view_drift_delete_defConfirm(),
+ addTableAction("Delete", MSG.common_button_delete(), MSG.view_drift_template_delete_confirm(),
new AbstractTableAction(deleteEnablement) {
boolean result = false;
@@ -155,35 +159,27 @@ public class DriftDefinitionTemplatesView extends TableSection<DriftDefinitionTe
DriftDefinitionTemplatesView.this.refreshTableInfo();
}
- private void delete(ListGridRecord[] records) {
- // TODO
-
- // final String[] driftDefNames = new String[records.length];
- // for (int i = 0, selectionLength = records.length; i < selectionLength; i++) {
- // ListGridRecord record = records[i];
- // String driftDefName = record.getAttribute(DriftDefinitionDataSource.ATTR_NAME);
- // driftDefNames[i] = driftDefName;
- // }
+ private void delete(final ListGridRecord[] records) {
+ int[] templateIds = new int[records.length];
+ for (int i = 0; i < records.length; ++i) {
+ templateIds[i] = Integer.parseInt(records[i].getAttribute(DriftDefinitionTemplateDataSource.ATTR_ID));
+ }
+ GWTServiceLookup.getDriftService().deleteDriftDefinitionTemplates(templateIds, new AsyncCallback<Void>() {
+ @Override
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(MSG.view_drift_template_delete_failure(), caught);
+ DriftDefinitionTemplatesView.this.refresh();
+ }
- //deleteDriftDefinitionTemplatesByName(driftDefNames);
+ @Override
+ public void onSuccess(Void result) {
+ CoreGUI.getMessageCenter().notify(new Message(MSG.view_drift_template_delete_success(
+ Integer.toString(records.length)), Message.Severity.Info));
+ DriftDefinitionTemplatesView.this.refresh();
+ }
+ });
}
- // private void deleteDriftDefinitionsByName(final String[] driftDefNames) {
- // GWTServiceLookup.getDriftService().deleteDriftDefinitionsByContext(context, driftDefNames,
- // new AsyncCallback<Integer>() {
- // public void onSuccess(Integer resultCount) {
- // CoreGUI.getMessageCenter().notify(
- // new Message(MSG.view_drift_success_deleteDefs(String.valueOf(resultCount)),
- // Message.Severity.Info));
- // refresh();
- // }
- //
- // public void onFailure(Throwable caught) {
- // CoreGUI.getErrorHandler().handleError(MSG.view_drift_failure_deleteDefs(), caught);
- // }
- // });
- // }
-
@Override
public void renderView(ViewPath viewPath) {
// we have two detail views for drift def templates, the config editor and the pinned snapshot. Figure out which
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java
index 5a70bc6..7566831 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/DriftGWTService.java
@@ -105,6 +105,8 @@ public interface DriftGWTService extends RemoteService {
PageList<DriftDefinitionTemplate> findDriftDefinitionTemplatesByCriteria(DriftDefinitionTemplateCriteria criteria)
throws RuntimeException;
+ void deleteDriftDefinitionTemplates(int[] templateIds) throws RuntimeException;
+
/**
* Find all drifts that match the specified criteria.
*
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
index 8ac2d4a..5302362 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/DriftGWTServiceImpl.java
@@ -154,6 +154,17 @@ public class DriftGWTServiceImpl extends AbstractGWTServiceImpl implements Drift
}
@Override
+ public void deleteDriftDefinitionTemplates(int[] templateIds) throws RuntimeException {
+ try {
+ for (int templateId : templateIds) {
+ driftTemplateManager.deleteTemplate(getSessionSubject(), templateId);
+ }
+ } catch (Throwable t) {
+ throw getExceptionToThrowToClient(t);
+ }
+ }
+
+ @Override
public DriftSnapshot getSnapshot(DriftSnapshotRequest request) throws RuntimeException {
try {
DriftSnapshot results = driftManager.getSnapshot(getSessionSubject(), request);
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
index 623cab9..32db3fc 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
@@ -1224,6 +1224,9 @@ view_drift_wizard_addDef_success = Successfully added new drift detection defini
view_drift_wizard_addDef_templatePrompt = Drift Definition Templates
view_drift_wizard_addDef_title = Add Drift Detection Definition for Resource of Type [{0}]
view_drift_wizard_addDef_windowTitle = Add Drift Detection Definition Wizard
+view_drift_template_delete_confirm = Warning! Deleting this template will also cause all attached drift definitions to be deleted as well. Those attached definitions along with all of their snapshots will be permanently removed from the system. Detached definitions will not be removed. Are you sure you want to continue?
+view_drift_template_delete_success = Successfully deleted {0} drift templates
+view_drift_template_delete_failure = "Failed to delete some or all of the drift templates
view_drift_wizard_addTemplate_failure = Failed to add new drift template [{0}]
view_drift_wizard_addTemplate_infoStepHelp = Each drift template is derived from an existing template. This provides a quick way to build new templates that are similar to existing templates, or originate with plugin defined templates. Like a drift definition, the template describes a set of files for which drift monitoring will be performed. Depending on the situation a definition derived from the template may or may not be allowed to alter the file set, or change other settings. Template names must be unique within a resource type.
view_drift_wizard_addTemplate_infoStepName = Select the Starting Template
12 years, 6 months
[rhq] pom.xml
by Heiko W. Rupp
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit f09bea7c2c684739596b6ea0287a940def31b387
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Wed Nov 2 18:16:22 2011 +0100
Bump max memory setting for surefire tests, as the old one is no longer enough in some scenarios.
diff --git a/pom.xml b/pom.xml
index 040e7e6..5489e1e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -619,7 +619,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>2.10</version>
<configuration>
- <argLine>-Xms16M -Xmx256M</argLine>
+ <argLine>-Xms16M -Xmx512M</argLine>
</configuration>
</plugin>
<plugin>
12 years, 6 months
[rhq] Branch 'feature/rest' - modules/enterprise
by Heiko W. Rupp
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/CustomExceptionMapper.java | 2 --
1 file changed, 2 deletions(-)
New commits:
commit 001a8e84ccb27d43979c10ce2103a6106440dfea
Author: Heiko W. Rupp <pilhuhn(a)fedoraproject.org>
Date: Wed Nov 2 17:58:59 2011 +0100
Remove bogus import.
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/CustomExceptionMapper.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/CustomExceptionMapper.java
index ff160e2..d951767 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/CustomExceptionMapper.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/rest/CustomExceptionMapper.java
@@ -23,8 +23,6 @@ import javax.ws.rs.core.Response;
import javax.ws.rs.ext.ExceptionMapper;
import javax.ws.rs.ext.Provider;
-import sun.security.provider.certpath.OCSPResponse;
-
import org.rhq.enterprise.server.resource.ResourceNotFoundException;
/**
12 years, 6 months
[rhq] Changes to 'refs/tags/rhq-pluginGen-3.0.4'
by ips
Changes since RHQ_3_0_1_GA:
Filip Drabek (1):
BZ-669542 - Deploying exploded WAR to JBoss EAP 5 throws NPE operation fails
Ian Springer (2):
handle plugin jars whose manifest is not the 2nd entry in the jarfile (https://bugzilla.redhat.com/show_bug.cgi?id=682116)
a new 3.0.4 release of pluginAnnotations and pluginGen modules that changes the
Jay Shaughnessy (1):
New and Improved HibernateDetachUtility, now with enhanced collision
John Mazzitelli (2):
cherry pick - this only does server-side alert engine - no UI support for RANGE alert conditions yet
[BZ 735262] this finishes the back port into release-3.0.1 to support alerting on a range of values. this still needs some testing
John Sanda (10):
[maven-release-plugin] prepare for next development iteration
Updating module versions to 3.0.1.GA
[BZ 677349] Do not obtain PC read lock prematurely
[BZ 677349] Adding logic to avoid deadlock during PC initialization
Removing file that was accidentally committed from merge conflict
[BZ 690430] Adding support for disabling SSL cert verification
[BZ 690430,690412] Adding additional logging for SSL exceptions
[BZ 690430] Removing plugin config for disabling cert validation
Further parameterizeing dbreset script
Refactoring logic in dbreset script for use with upgrade db
Larry O'Leary (6):
[Bug 700121] LDAP Group Member search doesn't escape special characters
[BZ 712192] [JON 2.4.1] Configuration hibernate proxy not being detached by HibernateDetachUtility and resulting in ClassNotFoundException
BZ-721151: Java Memory Leak caused by leaked Augeas resources
[BZ-732089] A fix to the identity collision logic, preventing falling through to the
Bug 736792 - CLI retrieveBackingContent gives a file not found exception on the agent
Fix build issues due to recent commits
Lukas Krejci (23):
need to update vhost::getNode() to not use the matching. basically I need
BZ 700616 - First pass at converting the discovery to using the runtime configuration.
BZ 700616 - apache server discovery component uses runtime discovery as well now
BZ 700616 - apache vhost resource configuration loading/update converted to take advantage of the SNMP WWW Service Index property, no imperfect RK matching anymore.
BZ 700616 - adding a new operation to apache server resource to detect the SNMP WWW Service Index values for individual virtual hosts. This is to a) support users when upgrading from RHQ 3.0.1 vanilla and b) to aid the users with reconfiguring the monitoring of vhosts after they changed order in the configuration files.
BZ 700461 - ResourceContext.getNativeProcess() now always reports the current process info or null if no process exists for given resource.
BZ 700616 - runtime config extracted even in the case server root was redefined in the config files.
BZ 700616 - porting over the alphabetic order awareness in glob patterns from master
Tests for the inclusion order and IfModule and IfDefine detection.
BZ 700616 - behave the same as apache when handling the corner case of unresolvable hostnames in virtual host address definition.
Adding IfVersion detection tests, removed the vhost-names test that will come in as standalone test because their not part of the runtime configuration extraction
Adding tests for the ability to produce the same server and port identifications as advertised by SNMP module in various scenarios.
BZ 700616 - Augeas tree abstraction now replaces the Include nodes with their contents instead of just appending their contents to their children list.
BZ 700616 - adding a default value to the new snmpWwwServiceIndex property so that updating the plugin actually works when there are some inventoried vhosts already on the server. Also removing the constraint so that the user is free to enter < 1 values to disable monitoring.
BZ 700616 - using the legacy code to create the virtual host resource keys to ensure the backwards compatibility with previous versions of the plugin.
BZ 700616 - ported over the code from master to handle the user provided module name <-> source file mappings for apache modules.
BZ 700616 - make sure to call getVersion() instead of resourceContext.getVersion() directly. This is just to workaround the possible null version being returned from the resourceContext in rare circumstances.
BZ 704486 - Improving the logging behavior of the unknown apache modules.
PERF - don't compile the regex patterns each time we instantiate a directive
BZ 694476 - fixing the handling of loaded modules.
BZ 690435 - Changing the main server vhost to always use the SNMP-like resource key to prevent the appearance of duplicates when parent server's URL property changes.
BZ 721151 - fixing the augeas memory leak - cherrypicked over from release-3.0.0
BZ 738027 - Working around the property names inconsistency in the clustered web app contexts.
Simeon Pinder (2):
BZ-689992: adding customizing for max start/stop WAIT_MAX times.
BZ 707342: JON 2.4 not allowing update of Resource name.
Stefan Negrea (2):
Fixing the formating for inline pom code.
BZ729991 - Updated the group alerts history gui expressions for sort to match the generated sql query.
---
.classpath | 5
modules/cli-tests/pom.xml | 2
modules/core/client-api/src/main/java/org/rhq/core/clientapi/descriptor/PluginTransformer.java | 27
modules/core/dbutils/pom.xml | 35
modules/core/domain/src/main/java/org/rhq/core/domain/alert/AlertCondition.java | 43
modules/core/domain/src/main/java/org/rhq/core/domain/alert/AlertConditionCategory.java | 4
modules/core/domain/src/main/java/org/rhq/core/domain/alert/composite/AlertConditionRangeCategoryComposite.java | 48
modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceContext.java | 22
modules/core/plugin-container/src/main/java/org/rhq/core/pc/PluginContainer.java | 42
modules/core/plugin-container/src/main/java/org/rhq/core/pc/event/EventContextImpl.java | 29
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/common/monitor/alerts/AlertDefUtil.java | 33
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/common/monitor/alerts/ViewAlertAction.java | 2
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/common/monitor/alerts/config/ConditionBean.java | 28
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/common/monitor/alerts/config/DefinitionForm.java | 6
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/common/monitor/alerts/config/condition/ConverterValidatorManager.java | 2
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/common/monitor/alerts/config/condition/MeasurementConverterValidator.java | 53
modules/enterprise/gui/portal-war/src/main/webapp-filtered/WEB-INF/classes/ApplicationResources.properties | 4
modules/enterprise/gui/portal-war/src/main/webapp/resource/common/monitor/alerts/config/DefinitionCondition.jsp | 23
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/alert/listGroupAlertHistory.xhtml | 6
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertConditionManagerBean.java | 3
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertManagerBean.java | 63
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/internal/AgentConditionCache.java | 54
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/internal/AlertConditionCacheUtils.java | 17
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/engine/model/MeasurementRangeNumericCacheElement.java | 95
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/i18n/AlertI18NResourceKeys.java | 38
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerBean.java | 26
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerLocal.java | 2
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceFactoryManagerRemote.java | 6
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/group/LdapGroupManagerBean.java | 138 +
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/webservices/WebservicesManagerBean.java | 6
modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/alert/engine/model/MeasurementRangeNumericCacheElementTest.java | 96
modules/enterprise/server/safe-invoker/src/main/java/org/rhq/enterprise/server/safeinvoker/HibernateDetachUtility.java | 300 ++
modules/helpers/pluginAnnotations/pom.xml | 13
modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/DataType.java | 2
modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/DisplayType.java | 2
modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/MeasurementType.java | 1
modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/Metric.java | 7
modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/Operation.java | 7
modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/Parameter.java | 3
modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/Units.java | 1
modules/helpers/pluginGen/pom.xml | 21
modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/Props.java | 65
modules/helpers/pluginGen/src/main/resources/descriptorMain.ftl | 12
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheDirectoryComponent.java | 122 -
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheDirectoryDiscoveryComponent.java | 79
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheIfModuleComponent.java | 135 -
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheIfModuleDirectoryComponent.java | 65
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheIfModuleDirectoryDiscoveryComponent.java | 60
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheIfModuleDiscoveryComponent.java | 61
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerComponent.java | 503 ++--
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerDiscoveryComponent.java | 171 +
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheServerOperationsDelegate.java | 72
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceComponent.java | 509 +---
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceDiscoveryComponent.java | 293 ++
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/ApacheAugeasNode.java | 69
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/AugeasConfigurationApache.java | 6
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/AugeasTreeBuilderApache.java | 25
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/ApacheDirective.java | 33
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/ApacheDirectiveTree.java | 10
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/ApacheParserImpl.java | 2
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/ApacheBinaryInfo.java | 70
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/HttpdAddressUtility.java | 193 +
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/RuntimeApacheConfiguration.java | 542 +++++
modules/plugins/apache/src/main/java/org/rhq/plugins/www/util/WWWUtils.java | 73
modules/plugins/apache/src/main/resources/META-INF/rhq-plugin.xml | 52
modules/plugins/apache/src/test/java/org/rhq/plugins/apache/ApacheAugeasTest.java | 242 +-
modules/plugins/apache/src/test/java/org/rhq/plugins/apache/RuntimeConfigurationTest.java | 208 +
modules/plugins/apache/src/test/java/org/rhq/plugins/apache/SnmpMappingTest.java | 140 +
modules/plugins/apache/src/test/java/org/rhq/plugins/apache/util/MockApacheBinaryInfo.java | 126 +
modules/plugins/apache/src/test/java/org/rhq/plugins/apache/util/MockProcessInfo.java | 51
modules/plugins/apache/src/test/resources/runtime-config/conditional/httpd.conf | 2
modules/plugins/apache/src/test/resources/runtime-config/conditional/ifdefine-defined.conf | 5
modules/plugins/apache/src/test/resources/runtime-config/conditional/ifdefine-undefined.conf | 5
modules/plugins/apache/src/test/resources/runtime-config/conditional/ifmodule-loaded.conf | 13
modules/plugins/apache/src/test/resources/runtime-config/conditional/ifmodule-not-loaded.conf | 11
modules/plugins/apache/src/test/resources/runtime-config/conditional/ifversion.conf | 43
modules/plugins/apache/src/test/resources/runtime-config/conditional/nested-mess.conf | 51
modules/plugins/apache/src/test/resources/runtime-config/incl-order/a.conf | 1
modules/plugins/apache/src/test/resources/runtime-config/incl-order/b.conf | 1
modules/plugins/apache/src/test/resources/runtime-config/incl-order/c.conf | 1
modules/plugins/apache/src/test/resources/runtime-config/incl-order/httpd.conf | 1
modules/plugins/apache/src/test/resources/snmp-mapping/httpd.conf | 5
modules/plugins/apache/src/test/resources/snmp-mapping/vhost-with-servername-by-ip.conf | 3
modules/plugins/apache/src/test/resources/snmp-mapping/vhost-with-servername-by-unresolvable-hostname.conf | 3
modules/plugins/apache/src/test/resources/snmp-mapping/vhost-without-servername-resolvable-ip.conf | 3
modules/plugins/apache/src/test/resources/snmp-mapping/vhost-without-servername-unresolvable-hostname.conf | 3
modules/plugins/apache/src/test/resources/snmp-mapping/vhost-without-servername-unresolvable-ip.conf | 3
modules/plugins/augeas/src/main/java/org/rhq/augeas/AugeasComponent.java | 52
modules/plugins/augeas/src/main/java/org/rhq/augeas/AugeasProxy.java | 60
modules/plugins/augeas/src/main/java/org/rhq/augeas/config/AugeasConfigurationSimple.java | 2
modules/plugins/augeas/src/main/java/org/rhq/augeas/util/Glob.java | 48
modules/plugins/augeas/src/main/java/org/rhq/plugins/augeas/AugeasConfigurationComponent.java | 203 +
modules/plugins/augeas/src/main/java/org/rhq/plugins/augeas/AugeasConfigurationDiscoveryComponent.java | 18
modules/plugins/augeas/src/main/java/org/rhq/plugins/augeas/helper/AugeasRawConfigHelper.java | 28
modules/plugins/augeas/src/main/java/org/rhq/rhqtransform/AugeasRHQComponent.java | 22
modules/plugins/augeas/src/main/java/org/rhq/rhqtransform/impl/PluginDescriptorBasedAugeasConfiguration.java | 2
modules/plugins/cron/src/main/java/org/rhq/plugins/cron/CronComponent.java | 78
modules/plugins/hosts/src/main/java/org/rhq/plugins/hosts/HostsComponent.java | 4
modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/ApplicationServerOperationsDelegate.java | 1057 ++++------
modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/ApplicationServerPluginConfigurationProperties.java | 2
modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/ManagedComponentComponent.java | 56
modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/StandaloneManagedDeploymentComponent.java | 14
modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/WebApplicationContextComponent.java | 53
modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/deploy/ManagedComponentDeployer.java | 64
modules/plugins/jboss-as-5/src/main/java/org/rhq/plugins/jbossas5/util/DeploymentUtils.java | 50
modules/plugins/jboss-as-5/src/main/resources/META-INF/rhq-plugin.xml | 19
modules/plugins/samba/src/main/java/org/rhq/plugins/samba/SambaShareComponent.java | 21
modules/plugins/samba/src/main/java/org/rhq/plugins/samba/SambaShareDiscoveryComponent.java | 54
108 files changed, 5308 insertions(+), 2057 deletions(-)
---
12 years, 6 months
[rhq] Branch 'release-3.0.1' - modules/helpers
by ips
modules/helpers/pluginAnnotations/pom.xml | 13 +-
modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/DataType.java | 2
modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/DisplayType.java | 2
modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/MeasurementType.java | 1
modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/Metric.java | 7 -
modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/Operation.java | 7 -
modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/Parameter.java | 3
modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/Units.java | 1
modules/helpers/pluginGen/pom.xml | 21 ++-
modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/Props.java | 65 ++++++++--
modules/helpers/pluginGen/src/main/resources/descriptorMain.ftl | 12 +
11 files changed, 108 insertions(+), 26 deletions(-)
New commits:
commit f5570cd91084f831a938ef7cda457907269b136c
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Wed Nov 2 10:49:35 2011 -0400
a new 3.0.4 release of pluginAnnotations and pluginGen modules that changes the
retention policy on the annotations from RUNTIME to COMPILE
diff --git a/modules/helpers/pluginAnnotations/pom.xml b/modules/helpers/pluginAnnotations/pom.xml
index bb2d153..e9629b8 100644
--- a/modules/helpers/pluginAnnotations/pom.xml
+++ b/modules/helpers/pluginAnnotations/pom.xml
@@ -1,17 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.rhq.helpers</groupId>
- <artifactId>rhq-helpers</artifactId>
- <version>3.0.1.GA</version>
+ <groupId>org.rhq</groupId>
+ <artifactId>rhq-parent</artifactId>
+ <version>4.0.1</version>
</parent>
<groupId>org.rhq.helpers</groupId>
<artifactId>rhq-pluginAnnotations</artifactId>
<packaging>jar</packaging>
+ <version>3.0.4</version>
<name>RHQ Plugin Annotations</name>
<description>Annotations to help generate plugin descriptors</description>
@@ -49,3 +53,4 @@
</build>
</project>
+
diff --git a/modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/DataType.java b/modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/DataType.java
index a416079..6f861c7 100644
--- a/modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/DataType.java
+++ b/modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/DataType.java
@@ -35,5 +35,5 @@ public enum DataType {
public String toString() {
return super.toString().toLowerCase();
}
-
}
+
diff --git a/modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/DisplayType.java b/modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/DisplayType.java
index 49551ef..7193794 100644
--- a/modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/DisplayType.java
+++ b/modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/DisplayType.java
@@ -35,5 +35,5 @@ public enum DisplayType {
public String toString() {
return super.toString().toLowerCase();
}
-
}
+
diff --git a/modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/MeasurementType.java b/modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/MeasurementType.java
index c797e81..2f31cf0 100644
--- a/modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/MeasurementType.java
+++ b/modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/MeasurementType.java
@@ -36,3 +36,4 @@ public enum MeasurementType {
return super.toString().toLowerCase();
}
}
+
diff --git a/modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/Metric.java b/modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/Metric.java
index c1482f1..40d600c 100644
--- a/modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/Metric.java
+++ b/modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/Metric.java
@@ -27,10 +27,10 @@ import java.lang.annotation.Target;
* Annotation to denote a metric that should be measured
*
* @author Heiko W. Rupp
- * @author Galder Zamarreo
+ * @author Galder Zamarreño
*/
-(a)Retention(RetentionPolicy.RUNTIME)
@Target( { ElementType.FIELD, ElementType.METHOD })
+(a)Retention(RetentionPolicy.CLASS)
public @interface Metric {
String property() default "";
String displayName() default "";
@@ -40,4 +40,5 @@ public @interface Metric {
DataType dataType() default DataType.MEASUREMENT;
Units units() default Units.NONE;
MeasurementType measurementType() default MeasurementType.DYNAMIC;
- }
\ No newline at end of file
+ }
+
diff --git a/modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/Operation.java b/modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/Operation.java
index ba60955..7cf5fc5 100644
--- a/modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/Operation.java
+++ b/modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/Operation.java
@@ -27,12 +27,13 @@ import java.lang.annotation.Target;
* Annotation that denotes an Operation that can be executed
*
* @author Heiko W. Rupp
- * @author Galder Zamarreo
+ * @author Galder Zamarreño
*/
-(a)Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
+(a)Retention(RetentionPolicy.CLASS)
public @interface Operation {
String name() default "";
String displayName() default "";
String description() default "";
-}
\ No newline at end of file
+}
+
diff --git a/modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/Parameter.java b/modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/Parameter.java
index 4b82a13..ac92c86 100644
--- a/modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/Parameter.java
+++ b/modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/Parameter.java
@@ -34,8 +34,9 @@ import java.lang.annotation.Target;
* @since 4.0
*/
@Target(ElementType.PARAMETER)
-(a)Retention(RetentionPolicy.RUNTIME)
+(a)Retention(RetentionPolicy.CLASS)
public @interface Parameter {
String name() default "";
String description() default "";
}
+
diff --git a/modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/Units.java b/modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/Units.java
index 0ae4011..4987a40 100644
--- a/modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/Units.java
+++ b/modules/helpers/pluginAnnotations/src/main/java/org/rhq/helpers/pluginAnnotations/agent/Units.java
@@ -36,3 +36,4 @@ public enum Units {
return super.toString().toLowerCase();
}
}
+
diff --git a/modules/helpers/pluginGen/pom.xml b/modules/helpers/pluginGen/pom.xml
index 4c9a457..b1e4b1f 100644
--- a/modules/helpers/pluginGen/pom.xml
+++ b/modules/helpers/pluginGen/pom.xml
@@ -1,17 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.rhq.helpers</groupId>
- <artifactId>rhq-helpers</artifactId>
- <version>3.0.1.GA</version>
+ <groupId>org.rhq</groupId>
+ <artifactId>rhq-parent</artifactId>
+ <version>4.0.1</version>
</parent>
<groupId>org.rhq.helpers</groupId>
<artifactId>rhq-pluginGen</artifactId>
<packaging>jar</packaging>
+ <version>3.0.4</version>
<name>RHQ plugin generator</name>
<description>Helper to generate plugin skeletons</description>
@@ -83,10 +87,19 @@
<artifactId>freemarker</artifactId>
<version>2.3.11</version>
</dependency>
+
<dependency>
<groupId>org.rhq.helpers</groupId>
<artifactId>rhq-pluginAnnotations</artifactId>
<version>${project.version}</version>
</dependency>
+
+ <dependency>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <version>3.12.1.GA</version>
+ </dependency>
</dependencies>
+
</project>
+
diff --git a/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/Props.java b/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/Props.java
index a657f42..93efc89 100644
--- a/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/Props.java
+++ b/modules/helpers/pluginGen/src/main/java/org/rhq/helpers/pluginGen/Props.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
+ * Copyright (C) 2005-2011 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -23,6 +23,8 @@ import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
+import javassist.ClassPool;
+import javassist.CtClass;
import org.rhq.helpers.pluginAnnotations.agent.DataType;
import org.rhq.helpers.pluginAnnotations.agent.DisplayType;
import org.rhq.helpers.pluginAnnotations.agent.Metric;
@@ -78,7 +80,7 @@ public class Props {
/** Depends on JMX plugin ? */
private boolean dependsOnJmxPlugin;
/** What version of RHQ should this plugin's pom use ? */
- private String rhqVersion = "1.4.0-SNAPSHOT";
+ private String rhqVersion = "3.0.0";
/** Embedded children */
private Set<Props> children = new HashSet<Props>();
@@ -91,9 +93,13 @@ public class Props {
private Set<OperationProps> operations = new LinkedHashSet<OperationProps>();;
+ private Set<TypeKey> runsInsides = new LinkedHashSet<TypeKey>();;
+
private String pluginName;
private String pluginDescription;
+ private ClassPool classPool = ClassPool.getDefault();
+
public ResourceCategory getCategory() {
return category;
}
@@ -326,10 +332,31 @@ public class Props {
this.pluginDescription = pluginDescription;
}
+ public Set<TypeKey> getRunsInsides() {
+ return runsInsides;
+ }
+
+ public void setRunsInsides(Set<TypeKey> runsInsides) {
+ this.runsInsides = runsInsides;
+ }
+
public void populateMetrics(List<Class> classes) {
for (Class<?> clazz : classes) {
- Metric metricAnnot = clazz.getAnnotation(Metric.class);
- if (metricAnnot != null) {
+ CtClass ctClass;
+ try {
+ ctClass = classPool.get(clazz.getName());
+ } catch (Exception e) {
+ throw new RuntimeException("Could not find " + clazz + ".");
+ }
+ // TODO (ips): This is broken. 'Metric' is a method/field annotation, not a class annotation.
+ Metric metricAnnot;
+ try {
+ metricAnnot = (Metric) ctClass.getAnnotation(Metric.class);
+ } catch (ClassNotFoundException e) {
+ throw new RuntimeException("Could not find " + Metric.class
+ + ". Make sure the rhq-pluginAnnotations jar is in the classpath when running this tool.");
+ }
+ if (metricAnnot != null) {
MetricProps metric = new MetricProps(metricAnnot.property());
metric.setDisplayName(metricAnnot.displayName());
metric.setDisplayType(metricAnnot.displayType());
@@ -337,7 +364,6 @@ public class Props {
metric.setDescription(metricAnnot.description());
metrics.add(metric);
}
-
}
}
@@ -372,10 +398,37 @@ public class Props {
sb.append(", children=").append(children);
sb.append(", simpleProps=").append(simpleProps);
sb.append(", templates=").append(templates);
+ sb.append(", runsInsides=").append(runsInsides);
sb.append('}');
return sb.toString();
}
+ public static class TypeKey {
+ private String name;
+ private String pluginName;
+
+ public TypeKey(String name, String pluginName) {
+ this.name = name;
+ this.pluginName = pluginName;
+ }
+
+ public String getPluginName() {
+ return pluginName;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public String toString() {
+ return "TypeKey{" +
+ "name='" + name + '\'' +
+ ", pluginName='" + pluginName + '\'' +
+ '}';
+ }
+ }
+
public static class SimpleProperty {
private final String name;
private String description;
@@ -431,7 +484,6 @@ public class Props {
public void setDefaultValue(String defaultValue) {
this.defaultValue = defaultValue;
}
-
}
public static class Template {
@@ -519,7 +571,6 @@ public class Props {
public String getProperty() {
return property;
}
-
}
public static class OperationProps {
diff --git a/modules/helpers/pluginGen/src/main/resources/descriptorMain.ftl b/modules/helpers/pluginGen/src/main/resources/descriptorMain.ftl
index 0343787..5220375 100644
--- a/modules/helpers/pluginGen/src/main/resources/descriptorMain.ftl
+++ b/modules/helpers/pluginGen/src/main/resources/descriptorMain.ftl
@@ -1,7 +1,7 @@
<#--
/*
* RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
+ * Copyright (C) 2005-2011 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -24,7 +24,7 @@
platform/server/service. It is called by descriptor.ftl
-->
-name="${props.name}" <#-- TODO separate out plugin name and service name -->
+name="${props.name}"
discovery="${props.discoveryClass}"
class="${props.componentClass}"
<#if props.singleton>singleton="true"</#if>
@@ -32,6 +32,14 @@ name="${props.name}" <#-- TODO separate out plugin name and service name -->
<#if props.createChildren && props.deleteChildren>createDeletePolicy="both"<#elseif props.createChildren && !props.deleteChildren>createDeletePolicy="create-only"<#elseif !props.createChildren && props.deleteChildren>createDeletePolicy="delete-only"<#else > <#-- Dont mention it, as 'neither' is default --></#if>
>
+ <#if props.runsInsides?has_content>
+ <runs-inside>
+ <#list props.runsInsides as typeKey>
+ <parent-resource-type name="${typeKey.name}" plugin="${typeKey.pluginName}"/>
+ </#list>
+ </runs-inside>
+ </#if>
+
<#if props.simpleProps?has_content>
<plugin-configuration>
<#list props.simpleProps as simpleProps>
12 years, 6 months
[rhq] 2 commits - modules/core
by Heiko W. Rupp
modules/core/domain/pom.xml | 9 +++++++++
modules/core/native-system/src/test/java/org/rhq/core/system/NativeSystemInfoTest.java | 6 ++++--
2 files changed, 13 insertions(+), 2 deletions(-)
New commits:
commit 53083088605af46f59ff660208594637302418d0
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Wed Nov 2 14:33:12 2011 +0100
Add the deprecated repo of JBoss Nexus as it is needed for Hibernate.
diff --git a/modules/core/domain/pom.xml b/modules/core/domain/pom.xml
index 164f5ad..1ebf5b0 100644
--- a/modules/core/domain/pom.xml
+++ b/modules/core/domain/pom.xml
@@ -527,6 +527,15 @@
</snapshots>
</repository>
+ <repository>
+ <id>jboss-deprecated-items-group</id>
+ <name>JBoss Public Repository Group</name>
+ <url>https://repository.jboss.org/nexus/content/repositories/deprecated/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+
</repositories>
</project>
commit c82c0b797ca492f8a79332fc5f54235bbc2a656c
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Wed Nov 2 14:15:38 2011 +0100
We need to check if the user has actually enabled any swap at all before checking for free swap.
diff --git a/modules/core/native-system/src/test/java/org/rhq/core/system/NativeSystemInfoTest.java b/modules/core/native-system/src/test/java/org/rhq/core/system/NativeSystemInfoTest.java
index 88ed3a8..fad9fb6 100644
--- a/modules/core/native-system/src/test/java/org/rhq/core/system/NativeSystemInfoTest.java
+++ b/modules/core/native-system/src/test/java/org/rhq/core/system/NativeSystemInfoTest.java
@@ -184,9 +184,11 @@ public class NativeSystemInfoTest {
+ nf.format(allSwap.getTotal()));
assert allMemory.getActualFree() > 0 : allMemory.getActualFree();
assert allMemory.getFree() > 0 : allMemory.getFree();
- assert allSwap.getFree() > 0 : allSwap.getFree();
assert allMemory.getTotal() > 1000000 : allMemory.getTotal();
- assert allSwap.getTotal() > 1000000 : allSwap.getTotal();
+ if (allSwap.getTotal()>0) {
+ assert allSwap.getTotal() > 1000000 : allSwap.getTotal();
+ assert allSwap.getFree() > 0 : allSwap.getFree();
+ }
ProcMem processMemory = sigar.getProcMem(sigar.getPid());
12 years, 6 months
[rhq] Branch 'release_jon3.x' - modules/enterprise
by Simeon Pinder
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LoginView.java | 5 ++++-
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties | 2 +-
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties | 2 +-
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties | 2 +-
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties | 2 +-
5 files changed, 8 insertions(+), 5 deletions(-)
New commits:
commit 29bb068b95841452237a758b1f476ec17a8ac988
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Fri Oct 28 15:07:16 2011 -0400
Fixing productization issue for new LDAP registration.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LoginView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LoginView.java
index d691e0e..74d11e3 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LoginView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LoginView.java
@@ -59,6 +59,7 @@ import com.smartgwt.client.widgets.form.validator.RegExpValidator;
import com.smartgwt.client.widgets.layout.HStack;
import org.rhq.core.domain.auth.Subject;
+import org.rhq.core.domain.common.ProductInfo;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository;
@@ -205,12 +206,14 @@ public class LoginView extends LocatableCanvas {
if (!loginShowing) {
loginShowing = true;
+ ProductInfo productInfo = CoreGUI.get().getProductInfo();
+
int fieldWidth = 120;
LocatableVLayout column = new LocatableVLayout(extendLocatorId("NewLdapRegistration"));
column.setMargin(25);
HeaderItem header = new HeaderItem();
- header.setValue(MSG.view_login_welcomeMsg());
+ header.setValue(MSG.view_login_welcomeMsg(productInfo.getName()));
header.setWidth("100%");
//build ui elements for registration screen
first = new TextItem(FIRST, MSG.dataSource_users_field_firstName());
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
index dd0902e..623cab9 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
@@ -1500,7 +1500,7 @@ view_login_prompt = Please Login
view_login_registerLater = (Cancel - Complete registration later.)
view_login_registerLdapSuccess = Successfully registered the new LDAP User.
view_login_registerUser = Register User
-view_login_welcomeMsg = Welcome to RHQ! <br/><br/> Enter/update the following fields to complete your registration process.<br/> Once you click "OK", you will be logged in.<br/><br/>
+view_login_welcomeMsg = Welcome to {0}! <br/><br/> Enter/update the following fields to complete your registration process.<br/> Once you click "OK", you will be logged in.<br/><br/>
view_measureRange_last = Time Range - Previous
view_measureRange_simple = Simple...
view_measureRange_start = Time Range - Start
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
index 3050a0f..5d771db 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
@@ -1490,7 +1490,7 @@ view_login_prompt = ログインしてください
view_login_registerLater = (キャンセル - 登録を後で完成させてください)
view_login_registerLdapSuccess = 新しいLDAPユーザーの登録に成功しました
view_login_registerUser = ユーザの登録
-view_login_welcomeMsg = RHQへようこそ! <br/><br/> 登録を完成させるために次のフィールドを入力/更新してください。<br/> "OK"をクリックしたら、ログインします。<br/><br/>
+##view_login_welcomeMsg = RHQへようこそ! <br/><br/> 登録を完成させるために次のフィールドを入力/更新してください。<br/> "OK"をクリックしたら、ログインします。<br/><br/>
view_measureRange_last = 時間の範囲 - 直前
view_measureRange_simple = シンプル...
view_measureRange_start = 時間の範囲 - 開始
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
index 2814a9b..f068b02 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
@@ -1522,7 +1522,7 @@ view_login_prompt = Favor efetuar Login
view_login_registerLater = (Sair - Concluir registro mais tarde.)
view_login_registerLdapSuccess = Novo usu\u00E1rios do LDAP registrado com sucesso.
view_login_registerUser = Registrar Usu\u00E1rio
-view_login_welcomeMsg = Seja Bem Vindo ao JBoss ON! <br/><br/> Informe ou altere os seguintes campos para completar o processo de registro.<br/> Clique em "OK" para acessar o sistema.<br/><br/>
+##view_login_welcomeMsg = Seja Bem Vindo ao JBoss ON! <br/><br/> Informe ou altere os seguintes campos para completar o processo de registro.<br/> Clique em "OK" para acessar o sistema.<br/><br/>
view_measureRange_day = 1 Dia
view_measureRange_days = {0} Dias
view_measureRange_hour = 1 Hora
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
index 60f3bf7..d7b5409 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
@@ -1500,7 +1500,7 @@ view_login_prompt = \u8bf7\u767b\u5f55
view_login_registerLater = (\u53d6\u6d88 - \u7a0d\u540e\u5b8c\u6210\u6ce8\u518c.)
view_login_registerLdapSuccess = \u6210\u529f\u6ce8\u518c\u65b0\u7684LDAP\u7528\u6237.
view_login_registerUser = \u7528\u6237\u6ce8\u518c
-view_login_welcomeMsg = \u6b22\u8fce\u6765\u5230 RHQ! <br/><br/> \u8f93\u5165\u6216\u8005\u4fee\u6539\u4e0b\u9762\u7684\u4fe1\u606f\uff0c\u4ee5\u5b8c\u6210\u6ce8\u518c<br/> \u70b9\u51fb"OK", \u5c31\u53ef\u4ee5\u767b\u5f55\u7cfb\u7edf.<br/><br/>
+##view_login_welcomeMsg = \u6b22\u8fce\u6765\u5230 RHQ! <br/><br/> \u8f93\u5165\u6216\u8005\u4fee\u6539\u4e0b\u9762\u7684\u4fe1\u606f\uff0c\u4ee5\u5b8c\u6210\u6ce8\u518c<br/> \u70b9\u51fb"OK", \u5c31\u53ef\u4ee5\u767b\u5f55\u7cfb\u7edf.<br/><br/>
view_measureRange_last = \u65f6\u95f4\u8303\u56f4 - \u5148\u524d\u7684
view_measureRange_simple = \u4e00\u822c...
view_measureRange_start = \u65f6\u95f4\u8303\u56f4 - \u8d77\u59cb
12 years, 6 months
[rhq] modules/enterprise
by Simeon Pinder
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LoginView.java | 5 ++++-
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties | 2 +-
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties | 2 +-
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties | 2 +-
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties | 2 +-
5 files changed, 8 insertions(+), 5 deletions(-)
New commits:
commit e7b28ef223111938258c454ce6b48a4e40fd9dad
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Fri Oct 28 15:07:16 2011 -0400
Fixing productization issue for new LDAP registration.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LoginView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LoginView.java
index d691e0e..74d11e3 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LoginView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/LoginView.java
@@ -59,6 +59,7 @@ import com.smartgwt.client.widgets.form.validator.RegExpValidator;
import com.smartgwt.client.widgets.layout.HStack;
import org.rhq.core.domain.auth.Subject;
+import org.rhq.core.domain.common.ProductInfo;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository;
@@ -205,12 +206,14 @@ public class LoginView extends LocatableCanvas {
if (!loginShowing) {
loginShowing = true;
+ ProductInfo productInfo = CoreGUI.get().getProductInfo();
+
int fieldWidth = 120;
LocatableVLayout column = new LocatableVLayout(extendLocatorId("NewLdapRegistration"));
column.setMargin(25);
HeaderItem header = new HeaderItem();
- header.setValue(MSG.view_login_welcomeMsg());
+ header.setValue(MSG.view_login_welcomeMsg(productInfo.getName()));
header.setWidth("100%");
//build ui elements for registration screen
first = new TextItem(FIRST, MSG.dataSource_users_field_firstName());
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
index dd0902e..623cab9 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
@@ -1500,7 +1500,7 @@ view_login_prompt = Please Login
view_login_registerLater = (Cancel - Complete registration later.)
view_login_registerLdapSuccess = Successfully registered the new LDAP User.
view_login_registerUser = Register User
-view_login_welcomeMsg = Welcome to RHQ! <br/><br/> Enter/update the following fields to complete your registration process.<br/> Once you click "OK", you will be logged in.<br/><br/>
+view_login_welcomeMsg = Welcome to {0}! <br/><br/> Enter/update the following fields to complete your registration process.<br/> Once you click "OK", you will be logged in.<br/><br/>
view_measureRange_last = Time Range - Previous
view_measureRange_simple = Simple...
view_measureRange_start = Time Range - Start
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
index 3050a0f..5d771db 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
@@ -1490,7 +1490,7 @@ view_login_prompt = ログインしてください
view_login_registerLater = (キャンセル - 登録を後で完成させてください)
view_login_registerLdapSuccess = 新しいLDAPユーザーの登録に成功しました
view_login_registerUser = ユーザの登録
-view_login_welcomeMsg = RHQへようこそ! <br/><br/> 登録を完成させるために次のフィールドを入力/更新してください。<br/> "OK"をクリックしたら、ログインします。<br/><br/>
+##view_login_welcomeMsg = RHQへようこそ! <br/><br/> 登録を完成させるために次のフィールドを入力/更新してください。<br/> "OK"をクリックしたら、ログインします。<br/><br/>
view_measureRange_last = 時間の範囲 - 直前
view_measureRange_simple = シンプル...
view_measureRange_start = 時間の範囲 - 開始
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
index 2814a9b..f068b02 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
@@ -1522,7 +1522,7 @@ view_login_prompt = Favor efetuar Login
view_login_registerLater = (Sair - Concluir registro mais tarde.)
view_login_registerLdapSuccess = Novo usu\u00E1rios do LDAP registrado com sucesso.
view_login_registerUser = Registrar Usu\u00E1rio
-view_login_welcomeMsg = Seja Bem Vindo ao JBoss ON! <br/><br/> Informe ou altere os seguintes campos para completar o processo de registro.<br/> Clique em "OK" para acessar o sistema.<br/><br/>
+##view_login_welcomeMsg = Seja Bem Vindo ao JBoss ON! <br/><br/> Informe ou altere os seguintes campos para completar o processo de registro.<br/> Clique em "OK" para acessar o sistema.<br/><br/>
view_measureRange_day = 1 Dia
view_measureRange_days = {0} Dias
view_measureRange_hour = 1 Hora
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
index 60f3bf7..d7b5409 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
@@ -1500,7 +1500,7 @@ view_login_prompt = \u8bf7\u767b\u5f55
view_login_registerLater = (\u53d6\u6d88 - \u7a0d\u540e\u5b8c\u6210\u6ce8\u518c.)
view_login_registerLdapSuccess = \u6210\u529f\u6ce8\u518c\u65b0\u7684LDAP\u7528\u6237.
view_login_registerUser = \u7528\u6237\u6ce8\u518c
-view_login_welcomeMsg = \u6b22\u8fce\u6765\u5230 RHQ! <br/><br/> \u8f93\u5165\u6216\u8005\u4fee\u6539\u4e0b\u9762\u7684\u4fe1\u606f\uff0c\u4ee5\u5b8c\u6210\u6ce8\u518c<br/> \u70b9\u51fb"OK", \u5c31\u53ef\u4ee5\u767b\u5f55\u7cfb\u7edf.<br/><br/>
+##view_login_welcomeMsg = \u6b22\u8fce\u6765\u5230 RHQ! <br/><br/> \u8f93\u5165\u6216\u8005\u4fee\u6539\u4e0b\u9762\u7684\u4fe1\u606f\uff0c\u4ee5\u5b8c\u6210\u6ce8\u518c<br/> \u70b9\u51fb"OK", \u5c31\u53ef\u4ee5\u767b\u5f55\u7cfb\u7edf.<br/><br/>
view_measureRange_last = \u65f6\u95f4\u8303\u56f4 - \u5148\u524d\u7684
view_measureRange_simple = \u4e00\u822c...
view_measureRange_start = \u65f6\u95f4\u8303\u56f4 - \u8d77\u59cb
12 years, 6 months