[rhq] 2 commits - modules/enterprise
by mazz
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java | 31 +----
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/inventory/ResourceGroupMembershipView.java | 22 +++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceSearchView.java | 62 +++++++++-
3 files changed, 88 insertions(+), 27 deletions(-)
New commits:
commit 66463f32fc906a0fc5c129cc8379e5b51081ec98
Merge: ba21390... 96b39f2...
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Sun Nov 28 23:13:45 2010 -0500
Merge commit 'origin/master'
Conflicts:
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
diff --cc modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
index cff76aa,978e927..94865f8
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
@@@ -175,15 -175,18 +173,15 @@@ public class ResourceGroupDetailView ex
"ConnectionSettings", MSG.view_tabs_common_connectionSettings()), null);
inventoryConnHistory = new SubTab(inventoryTab.extendLocatorId("ConnectionSettingsHistory"), new ViewName(
"ConnectionSettingsHistory", MSG.view_tabs_common_connectionSettingsHistory()), null);
- inventoryMembership = new SubTab(inventoryTab.extendLocatorId("Membership"), new ViewName("Membership",
- MSG.view_tabs_common_membership()), null); // TODO this will merge with Members
- inventoryTab.registerSubTabs(this.inventoryMembers, this.inventoryConn, this.inventoryConnHistory,
- this.inventoryMembership);
+ inventoryTab.registerSubTabs(this.inventoryMembers, this.inventoryConn, this.inventoryConnHistory);
tabs.add(inventoryTab);
- operationsTab = new TwoLevelTab(getTabSet().extendLocatorId("Operations"), new ViewName("Operations", MSG
- .view_tabs_common_operations()), "/images/icons/Operation_grey_16.png");
- this.opHistory = new SubTab(operationsTab.extendLocatorId("History"), new ViewName("History", MSG
- .view_tabs_common_history()), null);
- this.opSched = new SubTab(operationsTab.extendLocatorId("Scheduled"), new ViewName("Scheduled", MSG
- .view_tabs_common_scheduled()), null);
+ operationsTab = new TwoLevelTab(getTabSet().extendLocatorId("Operations"), new ViewName("Operations",
+ MSG.view_tabs_common_operations()), "/images/icons/Operation_grey_16.png");
+ this.opHistory = new SubTab(operationsTab.extendLocatorId("History"), new ViewName("History",
+ MSG.view_tabs_common_history()), null);
+ this.opSched = new SubTab(operationsTab.extendLocatorId("Scheduled"), new ViewName("Scheduled",
+ MSG.view_tabs_common_scheduled()), null);
operationsTab.registerSubTabs(this.opHistory, this.opSched);
tabs.add(operationsTab);
@@@ -283,18 -269,22 +264,18 @@@
}
// Inventory tab is always visible and enabled.
- updateSubTab(this.inventoryTab, this.inventoryMembers,
- ResourceSearchView.getMembersOf(this.inventoryMembers.extendLocatorId("View"), groupId), true, true);
- updateSubTab(this.inventoryTab, this.inventoryConn,
- new CurrentGroupPluginConfigurationView(this.inventoryConn.extendLocatorId("View"), this.groupComposite),
- facets.contains(ResourceTypeFacet.PLUGIN_CONFIGURATION), true);
+ enabled = !isAutoGroup() && globalPermissions.contains(Permission.MANAGE_INVENTORY); // true, then user can modify group membership
+ updateSubTab(this.inventoryTab, this.inventoryMembers, ResourceSearchView.getMembersOf(this.inventoryMembers
+ .extendLocatorId("View"), groupId, enabled), true, true);
+ updateSubTab(this.inventoryTab, this.inventoryConn, new CurrentGroupPluginConfigurationView(this.inventoryConn
+ .extendLocatorId("View"), this.groupComposite), facets.contains(ResourceTypeFacet.PLUGIN_CONFIGURATION),
+ true);
updateSubTab(this.inventoryTab, this.inventoryConnHistory, new HistoryGroupPluginConfigurationView(
- this.inventoryConnHistory.extendLocatorId("View"), this.groupComposite),
- facets.contains(ResourceTypeFacet.PLUGIN_CONFIGURATION), true);
- visible = !isAutoGroup();
- enabled = visible && globalPermissions.contains(Permission.MANAGE_INVENTORY);
- canvas = (enabled) ? new ResourceGroupMembershipView(this.inventoryMembership.extendLocatorId("View"), groupId)
- : null;
- updateSubTab(this.inventoryTab, this.inventoryMembership, canvas, visible, enabled);
+ this.inventoryConnHistory.extendLocatorId("View"), this.groupComposite), facets
+ .contains(ResourceTypeFacet.PLUGIN_CONFIGURATION), true);
- if (updateTab(this.operationsTab, groupCategory == GroupCategory.COMPATIBLE
- && facets.contains(ResourceTypeFacet.OPERATION), true)) {
+ if (updateTab(this.operationsTab,
+ groupCategory == GroupCategory.COMPATIBLE && facets.contains(ResourceTypeFacet.OPERATION), true)) {
updateSubTab(this.operationsTab, this.opHistory, new FullHTMLPane(this.opHistory.extendLocatorId("View"),
"/rhq/group/operation/groupOperationHistory-plain.xhtml?groupId=" + groupId), true, true);
updateSubTab(this.operationsTab, this.opSched, new FullHTMLPane(this.opSched.extendLocatorId("View"),
commit ba213901bed554ec3ac2d6e81d388eeec6753914
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Sun Nov 28 19:27:55 2010 -0500
compress Members and Membership subtabs into one new Members tab
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
index 0d7d3ca..cff76aa 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
@@ -53,7 +53,6 @@ import org.rhq.enterprise.gui.coregui.client.inventory.common.event.EventComposi
import org.rhq.enterprise.gui.coregui.client.inventory.groups.detail.configuration.GroupResourceConfigurationEditView;
import org.rhq.enterprise.gui.coregui.client.inventory.groups.detail.inventory.CurrentGroupPluginConfigurationView;
import org.rhq.enterprise.gui.coregui.client.inventory.groups.detail.inventory.HistoryGroupPluginConfigurationView;
-import org.rhq.enterprise.gui.coregui.client.inventory.groups.detail.inventory.ResourceGroupMembershipView;
import org.rhq.enterprise.gui.coregui.client.inventory.groups.detail.monitoring.schedules.SchedulesView;
import org.rhq.enterprise.gui.coregui.client.inventory.groups.detail.monitoring.traits.TraitsView;
import org.rhq.enterprise.gui.coregui.client.inventory.groups.detail.summary.OverviewView;
@@ -93,7 +92,6 @@ public class ResourceGroupDetailView extends AbstractTwoLevelTabSetView<Resource
private SubTab inventoryMembers;
private SubTab inventoryConn;
private SubTab inventoryConnHistory;
- private SubTab inventoryMembership;
private SubTab opHistory;
private SubTab opSched;
private SubTab alertHistory;
@@ -117,10 +115,10 @@ public class ResourceGroupDetailView extends AbstractTwoLevelTabSetView<Resource
@Override
public void onTabSelected(TwoLevelTabSelectedEvent tabSelectedEvent) {
- // if moving from membership subtab then re-load the detail view as the membership and
+ // if moving from members subtab then re-load the detail view as the membership and
// group type may have changed.
if ((null != this.groupId) && this.inventoryTab.getName().equals(currentTabName)
- && this.inventoryMembership.getName().equals(currentSubTabName)) {
+ && this.inventoryMembers.getName().equals(currentSubTabName)) {
String tabPath = "/" + tabSelectedEvent.getId() + "/" + tabSelectedEvent.getSubTabId();
String path = this.getBaseViewPath() + "/" + getSelectedItemId() + tabPath;
@@ -177,10 +175,7 @@ public class ResourceGroupDetailView extends AbstractTwoLevelTabSetView<Resource
"ConnectionSettings", MSG.view_tabs_common_connectionSettings()), null);
inventoryConnHistory = new SubTab(inventoryTab.extendLocatorId("ConnectionSettingsHistory"), new ViewName(
"ConnectionSettingsHistory", MSG.view_tabs_common_connectionSettingsHistory()), null);
- inventoryMembership = new SubTab(inventoryTab.extendLocatorId("Membership"), new ViewName("Membership", MSG
- .view_tabs_common_membership()), null); // TODO this will merge with Members
- inventoryTab.registerSubTabs(this.inventoryMembers, this.inventoryConn, this.inventoryConnHistory,
- this.inventoryMembership);
+ inventoryTab.registerSubTabs(this.inventoryMembers, this.inventoryConn, this.inventoryConnHistory);
tabs.add(inventoryTab);
operationsTab = new TwoLevelTab(getTabSet().extendLocatorId("Operations"), new ViewName("Operations", MSG
@@ -288,19 +283,15 @@ public class ResourceGroupDetailView extends AbstractTwoLevelTabSetView<Resource
}
// Inventory tab is always visible and enabled.
+ enabled = !isAutoGroup() && globalPermissions.contains(Permission.MANAGE_INVENTORY); // true, then user can modify group membership
updateSubTab(this.inventoryTab, this.inventoryMembers, ResourceSearchView.getMembersOf(this.inventoryMembers
- .extendLocatorId("View"), groupId), true, true);
+ .extendLocatorId("View"), groupId, enabled), true, true);
updateSubTab(this.inventoryTab, this.inventoryConn, new CurrentGroupPluginConfigurationView(this.inventoryConn
.extendLocatorId("View"), this.groupComposite), facets.contains(ResourceTypeFacet.PLUGIN_CONFIGURATION),
true);
updateSubTab(this.inventoryTab, this.inventoryConnHistory, new HistoryGroupPluginConfigurationView(
this.inventoryConnHistory.extendLocatorId("View"), this.groupComposite), facets
.contains(ResourceTypeFacet.PLUGIN_CONFIGURATION), true);
- visible = !isAutoGroup();
- enabled = visible && globalPermissions.contains(Permission.MANAGE_INVENTORY);
- canvas = (enabled) ? new ResourceGroupMembershipView(this.inventoryMembership.extendLocatorId("View"), groupId)
- : null;
- updateSubTab(this.inventoryTab, this.inventoryMembership, canvas, visible, enabled);
if (updateTab(this.operationsTab, groupCategory == GroupCategory.COMPATIBLE
&& facets.contains(ResourceTypeFacet.OPERATION), true)) {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/inventory/ResourceGroupMembershipView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/inventory/ResourceGroupMembershipView.java
index a815430..f7fe190 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/inventory/ResourceGroupMembershipView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/inventory/ResourceGroupMembershipView.java
@@ -24,7 +24,6 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.widgets.IButton;
import com.smartgwt.client.widgets.events.ClickEvent;
import com.smartgwt.client.widgets.events.ClickHandler;
-import com.smartgwt.client.widgets.layout.LayoutSpacer;
import com.smartgwt.client.widgets.toolbar.ToolStrip;
import org.rhq.core.domain.criteria.ResourceGroupCriteria;
@@ -45,6 +44,7 @@ public class ResourceGroupMembershipView extends LocatableVLayout {
private int resourceGroupId;
private ResourceGroup resourceGroup;
private ResourceGroupResourceSelector selector;
+ private ClickHandler saveButtonHandler;
public ResourceGroupMembershipView(String locatorId, int resourceGroupId) {
super(locatorId);
@@ -52,6 +52,17 @@ public class ResourceGroupMembershipView extends LocatableVLayout {
this.resourceGroupId = resourceGroupId;
}
+ /**
+ * Allows an external component to hook into the save button. The given
+ * handler will be invoked when the save button is pressed. If <code>null</code>
+ * is given, then no external handler will be called.
+ *
+ * @param saveButtonHandler
+ */
+ public void setSaveButtonHandler(ClickHandler saveButtonHandler) {
+ this.saveButtonHandler = saveButtonHandler;
+ }
+
@Override
protected void onDraw() {
super.onDraw();
@@ -62,13 +73,17 @@ public class ResourceGroupMembershipView extends LocatableVLayout {
public void build() {
ToolStrip toolStrip = new ToolStrip();
toolStrip.setWidth100();
-
- toolStrip.addMember(new LayoutSpacer());
+ toolStrip.setExtraSpace(10);
+ toolStrip.setMembersMargin(5);
+ toolStrip.setLayoutMargin(5);
IButton saveButton = new LocatableIButton(this.extendLocatorId("Save"), MSG.common_button_save());
saveButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent clickEvent) {
save();
+ if (ResourceGroupMembershipView.this.saveButtonHandler != null) {
+ ResourceGroupMembershipView.this.saveButtonHandler.onClick(clickEvent);
+ }
}
});
@@ -96,6 +111,7 @@ public class ResourceGroupMembershipView extends LocatableVLayout {
: null, false);
addMember(ResourceGroupMembershipView.this.selector);
+ markForRedraw();
}
});
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceSearchView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceSearchView.java
index 52a7f7d..05494e0 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceSearchView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceSearchView.java
@@ -33,6 +33,11 @@ import com.smartgwt.client.data.Criteria;
import com.smartgwt.client.data.SortSpecifier;
import com.smartgwt.client.types.Alignment;
import com.smartgwt.client.types.ListGridFieldType;
+import com.smartgwt.client.types.Overflow;
+import com.smartgwt.client.widgets.events.ClickEvent;
+import com.smartgwt.client.widgets.events.ClickHandler;
+import com.smartgwt.client.widgets.events.CloseClickHandler;
+import com.smartgwt.client.widgets.events.CloseClientEvent;
import com.smartgwt.client.widgets.grid.CellFormatter;
import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.grid.ListGridRecord;
@@ -44,10 +49,12 @@ import org.rhq.enterprise.gui.coregui.client.components.table.Table;
import org.rhq.enterprise.gui.coregui.client.components.table.TableActionEnablement;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.gwt.ResourceGWTServiceAsync;
+import org.rhq.enterprise.gui.coregui.client.inventory.groups.detail.inventory.ResourceGroupMembershipView;
import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
import org.rhq.enterprise.gui.coregui.client.util.TableUtility;
import org.rhq.enterprise.gui.coregui.client.util.message.Message;
import org.rhq.enterprise.gui.coregui.client.util.message.Message.Severity;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableWindow;
/**
* @author Greg Hinkle
@@ -58,6 +65,9 @@ public class ResourceSearchView extends Table {
private List<ResourceSelectListener> selectListeners = new ArrayList<ResourceSelectListener>();
+ // our static factory method will set this to a non-null resource group ID iff the user can modify that group's membership
+ private Integer groupIdToModify = null;
+
/**
* A list of all Resources in the system.
*/
@@ -162,6 +172,47 @@ public class ResourceSearchView extends Table {
}
});
+ if (this.groupIdToModify != null) {
+ addTableAction(extendLocatorId("Membership"), MSG.view_tabs_common_membership(), new AbstractTableAction(
+ TableActionEnablement.ALWAYS) {
+ @Override
+ public void executeAction(ListGridRecord[] selection, Object actionValue) {
+ final LocatableWindow winModal = new LocatableWindow(extendLocatorId("MembershipWindow"));
+ winModal.setTitle(MSG.view_tabs_common_group_membership());
+ winModal.setOverflow(Overflow.VISIBLE);
+ winModal.setShowMinimizeButton(false);
+ winModal.setIsModal(true);
+ winModal.setShowModalMask(true);
+ winModal.setWidth(700);
+ winModal.setHeight(450);
+ winModal.setAutoCenter(true);
+ winModal.setShowResizer(true);
+ winModal.setCanDragResize(true);
+ winModal.centerInPage();
+ winModal.addCloseClickHandler(new CloseClickHandler() {
+ @Override
+ public void onCloseClick(CloseClientEvent event) {
+ winModal.markForDestroy();
+ }
+ });
+
+ ResourceGroupMembershipView membershipView = new ResourceGroupMembershipView(
+ ResourceSearchView.this.extendLocatorId("View"), ResourceSearchView.this.groupIdToModify
+ .intValue());
+
+ membershipView.setSaveButtonHandler(new ClickHandler() {
+ @Override
+ public void onClick(ClickEvent event) {
+ winModal.markForDestroy();
+ }
+ });
+
+ winModal.addItem(membershipView);
+ winModal.show();
+ }
+ });
+ }
+
// //load double click handler for this table
// configureDoubleClickHandler();
@@ -184,7 +235,6 @@ public class ResourceSearchView extends Table {
}
});*/
-
}
// /** Defines the double click handler action for ResourceSearch. This means that on double
@@ -216,9 +266,13 @@ public class ResourceSearchView extends Table {
.view_inventory_resources_title_children());
}
- public static ResourceSearchView getMembersOf(String locatorId, int groupId) {
- return new ResourceSearchView(locatorId, new Criteria("groupId", String.valueOf(groupId)), MSG
- .view_inventory_resources_title_members());
+ public static ResourceSearchView getMembersOf(String locatorId, int groupId, boolean canModifyMembership) {
+ ResourceSearchView view = new ResourceSearchView(locatorId, new Criteria("groupId", String.valueOf(groupId)),
+ MSG.view_inventory_resources_title_members());
+ if (canModifyMembership) {
+ view.groupIdToModify = Integer.valueOf(groupId);
+ }
+ return view;
}
}
13 years, 5 months
[rhq] modules/enterprise
by Joseph Marques
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/AbstractTwoLevelTabSetView.java | 27 +
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java | 147 +++----
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java | 207 ++++------
3 files changed, 189 insertions(+), 192 deletions(-)
New commits:
commit 96b39f22488b796562f3b050e7b6717f3435a1f7
Author: Joseph Marques <joseph(a)redhat.com>
Date: Sun Nov 28 21:37:54 2010 -0500
ensure global permissions are loaded prior to rendering the view
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/AbstractTwoLevelTabSetView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/AbstractTwoLevelTabSetView.java
index f07f7dc..d091618 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/AbstractTwoLevelTabSetView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/AbstractTwoLevelTabSetView.java
@@ -18,13 +18,18 @@
*/
package org.rhq.enterprise.gui.coregui.client.inventory.common.detail;
+import java.util.EnumSet;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
import com.google.gwt.user.client.History;
+import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.types.Side;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.layout.Layout;
+import org.rhq.core.domain.authz.Permission;
import org.rhq.enterprise.gui.coregui.client.BookmarkableView;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.RefreshableView;
@@ -34,6 +39,8 @@ import org.rhq.enterprise.gui.coregui.client.components.tab.TwoLevelTab;
import org.rhq.enterprise.gui.coregui.client.components.tab.TwoLevelTabSelectedEvent;
import org.rhq.enterprise.gui.coregui.client.components.tab.TwoLevelTabSelectedHandler;
import org.rhq.enterprise.gui.coregui.client.components.tab.TwoLevelTabSet;
+import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message;
import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
/**
@@ -48,6 +55,7 @@ public abstract class AbstractTwoLevelTabSetView<T, U extends Layout> extends Lo
private String tabName;
private String subTabName;
private U titleBar;
+ protected Set<Permission> globalPermissions;
public AbstractTwoLevelTabSetView(String locatorId, String baseViewPath) {
super(locatorId);
@@ -142,6 +150,25 @@ public abstract class AbstractTwoLevelTabSetView<T, U extends Layout> extends Lo
}
public void renderView(final ViewPath viewPath) {
+ GWTServiceLookup.getAuthorizationService().getExplicitGlobalPermissions(new AsyncCallback<Set<Permission>>() {
+ @Override
+ public void onSuccess(Set<Permission> result) {
+ globalPermissions = result;
+ renderTabs(viewPath);
+ }
+
+ @Override
+ public void onFailure(Throwable caught) {
+ CoreGUI.getMessageCenter().notify(
+ new Message(MSG.util_userPerm_loadFailGlobal(), caught, Message.Severity.Error, EnumSet
+ .of(Message.Option.BackgroundJobResult)));
+ globalPermissions = new HashSet<Permission>();
+ renderTabs(viewPath);
+ }
+ });
+ }
+
+ private void renderTabs(final ViewPath viewPath) {
// e.g. #Resource/10010/Summary/Overview
// ^ current path
final int id = Integer.parseInt(viewPath.getCurrent().getPath());
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
index 0d7d3ca..978e927 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
@@ -20,7 +20,6 @@ package org.rhq.enterprise.gui.coregui.client.inventory.groups.detail;
import java.util.ArrayList;
import java.util.EnumSet;
-import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -59,7 +58,6 @@ import org.rhq.enterprise.gui.coregui.client.inventory.groups.detail.monitoring.
import org.rhq.enterprise.gui.coregui.client.inventory.groups.detail.summary.OverviewView;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceSearchView;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository;
-import org.rhq.enterprise.gui.coregui.client.util.message.Message;
/**
* Be able to view members as a resource list, or edit members via selector.
@@ -144,100 +142,83 @@ public class ResourceGroupDetailView extends AbstractTwoLevelTabSetView<Resource
protected List<TwoLevelTab> createTabs() {
List<TwoLevelTab> tabs = new ArrayList<TwoLevelTab>();
- summaryTab = new TwoLevelTab(getTabSet().extendLocatorId("Summary"), new ViewName("Summary", MSG
- .view_tabs_common_summary()), "/images/icons/Service_up_16.png");
- summaryOverview = new SubTab(summaryTab.extendLocatorId("Overview"), new ViewName("Overview", MSG
- .view_tabs_common_overview()), null);
- summaryTimeline = new SubTab(summaryTab.extendLocatorId("Timeline"), new ViewName("Timeline", MSG
- .view_tabs_common_timeline()), null);
+ summaryTab = new TwoLevelTab(getTabSet().extendLocatorId("Summary"), new ViewName("Summary",
+ MSG.view_tabs_common_summary()), "/images/icons/Service_up_16.png");
+ summaryOverview = new SubTab(summaryTab.extendLocatorId("Overview"), new ViewName("Overview",
+ MSG.view_tabs_common_overview()), null);
+ summaryTimeline = new SubTab(summaryTab.extendLocatorId("Timeline"), new ViewName("Timeline",
+ MSG.view_tabs_common_timeline()), null);
summaryTab.registerSubTabs(summaryOverview, summaryTimeline);
tabs.add(summaryTab);
- monitoringTab = new TwoLevelTab(getTabSet().extendLocatorId("Monitoring"), new ViewName("Monitoring", MSG
- .view_tabs_common_monitoring()), "/images/icons/Monitor_grey_16.png");
- monitorGraphs = new SubTab(monitoringTab.extendLocatorId("Graphs"), new ViewName("Graphs", MSG
- .view_tabs_common_graphs()), null);
- monitorTables = new SubTab(monitoringTab.extendLocatorId("Tables"), new ViewName("Tables", MSG
- .view_tabs_common_tables()), null);
- monitorTraits = new SubTab(monitoringTab.extendLocatorId("Traits"), new ViewName("Traits", MSG
- .view_tabs_common_traits()), null);
-
- monitorSched = new SubTab(monitoringTab.extendLocatorId("Schedules"), new ViewName("Schedules", MSG
- .view_tabs_common_schedules()), null);
- monitorCallTime = new SubTab(monitoringTab.extendLocatorId("CallTime"), new ViewName("CallTime", MSG
- .view_tabs_common_calltime()), null);
+ monitoringTab = new TwoLevelTab(getTabSet().extendLocatorId("Monitoring"), new ViewName("Monitoring",
+ MSG.view_tabs_common_monitoring()), "/images/icons/Monitor_grey_16.png");
+ monitorGraphs = new SubTab(monitoringTab.extendLocatorId("Graphs"), new ViewName("Graphs",
+ MSG.view_tabs_common_graphs()), null);
+ monitorTables = new SubTab(monitoringTab.extendLocatorId("Tables"), new ViewName("Tables",
+ MSG.view_tabs_common_tables()), null);
+ monitorTraits = new SubTab(monitoringTab.extendLocatorId("Traits"), new ViewName("Traits",
+ MSG.view_tabs_common_traits()), null);
+
+ monitorSched = new SubTab(monitoringTab.extendLocatorId("Schedules"), new ViewName("Schedules",
+ MSG.view_tabs_common_schedules()), null);
+ monitorCallTime = new SubTab(monitoringTab.extendLocatorId("CallTime"), new ViewName("CallTime",
+ MSG.view_tabs_common_calltime()), null);
monitoringTab.registerSubTabs(monitorGraphs, monitorTables, monitorTraits, monitorSched, monitorCallTime);
tabs.add(monitoringTab);
- inventoryTab = new TwoLevelTab(getTabSet().extendLocatorId("Inventory"), new ViewName("Inventory", MSG
- .view_tabs_common_inventory()), "/images/icons/Inventory_grey_16.png");
- inventoryMembers = new SubTab(inventoryTab.extendLocatorId("Members"), new ViewName("Members", MSG
- .view_tabs_common_members()), null);
+ inventoryTab = new TwoLevelTab(getTabSet().extendLocatorId("Inventory"), new ViewName("Inventory",
+ MSG.view_tabs_common_inventory()), "/images/icons/Inventory_grey_16.png");
+ inventoryMembers = new SubTab(inventoryTab.extendLocatorId("Members"), new ViewName("Members",
+ MSG.view_tabs_common_members()), null);
inventoryConn = new SubTab(inventoryTab.extendLocatorId("ConnectionSettings"), new ViewName(
"ConnectionSettings", MSG.view_tabs_common_connectionSettings()), null);
inventoryConnHistory = new SubTab(inventoryTab.extendLocatorId("ConnectionSettingsHistory"), new ViewName(
"ConnectionSettingsHistory", MSG.view_tabs_common_connectionSettingsHistory()), null);
- inventoryMembership = new SubTab(inventoryTab.extendLocatorId("Membership"), new ViewName("Membership", MSG
- .view_tabs_common_membership()), null); // TODO this will merge with Members
+ inventoryMembership = new SubTab(inventoryTab.extendLocatorId("Membership"), new ViewName("Membership",
+ MSG.view_tabs_common_membership()), null); // TODO this will merge with Members
inventoryTab.registerSubTabs(this.inventoryMembers, this.inventoryConn, this.inventoryConnHistory,
this.inventoryMembership);
tabs.add(inventoryTab);
- operationsTab = new TwoLevelTab(getTabSet().extendLocatorId("Operations"), new ViewName("Operations", MSG
- .view_tabs_common_operations()), "/images/icons/Operation_grey_16.png");
- this.opHistory = new SubTab(operationsTab.extendLocatorId("History"), new ViewName("History", MSG
- .view_tabs_common_history()), null);
- this.opSched = new SubTab(operationsTab.extendLocatorId("Scheduled"), new ViewName("Scheduled", MSG
- .view_tabs_common_scheduled()), null);
+ operationsTab = new TwoLevelTab(getTabSet().extendLocatorId("Operations"), new ViewName("Operations",
+ MSG.view_tabs_common_operations()), "/images/icons/Operation_grey_16.png");
+ this.opHistory = new SubTab(operationsTab.extendLocatorId("History"), new ViewName("History",
+ MSG.view_tabs_common_history()), null);
+ this.opSched = new SubTab(operationsTab.extendLocatorId("Scheduled"), new ViewName("Scheduled",
+ MSG.view_tabs_common_scheduled()), null);
operationsTab.registerSubTabs(this.opHistory, this.opSched);
tabs.add(operationsTab);
- alertsTab = new TwoLevelTab(getTabSet().extendLocatorId("Alerts"), new ViewName("Alerts", MSG
- .view_tabs_common_alerts()), "/images/icons/Alert_grey_16.png");
- this.alertHistory = new SubTab(alertsTab.extendLocatorId("History"), new ViewName("History", MSG
- .view_tabs_common_history()), null);
- this.alertDef = new SubTab(alertsTab.extendLocatorId("Definitions"), new ViewName("Definitions", MSG
- .view_tabs_common_definitions()), null);
+ alertsTab = new TwoLevelTab(getTabSet().extendLocatorId("Alerts"), new ViewName("Alerts",
+ MSG.view_tabs_common_alerts()), "/images/icons/Alert_grey_16.png");
+ this.alertHistory = new SubTab(alertsTab.extendLocatorId("History"), new ViewName("History",
+ MSG.view_tabs_common_history()), null);
+ this.alertDef = new SubTab(alertsTab.extendLocatorId("Definitions"), new ViewName("Definitions",
+ MSG.view_tabs_common_definitions()), null);
alertsTab.registerSubTabs(alertHistory, alertDef);
tabs.add(alertsTab);
configurationTab = new TwoLevelTab(getTabSet().extendLocatorId("Configuration"), new ViewName("Configuration",
MSG.view_tabs_common_configuration()), "/images/icons/Configure_grey_16.png");
- this.configCurrent = new SubTab(configurationTab.extendLocatorId("Current"), new ViewName("Current", MSG
- .view_tabs_common_current()), null);
- this.configHistory = new SubTab(configurationTab.extendLocatorId("History"), new ViewName("History", MSG
- .view_tabs_common_history()), null);
+ this.configCurrent = new SubTab(configurationTab.extendLocatorId("Current"), new ViewName("Current",
+ MSG.view_tabs_common_current()), null);
+ this.configHistory = new SubTab(configurationTab.extendLocatorId("History"), new ViewName("History",
+ MSG.view_tabs_common_history()), null);
configurationTab.registerSubTabs(this.configCurrent, this.configHistory);
tabs.add(configurationTab);
- eventsTab = new TwoLevelTab(getTabSet().extendLocatorId("Events"), new ViewName("Events", MSG
- .view_tabs_common_events()), "/images/icons/Events_grey_16.png");
- this.eventHistory = new SubTab(eventsTab.extendLocatorId("History"), new ViewName("History", MSG
- .view_tabs_common_history()), null);
+ eventsTab = new TwoLevelTab(getTabSet().extendLocatorId("Events"), new ViewName("Events",
+ MSG.view_tabs_common_events()), "/images/icons/Events_grey_16.png");
+ this.eventHistory = new SubTab(eventsTab.extendLocatorId("History"), new ViewName("History",
+ MSG.view_tabs_common_history()), null);
eventsTab.registerSubTabs(eventHistory);
tabs.add(eventsTab);
return tabs;
}
- protected void updateTabContent(final ResourceGroupComposite groupComposite) {
- GWTServiceLookup.getAuthorizationService().getExplicitGlobalPermissions(new AsyncCallback<Set<Permission>>() {
- @Override
- public void onSuccess(Set<Permission> result) {
- updateTabContent(groupComposite, result);
- }
-
- @Override
- public void onFailure(Throwable caught) {
- CoreGUI.getMessageCenter().notify(
- new Message(MSG.util_userPerm_loadFailGlobal(), caught, Message.Severity.Error, EnumSet
- .of(Message.Option.BackgroundJobResult)));
- updateTabContent(groupComposite, new HashSet<Permission>());
- }
- });
- }
-
- protected void updateTabContent(ResourceGroupComposite groupComposite, Set<Permission> globalPermissions) {
+ protected void updateTabContent(ResourceGroupComposite groupComposite) {
boolean enabled;
boolean visible;
Canvas canvas;
@@ -258,8 +239,8 @@ public class ResourceGroupDetailView extends AbstractTwoLevelTabSetView<Resource
// summaryTab.updateSubTab("Overview", new DashboardView(resource));
// summaryTab.updateSubTab("Timeline", timelinePane);
// Summary tab is always visible and enabled.
- updateSubTab(this.summaryTab, this.summaryOverview, new OverviewView(this.summaryOverview
- .extendLocatorId("View"), this.groupComposite), true, true);
+ updateSubTab(this.summaryTab, this.summaryOverview,
+ new OverviewView(this.summaryOverview.extendLocatorId("View"), this.groupComposite), true, true);
if (updateTab(this.monitoringTab, groupCategory == GroupCategory.COMPATIBLE, true)) {
visible = hasMetricsOfType(this.groupComposite, DataType.MEASUREMENT);
@@ -288,22 +269,22 @@ public class ResourceGroupDetailView extends AbstractTwoLevelTabSetView<Resource
}
// Inventory tab is always visible and enabled.
- updateSubTab(this.inventoryTab, this.inventoryMembers, ResourceSearchView.getMembersOf(this.inventoryMembers
- .extendLocatorId("View"), groupId), true, true);
- updateSubTab(this.inventoryTab, this.inventoryConn, new CurrentGroupPluginConfigurationView(this.inventoryConn
- .extendLocatorId("View"), this.groupComposite), facets.contains(ResourceTypeFacet.PLUGIN_CONFIGURATION),
- true);
+ updateSubTab(this.inventoryTab, this.inventoryMembers,
+ ResourceSearchView.getMembersOf(this.inventoryMembers.extendLocatorId("View"), groupId), true, true);
+ updateSubTab(this.inventoryTab, this.inventoryConn,
+ new CurrentGroupPluginConfigurationView(this.inventoryConn.extendLocatorId("View"), this.groupComposite),
+ facets.contains(ResourceTypeFacet.PLUGIN_CONFIGURATION), true);
updateSubTab(this.inventoryTab, this.inventoryConnHistory, new HistoryGroupPluginConfigurationView(
- this.inventoryConnHistory.extendLocatorId("View"), this.groupComposite), facets
- .contains(ResourceTypeFacet.PLUGIN_CONFIGURATION), true);
+ this.inventoryConnHistory.extendLocatorId("View"), this.groupComposite),
+ facets.contains(ResourceTypeFacet.PLUGIN_CONFIGURATION), true);
visible = !isAutoGroup();
enabled = visible && globalPermissions.contains(Permission.MANAGE_INVENTORY);
canvas = (enabled) ? new ResourceGroupMembershipView(this.inventoryMembership.extendLocatorId("View"), groupId)
: null;
updateSubTab(this.inventoryTab, this.inventoryMembership, canvas, visible, enabled);
- if (updateTab(this.operationsTab, groupCategory == GroupCategory.COMPATIBLE
- && facets.contains(ResourceTypeFacet.OPERATION), true)) {
+ if (updateTab(this.operationsTab,
+ groupCategory == GroupCategory.COMPATIBLE && facets.contains(ResourceTypeFacet.OPERATION), true)) {
updateSubTab(this.operationsTab, this.opHistory, new FullHTMLPane(this.opHistory.extendLocatorId("View"),
"/rhq/group/operation/groupOperationHistory-plain.xhtml?groupId=" + groupId), true, true);
updateSubTab(this.operationsTab, this.opSched, new FullHTMLPane(this.opSched.extendLocatorId("View"),
@@ -313,8 +294,8 @@ public class ResourceGroupDetailView extends AbstractTwoLevelTabSetView<Resource
// alerts tab is always visible, even for mixed groups
if (updateTab(this.alertsTab, true, true)) {
// alert history is always available
- updateSubTab(this.alertsTab, this.alertHistory, GroupAlertHistoryView.get(this.alertHistory
- .extendLocatorId("View"), groupComposite), true, true);
+ updateSubTab(this.alertsTab, this.alertHistory,
+ GroupAlertHistoryView.get(this.alertHistory.extendLocatorId("View"), groupComposite), true, true);
// but alert definitions can only be created on compatible groups
visible = (groupCategory == GroupCategory.COMPATIBLE);
canvas = (visible) ? new GroupAlertDefinitionsView(alertDef.extendLocatorId("View"), this.groupComposite)
@@ -329,16 +310,16 @@ public class ResourceGroupDetailView extends AbstractTwoLevelTabSetView<Resource
// "/rhq/group/configuration/viewCurrent-plain.xhtml?groupId=" + groupId), true, true);
updateSubTab(this.configurationTab, this.configCurrent, new GroupResourceConfigurationEditView(
this.configCurrent.extendLocatorId("View"), this.groupComposite), true, true);
- updateSubTab(this.configurationTab, this.configHistory, new FullHTMLPane(this.configHistory
- .extendLocatorId("View"), "/rhq/group/configuration/history-plain.xhtml?groupId=" + groupId), true,
- true);
+ updateSubTab(this.configurationTab, this.configHistory,
+ new FullHTMLPane(this.configHistory.extendLocatorId("View"),
+ "/rhq/group/configuration/history-plain.xhtml?groupId=" + groupId), true, true);
}
// allow mixed groups to show events from supporting resources
visible = groupCategory == GroupCategory.MIXED
|| (groupCategory == GroupCategory.COMPATIBLE && facets.contains(ResourceTypeFacet.EVENT));
if (updateTab(this.eventsTab, visible, true)) {
- updateSubTab(this.eventsTab, this.eventHistory, EventCompositeHistoryView.get(this.eventHistory
- .extendLocatorId("View"), groupComposite), true, true);
+ updateSubTab(this.eventsTab, this.eventHistory,
+ EventCompositeHistoryView.get(this.eventHistory.extendLocatorId("View"), groupComposite), true, true);
}
this.show();
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
index c914b9d..0191f51 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
@@ -20,7 +20,6 @@ package org.rhq.enterprise.gui.coregui.client.inventory.resource.detail;
import java.util.ArrayList;
import java.util.EnumSet;
-import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -121,97 +120,97 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
protected List<TwoLevelTab> createTabs() {
List<TwoLevelTab> tabs = new ArrayList<TwoLevelTab>();
- summaryTab = new TwoLevelTab(getTabSet().extendLocatorId("Summary"), new ViewName("Summary", MSG
- .view_tabs_common_summary()), "/images/icons/Service_up_16.png");
- summaryOverview = new SubTab(summaryTab.extendLocatorId("Overview"), new ViewName("Overview", MSG
- .view_tabs_common_overview()), null);
- summaryDashboard = new SubTab(summaryTab.extendLocatorId("Dashboard"), new ViewName("Dashboard", MSG
- .view_tabs_common_dashboard()), null);
- summaryTimeline = new SubTab(summaryTab.extendLocatorId("Timeline"), new ViewName("Timeline", MSG
- .view_tabs_common_timeline()), null);
+ summaryTab = new TwoLevelTab(getTabSet().extendLocatorId("Summary"), new ViewName("Summary",
+ MSG.view_tabs_common_summary()), "/images/icons/Service_up_16.png");
+ summaryOverview = new SubTab(summaryTab.extendLocatorId("Overview"), new ViewName("Overview",
+ MSG.view_tabs_common_overview()), null);
+ summaryDashboard = new SubTab(summaryTab.extendLocatorId("Dashboard"), new ViewName("Dashboard",
+ MSG.view_tabs_common_dashboard()), null);
+ summaryTimeline = new SubTab(summaryTab.extendLocatorId("Timeline"), new ViewName("Timeline",
+ MSG.view_tabs_common_timeline()), null);
summaryTab.registerSubTabs(summaryOverview, summaryDashboard, summaryTimeline);
tabs.add(summaryTab);
- monitoringTab = new TwoLevelTab(getTabSet().extendLocatorId("Monitoring"), new ViewName("Monitoring", MSG
- .view_tabs_common_monitoring()), "/images/icons/Monitor_grey_16.png");
- monitorGraphs = new SubTab(monitoringTab.extendLocatorId("Graphs"), new ViewName("Graphs", MSG
- .view_tabs_common_graphs()), null);
- monitorTables = new SubTab(monitoringTab.extendLocatorId("Tables"), new ViewName("Tables", MSG
- .view_tabs_common_tables()), null);
- monitorTraits = new SubTab(monitoringTab.extendLocatorId("Traits"), new ViewName("Traits", MSG
- .view_tabs_common_traits()), null);
- monitorAvail = new SubTab(monitoringTab.extendLocatorId("Availability"), new ViewName("Availability", MSG
- .view_tabs_common_availability()), null);
- monitorSched = new SubTab(monitoringTab.extendLocatorId("Schedules"), new ViewName("Schedules", MSG
- .view_tabs_common_schedules()), null);
- monitorCallTime = new SubTab(monitoringTab.extendLocatorId("CallTime"), new ViewName("CallTime", MSG
- .view_tabs_common_calltime()), null);
+ monitoringTab = new TwoLevelTab(getTabSet().extendLocatorId("Monitoring"), new ViewName("Monitoring",
+ MSG.view_tabs_common_monitoring()), "/images/icons/Monitor_grey_16.png");
+ monitorGraphs = new SubTab(monitoringTab.extendLocatorId("Graphs"), new ViewName("Graphs",
+ MSG.view_tabs_common_graphs()), null);
+ monitorTables = new SubTab(monitoringTab.extendLocatorId("Tables"), new ViewName("Tables",
+ MSG.view_tabs_common_tables()), null);
+ monitorTraits = new SubTab(monitoringTab.extendLocatorId("Traits"), new ViewName("Traits",
+ MSG.view_tabs_common_traits()), null);
+ monitorAvail = new SubTab(monitoringTab.extendLocatorId("Availability"), new ViewName("Availability",
+ MSG.view_tabs_common_availability()), null);
+ monitorSched = new SubTab(monitoringTab.extendLocatorId("Schedules"), new ViewName("Schedules",
+ MSG.view_tabs_common_schedules()), null);
+ monitorCallTime = new SubTab(monitoringTab.extendLocatorId("CallTime"), new ViewName("CallTime",
+ MSG.view_tabs_common_calltime()), null);
monitoringTab.registerSubTabs(monitorGraphs, monitorTables, monitorTraits, monitorAvail, monitorSched,
monitorCallTime);
tabs.add(monitoringTab);
- inventoryTab = new TwoLevelTab(getTabSet().extendLocatorId("Inventory"), new ViewName("Inventory", MSG
- .view_tabs_common_inventory()), "/images/icons/Inventory_grey_16.png");
- inventoryChildren = new SubTab(inventoryTab.extendLocatorId("Children"), new ViewName("Children", MSG
- .view_tabs_common_child_resources()), null);
- inventoryChildHistory = new SubTab(inventoryTab.extendLocatorId("ChildHist"), new ViewName("ChildHistory", MSG
- .view_tabs_common_child_history()), null);
+ inventoryTab = new TwoLevelTab(getTabSet().extendLocatorId("Inventory"), new ViewName("Inventory",
+ MSG.view_tabs_common_inventory()), "/images/icons/Inventory_grey_16.png");
+ inventoryChildren = new SubTab(inventoryTab.extendLocatorId("Children"), new ViewName("Children",
+ MSG.view_tabs_common_child_resources()), null);
+ inventoryChildHistory = new SubTab(inventoryTab.extendLocatorId("ChildHist"), new ViewName("ChildHistory",
+ MSG.view_tabs_common_child_history()), null);
inventoryConn = new SubTab(inventoryTab.extendLocatorId("ConnectionSettings"), new ViewName(
"ConnectionSettings", MSG.view_tabs_common_connectionSettings()), null);
inventoryConnHistory = new SubTab(inventoryTab.extendLocatorId("ConnSetHist"), new ViewName(
"ConnectionSettingsHistory", MSG.view_tabs_common_connectionSettingsHistory()), null);
- inventoryGroups = new SubTab(inventoryTab.extendLocatorId("Groups"), new ViewName("Groups", MSG
- .view_tabs_common_groups()), null);
+ inventoryGroups = new SubTab(inventoryTab.extendLocatorId("Groups"), new ViewName("Groups",
+ MSG.view_tabs_common_groups()), null);
inventoryGroupMembership = new SubTab(inventoryTab.extendLocatorId("GroupMembership"), new ViewName(
"GroupMembership", MSG.view_tabs_common_group_membership()), null);
inventoryTab.registerSubTabs(this.inventoryChildren, this.inventoryChildHistory, this.inventoryConn,
this.inventoryConnHistory, this.inventoryGroups, this.inventoryGroupMembership);
tabs.add(inventoryTab);
- operationsTab = new TwoLevelTab(getTabSet().extendLocatorId("Operations"), new ViewName("Operations", MSG
- .view_tabs_common_operations()), "/images/icons/Operation_grey_16.png");
- this.opHistory = new SubTab(operationsTab.extendLocatorId("History"), new ViewName("History", MSG
- .view_tabs_common_history()), null);
- this.opSched = new SubTab(operationsTab.extendLocatorId("Scheduled"), new ViewName("Scheduled", MSG
- .view_tabs_common_scheduled()), null);
+ operationsTab = new TwoLevelTab(getTabSet().extendLocatorId("Operations"), new ViewName("Operations",
+ MSG.view_tabs_common_operations()), "/images/icons/Operation_grey_16.png");
+ this.opHistory = new SubTab(operationsTab.extendLocatorId("History"), new ViewName("History",
+ MSG.view_tabs_common_history()), null);
+ this.opSched = new SubTab(operationsTab.extendLocatorId("Scheduled"), new ViewName("Scheduled",
+ MSG.view_tabs_common_scheduled()), null);
operationsTab.registerSubTabs(this.opHistory, this.opSched);
tabs.add(operationsTab);
- alertsTab = new TwoLevelTab(getTabSet().extendLocatorId("Alerts"), new ViewName("Alerts", MSG
- .view_tabs_common_alerts()), "/images/icons/Alert_grey_16.png");
- this.alertHistory = new SubTab(alertsTab.extendLocatorId("History"), new ViewName("History", MSG
- .view_tabs_common_history()), null);
- this.alertDef = new SubTab(alertsTab.extendLocatorId("Definitions"), new ViewName("Definitions", MSG
- .view_tabs_common_definitions()), null);
+ alertsTab = new TwoLevelTab(getTabSet().extendLocatorId("Alerts"), new ViewName("Alerts",
+ MSG.view_tabs_common_alerts()), "/images/icons/Alert_grey_16.png");
+ this.alertHistory = new SubTab(alertsTab.extendLocatorId("History"), new ViewName("History",
+ MSG.view_tabs_common_history()), null);
+ this.alertDef = new SubTab(alertsTab.extendLocatorId("Definitions"), new ViewName("Definitions",
+ MSG.view_tabs_common_definitions()), null);
alertsTab.registerSubTabs(alertHistory, alertDef);
tabs.add(alertsTab);
configurationTab = new TwoLevelTab(getTabSet().extendLocatorId("Configuration"), new ViewName("Configuration",
MSG.view_tabs_common_configuration()), "/images/icons/Configure_grey_16.png");
- this.configCurrent = new SubTab(configurationTab.extendLocatorId("Current"), new ViewName("Current", MSG
- .view_tabs_common_current()), null);
- this.configHistory = new SubTab(configurationTab.extendLocatorId("History"), new ViewName("History", MSG
- .view_tabs_common_history()), null);
+ this.configCurrent = new SubTab(configurationTab.extendLocatorId("Current"), new ViewName("Current",
+ MSG.view_tabs_common_current()), null);
+ this.configHistory = new SubTab(configurationTab.extendLocatorId("History"), new ViewName("History",
+ MSG.view_tabs_common_history()), null);
configurationTab.registerSubTabs(this.configCurrent, this.configHistory);
tabs.add(configurationTab);
- eventsTab = new TwoLevelTab(getTabSet().extendLocatorId("Events"), new ViewName("Events", MSG
- .view_tabs_common_events()), "/images/icons/Events_grey_16.png");
- this.eventHistory = new SubTab(eventsTab.extendLocatorId("History"), new ViewName("History", MSG
- .view_tabs_common_history()), null);
+ eventsTab = new TwoLevelTab(getTabSet().extendLocatorId("Events"), new ViewName("Events",
+ MSG.view_tabs_common_events()), "/images/icons/Events_grey_16.png");
+ this.eventHistory = new SubTab(eventsTab.extendLocatorId("History"), new ViewName("History",
+ MSG.view_tabs_common_history()), null);
eventsTab.registerSubTabs(eventHistory);
tabs.add(eventsTab);
- contentTab = new TwoLevelTab(getTabSet().extendLocatorId("Content"), new ViewName("Content", MSG
- .view_tabs_common_content()), "/images/icons/Content_grey_16.png");
- this.contentDeployed = new SubTab(contentTab.extendLocatorId("Deployed"), new ViewName("Deployed", MSG
- .view_tabs_common_deployed()), null);
+ contentTab = new TwoLevelTab(getTabSet().extendLocatorId("Content"), new ViewName("Content",
+ MSG.view_tabs_common_content()), "/images/icons/Content_grey_16.png");
+ this.contentDeployed = new SubTab(contentTab.extendLocatorId("Deployed"), new ViewName("Deployed",
+ MSG.view_tabs_common_deployed()), null);
this.contentNew = new SubTab(contentTab.extendLocatorId("New"),
new ViewName("New", MSG.view_tabs_common_new()), null);
this.contentSubscrip = new SubTab(contentTab.extendLocatorId("Subscriptions"), new ViewName("Subscriptions",
MSG.view_tabs_common_subscriptions()), null);
- this.contentHistory = new SubTab(contentTab.extendLocatorId("History"), new ViewName("History", MSG
- .view_tabs_common_history()), null);
+ this.contentHistory = new SubTab(contentTab.extendLocatorId("History"), new ViewName("History",
+ MSG.view_tabs_common_history()), null);
contentTab.registerSubTabs(contentDeployed, contentNew, contentSubscrip, contentHistory);
tabs.add(contentTab);
@@ -222,24 +221,7 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
return new ResourceTitleBar(extendLocatorId("TitleBar"));
}
- protected void updateTabContent(final ResourceComposite resourceComposite) {
- GWTServiceLookup.getAuthorizationService().getExplicitGlobalPermissions(new AsyncCallback<Set<Permission>>() {
- @Override
- public void onSuccess(Set<Permission> result) {
- updateTabContent(resourceComposite, result);
- }
-
- @Override
- public void onFailure(Throwable caught) {
- CoreGUI.getMessageCenter().notify(
- new Message(MSG.util_userPerm_loadFailGlobal(), caught, Message.Severity.Error, EnumSet
- .of(Message.Option.BackgroundJobResult)));
- updateTabContent(resourceComposite, new HashSet<Permission>());
- }
- });
- }
-
- protected void updateTabContent(ResourceComposite resourceComposite, Set<Permission> globalPermissions) {
+ protected void updateTabContent(ResourceComposite resourceComposite) {
boolean enabled;
boolean visible;
Canvas canvas;
@@ -256,14 +238,15 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
Set<ResourceTypeFacet> facets = this.resourceComposite.getResourceFacets().getFacets();
// Summary Tab
- updateSubTab(this.summaryTab, this.summaryOverview, new OverviewView(this.summaryTab
- .extendLocatorId("OverviewView"), this.resourceComposite), true, true);
+ updateSubTab(this.summaryTab, this.summaryOverview,
+ new OverviewView(this.summaryTab.extendLocatorId("OverviewView"), this.resourceComposite), true, true);
- updateSubTab(this.summaryTab, this.summaryDashboard, new DashboardView(this.summaryDashboard
- .extendLocatorId("View"), this.resourceComposite), true, true);
+ updateSubTab(this.summaryTab, this.summaryDashboard,
+ new DashboardView(this.summaryDashboard.extendLocatorId("View"), this.resourceComposite), true, true);
- updateSubTab(this.summaryTab, this.summaryTimeline, new FullHTMLPane(this.summaryTimeline
- .extendLocatorId("View"), "/rhq/resource/summary/timeline-plain.xhtml?id=" + resource.getId()), true, true);
+ updateSubTab(this.summaryTab, this.summaryTimeline,
+ new FullHTMLPane(this.summaryTimeline.extendLocatorId("View"),
+ "/rhq/resource/summary/timeline-plain.xhtml?id=" + resource.getId()), true, true);
// Monitoring Tab
visible = hasMetricsOfType(this.resourceComposite, DataType.MEASUREMENT);
@@ -284,8 +267,9 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
updateSubTab(this.monitoringTab, this.monitorAvail, new FullHTMLPane(this.monitorAvail.extendLocatorId("View"),
"/rhq/resource/monitor/availabilityHistory-plain.xhtml?id=" + resource.getId()), true, true);
- updateSubTab(this.monitoringTab, this.monitorSched, new SchedulesView(monitoringTab
- .extendLocatorId("SchedulesView"), resource.getId()), hasMetricsOfType(this.resourceComposite, null), true);
+ updateSubTab(this.monitoringTab, this.monitorSched,
+ new SchedulesView(monitoringTab.extendLocatorId("SchedulesView"), resource.getId()),
+ hasMetricsOfType(this.resourceComposite, null), true);
visible = facets.contains(ResourceTypeFacet.CALL_TIME);
canvas = (visible) ? new FullHTMLPane(this.monitorCallTime.extendLocatorId("View"),
@@ -295,8 +279,8 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
// Inventory Tab
ResourceType type = this.resourceComposite.getResource().getResourceType();
visible = !type.getChildResourceTypes().isEmpty();
- canvas = (visible) ? ResourceCompositeSearchView.getChildrenOf(this.inventoryTab
- .extendLocatorId("ChildrenView"), resourceComposite) : null;
+ canvas = (visible) ? ResourceCompositeSearchView.getChildrenOf(
+ this.inventoryTab.extendLocatorId("ChildrenView"), resourceComposite) : null;
updateSubTab(this.inventoryTab, this.inventoryChildren, canvas, visible, true);
updateSubTab(this.inventoryTab, this.inventoryChildHistory, new Canvas(), visible, true);
@@ -310,8 +294,9 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
canvas = (visible) ? new Canvas() : null; // TODO: Add real canvas when visible
updateSubTab(this.inventoryTab, this.inventoryConnHistory, canvas, visible, true);
- updateSubTab(this.inventoryTab, this.inventoryGroups, ResourceGroupListView.getGroupsOf(this.inventoryTab
- .extendLocatorId("GroupsView"), resource.getId()), true, true);
+ updateSubTab(this.inventoryTab, this.inventoryGroups,
+ ResourceGroupListView.getGroupsOf(this.inventoryTab.extendLocatorId("GroupsView"), resource.getId()), true,
+ true);
enabled = globalPermissions.contains(Permission.MANAGE_INVENTORY);
canvas = (enabled) ? new ResourceResourceGroupsView(this.inventoryTab.extendLocatorId("GroupMembershipView"),
@@ -326,54 +311,58 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
// 3) operation arguments/results become read-only configuration data in the history details pop-up
// 4) user can navigate to the group operation that spawned this resource operation history, if appropriate
// note: enabled operation execution/schedules from left-nav, if it doesn't already exist
- updateSubTab(this.operationsTab, this.opHistory, OperationHistoryView.getResourceHistoryView(operationsTab
- .extendLocatorId("HistoryView"), this.resourceComposite), true, true);
+ updateSubTab(this.operationsTab, this.opHistory, OperationHistoryView.getResourceHistoryView(
+ operationsTab.extendLocatorId("HistoryView"), this.resourceComposite), true, true);
updateSubTab(this.operationsTab, this.opSched, new FullHTMLPane(this.opSched.extendLocatorId("View"),
"/rhq/resource/operation/resourceOperationSchedules-plain.xhtml?id=" + resource.getId()), true, true);
}
// Alerts Tab
- updateSubTab(this.alertsTab, this.alertHistory, ResourceAlertHistoryView.get(this.alertHistory
- .extendLocatorId("View"), resourceComposite), true, true);
+ updateSubTab(this.alertsTab, this.alertHistory,
+ ResourceAlertHistoryView.get(this.alertHistory.extendLocatorId("View"), resourceComposite), true, true);
- updateSubTab(this.alertsTab, this.alertDef, new ResourceAlertDefinitionsView(alertsTab
- .extendLocatorId("AlertDefView"), this.resourceComposite), true, true);
+ updateSubTab(this.alertsTab, this.alertDef,
+ new ResourceAlertDefinitionsView(alertsTab.extendLocatorId("AlertDefView"), this.resourceComposite), true,
+ true);
// Configuration Tab
- if (updateTab(this.configurationTab, facets.contains(ResourceTypeFacet.CONFIGURATION), resourcePermissions
- .isConfigureRead())) {
+ if (updateTab(this.configurationTab, facets.contains(ResourceTypeFacet.CONFIGURATION),
+ resourcePermissions.isConfigureRead())) {
- updateSubTab(this.configurationTab, this.configCurrent, new ResourceConfigurationEditView(this
- .extendLocatorId("ResourceConfigView"), resourceComposite), true, true);
+ updateSubTab(this.configurationTab, this.configCurrent,
+ new ResourceConfigurationEditView(this.extendLocatorId("ResourceConfigView"), resourceComposite), true,
+ true);
- updateSubTab(this.configurationTab, this.configHistory, ConfigurationHistoryView.getHistoryOf(this
- .extendLocatorId("ConfigHistView"), resource.getId()), true, true);
+ updateSubTab(this.configurationTab, this.configHistory,
+ ConfigurationHistoryView.getHistoryOf(this.extendLocatorId("ConfigHistView"), resource.getId()), true,
+ true);
}
// Events Tab
if (updateTab(this.eventsTab, facets.contains(ResourceTypeFacet.EVENT), true)) {
- updateSubTab(this.eventsTab, this.eventHistory, EventCompositeHistoryView.get(this.eventsTab
- .extendLocatorId("CompositeHistoryView"), resourceComposite), true, true);
+ updateSubTab(this.eventsTab, this.eventHistory, EventCompositeHistoryView.get(
+ this.eventsTab.extendLocatorId("CompositeHistoryView"), resourceComposite), true, true);
}
// Content Tab
if (updateTab(this.contentTab, facets.contains(ResourceTypeFacet.CONTENT), true)) {
- updateSubTab(this.contentTab, this.contentDeployed, new FullHTMLPane(this.contentDeployed
- .extendLocatorId("View"), "/rhq/resource/content/view-plain.xhtml?id=" + resource.getId()), true, true);
+ updateSubTab(this.contentTab, this.contentDeployed,
+ new FullHTMLPane(this.contentDeployed.extendLocatorId("View"),
+ "/rhq/resource/content/view-plain.xhtml?id=" + resource.getId()), true, true);
updateSubTab(this.contentTab, this.contentNew, new FullHTMLPane(this.contentNew.extendLocatorId("View"),
"/rhq/resource/content/deploy-plain.xhtml?id=" + resource.getId()), true, true);
- updateSubTab(this.contentTab, this.contentSubscrip, new FullHTMLPane(this.contentSubscrip
- .extendLocatorId("View"), "/rhq/resource/content/subscription-plain.xhtml?id=" + resource.getId()),
- true, true);
+ updateSubTab(this.contentTab, this.contentSubscrip,
+ new FullHTMLPane(this.contentSubscrip.extendLocatorId("View"),
+ "/rhq/resource/content/subscription-plain.xhtml?id=" + resource.getId()), true, true);
- updateSubTab(this.contentTab, this.contentHistory, new FullHTMLPane(this.configHistory
- .extendLocatorId("View"), "/rhq/resource/content/history-plain.xhtml?id=" + resource.getId()), true,
- true);
+ updateSubTab(this.contentTab, this.contentHistory,
+ new FullHTMLPane(this.configHistory.extendLocatorId("View"),
+ "/rhq/resource/content/history-plain.xhtml?id=" + resource.getId()), true, true);
}
this.show();
13 years, 5 months
[rhq] 5 commits - modules/enterprise
by Joseph Marques
modules/enterprise/gui/coregui/src/main/java/com/google/gwt/user/rebind/rpc/TrackingProxyCreator.java | 44 ++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/Footer.java | 32 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/UserPermissionsManager.java | 127 -------
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/UserSessionManager.java | 16
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RoleEditView.java | 29 +
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RolesDataSource.java | 25 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RolesView.java | 33 +-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UserEditView.java | 39 +-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UsersView.java | 39 +-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertDataSource.java | 38 --
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertPortletDataSource.java | 38 --
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/GWTServiceLookup.java | 45 --
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java | 23 +
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java | 22 +
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/operation/RecentOperationsDataSource.java | 47 +-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/operation/ScheduledOperationsDataSource.java | 45 +-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/resource/ProblemResourcesDataSource.java | 44 +-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/test/TestTopView.java | 12
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/test/i18n/TestRemoteServiceStatisticsView.java | 89 +++++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/RPCDataSource.java | 11
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/rpc/MonitoringRequestCallback.java | 104 ------
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/rpc/RPCManager.java | 105 ------
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/rpc/RPCTracker.java | 100 ++++++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/rpc/RemoteServiceStatistics.java | 162 ++++++++++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/rpc/TrackingRemoteServiceProxy.java | 110 ++++++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/rpc/TrackingRequestCallback.java | 89 +++++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AbstractGWTServiceImpl.java | 22 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/user/rebind/rpc/TrackingServiceInterfaceProxyGenerator.java | 39 ++
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml | 6
29 files changed, 915 insertions(+), 620 deletions(-)
New commits:
commit b46a3e405689a11e3bcdee5065fc1fd9b8b6a272
Author: Joseph Marques <joseph(a)redhat.com>
Date: Sat Nov 27 03:48:09 2010 -0500
statistics view for all remote services executed since application startup
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/test/TestTopView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/test/TestTopView.java
index 522bc5d..92823f9 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/test/TestTopView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/test/TestTopView.java
@@ -34,6 +34,7 @@ import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTyp
import org.rhq.enterprise.gui.coregui.client.test.configuration.TestConfigurationView;
import org.rhq.enterprise.gui.coregui.client.test.configuration.TestGroupConfigurationView;
import org.rhq.enterprise.gui.coregui.client.test.i18n.TestPluralizationView;
+import org.rhq.enterprise.gui.coregui.client.test.i18n.TestRemoteServiceStatisticsView;
/**
* The Test top-level view. This view is "hidden", i.e. there are no links to it, so the user must go to the URL
@@ -59,6 +60,7 @@ public class TestTopView extends AbstractSectionedLeftNavigationView {
// view IDs for Misc section
private static final ViewName MISC_SECTION_VIEW_ID = new ViewName("Misc");
private static final ViewName PAGE_PLURALIZATION_TEST = new ViewName("PluralizationTest");
+ private static final ViewName PAGE_REMOTE_SERVICE_STATISTICS = new ViewName("Remote Service Statistics");
public TestTopView() {
// This is a top level view, so our locator id can simply be our view id.
@@ -127,6 +129,14 @@ public class TestTopView extends AbstractSectionedLeftNavigationView {
}
});
- return new NavigationSection(MISC_SECTION_VIEW_ID, pluralizationItem);
+ NavigationItem remoteServiceStatisticsItem = new NavigationItem(PAGE_REMOTE_SERVICE_STATISTICS, null,
+ new ViewFactory() {
+ public Canvas createView() {
+ return new TestRemoteServiceStatisticsView(
+ extendLocatorId(PAGE_REMOTE_SERVICE_STATISTICS.getName()));
+ }
+ });
+
+ return new NavigationSection(MISC_SECTION_VIEW_ID, pluralizationItem, remoteServiceStatisticsItem);
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/test/i18n/TestRemoteServiceStatisticsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/test/i18n/TestRemoteServiceStatisticsView.java
new file mode 100644
index 0000000..cbc5bda
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/test/i18n/TestRemoteServiceStatisticsView.java
@@ -0,0 +1,89 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.gui.coregui.client.test.i18n;
+
+import java.util.List;
+
+import com.smartgwt.client.data.SortSpecifier;
+import com.smartgwt.client.types.Alignment;
+import com.smartgwt.client.types.SortDirection;
+import com.smartgwt.client.widgets.grid.ListGridField;
+import com.smartgwt.client.widgets.grid.ListGridRecord;
+
+import org.rhq.enterprise.gui.coregui.client.components.table.Table;
+import org.rhq.enterprise.gui.coregui.client.util.rpc.RemoteServiceStatistics;
+import org.rhq.enterprise.gui.coregui.client.util.rpc.RemoteServiceStatistics.Stat;
+
+/**
+ * A view that gives a display of statistics for all remote services executed since the application was loaded.
+ *
+ * @author Joseph Marques
+ */
+public class TestRemoteServiceStatisticsView extends Table {
+
+ private static final SortSpecifier[] defaultSorts = new SortSpecifier[] { new SortSpecifier("average",
+ SortDirection.DESCENDING) };
+
+ public TestRemoteServiceStatisticsView(String locatorId) {
+ super(locatorId, "Remote Service Statistics", null, defaultSorts, null, false);
+ }
+
+ @Override
+ protected void configureTable() {
+ ListGridField serviceName = new ListGridField("serviceName", "Service Name");
+ ListGridField methodName = new ListGridField("methodName", "Method Name");
+ ListGridField count = new ListGridField("count", "Count");
+ count.setAlign(Alignment.CENTER);
+ ListGridField total = new ListGridField("total", "Total (ms)");
+ total.setAlign(Alignment.RIGHT);
+ ListGridField average = new ListGridField("average", "Average (ms)");
+ average.setAlign(Alignment.RIGHT);
+ ListGridField latest = new ListGridField("latest", "Latest (ms)");
+ latest.setAlign(Alignment.RIGHT);
+ ListGridField slowest = new ListGridField("slowest", "Slowest (ms)");
+ slowest.setAlign(Alignment.RIGHT);
+ ListGridField fastest = new ListGridField("fastest", "Fastest (ms)");
+ fastest.setAlign(Alignment.RIGHT);
+
+ getListGrid().setFields(serviceName, methodName, count, total, average, latest, slowest, fastest);
+ getListGrid().setRecords(transform(RemoteServiceStatistics.getAll()));
+ }
+
+ private ListGridRecord[] transform(List<Stat> stats) {
+ ListGridRecord[] results = new ListGridRecord[stats.size()];
+ for (int i = 0; i < stats.size(); i++) {
+ results[i] = transform(stats.get(i));
+ }
+ return results;
+ }
+
+ private ListGridRecord transform(Stat stat) {
+ ListGridRecord record = new ListGridRecord();
+ record.setAttribute("serviceName", stat.getServiceName());
+ record.setAttribute("methodName", stat.getMethodName());
+ record.setAttribute("count", stat.getCount());
+ record.setAttribute("total", stat.getTotal());
+ record.setAttribute("average", stat.getTotal() / stat.getCount());
+ record.setAttribute("latest", stat.getLatest());
+ record.setAttribute("slowest", stat.getSlowest());
+ record.setAttribute("fastest", stat.getFastest());
+ return record;
+ }
+
+}
commit 2eebd5eb00a6a490cc8717afd040bed8750ac1c0
Author: Joseph Marques <joseph(a)redhat.com>
Date: Sat Nov 27 03:45:43 2010 -0500
mechanism for client-side RPC lifecycle management
diff --git a/modules/enterprise/gui/coregui/src/main/java/com/google/gwt/user/rebind/rpc/TrackingProxyCreator.java b/modules/enterprise/gui/coregui/src/main/java/com/google/gwt/user/rebind/rpc/TrackingProxyCreator.java
new file mode 100644
index 0000000..32ee120
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/com/google/gwt/user/rebind/rpc/TrackingProxyCreator.java
@@ -0,0 +1,44 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package com.google.gwt.user.rebind.rpc;
+
+import com.google.gwt.core.ext.typeinfo.JClassType;
+import com.google.gwt.user.client.rpc.RemoteService;
+import com.google.gwt.user.client.rpc.impl.RemoteServiceProxy;
+
+import org.rhq.enterprise.gui.coregui.client.util.rpc.TrackingRemoteServiceProxy;
+
+/**
+ * Creates a customized client-side proxy for a {@link RemoteService} interface.
+ *
+ * @see TrackingRemoteServiceProxy
+ * @author Joseph Marques
+ */
+public class TrackingProxyCreator extends ProxyCreator {
+
+ public TrackingProxyCreator(JClassType type) {
+ super(type);
+ }
+
+ @Override
+ protected Class<? extends RemoteServiceProxy> getProxySupertype() {
+ return TrackingRemoteServiceProxy.class;
+ }
+
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/GWTServiceLookup.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/GWTServiceLookup.java
index cd3cb71..d5cb3c0 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/GWTServiceLookup.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/GWTServiceLookup.java
@@ -19,16 +19,12 @@
package org.rhq.enterprise.gui.coregui.client.gwt;
import com.allen_sauer.gwt.log.client.Log;
-import com.google.gwt.core.client.GWT;
import com.google.gwt.http.client.RequestBuilder;
-import com.google.gwt.http.client.RequestCallback;
import com.google.gwt.user.client.rpc.RpcRequestBuilder;
import com.google.gwt.user.client.rpc.ServiceDefTarget;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.UserSessionManager;
-import org.rhq.enterprise.gui.coregui.client.util.rpc.MonitoringRequestCallback;
-import org.rhq.enterprise.gui.coregui.client.util.rpc.RPCManager;
/**
* This lookup service retrieves each RPC service and sets a
@@ -193,51 +189,16 @@ public class GWTServiceLookup {
String sessionId = UserSessionManager.getSessionId();
if (sessionId != null) {
- Log.debug("SessionRpcRequestBuilder is adding sessionId to request: " + sessionId);
+ Log.debug("SessionRpcRequestBuilder is adding sessionId(" + sessionId + ") to request("
+ + serviceEntryPoint + ")");
rb.setHeader(UserSessionManager.SESSION_NAME, sessionId);
} else {
- Log.error("SessionRpcRequestBuilder built without a value for " + UserSessionManager.SESSION_NAME);
+ Log.error("SessionRpcRequestBuilder missing sessionId for request(" + serviceEntryPoint + ") ");
}
return rb;
}
- @Override
- protected void doFinish(RequestBuilder rb) {
- super.doFinish(rb);
-
- // TODO: alter callback handlers to capture timeout failure and retry (at least once)
- // to add resilience to GWT service calls
-
- int callId = RPCManager.nextCallId();
- String callName = determineCallName();
- RequestCallback original = rb.getCallback();
-
- MonitoringRequestCallback monitoringCallback = new MonitoringRequestCallback(callId, callName, original);
- rb.setCallback(monitoringCallback);
-
- RPCManager.getInstance().register(monitoringCallback);
- }
-
- private String determineCallName() {
- if (!GWT.isScript()) {
- // expensive name calculation only in dev-mode
- StackTraceElement[] stack = new Exception().getStackTrace();
-
- // Skip the first two stack elements to get to the proxy calling
- for (int i = 2; i < stack.length; i++) {
- StackTraceElement ste = stack[i];
- // e.g. "org.rhq.enterprise.gui.coregui.client.gwt.ResourceGWTService_Proxy.findResourcesByCriteria(ResourceGWTService_Proxy.java:36)"
- if (ste.getClassName().startsWith("org.rhq.enterprise.gui.coregui.client.gwt")) {
- return ste.getClassName().substring(ste.getClassName().lastIndexOf(".") + 1) + "."
- + ste.getMethodName();
- }
- }
- return "unknown";
- } else {
- return "production";
- }
- }
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/rpc/MonitoringRequestCallback.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/rpc/MonitoringRequestCallback.java
deleted file mode 100644
index 51e6b40..0000000
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/rpc/MonitoringRequestCallback.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2010 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.enterprise.gui.coregui.client.util.rpc;
-
-import com.allen_sauer.gwt.log.client.Log;
-import com.google.gwt.http.client.Request;
-import com.google.gwt.http.client.RequestCallback;
-import com.google.gwt.http.client.Response;
-import com.google.gwt.user.client.Cookies;
-import com.google.gwt.user.client.History;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.smartgwt.client.util.SC;
-
-import org.rhq.core.domain.auth.Subject;
-import org.rhq.enterprise.gui.coregui.client.CoreGUI;
-import org.rhq.enterprise.gui.coregui.client.Messages;
-import org.rhq.enterprise.gui.coregui.client.UserSessionManager;
-
-/**
- * @author Greg Hinkle
- * @author Joseph Marques
- */
-public class MonitoringRequestCallback implements RequestCallback {
-
- private static final Messages MSG = CoreGUI.getMessages();
-
- private int id;
- private String name;
- private long start = System.currentTimeMillis();
-
- private static final int STATUS_CODE_OK = 200;
-
- private RequestCallback callback;
-
- public MonitoringRequestCallback(int callId, String name, RequestCallback callback) {
- this.name = name;
- this.id = callId;
- this.callback = callback;
- }
-
- public void onError(Request request, Throwable exception) {
- Log.trace("MonitoringRequestCallback(" + this + "): onError " + exception.getMessage());
- RPCManager.getInstance().failCall(this);
- callback.onError(request, exception);
- }
-
- public void onResponseReceived(Request request, Response response) {
- Log.trace("MonitoringRequestCallback(" + this + "): " + response.getStatusCode() + "/"
- + response.getStatusText());
- if (STATUS_CODE_OK == response.getStatusCode()) {
- RPCManager.getInstance().succeedCall(this);
- callback.onResponseReceived(request, response);
- } else {
- RPCManager.getInstance().failCall(this);
- callback.onResponseReceived(request, response);
-
- // if we have a rich and coordinated client-side loggedIn state, do we need to check upon failure here?
- UserSessionManager.checkLoginStatus(Cookies.getCookie("username"), null, new AsyncCallback<Subject>() {
- @Override
- public void onSuccess(Subject result) {
- History.fireCurrentHistoryState();
- }
-
- @Override
- public void onFailure(Throwable caught) {
- SC.say(MSG.util_monitoringRequestCallback_error_checkServerStatusFailure());
- }
- });
- }
- }
-
- public int getId() {
- return id;
- }
-
- public String getName() {
- return name;
- }
-
- public long age() {
- return System.currentTimeMillis() - start;
- }
-
- public String toString() {
- return "MonitoringRequestCallback{id=" + id + ", name=" + name + ", age=" + age() + "}";
- }
-
-}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/rpc/RPCManager.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/rpc/RPCManager.java
deleted file mode 100644
index b4799c3..0000000
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/rpc/RPCManager.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2010 Red Hat, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.enterprise.gui.coregui.client.util.rpc;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import com.allen_sauer.gwt.log.client.Log;
-import com.smartgwt.client.widgets.Img;
-
-import org.rhq.enterprise.gui.coregui.client.CoreGUI;
-import org.rhq.enterprise.gui.coregui.client.Messages;
-
-/**
- * @author Greg Hinkle
- * @author Joseph Marques
- */
-public class RPCManager {
-
- private static final Messages MSG = CoreGUI.getMessages();
-
- private static final RPCManager INSTANCE = new RPCManager();
- private static int nextCallId = 0;
-
- private Set<MonitoringRequestCallback> inProgress = new HashSet<MonitoringRequestCallback>();
-
- private Img activityIndicator;
-
- private RPCManager() {
- activityIndicator = new Img("/coregui/images/ajax-loader.gif", 16, 16);
- activityIndicator.setZIndex(10000);
- activityIndicator.setLeft(10);
- activityIndicator.setTop(40);
- activityIndicator.draw();
- }
-
- public static int nextCallId() {
- return nextCallId++;
- }
-
- public static RPCManager getInstance() {
- return INSTANCE;
- }
-
- public void register(MonitoringRequestCallback callback) {
- Log.debug("RPC register: " + callback);
-
- inProgress.add(callback);
- refresh();
- }
-
- public void failCall(MonitoringRequestCallback callback) {
- Log.trace("RPC failure: " + callback);
-
- inProgress.remove(callback);
- refresh();
- }
-
- public void succeedCall(MonitoringRequestCallback callback) {
- Log.trace("RPC success: " + callback);
-
- inProgress.remove(callback);
- refresh();
- }
-
- public int getQueueDepth() {
- return inProgress.size();
- }
-
- public void refresh() {
- Log.trace("RPC queue depth is " + getQueueDepth());
- if (getQueueDepth() > 0) {
- activityIndicator.show();
-
- int numberOfActiveRequests = inProgress.size();
- String message = MSG.util_rpcManager_activeRequests(String.valueOf(numberOfActiveRequests));
- StringBuilder buf = new StringBuilder().append("<b>").append(message).append("</b>");
- for (MonitoringRequestCallback callback : inProgress) {
- buf.append("<br/>");
- buf.append(callback);
- }
-
- activityIndicator.setTooltip(buf.toString());
- } else {
- activityIndicator.hide();
- }
- }
-
-}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/rpc/RPCTracker.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/rpc/RPCTracker.java
new file mode 100644
index 0000000..e1eb7e2
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/rpc/RPCTracker.java
@@ -0,0 +1,100 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.gui.coregui.client.util.rpc;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import com.allen_sauer.gwt.log.client.Log;
+import com.smartgwt.client.widgets.Img;
+
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.Messages;
+
+/**
+ * @author Greg Hinkle
+ * @author Joseph Marques
+ */
+public class RPCTracker {
+
+ private static final Messages MSG = CoreGUI.getMessages();
+
+ private static final RPCTracker INSTANCE = new RPCTracker();
+
+ private Set<TrackingRequestCallback> inProgress = new HashSet<TrackingRequestCallback>();
+
+ private Img activityIndicator;
+
+ private RPCTracker() {
+ activityIndicator = new Img("/coregui/images/ajax-loader.gif", 16, 16);
+ activityIndicator.setZIndex(10000);
+ activityIndicator.setLeft(10);
+ activityIndicator.setTop(40);
+ activityIndicator.draw();
+ }
+
+ public static RPCTracker getInstance() {
+ return INSTANCE;
+ }
+
+ public void register(TrackingRequestCallback callback) {
+ Log.debug("RPCTracker register: " + callback);
+
+ inProgress.add(callback);
+ refresh();
+ }
+
+ public void failCall(TrackingRequestCallback callback) {
+ Log.trace("RPCTracker failure: " + callback);
+
+ inProgress.remove(callback);
+ refresh();
+ }
+
+ public void succeedCall(TrackingRequestCallback callback) {
+ Log.trace("RPCTracker success: " + callback);
+
+ inProgress.remove(callback);
+ refresh();
+ }
+
+ public int getQueueDepth() {
+ return inProgress.size();
+ }
+
+ public void refresh() {
+ Log.trace("RPCTracker queue depth is " + getQueueDepth());
+ if (getQueueDepth() > 0) {
+ activityIndicator.show();
+
+ int numberOfActiveRequests = inProgress.size();
+ String message = MSG.util_rpcManager_activeRequests(String.valueOf(numberOfActiveRequests));
+ StringBuilder buf = new StringBuilder().append("<b>").append(message).append("</b>");
+ for (TrackingRequestCallback callback : inProgress) {
+ buf.append("<br/>");
+ buf.append(callback);
+ }
+
+ activityIndicator.setTooltip(buf.toString());
+ } else {
+ activityIndicator.hide();
+ }
+ }
+
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/rpc/RemoteServiceStatistics.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/rpc/RemoteServiceStatistics.java
new file mode 100644
index 0000000..eaea847
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/rpc/RemoteServiceStatistics.java
@@ -0,0 +1,162 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.gui.coregui.client.util.rpc;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author Joseph Marques
+ */
+public class RemoteServiceStatistics {
+
+ public static class Stat {
+ private String serviceName;
+ private String methodName;
+ private int count;
+ private long total;
+ private long latest;
+ private long slowest;
+ private long fastest;
+
+ protected Stat(String remoteService, long millis) {
+ // remoteService format "{ServiceName}_Proxy.{MethodName}"
+ this.serviceName = remoteService.substring(0, remoteService.indexOf("_Proxy"));
+ this.methodName = remoteService.substring(remoteService.indexOf('.') + 1);
+ count = 1;
+ total = latest = slowest = fastest = millis;
+ }
+
+ private void record(long millis) {
+ count++;
+ total += millis;
+ latest = millis;
+ if (millis > slowest) {
+ slowest = millis;
+ } else if (millis < fastest) {
+ fastest = millis;
+ }
+ }
+
+ public String getServiceName() {
+ return serviceName;
+ }
+
+ public String getMethodName() {
+ return methodName;
+ }
+
+ public int getCount() {
+ return count;
+ }
+
+ public long getTotal() {
+ return total;
+ }
+
+ public long getLatest() {
+ return latest;
+ }
+
+ public long getSlowest() {
+ return slowest;
+ }
+
+ public long getFastest() {
+ return fastest;
+ }
+
+ public String toString() {
+ StringBuilder builder = new StringBuilder();
+ builder.append("serviceName=").append(serviceName).append(',');
+ builder.append("methodeName=").append(methodName).append(": ");
+ if (count < 1) {
+ builder.append("empty");
+ } else {
+ builder.append("count=").append(count).append(',');
+ builder.append("total=").append(total).append(',');
+ builder.append("avg=").append(total / count).append(',');
+ builder.append("latest=").append(latest).append(',');
+ builder.append("slowest=").append(slowest).append(',');
+ builder.append("fastest=").append(fastest);
+ }
+ return builder.toString();
+ }
+
+ }
+
+ private static Map<String, Stat> statistics = new HashMap<String, Stat>();
+
+ private RemoteServiceStatistics() {
+ // static access only
+ }
+
+ public static void record(String remoteService, long millis) {
+ Stat stat = statistics.get(remoteService);
+ if (stat == null) {
+ stat = new Stat(remoteService, millis);
+ statistics.put(remoteService, stat);
+ } else {
+ stat.record(millis);
+ }
+ }
+
+ public static String recordAndPrint(String remoteService, long millis) {
+ record(remoteService, millis);
+ return print(remoteService);
+ }
+
+ public static String print(String remoteService) {
+ Stat stat = statistics.get(remoteService);
+ if (stat == null) {
+ stat = new Stat(remoteService, 0);
+ }
+ return "RemoteServiceStatistics: " + remoteService + ": " + stat.toString();
+ }
+
+ public static List<String> printAll() {
+ List<String> stats = new ArrayList<String>();
+
+ for (String remoteService : statistics.keySet()) {
+ stats.add(print(remoteService));
+ }
+
+ return stats;
+ }
+
+ public static Stat get(String remoteService) {
+ Stat stat = statistics.get(remoteService);
+ if (stat == null) {
+ stat = new Stat(remoteService, 0);
+ }
+ return stat;
+ }
+
+ public static List<Stat> getAll() {
+ List<Stat> stats = new ArrayList<Stat>();
+
+ for (String remoteService : statistics.keySet()) {
+ stats.add(statistics.get(remoteService));
+ }
+
+ return stats;
+ }
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/rpc/TrackingRemoteServiceProxy.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/rpc/TrackingRemoteServiceProxy.java
new file mode 100644
index 0000000..1c2bbe0
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/rpc/TrackingRemoteServiceProxy.java
@@ -0,0 +1,110 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.gui.coregui.client.util.rpc;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import com.allen_sauer.gwt.log.client.Log;
+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.user.client.rpc.AsyncCallback;
+import com.google.gwt.user.client.rpc.impl.RemoteServiceProxy;
+import com.google.gwt.user.client.rpc.impl.Serializer;
+import com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.ResponseReader;
+
+import org.rhq.enterprise.gui.coregui.client.UserSessionManager;
+
+/**
+ * A custom {@link RemoteServiceProxy} that injects additional management and monitoring functionality into the
+ * RPC lifecycle. Below are the list of extensions:
+ *
+ * <ul>
+ * <li>Conditionally sends requests based off of the client-side loggedIn state. Once the user's client-side session
+ * has expired, communication back to the server is halted by silently dropping requests. Obviously, for this to
+ * work, the methods that are used prior to being authenticated can not be wrapped with this proxy.</li>
+ * <li>Wrap the existing {@link RequestCallback} in a {@link TrackingRequestCallback}, which will provide 1) a
+ * fall-back mechanism for exceptions/errors that occur while the user is logged out, and 2) a notification
+ * mechanism to send the {@link RPCTracker} events which will tell the activityIndicator when to spin.</li>
+ * <li>Put the user's sessionId into the header of the request.</li>
+ *
+ * @author Joseph Marques
+ */
+public class TrackingRemoteServiceProxy extends RemoteServiceProxy {
+
+ private static final Set<String> bypassMethods = new HashSet<String>();
+ static {
+ bypassMethods.add("SubjectGWTService_Proxy.findSubjectsByCriteria");
+ }
+
+ public TrackingRemoteServiceProxy(String moduleBaseURL, String remoteServiceRelativePath,
+ String serializationPolicyName, Serializer serializer) {
+ super(moduleBaseURL, remoteServiceRelativePath, serializationPolicyName, serializer);
+ }
+
+ /*
+ * This method is currently not called by the RPC framework. When it is, we can remove the sessionId
+ * logic from the GWTServiceLookup class.
+ *
+ * For background information, please see http://code.google.com/p/google-web-toolkit/issues/detail?id=5668
+ */
+ @Override
+ protected <T> RequestBuilder doPrepareRequestBuilder(ResponseReader responseReader, String methodName,
+ int invocationCount, String requestData, AsyncCallback<T> callback) {
+
+ RequestBuilder rb = super.doPrepareRequestBuilder(responseReader, methodName, invocationCount, requestData,
+ callback);
+
+ String sessionId = UserSessionManager.getSessionId();
+ if (sessionId != null) {
+ Log.debug("SessionRpcRequestBuilder is adding sessionId to request for (" + methodName + ")");
+ rb.setHeader(UserSessionManager.SESSION_NAME, sessionId);
+ } else {
+ Log.error("SessionRpcRequestBuilder missing sessionId for request (" + methodName + ")");
+ }
+
+ return rb;
+ }
+
+ // TODO: add handled to capture timeout failure and retry (at least once) to add resilience to GWT service calls?
+ @Override
+ protected <T> RequestCallback doCreateRequestCallback(ResponseReader responseReader, String methodName,
+ int invocationCount, AsyncCallback<T> callback) {
+
+ RequestCallback original = super.doCreateRequestCallback(responseReader, methodName, invocationCount, callback);
+ TrackingRequestCallback monitoringCallback = new TrackingRequestCallback(invocationCount, methodName, original);
+
+ RPCTracker.getInstance().register(monitoringCallback);
+
+ return monitoringCallback;
+ }
+
+ @Override
+ protected <T> Request doInvoke(ResponseReader responseReader, String methodName, int invocationCount,
+ String requestData, AsyncCallback<T> callback) {
+
+ Log.debug("RPC method invocation: " + methodName);
+ if (bypassMethods.contains(methodName) || !UserSessionManager.isLoggedOut()) {
+ return super.doInvoke(responseReader, methodName, invocationCount, requestData, callback);
+ }
+
+ return null;
+ }
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/rpc/TrackingRequestCallback.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/rpc/TrackingRequestCallback.java
new file mode 100644
index 0000000..38effc4
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/rpc/TrackingRequestCallback.java
@@ -0,0 +1,89 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.gui.coregui.client.util.rpc;
+
+import com.allen_sauer.gwt.log.client.Log;
+import com.google.gwt.http.client.Request;
+import com.google.gwt.http.client.RequestCallback;
+import com.google.gwt.http.client.Response;
+
+import org.rhq.enterprise.gui.coregui.client.UserSessionManager;
+
+/**
+ * @author Greg Hinkle
+ * @author Joseph Marques
+ */
+public class TrackingRequestCallback implements RequestCallback {
+
+ private int id;
+ private String name;
+ private long start = System.currentTimeMillis();
+
+ private static final int STATUS_CODE_OK = 200;
+
+ private RequestCallback callback;
+
+ public TrackingRequestCallback(int callId, String name, RequestCallback callback) {
+ this.name = name;
+ this.id = callId;
+ this.callback = callback;
+ }
+
+ public void onError(Request request, Throwable exception) {
+ Log.trace(toString() + ": onError " + exception.getMessage());
+
+ RemoteServiceStatistics.record(getName(), getAge());
+ RPCTracker.getInstance().failCall(this);
+ if (UserSessionManager.isLoggedIn()) { // only handle failures if user still logged in
+ callback.onError(request, exception);
+ }
+ }
+
+ public void onResponseReceived(Request request, Response response) {
+ Log.trace(toString() + ": " + response.getStatusCode() + "/" + response.getStatusText());
+
+ RemoteServiceStatistics.record(getName(), getAge());
+ if (STATUS_CODE_OK == response.getStatusCode()) {
+ RPCTracker.getInstance().succeedCall(this);
+ callback.onResponseReceived(request, response);
+ } else {
+ RPCTracker.getInstance().failCall(this);
+ if (UserSessionManager.isLoggedIn()) { // only handle failures if user still logged in
+ callback.onResponseReceived(request, response);
+ }
+ }
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public long getAge() {
+ return System.currentTimeMillis() - start;
+ }
+
+ public String toString() {
+ return "TracknigRequestCallback[id=" + id + ", name=" + name + ", age=" + getAge() + "]";
+ }
+
+}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AbstractGWTServiceImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AbstractGWTServiceImpl.java
index 364140f..569cef0 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AbstractGWTServiceImpl.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AbstractGWTServiceImpl.java
@@ -53,6 +53,8 @@ public abstract class AbstractGWTServiceImpl extends RemoteServiceServlet {
if (Log.isTraceEnabled()) {
printHeaders(req);
}
+
+ boolean continueProcessing = true;
String sid = req.getHeader(UserSessionManager.SESSION_NAME);
if (sid != null) {
SubjectManagerLocal subjectManager = LookupUtil.getSubjectManager();
@@ -60,18 +62,22 @@ public abstract class AbstractGWTServiceImpl extends RemoteServiceServlet {
Subject subject = subjectManager.getSubjectBySessionId(Integer.parseInt(sid));
sessionSubject.set(subject);
} catch (Exception e) {
- Log.error("Failed to validate request: sessionId was '" + sid + "', requestURL=" + req.getRequestURL());
+ Log.debug("Failed to validate request: sessionId was '" + sid + "', requestURL=" + req.getRequestURL());
+ continueProcessing = false;
}
} else {
- Log.error("Failed to validate request: sessionId missing, requestURL=" + req.getRequestURL());
+ Log.debug("Failed to validate request: sessionId missing, requestURL=" + req.getRequestURL());
+ continueProcessing = false;
}
- // TODO: only execute this if the session lookup was successful, otherwise fail in some deterministic fashion
- // alter callback handlers to capture expected failure and retry (at least once)
- // to add resilience to gwt service calls
- long id = HibernatePerformanceMonitor.get().start();
- super.service(req, resp);
- HibernatePerformanceMonitor.get().stop(id, "GWT Service Request");
+ if (continueProcessing) {
+ // TODO: only execute this if the session lookup was successful, otherwise fail in some deterministic fashion
+ // alter callback handlers to capture expected failure and retry (at least once)
+ // to add resilience to gwt service calls
+ long id = HibernatePerformanceMonitor.get().start();
+ super.service(req, resp);
+ HibernatePerformanceMonitor.get().stop(id, "GWT Service Request");
+ }
}
@SuppressWarnings("unchecked")
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/user/rebind/rpc/TrackingServiceInterfaceProxyGenerator.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/user/rebind/rpc/TrackingServiceInterfaceProxyGenerator.java
new file mode 100644
index 0000000..9b1dda1
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/user/rebind/rpc/TrackingServiceInterfaceProxyGenerator.java
@@ -0,0 +1,39 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.enterprise.gui.coregui.user.rebind.rpc;
+
+import com.google.gwt.core.ext.typeinfo.JClassType;
+import com.google.gwt.user.rebind.rpc.ProxyCreator;
+import com.google.gwt.user.rebind.rpc.ServiceInterfaceProxyGenerator;
+import com.google.gwt.user.rebind.rpc.TrackingProxyCreator;
+
+/**
+ * A generator used to create remote service proxy wrappers that will inject additional management and monitoring
+ * hooks into the RPC lifecycle.
+ *
+ * @author Joseph Marques
+ */
+public class TrackingServiceInterfaceProxyGenerator extends ServiceInterfaceProxyGenerator {
+
+ @Override
+ protected ProxyCreator createProxyCreator(JClassType remoteService) {
+ return new TrackingProxyCreator(remoteService);
+ }
+
+}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
index 3ef0391..c9d5224 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
@@ -57,6 +57,12 @@
<when-type-is class="org.rhq.enterprise.gui.coregui.client.components.upload.DynamicCallbackFormImpl"/>
<when-property-is name="user.agent" value="ie6"/>
</replace-with>
+
+
+ <generate-with class="org.rhq.enterprise.gui.coregui.user.rebind.rpc.TrackingServiceInterfaceProxyGenerator">
+ <when-type-assignable class="com.google.gwt.user.client.rpc.RemoteService"/>
+ </generate-with>
+
<!--
Limit compilation to your preferred browser(s) to speed up compile time.
commit 80285c831c0c923b339d5670f0930e95d63c0bf0
Author: Joseph Marques <joseph(a)redhat.com>
Date: Sat Nov 27 03:04:47 2010 -0500
remove userStillLoggedIn method from datasource
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertDataSource.java
index 0427c31..b7fdeb5 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertDataSource.java
@@ -177,31 +177,23 @@ public class AlertDataSource extends RPCDataSource<Alert> {
AlertCriteria criteria = getCriteria(request);
- //check for still logged in before submitting server side request
- if (userStillLoggedIn()) {
- this.alertService.findAlertsByCriteria(criteria, new AsyncCallback<PageList<Alert>>() {
-
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(MSG.view_alerts_loadFailed(), caught);
- response.setStatus(RPCResponse.STATUS_FAILURE);
- processResponse(request.getRequestId(), response);
- }
+ this.alertService.findAlertsByCriteria(criteria, new AsyncCallback<PageList<Alert>>() {
- public void onSuccess(PageList<Alert> result) {
- long fetchTime = System.currentTimeMillis() - start;
- Log.info(result.size() + " alerts fetched in: " + fetchTime + "ms");
- response.setData(buildRecords(result));
- // For paging to work, we have to specify size of full result set.
- response.setTotalRows(result.getTotalSize());
- processResponse(request.getRequestId(), response);
- }
- });
- } else {//dump request
- response.setTotalRows(0);
- processResponse(request.getRequestId(), response);
- Log.debug("user not logged in. Not fetching any alerts now.");
- }
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(MSG.view_alerts_loadFailed(), caught);
+ response.setStatus(RPCResponse.STATUS_FAILURE);
+ processResponse(request.getRequestId(), response);
+ }
+ public void onSuccess(PageList<Alert> result) {
+ long fetchTime = System.currentTimeMillis() - start;
+ Log.info(result.size() + " alerts fetched in: " + fetchTime + "ms");
+ response.setData(buildRecords(result));
+ // For paging to work, we have to specify size of full result set.
+ response.setTotalRows(result.getTotalSize());
+ processResponse(request.getRequestId(), response);
+ }
+ });
}
protected AlertCriteria getCriteria(DSRequest request) {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertPortletDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertPortletDataSource.java
index 64306ca..721b559 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertPortletDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertPortletDataSource.java
@@ -87,30 +87,22 @@ public class AlertPortletDataSource extends AlertDataSource {
criteria.addFilterPriorities(AlertPriority.getByLegacyIndex(getAlertPriorityIndex()));
}
- //check for still logged in before submitting server side request
- if (userStillLoggedIn()) {
- getAlertService().findAlertsByCriteria(criteria, new AsyncCallback<PageList<Alert>>() {
-
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(MSG.view_alerts_loadFailed(), caught);
- response.setStatus(RPCResponse.STATUS_FAILURE);
- processResponse(request.getRequestId(), response);
- }
+ getAlertService().findAlertsByCriteria(criteria, new AsyncCallback<PageList<Alert>>() {
- public void onSuccess(PageList<Alert> result) {
- long fetchTime = System.currentTimeMillis() - start;
- Log.info(result.size() + " alerts fetched in: " + fetchTime + "ms");
- response.setData(buildRecords(result));
- response.setTotalRows(result.size());
- processResponse(request.getRequestId(), response);
- }
- });
- } else {//dump request
- response.setTotalRows(0);
- processResponse(request.getRequestId(), response);
- //TODO: spinder 10/13/10: not sure if we should log anything here. Could be noisy in log with not a lot of gain.
- Log.debug("user not logged in. Not fetching any alerts now.");
- }
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(MSG.view_alerts_loadFailed(), caught);
+ response.setStatus(RPCResponse.STATUS_FAILURE);
+ processResponse(request.getRequestId(), response);
+ }
+
+ public void onSuccess(PageList<Alert> result) {
+ long fetchTime = System.currentTimeMillis() - start;
+ Log.info(result.size() + " alerts fetched in: " + fetchTime + "ms");
+ response.setData(buildRecords(result));
+ response.setTotalRows(result.size());
+ processResponse(request.getRequestId(), response);
+ }
+ });
}
public int getAlertRangeCompleted() {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/operation/RecentOperationsDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/operation/RecentOperationsDataSource.java
index 8705262..1bab7a8 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/operation/RecentOperationsDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/operation/RecentOperationsDataSource.java
@@ -129,36 +129,29 @@ public class RecentOperationsDataSource extends
}
}
- if (userStillLoggedIn()) {//check session validity
- GWTServiceLookup.getOperationService().findRecentCompletedOperations(pageSize,
- new AsyncCallback<List<DisambiguationReport<ResourceOperationLastCompletedComposite>>>() {
+ GWTServiceLookup.getOperationService().findRecentCompletedOperations(pageSize,
+ new AsyncCallback<List<DisambiguationReport<ResourceOperationLastCompletedComposite>>>() {
- public void onFailure(Throwable throwable) {
- CoreGUI.getErrorHandler().handleError(MSG.dataSource_recentOperations_error_fetchFailure(),
- throwable);
- }
+ public void onFailure(Throwable throwable) {
+ CoreGUI.getErrorHandler().handleError(MSG.dataSource_recentOperations_error_fetchFailure(),
+ throwable);
+ }
- public void onSuccess(
- List<DisambiguationReport<ResourceOperationLastCompletedComposite>> recentOperationsList) {
-
- //translate DisambiguationReport into dataset entries
- response.setData(buildList(recentOperationsList));
- //entry count
- if (null != recentOperationsList) {
- response.setTotalRows(recentOperationsList.size());
- } else {
- response.setTotalRows(0);
- }
- //pass off for processing
- processResponse(request.getRequestId(), response);
+ public void onSuccess(
+ List<DisambiguationReport<ResourceOperationLastCompletedComposite>> recentOperationsList) {
+
+ //translate DisambiguationReport into dataset entries
+ response.setData(buildList(recentOperationsList));
+ //entry count
+ if (null != recentOperationsList) {
+ response.setTotalRows(recentOperationsList.size());
+ } else {
+ response.setTotalRows(0);
}
- });
- } else {
- Log.debug("user not logged in. Not fetching recently completed operations.");
- //answer datasource
- response.setTotalRows(0);
- processResponse(request.getRequestId(), response);
- }
+ //pass off for processing
+ processResponse(request.getRequestId(), response);
+ }
+ });
}
/** Translates the DisambiguationReport of ResourceOperationLastCompletedComposites into specific
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/operation/ScheduledOperationsDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/operation/ScheduledOperationsDataSource.java
index c88b58e..4bd84b0 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/operation/ScheduledOperationsDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/operation/ScheduledOperationsDataSource.java
@@ -123,35 +123,28 @@ public class ScheduledOperationsDataSource extends
}
}
- if (userStillLoggedIn()) {
- GWTServiceLookup.getOperationService().findScheduledOperations(pageSize,
- new AsyncCallback<List<DisambiguationReport<ResourceOperationScheduleComposite>>>() {
+ GWTServiceLookup.getOperationService().findScheduledOperations(pageSize,
+ new AsyncCallback<List<DisambiguationReport<ResourceOperationScheduleComposite>>>() {
- public void onFailure(Throwable throwable) {
- CoreGUI.getErrorHandler().handleError(MSG.dataSource_scheduledOperations_error_fetchFailure(),
- throwable);
- }
+ public void onFailure(Throwable throwable) {
+ CoreGUI.getErrorHandler().handleError(MSG.dataSource_scheduledOperations_error_fetchFailure(),
+ throwable);
+ }
- public void onSuccess(
- List<DisambiguationReport<ResourceOperationScheduleComposite>> scheduledOpsList) {
-
- //translate DisambiguationReport into dataset entries
- response.setData(buildList(scheduledOpsList));
- //entry count
- if (null != scheduledOpsList) {
- response.setTotalRows(scheduledOpsList.size());
- } else {
- response.setTotalRows(0);
- }
- //pass off for processing
- processResponse(request.getRequestId(), response);
+ public void onSuccess(List<DisambiguationReport<ResourceOperationScheduleComposite>> scheduledOpsList) {
+
+ //translate DisambiguationReport into dataset entries
+ response.setData(buildList(scheduledOpsList));
+ //entry count
+ if (null != scheduledOpsList) {
+ response.setTotalRows(scheduledOpsList.size());
+ } else {
+ response.setTotalRows(0);
}
- });
- } else {
- Log.debug("user not logged in. Not fetching scheduled operations.");
- response.setTotalRows(0);
- processResponse(request.getRequestId(), response);
- }
+ //pass off for processing
+ processResponse(request.getRequestId(), response);
+ }
+ });
}
/** Translates the DisambiguationReport of ProblemResourceComposites into specific
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/resource/ProblemResourcesDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/resource/ProblemResourcesDataSource.java
index 7e65e88..4763217 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/resource/ProblemResourcesDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/resource/ProblemResourcesDataSource.java
@@ -119,34 +119,28 @@ public class ProblemResourcesDataSource extends RPCDataSource<DisambiguationRepo
}
}
- if (userStillLoggedIn()) {
- GWTServiceLookup.getResourceService().findProblemResources(ctime, maxItems,
- new AsyncCallback<List<DisambiguationReport<ProblemResourceComposite>>>() {
+ GWTServiceLookup.getResourceService().findProblemResources(ctime, maxItems,
+ new AsyncCallback<List<DisambiguationReport<ProblemResourceComposite>>>() {
- public void onFailure(Throwable throwable) {
- CoreGUI.getErrorHandler().handleError(MSG.dataSource_problemResources_error_fetchFailure(),
- throwable);
- }
+ public void onFailure(Throwable throwable) {
+ CoreGUI.getErrorHandler().handleError(MSG.dataSource_problemResources_error_fetchFailure(),
+ throwable);
+ }
+
+ public void onSuccess(List<DisambiguationReport<ProblemResourceComposite>> problemResourcesList) {
- public void onSuccess(List<DisambiguationReport<ProblemResourceComposite>> problemResourcesList) {
-
- //translate DisambiguationReport into dataset entries
- response.setData(buildList(problemResourcesList));
- //entry count
- if (null != problemResourcesList) {
- response.setTotalRows(problemResourcesList.size());
- } else {
- response.setTotalRows(0);
- }
- //pass off for processing
- processResponse(request.getRequestId(), response);
+ //translate DisambiguationReport into dataset entries
+ response.setData(buildList(problemResourcesList));
+ //entry count
+ if (null != problemResourcesList) {
+ response.setTotalRows(problemResourcesList.size());
+ } else {
+ response.setTotalRows(0);
}
- });
- } else {
- Log.debug("user not logged in. Not fetching resources with alerts/unavailability.");
- response.setTotalRows(0);
- processResponse(request.getRequestId(), response);
- }
+ //pass off for processing
+ processResponse(request.getRequestId(), response);
+ }
+ });
}
/** Translates the DisambiguationReport of ProblemResourceComposites into specific
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/RPCDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/RPCDataSource.java
index 7b5000d..93d53b3 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/RPCDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/RPCDataSource.java
@@ -50,7 +50,6 @@ import org.rhq.core.domain.util.PageList;
import org.rhq.core.domain.util.PageOrdering;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.Messages;
-import org.rhq.enterprise.gui.coregui.client.UserSessionManager;
import org.rhq.enterprise.gui.coregui.client.util.effects.ColoringUtility;
import org.rhq.enterprise.gui.coregui.client.util.message.Message;
import org.rhq.enterprise.gui.coregui.client.util.selenium.SeleniumUtility;
@@ -507,17 +506,9 @@ public abstract class RPCDataSource<T> extends DataSource {
textField.setRequired(required);
LinkedHashMap<String, String> valueMap = new LinkedHashMap<String, String>();
valueMap.put(Boolean.TRUE.toString(), MSG.common_val_yes_lower());
- valueMap.put(Boolean.FALSE.toString(), MSG.common_val_no_lower());
+ valueMap.put(Boolean.FALSE.toString(), MSG.common_val_no_lower());
textField.setValueMap(valueMap);
return textField;
}
- /** Quick method to determine if current user is still logged in.
- *
- * @return boolean indication of logged in status.
- */
- protected boolean userStillLoggedIn() {
- return UserSessionManager.isLoggedIn();
- }
-
}
commit de4814470ee0eb7be9814a08bcc36501dfdbc37d
Author: Joseph Marques <joseph(a)redhat.com>
Date: Sat Nov 27 03:01:54 2010 -0500
remove UserPermissionsManager, this isn't data we should be caching
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/UserPermissionsManager.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/UserPermissionsManager.java
deleted file mode 100644
index 9554c5f..0000000
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/UserPermissionsManager.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package org.rhq.enterprise.gui.coregui.client;
-
-import java.util.EnumSet;
-import java.util.HashSet;
-import java.util.Set;
-
-import com.allen_sauer.gwt.log.client.Log;
-import com.google.gwt.user.client.Timer;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-
-import org.rhq.core.domain.authz.Permission;
-import org.rhq.enterprise.gui.coregui.client.gwt.AuthorizationGWTServiceAsync;
-import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
-import org.rhq.enterprise.gui.coregui.client.util.message.Message;
-import org.rhq.enterprise.gui.coregui.client.util.message.MessageCenter;
-
-/**
- * A singleton that is in charge of fetching and caching the current user's global permissions and their permissions for
- * the currently selected Resource or group. The permissions are reloaded from the Server once per minute to ensure the
- * permissions used by the GUI for button enablement etc. do not get too stale.
- *
- * @author Ian Springer
- */
-public class UserPermissionsManager {
- private static final Messages MSG = CoreGUI.getMessages();
-
- private static final UserPermissionsManager INSTANCE = new UserPermissionsManager();
- private static final AuthorizationGWTServiceAsync AUTHORIZATION_SERVICE = GWTServiceLookup
- .getAuthorizationService();
- private static final MessageCenter MESSAGE_CENTER = CoreGUI.getMessageCenter();
- private static final int REFRESH_INTERVAL = 60 * 1000; // 1 minute
-
- /** This is a reference to the last set of global perms returned to a caller. */
- private Set<Permission> globalPermissions = new HashSet<Permission>(Permission.GLOBAL_ALL.size());
- private boolean globalCacheDirty = true;
- private PermissionsLoadedListener globalPermissionsLoadedListener;
-
- public static UserPermissionsManager getInstance() {
- return INSTANCE;
- }
-
- public void loadGlobalPermissions(PermissionsLoadedListener permissionsLoadedListener) {
- if (this.globalCacheDirty) {
- // Permissions are not cached. Kick off an async load and let it notify the caller when the load completes.
- this.globalPermissionsLoadedListener = permissionsLoadedListener;
- loadGlobalPermissions();
- } else {
- // Permissions are cached - shoot em back to the caller.
- permissionsLoadedListener.onPermissionsLoaded(this.globalPermissions);
- }
- }
-
- public Set<Permission> getGlobalPermissions() {
- return this.globalPermissions;
- }
-
- /**
- * Clear all cached permissions.
- */
- public void clearCache() {
- // Clear global cache.
- this.globalCacheDirty = true;
- this.globalPermissions.clear();
- }
-
- private UserPermissionsManager() {
- Timer timer = new Timer() {
- public void run() {
- Log.debug("Refreshing cached user permissions...");
- loadGlobalPermissions();
- }
- };
-
- // Cache is automatically refreshed once per minute.
- timer.scheduleRepeating(REFRESH_INTERVAL);
- }
-
- private void loadGlobalPermissions() {
- AUTHORIZATION_SERVICE.getExplicitGlobalPermissions(new AsyncCallback<Set<Permission>>() {
- public void onFailure(Throwable throwable) {
- MESSAGE_CENTER.notify(new Message(MSG.util_userPerm_loadFailGlobal(), throwable,
- Message.Severity.Error, EnumSet.of(Message.Option.BackgroundJobResult)));
- UserPermissionsManager.this.globalPermissions.clear();
- UserPermissionsManager.this.globalCacheDirty = true;
- notifyGlobalPermissionsLoadedListener();
- }
-
- public void onSuccess(Set<Permission> permissions) {
- // Always update the existing Set, so callers won't end up with stale references.
- setTo(UserPermissionsManager.this.globalPermissions, permissions);
- UserPermissionsManager.this.globalCacheDirty = false;
- notifyGlobalPermissionsLoadedListener();
- }
- });
- }
-
- private void notifyGlobalPermissionsLoadedListener() {
- if (this.globalPermissionsLoadedListener != null) {
- this.globalPermissionsLoadedListener.onPermissionsLoaded(this.globalPermissions);
- this.globalPermissionsLoadedListener = null;
- }
- }
-
- private static void setTo(Set<Permission> permissions1, Set<Permission> permissions2) {
- permissions1.clear();
- permissions1.addAll(permissions2);
- }
-}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/UserSessionManager.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/UserSessionManager.java
index 179ecbe..661f5b0 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/UserSessionManager.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/UserSessionManager.java
@@ -22,8 +22,6 @@
*/
package org.rhq.enterprise.gui.coregui.client;
-import java.util.Set;
-
import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.http.client.Request;
import com.google.gwt.http.client.RequestBuilder;
@@ -35,7 +33,6 @@ import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.rpc.AsyncCallback;
import org.rhq.core.domain.auth.Subject;
-import org.rhq.core.domain.authz.Permission;
import org.rhq.core.domain.criteria.SubjectCriteria;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
@@ -63,7 +60,6 @@ public class UserSessionManager {
private static int LOGOUT_DELAY = 5 * 1000; // wait 5 seconds for in-flight requests to complete before logout
public static final String SESSION_NAME = "RHQ_Session";
- private static final UserPermissionsManager USER_PERMISSIONS_MANAGER = UserPermissionsManager.getInstance();
private static final String LOCATOR_ID = "SessionManagerLogin";
@@ -320,14 +316,8 @@ public class UserSessionManager {
//update savedSessionId for browser refresh
saveSessionId(String.valueOf(sessionSubject.getSessionId()));
}
-
- // Kick off async load of the user's global permissions.
- USER_PERMISSIONS_MANAGER.loadGlobalPermissions(new PermissionsLoadedListener() {
- public void onPermissionsLoaded(Set<Permission> permissions) {
- // Once the permissions have been loaded, build the GUI.
- CoreGUI.get().buildCoreUI();
- }
- });
+
+ CoreGUI.get().buildCoreUI();
}
public void onFailure(Throwable caught) {
@@ -374,8 +364,6 @@ public class UserSessionManager {
Log.info("Destroying session timer...");
sessionTimer.cancel();
- USER_PERMISSIONS_MANAGER.clearCache();
-
// log out the web session on the server-side in a delayed fashion,
// allowing enough time to pass to let in-flight requests complete
logoutTimer.schedule(LOGOUT_DELAY);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RoleEditView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RoleEditView.java
index df0035b..800c7a0 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RoleEditView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RoleEditView.java
@@ -20,6 +20,7 @@ package org.rhq.enterprise.gui.coregui.client.admin.roles;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.EnumSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -40,8 +41,6 @@ import org.rhq.core.domain.authz.Role;
import org.rhq.core.domain.resource.group.LdapGroup;
import org.rhq.enterprise.gui.coregui.client.BookmarkableView;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
-import org.rhq.enterprise.gui.coregui.client.PermissionsLoadedListener;
-import org.rhq.enterprise.gui.coregui.client.UserPermissionsManager;
import org.rhq.enterprise.gui.coregui.client.UserSessionManager;
import org.rhq.enterprise.gui.coregui.client.ViewPath;
import org.rhq.enterprise.gui.coregui.client.components.form.AbstractRecordEditor;
@@ -50,6 +49,7 @@ import org.rhq.enterprise.gui.coregui.client.components.selector.AssignedItemsCh
import org.rhq.enterprise.gui.coregui.client.components.selector.AssignedItemsChangedHandler;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.selection.ResourceGroupSelector;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message;
/**
* A form for viewing and/or editing an RHQ {@link Role role}.
@@ -81,11 +81,19 @@ public class RoleEditView extends AbstractRecordEditor<RolesDataSource> implemen
@Override
public void renderView(ViewPath viewPath) {
super.renderView(viewPath);
- UserPermissionsManager.getInstance().loadGlobalPermissions(new PermissionsLoadedListener() {
- public void onPermissionsLoaded(Set<Permission> globalPermissions) {
- RoleEditView.this.hasManageSecurityPermission = globalPermissions.contains(Permission.MANAGE_SECURITY);
+ GWTServiceLookup.getAuthorizationService().getExplicitGlobalPermissions(new AsyncCallback<Set<Permission>>() {
+ @Override
+ public void onSuccess(Set<Permission> result) {
+ RoleEditView.this.hasManageSecurityPermission = result.contains(Permission.MANAGE_SECURITY);
checkIfLdapConfigured();
}
+
+ @Override
+ public void onFailure(Throwable caught) {
+ CoreGUI.getMessageCenter().notify(
+ new Message(MSG.util_userPerm_loadFailGlobal(), caught, Message.Severity.Error, EnumSet
+ .of(Message.Option.BackgroundJobResult)));
+ }
});
}
@@ -128,16 +136,15 @@ public class RoleEditView extends AbstractRecordEditor<RolesDataSource> implemen
}
private void init() {
- final boolean isReadOnly = (!this.hasManageSecurityPermission ||
- (getRecordId() == RolesDataSource.ID_SUPERUSER) ||
- (getRecordId() == RolesDataSource.ID_ALL_RESOURCES));
+ final boolean isReadOnly = (!this.hasManageSecurityPermission
+ || (getRecordId() == RolesDataSource.ID_SUPERUSER) || (getRecordId() == RolesDataSource.ID_ALL_RESOURCES));
init(isReadOnly);
}
@Override
protected Record createNewRecord() {
Role role = new Role();
- @SuppressWarnings({"UnnecessaryLocalVariable"})
+ @SuppressWarnings( { "UnnecessaryLocalVariable" })
Record roleRecord = RolesDataSource.getInstance().copyValues(role);
return roleRecord;
}
@@ -197,7 +204,7 @@ public class RoleEditView extends AbstractRecordEditor<RolesDataSource> implemen
label.setHeight(20);
label.setPadding(5);
this.ldapGroupsItem.setCanvas(label);
- }
+ }
}
this.permissionsItem.redraw();
@@ -266,7 +273,7 @@ public class RoleEditView extends AbstractRecordEditor<RolesDataSource> implemen
@Override
protected void reset() {
- super.reset();
+ super.reset();
this.permissionsItem.reset();
this.groupSelector.reset();
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RolesDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RolesDataSource.java
index 8806a49..95090ba 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RolesDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RolesDataSource.java
@@ -40,8 +40,6 @@ import org.rhq.core.domain.authz.Role;
import org.rhq.core.domain.criteria.RoleCriteria;
import org.rhq.core.domain.resource.group.ResourceGroup;
import org.rhq.core.domain.util.PageList;
-import org.rhq.enterprise.gui.coregui.client.PermissionsLoadedListener;
-import org.rhq.enterprise.gui.coregui.client.UserPermissionsManager;
import org.rhq.enterprise.gui.coregui.client.admin.users.UsersDataSource;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.gwt.RoleGWTServiceAsync;
@@ -77,7 +75,6 @@ public class RolesDataSource extends RPCDataSource<Role> {
private static RolesDataSource INSTANCE;
private RoleGWTServiceAsync roleService = GWTServiceLookup.getRoleService();
- private Set<Permission> globalPermissions;
public static RolesDataSource getInstance() {
if (INSTANCE == null) {
@@ -90,12 +87,6 @@ public class RolesDataSource extends RPCDataSource<Role> {
super();
List<DataSourceField> fields = addDataSourceFields();
addFields(fields);
-
- UserPermissionsManager.getInstance().loadGlobalPermissions(new PermissionsLoadedListener() {
- public void onPermissionsLoaded(Set<Permission> permissions) {
- RolesDataSource.this.globalPermissions = permissions;
- }
- });
}
@Override
@@ -114,7 +105,8 @@ public class RolesDataSource extends RPCDataSource<Role> {
100, false);
fields.add(descriptionField);
- DataSourceField resourceGroupsField = new DataSourceField(Field.RESOURCE_GROUPS, FieldType.ANY, "Resource Groups");
+ DataSourceField resourceGroupsField = new DataSourceField(Field.RESOURCE_GROUPS, FieldType.ANY,
+ "Resource Groups");
fields.add(resourceGroupsField);
DataSourceField permissionsField = new DataSourceField(Field.PERMISSIONS, FieldType.ANY, "Permissions");
@@ -211,8 +203,8 @@ public class RolesDataSource extends RPCDataSource<Role> {
to.setPermissions(permissions);
Record[] resourceGroupRecords = from.getAttributeAsRecordArray(Field.RESOURCE_GROUPS);
- Set<ResourceGroup> resourceGroups =
- ResourceGroupsDataSource.getInstance().buildDataObjects(resourceGroupRecords);
+ Set<ResourceGroup> resourceGroups = ResourceGroupsDataSource.getInstance().buildDataObjects(
+ resourceGroupRecords);
to.setResourceGroups(resourceGroups);
Record[] subjectRecords = from.getAttributeAsRecordArray(Field.SUBJECTS);
@@ -289,12 +281,11 @@ public class RolesDataSource extends RPCDataSource<Role> {
// Fetching
criteria.fetchPermissions(true);
- if (this.globalPermissions.contains(Permission.MANAGE_SECURITY)) {
- criteria.fetchSubjects(true);
- criteria.fetchResourceGroups(true);
- }
+
+ // TODO: instead of fetching subjects and resource groups, use a composite object that will pull the subject
+ // and resource group count across the wire. these counts will not required permission checks at all.
return criteria;
}
-
+
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RolesView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RolesView.java
index 57b3dc8..bde77b4 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RolesView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/roles/RolesView.java
@@ -18,19 +18,22 @@
*/
package org.rhq.enterprise.gui.coregui.client.admin.roles;
+import java.util.EnumSet;
import java.util.Set;
+import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.grid.ListGridRecord;
import org.rhq.core.domain.authz.Permission;
import org.rhq.enterprise.gui.coregui.client.BookmarkableView;
-import org.rhq.enterprise.gui.coregui.client.PermissionsLoadedListener;
-import org.rhq.enterprise.gui.coregui.client.UserPermissionsManager;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.components.table.TableAction;
import org.rhq.enterprise.gui.coregui.client.components.table.TableSection;
import org.rhq.enterprise.gui.coregui.client.components.view.ViewName;
+import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message;
/**
* A table that lists all roles and provides the ability to view details of or delete those roles and to create new
@@ -40,7 +43,7 @@ import org.rhq.enterprise.gui.coregui.client.components.view.ViewName;
* @author Ian Springer
*/
public class RolesView extends TableSection<RolesDataSource> implements BookmarkableView {
-
+
public static final ViewName VIEW_ID = new ViewName("Roles", MSG.view_adminSecurity_roles());
// TODO: We need a 24x24 version of the Role icon.
@@ -88,14 +91,24 @@ public class RolesView extends TableSection<RolesDataSource> implements Bookmark
});
addTableAction(extendLocatorId("New"), MSG.common_button_new(), new TableAction() {
- private boolean[] hasManageSecurityPermission = new boolean[] {false};
+ private boolean hasManageSecurity = false;
+
public boolean isEnabled(ListGridRecord[] selection) {
- UserPermissionsManager.getInstance().loadGlobalPermissions(new PermissionsLoadedListener() {
- public void onPermissionsLoaded(Set<Permission> globalPermissions) {
- hasManageSecurityPermission[0] = globalPermissions.contains(Permission.MANAGE_SECURITY);
- }
- });
- return hasManageSecurityPermission[0];
+ GWTServiceLookup.getAuthorizationService().getExplicitGlobalPermissions(
+ new AsyncCallback<Set<Permission>>() {
+ @Override
+ public void onSuccess(Set<Permission> result) {
+ hasManageSecurity = result.contains(Permission.MANAGE_SECURITY);
+ }
+
+ @Override
+ public void onFailure(Throwable caught) {
+ CoreGUI.getMessageCenter().notify(
+ new Message(MSG.util_userPerm_loadFailGlobal(), caught, Message.Severity.Error, EnumSet
+ .of(Message.Option.BackgroundJobResult)));
+ }
+ });
+ return hasManageSecurity;
}
public void executeAction(ListGridRecord[] selection, Object actionValue) {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UserEditView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UserEditView.java
index cf4650d..391c8f8 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UserEditView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UserEditView.java
@@ -19,9 +19,11 @@
package org.rhq.enterprise.gui.coregui.client.admin.users;
import java.util.ArrayList;
+import java.util.EnumSet;
import java.util.List;
import java.util.Set;
+import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.data.Record;
import com.smartgwt.client.types.Alignment;
import com.smartgwt.client.widgets.Canvas;
@@ -38,13 +40,15 @@ import com.smartgwt.client.widgets.grid.ListGridRecord;
import org.rhq.core.domain.auth.Principal;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.authz.Permission;
-import org.rhq.enterprise.gui.coregui.client.UserPermissionsManager;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.UserSessionManager;
import org.rhq.enterprise.gui.coregui.client.ViewPath;
import org.rhq.enterprise.gui.coregui.client.components.form.AbstractRecordEditor;
import org.rhq.enterprise.gui.coregui.client.components.form.EnhancedDynamicForm;
import org.rhq.enterprise.gui.coregui.client.components.selector.AssignedItemsChangedEvent;
import org.rhq.enterprise.gui.coregui.client.components.selector.AssignedItemsChangedHandler;
+import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message;
/**
* A form for viewing and/or editing an RHQ user (i.e. a {@link Subject}, and optionally an associated
@@ -70,19 +74,30 @@ public class UserEditView extends AbstractRecordEditor<UsersDataSource> {
public void renderView(ViewPath viewPath) {
super.renderView(viewPath);
- Set<Permission> globalPermissions = UserPermissionsManager.getInstance().getGlobalPermissions();
- UserEditView.this.hasManageSecurityPermission = globalPermissions.contains(Permission.MANAGE_SECURITY);
- Subject sessionSubject = UserSessionManager.getSessionSubject();
- boolean isEditingSelf = (sessionSubject.getId() == getRecordId());
- boolean isReadOnly = (!UserEditView.this.hasManageSecurityPermission && !isEditingSelf);
- init(isReadOnly);
+ GWTServiceLookup.getAuthorizationService().getExplicitGlobalPermissions(new AsyncCallback<Set<Permission>>() {
+ @Override
+ public void onSuccess(Set<Permission> result) {
+ UserEditView.this.hasManageSecurityPermission = result.contains(Permission.MANAGE_SECURITY);
+ Subject sessionSubject = UserSessionManager.getSessionSubject();
+ boolean isEditingSelf = (sessionSubject.getId() == getRecordId());
+ boolean isReadOnly = (!UserEditView.this.hasManageSecurityPermission && !isEditingSelf);
+ init(isReadOnly);
+ }
+
+ @Override
+ public void onFailure(Throwable caught) {
+ CoreGUI.getMessageCenter().notify(
+ new Message(MSG.util_userPerm_loadFailGlobal(), caught, Message.Severity.Error, EnumSet
+ .of(Message.Option.BackgroundJobResult)));
+ }
+ });
}
@Override
protected Record createNewRecord() {
Subject subject = new Subject();
subject.setFactive(true);
- @SuppressWarnings({"UnnecessaryLocalVariable"})
+ @SuppressWarnings( { "UnnecessaryLocalVariable" })
Record userRecord = UsersDataSource.getInstance().copyValues(subject, false);
return userRecord;
}
@@ -90,7 +105,7 @@ public class UserEditView extends AbstractRecordEditor<UsersDataSource> {
@Override
protected void editRecord(Record record) {
super.editRecord(record);
-
+
// Don't allow the rhqadmin account to be disabled.
if (getRecordId() == SUBJECT_ID_RHQADMIN) {
FormItem activeField = getForm().getField(UsersDataSource.Field.FACTIVE);
@@ -128,7 +143,7 @@ public class UserEditView extends AbstractRecordEditor<UsersDataSource> {
//
private boolean areRolesReadOnly(Record record) {
boolean isLdap = Boolean.valueOf(record.getAttribute(UsersDataSource.Field.LDAP));
- return (!hasManageSecurityPermission || (getRecordId() == SUBJECT_ID_RHQADMIN) || isLdap);
+ return (!hasManageSecurityPermission || (getRecordId() == SUBJECT_ID_RHQADMIN) || isLdap);
}
@Override
@@ -156,7 +171,7 @@ public class UserEditView extends AbstractRecordEditor<UsersDataSource> {
items.add(passwordItem);
final PasswordItem verifyPasswordItem = new PasswordItem(UsersDataSource.Field.PASSWORD_VERIFY);
- final boolean[] initialPasswordChange = {true};
+ final boolean[] initialPasswordChange = { true };
passwordItem.addChangedHandler(new ChangedHandler() {
public void onChanged(ChangedEvent event) {
if (initialPasswordChange[0]) {
@@ -211,5 +226,5 @@ public class UserEditView extends AbstractRecordEditor<UsersDataSource> {
super.reset();
this.roleSelector.reset();
}
-
+
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UsersView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UsersView.java
index 6a9fffa..7a68363 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UsersView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/admin/users/UsersView.java
@@ -19,22 +19,23 @@
package org.rhq.enterprise.gui.coregui.client.admin.users;
import java.util.ArrayList;
+import java.util.EnumSet;
import java.util.List;
import java.util.Set;
-import com.smartgwt.client.data.Record;
+import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.widgets.Canvas;
-import com.smartgwt.client.widgets.grid.CellFormatter;
import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.grid.ListGridRecord;
import org.rhq.core.domain.authz.Permission;
-import org.rhq.enterprise.gui.coregui.client.UserPermissionsManager;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.admin.AdministrationView;
-import org.rhq.enterprise.gui.coregui.client.admin.roles.RolesDataSource;
import org.rhq.enterprise.gui.coregui.client.components.table.TableAction;
import org.rhq.enterprise.gui.coregui.client.components.table.TableSection;
import org.rhq.enterprise.gui.coregui.client.components.view.ViewName;
+import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message;
/**
* A table that lists all users and provides the ability to view or edit details of users, delete users, or create new
@@ -93,11 +94,13 @@ public class UsersView extends TableSection<UsersDataSource> {
ListGridField departmentField = new ListGridField(UsersDataSource.Field.DEPARTMENT, 150);
fields.add(departmentField);
- Set<Permission> globalPermissions = UserPermissionsManager.getInstance().getGlobalPermissions();
- if (globalPermissions.contains(Permission.MANAGE_SECURITY)) {
+ // TODO: instead of fetching roles, use a composite object that will pull the role count across the wire.
+ // this count will not required permission checks at all.
+
+ /*
ListGridField rolesField = new ListGridField(UsersDataSource.Field.ROLES, 250);
rolesField.setCellFormatter(new CellFormatter() {
- public String format(Object value, ListGridRecord record, int rowNum, int colNum) {
+ public String format(Object value, ListGridRecord record, int rowNum, int colNum) {
Record[] roleRecords = record.getAttributeAsRecordArray(UsersDataSource.Field.ROLES);
StringBuilder formattedValue = new StringBuilder();
for (int i = 0; i < roleRecords.length; i++) {
@@ -112,7 +115,8 @@ public class UsersView extends TableSection<UsersDataSource> {
}
});
fields.add(rolesField);
- }
+
+ */
return fields;
}
@@ -143,9 +147,24 @@ public class UsersView extends TableSection<UsersDataSource> {
private TableAction createNewAction() {
return new TableAction() {
+ private boolean hasManageSecurity = false;
+
public boolean isEnabled(ListGridRecord[] selection) {
- Set<Permission> globalPermissions = UserPermissionsManager.getInstance().getGlobalPermissions();
- return globalPermissions.contains(Permission.MANAGE_SECURITY);
+ GWTServiceLookup.getAuthorizationService().getExplicitGlobalPermissions(
+ new AsyncCallback<Set<Permission>>() {
+ @Override
+ public void onSuccess(Set<Permission> result) {
+ hasManageSecurity = result.contains(Permission.MANAGE_SECURITY);
+ }
+
+ @Override
+ public void onFailure(Throwable caught) {
+ CoreGUI.getMessageCenter().notify(
+ new Message(MSG.util_userPerm_loadFailGlobal(), caught, Message.Severity.Error, EnumSet
+ .of(Message.Option.BackgroundJobResult)));
+ }
+ });
+ return hasManageSecurity;
}
public void executeAction(ListGridRecord[] selection, Object actionValue) {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
index 9fdd4cc..0d7d3ca 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java
@@ -20,6 +20,7 @@ package org.rhq.enterprise.gui.coregui.client.inventory.groups.detail;
import java.util.ArrayList;
import java.util.EnumSet;
+import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -38,7 +39,6 @@ import org.rhq.core.domain.resource.group.ResourceGroup;
import org.rhq.core.domain.resource.group.composite.ResourceGroupComposite;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
-import org.rhq.enterprise.gui.coregui.client.UserPermissionsManager;
import org.rhq.enterprise.gui.coregui.client.ViewPath;
import org.rhq.enterprise.gui.coregui.client.alert.GroupAlertHistoryView;
import org.rhq.enterprise.gui.coregui.client.alert.definitions.GroupAlertDefinitionsView;
@@ -59,6 +59,7 @@ import org.rhq.enterprise.gui.coregui.client.inventory.groups.detail.monitoring.
import org.rhq.enterprise.gui.coregui.client.inventory.groups.detail.summary.OverviewView;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.ResourceSearchView;
import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository;
+import org.rhq.enterprise.gui.coregui.client.util.message.Message;
/**
* Be able to view members as a resource list, or edit members via selector.
@@ -219,7 +220,24 @@ public class ResourceGroupDetailView extends AbstractTwoLevelTabSetView<Resource
return tabs;
}
- protected void updateTabContent(ResourceGroupComposite groupComposite) {
+ protected void updateTabContent(final ResourceGroupComposite groupComposite) {
+ GWTServiceLookup.getAuthorizationService().getExplicitGlobalPermissions(new AsyncCallback<Set<Permission>>() {
+ @Override
+ public void onSuccess(Set<Permission> result) {
+ updateTabContent(groupComposite, result);
+ }
+
+ @Override
+ public void onFailure(Throwable caught) {
+ CoreGUI.getMessageCenter().notify(
+ new Message(MSG.util_userPerm_loadFailGlobal(), caught, Message.Severity.Error, EnumSet
+ .of(Message.Option.BackgroundJobResult)));
+ updateTabContent(groupComposite, new HashSet<Permission>());
+ }
+ });
+ }
+
+ protected void updateTabContent(ResourceGroupComposite groupComposite, Set<Permission> globalPermissions) {
boolean enabled;
boolean visible;
Canvas canvas;
@@ -233,7 +251,6 @@ public class ResourceGroupDetailView extends AbstractTwoLevelTabSetView<Resource
((TwoLevelTab) top).getLayout().destroyViews();
}
- Set<Permission> globalPermissions = UserPermissionsManager.getInstance().getGlobalPermissions();
GroupCategory groupCategory = groupComposite.getResourceGroup().getGroupCategory();
Set<ResourceTypeFacet> facets = groupComposite.getResourceFacets().getFacets();
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
index 514aaf7..c914b9d 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java
@@ -20,6 +20,7 @@ package org.rhq.enterprise.gui.coregui.client.inventory.resource.detail;
import java.util.ArrayList;
import java.util.EnumSet;
+import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -38,7 +39,6 @@ import org.rhq.core.domain.resource.composite.ResourceComposite;
import org.rhq.core.domain.resource.composite.ResourcePermission;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
-import org.rhq.enterprise.gui.coregui.client.UserPermissionsManager;
import org.rhq.enterprise.gui.coregui.client.ViewPath;
import org.rhq.enterprise.gui.coregui.client.alert.ResourceAlertHistoryView;
import org.rhq.enterprise.gui.coregui.client.alert.definitions.ResourceAlertDefinitionsView;
@@ -222,7 +222,24 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
return new ResourceTitleBar(extendLocatorId("TitleBar"));
}
- protected void updateTabContent(ResourceComposite resourceComposite) {
+ protected void updateTabContent(final ResourceComposite resourceComposite) {
+ GWTServiceLookup.getAuthorizationService().getExplicitGlobalPermissions(new AsyncCallback<Set<Permission>>() {
+ @Override
+ public void onSuccess(Set<Permission> result) {
+ updateTabContent(resourceComposite, result);
+ }
+
+ @Override
+ public void onFailure(Throwable caught) {
+ CoreGUI.getMessageCenter().notify(
+ new Message(MSG.util_userPerm_loadFailGlobal(), caught, Message.Severity.Error, EnumSet
+ .of(Message.Option.BackgroundJobResult)));
+ updateTabContent(resourceComposite, new HashSet<Permission>());
+ }
+ });
+ }
+
+ protected void updateTabContent(ResourceComposite resourceComposite, Set<Permission> globalPermissions) {
boolean enabled;
boolean visible;
Canvas canvas;
@@ -235,7 +252,6 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
((TwoLevelTab) top).getLayout().destroyViews();
}
- Set<Permission> globalPermissions = UserPermissionsManager.getInstance().getGlobalPermissions();
ResourcePermission resourcePermissions = this.resourceComposite.getResourcePermission();
Set<ResourceTypeFacet> facets = this.resourceComposite.getResourceFacets().getFacets();
commit 4255f38b5d2e9d15ae0f78b809b2794133bbc97d
Author: Joseph Marques <joseph(a)redhat.com>
Date: Wed Nov 24 18:26:17 2010 -0500
remove unnecessary check for isLoggedIn
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/Footer.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/Footer.java
index 0d94cc3..60d0502 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/Footer.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/Footer.java
@@ -18,7 +18,6 @@
*/
package org.rhq.enterprise.gui.coregui.client;
-import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.user.client.History;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.rpc.AsyncCallback;
@@ -132,26 +131,21 @@ public class Footer extends LocatableToolStrip {
AlertCriteria alertCriteria = new AlertCriteria();
alertCriteria.addFilterStartTime(System.currentTimeMillis() - (1000L * 60 * 60 * 8)); // last 8 hrs
- //check for still logged in before submitting server side request
- if (UserSessionManager.isLoggedIn()) {
- GWTServiceLookup.getAlertService().findAlertCountByCriteria(alertCriteria, new AsyncCallback<Long>() {
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(MSG.view_core_error_1(), caught);
- }
+ GWTServiceLookup.getAlertService().findAlertCountByCriteria(alertCriteria, new AsyncCallback<Long>() {
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(MSG.view_core_error_1(), caught);
+ }
- public void onSuccess(Long result) {
- if (result == 0L) {
- setContents(MSG.view_core_recentAlerts("0"));
- setIcon("subsystems/alert/Alert_LOW_16.png");
- } else {
- setContents(MSG.view_core_recentAlerts(result.toString()));
- setIcon("subsystems/alert/Alert_HIGH_16.png");
- }
+ public void onSuccess(Long result) {
+ if (result == 0L) {
+ setContents(MSG.view_core_recentAlerts("0"));
+ setIcon("subsystems/alert/Alert_LOW_16.png");
+ } else {
+ setContents(MSG.view_core_recentAlerts(result.toString()));
+ setIcon("subsystems/alert/Alert_HIGH_16.png");
}
- });
- } else {//dump request
- Log.debug("user not logged in. Not fetching any alerts now.");
- }
+ }
+ });
}
}
13 years, 5 months
[rhq] 3 commits - modules/enterprise modules/plugins
by Heiko W. Rupp
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties | 2
modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/PerfTestComponent.java | 9 +
modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/ScenarioManager.java | 48 ++++++++++
modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/trait/EmptyTraitFactory.java | 35 +++++++
modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/trait/SimpleTraitFactory.java | 45 +++++++++
modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/trait/TraitFactory.java | 31 ++++++
modules/plugins/perftest/src/main/resources/META-INF/rhq-plugin.xml | 2
modules/plugins/perftest/src/main/resources/configurable-5.xml | 1
modules/plugins/perftest/src/main/resources/perftest-scenario.xsd | 13 ++
9 files changed, 185 insertions(+), 1 deletion(-)
New commits:
commit d497c5a9a23761c77c1292a08ff8cb9fa9f943f1
Merge: 95ab1a9... 3e03058...
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Fri Nov 26 15:50:30 2010 +0100
Merge branch 'master' of ssh://git.fedorahosted.org/git/rhq/rhq
commit 95ab1a9636844d612b52a899affc9572c021be8a
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Fri Nov 26 15:15:40 2010 +0100
Add trait generation to the perftest pluging
diff --git a/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/PerfTestComponent.java b/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/PerfTestComponent.java
index bd429f6..485ff20 100644
--- a/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/PerfTestComponent.java
+++ b/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/PerfTestComponent.java
@@ -34,6 +34,7 @@ import org.rhq.core.domain.event.EventSeverity;
import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.core.domain.measurement.DataType;
import org.rhq.core.domain.measurement.MeasurementDataNumeric;
+import org.rhq.core.domain.measurement.MeasurementDataTrait;
import org.rhq.core.domain.measurement.MeasurementReport;
import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
import org.rhq.core.domain.measurement.calltime.CallTimeData;
@@ -53,6 +54,7 @@ import org.rhq.plugins.perftest.calltime.CalltimeFactory;
import org.rhq.plugins.perftest.configuration.SimpleConfigurationFactory;
import org.rhq.plugins.perftest.event.PerfTestEventPoller;
import org.rhq.plugins.perftest.measurement.MeasurementFactory;
+import org.rhq.plugins.perftest.trait.TraitFactory;
import java.io.InputStream;
import java.util.List;
@@ -109,6 +111,7 @@ public class PerfTestComponent implements ResourceComponent, MeasurementFacet, C
*/
MeasurementFactory measurementFactory = scenarioManager.getMeasurementFactory(resourceTypeName);
CalltimeFactory calltimeFactory = scenarioManager.getCalltimeFactory(resourceTypeName);
+ TraitFactory traitFactory = scenarioManager.getTraitFactory(resourceTypeName);
for (MeasurementScheduleRequest metric : metrics) {
switch (metric.getDataType()) {
@@ -126,6 +129,12 @@ public class PerfTestComponent implements ResourceComponent, MeasurementFacet, C
}
break;
case TRAIT:
+ MeasurementDataTrait measurementDataTrait = traitFactory.nextValue(metric);
+ if (measurementDataTrait != null) {
+ report.addData(measurementDataTrait);
+ }
+ break;
+
case COMPLEX:
log.error("DataType " + metric.getDataType() + " not yet supported");
}
diff --git a/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/ScenarioManager.java b/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/ScenarioManager.java
index d9aabf9..5cd8fea 100644
--- a/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/ScenarioManager.java
+++ b/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/ScenarioManager.java
@@ -61,6 +61,11 @@ import org.rhq.plugins.perftest.scenario.SimpleConfigurationGenerator;
import org.rhq.plugins.perftest.scenario.SimpleContentGenerator;
import org.rhq.plugins.perftest.scenario.SimpleNumericMeasurementGenerator;
import org.rhq.plugins.perftest.scenario.SimpleResourceGenerator;
+import org.rhq.plugins.perftest.scenario.SimpleTraitMeasurementGenerator;
+import org.rhq.plugins.perftest.scenario.TraitGenerator;
+import org.rhq.plugins.perftest.trait.EmptyTraitFactory;
+import org.rhq.plugins.perftest.trait.SimpleTraitFactory;
+import org.rhq.plugins.perftest.trait.TraitFactory;
/**
* Loads performance testing scenarios and parses into usable components by the JON resource components.
@@ -94,6 +99,12 @@ public class ScenarioManager {
*/
private static final EmptyCalltimeFactory EMPTY_CALLTIME_FACTORY = new EmptyCalltimeFactory();
+ /**
+ * Trait factory used when a scenario doesn't define any metrics for a particular resource type.
+ */
+ private static final TraitFactory EMPTY_TRAIT_FACTORY = new EmptyTraitFactory();
+
+
// Attributes --------------------------------------------
private final Log log = LogFactory.getLog(ScenarioManager.class);
@@ -115,6 +126,7 @@ public class ScenarioManager {
*/
private Map<String, MeasurementFactory> measurementFactories = new HashMap<String, MeasurementFactory>();
private Map<String, CalltimeFactory> calltimeFactories = new HashMap<String, CalltimeFactory>();
+ private Map<String, TraitFactory> traitFactories = new HashMap<String, TraitFactory>();
/**
* Mapping of resource type name to configuration factory to populate the plugin configuration for newly discovered
@@ -234,6 +246,28 @@ public class ScenarioManager {
return calltimeFactory;
}
+ public TraitFactory getTraitFactory(String resourceTypeName) {
+ TraitFactory traitFactory = traitFactories.get(resourceTypeName);
+
+ if (traitFactory == null) {
+ Resource resource = findResource(resourceTypeName);
+ if (resource == null) {
+ traitFactory = EMPTY_TRAIT_FACTORY;
+ } else {
+ JAXBElement<? extends TraitGenerator> element = resource.getTraitGenerator();
+ if (element == null) {
+ traitFactory = EMPTY_TRAIT_FACTORY;
+ } else {
+ TraitGenerator generator = element.getValue();
+ traitFactory = createTraitFactory(generator);
+ }
+ }
+
+ traitFactories.put(resourceTypeName,traitFactory);
+ }
+ return traitFactory;
+ }
+
/**
* Returns the configuration factory defined in the scenario for creating plugin configurations for the specified
* resource type.
@@ -348,6 +382,20 @@ public class ScenarioManager {
}
/**
+ * Creates an appropriate Traits factory based on the provided generator.
+ * @param generator read from the scenario
+ * @return TraitFactory instance
+ */
+ private TraitFactory createTraitFactory(TraitGenerator generator) {
+ if (generator instanceof SimpleTraitMeasurementGenerator) {
+ return new SimpleTraitFactory();
+ }
+
+ return null;
+ }
+
+
+ /**
* Creates the appropriate configuration factory instance based on the provided generator.
*
* @param generator read from the scenario
diff --git a/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/trait/EmptyTraitFactory.java b/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/trait/EmptyTraitFactory.java
new file mode 100644
index 0000000..af724c6
--- /dev/null
+++ b/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/trait/EmptyTraitFactory.java
@@ -0,0 +1,35 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.plugins.perftest.trait;
+
+import org.rhq.core.domain.measurement.MeasurementDataTrait;
+import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
+
+/**
+ * Factory returning no values
+ *
+ * @author Heiko W. Rupp
+ */
+public class EmptyTraitFactory implements TraitFactory {
+
+
+ public MeasurementDataTrait nextValue(MeasurementScheduleRequest request) {
+ return null;
+ }
+}
diff --git a/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/trait/SimpleTraitFactory.java b/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/trait/SimpleTraitFactory.java
new file mode 100644
index 0000000..566ecde
--- /dev/null
+++ b/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/trait/SimpleTraitFactory.java
@@ -0,0 +1,45 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.plugins.perftest.trait;
+
+import org.rhq.core.domain.measurement.MeasurementData;
+import org.rhq.core.domain.measurement.MeasurementDataTrait;
+import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
+import org.rhq.plugins.perftest.trait.TraitFactory;
+
+import java.util.Date;
+
+/**
+ * Create trait data
+ *
+ * @author Heiko W. Rupp
+ */
+public class SimpleTraitFactory implements TraitFactory {
+
+ public MeasurementDataTrait nextValue(MeasurementScheduleRequest request) {
+
+ String name = request.getName();
+ Date date = new Date();
+
+ MeasurementDataTrait data = new MeasurementDataTrait(request,name + ", " + date);
+
+ return data;
+
+ }
+}
diff --git a/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/trait/TraitFactory.java b/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/trait/TraitFactory.java
new file mode 100644
index 0000000..b5932c0
--- /dev/null
+++ b/modules/plugins/perftest/src/main/java/org/rhq/plugins/perftest/trait/TraitFactory.java
@@ -0,0 +1,31 @@
+/*
+ * RHQ Management Platform
+ * Copyright (C) 2005-2010 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+package org.rhq.plugins.perftest.trait;
+
+import org.rhq.core.domain.measurement.MeasurementDataTrait;
+import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
+
+/**
+ * Trait data providers need to implement this
+ * @author Heiko W. Rupp
+ */
+public interface TraitFactory {
+
+ public MeasurementDataTrait nextValue(MeasurementScheduleRequest request);
+}
diff --git a/modules/plugins/perftest/src/main/resources/META-INF/rhq-plugin.xml b/modules/plugins/perftest/src/main/resources/META-INF/rhq-plugin.xml
index 06900c8..df3cdbc 100644
--- a/modules/plugins/perftest/src/main/resources/META-INF/rhq-plugin.xml
+++ b/modules/plugins/perftest/src/main/resources/META-INF/rhq-plugin.xml
@@ -314,6 +314,8 @@
<metric property="metric002" defaultOn="true" displayType="summary" defaultInterval="720000"/>
<metric property="metric003" defaultOn="true" displayType="summary" defaultInterval="600000"/>
<metric property="metric004" defaultOn="true" displayType="summary" defaultInterval="600000"/>
+ <metric property="trait001" defaultOn="true" dataType="trait" displayType="summary" defaultInterval="1200000"/>
+ <metric property="trait002" defaultOn="true" dataType="trait" displayType="summary" defaultInterval="1440000"/>
<metric displayName="CallTime" property="calltime" defaultOn="true" dataType="calltime" defaultInterval="1200000" units="milliseconds"/>
<event name="PerfTestEventType" description="a test event type"/>
</service>
diff --git a/modules/plugins/perftest/src/main/resources/configurable-5.xml b/modules/plugins/perftest/src/main/resources/configurable-5.xml
index ffa4b02..c3f68b4 100644
--- a/modules/plugins/perftest/src/main/resources/configurable-5.xml
+++ b/modules/plugins/perftest/src/main/resources/configurable-5.xml
@@ -21,6 +21,7 @@
<resource type="service-d-metrics">
<simpleResourceGenerator property="on.perftest.service-d-metrics-count"/>
<simpleNumericMeasurementGenerator/>
+ <simpleTraitMeasurementGenerator/>
<ConfigurableCallTimeDataGenerator
minMsgCount="1" maxMsgCount="500"
minDuration="10" maxDuration="500"
diff --git a/modules/plugins/perftest/src/main/resources/perftest-scenario.xsd b/modules/plugins/perftest/src/main/resources/perftest-scenario.xsd
index c172efb..ab938e5 100644
--- a/modules/plugins/perftest/src/main/resources/perftest-scenario.xsd
+++ b/modules/plugins/perftest/src/main/resources/perftest-scenario.xsd
@@ -20,6 +20,7 @@
<xs:element ref="perf:resourceGenerator" minOccurs="1" maxOccurs="1"/>
<xs:element ref="perf:pluginConfigurationGenerator" minOccurs="0" maxOccurs="1"/>
<xs:element ref="perf:measurementGenerator" minOccurs="0" maxOccurs="1"/>
+ <xs:element ref="perf:traitGenerator" minOccurs="0" maxOccurs="1"/>
<xs:element ref="perf:calltimeGenerator" minOccurs="0" maxOccurs="1"/>
<xs:element ref="perf:contentGenerator" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
@@ -67,6 +68,18 @@
</xs:complexContent>
</xs:complexType>
+
+ <xs:element name="traitGenerator" type="perf:traitGenerator" abstract="true"/>
+ <xs:complexType name="traitGenerator"/>
+ <xs:element name="simpleTraitMeasurementGenerator" type="perf:simpleTraitMeasurementGenerator"
+ substitutionGroup="perf:traitGenerator"/>
+ <xs:complexType name="simpleTraitMeasurementGenerator">
+ <xs:complexContent>
+ <xs:extension base="perf:traitGenerator"/>
+ </xs:complexContent>
+ </xs:complexType>
+
+
<xs:element name="calltimeGenerator" type="perf:calltimeGenerator" abstract="true"/>
<xs:complexType name="calltimeGenerator"/>
commit 894083ba061d8b731236753a171a1218cbcb1fd9
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Fri Nov 26 12:44:35 2010 +0100
Fix a typo.
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
index ca4c150..5ac633d 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
@@ -1086,7 +1086,7 @@ view_portlet_tagCloud_title=Tag-Wolke
#=================== Inventory =====================
view_inventory_adq = Discovery-Warteschlange
-view_inventory_sectionHelp = In diesem Abschnitt können neu gefundene Ressourcen, sowie Ressourcen ud Gruppen im Inventar angesehen und verwaltet werden.
+view_inventory_sectionHelp = In diesem Abschnitt können neu gefundene Ressourcen, sowie Ressourcen und Gruppen im Inventar angesehen und verwaltet werden.
view_inventory_cannotGetGlobalPerms = Could not determine global permissions - assuming none.~
view_inventory_problemGroups=Gruppen mit Problemen
view_inventory_collectionInterval=Erfassungs-Intervall
13 years, 5 months
[rhq] modules/plugins
by lkrejci
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceComponent.java | 7
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceDiscoveryComponent.java | 20 -
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/AugeasConfigurationApache.java | 24 +-
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/ApacheParserImpl.java | 4
modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/HttpdAddressUtility.java | 114 ++++++++--
modules/plugins/augeas/src/main/java/org/rhq/augeas/util/Glob.java | 4
6 files changed, 126 insertions(+), 47 deletions(-)
New commits:
commit 3e03058e6b276b66affd1529d684882db3cc3a13
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri Nov 26 14:48:32 2010 +0100
A cherry-pick and adaptation of the original fix ae99b5bc0bf42909308a9d1efc09cee77d06ffc1 in release-3.0.0 branch:
a couple of robustness enhancements to the apache plugin:
BZ 656449 - use the matching algorithm between SNMP values and augeas nodes also
when matching the vhost node by resource key, because resource key
in RHQ 3 is based on the SNMP value.
BZ 652247 - Log the SNMP errors only on DEBUG level during discovery because SNMP isn't
required for it to work.
BZ 656476 - Do not fail the discovery if a non-existent directory is used in an Include directive
BZ 652247, BZ 656491 - Do not choke on invalid/unresolvable hostnames in VirtualHost or ServerName directives
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceComponent.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceComponent.java
index 9b5c975..a1365da 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceComponent.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceComponent.java
@@ -21,8 +21,6 @@ package org.rhq.plugins.apache;
import java.io.File;
import java.net.InetAddress;
import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
import java.net.URL;
import java.net.UnknownHostException;
import java.util.ArrayList;
@@ -338,13 +336,16 @@ public class ApacheVirtualHostServiceComponent implements ResourceComponent<Apac
String serverName = null;
int pipeIdx = resourceKey.indexOf('|');
- if (pipeIdx >= 0) {
+ //the resource key always contains the '|' so we're only checking for non-empty
+ //server names
+ if (pipeIdx > 0) {
serverName = resourceKey.substring(0, pipeIdx);
}
String[] addrs = resourceKey.substring(pipeIdx + 1).split(" ");
List<AugeasNode> nodes = tree.matchRelative(tree.getRootNode(), "<VirtualHost");
List<AugeasNode> virtualHosts = new ArrayList<AugeasNode>();
+
boolean matching = false;
for (AugeasNode node : nodes) {
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceDiscoveryComponent.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceDiscoveryComponent.java
index 6f24ca7..1b00e9d 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceDiscoveryComponent.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/ApacheVirtualHostServiceDiscoveryComponent.java
@@ -86,6 +86,7 @@ public class ApacheVirtualHostServiceDiscoveryComponent implements ResourceDisco
String firstAddress = vhost.hosts.get(0);
String resourceKey = createResourceKey(vhost.serverName, vhost.hosts);
+ String resourceName = resourceKey; //this'll get overridden below if we find a better value using the address variable
Configuration pluginConfiguration = context.getDefaultPluginConfiguration();
@@ -94,7 +95,7 @@ public class ApacheVirtualHostServiceDiscoveryComponent implements ResourceDisco
String scheme = address.scheme;
String hostToPing = address.host;
int portToPing = address.port;
- if (address.isPortWildcard()) {
+ if (address.isPortWildcard() || !address.isPortDefined()) {
Address serverAddress = serverComponent.getAddressUtility().getMainServerSampleAddress(tree, hostToPing, 0);
if (serverAddress != null) {
portToPing = serverAddress.port;
@@ -122,21 +123,14 @@ public class ApacheVirtualHostServiceDiscoveryComponent implements ResourceDisco
PropertySimple urlProp = new PropertySimple(ApacheVirtualHostServiceComponent.URL_CONFIG_PROP, url);
pluginConfiguration.put(urlProp);
- }
-
- if (address != null) {
File rtLogFile = new File(logsDir, address.host + address.port + RT_LOG_FILE_NAME_SUFFIX);
-
+
PropertySimple rtLogProp = new PropertySimple(
ApacheVirtualHostServiceComponent.RESPONSE_TIME_LOG_FILE_CONFIG_PROP, rtLogFile.toString());
pluginConfiguration.put(rtLogProp);
- }
-
- String resourceName;
- if (address != null) {
- resourceName = address.host + ":" + address.port;
- } else {
- resourceName = resourceKey;
+
+ //redefine the resourcename using the virtual host sample address
+ resourceName = address.toString(false);
}
discoveredResources.add(new DiscoveredResourceDetails(resourceType, resourceKey, resourceName, null, null,
@@ -323,7 +317,7 @@ public class ApacheVirtualHostServiceDiscoveryComponent implements ResourceDisco
return ret;
} catch (Exception e) {
- log.warn("Error while trying to contact SNMP of the apache server " + serverResourceKey, e);
+ log.debug("Error while trying to contact SNMP of the apache server " + serverResourceKey, e);
return null;
}
}
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/AugeasConfigurationApache.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/AugeasConfigurationApache.java
index 3e51757..d4f7dd2 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/AugeasConfigurationApache.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/augeas/AugeasConfigurationApache.java
@@ -31,10 +31,11 @@ import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.rhq.augeas.config.AugeasModuleConfig;
import org.rhq.augeas.util.Glob;
import org.rhq.core.domain.configuration.Configuration;
-import org.rhq.plugins.apache.ApachePluginLifecycleListener;
import org.rhq.plugins.apache.ApacheServerComponent;
import org.rhq.rhqtransform.AugeasRhqException;
import org.rhq.rhqtransform.impl.PluginDescriptorBasedAugeasConfiguration;
@@ -59,6 +60,8 @@ public class AugeasConfigurationApache extends PluginDescriptorBasedAugeasConfig
private final Pattern includePattern = Pattern.compile(INCLUDE_FILES_PATTERN);
private final Pattern serverRootPattern = Pattern.compile(SERVER_ROOT_PATTERN);
+ private static final Log LOG = LogFactory.getLog(AugeasConfigurationApache.class);
+
private String serverRootPath;
private AugeasModuleConfig module;
private List<File> allConfigFiles;
@@ -109,7 +112,7 @@ public class AugeasConfigurationApache extends PluginDescriptorBasedAugeasConfig
files.addAll(Glob.match(root, expression));
for (File fl : files){
- if (fl.exists()) {
+ if (fl.exists() && fl.isFile()) {
foundIncludes.add(fl.getAbsolutePath());
FileInputStream fstream = new FileInputStream(fl);
@@ -162,18 +165,23 @@ public class AugeasConfigurationApache extends PluginDescriptorBasedAugeasConfig
for (File configFile : files) {
if (!configFile.isAbsolute()) {
- throw new IllegalStateException(
- "Configuration files inclusion patterns contain a non-absolute file.");
+ LOG.warn("Configuration files inclusion patterns contain a non-absolute file: " + configFile);
+ continue;
}
+
if (!configFile.exists()) {
- throw new IllegalStateException(
- "Configuration files inclusion patterns refer to a non-existent file.");
+ LOG.warn("Configuration files inclusion patterns refer to a non-existent file: " + configFile);
+ continue;
}
+
if (configFile.isDirectory()) {
- throw new IllegalStateException("Configuration files inclusion patterns refer to a directory.");
+ LOG.warn("Configuration files inclusion patterns refer to a directory: " + configFile);
+ continue;
}
- if (!module.getConfigFiles().contains(configFile.getAbsolutePath()))
+
+ if (!module.getConfigFiles().contains(configFile.getAbsolutePath())) {
module.addConfigFile(configFile.getAbsolutePath());
+ }
}
}
}
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/ApacheParserImpl.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/ApacheParserImpl.java
index f33f8fd..686625e 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/ApacheParserImpl.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/parser/ApacheParserImpl.java
@@ -24,7 +24,9 @@ public class ApacheParserImpl implements ApacheParser{
if (directive.getName().equals(INCLUDE_DIRECTIVE)){
List<File> files = getIncludeFiles(directive.getValuesAsString());
for (File fl : files){
- ApacheConfigReader.searchFile(fl.getAbsolutePath(), this);
+ if (fl.exists() && fl.isFile()) {
+ ApacheConfigReader.searchFile(fl.getAbsolutePath(), this);
+ }
}
}
directive.setParentNode(stack.getLastDirective());
diff --git a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/HttpdAddressUtility.java b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/HttpdAddressUtility.java
index b5cdedf..0710178 100644
--- a/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/HttpdAddressUtility.java
+++ b/modules/plugins/apache/src/main/java/org/rhq/plugins/apache/util/HttpdAddressUtility.java
@@ -82,7 +82,7 @@ public enum HttpdAddressUtility {
address = getLocalhost(address.port);
}
- updateWithServerName(address, ag, false);
+ updateWithServerName(address, ag);
return address;
}
@@ -106,7 +106,7 @@ public enum HttpdAddressUtility {
addr = getLocalhost(addr.port);
}
- updateWithServerName(addr, ag, false);
+ updateWithServerName(addr, ag);
return addr;
}
@@ -217,21 +217,68 @@ public enum HttpdAddressUtility {
Address o = (Address) other;
- if (this.host == null) {
- return o.host == null && this.port == o.port;
- } else {
- return this.host.equals(o.host) && this.port == o.port;
+ return safeEquals(host, o.host) && this.port == o.port;
+ }
+
+ /**
+ * This differs from equals in the way that it considers wildcard values:
+ * <ul>
+ * <li>wildcard host matches any host
+ * <li>default host matches default host
+ * <li>wildcard port matches any port
+ * <li>undefined port matches undefined port
+ * </ul>
+ * The addresses match if both address and port match.
+ *
+ * @param other the address to match
+ * @param whether to match the scheme as well
+ * @return true if the addresses match according to the rules described above, false otherwise
+ */
+ public boolean matches(Address other, boolean matchSchemes) {
+ if (matchSchemes && !safeEquals(scheme, other.scheme)) {
+ return false;
+ }
+
+ if (!WILDCARD.equals(host) && !WILDCARD.equals(other.host) && !safeEquals(host, other.host)) {
+ return false;
}
+
+ if (PORT_WILDCARD_VALUE != port && PORT_WILDCARD_VALUE != other.port && port != other.port) {
+ return false;
+ }
+
+ return true;
}
@Override
public String toString() {
- if (port == NO_PORT_SPECIFIED_VALUE) return scheme + "://" + host;
- else {
- String portSpec = port == PORT_WILDCARD_VALUE ? WILDCARD : String.valueOf(port);
+ return toString(true);
+ }
+
+ public String toString(boolean includeScheme) {
+ StringBuilder bld = new StringBuilder();
+
+ if (includeScheme) {
+ bld.append(scheme).append("://");
+ }
+
+ bld.append(host);
+
+ if (port != NO_PORT_SPECIFIED_VALUE) {
+ bld.append(":");
- return scheme + "://" + host + ":" + portSpec;
+ if (port == PORT_WILDCARD_VALUE) {
+ bld.append(WILDCARD);
+ } else {
+ bld.append(port);
+ }
}
+
+ return bld.toString();
+ }
+
+ private static boolean safeEquals(Object a, Object b) {
+ return a == null ? b == null : a.equals(b);
}
}
@@ -270,9 +317,9 @@ public enum HttpdAddressUtility {
return null;
addr.host = serverAddr.host;
}
-
+
if (serverName != null) {
- updateWithServerName(addr, serverName, true);
+ updateWithServerName(addr, serverName);
}
return addr;
@@ -351,7 +398,7 @@ public enum HttpdAddressUtility {
}
}
- private static void updateWithServerName(Address address, ApacheDirectiveTree config, boolean updatePort) throws UnknownHostException {
+ private static void updateWithServerName(Address address, ApacheDirectiveTree config) throws UnknownHostException {
//check if there is a ServerName directive
List<ApacheDirective> serverNameNodes = config.search("/ServerName");
@@ -360,21 +407,46 @@ public enum HttpdAddressUtility {
//be the case if the server listens on more than one interfaces.
if (serverNameNodes.size() > 0) {
String serverName = serverNameNodes.get(0).getValuesAsString();
- updateWithServerName(address, serverName, updatePort);
+ updateWithServerName(address, serverName);
}
}
- private static void updateWithServerName(Address address, String serverName, boolean updatePort) throws UnknownHostException {
+ private static void updateWithServerName(Address address, String serverName) throws UnknownHostException {
+ //the configuration may be invalid and/or the hostname can be unresolvable.
+ //we try to match the address with the servername first by IP address
+ //but if that fails (i.e. the hostname couldn't be resolved to an IP)
+ //we try to simply match the hostnames themselves.
+
Address serverAddr = Address.parse(serverName);
- InetAddress addrFromServerName = InetAddress.getByName(serverAddr.host);
- InetAddress addrFromAddress = InetAddress.getByName(address.host);
+ String ipFromServerName = null;
+ String ipFromAddress = null;
+ String hostFromServerName = null;
+ String hostFromAddress = null;
+ boolean lookupFailed = false;
+
+ try {
+ InetAddress addrFromServerName = InetAddress.getByName(serverAddr.host);
+ ipFromServerName = addrFromServerName.getHostAddress();
+ hostFromServerName = addrFromServerName.getHostName();
+ } catch (UnknownHostException e) {
+ ipFromServerName = serverAddr.host;
+ hostFromServerName = serverAddr.host;
+ lookupFailed = true;
+ }
- if (addrFromAddress.equals(addrFromServerName)) {
+ try {
+ InetAddress addrFromAddress = InetAddress.getByName(address.host);
+ ipFromAddress = addrFromAddress.getHostAddress();
+ hostFromAddress = addrFromAddress.getHostName();
+ } catch (UnknownHostException e) {
+ ipFromAddress = address.host;
+ hostFromAddress = address.host;
+ lookupFailed = true;
+ }
+
+ if (ipFromAddress.equals(ipFromServerName) || (lookupFailed && (hostFromAddress.equals(hostFromServerName)))) {
address.scheme = serverAddr.scheme;
address.host = serverAddr.host;
- if (updatePort) {
- address.port = serverAddr.port;
- }
}
}
}
diff --git a/modules/plugins/augeas/src/main/java/org/rhq/augeas/util/Glob.java b/modules/plugins/augeas/src/main/java/org/rhq/augeas/util/Glob.java
index fddf06e..d41d2a2 100644
--- a/modules/plugins/augeas/src/main/java/org/rhq/augeas/util/Glob.java
+++ b/modules/plugins/augeas/src/main/java/org/rhq/augeas/util/Glob.java
@@ -26,6 +26,7 @@ package org.rhq.augeas.util;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import org.apache.commons.logging.Log;
@@ -129,7 +130,8 @@ public class Glob {
globPattern = new File(globPattern).getAbsolutePath();
File[] files = parentPath.listFiles(new GlobFilter(globPattern));
if (files == null) {
- throw new IllegalStateException("Could not list files in " + parentPath);
+ log.debug("Could list files in " + parentPath);
+ return Collections.emptyList();
}
return Arrays.asList(files);
}
13 years, 5 months
[rhq] modules/enterprise
by Heiko W. Rupp
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties | 528 +++++-----
1 file changed, 276 insertions(+), 252 deletions(-)
New commits:
commit 8cca4fbe407c4cde03ef1cefc5e668921b8a5fd1
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Fri Nov 26 12:02:46 2010 +0100
More translations.
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
index ff2b19e..ca4c150 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
@@ -9,14 +9,14 @@
#
# Build Info
#
-common_buildInfo_gwtVersion = ${gwt.version}~
+common_buildInfo_gwtVersion = ${gwt.version}
# Button Labels
#--------------
common_button_ack = Bestätigen
common_button_ack_all = Alle bestätigen
common_button_add = Hinzufügen
-common_button_advanced = Advanced...~
+common_button_advanced = Erweitert...
common_button_apply = Anwenden
common_button_cancel = Abbrechen
common_button_close = Schließen
@@ -24,22 +24,22 @@ common_button_compare = Vergleichen
common_button_create_child = Create Child~
common_button_delete = Löschen
common_button_delete_all = Alle Löschen
-common_button_disable = Disable~
+common_button_disable = Deaktivieren
common_button_edit = Bearbeiten
-common_button_enable = Enable~
+common_button_enable = Aktivieren
common_button_finish = Beenden
common_button_import = Importieren
common_button_new = Neu
common_button_next = Weiter
common_button_ok = OK
common_button_previous = Zurück
-common_button_purgeAll=Purge All~
+common_button_purgeAll=Alle löschen
common_button_refresh = Neu laden
common_button_reset = Zurücksetzen
common_button_save = Speichern
common_button_search = Suchen
common_button_showDetails = Details anzeigen...
-common_button_uninventory = Uninventory~
+common_button_uninventory = Aus dem Inventar löschen
# Common Labels
#------------------------
@@ -49,18 +49,18 @@ common_label_day= Tag
common_label_days=Tage
common_label_hour=Stunde
common_label_hours=Stunden
-common_label_item=item~
-common_label_items=items~
+common_label_item=Eintrag
+common_label_items=Einträge
common_label_milliseconds=Millisekunden
common_label_minutes=Minuten
common_label_month=Monat
common_label_none = keine
common_label_role = Rolle
common_label_roles = Rollen
-common_label_scheduled_operations=scheduled operations~
+common_label_scheduled_operations=Geplante Operationen
common_label_seconds=Sekunden
-common_label_selected_resources = selected resources~
-common_label_unlimited = unbeschränkt
+common_label_selected_resources = Ausgewählte Ressourcen
+# TODO common_label_unlimited = unbeschränkt
common_label_user = Benutzer
common_label_users = Benutzer
common_label_week=Woche
@@ -72,33 +72,34 @@ common_title_add_column=Spalte hinzufügen
common_title_add_portlet=Portlet hinzufügen
common_title_alert_range=Alert Range~
common_title_availability = Verfügbar
-common_title_average_metrics=Average Metrics per Minute~
+common_title_average_metrics=Dursch. Anzahl Metriken pro Minute
common_title_available_resources=Verfügbare Ressourcen
common_title_background=Hintergrund
common_title_category = Kategorie
common_title_columns=Spalten
common_title_configuration = Konfiguration
common_title_compatibleGroups = Kompatible Gruppen
-common_title_compatibleGroups_total=Compatible Group Total~
-common_title_custom=Custom~
+common_title_compatibleGroups_total=Anzahl kompatible Gruppen
+common_title_custom=Eigen
common_title_dashboard_name=Dashboard-Name
-common_title_dateCreated=Date Created~
-common_title_default=Default~
+common_title_dateCreated=Zeitpunkt d. Erzeugung
+common_title_default=Standard
common_title_description=Beschreibung
common_title_details=Details
common_title_display=Display~
-common_title_display_name=Display Name~
+common_title_display_name=Anzeigename
common_title_duration=Dauer
-common_title_edit_mode=Edit Mode~
-common_title_enabled=Enabled?~
+common_title_edit_mode=Bearbeitungsmodus
+common_title_enabled=Aktiviert?
common_title_end = Ende
common_title_favorites=Lesezeichen
-common_title_generalProp = General Properties~
-common_title_group_def_total=Group Definition Total~
-common_title_icon = icon~
-common_title_id = ID~
+common_title_generalProp = Allgemeine Eigenschaften
+common_title_group_def_total=Anzahl Gruppen-Definitionen
+common_title_icon = Ikone
+common_title_id = ID
common_title_id_parent = Parent ID~
-common_title_info = Info~
+common_title_info = Info
+common_title_help = Hilfe
common_title_host = Rechner
common_title_inventory = Inventar
common_title_inventorySummary = Inventar Zusammenfassung
@@ -108,17 +109,17 @@ common_title_mashup=Mashup~
common_title_message=Nachricht
common_title_metric = Metrik
common_title_mixedGroups = Gemischte Gruppen
-common_title_mixedGroups_total=Mixed Group Total~
+common_title_mixedGroups_total=Anzahl gemischter Gruppen
common_title_name = Name
common_title_new_dashboard=Neues Dashboard
common_title_numeric_type=Numerischer Typ
-common_title_operations=Operations~
+common_title_operations=Operationen
common_title_operations_range=Operation Range~
common_title_over=Über
common_title_password = Passwort
common_title_path = Pfad
-common_title_platform=Platform~
-common_title_platform_total=Platform Total~
+common_title_platform=Plattform
+common_title_platform_total=Anzahl Platformen
common_title_plugin = Plugin
common_title_port = Port
common_title_providers=Providers~
@@ -129,14 +130,14 @@ common_title_remove_column=Spalte löschen
common_title_repositories=Repositories~
common_title_resource = Ressource
common_title_resource_group = Ressourcen-Gruppe
-common_title_resource_inventory=Resource Inventory~
+common_title_resource_inventory=Ressourcen-spezifisces Inventar
common_title_resource_id=Resource ID~
common_title_resource_name=Ressurcen-Name
common_title_search = Suche
common_title_scheduled_operations=Geplante Operationen
common_title_selected_resources=Ausgewählte Ressourcen
-common_title_server_total=Server Total~
-common_title_service_total=Service Total~
+common_title_server_total=Anzahl Server
+common_title_service_total=Anzahl Dienste
common_title_settings=Einstellungen
common_title_show=Anzeigen
common_title_start = Start
@@ -154,15 +155,15 @@ common_title_value = Wert
common_title_version = Version
common_title_view_mode=Anzeigemodus
common_title_web_address=Webaddresse
-common_title_welcome=Wilkommen
+common_title_welcome=Willkommen
# Common Messages
#--------------
common_msg_areYouSure = Sind Sie sicher?
common_msg_deleteConfirm = Are you sure you want to delete the # selected {0}?~
-common_msg_emphasizedNotePrefix = NOTE:~
+common_msg_emphasizedNotePrefix = Achtung:
common_msg_loading = Laden...
-common_msg_noItemsToShow=No items to show~
+common_msg_noItemsToShow=Keine Einträge vorhanden
# Common Values
#--------------
@@ -195,12 +196,12 @@ common_calendar_december_short=Dez
# Record Editor
#--------------
-widget_recordEditor_title_view = View {0} [{1}]~
-widget_recordEditor_title_edit = Edit {0} [{1}]~
-widget_recordEditor_title_new = Create New {0}~
+widget_recordEditor_title_view = Anzeigen {0} [{1}]~
+widget_recordEditor_title_edit = Bearbeiten {0} [{1}]~
+widget_recordEditor_title_new = Neue {0} anlegen
# // dup in common
widget_recordEditor_label_loading = Laden...~
-widget_recordEditor_error_invalidViewPath = Invalid view path: [{0}]~
+widget_recordEditor_error_invalidViewPath = Ungültiger Anzeigepfad: [{0}]
widget_recordEditor_error_noRecords = No records were returned - expected exactly one.~
widget_recordEditor_error_multipleRecords = Multiple records were returned - expected exactly one.~
widget_recordEditor_info_recordCreatedConcise = {0} angelegt.
@@ -209,15 +210,15 @@ widget_recordEditor_info_recordUpdatedConcise = {0} aktualisiert.
widget_recordEditor_info_recordUpdatedDetailed = {0} [{1}] aktualisiert.
widget_recordEditor_info_recordsDeletedConcise = {0} {1} gelöscht.
widget_recordEditor_info_recordsDeletedDetailed = {0} {1} gelöscht: {2}.
-widget_recordEditor_error_unsupportedOperationType = Unsupported operation type: [{0}]~
+widget_recordEditor_error_unsupportedOperationType = Der Typ [{0}] der Operation wird nicht unterstützt
# Resource Selector/Picker
#--------------------------------
widget_resourceSelector_selectResource=Wählen Sie eine Ressource aus
widget_resourceSelector_pleaseSelectResource=Bitte wählen sie eine Ressource aus
-widget_resourceSelector_selectMultipleResources=Select Resources~
+widget_resourceSelector_selectMultipleResources=Wählen sie Ressourcen aus
widget_resourceSelector_pleaseSelectMultipleResource=Bitte wählen Sie eine oder merere Ressourcen aus
-widget_resourceSelector_groupCategory=Group Category~
+widget_resourceSelector_groupCategory=Kategorie der Gruppe
# Resource Factory Wizard
#--------------------------------
@@ -267,12 +268,12 @@ util_userPerm_loadFailResource = Failed to load your permissions for Resource wi
# User Session Manager
#--------------------------
-util_userSession_loadFailSubject = UserSessionManager: Failed to load user Subject~
-util_userSession_logoutFail = Failed to logout.~
+util_userSession_loadFailSubject = UserSessionManager: Konnte das 'Subject' des Benutzers nicht laden.
+util_userSession_logoutFail = Ausloggen fehlgeschlagen
# Error Handler
#--------------------
-util_errorHandler_nullException = exception was null~
+util_errorHandler_nullException = exception war null
# Widgets Field
#---------------------
@@ -286,8 +287,8 @@ util_widgetsField_unlimited = Unbeschränkt
dataSource_rpc_error_transformRequestFailure = Failure in datasource while processing {0} request.~
dataSource_rpc_error_unsupportedArrayFilterType = No support for passing array filters of type {0}.~
dataSource_rpc_error_unsupportedEnumType = Please add an appropriate code block for enum {0} to RPCDataSource.getEnumArray(Class)~
-dataSource_rpc_yes = yes~
-dataSource_rpc_no = no~
+dataSource_rpc_yes = ja
+dataSource_rpc_no = nein
# ContentRepositoryTree
#------
@@ -302,44 +303,44 @@ dataSource_users_field_id = ID
dataSource_users_field_name = Benutzername
dataSource_users_field_ldap = LDAP Login?
dataSource_users_field_password = Passwort
-dataSource_users_field_passwordVerify = Verify Password~
+dataSource_users_field_passwordVerify = Passwort überprüfen
dataSource_users_field_firstName = Vorname~
dataSource_users_field_lastName = Nachname~
dataSource_users_field_emailAddress = E-Mail-Addresse
dataSource_users_field_phoneNumber = Telefonnummer
dataSource_users_field_department = Abteilung
-dataSource_users_field_factive = Darf sich einloggen?~
+dataSource_users_field_factive = Darf sich einloggen?
# Platforms
#------
dataSource_platforms_field_cpu=CPU~
-dataSource_platforms_field_memory=Memory~
-dataSource_platforms_field_swap=Swap~
+dataSource_platforms_field_memory=Speicher
+dataSource_platforms_field_swap=Swap
# Traits
#------
dataSource_traits_field_primaryKey=Primärschlüssel
dataSource_traits_field_definitionID=Definition ID~
-dataSource_traits_field_lastChanged=Last Changed~
-dataSource_traits_field_trait=Trait~
-dataSource_traits_group_field_groupId=Group ID~
-dataSource_traits_group_field_memberResource=Member Resource~
+dataSource_traits_field_lastChanged=Zuletzt geändert
+dataSource_traits_field_trait=Trait
+dataSource_traits_group_field_groupId=Gruppen-ID
+dataSource_traits_group_field_memberResource=Mitglieds-Ressource
# Measurement OOBs
#---------------------------------
dataSource_measurementOob_field_scheduleName = Metrik
dataSource_measurementOob_field_resourceName = Ressource
dataSource_measurementOob_field_parentName = Parent~
-dataSource_measurementOob_field_formattedBaseband = Band~
-dataSource_measurementOob_field_formattedOutlier = Ausreisser
-dataSource_measurementOob_field_factor = Out of Range Factor (%)~
-dataSource_measurementOob_error_fetchFailure = Failed to load measurement OOB information~
+dataSource_measurementOob_field_formattedBaseband = Band
+dataSource_measurementOob_field_formattedOutlier = Ausreißer
+dataSource_measurementOob_field_factor = Ausreißer-Faktor (%)
+dataSource_measurementOob_error_fetchFailure = Konnte die Informationen über Ausreißer nicht laden
# Measurements
#----------------------
dataSource_definitions_loadFailed = Failed to load metric definitions~
dataSource_schedules_loadFailed = Failed to load metric schedules~
-dataSource_schedules_field_resourceGroupId = Group ID~
+dataSource_schedules_field_resourceGroupId = Gruppen-ID
dataSource_schedules_enableFailure_resource=Failed to enable the collection of [{0}] metrics for resource with ID [{1}]. The metrics were: [{2}]~
dataSource_schedules_enableFailure_group=Failed to enable the collection of [{0}] metrics for group with ID [{1}]. The metrics were: [{2}]~
@@ -367,30 +368,30 @@ dataSource_schedules_updateSuccessful_full_group=A new collection interval of [{
#------------------------------
dataSource_problemResources_field_resource = Ressource
dataSource_problemResources_field_location = Ort
-dataSource_problemResources_field_alerts = Alerts~
+dataSource_problemResources_field_alerts = Alarme
dataSource_problemResources_field_available = Aktuelle Verfügbarkeit
-dataSource_problemResources_error_fetchFailure = Failed to load Resources with alerts/unavailability.~
+dataSource_problemResources_error_fetchFailure = Konnte die Liste der Ressourcen mit Alarmen oder unverfügbarkeit nicht laden.
# Recent Operations
#----------------------------
dataSource_recentOperations_field_resource = Ressource
dataSource_recentOperations_field_location = ort
-dataSource_recentOperations_field_operation = Operation~
-dataSource_recentOperations_field_time = Date/Time~
+dataSource_recentOperations_field_operation = Operation
+dataSource_recentOperations_field_time = Zeitpunkt
dataSource_recentOperations_field_status = Status
-dataSource_recentOperations_error_fetchFailure = Failed to load recently completed operations.
+dataSource_recentOperations_error_fetchFailure = Konnte die Liste der kürzlich vollendeten Operationen nicht laden.
# Scheduled Operations
#---------------------------------
dataSource_scheduledOperations_field_resource = Ressource
dataSource_scheduledOperations_field_location = Ort
-dataSource_scheduledOperations_field_operation = Operation~
-dataSource_scheduledOperations_field_time = Date/Time~
-dataSource_scheduledOperations_error_fetchFailure = Failed to load scheduled operations.
+dataSource_scheduledOperations_field_operation = Operation
+dataSource_scheduledOperations_field_time = Zeitpunkt
+dataSource_scheduledOperations_error_fetchFailure = Konnte die Liste der geplanten Operationen nicht laden.
# Operation History
#---------------------------
-dataSource_operationHistory_error_fetchFailure = Failure loading operation histories.~
+dataSource_operationHistory_error_fetchFailure = Konnte den Verlauf der Operationen nicht laden.
# Configuration History
#-------------------------------
@@ -398,16 +399,16 @@ dataSource_configurationHistory_field_id = ID~
dataSource_configurationHistory_field_resource = Ressource
dataSource_configurationHistory_field_createdTime = Angelegt
dataSource_configurationHistory_field_status = Status
-dataSource_configurationHistory_field_subject = Subject~
-dataSource_configurationHistory_error_fetchFailure = Unable to load configuration history.~
+dataSource_configurationHistory_field_subject = Benutzer
+dataSource_configurationHistory_error_fetchFailure = Konnte den Verlauf der Ressourcen-Konfiguration nicht laden.
# Resource Errors
#-------------------------
-dataSource_resourceErrors_field_summary = Summary~
-dataSource_resourceErrors_field_detail = Detailed Message~
-dataSource_resourceErrors_field_errorType = Error Type~
-dataSource_resourceErrors_field_timeOccured = Time~
-dataSource_resourceErrors_error_fetchFailure = Failed to find Resource errors for Resource with id [{0}].~
+dataSource_resourceErrors_field_summary = Zsuammenfassung
+dataSource_resourceErrors_field_detail = Detailierte Nachricht
+dataSource_resourceErrors_field_errorType = Fehlertyp
+dataSource_resourceErrors_field_timeOccured = Zeitpunkt
+dataSource_resourceErrors_error_fetchFailure = Konnte die spezifischen Fehler für die Ressource mit id [{0}] nicht laden.
#********************************** VIEW-SPECIFIC *************************************
@@ -415,10 +416,10 @@ dataSource_resourceErrors_error_fetchFailure = Failed to find Resource errors fo
#================= Administration ==================
view_admin_administration = Verwaltung
-view_admin_landing = From this section, the RHQ global settings can be administered. This includes configuring Security, setting up Plugins, and managing RHQ servers and agents.~
-view_admin_configuration = Configuration~
+view_admin_landing = In dieser Sektion können die globalen Einstellungen für RHQ verwaltet werden. Dies schließt Sicherheitseinstellungen und Plugins ein, sowie die Verwaltung der RHQ Server- und Agentplugins.
+view_admin_configuration = Konfiguration
view_admin_security = Sicherheit
-view_admin_topology = Topology~
+view_admin_topology = Topologie
view_adminSecurity_users = Benutzer
view_adminSecurity_roles = Rollen
@@ -426,12 +427,12 @@ view_adminSecurity_roles = Rollen
view_adminTopology_affinityGroups = Affinity Groups~
view_adminTopology_agents = Agenten
view_adminTopology_partitionEvents = Partition Events~
-view_adminTopology_remoteAgentInstall = Remote Agent Install~
-view_adminTopology_servers = Servers~
+view_adminTopology_remoteAgentInstall = Installation entfernter Agenten
+view_adminTopology_servers = Server
-view_adminConfig_downloads = Downloads~
-view_adminConfig_license = License~
-view_adminConfig_plugins = Plugins~
+view_adminConfig_downloads = Downloads
+view_adminConfig_license = Lizenz
+view_adminConfig_plugins = Plugins
view_adminConfig_systemSettings = Systemeinstellungen
view_adminConfig_templates = Templates~
@@ -453,18 +454,18 @@ view_adminRoles_failLdapGroups = Failed to retrieve available LDAP groups - assu
view_adminRoles_failLdapGroupsRole = Failed to load LDAP groups available for role.~
view_adminRoles_failRoles = Failed to fetch roles.~
view_adminRoles_globalPerms = Global Permissions~
-view_adminRoles_ldapGroups = LDAP Groups~
+view_adminRoles_ldapGroups = LDAP-Gruppen
view_adminRoles_ldapGroupsReadOnly = LDAP group data is read only~
-view_adminRoles_noItems = No items to show~
+view_adminRoles_noItems = Keine Einträge vorhanden
view_adminRoles_noLdap = The LDAP security integration is not configured. To configure LDAP go to <a {0}>{1}</a>.~
view_adminRoles_perms = Permissions~
view_adminRoles_resourcePerms = Resource Permissions~
view_adminRoles_roleAdded = Rolle [{0}] hinzugefügt
-view_adminRoles_roleExists = A role named [{0}] already exists.~
-view_adminRoles_roleDeleteFailed = Failed to delete role [{0}].~
-view_adminRoles_roleDeleted = Role [{0}] deleted.~
-view_adminRoles_roleUpdateFailed = Failed to update role [{0}].~
-view_adminRoles_roleUpdated = Role [{0}] updated.~
+view_adminRoles_roleExists = Eine Rolle mit Namen [{0}] existiert bereits.
+view_adminRoles_roleDeleteFailed = Konnte die Rolle [{0}] nicht löschen.
+view_adminRoles_roleDeleted = Rolle [{0}] gelöscht.
+view_adminRoles_roleUpdateFailed = Konnte die Rolle [{0}] nicht aktualisieren.
+view_adminRoles_roleUpdated = Rolle [{0}] aktualisiert.
# Administration/Topology/RemoteAgentInstall/#
#--------------------------------
@@ -475,25 +476,25 @@ view_remoteAgentInstall_buttonFindAgent = Find Agent~
view_remoteAgentInstall_error_1 = Error occurred while trying to find agent install path~
view_remoteAgentInstall_error_2 = Could not find an agent installed when looking in common locations
view_remoteAgentInstall_error_3 = Could not find an agent installed at or under [{0}]
-view_remoteAgentInstall_error_4 = Failed to install agent~
-view_remoteAgentInstall_error_5 = Failed to start agent~
-view_remoteAgentInstall_error_6 = Failed to stop agent~
+view_remoteAgentInstall_error_4 = Konnte den Agent nicht installieren
+view_remoteAgentInstall_error_5 = Konnte den Agent nicht starten
+view_remoteAgentInstall_error_6 = Konnte den Agent nicht stoppen
-view_remoteAgentInstall_installAgent = Install Agent~
+view_remoteAgentInstall_installAgent = Agent installieren
view_remoteAgentInstall_installInfo = Agent Installation Information~
view_remoteAgentInstall_installPath = Agent Install Path~
-view_remoteAgentInstall_owner = Owner~
+view_remoteAgentInstall_owner = Eigentümer
view_remoteAgentInstall_promptInstallPath = Where the agent is or will be installed. If you aren''t sure where an agent is installed, enter a parent directory and click the ''Find Agent'' button to scan that directory and below. If you enter an empty path, common locations are searched on the host for an agent install.~
view_remoteAgentInstall_promptHost = The host where the agent is or will be installed~
view_remoteAgentInstall_promptPassword =The credentials that are used to authenticate the user on the host via SSH~
view_remoteAgentInstall_promptPort = The port the SSH server is listening to. If not specified, the default is 22~
view_remoteAgentInstall_promptUser = The name of the user whose credentials are passed to the host via SSH~
-view_remoteAgentInstall_result = Result~
+view_remoteAgentInstall_result = Resultat
view_remoteAgentInstall_resultCode = ResultCode~
-view_remoteAgentInstall_startAgent = Start Agent~
+view_remoteAgentInstall_startAgent = Agent starten
view_remoteAgentInstall_startAgentResults = Agent start results: [{0}]~
-view_remoteAgentInstall_step = Step~
-view_remoteAgentInstall_stopAgent = Stop Agent~
+view_remoteAgentInstall_step = Schritt
+view_remoteAgentInstall_stopAgent = Agent anhalten
view_remoteAgentInstall_stopAgentResults = Agent stop results: [{0}]~
view_remoteAgentInstall_success = Agent installation complete~
view_remoteAgentInstall_updateStatus = Update Status~
@@ -501,24 +502,24 @@ view_remoteAgentInstall_updateStatus = Update Status~
#==================== Alerts ======================
view_alerts_table_title_group=Group Alert History~
view_alerts_table_title_resource=Resource Alert History~
-view_alerts_table_filter_priority=Priority Filter~
-view_alerts_field_created_time=Creation Time~
-view_alerts_field_modified_time=Modified Time~
-view_alerts_field_enabled=Enabled~
-view_alerts_field_ack_time=Ack Time~
-view_alerts_field_ack_subject=Ack Subject~
-view_alerts_field_ack_status=Status~
-view_alerts_field_ack_status_empty=Not Yet Acknowledged~
-view_alerts_field_ack_status_filled={0} acknowledged on {1}~
-view_alerts_field_name=Name~
-view_alerts_field_condition_text=Condition Text~
+view_alerts_table_filter_priority=Filter nach Priorität
+view_alerts_field_created_time=Erstellungszeitpunkt
+view_alerts_field_modified_time=Zuletzt geändert
+view_alerts_field_enabled=Aktiviert
+view_alerts_field_ack_time=Zeitpunkt Bestätigung
+view_alerts_field_ack_subject=Bestätigender benutzer
+view_alerts_field_ack_status=Status
+view_alerts_field_ack_status_empty=Noch nicht bestätigt
+view_alerts_field_ack_status_filled={0} bestätigt am {1}
+view_alerts_field_name=Name
+view_alerts_field_condition_text=Bedingung(en)
view_alerts_field_condition_text_none=No Conditions~
view_alerts_field_condition_text_many=Multiple Conditions~
view_alerts_field_condition_value=Condition Value~
-view_alerts_field_resource=Resource~
-view_alerts_field_priority=Priority~
+view_alerts_field_resource=Ressource
+view_alerts_field_priority=Priorität
view_alerts_field_parent=Parent~
-view_alerts_field_protected=Protected~
+view_alerts_field_protected=Geschützt
view_alerts_field_protected_tooltip=If true, this definition is protected from being changed by the parent definition. In other words, the parent definition settings will not override this definition.~
view_alerts_loadFailed=Failed to fetch alerts data~
view_alerts_delete_confirm=Delete the selected alert(s)?~
@@ -526,15 +527,15 @@ view_alerts_delete_confirm_all=Delete all alerts from this source?~
view_alerts_delete_success=Successfully deleted {0} alerts~
view_alerts_delete_failure=Failed to delete alerts with id''s: {0}~
view_alerts_delete_failure_all=Failed to delete all alerts from this source~
-view_alerts_ack_confirm=Ack the selected alert(s)?~
-view_alerts_ack_confirm_all=Ack all alerts from this source?~
+view_alerts_ack_confirm=Die ausgewählten Alarme bestätigen?
+view_alerts_ack_confirm_all=Alle Alarme dieser Quelle bestätigen?
view_alerts_ack_success=Successfully acknowledged {0} alerts~
view_alerts_ack_failure=Failed to acknowledge alerts with id''s: {0}~
view_alerts_ack_failure_all=Failed to acknowledge all alerts from this source~
view_alert_details_loadFailed=Failed to fetch alert details~
-view_alert_details_breadcrumb=Details~
-view_alert_details_field_ack_by=Acknowledged by~
-view_alert_details_field_ack_at=Acknowledged at~
+view_alert_details_breadcrumb=Details
+view_alert_details_field_ack_by=Bestätigt durch
+view_alert_details_field_ack_at=Bestätigt um
view_alert_details_field_recovery_info=Recovery Info~
view_alert_definition_for_type=View Template~
view_alert_definition_for_group=View Group Definition~
@@ -556,7 +557,7 @@ view_alert_definitions_create_failure=Alert definition creation failed~
view_alert_definitions_update_success=Alert definition successfully updated~
view_alert_definitions_update_failure=Alert definition update failed~
view_alert_definition_condition_editor_option_label=Condition Type~
-view_alert_definition_condition_editor_option_availability=Availability Change~
+view_alert_definition_condition_editor_option_availability=Änderung der Verfügbarkeit
view_alert_definition_condition_editor_option_metric_threshold=Measurement Absolute Value Threshold~
view_alert_definition_condition_editor_option_metric_baseline=Measurement Baseline Threshold~
view_alert_definition_condition_editor_option_metric_change=Measurement Value Change~
@@ -567,18 +568,18 @@ view_alert_definition_condition_editor_option_operation=Operation Execution~
view_alert_definition_condition_editor_option_resource_configuration=Resource Configuration Change~
view_alert_definition_condition_editor_option_event=Event Detection~
view_alert_definition_condition_editor_avilability_tooltip=Specify the availability state change that will trigger the condition.~
-view_alert_definition_condition_editor_avilability_value=Availability~
-view_alert_definition_condition_editor_avilability_option_up=Comes up~
-view_alert_definition_condition_editor_avilability_option_down=Goes down~
+view_alert_definition_condition_editor_avilability_value=Verfügbarkeit~
+view_alert_definition_condition_editor_avilability_option_up=Wird verfügbar
+view_alert_definition_condition_editor_avilability_option_down=Wird unverfügbar
view_alert_definition_condition_editor_metric_common_definition_not_found=Should have found metric definition - something is wrong~
view_alert_definition_condition_editor_metric_threshold_tooltip=Specify the threshold value that, when violated, triggers the condition. The value you specify is an absolute value with an optional units specifier.~
-view_alert_definition_condition_editor_metric_threshold_name=Metric~
+view_alert_definition_condition_editor_metric_threshold_name=Metrik
view_alert_definition_condition_editor_metric_threshold_value=Metric Value~
view_alert_definition_condition_editor_metric_threshold_value_tooltip=The threshold value of the metric that will trigger the condition when compared using the selected comparator.~
view_alert_definition_condition_editor_metric_threshold_comparator=Comparator~
-view_alert_definition_condition_editor_metric_threshold_comparator_less=Less than~
-view_alert_definition_condition_editor_metric_threshold_comparator_equal=Equal to~
-view_alert_definition_condition_editor_metric_threshold_comparator_greater=Greater Than~
+view_alert_definition_condition_editor_metric_threshold_comparator_less=Kleiner als
+view_alert_definition_condition_editor_metric_threshold_comparator_equal=Gleich
+view_alert_definition_condition_editor_metric_threshold_comparator_greater=Größer als
view_alert_definition_condition_editor_metric_threshold_comparator_tooltip=How a collected metric value should be compared to the given threshold value~
view_alert_definition_condition_editor_metric_baseline_tooltip=Specify the baseline value that must be violated to trigger the condition. The value you specify is a percentage of the given baseline value.~
view_alert_definition_condition_editor_metric_baseline_percentage=Baseline Percentage~
@@ -604,47 +605,47 @@ view_alert_definition_condition_editor_metric_calltime_change_percentage_tooltip
view_alert_definition_condition_editor_metric_trait_change_tooltip=Specify the trait whose value must change to trigger the condition.~
view_alert_definition_condition_editor_metric_trait_change_value=Trait~
view_alert_definition_condition_editor_operation_tooltip=Specify the result that must occur when the selected operation is executed in order to trigger the condition.~
-view_alert_definition_condition_editor_operation_value=Operation~
-view_alert_definition_condition_editor_operation_status=Operation Status~
-view_alert_definition_condition_editor_operation_status_inprogress=In Progress~
-view_alert_definition_condition_editor_operation_status_success=Success~
-view_alert_definition_condition_editor_operation_status_failure=Failure~
-view_alert_definition_condition_editor_operation_status_canceled=Canceled~
+view_alert_definition_condition_editor_operation_value=Operation
+view_alert_definition_condition_editor_operation_status=Zustand der Operation
+view_alert_definition_condition_editor_operation_status_inprogress=In Ausführung
+view_alert_definition_condition_editor_operation_status_success=Erfolg
+view_alert_definition_condition_editor_operation_status_failure=Fehler
+view_alert_definition_condition_editor_operation_status_canceled=Abgebrochen
view_alert_definition_condition_editor_resource_configuration_tooltip=This condition is triggered when the resource configuration changes.~
view_alert_definition_condition_editor_event_tooltip=Specify the event severity that an event message must be reported with in order to trigger this condition. If you specify an optional regular expression, the event message must also match that regular expression in order for the condition to trigger.~
-view_alert_definition_condition_editor_event_severity=Event Severity~
-view_alert_definition_condition_editor_event_severity_debug=Debug~
-view_alert_definition_condition_editor_event_severity_info=Info~
-view_alert_definition_condition_editor_event_severity_warn=Warn~
-view_alert_definition_condition_editor_event_severity_error=Error~
-view_alert_definition_condition_editor_event_severity_fatal=Fatal~
-view_alert_definition_condition_editor_event_regex=Regular Expression~
+view_alert_definition_condition_editor_event_severity=Schwere des Ereignisses
+view_alert_definition_condition_editor_event_severity_debug=Debug
+view_alert_definition_condition_editor_event_severity_info=Info
+view_alert_definition_condition_editor_event_severity_warn=Warn
+view_alert_definition_condition_editor_event_severity_error=Error
+view_alert_definition_condition_editor_event_severity_fatal=Fatal
+view_alert_definition_condition_editor_event_regex=Regulärer Ausdruck
view_alert_definition_condition_editor_event_regex_tooltip=If specified, this is a regular expression that must match a collected event message in order to trigger the condition.~
view_alert_definition_condition_editor_common_min=Minimum
view_alert_definition_condition_editor_common_avg=Durchschnitt
view_alert_definition_condition_editor_common_max=Maximum
-view_alert_definition_notification_editor_title_add=Add Notification~
-view_alert_definition_notification_editor_title_edit=Edit Notification~
+view_alert_definition_notification_editor_title_add=Benachrichtigung hinzufügen
+view_alert_definition_notification_editor_title_edit=Benachrichtigung bearbeiten
view_alert_definition_notification_editor_sender=Notification Sender~
view_alert_definition_notification_editor_none_available=No alert senders available~
view_alert_definition_notification_editor_loadFailed=Cannot get alert senders~
view_alert_definition_notification_editor_loadFailed_single=Cannot get alert sender configuration definition~
view_alert_definition_notification_editor_saveFailed=Cannot save the notification configuration~
view_alert_definition_notification_editor_field_sender=Sender~
-view_alert_definition_notification_editor_field_configuration=Configuration~
-view_alert_definition_notification_editor_field_configuration_not_loaded=Unknown~
+view_alert_definition_notification_editor_field_configuration=Konfiguration
+view_alert_definition_notification_editor_field_configuration_not_loaded=Unbekannt
view_alert_definition_notification_editor_field_configuration_loadFailed=Failed to get notification configuration preview~
view_alert_definition_notification_editor_delete_confirm=Are you sure you want to delete the selected alert notifications?~
view_alert_definition_notification_operation_editor_mode_title=Resource Selection Mode~
-view_alert_definition_notification_operation_editor_mode_this=This Resource~
-view_alert_definition_notification_operation_editor_mode_specific=Specific Resource~
-view_alert_definition_notification_operation_editor_mode_relative=Relative Resource~
+view_alert_definition_notification_operation_editor_mode_this=Diese Ressource
+view_alert_definition_notification_operation_editor_mode_specific=Spezifische Ressource
+view_alert_definition_notification_operation_editor_mode_relative=Relative Ressource
view_alert_definition_notification_operation_editor_mode_unknown=UNKNOWN OPTION - THIS IS A BUG~
-view_alert_definition_notification_operation_editor_common_operation=Operation~
-view_alert_definition_notification_operation_editor_specific_resource=Resource~
-view_alert_definition_notification_operation_editor_specific_pick_button=Pick~
-view_alert_definition_notification_operation_editor_specific_pick_text=Pick a resource...~
-view_alert_definition_notification_operation_editor_specific_pick_error_invalid=Please pick a resource~
+view_alert_definition_notification_operation_editor_common_operation=Operation
+view_alert_definition_notification_operation_editor_specific_resource=Ressource
+view_alert_definition_notification_operation_editor_specific_pick_button=Auswählen
+view_alert_definition_notification_operation_editor_specific_pick_text=Ressource auswählen...
+view_alert_definition_notification_operation_editor_specific_pick_error_invalid=Bitte wählen Sie eine Ressource aus...
view_alert_definition_notification_operation_editor_specific_pick_error_no_operation=Please pick a resource that has one or more operations~
view_alert_definition_notification_operation_editor_relative_ancestor=Start Search From~
view_alert_definition_notification_operation_editor_relative_ancestor_tooltip=Select the top of the type hierarchy from which to search its descedant tree for the Filter By type~
@@ -668,16 +669,16 @@ view_alert_definition_recovery_editor_recovery_alert=Recover Alert~
view_alert_definition_recovery_editor_recovery_alert_tooltip=The target alert that will be recovered (i.e. re-enabled) after this alert triggers. Do not select an alert here if you are not defining a recovery alert.~
view_alert_definition_recovery_editor_loadFailed=Cannot build recovery menu~
view_alert_definition_recovery_editor_none_available=None~
-view_alert_common_tab_general=General Properties~
-view_alert_common_tab_conditions=Conditions~
-view_alert_common_tab_conditions_modal_title=Add Condition~
-view_alert_common_tab_conditions_expression=Fire alert when~
+view_alert_common_tab_general=Allgemeine Eigenschaften
+view_alert_common_tab_conditions=Bedingungen
+view_alert_common_tab_conditions_modal_title=Bedingung hinzufügen
+view_alert_common_tab_conditions_expression=Alarm auslösen wenn
view_alert_common_tab_conditions_expression_tooltip=Determines if ANY or ALL of the conditions must evaluate to true in order for the entire condition set to be considered true.~
-view_alert_common_tab_conditions_text=Condition~
-view_alert_common_tab_conditions_value=Value~
-view_alert_common_tab_conditions_type_availability=Availability Change~
-view_alert_common_tab_conditions_type_availability_down=Went down~
-view_alert_common_tab_conditions_type_availability_up=Came up~
+view_alert_common_tab_conditions_text=Bedingung
+view_alert_common_tab_conditions_value=Wert
+view_alert_common_tab_conditions_type_availability=Änderung der Verfügbarkeit
+view_alert_common_tab_conditions_type_availability_down=Wurde unverfügbar
+view_alert_common_tab_conditions_type_availability_up=Wurde wieder verfügbar
view_alert_common_tab_conditions_type_metric_threshold=Metric Value Exceeds Threshold~
view_alert_common_tab_conditions_type_metric_calltime_threshold=Call Time Value Exceeds Threshold~
view_alert_common_tab_conditions_type_metric_calltime_destination=with call destination matching~
@@ -703,7 +704,7 @@ view_alert_common_tab_notifications_status=Status
view_alert_common_tab_notifications_message=Nachricht
view_alert_common_tab_notifications_all_emails=Alle E-Mmails
view_alert_common_tab_notifications_bad_emails=Bad Emails~
-view_alert_common_tab_dampening=Dampening~
+view_alert_common_tab_dampening=Dämpfung
view_alert_common_tab_dampening_category_none=Keine
view_alert_common_tab_dampening_category_none_tooltip=Dampening is disabled. Every time the condition set is true, an alert will be triggered.~
view_alert_common_tab_dampening_category_consecutive_count=Consecutive~
@@ -725,27 +726,27 @@ view_alert_common_tab_dampening_duration_period_label_tooltip=The time span in w
view_alert_common_tab_recovery=Recovery~
view_alert_common_tab_invalid_condition_category=Invalid condition category - please report this as a bug: {0}~
view_alert_common_tab_invalid_dampening_category=Invalid dampening category - please report this as a bug: {0}~
-view_alert_common_tab_invalid_time_units=Invalid time units - please report this as a bug: {0}~
+view_alert_common_tab_invalid_time_units=Ungültige Zeiteinheit - bitte berichten Sie diesen Fehler: {0}
# Auto Discovery Queue
#----------------------------
-view_autoDiscoveryQ_title=Autodiscovery Queue~
-view_autoDiscoveryQ_import=Import~
-view_autoDiscoveryQ_ignore=Ignore~
-view_autoDiscoveryQ_ignored=Ignored~
-view_autoDiscoveryQ_unignore=Unignore~
+view_autoDiscoveryQ_title=Autodiscovery-Warteschlange
+view_autoDiscoveryQ_import=Importieren
+view_autoDiscoveryQ_ignore=Ignorieren
+view_autoDiscoveryQ_ignored=Ignoriert
+view_autoDiscoveryQ_unignore=Ignorieren aufheben
view_autoDiscoveryQ_new=Neu
-view_autoDiscoveryQ_newAndIgnored=Neu und Ignored~
-view_autoDiscoveryQ_importFailure=Failed to import resources~
+view_autoDiscoveryQ_newAndIgnored=Neu und Ignoriert
+view_autoDiscoveryQ_importFailure=Konnte die Ressourcen nicht importieren
view_autoDiscoveryQ_importSuccessful=You have successfully imported the selected resources.~
view_autoDiscoveryQ_ignoreFailure=Failed to ignore resources~
view_autoDiscoveryQ_ignoreSuccessful=You have successfully ignored the selected resources.~
view_autoDiscoveryQ_unignoreFailure=Failed to unignore resources~
view_autoDiscoveryQ_unignoreSuccessful=You have successfully unignored the selected resources.~
view_autoDiscoveryQ_noperm=(Required manage inventory permissions missing. See Administrator to change)~
-view_autoDiscoveryQ_noItems=No items to show~
+view_autoDiscoveryQ_noItems=Keine Einträge gefunden
view_autoDiscoveryQ_field_parentId=Parent ID~
-view_autoDiscoveryQ_field_name=Resource Name~
+view_autoDiscoveryQ_field_name=Ressourcen-Name
view_autoDiscoveryQ_field_key=Resource Key~
view_autoDiscoveryQ_field_discoveryTime=Discovery Time~
view_autoDiscoveryQ_field_inventoryStatus=Inventory Status~
@@ -754,30 +755,30 @@ view_autoDiscoveryQ_loadFailure=Failed to load the inventory discovery queue~
#==================== Bundles ======================
# some common bundle terms
-view_bundle_bundle = Bundle~
-view_bundle_bundles = Bundles~
-view_bundle_bundleDestinations=Bundle Destinations~
+view_bundle_bundle = Bundle
+view_bundle_bundles = Bundles
+view_bundle_bundleDestinations=Bundle-Ziele
view_bundle_bundleDeployment=Bundle Deployment~
view_bundle_bundleDeployments=Bundle Deployments~
-view_bundle_bundleFiles=Bundle Files~
-view_bundle_bundleType=Bundle Type~
-view_bundle_bundleVersion=Bundle Version~
-view_bundle_bundleVersions=Bundle Versions~
-view_bundle_deploy=Deploy~
-view_bundle_deployed=Deployed~
-view_bundle_deployDir=Deploy Directory~
+view_bundle_bundleFiles=Bundle-Dateien
+view_bundle_bundleType=Bundle-Type
+view_bundle_bundleVersion=Bundle-Version
+view_bundle_bundleVersions=Bundle-Versionen
+view_bundle_deploy=Deploy
+view_bundle_deployed=Deployed
+view_bundle_deployDir=Deploy-Verzeichnis
view_bundle_deployments=Deployments~
-view_bundle_destinations=Destinations~
-view_bundle_files=Files~
-view_bundle_latestVersion=Latest Version~
+view_bundle_destinations=Ziele
+view_bundle_files=Dateien
+view_bundle_latestVersion=Aktuelle Version
view_bundle_recipe=Recipe~
view_bundle_revert=Revert~
-view_bundle_versions=Versions~
+view_bundle_versions=Versionen
# individual bundle views/wizards
view_bundle_fileListView_fileSize=Dateigröße
view_bundle_fileListView_loadFailure=Failed to load bundle file data~
-view_bundle_version_backToBundle=Back to Bundle~
+view_bundle_version_backToBundle=Zurück zum Bundle
view_bundle_version_bundleVersionTagUpdateFailure=Failed to update bundle version tags~
view_bundle_version_bundleVersionTagUpdateSuccessful=You have successfully updated the bundle version tags~
view_bundle_version_loadFailure=Failed to load bundle version~
@@ -816,16 +817,16 @@ view_bundle_list_deleteFailure=Failed to delete the bundle [{0}]~
view_bundle_list_deleteSuccessful=You successfully deleted the bundle named [{0}]~
view_bundle_list_error1=Failed to load bundle to deploy [{0}]~
view_bundle_list_error2=Failed to get a single bundle to deploy [{0}]~
-view_bundle_list_error3=Failed to load bundle~
+view_bundle_list_error3=Konnte das Bundle nicht laden
view_bundle_dest_group=Gruppe
view_bundle_dest_created=Angelegt
-view_bundle_dest_deployDir=Deploy Directory~
+view_bundle_dest_deployDir=Deploy-Verzeichnis
view_bundle_dest_lastDeployedVersion=Last Deployed Version~
view_bundle_dest_lastDeploymentDate=Last Deployment Date~
view_bundle_dest_lastDeploymentStatus=Last Deployment Status~
view_bundle_dest_loadFailure=Failed to load bundle destinations~
view_bundle_dest_loadFailureVersionInfo=Failed to load bundle destination deployed version information~
-view_bundle_dest_backToBundle=Back to Bundle~
+view_bundle_dest_backToBundle=Zurück zum Bundle
view_bundle_dest_tagUpdateFailure=Failed to update bundle destination tags~
view_bundle_dest_tagUpdateSuccessful=You have successfully updated the bundle destination tags~
view_bundle_resDeployDS_loadFailure=Failed to load bundle resource deployments~
@@ -911,7 +912,7 @@ view_bundle_deployWizard_title = Bundle Deployment Wizard~
view_configCompare_comparingConfigs = Comparing Configurations~
view_configCompare_configCompare = Configuration Comparison~
-view_configEdit_addItem = Add Item to List~
+view_configEdit_addItem = Eintrag zur Liste hinzufügen
view_configEdit_confirm_1 = Are you sure you want to delete the selected properties from the set?~
view_configEdit_confirm_2 = Are you sure you want to delete this row?~
view_configEdit_confirm_3 = Are you sure you want to delete the [{0}] selected [{1}]?~
@@ -922,7 +923,7 @@ view_configEdit_error_2 = Connection settings are not supported by this Resource
view_configEdit_error_3 = Cannot add property named [{0}]. The property name is already used in the set.~
view_configEdit_files = Dateien
view_configEdit_hideAll= Alle verbergen
-view_configEdit_jumpToSection = Jump to Section~
+view_configEdit_jumpToSection = Zum Abschnitt springen
view_configEdit_msg_1 = Added property [{0}] to the set.~
view_configEdit_msg_2 = Removed properties from the set.~
view_configEdit_msg_3 = [{0} {1}] deleted from list.~
@@ -956,7 +957,7 @@ view_selector_available = Verfügbar {0}
view_subTab_error_disabled = Cannot select disabled subTab [{0}].~
-view_table_totalRows = Total Rows: {0} Selected: {1}~
+view_table_totalRows = Anzahl Einträge: {0} Ausgewählt: {1}
view_tableSection_backButton = Zurück zur Liste
view_tableSection_error_noId = Table [{0}] record is missing 'id' attribute - please report this bug.~
view_tableSection_error_badId = Can not show detail for [{0}]. Illegal 'id': [{1}]. Please report this bug~
@@ -1010,24 +1011,24 @@ view_tabs_invalidTab = Ungültiger Reiter: {0}~
view_dashboard_favorites_error1=Failed to load favorite Resources.~
view_dashboardManager_error=Failed to save dashboard to server~
view_dashboardManager_saved=Saved dashboard {0} to server~
-view_dashboardManager_success=Saved dashboard~
+view_dashboardManager_success=Dashboard gespeichert
view_dashboardManager_deleted=Successfully deleted dashboard {0}~
-view_dashboards_title=Dashboard~
+view_dashboards_title=Dashboard
view_dashboards_confirm1=Sind Sie sicher, dass Sie löschen möchten
view_dashboardsManager_error1=Failed to add new dashboard~
# // dup in common
-view_dashboardsManager_inventory_title=Inventory Summary~
+view_dashboardsManager_inventory_title=Inventarübersicht
view_dashboardsManager_mashup_title=RHQ Neuigkeiten
-view_dashboardsManager_message_title=Wilkommen bei RHQ~
-view_dashboardsManager_message_title_details=<h1>Wilkommen bei RHQ</h1>\n<p>The RHQ project is an abstraction and plug-in based systems management suite that provides extensible and integrated systems management for multiple products and platforms across a set of core features. The project is designed with layered modules that provide a flexible architecture for deployment. It delivers a core user interface that delivers audited and historical management across an entire enterprise. A Server/Agent architecture provides remote management and plugins implement all specific support for managed products.</p>\n <p>This default dashboard can be edited by clicking the (edit mode) button above.</p>~
-view_dashboardsManager_tagcloud_title=Tag Cloud~
+view_dashboardsManager_message_title=Willkommen bei RHQ
+view_dashboardsManager_message_title_details=<h1>Willkommen bei RHQ</h1>\n<p>Das RHQ-Projekt is an abstraction and plug-in based systems management suite that provides extensible and integrated systems management for multiple products and platforms across a set of core features. The project is designed with layered modules that provide a flexible architecture for deployment. It delivers a core user interface that delivers audited and historical management across an entire enterprise. A Server/Agent architecture provides remote management and plugins implement all specific support for managed products.</p>\n <p>This default dashboard can be edited by clicking the (edit mode) button above.</p>~
+view_dashboardsManager_tagcloud_title=Tag-Wolke
view_portlet_autodiscovery_config_platform_selection = Number of platforms to display~
view_portlet_autodiscovery_help_msg = This portlet offers the ability to import newly discovered resources into the inventory for monitoring and management or to ignore them from further action.~
-view_portlet_autodiscovery_title = Discovery Queue~
-view_portlet_favoriteResources_msg=This portlet displays your favorite resources~
-view_portlet_favoriteResources_title=Favorite Resources~
+view_portlet_autodiscovery_title = Discovery-Warteschlange
+view_portlet_favoriteResources_msg=Dieses Potlet zeigt Ihre gemerkten Ressourcen
+view_portlet_favoriteResources_title=Gemerkete Resourcen
view_portlet_generic_help=Für dieses Portlet liegt keine Hilfe vor
-view_portlet_generic_unconfigured=No settings available for this portlet~
+view_portlet_generic_unconfigured=Für dieses Portlet sind keine Einstellungen möglich
view_portlet_graph_configure_resource_graph=The resource to graph~
view_portlet_graph_configure_metricDefinition_graph=The metric definition id to graph~
view_portlet_graph_configure_title=Graph Config~
@@ -1051,8 +1052,8 @@ view_portlet_operations_config_completed_enable=Whether to enable completed oper
view_portlet_operations_config_scheduled_enable=Whether to enable scheduled operations results grouping for dashboard.~
view_portlet_operations_config_scheduled_maximum=Maximum number of Scheduled operations to display.~
view_portlet_operations_config_completed=completed operations~
-view_portlet_operations_config_show_last=show Last~
-view_portlet_operations_config_show_next=show Next~
+view_portlet_operations_config_show_last=vorhergehende anzeigen
+view_portlet_operations_config_show_next=nächste anzeigen
view_portlet_operations_config_title=OperationsPortlet Configuration~
view_portlet_operations_config_title_desc=The configuration settings for the Operations portlet.~
view_portlet_operations_disabled=(Results currently disabled. Change settings to enable results.~
@@ -1063,42 +1064,42 @@ view_portlet_platform_title = Platforms Summary~
view_portlet_platform_type_error_1 = Could not load type data~
view_portlet_problem_resources_config_display_maximum=Maximum number of Problem resources to display.~
view_portlet_problem_resources_config_display_range=Show problem resources going back this many hours.~
-view_portlet_problem_resources_config_display_range2 = From {0} to {1}~
+view_portlet_problem_resources_config_display_range2 = Von {0} bis {1}
view_portlet_problem_resources_config_problem_label=problem resources on dashboard.~
view_portlet_problem_resources_config_title=ProblemResourcesPortlet Configuration~
view_portlet_problem_resources_config_title_desc=The configuration settings for the Problem resources portlet.~
view_portlet_problem_resources_help=This portlet displays resources that have reported alerts or Down availability.~
-view_portlet_problem_resources_title=Has Alerts or Currently Unavailable~
+view_portlet_problem_resources_title=Hat Alarme oder ist nicht verfügbar
view_portlet_recentAlerts_config_members=Select Members~
view_portlet_recentAlerts_config_priority_label = priority Alerts,~
-view_portlet_recentAlerts_config_when=within the past~
+view_portlet_recentAlerts_config_when=innerhalb der letzten
view_portlet_recentAlerts_help_msg = Displays recent alerts fired on resources visible to the current user login.~
# // dup in common
-view_portlet_recentAlerts_title = Recent Alerts~
+view_portlet_recentAlerts_title = Kürzliche Alarme
view_portlet_recentlyAdded_approved_platforms=recently approved platforms on dashboard.~
view_portlet_recentlyAdded_error1=Failed to load recently added resources~
view_portlet_recentlyAdded_help_msg=This portlet displays resources that have recently been imported into the inventory.~
view_portlet_recentlyAdded_title =Recently Added Portlet~
view_portlet_tagCloud_help=portlet displays the relative tag counts in the system visible to the current user.~
-view_portlet_tagCloud_title=TagCloud~
+view_portlet_tagCloud_title=Tag-Wolke
#=================== Inventory =====================
-view_inventory_adq = Discovery Queue~
-view_inventory_sectionHelp = From this section, newly discovered Resources, inventoried Resources, and Groups can be viewed and managed.~
+view_inventory_adq = Discovery-Warteschlange
+view_inventory_sectionHelp = In diesem Abschnitt können neu gefundene Ressourcen, sowie Ressourcen ud Gruppen im Inventar angesehen und verwaltet werden.
view_inventory_cannotGetGlobalPerms = Could not determine global permissions - assuming none.~
-view_inventory_problemGroups=Problem Groups~
-view_inventory_collectionInterval=Collection Interval~
+view_inventory_problemGroups=Gruppen mit Problemen
+view_inventory_collectionInterval=Erfassungs-Intervall
view_inventory_mixed=gemischt
-view_inventory_downServers=Down Servers~
+view_inventory_downServers=Nicht-verfügbare Server
view_inventory_groups = Gruppen
view_inventory_allGroups = Alle Gruppen
-view_inventory_allResources = All Resources~
+view_inventory_allResources = Alle Ressourcen
view_inventory_platforms = Platformen
view_inventory_servers = Server
view_inventory_services = Dienste
-view_inventory_dynagroupDefs = Dynagroup Definitions~
-view_metric_traits=Traits~
+view_inventory_dynagroupDefs = Dynagroup-Definitionen
+view_metric_traits=Traits
view_metric_viewTraitHistory=Value History for Trait [{0}]~
view_inventory_eventHistory_groupEventHistory=Group Event History~
view_inventory_eventHistory_resourceEventHistory=Resource Event History~
@@ -1125,7 +1126,7 @@ view_inventory_resources_deleteConfirm=Are you sure you want to delete the selec
view_inventory_resources_deleteSuccessful=You have successfully deleted the selected resources~
view_inventory_resources_deleteFailed=Failed to delete the selected resources~
view_inventory_resources_loadFailed=Failed to load resource composite data~
-view_inventory_resources_title=Member Resources~
+view_inventory_resources_title=Ressourcen
view_inventory_resources_title_children=Child Resources~
view_inventory_resources_title_members=Member Resources~
view_resource_monitor_availability_loadFailed=Failed to load availability history~
@@ -1155,7 +1156,7 @@ view_tree_common_loadFailed_node=Failed to load data for this node~
view_tree_common_loadFailed_create=Failed to create view for this node~
view_tree_common_loadFailed_update=Failed to update view for this node~
view_tree_common_contextMenu_type_name_label=Typ: {0}
-view_tree_common_contextMenu_pluginConfiguration=Plugin Configuration~
+view_tree_common_contextMenu_pluginConfiguration=Plugin-Konfiguration
view_tree_common_contextMenu_resourceConfiguration=Resource Configuration~
view_tree_common_contextMenu_editPluginConfiguration=Edit [{0}] Plugin Configuration~
view_tree_common_contextMenu_editResourceConfiguration=Edit [{0}] Resource Configuration~
@@ -1164,20 +1165,20 @@ view_tree_common_contextMenu_operations_loadFailed=Failure to start wizard for r
view_tree_common_contextMenu_measurements=Measurements~
view_tree_common_contextMenu_addChartToDashboard=Diagramm zum Dashboard [{0}] hinzufügen
view_tree_common_contextMenu_chart=Chart~
-view_tree_common_contextMenu_saveChartToDashboardSuccessful=You have saved dashboard [{0}]~
-view_tree_common_contextMenu_saveChartToDashboardFailure=Failed to save the dashboard~
+view_tree_common_contextMenu_saveChartToDashboardSuccessful=sie haben das Dashboard [{0}] gesichert
+view_tree_common_contextMenu_saveChartToDashboardFailure=Speichern des Dashboards fehlgeschlagen
view_tree_common_contextMenu_loadFailed_dashboard=Failed to load user dashboards
view_tree_common_contextMenu_loadFailed_manualAddChildren=Failed to load platform manual add children~
view_tabs_common_summary=Zusammenfassung
view_tabs_common_overview=Übersicht
-view_tabs_common_dashboard=Dashboard~
-view_tabs_common_timeline=Timeline~
+view_tabs_common_dashboard=Dashboard
+view_tabs_common_timeline=Zeitstrahl
view_tabs_common_monitoring=Monitoring
view_tabs_common_graphs=Diagramme
view_tabs_common_tables=Tabellen
-view_tabs_common_traits=Traits~
+view_tabs_common_traits=Traits
view_tabs_common_availability=Verfügbarkeit
-view_tabs_common_schedules=Schedules~
+view_tabs_common_schedules=Zeitplan
view_tabs_common_calltime=Calltime~
view_tabs_common_inventory=Inventar
view_tabs_common_groups=Gruppen
@@ -1186,8 +1187,8 @@ view_tabs_common_members=Mitglieder
view_tabs_common_membership=Mitgliedschaft
view_tabs_common_child_resources=Child Resources~
view_tabs_common_child_history=Child History~
-view_tabs_common_connectionSettings=Connection Settings~
-view_tabs_common_connectionSettingsHistory=Connection Settings History~
+view_tabs_common_connectionSettings=Verbindungs-Einstellungen
+view_tabs_common_connectionSettingsHistory=Verlauf der Verbindungs-E.
view_tabs_common_operations=Operationen
view_tabs_common_history=Verlauf
view_tabs_common_scheduled=Geplant
@@ -1196,8 +1197,8 @@ view_tabs_common_definitions=Definitionen
view_tabs_common_current=Aktuell
view_tabs_common_events=Ereignisse
view_tabs_common_configuration=Konfiguration
-view_tabs_common_content=Content~
-view_tabs_common_deployed=Deployed~
+view_tabs_common_content=Inhalte
+view_tabs_common_deployed=Installiert
view_tabs_common_new=Neu
view_tabs_common_subscriptions=Abonnements
view_titleBar_common_updateTagsSuccessful=The tags for [{0}] have been updated~
@@ -1313,7 +1314,7 @@ view_configurationDetails_allPropertiesValid = All configuration properties have
view_configurationDetails_somePropertiesInvalid = The following configuration properties have invalid values: {0}. The values must be corrected before the configuration can be saved.~
# Configuration History List
-view_configurationHistoryList_title = Configuration History~
+view_configurationHistoryList_title = Konfigurationsänderungen
view_configurationHistoryList_itemNamePlural = configuration history items
# Configuration History Details
@@ -1324,7 +1325,7 @@ view_configurationHistoryDetails_error_loadFailure = Unable to load configuratio
# Operation History List
#---------------------------------
view_operationHistoryList_title = Operation History~
-view_operationHistoryList_button_runOperation = Run Operation~
+view_operationHistoryList_button_runOperation = Operation ausführen
# Operation History Details
#--------------------------------------
@@ -1332,42 +1333,42 @@ view_operationHistoryDetails_error_fetchFailure = Failure loading operation hist
# Operation Create Wizard
#-------------------------------------
-view_operationCreateWizard_title = Operation Wizard~
-view_operationCreateWizard_header = Execute {0} on {1}~
+view_operationCreateWizard_title = Operationen-Assistent
+view_operationCreateWizard_header = Führe {0} auf {1} aus
view_operationCreateWizard_button_execute = Ausführen
view_operationCreateWizard_button_executeImmediately = Sofort ausführen
view_operationCreateWizard_error_scheduleOperationFailure = Failed to schedule operation execution.~
view_operationCreateWizard_message_scheduleOperationSuccess = Schedule operation [{0}] on Resource [{1}] with cron string [{2}].~
-view_operationCreateWizard_parametersStep_name = Operation Parameters~
-view_operationCreateWizard_parametersStep_noParameters = This operation does not take any parameters.~
-view_operationCreateWizard_schedulingStep_name = Schedule~
+view_operationCreateWizard_parametersStep_name = Parameter der Operation
+view_operationCreateWizard_parametersStep_noParameters = Diese Operation bnötigt keine weiteren Paameter
+view_operationCreateWizard_schedulingStep_name = Zeitplan
view_operationCreateWizard_schedulingStep_label_start = Start
view_operationCreateWizard_schedulingStep_label_schedule = Schedule~
-view_operationCreateWizard_schedulingStep_label_recurrence = Recurrence~
-view_operationCreateWizard_schedulingStep_label_runAt = Run At~
-view_operationCreateWizard_schedulingStep_label_nMinutes = n Minuten
+view_operationCreateWizard_schedulingStep_label_recurrence = Wiederholung
+view_operationCreateWizard_schedulingStep_label_runAt = Ausführung um
+view_operationCreateWizard_schedulingStep_label_nMinutes = Alle n Minuten
view_operationCreateWizard_schedulingStep_label_hourly = Stündlich
view_operationCreateWizard_schedulingStep_label_daily = Täglich
view_operationCreateWizard_schedulingStep_label_weekly = Wöchtentlich
view_operationCreateWizard_schedulingStep_label_monthly = Monatlich
-view_operationCreateWizard_schedulingStep_label_timePeriod = Time Period~
+view_operationCreateWizard_schedulingStep_label_timePeriod = Zeitdauer
view_operationCreateWizard_schedulingStep_label_startDate = Startdatum
-view_operationCreateWizard_schedulingStep_label_recurrenceEnd = Recurrence End~
+view_operationCreateWizard_schedulingStep_label_recurrenceEnd = Ende der Wiederholungen
view_operationCreateWizard_schedulingStep_label_endDate = Enddatum
-view_operationCreateWizard_schedulingStep_label_willExecuteImmediately = Will execute immediately~
+view_operationCreateWizard_schedulingStep_label_willExecuteImmediately = Wird sofort ausgeführt
view_operationCreateWizard_schedulingStep_label_onceAt = Einmalig um
view_operationCreateWizard_schedulingStep_label_date = Datum
view_operationCreateWizard_schedulingStep_label_time = Zeit
view_operationCreateWizard_schedulingStep_label_everyNMinutes = Alle n Minuten
-view_operationCreateWizard_schedulingStep_label_minuteInterval = Minute Interval~
+view_operationCreateWizard_schedulingStep_label_minuteInterval = Minuten-Intervall
view_operationCreateWizard_schedulingStep_label_hourlyAt = Stündlich um
-view_operationCreateWizard_schedulingStep_label_minuteOfHour = Minute of Hour~
+view_operationCreateWizard_schedulingStep_label_minuteOfHour = Minute
view_operationCreateWizard_schedulingStep_label_dailyAt = Stündlich um
-view_operationCreateWizard_schedulingStep_label_timeOfDay = Time of Day~
+view_operationCreateWizard_schedulingStep_label_timeOfDay = Zeitpunkt
view_operationCreateWizard_schedulingStep_label_weeklyOn = Wöchentlich am
view_operationCreateWizard_schedulingStep_label_dayOfWeek = Wochentag
view_operationCreateWizard_schedulingStep_label_monthlyOn = Monatlich am
-view_operationCreateWizard_schedulingStep_label_dayOfMonth = Day of Month~
+view_operationCreateWizard_schedulingStep_label_dayOfMonth = Tag des Monats
# Summary Overview
#-----------------------------
@@ -1381,7 +1382,7 @@ view_summaryOverviewForm_field_type = Typ
view_summaryOverviewForm_field_name = Name
view_summaryOverviewForm_field_description = Beschreibung
view_summaryOverviewForm_field_location = Ort
-view_summaryOverviewForm_field_version = Version~
+view_summaryOverviewForm_field_version = Version
view_summaryOverviewForm_field_parent = Parent~
view_summaryOverviewForm_error_traitsLoadFailure = Failed to load traits for {0}.~
view_summaryOverviewForm_label_plugin = Plugin:
@@ -1401,17 +1402,28 @@ view_reportsTop_title = Berichte
view_reportsTop_description = Dieser Abschnitt bietet Zugang zu applikationsweiten Berichten
view_reports_platforms = Cpu- und Speicherauslastung
view_reports_subsystems = Subsysteme
-view_reports_alertDefinitions=Alert Definitions
+view_reports_alertDefinitions=Alarmierungskriterien
view_measurementOob_title = Verdächtige Metriken
view_tagCloud_title = Tag-Wolke
view_tagCloud_error_fetchFailure = Konnte die Tags nicht laden.
-view_tagCloud_error_tagUsedCount = Tag {0} ma verwendet.
+view_tagCloud_error_tagUsedCount = Tag {0} mal verwendet.
view_taggedResources_title = Markierte Ressourcen
-
+#==================== Help ======================
+
+view_help_docAbout = Über
+view_help_docFaq = Frequently Asked Questions (FAQ)
+view_help_docToc = Dockumentation
+view_help_tutorialDemoAll = Demo: Alles
+view_help_tutorialDemoBundle = Demo: Bundles Installieren
+view_help_tutorialDynaGroup = Wie erstellt man Gruppen-Definitionen
+view_help_tutorialSearch = Wie benutzt man die Suchleiste
+view_helpSection_documentation = Dokumentation
+view_helpSection_tutorial = Tutorium
+view_helpTop_description = Dieser Abschnitt bietet Zugang zu Dokumentation, Tutorien, Versions- und anderer hilfreicher Information.
#===================== Test =======================
view_testTop_title = Test
view_testTop_description = This section contains pages for testing various GUI components.~
@@ -1448,7 +1460,7 @@ view_login_prompt = Bitte loggen Sie sich ein
view_login_registerLater = (Logout - Complete registration later.)~
view_login_registerLdapSuccess = Succesfully registered the new LDAP User.~
view_login_registerUser = Benutzer Anlegen
-view_login_welcome = Wilkommen
+view_login_welcome = Willkommen
view_login_welcomeMsg = Willkommen bei JBoss ON! <br/><br/> Enter/update the following fields to complete your registration process.<br/> Once you click "OK" you will be logged in.<br/><br/>~
@@ -1460,7 +1472,7 @@ view_menuBar_logout = Ausloggen
# Search Bar, GUI
#-----------------
view_searchBar_resources = Ressourcen
-view_searchBar_resourceGroups = Resource Groups~
+view_searchBar_resourceGroups = Ressource-Gruppen
# TODO: i18n pluralization
view_searchBar_welcomeMessage = search for {0}s~
view_searchBar_defaultPattern = name your pattern~
@@ -1477,4 +1489,16 @@ view_messageCenter_messageTitle = Nachrichtencenter
view_messageCenter_messageSeverity = Schwere
view_messageCenter_messageTime = Zeitpukt
view_messageCenter_messageDetail = Detail
+common_title_address=Adresse
+common_title_component_errors=Fehler der Komponente
+common_title_show_more=Mehr anzeigen...
+view_inventory_summary_agent_error1=Fehler beim Ermitteln des Agent, der dies Ressource managt
+view_inventory_summary_agent_error2=Fehler beim Kontaktieren des Agent, der dies Ressource managt
+view_inventory_summary_agent_fullEnpoint=Vollständiger Kommunikationsendpunkt
+view_inventory_summary_agent_fullEnpoint_err1=Es ist kein entfernter Endpunkt mit dieser Ressource assoziiert
+view_inventory_summary_agent_last_title=Zeitpunkt des letzten Verfügbarkeitsberichts
+view_inventory_summary_agent_status_title=Status der Kommunikation mit dem Agent
+view_inventory_summary_agent_title=Agent, der diese Ressource managt
+view_resource_title_component_errors_tooltip=Zeigt Fehler der gemanagten Ressource. Klicken für Details
+view_resource_title_tagUpdateFailed=Fehler beim Aktualisieren der Ressourcen-Tags
13 years, 5 months
[rhq] modules/plugins
by Heiko W. Rupp
modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/WarComponent.java | 60 +++++++++-
1 file changed, 58 insertions(+), 2 deletions(-)
New commits:
commit 1239025ef5e2402572e586947f0be0e706f1469a
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Nov 25 13:37:02 2010 +0100
BZ 657302 - read stats from the ClusterManager if needed
diff --git a/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/WarComponent.java b/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/WarComponent.java
index 45fd5da..b3d218c 100644
--- a/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/WarComponent.java
+++ b/modules/plugins/jboss-as/src/main/java/org/rhq/plugins/jbossas/WarComponent.java
@@ -24,9 +24,13 @@ package org.rhq.plugins.jbossas;
import java.io.File;
import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import org.apache.commons.logging.Log;
@@ -83,6 +87,9 @@ public class WarComponent extends ApplicationComponent implements OperationFacet
private static final String SERVLET_NAME_BASE_TEMPLATE = "jboss.web:J2EEApplication=none,J2EEServer=none,j2eeType=Servlet,name=%name%";
private static final String SESSION_NAME_BASE_TEMPLATE = "jboss.web:host=%HOST%,type=Manager,path=%PATH%";
+
+ // WebModule=//localhost/test-simple,service=ClusterManager
+ private static final String CLUSTER_SESSION_NAME_BASE_TEMPLATE = "jboss.web:service=ClusterManager,WebModule=//%HOST%%PATH%";
private static final String SESSION_PREFIX = "Session.";
private static final String VHOST_PREFIX = "Vhost";
public static final String VHOST_CONFIG_PROP = "vHost";
@@ -95,6 +102,20 @@ public class WarComponent extends ApplicationComponent implements OperationFacet
private ResponseTimeLogParser logParser;
String vhost;
private String contextRoot;
+ // Mapping non-clustered names -> attribute name in the cluster manager
+ private final String[] CLUSTER_SESSION_ATTRIBUTE_NAMES = {
+ "maxInactiveInterval","MaxInactiveInterval",
+ "activeSessions","ActiveSessionCount",
+ "sessionCounter","CreatedSessionCount",
+ "sessionAverageAliveTime","",
+ "processingTime","ProcessingTime",
+ "maxActive","MaxActiveSessionCount",
+ "maxActiveSessions","MaxActiveAllowed",
+ "expiredSessions","ExpiredSessionCount",
+ "rejectedSessions","RejectedSessionCount",
+ "sessionIdLength","SessionIdLength"
+ };
+
@Override
public AvailabilityType getAvailability() {
@@ -135,6 +156,7 @@ public class WarComponent extends ApplicationComponent implements OperationFacet
this.logParser.setExcludes(responseTimeConfig.getExcludes());
this.logParser.setTransforms(responseTimeConfig.getTransforms());
}
+
}
@Override
@@ -190,6 +212,8 @@ public class WarComponent extends ApplicationComponent implements OperationFacet
}
private Double getSessionMetric(String metricName) {
+ boolean isClustered = false;
+
EmsConnection jmxConnection = getEmsConnection();
String servletMBeanNames = SESSION_NAME_BASE_TEMPLATE.replace("%PATH%",
WarDiscoveryHelper.getContextPath(this.contextRoot));
@@ -197,6 +221,18 @@ public class WarComponent extends ApplicationComponent implements OperationFacet
ObjectNameQueryUtility queryUtility = new ObjectNameQueryUtility(servletMBeanNames);
List<EmsBean> mBeans = jmxConnection.queryBeans(queryUtility.getTranslatedQuery());
+ if (mBeans.size()==0) {
+ // retry with the cluster manager TODO select the local vs cluster mode on discovery
+ servletMBeanNames = CLUSTER_SESSION_NAME_BASE_TEMPLATE.replace("%PATH%",
+ WarDiscoveryHelper.getContextPath(this.contextRoot));
+ servletMBeanNames = servletMBeanNames.replace("%HOST%", vhost);
+ queryUtility = new ObjectNameQueryUtility(servletMBeanNames);
+ mBeans = jmxConnection.queryBeans(queryUtility.getTranslatedQuery());
+ if (mBeans.size()>0)
+ isClustered = true;
+
+ }
+
String property = metricName.substring(SESSION_PREFIX.length());
Double ret = Double.NaN;
@@ -204,16 +240,36 @@ public class WarComponent extends ApplicationComponent implements OperationFacet
if (mBeans.size() > 0) { // TODO flag error if != 1 ?
EmsBean eBean = mBeans.get(0);
eBean.refreshAttributes();
+
+ if (isClustered) {
+ property = lookupClusteredAttributeName(property);
+ }
+
EmsAttribute att = eBean.getAttribute(property);
if (att != null) {
- Integer i = (Integer) att.getValue();
- ret = Double.valueOf(i);
+ Object o = att.getValue();
+ if (o instanceof Long) {
+ Long l = (Long) o;
+ ret = Double.valueOf(l);
+ }
+ else {
+ Integer i = (Integer) o;
+ ret = Double.valueOf(i);
+ }
}
}
return ret;
}
+ private String lookupClusteredAttributeName(String property) {
+ for (int i = 0; i < CLUSTER_SESSION_ATTRIBUTE_NAMES.length ; i+=2) {
+ if (CLUSTER_SESSION_ATTRIBUTE_NAMES[i].equals(property))
+ return CLUSTER_SESSION_ATTRIBUTE_NAMES[i+1];
+ }
+ return property;
+ }
+
private Double getServletMetric(String metricName) {
EmsConnection jmxConnection = getEmsConnection();
13 years, 5 months
[rhq] modules/enterprise
by Joseph Marques
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/Footer.java | 38 +++-------
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/AlertGWTService.java | 9 ++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AlertGWTServiceImpl.java | 8 ++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertManagerBean.java | 14 +++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertManagerLocal.java | 2
5 files changed, 48 insertions(+), 23 deletions(-)
New commits:
commit ec43cd6bf1be52a0a101f85faf654610b27c6df6
Author: Joseph Marques <joseph(a)redhat.com>
Date: Wed Nov 24 18:17:10 2010 -0500
BZ-657107: support querying alert count by criteria (and show in footer)
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/Footer.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/Footer.java
index e6da3f3..0d94cc3 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/Footer.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/Footer.java
@@ -27,9 +27,7 @@ import com.smartgwt.client.widgets.events.ClickEvent;
import com.smartgwt.client.widgets.events.ClickHandler;
import com.smartgwt.client.widgets.toolbar.ToolStripSeparator;
-import org.rhq.core.domain.alert.Alert;
import org.rhq.core.domain.criteria.AlertCriteria;
-import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.gui.coregui.client.alert.AlertHistoryView;
import org.rhq.enterprise.gui.coregui.client.footer.FavoritesButton;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
@@ -132,31 +130,25 @@ public class Footer extends LocatableToolStrip {
public void refreshLoggedIn() {
AlertCriteria alertCriteria = new AlertCriteria();
-
- // only get one record from the first page, we only really care about the count
- alertCriteria.setPaging(0, 1);
-
- // last eight hours
- alertCriteria.addFilterStartTime(System.currentTimeMillis() - (1000L * 60 * 60 * 8));
+ alertCriteria.addFilterStartTime(System.currentTimeMillis() - (1000L * 60 * 60 * 8)); // last 8 hrs
//check for still logged in before submitting server side request
if (UserSessionManager.isLoggedIn()) {
- GWTServiceLookup.getAlertService().findAlertsByCriteria(alertCriteria,
- new AsyncCallback<PageList<Alert>>() {
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(MSG.view_core_error_1(), caught);
- }
-
- public void onSuccess(PageList<Alert> result) {
- if (result.isEmpty()) {
- setContents(MSG.view_core_recentAlerts("0"));
- setIcon("subsystems/alert/Alert_LOW_16.png");
- } else {
- setContents(MSG.view_core_recentAlerts(Integer.toString(result.getTotalSize())));
- setIcon("subsystems/alert/Alert_HIGH_16.png");
- }
+ GWTServiceLookup.getAlertService().findAlertCountByCriteria(alertCriteria, new AsyncCallback<Long>() {
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(MSG.view_core_error_1(), caught);
+ }
+
+ public void onSuccess(Long result) {
+ if (result == 0L) {
+ setContents(MSG.view_core_recentAlerts("0"));
+ setIcon("subsystems/alert/Alert_LOW_16.png");
+ } else {
+ setContents(MSG.view_core_recentAlerts(result.toString()));
+ setIcon("subsystems/alert/Alert_HIGH_16.png");
}
- });
+ }
+ });
} else {//dump request
Log.debug("user not logged in. Not fetching any alerts now.");
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/AlertGWTService.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/AlertGWTService.java
index a8fd51a..af44658 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/AlertGWTService.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/gwt/AlertGWTService.java
@@ -40,6 +40,15 @@ public interface AlertGWTService extends RemoteService {
PageList<Alert> findAlertsByCriteria(AlertCriteria criteria);
/**
+ * Find the count of alerts that match the specified criteria.
+ *
+ * @param criteria the criteria
+ *
+ * @return the count of alerts that match the specified criteria
+ */
+ long findAlertCountByCriteria(AlertCriteria criteria);
+
+ /**
* Delete the alerts with the specified ids if the current user has permission to do so (i.e. either
* the MANAGE_INVENTORY global permission, or the MANAGE_ALERTS permission for all corresponding resources).
* If the user does not have permission for all of the specified alerts, then none of the alerts will be deleted
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AlertGWTServiceImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AlertGWTServiceImpl.java
index 9f66d19..f7a7a69 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AlertGWTServiceImpl.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/server/gwt/AlertGWTServiceImpl.java
@@ -46,6 +46,14 @@ public class AlertGWTServiceImpl extends AbstractGWTServiceImpl implements Alert
}
}
+ public long findAlertCountByCriteria(AlertCriteria criteria) {
+ try {
+ return this.alertManager.findAlertCountByCriteria(getSessionSubject(), criteria);
+ } catch (Exception e) {
+ throw new RuntimeException(ThrowableUtil.getAllMessages(e));
+ }
+ }
+
public int deleteAlerts(int[] alertIds) {
try {
return this.alertManager.deleteAlerts(getSessionSubject(), alertIds);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertManagerBean.java
index 4a27685..b38593b 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertManagerBean.java
@@ -1054,4 +1054,18 @@ public class AlertManagerBean implements AlertManagerLocal, AlertManagerRemote {
return alerts;
}
+
+ public long findAlertCountByCriteria(Subject subject, AlertCriteria criteria) {
+ CriteriaQueryGenerator generator = new CriteriaQueryGenerator(subject, criteria);
+
+ if (!authorizationManager.isInventoryManager(subject)) {
+ generator.setAuthorizationResourceFragment(CriteriaQueryGenerator.AuthorizationTokenType.RESOURCE,
+ "alertDefinition.resource", subject.getId());
+ }
+
+ Query countQuery = generator.getCountQuery(entityManager);
+ long count = (Long) countQuery.getSingleResult();
+
+ return count;
+ }
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertManagerLocal.java
index 4c7e609..d0129b4 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertManagerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/alert/AlertManagerLocal.java
@@ -85,6 +85,8 @@ public interface AlertManagerLocal {
String prettyPrintAlertURL(Alert alert);
+ long findAlertCountByCriteria(Subject subject, AlertCriteria criteria);
+
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//
// The following are shared with the Remote Interface
13 years, 5 months
[rhq] modules/enterprise
by fdrabek
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementScheduleManagerBean.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 1bb8940ecd24eb3946d502fc84e6b648af72ffbb
Author: Filip Drabek <fdrabek(a)dhcp-lab-136.englab.brq.redhat.com>
Date: Wed Nov 24 23:49:43 2010 +0100
BZ-642641 fix issue in collecting metrics after metric template update.
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementScheduleManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementScheduleManagerBean.java
index d9b5a3d..602d2c3 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementScheduleManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/measurement/MeasurementScheduleManagerBean.java
@@ -307,13 +307,13 @@ public class MeasurementScheduleManagerBean implements MeasurementScheduleManage
return;
}
- @RequiredPermissions( { @RequiredPermission(Permission.MANAGE_INVENTORY),
+ @RequiredPermissions({ @RequiredPermission(Permission.MANAGE_INVENTORY),
@RequiredPermission(Permission.MANAGE_SETTINGS) })
public void disableAllDefaultCollections(Subject subject) {
entityManager.createNamedQuery(MeasurementDefinition.DISABLE_ALL).executeUpdate();
}
- @RequiredPermissions( { @RequiredPermission(Permission.MANAGE_INVENTORY),
+ @RequiredPermissions({ @RequiredPermission(Permission.MANAGE_INVENTORY),
@RequiredPermission(Permission.MANAGE_SETTINGS) })
public void disableAllSchedules(Subject subject) {
entityManager.createNamedQuery(MeasurementSchedule.DISABLE_ALL).executeUpdate();
@@ -466,7 +466,7 @@ public class MeasurementScheduleManagerBean implements MeasurementScheduleManage
// Return only the data necessary to construct minimal objects ourselves. Using JPQL
// is ok, it just lets Hibernate do the heavy lifting for query generation.
queryString = "" //
- + "SELECT ms.id, ms.resource.id, ms.definition.name, ms.definition.dataType, ms.definition.numericType" //
+ + "SELECT ms.id, ms.resource.id, ms.definition.name, ms.definition.dataType, ms.definition.rawNumericType" //
+ " FROM MeasurementSchedule ms" //
+ " WHERE ms.definition.id IN ( :definitionIds )";
Query query = entityManager.createQuery(queryString);
13 years, 5 months
[rhq] 3 commits - modules/enterprise
by mazz
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertDataSource.java | 6 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/configuration/GroupResourceConfigurationEditView.java | 6 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ResourceConfigurationEditView.java | 39 ++++------
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/PluginConfigurationEditView.java | 32 ++++----
4 files changed, 41 insertions(+), 42 deletions(-)
New commits:
commit 44e258f3415ce45c48b0d97650bbe136e861136b
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Nov 24 18:13:14 2010 -0500
move the save button over to the left - all of our buttons are always left-aligned on the screen - making the config editing views more consistent. plus, no one looks for a save button on the top-right of a screen :)
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/configuration/GroupResourceConfigurationEditView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/configuration/GroupResourceConfigurationEditView.java
index 3db389b..e23f204 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/configuration/GroupResourceConfigurationEditView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/configuration/GroupResourceConfigurationEditView.java
@@ -29,7 +29,6 @@ import com.smartgwt.client.types.Overflow;
import com.smartgwt.client.widgets.IButton;
import com.smartgwt.client.widgets.events.ClickEvent;
import com.smartgwt.client.widgets.events.ClickHandler;
-import com.smartgwt.client.widgets.layout.LayoutSpacer;
import com.smartgwt.client.widgets.toolbar.ToolStrip;
import org.rhq.core.domain.configuration.Configuration;
@@ -86,8 +85,9 @@ public class GroupResourceConfigurationEditView extends LocatableVLayout impleme
ToolStrip toolStrip = new ToolStrip();
toolStrip.setWidth100();
-
- toolStrip.addMember(new LayoutSpacer());
+ toolStrip.setExtraSpace(10);
+ toolStrip.setMembersMargin(5);
+ toolStrip.setLayoutMargin(5);
this.saveButton = new LocatableIButton(this.extendLocatorId("Save"), MSG.common_button_save());
this.saveButton.setTooltip(MSG.view_group_resConfig_edit_saveTooltip());
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ResourceConfigurationEditView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ResourceConfigurationEditView.java
index 525b6a3..f878ee8 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ResourceConfigurationEditView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ResourceConfigurationEditView.java
@@ -26,7 +26,6 @@ import com.smartgwt.client.types.Overflow;
import com.smartgwt.client.widgets.IButton;
import com.smartgwt.client.widgets.events.ClickEvent;
import com.smartgwt.client.widgets.events.ClickHandler;
-import com.smartgwt.client.widgets.layout.LayoutSpacer;
import com.smartgwt.client.widgets.toolbar.ToolStrip;
import org.rhq.core.domain.configuration.Configuration;
@@ -51,8 +50,8 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
* @author Greg Hinkle
* @author Ian Springer
*/
-public class ResourceConfigurationEditView extends LocatableVLayout
- implements PropertyValueChangeListener, RefreshableView {
+public class ResourceConfigurationEditView extends LocatableVLayout implements PropertyValueChangeListener,
+ RefreshableView {
private Resource resource;
private ResourcePermission resourcePermission;
@@ -72,8 +71,9 @@ public class ResourceConfigurationEditView extends LocatableVLayout
ToolStrip toolStrip = new ToolStrip();
toolStrip.setWidth100();
-
- toolStrip.addMember(new LayoutSpacer());
+ toolStrip.setExtraSpace(10);
+ toolStrip.setMembersMargin(5);
+ toolStrip.setLayoutMargin(5);
this.saveButton = new LocatableIButton(this.extendLocatorId("Save"), MSG.common_button_save());
this.saveButton.addClickHandler(new ClickHandler() {
@@ -87,8 +87,8 @@ public class ResourceConfigurationEditView extends LocatableVLayout
refresh();
if (!this.resourcePermission.isConfigureWrite()) {
- Message message = new Message(MSG.view_configurationDetails_noPermission(),
- Message.Severity.Info, EnumSet.of(Message.Option.Transient, Message.Option.Sticky));
+ Message message = new Message(MSG.view_configurationDetails_noPermission(), Message.Severity.Info, EnumSet
+ .of(Message.Option.Transient, Message.Option.Sticky));
CoreGUI.getMessageCenter().notify(message);
}
}
@@ -101,15 +101,15 @@ public class ResourceConfigurationEditView extends LocatableVLayout
editor.destroy();
removeMember(editor);
}
- editor = new ConfigurationEditor(this.extendLocatorId("Editor"), resource.getId(),
- resource.getResourceType().getId());
+ editor = new ConfigurationEditor(this.extendLocatorId("Editor"), resource.getId(), resource.getResourceType()
+ .getId());
editor.setOverflow(Overflow.AUTO);
editor.addPropertyValueChangeListener(this);
editor.setReadOnly(!this.resourcePermission.isConfigureWrite());
- addMember(editor);
+ addMember(editor);
// TODO (ips): If editor != null, use editor.reload() instead.
}
-
+
private void save() {
Configuration updatedConfiguration = editor.getConfiguration();
@@ -121,9 +121,8 @@ public class ResourceConfigurationEditView extends LocatableVLayout
public void onSuccess(ResourceConfigurationUpdate result) {
CoreGUI.getMessageCenter().notify(
- new Message(MSG.view_configurationDetails_messageConcise(),
- MSG.view_configurationDetails_messageDetailed(resource.getName()),
- Message.Severity.Info));
+ new Message(MSG.view_configurationDetails_messageConcise(), MSG
+ .view_configurationDetails_messageDetailed(resource.getName()), Message.Severity.Info));
refresh();
}
});
@@ -136,18 +135,18 @@ public class ResourceConfigurationEditView extends LocatableVLayout
if (event.isValidationStateChanged()) {
Set<String> invalidPropertyNames = event.getInvalidPropertyNames();
if (invalidPropertyNames.isEmpty()) {
- this.saveButton.enable();
- message = new Message(MSG.view_configurationDetails_allPropertiesValid(),
- Message.Severity.Info, EnumSet.of(Message.Option.Transient, Message.Option.Sticky));
+ this.saveButton.enable();
+ message = new Message(MSG.view_configurationDetails_allPropertiesValid(), Message.Severity.Info,
+ EnumSet.of(Message.Option.Transient, Message.Option.Sticky));
} else {
this.saveButton.disable();
- message = new Message(MSG.view_configurationDetails_somePropertiesInvalid(invalidPropertyNames.toString()),
- Message.Severity.Error, EnumSet.of(Message.Option.Transient, Message.Option.Sticky));
+ message = new Message(MSG.view_configurationDetails_somePropertiesInvalid(invalidPropertyNames
+ .toString()), Message.Severity.Error, EnumSet.of(Message.Option.Transient, Message.Option.Sticky));
}
messageCenter.notify(message);
} else {
this.saveButton.enable();
}
}
-
+
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/PluginConfigurationEditView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/PluginConfigurationEditView.java
index fcfbf05..76adc19 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/PluginConfigurationEditView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/PluginConfigurationEditView.java
@@ -25,7 +25,6 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.types.Overflow;
import com.smartgwt.client.widgets.events.ClickEvent;
import com.smartgwt.client.widgets.events.ClickHandler;
-import com.smartgwt.client.widgets.layout.LayoutSpacer;
import com.smartgwt.client.widgets.toolbar.ToolStrip;
import org.rhq.core.domain.configuration.Configuration;
@@ -50,8 +49,8 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
* @author Greg Hinkle
* @author Ian Springer
*/
-public class PluginConfigurationEditView extends LocatableVLayout
- implements PropertyValueChangeListener, RefreshableView {
+public class PluginConfigurationEditView extends LocatableVLayout implements PropertyValueChangeListener,
+ RefreshableView {
private Resource resource;
private ResourcePermission resourcePermission;
@@ -71,8 +70,9 @@ public class PluginConfigurationEditView extends LocatableVLayout
ToolStrip toolStrip = new ToolStrip();
toolStrip.setWidth100();
-
- toolStrip.addMember(new LayoutSpacer());
+ toolStrip.setExtraSpace(10);
+ toolStrip.setMembersMargin(5);
+ toolStrip.setLayoutMargin(5);
this.saveButton = new LocatableIButton(this.extendLocatorId("Save"), MSG.common_button_save());
this.saveButton.addClickHandler(new ClickHandler() {
@@ -87,8 +87,8 @@ public class PluginConfigurationEditView extends LocatableVLayout
refresh();
if (!this.resourcePermission.isInventory()) {
- Message message = new Message(MSG.view_connectionSettingsDetails_noPermission(),
- Message.Severity.Info, EnumSet.of(Message.Option.Transient));
+ Message message = new Message(MSG.view_connectionSettingsDetails_noPermission(), Message.Severity.Info,
+ EnumSet.of(Message.Option.Transient));
CoreGUI.getMessageCenter().notify(message);
}
}
@@ -96,13 +96,13 @@ public class PluginConfigurationEditView extends LocatableVLayout
@Override
public void refresh() {
this.saveButton.disable();
-
+
if (editor != null) {
editor.destroy();
removeMember(editor);
}
- editor = new ConfigurationEditor(extendLocatorId("Editor"), resource.getId(),
- resource.getResourceType().getId(), ConfigurationEditor.ConfigType.plugin);
+ editor = new ConfigurationEditor(extendLocatorId("Editor"), resource.getId(), resource.getResourceType()
+ .getId(), ConfigurationEditor.ConfigType.plugin);
editor.setOverflow(Overflow.AUTO);
editor.addPropertyValueChangeListener(this);
editor.setReadOnly(!this.resourcePermission.isInventory());
@@ -122,8 +122,8 @@ public class PluginConfigurationEditView extends LocatableVLayout
public void onSuccess(PluginConfigurationUpdate result) {
CoreGUI.getMessageCenter().notify(
- new Message(MSG.view_connectionSettingsDetails_messageConcise_updateSuccess(),
- MSG.view_connectionSettingsDetails_messageDetailed_updateSuccess(resource.getName())));
+ new Message(MSG.view_connectionSettingsDetails_messageConcise_updateSuccess(), MSG
+ .view_connectionSettingsDetails_messageDetailed_updateSuccess(resource.getName())));
refresh();
}
});
@@ -137,12 +137,12 @@ public class PluginConfigurationEditView extends LocatableVLayout
Set<String> invalidPropertyNames = event.getInvalidPropertyNames();
if (invalidPropertyNames.isEmpty()) {
this.saveButton.enable();
- message = new Message(MSG.view_connectionSettingsDetails_allPropertiesValid(),
- Message.Severity.Info, EnumSet.of(Message.Option.Transient, Message.Option.Sticky));
+ message = new Message(MSG.view_connectionSettingsDetails_allPropertiesValid(), Message.Severity.Info,
+ EnumSet.of(Message.Option.Transient, Message.Option.Sticky));
} else {
this.saveButton.disable();
- message = new Message(MSG.view_connectionSettingsDetails_somePropertiesInvalid(invalidPropertyNames.toString()),
- Message.Severity.Error, EnumSet.of(Message.Option.Transient, Message.Option.Sticky));
+ message = new Message(MSG.view_connectionSettingsDetails_somePropertiesInvalid(invalidPropertyNames
+ .toString()), Message.Severity.Error, EnumSet.of(Message.Option.Transient, Message.Option.Sticky));
}
messageCenter.notify(message);
} else {
commit 567f3e84025bce205ab5a189e6837123417dbc8c
Merge: a82b956... 9bde193...
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Nov 24 18:02:14 2010 -0500
Merge branch 'master' of ssh://git.fedorahosted.org/git/rhq/rhq.git
commit a82b956f006ebff91fd019e765894152af3c65ec
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Nov 24 18:01:38 2010 -0500
trying to get an empty list to not collapse the width of columns. this still doesn't seem to work though
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertDataSource.java
index 7c20be5..0427c31 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertDataSource.java
@@ -85,9 +85,9 @@ public class AlertDataSource extends RPCDataSource<Alert> {
@Override
protected List<DataSourceField> addDataSourceFields() {
// for some reason, the client seems to crash if you don't specify any data source fields
- // even though we know we defined override ListGridFields for all columns. Define at least one field here.
+ // even though we know we defined override ListGridFields for all columns.
List<DataSourceField> fields = super.addDataSourceFields();
- fields.add(new DataSourceTextField("name", MSG.common_title_name()));
+ fields.add(new DataSourceTextField("name"));
return fields;
}
@@ -112,7 +112,7 @@ public class AlertDataSource extends RPCDataSource<Alert> {
fields.add(nameField);
ListGridField conditionField = new ListGridField("conditionText", MSG.view_alerts_field_condition_text());
- conditionField.setWidth("*");
+ conditionField.setWidth("40%");
fields.add(conditionField);
ListGridField priorityField = new ListGridField("priority", MSG.view_alerts_field_priority());
13 years, 5 months