[rhq] 7 commits - modules/enterprise
by Simeon Pinder
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/DashboardView.java | 19 +--
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/DashboardsView.java | 54 ++++-----
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/PortletHelpWindow.java | 20 +--
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/PortletSettingsWindow.java | 12 +-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/inventory/resource/graph/GraphPortlet.java | 10 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/imported/RecentlyAddedView.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/operations/OperationsPortlet.java | 55 ++++------
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/problems/ProblemResourcesPortlet.java | 33 +++---
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/summary/InventorySummaryView.java | 35 +++---
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/summary/TagCloudPortlet.java | 6 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/util/MashupPortlet.java | 13 +-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/util/MessagePortlet.java | 13 +-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/store/DashboardManager.java | 13 +-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/footer/FavoritesButton.java | 4
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties | 5
15 files changed, 147 insertions(+), 147 deletions(-)
New commits:
commit ff9ab0d59e660a7795757770caef522546c15e02
Merge: f05e1c7... e3cadf8...
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Wed Nov 17 17:54:24 2010 -0500
Merge branch 'master' of ssh://spinder@git.fedorahosted.org/git/rhq/rhq into track-master2
commit f05e1c7d9f702f0f2c74a3f2b58342c269fd8858
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Wed Nov 17 17:45:57 2010 -0500
i18n refactor.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/operations/OperationsPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/operations/OperationsPortlet.java
index 121084b..999d49b 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/operations/OperationsPortlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/operations/OperationsPortlet.java
@@ -61,7 +61,7 @@ public class OperationsPortlet extends LocatableVLayout implements CustomSetting
public static final String OPERATIONS_RANGE_COMPLETED = "operations-range-completed";
public static final String OPERATIONS_RANGE_SCHEDULED = "operations-range-scheduled";
//portlet key
- public static final String KEY = MSG.view_group_contextMenu_operations();
+ public static final String KEY = MSG.common_title_operations();
private static final String TITLE = KEY;
private static String recentOperations = MSG.common_title_recent_operations();
private static String scheduledOperations = MSG.common_title_scheduled_operations();
commit ff626f7c64a1e1c1dc8b5552853e89a9c20da585
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Wed Nov 17 17:39:52 2010 -0500
more i18n
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
index 1c46fac..b211a94 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
@@ -111,6 +111,7 @@ common_title_selected_resources=Selected Resources~
common_title_server_total=Server Total~
common_title_service_total=Service Total~
common_title_settings=Settings~
+common_title_show=Show~
common_title_start = Start~
common_title_status=Status~
common_title_tag_cloud=Tag Cloud~
@@ -509,7 +510,10 @@ view_portlet_favoriteResources_msg=This portlet displays your favorite resources
view_portlet_favoriteResources_title=Favorite Resources~
view_portlet_generic_help=No help available for this portlet~
view_portlet_generic_unconfigured=No settings available for this portlet~
+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~
+view_portlet_graph_configure_title_desc=Configuration of the graph portlet~
view_portlet_graph_help_msg = This Portlet supports the graphing of a resource metric.~
view_portlet_graph_help_title = Graph Portlet~
view_portlet_graph_help_unconfigured=This graph is unconfigured, click the settings button to configure.~
@@ -864,4 +868,3 @@ view_messageCenter_messageTitle= Title~
view_messageCenter_messageSeverity= Severity~
view_messageCenter_messageTime= Time~
view_messageCenter_messageDetail= Detail~
-
commit 8c51bd68c5ccadc880797ccd2e70a3d78bb279f8
Merge: b74b057... f635f52...
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Wed Nov 17 17:33:24 2010 -0500
Merge branch 'master' of ssh://spinder@git.fedorahosted.org/git/rhq/rhq into track-master2
commit b74b0579bccdb6f5e937ea8402cc4d6bbfe8e530
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Wed Nov 17 17:32:57 2010 -0500
i18n.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/inventory/resource/graph/GraphPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/inventory/resource/graph/GraphPortlet.java
index e134a71..0175f28 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/inventory/resource/graph/GraphPortlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/inventory/resource/graph/GraphPortlet.java
@@ -75,12 +75,12 @@ public class GraphPortlet extends SmallGraphView implements CustomSettingsPortle
}
public ConfigurationDefinition getConfigurationDefinition() {
- ConfigurationDefinition def = new ConfigurationDefinition("Graph Config", "Configuration of the graph portlet");
- def
- .put(new PropertyDefinitionSimple(CFG_RESOURCE_ID, "The resource to graph", true,
- PropertySimpleType.INTEGER));
- def.put(new PropertyDefinitionSimple(CFG_DEFINITION_ID, "The metric definition id to graph", true,
+ ConfigurationDefinition def = new ConfigurationDefinition(MSG.view_portlet_graph_configure_title(), MSG
+ .view_portlet_graph_configure_title_desc());
+ def.put(new PropertyDefinitionSimple(CFG_RESOURCE_ID, MSG.view_portlet_graph_configure_resource_graph(), true,
PropertySimpleType.INTEGER));
+ def.put(new PropertyDefinitionSimple(CFG_DEFINITION_ID, MSG
+ .view_portlet_graph_configure_metricDefinition_graph(), true, PropertySimpleType.INTEGER));
return def;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/imported/RecentlyAddedView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/imported/RecentlyAddedView.java
index 9c71e67..7e93964 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/imported/RecentlyAddedView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/imported/RecentlyAddedView.java
@@ -131,7 +131,7 @@ public class RecentlyAddedView extends LocatableVLayout implements CustomSetting
//-------------combobox for number of recently added resources to display on the dashboard
final SelectItem maximumRecentlyAddedComboBox = new SelectItem(RECENTLY_ADDED_SHOW_MAX);
- maximumRecentlyAddedComboBox.setTitle("Show");
+ maximumRecentlyAddedComboBox.setTitle(MSG.common_title_show());
maximumRecentlyAddedComboBox.setHint("<nobr><b> " + MSG.view_portlet_recentlyAdded_approved_platforms()
+ "</b></nobr>");
//spinder 9/3/10: the following is required workaround to disable editability of combobox.
commit 200dc2eccbac701a99798e35c2886ada8fc013f9
Merge: 1e2871e... e29b78e...
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Wed Nov 17 17:20:38 2010 -0500
Merge branch 'master' of ssh://spinder@git.fedorahosted.org/git/rhq/rhq into track-master2
commit 1e2871ecc601621557a0582874e6bc6d1c129682
Author: Simeon Pinder <spinder(a)redhat.com>
Date: Wed Nov 17 16:59:33 2010 -0500
more i18n.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/DashboardView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/DashboardView.java
index ddf9c4c..c02e802 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/DashboardView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/DashboardView.java
@@ -117,7 +117,7 @@ public class DashboardView extends LocatableVLayout {
editForm.setAutoWidth();
editForm.setNumCols(9);
- TextItem nameItem = new TextItem("name", "Dashboard Name");
+ TextItem nameItem = new TextItem("name", MSG.common_title_dashboard_name());
nameItem.setValue(storedDashboard.getName());
nameItem.addChangedHandler(new ChangedHandler() {
public void onChanged(ChangedEvent changedEvent) {
@@ -128,10 +128,10 @@ public class DashboardView extends LocatableVLayout {
});
final StaticTextItem numColItem = new StaticTextItem();
- numColItem.setTitle("Columns");
+ numColItem.setTitle(MSG.common_title_columns());
numColItem.setValue(storedDashboard.getColumns());
- ButtonItem addColumn = new ButtonItem("addColumn", "Add Column");
+ ButtonItem addColumn = new ButtonItem("addColumn", MSG.common_title_add_column());
// addColumn.setIcon("silk/application_side_expand.png");
addColumn.setAutoFit(true);
addColumn.setStartRow(false);
@@ -146,7 +146,7 @@ public class DashboardView extends LocatableVLayout {
}
});
- ButtonItem removeColumn = new ButtonItem("removeColumn", "Remove Column");
+ ButtonItem removeColumn = new ButtonItem("removeColumn", MSG.common_title_remove_column());
// removeColumn.setIcon("silk/application_side_contract.png");
removeColumn.setAutoFit(true);
removeColumn.setStartRow(false);
@@ -173,7 +173,8 @@ public class DashboardView extends LocatableVLayout {
addPorletMenu.addItem(new MenuItem(portletName));
}
- addPortlet = new LocatableIMenuButton(extendLocatorId("AddPortal"), "Add Portlet", addPorletMenu);
+ addPortlet = new LocatableIMenuButton(extendLocatorId("AddPortal"), MSG.common_title_add_portlet(),
+ addPorletMenu);
// addPortlet = new ButtonItem("addPortlet", "Add Portlet");
addPortlet.setIcon("[skin]/images/actions/add.png");
@@ -194,7 +195,7 @@ public class DashboardView extends LocatableVLayout {
ColorPickerItem picker = new ColorPickerItem();
- picker.setTitle("Background");
+ picker.setTitle(MSG.common_title_background());
picker.addChangedHandler(new ChangedHandler() {
public void onChanged(ChangedEvent changedEvent) {
Object v = changedEvent.getValue();
@@ -277,12 +278,12 @@ public class DashboardView extends LocatableVLayout {
public void save() {
GWTServiceLookup.getDashboardService().storeDashboard(storedDashboard, new AsyncCallback<Dashboard>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to save dashboard to server", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_dashboardManager_error(), caught);
}
public void onSuccess(Dashboard result) {
CoreGUI.getMessageCenter().notify(
- new Message("Saved dashboard " + result.getName() + " to server", Message.Severity.Info));
+ new Message(MSG.view_dashboardManager_saved(result.getName()), Message.Severity.Info));
storedDashboard = result;
updateConfigs(result);
@@ -308,7 +309,7 @@ public class DashboardView extends LocatableVLayout {
public void onSuccess(Void result) {
CoreGUI.getMessageCenter().notify(
- new Message("Successfully deleted dashboard " + storedDashboard.getName(), Message.Severity.Info));
+ new Message(MSG.view_dashboardManager_deleted(storedDashboard.getName()), Message.Severity.Info));
}
});
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/DashboardsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/DashboardsView.java
index bf0f629..9592684 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/DashboardsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/DashboardsView.java
@@ -69,7 +69,7 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
* @author Greg Hinkle
*/
public class DashboardsView extends LocatableVLayout implements BookmarkableView {
- public static final String VIEW_ID = "Dashboard";
+ public static final String VIEW_ID = MSG.view_dashboards_title();
private TabSet tabSet;
@@ -101,7 +101,7 @@ public class DashboardsView extends LocatableVLayout implements BookmarkableView
dashboardService.findDashboardsForSubject(new AsyncCallback<List<Dashboard>>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to load user dashboards", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_dashboardsManager_error1(), caught);
}
public void onSuccess(List<Dashboard> result) {
@@ -117,7 +117,7 @@ public class DashboardsView extends LocatableVLayout implements BookmarkableView
removeMembers(getMembers());
this.dashboards = dashboards;
this.dashboardsByName = new HashMap(dashboards.size());
- for (Dashboard dashboard: dashboards) {
+ for (Dashboard dashboard : dashboards) {
this.dashboardsByName.put(dashboard.getName(), dashboard);
}
@@ -128,17 +128,19 @@ public class DashboardsView extends LocatableVLayout implements BookmarkableView
tabSet.setCanCloseTabs(true);
- editButton = new LocatableIButton(extendLocatorId("Mode"), editMode ? "View Mode" : "Edit Mode");
+ editButton = new LocatableIButton(extendLocatorId("Mode"), editMode ? MSG.common_title_view_mode() : MSG
+ .common_title_edit_mode());
editButton.setAutoFit(true);
editButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent clickEvent) {
editMode = !editMode;
- editButton.setTitle(editMode ? "View Mode" : "Edit Mode");
+ editButton.setTitle(editMode ? MSG.common_title_view_mode() : MSG.common_title_edit_mode());
selectedDashboardView.setEditMode(editMode);
}
});
- final IButton newDashboardButton = new LocatableIButton(extendLocatorId("New"), "New Dashboard");
+ final IButton newDashboardButton = new LocatableIButton(extendLocatorId("New"), MSG
+ .common_title_new_dashboard());
newDashboardButton.setAutoFit(true);
newDashboardButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent clickEvent) {
@@ -177,7 +179,7 @@ public class DashboardsView extends LocatableVLayout implements BookmarkableView
tabSet.addCloseClickHandler(new CloseClickHandler() {
public void onCloseClick(final TabCloseClickEvent tabCloseClickEvent) {
final DashboardView dashboardView = (DashboardView) tabCloseClickEvent.getTab().getPane();
- SC.ask("Are you sure you want to delete [" + tabCloseClickEvent.getTab().getTitle() + "]?",
+ SC.ask(MSG.view_dashboards_confirm1() + " [" + tabCloseClickEvent.getTab().getTitle() + "]?",
new BooleanCallback() {
public void execute(Boolean aBoolean) {
if (aBoolean) {
@@ -197,51 +199,49 @@ public class DashboardsView extends LocatableVLayout implements BookmarkableView
protected Dashboard getDefaultDashboard() {
Dashboard dashboard = new Dashboard();
- dashboard.setName("Default");
+ dashboard.setName(MSG.common_title_default());
dashboard.setColumns(2);
dashboard.setColumnWidths("32%", "68%");
dashboard.getConfiguration().put(new PropertySimple(Dashboard.CFG_BACKGROUND, "#F1F2F3"));
- DashboardPortlet summary = new DashboardPortlet("Inventory Summary", InventorySummaryView.KEY, 230);
+ DashboardPortlet summary = new DashboardPortlet(MSG.view_dashboardsManager_inventory_title(),
+ InventorySummaryView.KEY, 230);
dashboard.addPortlet(summary, 0, 0);
- DashboardPortlet tagCloud = new DashboardPortlet("Tag Cloud", TagCloudPortlet.KEY, 200);
+ DashboardPortlet tagCloud = new DashboardPortlet(MSG.view_dashboardsManager_tagcloud_title(),
+ TagCloudPortlet.KEY, 200);
dashboard.addPortlet(tagCloud, 0, 1);
// Experimental
// StoredPortlet platformSummary = new StoredPortlet("Platform Summary", PlatformPortletView.KEY, 300);
// col2.add(platformSummary);
- DashboardPortlet welcome = new DashboardPortlet("Welcome To RHQ", MessagePortlet.KEY, 180);
+ DashboardPortlet welcome = new DashboardPortlet(MSG.view_dashboardsManager_message_title(), MessagePortlet.KEY,
+ 180);
welcome.getConfiguration().put(
- new PropertySimple("message", "<h1>Welcome to 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>"));
+ new PropertySimple("message", MSG.view_dashboardsManager_message_title_details()));
dashboard.addPortlet(welcome, 1, 0);
- DashboardPortlet news = new DashboardPortlet("RHQ News", MashupPortlet.KEY, 320);
+ DashboardPortlet news = new DashboardPortlet(MSG.view_dashboardsManager_mashup_title(), MashupPortlet.KEY, 320);
news.getConfiguration().put(
new PropertySimple("address", "http://rhq-project.org/display/RHQ/RHQ+News?decorator=popup"));
dashboard.addPortlet(news, 1, 1);
//
- DashboardPortlet discoveryQueue = new DashboardPortlet("Discovery Queue", AutodiscoveryPortlet.KEY, 250);
+ DashboardPortlet discoveryQueue = new DashboardPortlet(MSG.view_portlet_autodiscovery_title(),
+ AutodiscoveryPortlet.KEY, 250);
dashboard.addPortlet(discoveryQueue, 1, 2);
DashboardPortlet recentAlerts = new DashboardPortlet(RecentAlertsPortlet.KEY, RecentAlertsPortlet.KEY, 250);
dashboard.addPortlet(recentAlerts, 1, 3);
- DashboardPortlet recentlyAdded = new DashboardPortlet("Recently Added Resources", RecentlyAddedView.KEY, 250);
+ DashboardPortlet recentlyAdded = new DashboardPortlet(MSG.common_title_recently_added(), RecentlyAddedView.KEY,
+ 250);
dashboard.addPortlet(recentlyAdded, 1, 4);
- DashboardPortlet operations = new DashboardPortlet("Operations", OperationsPortlet.KEY, 500);
+ DashboardPortlet operations = new DashboardPortlet(MSG.common_title_operations(), OperationsPortlet.KEY, 500);
dashboard.addPortlet(operations, 1, 5);
- DashboardPortlet problemResources = new DashboardPortlet("Has Alerts or Currently Unavailable",
+ DashboardPortlet problemResources = new DashboardPortlet(MSG.view_portlet_problem_resources_title(),
ProblemResourcesPortlet.KEY, 250);
//initialize config for the problemResources portlet.
problemResources.getConfiguration()
@@ -262,7 +262,7 @@ public class DashboardsView extends LocatableVLayout implements BookmarkableView
int i = 0;
String availableDashboardName = null;
while (availableDashboardName == null) {
- String candidateDashboardName = "Custom" + i++;
+ String candidateDashboardName = MSG.common_title_custom() + i++;
if (!this.dashboardsByName.containsKey(candidateDashboardName)) {
availableDashboardName = candidateDashboardName;
}
@@ -276,7 +276,7 @@ public class DashboardsView extends LocatableVLayout implements BookmarkableView
dashboardService.storeDashboard(dashboard, new AsyncCallback<Dashboard>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to add new dashboard", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_dashboardsManager_error1(), caught);
}
public void onSuccess(Dashboard result) {
@@ -291,7 +291,7 @@ public class DashboardsView extends LocatableVLayout implements BookmarkableView
tabSet.selectTab(tab);
editMode = true;
- editButton.setTitle(editMode ? "View Mode" : "Edit Mode");
+ editButton.setTitle(editMode ? MSG.common_title_view_mode() : MSG.common_title_edit_mode());
dashboardView.setEditMode(editMode);
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/PortletHelpWindow.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/PortletHelpWindow.java
index 6013893..80fe610 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/PortletHelpWindow.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/PortletHelpWindow.java
@@ -23,20 +23,16 @@
package org.rhq.enterprise.gui.coregui.client.dashboard;
-import com.smartgwt.client.types.Alignment;
import com.smartgwt.client.types.LayoutPolicy;
import com.smartgwt.client.types.Overflow;
import com.smartgwt.client.widgets.Canvas;
-import com.smartgwt.client.widgets.IButton;
import com.smartgwt.client.widgets.Label;
import com.smartgwt.client.widgets.Window;
-import com.smartgwt.client.widgets.events.ClickEvent;
-import com.smartgwt.client.widgets.events.ClickHandler;
-import com.smartgwt.client.widgets.form.DynamicForm;
-import com.smartgwt.client.widgets.layout.HLayout;
import com.smartgwt.client.widgets.layout.VLayout;
import org.rhq.core.domain.dashboard.DashboardPortlet;
+import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.Messages;
/**
* This is a window for displaying portlet settings. The window contains a form which in turn will contain the
@@ -49,7 +45,7 @@ import org.rhq.core.domain.dashboard.DashboardPortlet;
* @author John Sanda
*/
public class PortletHelpWindow extends Window {
-
+ private static Messages MSG = CoreGUI.getMessages();
private DashboardPortlet storedPortlet;
private Portlet view;
@@ -57,11 +53,9 @@ public class PortletHelpWindow extends Window {
this.storedPortlet = storedPortlet;
this.view = view;
-
-
- setTitle(storedPortlet.getName() + " Help");
+ setTitle(storedPortlet.getName() + " " + MSG.view_menuBar_help());
setOverflow(Overflow.VISIBLE);
-// setAutoSize(true);
+ // setAutoSize(true);
setHeight(400);
setWidth(400);
@@ -72,7 +66,6 @@ public class PortletHelpWindow extends Window {
setDismissOnOutsideClick(true);
}
-
@Override
protected void onInit() {
super.onInit();
@@ -89,10 +82,9 @@ public class PortletHelpWindow extends Window {
if (c != null) {
layout.addMember(c);
} else {
- layout.addMember(new Label("No help available for this portlet"));
+ layout.addMember(new Label(MSG.view_portlet_generic_help()));
}
-
addItem(layout);
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/PortletSettingsWindow.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/PortletSettingsWindow.java
index 22227f6..c610cdb 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/PortletSettingsWindow.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/PortletSettingsWindow.java
@@ -64,7 +64,7 @@ public class PortletSettingsWindow extends LocatableWindow {
this.parentWindow = parentWindow;
this.storedPortlet = storedPortlet;
this.view = view;
- setTitle(storedPortlet.getName() + " Settings");
+ setTitle(storedPortlet.getName() + " " + MSG.common_title_settings());
setOverflow(Overflow.VISIBLE);
setMinWidth(400);
setMinHeight(400);
@@ -90,13 +90,13 @@ public class PortletSettingsWindow extends LocatableWindow {
final DynamicForm form = ((CustomSettingsPortlet) view).getCustomSettingsForm();
layout.addMember(form);
- IButton cancel = new LocatableIButton(this.extendLocatorId("Cancel"), "Cancel");
+ IButton cancel = new LocatableIButton(this.extendLocatorId("Cancel"), MSG.common_button_cancel());
cancel.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent clickEvent) {
PortletSettingsWindow.this.destroy();
}
});
- IButton save = new LocatableIButton(this.extendLocatorId("Save"), "Save");
+ IButton save = new LocatableIButton(this.extendLocatorId("Save"), MSG.common_button_save());
save.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent clickEvent) {
if (form.validate()) {
@@ -125,13 +125,13 @@ public class PortletSettingsWindow extends LocatableWindow {
editor.setHeight(400);
layout.addMember(editor);
- IButton cancel = new LocatableIButton(this.extendLocatorId("Cancel"), "Cancel");
+ IButton cancel = new LocatableIButton(this.extendLocatorId("Cancel"), MSG.common_button_cancel());
cancel.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent clickEvent) {
PortletSettingsWindow.this.destroy();
}
});
- IButton save = new LocatableIButton(this.extendLocatorId("Save"), "Save");
+ IButton save = new LocatableIButton(this.extendLocatorId("Save"), MSG.common_button_cancel());
save.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent clickEvent) {
if (editor.validate()) {
@@ -153,7 +153,7 @@ public class PortletSettingsWindow extends LocatableWindow {
layout.addMember(buttons);
} else {
- layout.addMember(new Label("No settings available for this portlet"));
+ layout.addMember(new Label(MSG.view_portlet_generic_unconfigured()));
}
addItem(layout);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/operations/OperationsPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/operations/OperationsPortlet.java
index fe4bead..121084b 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/operations/OperationsPortlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/operations/OperationsPortlet.java
@@ -61,20 +61,20 @@ public class OperationsPortlet extends LocatableVLayout implements CustomSetting
public static final String OPERATIONS_RANGE_COMPLETED = "operations-range-completed";
public static final String OPERATIONS_RANGE_SCHEDULED = "operations-range-scheduled";
//portlet key
- public static final String KEY = "Operations";
+ public static final String KEY = MSG.view_group_contextMenu_operations();
private static final String TITLE = KEY;
- private static String recentOperations = "Recent Operations";
- private static String scheduledOperations = "Scheduled Operations";
- public static String RANGE_DISABLED_MESSAGE = "(Results currently disabled. Change settings to enable results.)";
+ private static String recentOperations = MSG.common_title_recent_operations();
+ private static String scheduledOperations = MSG.common_title_scheduled_operations();
+ public static String RANGE_DISABLED_MESSAGE = MSG.view_portlet_operations_disabled();
//TODO: change this to use the Smart GWT default value.
- public static String RANGE_DISABLED_MESSAGE_DEFAULT = "No items to show.";
+ public static String RANGE_DISABLED_MESSAGE_DEFAULT = MSG.common_msg_noItemsToShow();
//ListGrids for operations
private LocatableListGrid recentOperationsGrid = null;
private LocatableListGrid scheduledOperationsGrid = null;
private DashboardPortlet storedPortlet = null;
private RecentOperationsDataSource dataSourceCompleted;
private ScheduledOperationsDataSource dataSourceScheduled;
- public static String unlimited = "unlimited";
+ public static String unlimited = MSG.common_label_unlimited();
public static String defaultValue = unlimited;
public static boolean defaultEnabled = true;
@@ -103,7 +103,7 @@ public class OperationsPortlet extends LocatableVLayout implements CustomSetting
//defining header span
String[] completedRows = new String[] { RecentOperationsDataSource.FIELD_LOCATION,
RecentOperationsDataSource.FIELD_OPERATION, RecentOperationsDataSource.FIELD_RESOURCE,
- RecentOperationsDataSource.FIELD_STATUS, RecentOperationsDataSource.FIELD_TIME};
+ RecentOperationsDataSource.FIELD_STATUS, RecentOperationsDataSource.FIELD_TIME };
recentOperationsGrid.setHeaderSpans(new HeaderSpan(recentOperations, completedRows));
recentOperationsGrid.setHeaderSpanHeight(20);
recentOperationsGrid.setHeaderHeight(40);
@@ -186,7 +186,7 @@ public class OperationsPortlet extends LocatableVLayout implements CustomSetting
@Override
public Canvas getHelpCanvas() {
- return new HTMLFlow("This portlet displays both operations that have occurred and are scheduled to occur.");
+ return new HTMLFlow(MSG.view_portlet_operations_help_msg());
}
/** Constructs the dynamic form instance using 1 column and multiple row layouts.
@@ -200,7 +200,8 @@ public class OperationsPortlet extends LocatableVLayout implements CustomSetting
VStack column = new VStack();
//label
- LocatableLabel operationRange = new LocatableLabel(extendLocatorId("operation-range"), "Operation Range");
+ LocatableLabel operationRange = new LocatableLabel(extendLocatorId("operation-range"), MSG
+ .common_title_operations_range());
column.addMember(operationRange);
//horizontal layout
@@ -209,7 +210,7 @@ public class OperationsPortlet extends LocatableVLayout implements CustomSetting
//checkbox indicating whether to apply completed operations grouping settings
final CheckboxItem enableCompletedOperationsGrouping = new CheckboxItem();
enableCompletedOperationsGrouping.setName(OPERATIONS_RANGE_COMPLETED_ENABLED);
- enableCompletedOperationsGrouping.setTitle(" show Last ");
+ enableCompletedOperationsGrouping.setTitle(" " + MSG.view_portlet_operations_config_show_last() + " ");
//add change listener
enableCompletedOperationsGrouping.addChangeHandler(new ChangeHandler() {
public void onChange(ChangeEvent event) {
@@ -234,7 +235,8 @@ public class OperationsPortlet extends LocatableVLayout implements CustomSetting
//-------------combobox for number of completed scheduled ops to display on the dashboard
final SelectItem maximumCompletedOperationsComboBox = new SelectItem(OPERATIONS_RANGE_COMPLETED);
maximumCompletedOperationsComboBox.setTitle("");
- maximumCompletedOperationsComboBox.setHint("<nobr><b> completed operations.</b></nobr>");
+ maximumCompletedOperationsComboBox.setHint("<nobr><b> " + MSG.view_portlet_operations_config_completed()
+ + ".</b></nobr>");
//spinder: required to disable editability
maximumCompletedOperationsComboBox.setType("selection");
//define acceptable values for display amount
@@ -271,7 +273,7 @@ public class OperationsPortlet extends LocatableVLayout implements CustomSetting
final CheckboxItem enableScheduledOperationsGrouping = new CheckboxItem();
enableScheduledOperationsGrouping.setName(OPERATIONS_RANGE_SCHEDULED_ENABLED);
- enableScheduledOperationsGrouping.setTitle(" show Next ");
+ enableScheduledOperationsGrouping.setTitle(" " + MSG.view_portlet_operations_config_show_next() + " ");
enableScheduledOperationsGrouping.addChangeHandler(new ChangeHandler() {
public void onChange(ChangeEvent event) {
String selectedItem = "" + event.getValue();
@@ -296,7 +298,8 @@ public class OperationsPortlet extends LocatableVLayout implements CustomSetting
//------------- Build second combobox for timeframe for problem resources search.
final SelectItem maximumScheduledOperationsComboBox = new SelectItem(OPERATIONS_RANGE_SCHEDULED);
maximumScheduledOperationsComboBox.setTitle("");
- maximumScheduledOperationsComboBox.setHint("<nobr><b> scheduled operations.</b></nobr>");
+ maximumScheduledOperationsComboBox.setHint("<nobr><b> " + MSG.common_label_scheduled_operations()
+ + ".</b></nobr>");
maximumScheduledOperationsComboBox.setType("selection");
maximumScheduledOperationsComboBox.setValueMap(acceptableDisplayValues);
maximumScheduledOperationsComboBox.setWidth(100);
@@ -378,21 +381,17 @@ public class OperationsPortlet extends LocatableVLayout implements CustomSetting
}
public ConfigurationDefinition getConfigurationDefinition() {
- ConfigurationDefinition definition = new ConfigurationDefinition("OperationsPortlet Configuration",
- "The configuration settings for the Operations portlet.");
-
- definition.put(new PropertyDefinitionSimple(OPERATIONS_RANGE_COMPLETED,
- "Maximum number of Completed operations to display.", true, PropertySimpleType.STRING));
- definition.put(new PropertyDefinitionSimple(OPERATIONS_RANGE_SCHEDULED,
- "Maximum number of Scheduled operations to display.", true, PropertySimpleType.STRING));
- definition
- .put(new PropertyDefinitionSimple(OPERATIONS_RANGE_COMPLETED_ENABLED,
- "Whether to enable completed operations results grouping for dashboard.", true,
- PropertySimpleType.BOOLEAN));
- definition
- .put(new PropertyDefinitionSimple(OPERATIONS_RANGE_SCHEDULED_ENABLED,
- "Whether to enable scheduled operations results grouping for dashboard.", true,
- PropertySimpleType.BOOLEAN));
+ ConfigurationDefinition definition = new ConfigurationDefinition(MSG.view_portlet_operations_config_title(),
+ MSG.view_portlet_operations_config_title_desc());
+
+ definition.put(new PropertyDefinitionSimple(OPERATIONS_RANGE_COMPLETED, MSG
+ .view_portlet_operations_config_completed_maximum(), true, PropertySimpleType.STRING));
+ definition.put(new PropertyDefinitionSimple(OPERATIONS_RANGE_SCHEDULED, MSG
+ .view_portlet_operations_config_scheduled_maximum(), true, PropertySimpleType.STRING));
+ definition.put(new PropertyDefinitionSimple(OPERATIONS_RANGE_COMPLETED_ENABLED, MSG
+ .view_portlet_operations_config_completed_enable(), true, PropertySimpleType.BOOLEAN));
+ definition.put(new PropertyDefinitionSimple(OPERATIONS_RANGE_SCHEDULED_ENABLED, MSG
+ .view_portlet_operations_config_scheduled_enable(), true, PropertySimpleType.BOOLEAN));
return definition;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/problems/ProblemResourcesPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/problems/ProblemResourcesPortlet.java
index d233d5b..a582132 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/problems/ProblemResourcesPortlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/recent/problems/ProblemResourcesPortlet.java
@@ -60,14 +60,14 @@ public class ProblemResourcesPortlet extends Table implements CustomSettingsPort
//keys for smart gwt elements. should be unique
public static final String PROBLEM_RESOURCE_SHOW_HRS = "max-problems-query-span";
public static final String PROBLEM_RESOURCE_SHOW_MAX = "max-problems-shown";
- public static final String KEY = "Has Alerts or Currently Unavailable";
+ public static final String KEY = MSG.view_portlet_problem_resources_title();
private static final String TITLE = KEY;
private DashboardPortlet storedPortlet;
//reference to datasource
private ProblemResourcesDataSource dataSource;
//constants
- public static final String unlimited = "unlimited";
+ public static final String unlimited = MSG.common_label_unlimited();
public static final String defaultValue = unlimited;
public ProblemResourcesPortlet(String locatorId) {
@@ -150,7 +150,7 @@ public class ProblemResourcesPortlet extends Table implements CustomSettingsPort
@Override
public Canvas getHelpCanvas() {
- return new HTMLFlow("This portlet displays resources that have reported alerts or Down availability.");
+ return new HTMLFlow(MSG.view_portlet_problem_resources_help());
}
/** Build custom for to dispaly the Portlet Configuration settings.
@@ -162,8 +162,9 @@ public class ProblemResourcesPortlet extends Table implements CustomSettingsPort
//-------------combobox for number of resource to display on the dashboard
final SelectItem maximumProblemResourcesComboBox = new SelectItem(PROBLEM_RESOURCE_SHOW_MAX);
- maximumProblemResourcesComboBox.setTitle("Display");
- maximumProblemResourcesComboBox.setHint("<nobr><b> problem resources on dashboard.</b></nobr>");
+ maximumProblemResourcesComboBox.setTitle(MSG.common_title_display());
+ maximumProblemResourcesComboBox.setHint("<nobr><b> "
+ + MSG.view_portlet_problem_resources_config_problem_label() + "</b></nobr>");
//spinder 9/3/10: the following is required workaround to disable editability of combobox.
maximumProblemResourcesComboBox.setType("selection");
//define acceptable values for display amount
@@ -187,8 +188,8 @@ public class ProblemResourcesPortlet extends Table implements CustomSettingsPort
//------------- Build second combobox for timeframe for problem resources search.
final SelectItem maximumTimeProblemResourcesComboBox = new SelectItem(PROBLEM_RESOURCE_SHOW_HRS);
- maximumTimeProblemResourcesComboBox.setTitle("Over ");
- maximumTimeProblemResourcesComboBox.setHint("<nobr><b> hours </b></nobr>");
+ maximumTimeProblemResourcesComboBox.setTitle(MSG.common_title_over() + " ");
+ maximumTimeProblemResourcesComboBox.setHint("<nobr><b> " + MSG.common_label_hours() + " </b></nobr>");
//spinder 9/3/10: the following is required workaround to disable editability of combobox.
maximumTimeProblemResourcesComboBox.setType("selection");
//define acceptable values for display amount
@@ -240,13 +241,13 @@ public class ProblemResourcesPortlet extends Table implements CustomSettingsPort
}
public ConfigurationDefinition getConfigurationDefinition() {
- ConfigurationDefinition definition = new ConfigurationDefinition("ProblemResourcesPortlet Configuration",
- "The configuration settings for the Problem resources portlet.");
+ ConfigurationDefinition definition = new ConfigurationDefinition(MSG
+ .view_portlet_problem_resources_config_title(), MSG.view_portlet_problem_resources_config_title_desc());
- definition.put(new PropertyDefinitionSimple(PROBLEM_RESOURCE_SHOW_MAX,
- "Maximum number of Problem resources to display.", true, PropertySimpleType.INTEGER));
- definition.put(new PropertyDefinitionSimple(PROBLEM_RESOURCE_SHOW_HRS,
- "Show problem resources going back this many hours.", true, PropertySimpleType.INTEGER));
+ definition.put(new PropertyDefinitionSimple(PROBLEM_RESOURCE_SHOW_MAX, MSG
+ .view_portlet_problem_resources_config_display_maximum(), true, PropertySimpleType.INTEGER));
+ definition.put(new PropertyDefinitionSimple(PROBLEM_RESOURCE_SHOW_HRS, MSG
+ .view_portlet_problem_resources_config_display_range(), true, PropertySimpleType.INTEGER));
return definition;
}
@@ -273,7 +274,7 @@ public class ProblemResourcesPortlet extends Table implements CustomSettingsPort
}
}
//remove selected count as portlet is view only. Selection not used.
- getTableInfo().setContents("Total: " + getListGrid().getTotalRows());
+ getTableInfo().setContents(MSG.common_title_total() + ": " + getListGrid().getTotalRows());
}
}
@@ -301,7 +302,9 @@ class TimeRange extends LocatableHLayout implements TableWidget {
@Override
public void refresh(ListGrid listGrid) {
this.label.setWidth(400);
- this.label.setContents("From " + portlet.getTimeRange()[0] + " to " + portlet.getTimeRange()[1]);
+ // this.label.setContents("From " + portlet.getTimeRange()[0] + " to " + portlet.getTimeRange()[1]);
+ this.label.setContents(MSG.view_portlet_problem_resources_config_display_range2(portlet.getTimeRange()[0],
+ portlet.getTimeRange()[1]));
}
@Override
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/summary/InventorySummaryView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/summary/InventorySummaryView.java
index e012146..09013ef 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/summary/InventorySummaryView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/summary/InventorySummaryView.java
@@ -49,7 +49,7 @@ public class InventorySummaryView extends LocatableVLayout implements Portlet {
private ResourceBossGWTServiceAsync resourceBossService = GWTServiceLookup.getResourceBossService();
private LocatableDynamicForm form;
- public static final String KEY = "Summary Counts";
+ public static final String KEY = MSG.common_title_summary_counts();
public InventorySummaryView(String locatorId) {
super(locatorId);
@@ -60,7 +60,7 @@ public class InventorySummaryView extends LocatableVLayout implements Portlet {
private void loadInventoryViewDiata() {
resourceBossService.getInventorySummaryForLoggedInUser(new AsyncCallback<InventorySummary>() {
public void onFailure(Throwable throwable) {
- CoreGUI.getErrorHandler().handleError("Failed to retrieve inventory summary", throwable);
+ CoreGUI.getErrorHandler().handleError(MSG.view_portlet_inventory_error1(), throwable);
}
public void onSuccess(InventorySummary summary) {
@@ -71,33 +71,34 @@ public class InventorySummaryView extends LocatableVLayout implements Portlet {
// headerItem.setValue("Inventory Summary");
// formItems.add(headerItem);
- StaticTextItem platformTotal = createSummaryRow("platformTotal", "Platform Total", summary
- .getPlatformCount(), "Inventory/Resources/Platforms");
+ StaticTextItem platformTotal = createSummaryRow("platformTotal", MSG.common_title_platform_total(),
+ summary.getPlatformCount(), "Inventory/Resources/Platforms");
formItems.add(platformTotal);
- StaticTextItem serverTotal = createSummaryRow("serverTotal", "Server Total", summary.getServerCount(),
- "Inventory/Resources/Servers");
+ StaticTextItem serverTotal = createSummaryRow("serverTotal", MSG.common_title_server_total(), summary
+ .getServerCount(), "Inventory/Resources/Servers");
formItems.add(serverTotal);
- StaticTextItem serviceTotal = createSummaryRow("serviceTotal", "Service Total", summary
- .getServiceCount(), "Inventory/Resources/Services");
+ StaticTextItem serviceTotal = createSummaryRow("serviceTotal", MSG.common_title_service_total(),
+ summary.getServiceCount(), "Inventory/Resources/Services");
formItems.add(serviceTotal);
- StaticTextItem compatibleGroupTotal = createSummaryRow("compatibleGroupTotal",
- "Compatible Group Total", summary.getCompatibleGroupCount(), "Inventory/Groups/CompatibleGroups");
+ StaticTextItem compatibleGroupTotal = createSummaryRow("compatibleGroupTotal", MSG
+ .common_title_compatibleGroups_total(), summary.getCompatibleGroupCount(),
+ "Inventory/Groups/CompatibleGroups");
formItems.add(compatibleGroupTotal);
- StaticTextItem mixedGroupTotal = createSummaryRow("mixedGroupTotal", "Mixed Group Total", summary
- .getMixedGroupCount(), "Inventory/Groups/MixedGroups");
+ StaticTextItem mixedGroupTotal = createSummaryRow("mixedGroupTotal", MSG
+ .common_title_mixedGroups_total(), summary.getMixedGroupCount(), "Inventory/Groups/MixedGroups");
formItems.add(mixedGroupTotal);
- StaticTextItem groupDefinitionTotal = createSummaryRow("groupDefinitionTotal",
- "Group Definition Total", summary.getGroupDefinitionCount(), "Inventory/Groups/DynagroupManager");
+ StaticTextItem groupDefinitionTotal = createSummaryRow("groupDefinitionTotal", MSG
+ .common_title_group_def_total(), summary.getGroupDefinitionCount(),
+ "Inventory/Groups/DynagroupManager");
formItems.add(groupDefinitionTotal);
- StaticTextItem avergeMetricsTotal = createSummaryRow("averageMetricsTotal",
- "Average Metrics per Minute", summary.getScheduledMeasurementsPerMinute(),
- null);
+ StaticTextItem avergeMetricsTotal = createSummaryRow("averageMetricsTotal", MSG
+ .common_title_average_metrics(), summary.getScheduledMeasurementsPerMinute(), null);
formItems.add(avergeMetricsTotal);
form.setItems(formItems.toArray(new FormItem[formItems.size()]));
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/summary/TagCloudPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/summary/TagCloudPortlet.java
index db78ffc..374d482 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/summary/TagCloudPortlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/summary/TagCloudPortlet.java
@@ -36,7 +36,7 @@ import org.rhq.enterprise.gui.coregui.client.report.tag.TagCloudView;
*/
public class TagCloudPortlet extends TagCloudView implements Portlet {
- public static final String KEY = "TagCloud";
+ public static final String KEY = MSG.view_portlet_tagCloud_title();
public TagCloudPortlet(String locatorId) {
super(locatorId, true);
@@ -47,8 +47,8 @@ public class TagCloudPortlet extends TagCloudView implements Portlet {
}
public Canvas getHelpCanvas() {
- return new HTMLFlow("The <b>Tag Cloud</b> portlet displays the relative tag counts in the system visible "
- + "to the current user.");
+ return new HTMLFlow(MSG.common_title_the() + " <b>" + MSG.common_title_tag_cloud() + "</b> "
+ + MSG.view_portlet_tagCloud_help());
}
public static final class Factory implements PortletViewFactory {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/util/MashupPortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/util/MashupPortlet.java
index 48f3a0e..8d6af1c 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/util/MashupPortlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/util/MashupPortlet.java
@@ -41,7 +41,7 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableHTMLPane;
*/
public class MashupPortlet extends LocatableHTMLPane implements ConfigurablePortlet {
- public static final String KEY = "Mashup";
+ public static final String KEY = MSG.common_title_mashup();
public MashupPortlet(String locatorId) {
super(locatorId);
@@ -58,19 +58,20 @@ public class MashupPortlet extends LocatableHTMLPane implements ConfigurablePort
if (url != null) {
setContentsURL(url);
} else {
- setContents("<i>Page address not yet configured, click the settings button to setup this portlet.");
+ setContents("<i>" + MSG.view_portlet_mashup_unconfigured());
}
}
public Canvas getHelpCanvas() {
- return new HTMLFlow("This portlet can include a web page via an HTTP request into an iframe on the dashboard.");
+ return new HTMLFlow(MSG.view_portlet_mashup_help());
}
public ConfigurationDefinition getConfigurationDefinition() {
- ConfigurationDefinition definition = new ConfigurationDefinition("MashupPorlet Configuration",
- "The configuration settings for the mashup portlet.");
+ ConfigurationDefinition definition = new ConfigurationDefinition(MSG.view_portlet_mashup_config_title(), MSG
+ .view_portlet_mashup_config_title_desc());
- definition.put(new PropertyDefinitionSimple("address", "Web Address", true, PropertySimpleType.STRING));
+ definition.put(new PropertyDefinitionSimple("address", MSG.common_title_web_address(), true,
+ PropertySimpleType.STRING));
return definition;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/util/MessagePortlet.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/util/MessagePortlet.java
index f72bd8c..bb37906 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/util/MessagePortlet.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/portlets/util/MessagePortlet.java
@@ -41,7 +41,7 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableHTMLPane;
*/
public class MessagePortlet extends LocatableHTMLPane implements ConfigurablePortlet {
- public static final String KEY = "Message";
+ public static final String KEY = MSG.view_portlet_message_title();
public MessagePortlet(String locatorId) {
super(locatorId);
@@ -53,19 +53,20 @@ public class MessagePortlet extends LocatableHTMLPane implements ConfigurablePor
if (contents != null) {
setContents(contents);
} else {
- setContents("<i>Message not yet configured, click the settings button to setup this portlet.");
+ setContents("<i>" + MSG.view_portlet_message_unconfigured());
}
}
public Canvas getHelpCanvas() {
- return new HTMLFlow("This portlet can display an HTML message on the dashboard.");
+ return new HTMLFlow(MSG.view_portlet_message_help());
}
public ConfigurationDefinition getConfigurationDefinition() {
- ConfigurationDefinition definition = new ConfigurationDefinition("MessagePortlet Configuration",
- "The configuration settings for the message portlet.");
+ ConfigurationDefinition definition = new ConfigurationDefinition(MSG.view_portlet_message_config_title(), MSG
+ .view_portlet_message_config_title_desc());
- definition.put(new PropertyDefinitionSimple("message", "Message", true, PropertySimpleType.LONG_STRING));
+ definition.put(new PropertyDefinitionSimple("message", MSG.view_portlet_message_title(), true,
+ PropertySimpleType.LONG_STRING));
return definition;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/store/DashboardManager.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/store/DashboardManager.java
index bf53761..7bd5225 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/store/DashboardManager.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/dashboard/store/DashboardManager.java
@@ -22,12 +22,11 @@
*/
package org.rhq.enterprise.gui.coregui.client.dashboard.store;
-import java.util.HashSet;
-
import com.google.gwt.user.client.rpc.AsyncCallback;
import org.rhq.core.domain.dashboard.Dashboard;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.Messages;
import org.rhq.enterprise.gui.coregui.client.gwt.DashboardGWTServiceAsync;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.util.message.Message;
@@ -36,20 +35,20 @@ import org.rhq.enterprise.gui.coregui.client.util.message.Message;
* @author Greg Hinkle
*/
public class DashboardManager {
-
-
+ private static Messages MSG = CoreGUI.getMessages();
private static DashboardGWTServiceAsync dashboardService = GWTServiceLookup.getDashboardService();
-
public static void storeDashboard(final Dashboard dashboard) {
dashboardService.storeDashboard(dashboard, new AsyncCallback<Dashboard>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to store dashboard to server " + dashboard.getName() ,caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_dashboardManager_error() + " " + dashboard.getName(),
+ caught);
}
public void onSuccess(Dashboard result) {
- CoreGUI.getMessageCenter().notify(new Message("Saved dashboard " + result.getName(), Message.Severity.Info));
+ CoreGUI.getMessageCenter().notify(
+ new Message(MSG.view_dashboardManager_success() + " " + result.getName(), Message.Severity.Info));
}
});
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/footer/FavoritesButton.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/footer/FavoritesButton.java
index 5557d50..39e3094 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/footer/FavoritesButton.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/footer/FavoritesButton.java
@@ -44,7 +44,7 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableIMenuButton;
public class FavoritesButton extends LocatableIMenuButton {
public FavoritesButton(String locatorId) {
- super(locatorId, "Favorites");
+ super(locatorId, MSG.common_title_favorites());
final Menu favoritesMenu = new Menu();
setMenu(favoritesMenu);
@@ -83,7 +83,7 @@ public class FavoritesButton extends LocatableIMenuButton {
GWTServiceLookup.getResourceService().findResourcesByCriteria(criteria,
new AsyncCallback<PageList<Resource>>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to load favorite Resources.", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_dashboard_favorites_error1(), caught);
}
public void onSuccess(PageList<Resource> resources) {
13 years, 7 months
[rhq] modules/enterprise
by mazz
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit e3cadf857241ca60edd4f008f0663c319a30c3fe
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Nov 17 17:41:46 2010 -0500
autofit the tree grid rows
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
index 2a0357f..a7eebd0 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
@@ -24,6 +24,7 @@ import java.util.List;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.data.Criteria;
import com.smartgwt.client.data.DataSource;
+import com.smartgwt.client.types.Autofit;
import com.smartgwt.client.types.SelectionAppearance;
import com.smartgwt.client.types.VerticalAlignment;
import com.smartgwt.client.widgets.HTMLFlow;
@@ -129,6 +130,9 @@ public class ResourceAutodiscoveryView extends LocatableVLayout {
treeGrid.setDataSource(dataSource);
treeGrid.setAutoFetchData(true);
treeGrid.setResizeFieldsInRealTime(true);
+ treeGrid.setAutoFitData(Autofit.HORIZONTAL);
+ treeGrid.setWrapCells(true);
+ treeGrid.setFixedRecordHeights(false);
final TreeGridField name, key, type, description, status, ctime;
name = new TreeGridField("name");
13 years, 7 months
[rhq] modules/enterprise
by Joseph Marques
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/alert/AlertEditOldStyleView.java | 206 ----
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/alert/AlertEditView.java | 455 ----------
2 files changed, 661 deletions(-)
New commits:
commit f635f52fbe0e71464d95f36cfd3babf141bd00d9
Author: Joseph Marques <joseph(a)redhat.com>
Date: Wed Nov 17 17:25:44 2010 -0500
remove files that are no longer used
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/alert/AlertEditOldStyleView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/alert/AlertEditOldStyleView.java
deleted file mode 100644
index 74f8f17..0000000
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/alert/AlertEditOldStyleView.java
+++ /dev/null
@@ -1,206 +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.inventory.resource.detail.alert;
-
-import java.util.LinkedHashMap;
-
-import com.smartgwt.client.widgets.Window;
-import com.smartgwt.client.widgets.form.DynamicForm;
-import com.smartgwt.client.widgets.form.ValuesManager;
-import com.smartgwt.client.widgets.form.fields.HeaderItem;
-import com.smartgwt.client.widgets.form.fields.RadioGroupItem;
-import com.smartgwt.client.widgets.form.fields.SelectItem;
-import com.smartgwt.client.widgets.form.fields.SpacerItem;
-import com.smartgwt.client.widgets.form.fields.TextAreaItem;
-import com.smartgwt.client.widgets.form.fields.TextItem;
-import com.smartgwt.client.widgets.layout.VLayout;
-
-import org.rhq.core.domain.alert.AlertPriority;
-import org.rhq.enterprise.gui.coregui.client.components.form.RadioGroupWithComponentsItem;
-
-/**
- * @author Greg Hinkle
- */
-public class AlertEditOldStyleView extends VLayout {
-
- public AlertEditOldStyleView() {
- setWidth100();
- }
-
-
- public void displayAsDialog() {
- Window window = new Window();
- window.setTitle("Alert Editor");
- window.setWidth(800);
- window.setHeight(800);
- window.setIsModal(true);
- window.setShowModalMask(true);
- window.setCanDragResize(true);
- window.centerInPage();
- window.addItem(this);
- window.show();
- }
-
-
- @Override
- protected void onDraw() {
- super.onDraw();
-
- addMember(buildEditForm());
-
-
- }
-
-
- public DynamicForm buildEditForm() {
-
- ValuesManager vm = new ValuesManager();
- DynamicForm form = new DynamicForm();
- form.setTitleSuffix("");
- form.setValuesManager(vm);
-
- HeaderItem alertPropertiesHeader = new HeaderItem();
- alertPropertiesHeader.setValue("Alert Properties");
-
- TextItem alertName = new TextItem("alertName", "Name");
- alertName.setRequired(true);
-
- TextAreaItem description = new TextAreaItem("alertDescription", "Description");
-
- SelectItem priority = new SelectItem("alertPriority", "Priority");
- LinkedHashMap<String, String> valueMap = new LinkedHashMap<String, String>();
- valueMap.put(AlertPriority.LOW.name(), "Low");
- valueMap.put(AlertPriority.MEDIUM.name(), "Medium");
- valueMap.put(AlertPriority.HIGH.name(), "High");
- priority.setValueMap(valueMap);
- priority.setImageURLPrefix("alerts/Alert_");
- priority.setImageURLSuffix("_16.png");
- priority.setValue("LOW");
-
-
-
- RadioGroupItem active = new RadioGroupItem("alertActive","Active");
- active.setValueMap("Yes","No");
- active.setValue("Yes");
-
-
-
- HeaderItem conditionsHeader = new HeaderItem();
- conditionsHeader.setValue("Alert Conditions");
-
- LinkedHashMap valuesMap = new LinkedHashMap();
-
- valuesMap.put("Metric", buildMetricSectionCavans(vm));
-
- valuesMap.put("InventoryProperty", buildInventoryPropertySectionCavans(vm));
- valuesMap.put("Event", "Events");
- valuesMap.put("Configuration", "Configuration Change");
-
-
- RadioGroupWithComponentsItem conditionGroup = new RadioGroupWithComponentsItem("radioTest", "Test", valuesMap, form);
-
-
-
-
- form.setItems(alertPropertiesHeader, alertName, description, priority, active, conditionsHeader, conditionGroup);
-
-
- return form;
-
- }
-
- private DynamicForm buildMetricSectionCavans(ValuesManager vm) {
-
- DynamicForm form = new DynamicForm();
- form.setTitleSuffix("");
- form.setColWidths("10%");
- form.setValuesManager(vm);
-
-
- SelectItem metricSelect = new SelectItem("metric", "Metric");
- metricSelect.setRequired(true);
- metricSelect.setEmptyDisplayValue("Select...");
- metricSelect.setValueMap("CPU Usage", "Free Memory", "Swap Used", "User CPU", "System CPU");
-
-
- LinkedHashMap valueMap = new LinkedHashMap();
-
-
- DynamicForm subForm1 = new DynamicForm();
- subForm1.setTitleSuffix("");
- subForm1.setValuesManager(vm);
- subForm1.setNumCols(6);
- SelectItem metricConditionComparison = new SelectItem("metricConditionKind", "is");
- metricConditionComparison.setValueMap("> (greater than)", "= (equals)", "< (less than)");
-
- TextItem metricConditionValue = new TextItem("metricConditionValue");
- metricConditionValue.setShowTitle(false);
- metricConditionValue.setHint("Absolute Value");
-
- subForm1.setItems(metricConditionComparison, metricConditionValue);
-
- valueMap.put("Value", subForm1);
-
-
- DynamicForm subForm2 = new DynamicForm();
- subForm2.setTitleSuffix("");
- subForm2.setValuesManager(vm);
- subForm2.setNumCols(8);
- SelectItem baselineConditionComparison = new SelectItem("baselineConditionKind", "is");
- baselineConditionComparison.setValueMap("> (greater than)", "= (equals)", "< (less than)");
-
- TextItem baselineConditionValue = new TextItem("baselineConditionValue");
- baselineConditionValue.setShowTitle(false);
- baselineConditionValue.setHint("%");
-
- SelectItem baselineRange = new SelectItem("baselineRange", "of");
- baselineRange.setValueMap("25 MB (min value)", "78 MB (avg value)", "322 MB (Max Value)");
-
- subForm2.setItems(baselineConditionComparison, baselineConditionValue, baselineRange);
-
-
- valueMap.put("Baseline", subForm2);
-
-
- valueMap.put("valueChanges", "Value Changes");
-
-
- RadioGroupWithComponentsItem metricConditionType = new RadioGroupWithComponentsItem("metricConditionType", null, valueMap, form);
- metricConditionType.setShowTitle(false);
-
- form.setItems(metricSelect, new SpacerItem(), metricConditionType);
- return form;
- }
-
-
- private DynamicForm buildInventoryPropertySectionCavans(ValuesManager vm) {
- DynamicForm form = new DynamicForm();
- form.setValuesManager(vm);
-
-
- SelectItem inventoryProperty = new SelectItem("inventoryPropert", "Inventory Property");
- inventoryProperty.setValueMap("OS Version", "Architecture", "Vendor", "RAM", "CPU Speed");
- inventoryProperty.setHint("value changes");
-
- form.setItems(inventoryProperty);
-
-
- return form;
- }
-}
\ No newline at end of file
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/alert/AlertEditView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/alert/AlertEditView.java
deleted file mode 100644
index f9ed1b2..0000000
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/alert/AlertEditView.java
+++ /dev/null
@@ -1,455 +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.inventory.resource.detail.alert;
-
-import java.util.ArrayList;
-import java.util.EnumSet;
-import java.util.LinkedHashMap;
-
-import com.smartgwt.client.widgets.Canvas;
-import com.smartgwt.client.widgets.Label;
-import com.smartgwt.client.widgets.Window;
-import com.smartgwt.client.widgets.form.DynamicForm;
-import com.smartgwt.client.widgets.form.FormItemIfFunction;
-import com.smartgwt.client.widgets.form.ValuesManager;
-import com.smartgwt.client.widgets.form.fields.BlurbItem;
-import com.smartgwt.client.widgets.form.fields.CanvasItem;
-import com.smartgwt.client.widgets.form.fields.FormItem;
-import com.smartgwt.client.widgets.form.fields.HeaderItem;
-import com.smartgwt.client.widgets.form.fields.RadioGroupItem;
-import com.smartgwt.client.widgets.form.fields.SelectItem;
-import com.smartgwt.client.widgets.form.fields.SpacerItem;
-import com.smartgwt.client.widgets.form.fields.StaticTextItem;
-import com.smartgwt.client.widgets.form.fields.TextAreaItem;
-import com.smartgwt.client.widgets.form.fields.TextItem;
-import com.smartgwt.client.widgets.form.fields.events.ChangedEvent;
-import com.smartgwt.client.widgets.form.fields.events.ChangedHandler;
-import com.smartgwt.client.widgets.form.fields.events.ClickEvent;
-import com.smartgwt.client.widgets.form.fields.events.ClickHandler;
-import com.smartgwt.client.widgets.layout.VLayout;
-
-import org.rhq.core.domain.alert.AlertConditionCategory;
-import org.rhq.core.domain.alert.AlertPriority;
-import org.rhq.core.domain.measurement.DataType;
-import org.rhq.core.domain.measurement.MeasurementDefinition;
-import org.rhq.core.domain.operation.OperationDefinition;
-import org.rhq.core.domain.resource.Resource;
-import org.rhq.core.domain.resource.ResourceType;
-import org.rhq.enterprise.gui.coregui.client.components.form.RadioGroupWithComponentsItem;
-import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository;
-
-/**
- * @author Greg Hinkle
- */
-public class AlertEditView extends VLayout {
-
- private Resource resource;
- private ResourceType resourceType;
-
- public AlertEditView(Resource resource) {
- this.resource = resource;
- setWidth100();
- }
-
-
- public void displayAsDialog() {
- Window window = new Window();
- window.setTitle("Alert Editor");
- window.setWidth(800);
- window.setHeight(800);
- window.setIsModal(true);
- window.setShowModalMask(true);
- window.setCanDragResize(true);
- window.centerInPage();
- window.addItem(this);
- window.show();
- }
-
-
- @Override
- protected void onDraw() {
- super.onDraw();
-
- ResourceTypeRepository.Cache.getInstance().getResourceTypes(resource.getResourceType().getId(),
- EnumSet.of(ResourceTypeRepository.MetadataType.measurements, ResourceTypeRepository.MetadataType.operations),
- new ResourceTypeRepository.TypeLoadedCallback() {
- public void onTypesLoaded(ResourceType type) {
- resourceType = type;
- addMember(buildEditForm());
-
- addMember(buildConditionSection(0));
- }
- });
- }
-
-
- public DynamicForm buildEditForm() {
-
- ValuesManager vm = new ValuesManager();
- DynamicForm form = new DynamicForm();
- form.setNumCols(4);
- form.setTitleSuffix("");
- form.setValuesManager(vm);
-
- HeaderItem alertPropertiesHeader = new HeaderItem();
- alertPropertiesHeader.setValue("Alert Properties");
-
- TextItem alertName = new TextItem("alertName", "Name");
- alertName.setRequired(true);
-
- TextAreaItem description = new TextAreaItem("alertDescription", "Description");
-
- SelectItem priority = new SelectItem("alertPriority", "Priority");
- LinkedHashMap<String, String> valueMap = new LinkedHashMap<String, String>();
- valueMap.put(AlertPriority.LOW.name(), "Low");
- valueMap.put(AlertPriority.MEDIUM.name(), "Medium");
- valueMap.put(AlertPriority.HIGH.name(), "High");
- priority.setValueMap(valueMap);
-
- LinkedHashMap<String, String> iconMap = new LinkedHashMap<String, String>();
- iconMap.put(AlertPriority.LOW.name(), AlertPriority.LOW.name());
- iconMap.put(AlertPriority.MEDIUM.name(), AlertPriority.MEDIUM.name());
- iconMap.put(AlertPriority.HIGH.name(), AlertPriority.HIGH.name());
- priority.setValueIcons(iconMap);
- priority.setImageURLPrefix("subsystems/alert/Alert_");
- priority.setImageURLSuffix("_16.png");
- priority.setValue("LOW");
-
-
- RadioGroupItem active = new RadioGroupItem("alertActive", "Active");
-
- active.setValueMap("Yes", "No");
- active.setValue("Yes");
-
-
- HeaderItem conditionsHeader = new HeaderItem();
- conditionsHeader.setValue("Alert Conditions");
-
-
-/*
- LinkedHashMap valuesMap = new LinkedHashMap();
- valuesMap.put("Metric", buildMetricSectionCavans(vm));
- valuesMap.put("InventoryProperty", buildInventoryPropertySectionCavans(vm));
- valuesMap.put("Event", "Events");
- valuesMap.put("Configuration", "Configuration Change");
- RadioGroupWithComponentsItem conditionGroup = new RadioGroupWithComponentsItem("radioTest", "Test", valuesMap, form);
-*/
-
- form.setItems(alertPropertiesHeader, alertName, priority, description, active, conditionsHeader);
-
-
- return form;
-
- }
-
-
- /*
- AVAILABILITY("Resource Availability"), //
- THRESHOLD("Measurement Threshold"), //
- BASELINE("Measurement Baseline"), //
- CHANGE("Measurement Value Change"), //
- TRAIT("Measurement Trait"), //
- CONTROL("Control Action"), //
- ALERT("Alert Fired"), //
- RESOURCE_CONFIG("Resource Configuration Property Value Change"), //
- EVENT("Log Event");
- */
-
-
- private DynamicForm buildConditionSection(final int ci) {
-
- final DynamicForm form = new DynamicForm();
-
- ValuesManager vm = new ValuesManager();
- form.setValuesManager(vm);
-
- form.setNumCols(3);
- form.setColWidths("30", "120", "*");
- ArrayList<FormItem> items = new ArrayList<FormItem>();
-
-
- RadioGroupItem conditionType = new RadioGroupItem("conditionType" + ci, "Condition Type");
- conditionType.setImageURLPrefix("subsystems/");
- conditionType.setImageURLSuffix("_16.png");
- items.add(conditionType);
-
- LinkedHashMap<String, String> valueMap = new LinkedHashMap<String, String>();
- valueMap.put(AlertConditionCategory.AVAILABILITY.name(), AlertConditionCategory.AVAILABILITY.getDisplayName());
- valueMap.put("metric", "Metric");
- valueMap.put(AlertConditionCategory.TRAIT.name(), AlertConditionCategory.TRAIT.getDisplayName());
- valueMap.put(AlertConditionCategory.CONTROL.name(), AlertConditionCategory.CONTROL.getDisplayName());
- valueMap.put(AlertConditionCategory.EVENT.name(), AlertConditionCategory.EVENT.getDisplayName());
- conditionType.setValueMap(valueMap);
- conditionType.setRedrawOnChange(true);
-
-
- LinkedHashMap<String, String> iconMap = new LinkedHashMap<String, String>();
- iconMap.put(AlertConditionCategory.AVAILABILITY.name(), "availability/availability_red");
- iconMap.put("metric", "monitor/Monitor_failed");
- iconMap.put(AlertConditionCategory.TRAIT.name(), "inventory/Inventory");
- iconMap.put(AlertConditionCategory.CONTROL.name(), "control/Operation");
- iconMap.put(AlertConditionCategory.EVENT.name(), "event/Events_error");
-
- conditionType.setValueIcons(iconMap);
- conditionType.setValue(AlertConditionCategory.AVAILABILITY.name());
-// conditionType.setValueIconSize(24);http://localhost:7080/coregui/images/availability/availability_red
- conditionType.setShowIcons(true);
-
-/*
- for (final String key : valueMap.keySet()) {
- BlurbItem icon = new BlurbItem();
- icon.setColSpan(1);
- icon.setEndRow(false);
- icon.setValue(Canvas.imgHTML("subsystems/" + iconMap.get(key) + "_24.png"));
- icon.setShowTitle(false);
- icon.setWidth(30);
- icon.setHeight(30);
- items.add(icon);
-
- final RadioGroupItem radio = new RadioGroupItem("conditionType" + ci);
- radio.setStartRow(false);
- radio.setShowTitle(false);
- radio.setValueMap(valueMap.get(key));
- radio.setRedrawOnChange(true);
- items.add(radio);
-
- icon.addClickHandler(new ClickHandler() {
- public void onClick(ClickEvent clickEvent) {
- radio.setValue(key);
- }
- });
-
- }*/
-
- CanvasItem availCanvas = buildAvailabilitySectionCanvas(vm);
- availCanvas.setShowIfCondition(new FormItemIfFunction() {
- public boolean execute(FormItem formItem, Object o, DynamicForm dynamicForm) {
- return AlertConditionCategory.AVAILABILITY.name().equals(form.getValue("conditionType" + ci));
- }
- });
- items.add(availCanvas);
-
- CanvasItem metricCanvas = buildMetricSectionCavans(vm);
- metricCanvas.setShowIfCondition(new FormItemIfFunction() {
- public boolean execute(FormItem formItem, Object o, DynamicForm dynamicForm) {
- return "metric".equals(form.getValue("conditionType" + ci));
- }
- });
- items.add(metricCanvas);
-
-
- CanvasItem propertyCanvas = buildInventoryPropertySectionCavans(vm);
- propertyCanvas.setShowIfCondition(new FormItemIfFunction() {
- public boolean execute(FormItem formItem, Object o, DynamicForm dynamicForm) {
- return AlertConditionCategory.TRAIT.name().equals(form.getValue("conditionType" + ci));
- }
- });
- items.add(propertyCanvas);
-
-
- CanvasItem operationCanvas = buildOperationsSectionCanvas(vm);
- operationCanvas.setShowIfCondition(new FormItemIfFunction() {
- public boolean execute(FormItem formItem, Object o, DynamicForm dynamicForm) {
- return AlertConditionCategory.CONTROL.name().equals(form.getValue("conditionType" + ci));
- }
- });
- items.add(operationCanvas);
-
-
- form.setItems(items.toArray(new FormItem[items.size()]));
- return form;
- }
-
- private CanvasItem buildAvailabilitySectionCanvas(ValuesManager vm) {
- DynamicForm form = new DynamicForm();
- form.setTitleSuffix("");
- form.setColWidths("10%");
- form.setValuesManager(vm);
-
-
- SelectItem metricSelect = new SelectItem("availChange", "Avaialability Change");
- metricSelect.setRequired(true);
- metricSelect.setEmptyDisplayValue("Select...");
- metricSelect.setValueMap("Goes UP", "Goes DOWN");
-
-
- form.setItems(metricSelect);
-
-
- CanvasItem canvasItem = new CanvasItem("metricConditionCanvas");
- canvasItem.setShowTitle(false);
- canvasItem.setCanvas(form);
-
- return canvasItem;
-
- }
-
- private CanvasItem buildOperationsSectionCanvas(ValuesManager vm) {
- final DynamicForm form = new DynamicForm();
- form.setTitleSuffix("");
- form.setColWidths("10%");
- form.setValuesManager(vm);
-
-
- final SelectItem operationSelect = new SelectItem("operation", "Operation");
- operationSelect.setRequired(true);
- operationSelect.setEmptyDisplayValue("Select...");
- operationSelect.setShowHint(true);
-
-
- LinkedHashMap<String, String> operations = new LinkedHashMap<String, String>();
- for (OperationDefinition def : resourceType.getOperationDefinitions()) {
- operations.put(def.getName(), def.getDisplayName());
- }
- operationSelect.setValueMap(operations);
- operationSelect.setRedrawOnChange(true);
-
- operationSelect.addChangedHandler(new ChangedHandler() {
- public void onChanged(ChangedEvent changedEvent) {
- for (OperationDefinition def : resourceType.getOperationDefinitions()) {
-
- if (def.getName().equals(operationSelect.getValue())) {
- operationSelect.setHint(def.getDescription());
- }
- }
- }
- });
-
-
- form.setItems(operationSelect);
-
- CanvasItem canvasItem = new CanvasItem("operationConditionCanvas");
- canvasItem.setShowTitle(false);
- canvasItem.setCanvas(form);
-
- return canvasItem;
-
- }
-
- private CanvasItem buildMetricSectionCavans(ValuesManager vm) {
-
- DynamicForm form = new DynamicForm();
- form.setTitleSuffix("");
- form.setColWidths("10%", "90%");
- form.setValuesManager(vm);
-
-
- final SelectItem metricSelect = new SelectItem("metric", "Metric");
- metricSelect.setRequired(true);
- metricSelect.setEmptyDisplayValue("Select...");
- metricSelect.setWidth(200);
-
- LinkedHashMap<String, String> metrics = new LinkedHashMap<String, String>();
- for (MeasurementDefinition def : resourceType.getMetricDefinitions()) {
- if (def.getDataType() == DataType.MEASUREMENT) {
- metrics.put(def.getName(), def.getDisplayName());
- }
- }
- metricSelect.setValueMap(metrics);
-
-
- metricSelect.addChangedHandler(new ChangedHandler() {
- public void onChanged(ChangedEvent changedEvent) {
- for (MeasurementDefinition def : resourceType.getMetricDefinitions()) {
-
- if (def.getName().equals(metricSelect.getValue())) {
- metricSelect.setHint(def.getDescription());
- }
- }
- }
- });
-
-
-
-
-
- LinkedHashMap valueMap = new LinkedHashMap();
-
-
- DynamicForm subForm1 = new DynamicForm();
- subForm1.setTitleSuffix("");
- subForm1.setValuesManager(vm);
- subForm1.setNumCols(6);
- SelectItem metricConditionComparison = new SelectItem("metricConditionKind", "is");
- metricConditionComparison.setValueMap("> (greater than)", "= (equals)", "< (less than)");
-
- TextItem metricConditionValue = new TextItem("metricConditionValue");
- metricConditionValue.setShowTitle(false);
- metricConditionValue.setHint("Absolute Value");
-
- subForm1.setItems(metricConditionComparison, metricConditionValue);
-
- valueMap.put("Value", subForm1);
-
-
- DynamicForm subForm2 = new DynamicForm();
- subForm2.setTitleSuffix("");
- subForm2.setValuesManager(vm);
- subForm2.setNumCols(8);
- SelectItem baselineConditionComparison = new SelectItem("baselineConditionKind", "is");
- baselineConditionComparison.setValueMap("> (greater than)", "= (equals)", "< (less than)");
-
- TextItem baselineConditionValue = new TextItem("baselineConditionValue");
- baselineConditionValue.setShowTitle(false);
- baselineConditionValue.setHint("%");
-
- SelectItem baselineRange = new SelectItem("baselineRange", "of");
- baselineRange.setValueMap("25 MB (min value)", "78 MB (avg value)", "322 MB (Max Value)");
-
- subForm2.setItems(baselineConditionComparison, baselineConditionValue, baselineRange);
-
-
- valueMap.put("Baseline", subForm2);
-
-
- valueMap.put("valueChanges", new Label("Value Changes"));
-
-
- RadioGroupWithComponentsItem metricConditionType = new RadioGroupWithComponentsItem("metricConditionType", null, valueMap, form);
- metricConditionType.setShowTitle(false);
-
- form.setItems(metricSelect, new SpacerItem(), metricConditionType);
-
- CanvasItem canvasItem = new CanvasItem("metricConditionCanvas");
- canvasItem.setShowTitle(false);
- canvasItem.setCanvas(form);
-
- return canvasItem;
- }
-
-
- private CanvasItem buildInventoryPropertySectionCavans(ValuesManager vm) {
- DynamicForm form = new DynamicForm();
- form.setValuesManager(vm);
-
-
- SelectItem inventoryProperty = new SelectItem("inventoryPropert", "Inventory Property");
- inventoryProperty.setValueMap("OS Version", "Architecture", "Vendor", "RAM", "CPU Speed");
- inventoryProperty.setHint("value changes");
-
- form.setItems(inventoryProperty);
-
-
- CanvasItem canvasItem = new CanvasItem("inventoryPropertyCanvas");
- canvasItem.setShowTitle(false);
- canvasItem.setCanvas(form);
-
- return canvasItem;
- }
-}
13 years, 7 months
[rhq] 2 commits - modules/enterprise
by mazz
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/AutodiscoveryQueueDataSource.java | 41 +++-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java | 30 ++-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryConfigurationStep.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryCreateWizard.java | 35 ++--
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryImportWizard.java | 12 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryInfoStep.java | 2
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryPackageStep.java | 8
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/ResourceGroupSelector.java | 6
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/ResourcePicker.java | 9 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/ResourceSelector.java | 10 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/SelectedResourceDataSource.java | 13 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/SingleResourcePicker.java | 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/PluginTypeTreeView.java | 44 ++---
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypePluginTreeDataSource.java | 19 +-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypeRepository.java | 6
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypeTreeDataSource.java | 84 ++++------
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypeTreeView.java | 6
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties | 65 ++++++-
18 files changed, 226 insertions(+), 170 deletions(-)
New commits:
commit ee12c0e22afce2aea640634a82be374e09f54ecc
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Nov 17 17:21:30 2010 -0500
new messages
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
index 5541161..1c46fac 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
@@ -58,11 +58,15 @@ common_label_week=week~
# Common Titles
#--------------
+common_title_add_column=Add Column~
+common_title_add_portlet=Add Portlet~
common_title_alert_range=Alert Range~
common_title_availability = Availability~
common_title_average_metrics=Average Metrics per Minute~
common_title_available_resources=Available Resources~
+common_title_background=Background~
common_title_category = Category~
+common_title_columns=Columns~
common_title_compatibleGroups = Compatible Groups~
common_title_compatibleGroups_total=Compatible Group Total~
common_title_custom=Custom~
@@ -74,12 +78,14 @@ common_title_display=Display~
common_title_edit_mode=Edit Mode~
common_title_enabled=Enabled?~
common_title_end = End~
+common_title_favorites=Favorites~
common_title_generalProp = General Properties~
common_title_group_def_total=Group Definition Total~
common_title_icon = icon~
common_title_id = ID~
common_title_id_parent = Parent ID~
common_title_inventory = Inventory~
+common_title_inventorySummary = Inventory Summary~
common_title_lastUpdated=Last Updated~
common_title_lastUpdatedBy=Last Updated By~
common_title_mashup=Mashup~
@@ -94,7 +100,9 @@ common_title_over=Over~
common_title_platform_total=Platform Total~
common_title_plugin = Plugin~
common_title_recently_added = Recently Added Resources~
+common_title_recent_alerts = Recent Alerts~
common_title_recent_operations=Recent Operations~
+common_title_remove_column=Remove Column~
common_title_resource = Resource~
common_title_resource_inventory=Resource Inventory~
common_title_resource_name=Resource Name~
@@ -102,6 +110,7 @@ common_title_scheduled_operations=Scheduled Operations~
common_title_selected_resources=Selected Resources~
common_title_server_total=Server Total~
common_title_service_total=Service Total~
+common_title_settings=Settings~
common_title_start = Start~
common_title_status=Status~
common_title_tag_cloud=Tag Cloud~
@@ -184,7 +193,8 @@ widget_resourceFactoryWizard_execute1=Failed to create a new resource - there is
widget_resourceFactoryWizard_execute2=Failed to create a new resource~
widget_resourceFactoryWizard_createSubmitType=A request to create a resource of type [{0}] has been submitted successfully.~
widget_resourceFactoryWizard_createSubmit=A request to create a resource with the name of [{0}] has been submitted successfully.~
-widget_resourceFactoryWizard_failedToType=Failed to get backing package type for new resource~
+widget_resourceFactoryWizard_failedToGetType=Failed to get backing package type for new resource~
+widget_resourceFactoryWizard_failedToDeleteVersion=Failed to delete package version while canceling a resource create~
#===================== Utils ======================
@@ -313,6 +323,10 @@ dataSource_scheduledOperations_field_operation = Operation~
dataSource_scheduledOperations_field_time = Date/Time~
dataSource_scheduledOperations_error_fetchFailure = Failed to load scheduled operations.
+# Operation History
+#---------------------------
+dataSource_operationHistory_error_fetchFailure = Failure loading operation histories.~
+
# Configuration History
#-------------------------------
dataSource_configurationHistory_field_id = ID~
@@ -351,8 +365,32 @@ view_adminConfig_templates = Templates~
#--------------------------------
view_adminUsersDetails_dataTypeName = user~
-#==================== Bundles ======================
+# 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_new=New~
+view_autoDiscoveryQ_newAndIgnored=New and Ignored~
+view_autoDiscoveryQ_importFailure=Failed to import resources~
+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_field_parentId=Parent ID~
+view_autoDiscoveryQ_field_name=Resource Name~
+view_autoDiscoveryQ_field_key=Resource Key~
+view_autoDiscoveryQ_field_discoveryTime=Discovery Time~
+view_autoDiscoveryQ_field_inventoryStatus=Inventory Status~
+view_autoDiscoveryQ_loadFailure=Failed to load the inventory discovery queue~
+#==================== Bundles ======================
+view_bundle_bundles = Bundles~
#=================== Components =====================
@@ -409,6 +447,7 @@ view_tableSection_backButton = Back to List~
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~
+view_tags_tags = Tags
view_tags_error_1 = Failed to load Tags~
view_tags_title = Tags:~
view_tags_tooltip_1 = Click to remove this Tag~
@@ -449,14 +488,15 @@ view_type_parentId=Parent ID~
view_type_typeTreeLoadFailure=Failed to load resource type tree data~
#=================== Dashboard =====================
-view_dashboardManager_error=Failed to store dashboard to server~
-
+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_deleted=Successfully deleted dashboard {0}~
view_dashboards_title=Dashboard~
view_dashboards_confirm1=Are you sure you want to delete~
-
view_dashboardsManager_error1=Failed to add new dashboard~
+// dup in common
view_dashboardsManager_inventory_title=Inventory Summary~
view_dashboardsManager_mashup_title=RHQ News~
view_dashboardsManager_message_title=Welcome To RHQ~
@@ -467,6 +507,9 @@ view_portlet_autodiscovery_help_msg = This portlet offers the ability to import
view_portlet_autodiscovery_title = Discovery Queue~
view_portlet_favoriteResources_msg=This portlet displays your favorite resources~
view_portlet_favoriteResources_title=Favorite Resources~
+view_portlet_generic_help=No help available for this portlet~
+view_portlet_generic_unconfigured=No settings available for this portlet~
+view_portlet_graph_configure_title=Graph Config~
view_portlet_graph_help_msg = This Portlet supports the graphing of a resource metric.~
view_portlet_graph_help_title = Graph Portlet~
view_portlet_graph_help_unconfigured=This graph is unconfigured, click the settings button to configure.~
@@ -487,7 +530,7 @@ view_portlet_operations_config_scheduled_enable=Whether to enable scheduled oper
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_next=show Next~
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.~
@@ -508,6 +551,7 @@ 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_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_recentlyAdded_approved_platforms=recently approved platforms on dashboard.~
view_portlet_recentlyAdded_error1=Failed to load recently added resources~
@@ -735,11 +779,17 @@ view_configurationHistoryList_itemNamePlural = configuration history items
view_configurationHistoryDetails_dialogTitle = Configuration Details~
view_configurationHistoryDetails_error_loadFailure = Unable to load configuration history.~
+# Operation History List
+#---------------------------------
+view_operationHistoryList_title = Operation History~
+view_operationHistoryList_button_runOperation = Run Operation
#==================== Reports ======================
view_reportsTop_title = Reports~
view_reportsTop_description = This section provides access to global reports.~
+view_reports_platforms = Cpu And Memory Utilization~
+view_reports_subsystems = Subsystems~
view_measurementOob_title = Suspect Metrics~
@@ -814,3 +864,4 @@ view_messageCenter_messageTitle= Title~
view_messageCenter_messageSeverity= Severity~
view_messageCenter_messageTime= Time~
view_messageCenter_messageDetail= Detail~
+
commit 53d3c028b2bd4805eb9c767dc6668e59a6a93425
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Nov 17 17:20:53 2010 -0500
i18n
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/AutodiscoveryQueueDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/AutodiscoveryQueueDataSource.java
index 3645614..882f9ab 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/AutodiscoveryQueueDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/AutodiscoveryQueueDataSource.java
@@ -43,6 +43,7 @@ import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.domain.util.PageControl;
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.gwt.AuthorizationGWTServiceAsync;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.gwt.ResourceGWTServiceAsync;
@@ -52,12 +53,19 @@ import org.rhq.enterprise.gui.coregui.client.gwt.ResourceGWTServiceAsync;
*/
public class AutodiscoveryQueueDataSource extends DataSource {
+ private static Messages MSG = CoreGUI.getMessages();
+
+ public static final String NEW = MSG.view_autoDiscoveryQ_new();
+ public static final String IGNORED = MSG.view_autoDiscoveryQ_ignored();
+ public static final String NEW_AND_IGNORED = MSG.view_autoDiscoveryQ_newAndIgnored();
+
+ private static final String NO_MANAGE_INVENTORY_PERMS_EMPTY_MESSAGE = MSG.view_autoDiscoveryQ_noperm();
+ private static final String EMPTY_MESSAGE = MSG.view_autoDiscoveryQ_noItems();
+
private int unlimited = -1;
private int maximumPlatformsToDisplay = -1;
private ResourceGWTServiceAsync resourceService = GWTServiceLookup.getResourceService();
private AuthorizationGWTServiceAsync authorizationService = GWTServiceLookup.getAuthorizationService();
- public static final String NO_MANAGE_INVENTORY_PERMS_EMPTY_MESSAGE = "(Required manage inventory permissions missing. See Administrator to change)";
- public static final String EMPTY_MESSAGE = "No items to show";
private TreeGrid dataContainerReference = null;
private static final Permission MANAGE_INVENTORY = Permission.MANAGE_INVENTORY;
@@ -66,23 +74,27 @@ public class AutodiscoveryQueueDataSource extends DataSource {
setDataProtocol(DSProtocol.CLIENTCUSTOM);
setDataFormat(DSDataFormat.CUSTOM);
- DataSourceTextField idField = new DataSourceTextField("id", "ID");
+ DataSourceTextField idField = new DataSourceTextField("id", MSG.common_title_id());
idField.setPrimaryKey(true);
- DataSourceTextField parentIdField = new DataSourceTextField("parentId", "Parent ID");
+ DataSourceTextField parentIdField = new DataSourceTextField("parentId", MSG
+ .view_autoDiscoveryQ_field_parentId());
parentIdField.setForeignKey("id");
- DataSourceTextField resourceNameField = new DataSourceTextField("name", "Resource Name");
+ DataSourceTextField resourceNameField = new DataSourceTextField("name", MSG.view_autoDiscoveryQ_field_name());
- DataSourceTextField resourceKeyField = new DataSourceTextField("resourceKey", "Resource Key");
+ DataSourceTextField resourceKeyField = new DataSourceTextField("resourceKey", MSG
+ .view_autoDiscoveryQ_field_key());
- DataSourceTextField resourceTypeField = new DataSourceTextField("typeName", "Type");
+ DataSourceTextField resourceTypeField = new DataSourceTextField("typeName", MSG.common_title_type());
- DataSourceTextField descriptionField = new DataSourceTextField("description", "Description");
+ DataSourceTextField descriptionField = new DataSourceTextField("description", MSG.common_title_description());
- DataSourceTextField timestampField = new DataSourceTextField("ctime", "Discovery Time");
+ DataSourceTextField timestampField = new DataSourceTextField("ctime", MSG
+ .view_autoDiscoveryQ_field_discoveryTime());
- DataSourceTextField statusField = new DataSourceTextField("status", "Inventory Status");
+ DataSourceTextField statusField = new DataSourceTextField("status", MSG
+ .view_autoDiscoveryQ_field_inventoryStatus());
setFields(idField, parentIdField, resourceNameField, resourceKeyField, resourceTypeField, descriptionField,
statusField, timestampField);
@@ -114,11 +126,11 @@ public class AutodiscoveryQueueDataSource extends DataSource {
final HashSet<InventoryStatus> statuses = new HashSet<InventoryStatus>();
- String statusesString = request.getCriteria().getAttributeAsString("statuses");
+ String statusesString = request.getCriteria().getAttributeAsString("status");
if (statusesString != null) {
- if ("New".equals(statusesString)) {
+ if (NEW.equals(statusesString)) {
statuses.add(InventoryStatus.NEW);
- } else if ("Ignored".equals(statusesString)) {
+ } else if (IGNORED.equals(statusesString)) {
statuses.add(InventoryStatus.IGNORED);
} else {
statuses.add(InventoryStatus.NEW);
@@ -139,8 +151,7 @@ public class AutodiscoveryQueueDataSource extends DataSource {
resourceService.getQueuedPlatformsAndServers(statuses, pc,
new AsyncCallback<Map<Resource, List<Resource>>>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to load inventory discovery queue",
- caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_autoDiscoveryQ_loadFailure(), caught);
}
public void onSuccess(Map<Resource, List<Resource>> result) {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
index ed16d79..2a0357f 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/discovery/ResourceAutodiscoveryView.java
@@ -59,7 +59,7 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
* @author Greg Hinkle
*/
public class ResourceAutodiscoveryView extends LocatableVLayout {
- private static final String TITLE = "Autodiscovery Queue";
+ private static final String TITLE = MSG.view_autoDiscoveryQ_title();
private static final String HEADER_ICON = "global/Recent_16.png";
private boolean simple;
@@ -97,9 +97,10 @@ public class ResourceAutodiscoveryView extends LocatableVLayout {
title.setStyleName("HeaderLabel");
DynamicForm form = new LocatableDynamicForm(this.extendLocatorId("Status"));
- final SelectItem statusSelectItem = new SelectItem("status", "Status");
- statusSelectItem.setValueMap("New", "Ignored", "New and Ignored");
- statusSelectItem.setValue("New");
+ final SelectItem statusSelectItem = new SelectItem("status", MSG.common_title_status());
+ statusSelectItem.setValueMap(AutodiscoveryQueueDataSource.NEW, AutodiscoveryQueueDataSource.IGNORED,
+ AutodiscoveryQueueDataSource.NEW_AND_IGNORED);
+ statusSelectItem.setValue(AutodiscoveryQueueDataSource.NEW);
form.setItems(statusSelectItem);
statusSelectItem.addChangedHandler(new ChangedHandler() {
@@ -157,9 +158,12 @@ public class ResourceAutodiscoveryView extends LocatableVLayout {
addMember(footer);
- final IButton importButton = new LocatableIButton(this.extendLocatorId("Import"), "Import");
- final IButton ignoreButton = new LocatableIButton(this.extendLocatorId("Ignore"), "Ignore");
- final IButton unignoreButton = new LocatableIButton(this.extendLocatorId("Unignore"), "Unignore");
+ final IButton importButton = new LocatableIButton(this.extendLocatorId("Import"), MSG
+ .view_autoDiscoveryQ_import());
+ final IButton ignoreButton = new LocatableIButton(this.extendLocatorId("Ignore"), MSG
+ .view_autoDiscoveryQ_ignore());
+ final IButton unignoreButton = new LocatableIButton(this.extendLocatorId("Unignore"), MSG
+ .view_autoDiscoveryQ_unignore());
footer.addMember(importButton);
footer.addMember(ignoreButton);
@@ -182,12 +186,12 @@ public class ResourceAutodiscoveryView extends LocatableVLayout {
public void onClick(ClickEvent clickEvent) {
resourceService.importResources(getSelectedIds(), new AsyncCallback<Void>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to import resources", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_autoDiscoveryQ_importFailure(), caught);
}
public void onSuccess(Void result) {
CoreGUI.getMessageCenter().notify(
- new Message("Successfully imported the selected resources", Message.Severity.Info));
+ new Message(MSG.view_autoDiscoveryQ_importSuccessful(), Message.Severity.Info));
treeGrid.invalidateCache();
}
});
@@ -198,12 +202,12 @@ public class ResourceAutodiscoveryView extends LocatableVLayout {
public void onClick(ClickEvent clickEvent) {
resourceService.ignoreResources(getSelectedIds(), new AsyncCallback<Void>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to ignore resources", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_autoDiscoveryQ_ignoreFailure(), caught);
}
public void onSuccess(Void result) {
CoreGUI.getMessageCenter().notify(
- new Message("Successfully ignored the selected resources", Message.Severity.Info));
+ new Message(MSG.view_autoDiscoveryQ_ignoreSuccessful(), Message.Severity.Info));
treeGrid.invalidateCache();
}
});
@@ -214,12 +218,12 @@ public class ResourceAutodiscoveryView extends LocatableVLayout {
public void onClick(ClickEvent clickEvent) {
resourceService.unignoreResources(getSelectedIds(), new AsyncCallback<Void>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to unignore resources", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_autoDiscoveryQ_unignoreFailure(), caught);
}
public void onSuccess(Void result) {
CoreGUI.getMessageCenter().notify(
- new Message("Successfully unignored the selected resources", Message.Severity.Info));
+ new Message(MSG.view_autoDiscoveryQ_unignoreSuccessful(), Message.Severity.Info));
treeGrid.invalidateCache();
}
});
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryConfigurationStep.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryConfigurationStep.java
index cf01870..63d8220 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryConfigurationStep.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryConfigurationStep.java
@@ -60,6 +60,6 @@ public class ResourceFactoryConfigurationStep extends AbstractWizardStep {
}
public String getName() {
- return "Edit Configuration";
+ return MSG.widget_resourceFactoryWizard_editConfigStepName();
}
}
\ No newline at end of file
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryCreateWizard.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryCreateWizard.java
index 66b1020..33982e9 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryCreateWizard.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryCreateWizard.java
@@ -55,14 +55,16 @@ public class ResourceFactoryCreateWizard extends AbstractResourceFactoryWizard {
switch (childType.getCreationDataType()) {
case CONTENT: {
- String archPrompt = packageType.isSupportsArchitecture() ? "Package Architecture" : null;
+ String archPrompt = packageType.isSupportsArchitecture() ? MSG.widget_resourceFactoryWizard_archPrompt()
+ : null;
ConfigurationDefinition deployTimeConfigDef = packageType.getDeploymentConfigurationDefinition();
this.setNewResourceConfigurationDefinition(deployTimeConfigDef);
Map<String, ConfigurationTemplate> templates = deployTimeConfigDef.getTemplates();
- steps.add(new ResourceFactoryInfoStep(ResourceFactoryCreateWizard.this, null, "Package Version",
- archPrompt, "Deployment Time Configuration Templates", templates));
+ steps.add(new ResourceFactoryInfoStep(ResourceFactoryCreateWizard.this, null, MSG
+ .widget_resourceFactoryWizard_versionPrompt(), archPrompt, MSG
+ .widget_resourceFactoryWizard_contentTemplatePrompt(), templates));
steps.add(new ResourceFactoryPackageStep(ResourceFactoryCreateWizard.this));
@@ -78,8 +80,9 @@ public class ResourceFactoryCreateWizard extends AbstractResourceFactoryWizard {
ConfigurationDefinition resourceConfigDef = getChildType().getResourceConfigurationDefinition();
this.setNewResourceConfigurationDefinition(resourceConfigDef);
Map<String, ConfigurationTemplate> templates = resourceConfigDef.getTemplates();
- steps.add(new ResourceFactoryInfoStep(ResourceFactoryCreateWizard.this, "New Resource Name",
- "Resource Configuration Templates", templates));
+ steps.add(new ResourceFactoryInfoStep(ResourceFactoryCreateWizard.this, MSG
+ .widget_resourceFactoryWizard_namePrompt(), MSG.widget_resourceFactoryWizard_configTemplatePrompt(),
+ templates));
steps.add(new ResourceFactoryConfigurationStep(ResourceFactoryCreateWizard.this));
@@ -92,11 +95,11 @@ public class ResourceFactoryCreateWizard extends AbstractResourceFactoryWizard {
}
public String getWindowTitle() {
- return "Resource Create Wizard";
+ return MSG.widget_resourceFactoryWizard_createWizardWindowTitle();
}
public String getTitle() {
- return "Create New Resource of Type: " + getChildType().getName();
+ return MSG.widget_resourceFactoryWizard_createWizardTitle(getChildType().getName());
}
public String getSubtitle() {
@@ -115,21 +118,21 @@ public class ResourceFactoryCreateWizard extends AbstractResourceFactoryWizard {
Integer packageVersionId = this.getNewResourcePackageVersionId();
if (null == packageVersionId) {
- CoreGUI.getErrorHandler().handleError("Failed to create new resource, no PackageVersion");
+ CoreGUI.getErrorHandler().handleError(MSG.widget_resourceFactoryWizard_execute1());
getView().closeDialog();
}
GWTServiceLookup.getResourceService().createResource(parentResourceId, createTypeId, (String) null,
deployTimeConfiguration, packageVersionId, new AsyncCallback<Void>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to create new resource", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.widget_resourceFactoryWizard_execute2(), caught);
getView().closeDialog();
}
public void onSuccess(Void result) {
CoreGUI.getMessageCenter().notify(
- new Message("Submitted request to create new resource of type [" + getChildType().getName()
- + "]", Message.Severity.Info));
+ new Message(MSG.widget_resourceFactoryWizard_createSubmitType(getChildType().getName()),
+ Message.Severity.Info));
getView().closeDialog();
}
});
@@ -144,13 +147,13 @@ public class ResourceFactoryCreateWizard extends AbstractResourceFactoryWizard {
GWTServiceLookup.getResourceService().createResource(parentResourceId, createTypeId, newResourceName,
resourceConfiguration, new AsyncCallback<Void>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to create new resource", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.widget_resourceFactoryWizard_execute2(), caught);
getView().closeDialog();
}
public void onSuccess(Void result) {
CoreGUI.getMessageCenter().notify(
- new Message("Submitted request to create new resource [" + newResourceName + "]",
+ new Message(MSG.widget_resourceFactoryWizard_createSubmit(newResourceName),
Message.Severity.Info));
getView().closeDialog();
}
@@ -192,7 +195,7 @@ public class ResourceFactoryCreateWizard extends AbstractResourceFactoryWizard {
new AsyncCallback<PackageType>() {
public void onFailure(Throwable caught) {
CoreGUI.getErrorHandler().handleError(
- "Failed to get backing package type for new resource", caught);
+ MSG.widget_resourceFactoryWizard_failedToGetType(), caught);
}
public void onSuccess(PackageType result) {
@@ -225,8 +228,8 @@ public class ResourceFactoryCreateWizard extends AbstractResourceFactoryWizard {
GWTServiceLookup.getContentService().deletePackageVersion(this.newResourcePackageVersionId,
new AsyncCallback<Void>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(
- "Failed to delete PackageVersion in CreateResource Cancel.", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.widget_resourceFactoryWizard_failedToDeleteVersion(),
+ caught);
}
public void onSuccess(Void ignore) {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryImportWizard.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryImportWizard.java
index 80fab2a..2723440 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryImportWizard.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryImportWizard.java
@@ -53,7 +53,8 @@ public class ResourceFactoryImportWizard extends AbstractResourceFactoryWizard {
// skip the info step if the type has only the default template to offer for user selection.
Map<String, ConfigurationTemplate> templates = childType.getPluginConfigurationDefinition().getTemplates();
if (templates.size() > 1) {
- this.infoStep = new ResourceFactoryInfoStep(this, null, "Connection Settings Templates", templates);
+ this.infoStep = new ResourceFactoryInfoStep(this, null, MSG.widget_resourceFactoryWizard_templatePrompt(),
+ templates);
steps.add(infoStep);
}
@@ -65,11 +66,11 @@ public class ResourceFactoryImportWizard extends AbstractResourceFactoryWizard {
}
public String getWindowTitle() {
- return "Resource Import Wizard";
+ return MSG.widget_resourceFactoryWizard_importWizardWindowTitle();
}
public String getTitle() {
- return "Import Resource of Type: " + getChildType().getName();
+ return MSG.widget_resourceFactoryWizard_importWizardTitle(getChildType().getName());
}
public void execute() {
@@ -81,13 +82,13 @@ public class ResourceFactoryImportWizard extends AbstractResourceFactoryWizard {
GWTServiceLookup.getResourceService().manuallyAddResource(createTypeId, parentResourceId, newConfiguration,
new AsyncCallback<Resource>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to manually import resource", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.widget_resourceFactoryWizard_importFailure(), caught);
getView().closeDialog();
}
public void onSuccess(Resource result) {
CoreGUI.getMessageCenter().notify(
- new Message("Submitted request to manually import [" + getChildType().getName() + "]",
+ new Message(MSG.widget_resourceFactoryWizard_importSubmitted(getChildType().getName()),
Message.Severity.Info));
getView().closeDialog();
}
@@ -104,5 +105,4 @@ public class ResourceFactoryImportWizard extends AbstractResourceFactoryWizard {
}
});
}
-
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryInfoStep.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryInfoStep.java
index bc74953..69c1c7e 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryInfoStep.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryInfoStep.java
@@ -179,7 +179,7 @@ public class ResourceFactoryInfoStep extends AbstractWizardStep {
}
public String getName() {
- return "Resource Information";
+ return MSG.widget_resourceFactoryWizard_infoStepName();
}
public String getResourceName() {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryPackageStep.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryPackageStep.java
index 50742ea..ddde67d 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryPackageStep.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryPackageStep.java
@@ -80,8 +80,7 @@ public class ResourceFactoryPackageStep extends AbstractWizardStep {
wizard.getView().hideMessage();
if (form.isUploadInProgress()) {
- handleUploadError("Upload is in progress... This can take several minutes for large distribution files.",
- false);
+ handleUploadError(MSG.widget_resourceFactoryWizard_uploadInProgress(), false);
return false;
}
@@ -96,7 +95,7 @@ public class ResourceFactoryPackageStep extends AbstractWizardStep {
}
public String getName() {
- return "Upload Resource Content File";
+ return MSG.widget_resourceFactoryWizard_uploadFileStepName();
}
private void handleUploadError(String errorMessage, boolean sendToMessageCenter) {
@@ -107,7 +106,8 @@ public class ResourceFactoryPackageStep extends AbstractWizardStep {
}
if (sendToMessageCenter) {
- CoreGUI.getMessageCenter().notify(new Message("Failed to upload file. " + errorMessage, Severity.Error));
+ CoreGUI.getMessageCenter().notify(
+ new Message(MSG.widget_resourceFactoryWizard_uploadFailure() + ": " + errorMessage, Severity.Error));
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/ResourceGroupSelector.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/ResourceGroupSelector.java
index 99d77da..d296cdb 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/ResourceGroupSelector.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/ResourceGroupSelector.java
@@ -46,10 +46,10 @@ public class ResourceGroupSelector extends AbstractSelector<ResourceGroup> {
availableFilterForm.setWidth100();
availableFilterForm.setNumCols(4);
- final TextItem search = new TextItem("search", "Search");
+ final TextItem search = new TextItem("search", MSG.common_label_search());
- SelectItem groupCategorySelect = new SelectItem("groupCategory", "Group Category");
- groupCategorySelect.setValueMap("Compatible", "Mixed");
+ SelectItem groupCategorySelect = new SelectItem("groupCategory", MSG.widget_resourceSelector_groupCategory());
+ groupCategorySelect.setValueMap("Compatible", "Mixed"); // I don't think we can i18n these, may need these literal values - need to double check this
groupCategorySelect.setAllowEmptyValue(true);
availableFilterForm.setItems(search, groupCategorySelect, new SpacerItem());
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/ResourcePicker.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/ResourcePicker.java
index d55b87d..907339e 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/ResourcePicker.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/ResourcePicker.java
@@ -19,7 +19,6 @@
package org.rhq.enterprise.gui.coregui.client.inventory.resource.selection;
-import java.util.HashSet;
import java.util.Set;
import com.google.gwt.user.client.Timer;
@@ -95,7 +94,7 @@ public class ResourcePicker extends LocatableWindow {
LocatableDynamicForm form = new LocatableDynamicForm(extendLocatorId("buttons"));
form.setLayoutAlign(Alignment.CENTER);
- ButtonItem ok = new ButtonItem("ok", "OK");
+ ButtonItem ok = new ButtonItem("ok", MSG.common_button_ok());
ok.setStartRow(true);
ok.setEndRow(false);
ok.addClickHandler(new ClickHandler() {
@@ -104,7 +103,7 @@ public class ResourcePicker extends LocatableWindow {
ok();
}
});
- ButtonItem cancel = new ButtonItem("cancel", "Cancel");
+ ButtonItem cancel = new ButtonItem("cancel", MSG.common_button_cancel());
cancel.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
@@ -130,7 +129,7 @@ public class ResourcePicker extends LocatableWindow {
}
protected String getDefaultTitle() {
- return "Select Resources";
+ return MSG.widget_resourceSelector_selectMultipleResources();
}
protected ResourceSelector getResourceSelector() {
@@ -149,7 +148,7 @@ public class ResourcePicker extends LocatableWindow {
Set<Integer> selection = selector.getSelection();
if (selection == null || selection.isEmpty()) {
- showWarningMessage("Please select one of more resources");
+ showWarningMessage(MSG.widget_resourceSelector_pleaseSelectMultipleResource());
} else {
if (handler.ok(selection)) {
selector = null;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/ResourceSelector.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/ResourceSelector.java
index e33e36b..77c3485 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/ResourceSelector.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/ResourceSelector.java
@@ -67,15 +67,15 @@ public class ResourceSelector extends AbstractSelector<Resource> {
availableFilterForm = new LocatableDynamicForm("ResSelectAvailFilterForm");
availableFilterForm.setNumCols(6);
availableFilterForm.setWidth("75%");
- final TextItem search = new TextItem("search", "Search");
+ final TextItem search = new TextItem("search", MSG.common_label_search());
final SelectItem categorySelect;
- typeSelectItem = new IPickTreeItem("type", "Type");
+ typeSelectItem = new IPickTreeItem("type", MSG.common_title_type());
typeSelectItem.setDataSource(new ResourceTypePluginTreeDataSource());
typeSelectItem.setValueField("id");
typeSelectItem.setCanSelectParentItems(true);
typeSelectItem.setLoadDataOnDemand(false);
- typeSelectItem.setEmptyMenuMessage("Loading...");
+ typeSelectItem.setEmptyMenuMessage(MSG.common_msg_loading());
typeSelectItem.setShowIcons(true);
if (this.forceResourceTypeFilter) {
@@ -85,7 +85,7 @@ public class ResourceSelector extends AbstractSelector<Resource> {
typeSelectItem.setVisible(false);
}
- categorySelect = new SelectItem("category", "Category");
+ categorySelect = new SelectItem("category", MSG.common_title_category());
LinkedHashMap<String, String> valueMap = buildResourceCategoryValueMap();
categorySelect.setValueMap(valueMap);
categorySelect.setAllowEmptyValue(true);
@@ -142,7 +142,7 @@ public class ResourceSelector extends AbstractSelector<Resource> {
@Override
protected String getItemTitle() {
- return "resource";
+ return "resource";
}
/** transfers selected data to the assigned grid. This operation mimics button click from ResourceSelection.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/SelectedResourceDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/SelectedResourceDataSource.java
index 742a83f..9b39130 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/SelectedResourceDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/SelectedResourceDataSource.java
@@ -20,8 +20,6 @@ package org.rhq.enterprise.gui.coregui.client.inventory.resource.selection;
import java.util.ArrayList;
-import com.smartgwt.client.widgets.events.DropEvent;
-import com.smartgwt.client.widgets.events.DropHandler;
import com.smartgwt.client.widgets.grid.ListGrid;
import com.smartgwt.client.widgets.grid.ListGridRecord;
import com.smartgwt.client.widgets.grid.events.RecordDropEvent;
@@ -36,11 +34,9 @@ public class SelectedResourceDataSource extends ResourceDatasource {
private ArrayList<Integer> selection;
-
ListGrid availableGrid;
ListGrid assignedGrid;
-
public SelectedResourceDataSource(ArrayList<Integer> selection, ListGrid availableGrid, ListGrid assignedGrid) {
this.selection = selection;
if (this.selection == null) {
@@ -49,7 +45,6 @@ public class SelectedResourceDataSource extends ResourceDatasource {
this.availableGrid = availableGrid;
this.assignedGrid = assignedGrid;
-
assignedGrid.addRecordDropHandler(new RecordDropHandler() {
public void onRecordDrop(RecordDropEvent recordDropEvent) {
for (ListGridRecord record : recordDropEvent.getDropRecords()) {
@@ -62,12 +57,4 @@ public class SelectedResourceDataSource extends ResourceDatasource {
}
});
}
-
-
-
-
-
-
-
-
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/SingleResourcePicker.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/SingleResourcePicker.java
index 3c71f8c..46f8ba0 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/SingleResourcePicker.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/selection/SingleResourcePicker.java
@@ -33,7 +33,7 @@ public class SingleResourcePicker extends ResourcePicker {
@Override
protected String getDefaultTitle() {
- return "Select a Resource";
+ return MSG.widget_resourceSelector_selectResource();
}
@Override
@@ -46,7 +46,7 @@ public class SingleResourcePicker extends ResourcePicker {
Set<Integer> selection = getResourceSelector().getSelection();
if (selection == null || selection.size() != 1) {
- showWarningMessage("Please select a Resource.");
+ showWarningMessage(MSG.widget_resourceSelector_pleaseSelectResource());
} else {
if (handler.ok(selection)) {
markForDestroy();
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/PluginTypeTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/PluginTypeTreeView.java
index 5970507..cfa47e2 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/PluginTypeTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/PluginTypeTreeView.java
@@ -20,7 +20,6 @@ package org.rhq.enterprise.gui.coregui.client.inventory.resource.type;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.data.Record;
-import com.smartgwt.client.widgets.layout.VLayout;
import com.smartgwt.client.widgets.tree.TreeGrid;
import com.smartgwt.client.widgets.tree.TreeGridField;
import com.smartgwt.client.widgets.tree.TreeNode;
@@ -32,15 +31,17 @@ import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.gwt.ResourceTypeGWTServiceAsync;
+import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
/**
* @author Greg Hinkle
*/
-public class PluginTypeTreeView extends VLayout {
+public class PluginTypeTreeView extends LocatableVLayout {
private ResourceTypeGWTServiceAsync resourceTypeService = GWTServiceLookup.getResourceTypeGWTService();
- public PluginTypeTreeView() {
+ public PluginTypeTreeView(String locatorId) {
+ super(locatorId);
setWidth100();
setHeight100();
}
@@ -49,16 +50,14 @@ public class PluginTypeTreeView extends VLayout {
protected void onDraw() {
super.onDraw();
-
final TreeGrid treeGrid = new CustomResourceTypeTreeGrid();
treeGrid.setHeight100();
- treeGrid.setTitle("Resource Types");
+ treeGrid.setTitle(MSG.view_type_resourceTypes());
treeGrid.setAnimateFolders(false);
treeGrid.setResizeFieldsInRealTime(true);
-
final TreeGridField name, plugin, category;
name = new TreeGridField("name");
plugin = new TreeGridField("plugin");
@@ -72,21 +71,19 @@ public class PluginTypeTreeView extends VLayout {
criteria.fetchParentResourceTypes(true);
criteria.setPageControl(PageControl.getUnlimitedInstance());
- resourceTypeService.findResourceTypesByCriteria(criteria,
- new AsyncCallback<PageList<ResourceType>>() {
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to load inventory discovery queue", caught);
- }
+ resourceTypeService.findResourceTypesByCriteria(criteria, new AsyncCallback<PageList<ResourceType>>() {
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError("Failed to load", caught);
+ }
- public void onSuccess(PageList<ResourceType> result) {
+ public void onSuccess(PageList<ResourceType> result) {
- treeGrid.getTree().linkNodes(ResourceTypePluginTreeDataSource.buildNodes(result));
+ treeGrid.getTree().linkNodes(ResourceTypePluginTreeDataSource.buildNodes(result));
- }
- });
+ }
+ });
}
-
public static class CustomResourceTypeTreeGrid extends TreeGrid {
@Override
protected String getIcon(Record record, boolean defaultState) {
@@ -95,15 +92,16 @@ public class PluginTypeTreeView extends VLayout {
boolean open = getTree().isOpen((TreeNode) record);
if (record instanceof ResourceTypePluginTreeDataSource.ResourceTypeTreeNode) {
- ResourceType resourceType = ((ResourceTypePluginTreeDataSource.ResourceTypeTreeNode) record).getResourceType();
+ ResourceType resourceType = ((ResourceTypePluginTreeDataSource.ResourceTypeTreeNode) record)
+ .getResourceType();
switch (resourceType.getCategory()) {
- case PLATFORM:
- return "types/Platform_up_16.png";
- case SERVER:
- return "types/Server_up_16.png";
- case SERVICE:
- return "types/Service_up_16.png";
+ case PLATFORM:
+ return "types/Platform_up_16.png";
+ case SERVER:
+ return "types/Server_up_16.png";
+ case SERVICE:
+ return "types/Service_up_16.png";
}
} else if (record instanceof ResourceTypePluginTreeDataSource.PluginTreeNode) {
return "types/plugin_16.png";
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypePluginTreeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypePluginTreeDataSource.java
index 03a2198..d064680 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypePluginTreeDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypePluginTreeDataSource.java
@@ -38,6 +38,7 @@ import org.rhq.core.domain.util.PageControl;
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.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.gwt.ResourceTypeGWTServiceAsync;
@@ -46,6 +47,8 @@ import org.rhq.enterprise.gui.coregui.client.gwt.ResourceTypeGWTServiceAsync;
*/
public class ResourceTypePluginTreeDataSource extends DataSource {
+ private Messages MSG = CoreGUI.getMessages();
+
private ResourceTypeGWTServiceAsync resourceTypeService = GWTServiceLookup.getResourceTypeGWTService();
public ResourceTypePluginTreeDataSource() {
@@ -54,17 +57,17 @@ public class ResourceTypePluginTreeDataSource extends DataSource {
setDataProtocol(DSProtocol.CLIENTCUSTOM);
setDataFormat(DSDataFormat.CUSTOM);
- DataSourceTextField idField = new DataSourceTextField("id", "ID");
+ DataSourceTextField idField = new DataSourceTextField("id", MSG.common_title_id());
idField.setPrimaryKey(true);
- DataSourceTextField parentIdField = new DataSourceTextField("parentId", "Parent ID");
+ DataSourceTextField parentIdField = new DataSourceTextField("parentId", MSG.view_type_parentId());
parentIdField.setForeignKey("id");
- DataSourceTextField resourceNameField = new DataSourceTextField("name", "Name");
+ DataSourceTextField resourceNameField = new DataSourceTextField("name", MSG.common_title_name());
- DataSourceTextField resourceKeyField = new DataSourceTextField("plugin", "Plugin");
+ DataSourceTextField resourceKeyField = new DataSourceTextField("plugin", MSG.common_title_plugin());
- DataSourceTextField resourceTypeField = new DataSourceTextField("category", "Category");
+ DataSourceTextField resourceTypeField = new DataSourceTextField("category", MSG.common_title_category());
setFields(idField, parentIdField, resourceNameField, resourceKeyField, resourceTypeField);
}
@@ -98,7 +101,7 @@ public class ResourceTypePluginTreeDataSource extends DataSource {
resourceTypeService.findResourceTypesByCriteria(criteria, new AsyncCallback<PageList<ResourceType>>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to load resource type tree data", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_type_typeTreeLoadFailure(), caught);
}
public void onSuccess(PageList<ResourceType> result) {
@@ -175,6 +178,8 @@ public class ResourceTypePluginTreeDataSource extends DataSource {
public static class PluginTreeNode extends TreeNode {
+ private static String pluginStr = CoreGUI.getMessages().common_title_plugin();
+
String id;
PluginTreeNode(String pluginName) {
@@ -183,7 +188,7 @@ public class ResourceTypePluginTreeDataSource extends DataSource {
this.id = pluginName;
setParentID(null);
- setAttribute("name", pluginName + " Plugin");
+ setAttribute("name", pluginName + " " + pluginStr);
// setAttribute("plugin",pluginName);
setIcon("types/plugin_16.png"); // todo doesn't work
setEnabled(true);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypeRepository.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypeRepository.java
index c998010..19624d0 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypeRepository.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypeRepository.java
@@ -93,7 +93,7 @@ public class ResourceTypeRepository {
return;
}
- long start = System.currentTimeMillis();
+ //long start = System.currentTimeMillis();
Set<Integer> types = new HashSet<Integer>();
for (Resource res : resources) {
@@ -126,7 +126,7 @@ public class ResourceTypeRepository {
return;
}
- long start = System.currentTimeMillis();
+ // long start = System.currentTimeMillis();
Set<Integer> types = new HashSet<Integer>();
for (ResourceGroup group : groups) {
@@ -301,7 +301,7 @@ public class ResourceTypeRepository {
cachedType.setSubCategory(type.getSubCategory());
break;
default:
- System.err.println("ERROR: metadataType " + metadataType.name()
+ Log.error("ERROR: metadataType " + metadataType.name()
+ " not merged into cached ResourceType.");
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypeTreeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypeTreeDataSource.java
index 356e565..9e36ac3 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypeTreeDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypeTreeDataSource.java
@@ -18,8 +18,6 @@
*/
package org.rhq.enterprise.gui.coregui.client.inventory.resource.type;
-import java.util.ArrayList;
-import java.util.HashMap;
import java.util.HashSet;
import com.google.gwt.user.client.rpc.AsyncCallback;
@@ -38,6 +36,7 @@ import org.rhq.core.domain.util.PageControl;
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.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.gwt.ResourceTypeGWTServiceAsync;
@@ -45,7 +44,7 @@ import org.rhq.enterprise.gui.coregui.client.gwt.ResourceTypeGWTServiceAsync;
* @author Greg Hinkle
*/
public class ResourceTypeTreeDataSource extends DataSource {
-
+ private Messages MSG = CoreGUI.getMessages();
private ResourceTypeGWTServiceAsync resourceTypeService = GWTServiceLookup.getResourceTypeGWTService();
@@ -55,19 +54,17 @@ public class ResourceTypeTreeDataSource extends DataSource {
setDataProtocol(DSProtocol.CLIENTCUSTOM);
setDataFormat(DSDataFormat.CUSTOM);
-
- DataSourceTextField idField = new DataSourceTextField("id", "ID");
+ DataSourceTextField idField = new DataSourceTextField("id", MSG.common_title_id());
idField.setPrimaryKey(true);
- DataSourceTextField parentIdField = new DataSourceTextField("parentId", "Parent ID");
+ DataSourceTextField parentIdField = new DataSourceTextField("parentId", MSG.view_type_parentId());
parentIdField.setForeignKey("id");
- DataSourceTextField resourceNameField = new DataSourceTextField("name", "Name");
+ DataSourceTextField resourceNameField = new DataSourceTextField("name", MSG.common_title_name());
- DataSourceTextField resourceKeyField = new DataSourceTextField("plugin", "Plugin");
-
- DataSourceTextField resourceTypeField = new DataSourceTextField("category", "Category");
+ DataSourceTextField resourceKeyField = new DataSourceTextField("plugin", MSG.common_title_plugin());
+ DataSourceTextField resourceTypeField = new DataSourceTextField("category", MSG.common_title_category());
setFields(idField, parentIdField, resourceNameField, resourceKeyField, resourceTypeField);
}
@@ -78,17 +75,16 @@ public class ResourceTypeTreeDataSource extends DataSource {
// Asume success
response.setStatus(0);
switch (request.getOperationType()) {
- case FETCH:
- executeFetch(request, response);
- break;
- default:
- break;
+ case FETCH:
+ executeFetch(request, response);
+ break;
+ default:
+ break;
}
return request.getData();
}
-
protected void executeFetch(final DSRequest request, final DSResponse response) {
String parentIdString = request.getCriteria().getAttributeAsString("parentId");
@@ -96,26 +92,23 @@ public class ResourceTypeTreeDataSource extends DataSource {
processResponse(request.getRequestId(), response);
} else {
-
ResourceTypeCriteria criteria = new ResourceTypeCriteria();
criteria.fetchParentResourceTypes(true);
criteria.setPageControl(PageControl.getUnlimitedInstance());
- resourceTypeService.findResourceTypesByCriteria(criteria,
- new AsyncCallback<PageList<ResourceType>>() {
- public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to load resource type tree data", caught);
- }
-
- public void onSuccess(PageList<ResourceType> result) {
- response.setData(buildNodes(result));
- processResponse(request.getRequestId(), response);
- }
- });
+ resourceTypeService.findResourceTypesByCriteria(criteria, new AsyncCallback<PageList<ResourceType>>() {
+ public void onFailure(Throwable caught) {
+ CoreGUI.getErrorHandler().handleError(MSG.view_type_typeTreeLoadFailure(), caught);
+ }
+
+ public void onSuccess(PageList<ResourceType> result) {
+ response.setData(buildNodes(result));
+ processResponse(request.getRequestId(), response);
+ }
+ });
}
}
-
public static TreeNode[] buildNodes(PageList<ResourceType> result) {
HashSet<TreeNode> nodes = new HashSet<TreeNode>();
@@ -125,7 +118,8 @@ public class ResourceTypeTreeDataSource extends DataSource {
for (ResourceType type : result) {
- if (type.getCategory() != ResourceCategory.PLATFORM && (type.getParentResourceTypes() == null || type.getParentResourceTypes().isEmpty())) {
+ if (type.getCategory() != ResourceCategory.PLATFORM
+ && (type.getParentResourceTypes() == null || type.getParentResourceTypes().isEmpty())) {
noParentNonPlatformNodes.add(type);
} else if (type.getParentResourceTypes() == null || type.getParentResourceTypes().isEmpty()) {
@@ -144,12 +138,10 @@ public class ResourceTypeTreeDataSource extends DataSource {
}
}
-
TreeNode[] treeNodes = nodes.toArray(new TreeNode[nodes.size()]);
return treeNodes;
}
-
/**
* Returns a prepopulated PageControl based on the provided DSRequest. This will set sort fields,
* pagination, but *not* filter fields.
@@ -163,7 +155,8 @@ public class ResourceTypeTreeDataSource extends DataSource {
if (request.getStartRow() == null || request.getEndRow() == null) {
pageControl = new PageControl();
} else {
- pageControl = PageControl.getExplicitPageControl(request.getStartRow(), request.getEndRow() - request.getStartRow());
+ pageControl = PageControl.getExplicitPageControl(request.getStartRow(), request.getEndRow()
+ - request.getStartRow());
}
// Initialize sorting.
@@ -180,7 +173,6 @@ public class ResourceTypeTreeDataSource extends DataSource {
return pageControl;
}
-
public static class PluginTreeNode extends TreeNode {
String id;
@@ -192,17 +184,20 @@ public class ResourceTypeTreeDataSource extends DataSource {
setParentID(null);
setAttribute("name", pluginName);
-// setAttribute("plugin",pluginName);
+ // setAttribute("plugin",pluginName);
}
@Override
public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
+ if (this == o)
+ return true;
+ if (o == null || getClass() != o.getClass())
+ return false;
PluginTreeNode that = (PluginTreeNode) o;
- if (!id.equals(that.id)) return false;
+ if (!id.equals(that.id))
+ return false;
return true;
}
@@ -238,20 +233,23 @@ public class ResourceTypeTreeDataSource extends DataSource {
setIsFolder(true);
}
-
public ResourceType getResourceType() {
return resourceType;
}
@Override
public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
+ if (this == o)
+ return true;
+ if (o == null || getClass() != o.getClass())
+ return false;
ResourceTypeTreeNode that = (ResourceTypeTreeNode) o;
- if (!id.equals(that.id)) return false;
- if (parentId != null ? !parentId.equals(that.parentId) : that.parentId != null) return false;
+ if (!id.equals(that.id))
+ return false;
+ if (parentId != null ? !parentId.equals(that.parentId) : that.parentId != null)
+ return false;
return true;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypeTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypeTreeView.java
index 15c0a1e..99aa414 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypeTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/type/ResourceTypeTreeView.java
@@ -56,7 +56,7 @@ public class ResourceTypeTreeView extends LocatableVLayout {
treeGrid.setHeight100();
- treeGrid.setTitle("Resource Types");
+ treeGrid.setTitle(MSG.view_type_resourceTypes());
treeGrid.setAnimateFolders(false);
treeGrid.setResizeFieldsInRealTime(true);
@@ -75,7 +75,7 @@ public class ResourceTypeTreeView extends LocatableVLayout {
resourceTypeService.findResourceTypesByCriteria(criteria, new AsyncCallback<PageList<ResourceType>>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to load inventory discovery queue", caught);
+ CoreGUI.getErrorHandler().handleError("Failed to load", caught);
}
public void onSuccess(PageList<ResourceType> result) {
@@ -96,7 +96,7 @@ public class ResourceTypeTreeView extends LocatableVLayout {
protected String getIcon(Record record, boolean defaultState) {
if (record instanceof TreeNode) {
- boolean open = getTree().isOpen((TreeNode) record);
+ // boolean open = getTree().isOpen((TreeNode) record);
if (record instanceof ResourceTypeTreeDataSource.ResourceTypeTreeNode) {
ResourceType resourceType = ((ResourceTypeTreeDataSource.ResourceTypeTreeNode) record)
13 years, 7 months
[rhq] modules/enterprise
by Joseph Marques
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupContextMenu.java | 28 +++--
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupDetailView.java | 48 +++++-----
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTitleBar.java | 18 +--
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties | 39 --------
4 files changed, 49 insertions(+), 84 deletions(-)
New commits:
commit e29b78e6e083385c0d4c1fed377db9546584533c
Author: Joseph Marques <joseph(a)redhat.com>
Date: Wed Nov 17 17:15:29 2010 -0500
consolidate properties for titleBar, contextMenu, and tabs
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupContextMenu.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupContextMenu.java
index f916baf..92153ec 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupContextMenu.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupContextMenu.java
@@ -92,7 +92,7 @@ public class ResourceGroupContextMenu extends LocatableMenu {
addItem(new MenuItem("Type: " + resourceType.getName()));
- MenuItem editPluginConfiguration = new MenuItem(MSG.view_group_contextMenu_pluginConfiguration());
+ MenuItem editPluginConfiguration = new MenuItem(MSG.view_tree_common_contextMenu_pluginConfiguration());
editPluginConfiguration.addClickHandler(new ClickHandler() {
public void onClick(MenuItemClickEvent event) {
int groupId = group.getId();
@@ -116,14 +116,14 @@ public class ResourceGroupContextMenu extends LocatableMenu {
editPluginConfiguration.setEnabled(resourceType.getPluginConfigurationDefinition() != null);
addItem(editPluginConfiguration);
- MenuItem editResourceConfiguration = new MenuItem(MSG.view_group_contextMenu_resourceConfiguration());
+ MenuItem editResourceConfiguration = new MenuItem(MSG.view_tree_common_contextMenu_resourceConfiguration());
editResourceConfiguration.addClickHandler(new ClickHandler() {
public void onClick(MenuItemClickEvent event) {
int groupId = group.getId();
int resourceTypeId = resourceType.getId();
final Window configEditor = new Window();
- configEditor.setTitle(MSG.view_group_contextMenu_editResourceConfiguration(group.getName()));
+ configEditor.setTitle(MSG.view_tree_common_contextMenu_editResourceConfiguration(group.getName()));
configEditor.setWidth(800);
configEditor.setHeight(800);
configEditor.setIsModal(true);
@@ -149,7 +149,7 @@ public class ResourceGroupContextMenu extends LocatableMenu {
addItem(new MenuItemSeparator());
// Operations Menu
- MenuItem operations = new MenuItem(MSG.view_group_contextMenu_operations());
+ MenuItem operations = new MenuItem(MSG.view_tree_common_contextMenu_operations());
Menu opSubMenu = new Menu();
if (resourceType.getOperationDefinitions() != null) {
for (final OperationDefinition operationDefinition : resourceType.getOperationDefinitions()) {
@@ -247,7 +247,7 @@ public class ResourceGroupContextMenu extends LocatableMenu {
}
private MenuItem buildMetricsMenu(final ResourceType type) {
- MenuItem measurements = new MenuItem(MSG.view_group_contextMenu_measurements());
+ MenuItem measurements = new MenuItem(MSG.view_tree_common_contextMenu_measurements());
final Menu measurementsSubMenu = new Menu();
GWTServiceLookup.getDashboardService().findDashboardsForSubject(new AsyncCallback<List<Dashboard>>() {
@@ -266,7 +266,7 @@ public class ResourceGroupContextMenu extends LocatableMenu {
defItem.setSubmenu(defSubItem);
for (final Dashboard d : result) {
- MenuItem addToDBItem = new MenuItem(MSG.view_group_contextMenu_addChartToDashboard(d
+ MenuItem addToDBItem = new MenuItem(MSG.view_tree_common_contextMenu_addChartToDashboard(d
.getName()));
defSubItem.addItem(addToDBItem);
@@ -274,7 +274,7 @@ public class ResourceGroupContextMenu extends LocatableMenu {
public void onClick(MenuItemClickEvent menuItemClickEvent) {
DashboardPortlet p = new DashboardPortlet(def.getDisplayName() + " "
- + MSG.view_group_contextMenu_chart(), GraphPortlet.KEY, 250);
+ + MSG.view_tree_common_contextMenu_chart(), GraphPortlet.KEY, 250);
p.getConfiguration().put(
new PropertySimple(GraphPortlet.CFG_RESOURCE_GROUP_ID, currentGroup.getId()));
p.getConfiguration().put(
@@ -286,14 +286,18 @@ public class ResourceGroupContextMenu extends LocatableMenu {
new AsyncCallback<Dashboard>() {
public void onFailure(Throwable caught) {
CoreGUI.getErrorHandler().handleError(
- MSG.view_group_contextMenu_saveChartToDashboardFailure(), caught);
+ MSG.view_tree_common_contextMenu_saveChartToDashboardFailure(),
+ caught);
}
public void onSuccess(Dashboard result) {
- CoreGUI.getMessageCenter().notify(
- new Message(MSG
- .view_group_contextMenu_saveChartToDashboardSuccessful(result
- .getName()), Message.Severity.Info));
+ CoreGUI
+ .getMessageCenter()
+ .notify(
+ new Message(
+ MSG
+ .view_tree_common_contextMenu_saveChartToDashboardSuccessful(result
+ .getName()), Message.Severity.Info));
}
});
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 674fc17..7c82422 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
@@ -143,62 +143,62 @@ public class ResourceGroupDetailView extends AbstractTwoLevelTabSetView<Resource
protected List<TwoLevelTab> createTabs() {
List<TwoLevelTab> tabs = new ArrayList<TwoLevelTab>();
- summaryTab = new TwoLevelTab(getTabSet().extendLocatorId("Summary"), MSG.view_group_tabs_summary(),
+ summaryTab = new TwoLevelTab(getTabSet().extendLocatorId("Summary"), MSG.view_tabs_common_summary(),
"/images/icons/Service_up_16.png");
- summaryOverview = new SubTab(summaryTab.extendLocatorId("Overview"), MSG.view_group_tabs_overview(), null);
- summaryTimeline = new SubTab(summaryTab.extendLocatorId("Timeline"), MSG.view_group_tabs_timeline(), null);
+ summaryOverview = new SubTab(summaryTab.extendLocatorId("Overview"), MSG.view_tabs_common_overview(), null);
+ summaryTimeline = new SubTab(summaryTab.extendLocatorId("Timeline"), MSG.view_tabs_common_timeline(), null);
summaryTab.registerSubTabs(summaryOverview, summaryTimeline);
tabs.add(summaryTab);
- monitoringTab = new TwoLevelTab(getTabSet().extendLocatorId("Monitoring"), MSG.view_group_tabs_monitoring(),
+ monitoringTab = new TwoLevelTab(getTabSet().extendLocatorId("Monitoring"), MSG.view_tabs_common_monitoring(),
"/images/icons/Monitor_grey_16.png");
- monitorGraphs = new SubTab(monitoringTab.extendLocatorId("Graphs"), MSG.view_group_tabs_graphs(), null);
- monitorTables = new SubTab(monitoringTab.extendLocatorId("Tables"), MSG.view_group_tabs_tables(), null);
- monitorTraits = new SubTab(monitoringTab.extendLocatorId("Traits"), MSG.view_group_tabs_traits(), null);
+ monitorGraphs = new SubTab(monitoringTab.extendLocatorId("Graphs"), MSG.view_tabs_common_graphs(), null);
+ monitorTables = new SubTab(monitoringTab.extendLocatorId("Tables"), MSG.view_tabs_common_tables(), null);
+ monitorTraits = new SubTab(monitoringTab.extendLocatorId("Traits"), MSG.view_tabs_common_traits(), null);
- monitorSched = new SubTab(monitoringTab.extendLocatorId("Schedules"), MSG.view_group_tabs_schedules(), null);
- monitorCallTime = new SubTab(monitoringTab.extendLocatorId("CallTime"), MSG.view_group_tabs_calltime(), null);
+ monitorSched = new SubTab(monitoringTab.extendLocatorId("Schedules"), MSG.view_tabs_common_schedules(), null);
+ monitorCallTime = new SubTab(monitoringTab.extendLocatorId("CallTime"), MSG.view_tabs_common_calltime(), null);
monitoringTab.registerSubTabs(monitorGraphs, monitorTables, monitorTraits, monitorSched, monitorCallTime);
tabs.add(monitoringTab);
- inventoryTab = new TwoLevelTab(getTabSet().extendLocatorId("Inventory"), MSG.view_group_tabs_inventory(),
+ inventoryTab = new TwoLevelTab(getTabSet().extendLocatorId("Inventory"), MSG.view_tabs_common_inventory(),
"/images/icons/Inventory_grey_16.png");
- inventoryMembers = new SubTab(inventoryTab.extendLocatorId("Members"), MSG.view_group_tabs_members(), null);
+ inventoryMembers = new SubTab(inventoryTab.extendLocatorId("Members"), MSG.view_tabs_common_members(), null);
inventoryConn = new SubTab(inventoryTab.extendLocatorId("ConnectionSettings"), MSG
- .view_group_tabs_connectionSettings(), null);
+ .view_tabs_common_connectionSettings(), null);
inventoryConnHistory = new SubTab(inventoryTab.extendLocatorId("ConnectionSettingsHistory"), MSG
- .view_group_tabs_connectionSettingsHistory(), null);
+ .view_tabs_common_connectionSettingsHistory(), null);
inventoryMembership = new SubTab(inventoryTab.extendLocatorId("Membership"), "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"), MSG.view_group_tabs_operations(),
+ operationsTab = new TwoLevelTab(getTabSet().extendLocatorId("Operations"), MSG.view_tabs_common_operations(),
"/images/icons/Operation_grey_16.png");
- this.opHistory = new SubTab(operationsTab.extendLocatorId("History"), MSG.view_group_tabs_history(), null);
- this.opSched = new SubTab(operationsTab.extendLocatorId("Scheduled"), MSG.view_group_tabs_scheduled(), null);
+ this.opHistory = new SubTab(operationsTab.extendLocatorId("History"), MSG.view_tabs_common_history(), null);
+ this.opSched = new SubTab(operationsTab.extendLocatorId("Scheduled"), MSG.view_tabs_common_scheduled(), null);
operationsTab.registerSubTabs(this.opHistory, this.opSched);
tabs.add(operationsTab);
- alertsTab = new TwoLevelTab(getTabSet().extendLocatorId("Alerts"), MSG.view_group_tabs_alerts(),
+ alertsTab = new TwoLevelTab(getTabSet().extendLocatorId("Alerts"), MSG.view_tabs_common_alerts(),
"/images/icons/Alert_grey_16.png");
- this.alertHistory = new SubTab(alertsTab.extendLocatorId("History"), MSG.view_group_tabs_history(), null);
- this.alertDef = new SubTab(alertsTab.extendLocatorId("Definitions"), MSG.view_group_tabs_definitions(), null);
+ this.alertHistory = new SubTab(alertsTab.extendLocatorId("History"), MSG.view_tabs_common_history(), null);
+ this.alertDef = new SubTab(alertsTab.extendLocatorId("Definitions"), MSG.view_tabs_common_definitions(), null);
alertsTab.registerSubTabs(alertHistory, alertDef);
tabs.add(alertsTab);
configurationTab = new TwoLevelTab(getTabSet().extendLocatorId("Configuration"), MSG
- .view_group_tabs_configuration(), "/images/icons/Configure_grey_16.png");
- this.configCurrent = new SubTab(configurationTab.extendLocatorId("Current"), MSG.view_group_tabs_current(),
+ .view_tabs_common_configuration(), "/images/icons/Configure_grey_16.png");
+ this.configCurrent = new SubTab(configurationTab.extendLocatorId("Current"), MSG.view_tabs_common_current(),
null);
- this.configHistory = new SubTab(configurationTab.extendLocatorId("History"), MSG.view_group_tabs_history(),
+ this.configHistory = new SubTab(configurationTab.extendLocatorId("History"), MSG.view_tabs_common_history(),
null);
configurationTab.registerSubTabs(this.configCurrent, this.configHistory);
tabs.add(configurationTab);
- eventsTab = new TwoLevelTab(getTabSet().extendLocatorId("Events"), MSG.view_group_tabs_events(),
+ eventsTab = new TwoLevelTab(getTabSet().extendLocatorId("Events"), MSG.view_tabs_common_events(),
"/images/icons/Events_grey_16.png");
- this.eventHistory = new SubTab(eventsTab.extendLocatorId("History"), MSG.view_group_tabs_history(), null);
+ this.eventHistory = new SubTab(eventsTab.extendLocatorId("History"), MSG.view_tabs_common_history(), null);
eventsTab.registerSubTabs(eventHistory);
tabs.add(eventsTab);
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTitleBar.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTitleBar.java
index 438a46e..c99e1ca 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTitleBar.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/detail/ResourceGroupTitleBar.java
@@ -96,12 +96,12 @@ public class ResourceGroupTitleBar extends LocatableHLayout {
new AsyncCallback<Void>() {
public void onFailure(Throwable caught) {
CoreGUI.getErrorHandler().handleError(
- MSG.view_group_titleBar_updateTagsFailure(group.getName()), caught);
+ MSG.view_titleBar_common_updateTagsFailure(group.getName()), caught);
}
public void onSuccess(Void result) {
CoreGUI.getMessageCenter().notify(
- new Message(MSG.view_group_titleBar_updateTagsSuccessful(group.getName()),
+ new Message(MSG.view_titleBar_common_updateTagsSuccessful(group.getName()),
Message.Severity.Info));
// update what is essentially our local cache
group.setTags(tags);
@@ -128,7 +128,7 @@ public class ResourceGroupTitleBar extends LocatableHLayout {
GWTServiceLookup.getResourceGroupService().findResourceGroupsByCriteria(criteria,
new AsyncCallback<PageList<ResourceGroup>>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(MSG.view_group_titleBar_loadTagsFailure(group.getName()),
+ CoreGUI.getErrorHandler().handleError(MSG.view_titleBar_common_loadTagsFailure(group.getName()),
caught);
}
@@ -167,9 +167,9 @@ public class ResourceGroupTitleBar extends LocatableHLayout {
private void updateFavoriteButton() {
this.favoriteButton.setSrc(favorite ? FAV_ICON : NOT_FAV_ICON);
if (favorite) {
- this.favoriteButton.setTooltip(MSG.view_group_titleBar_clickToRemoveFav());
+ this.favoriteButton.setTooltip(MSG.view_titleBar_common_clickToRemoveFav());
} else {
- this.favoriteButton.setTooltip(MSG.view_group_titleBar_clickToAddFav());
+ this.favoriteButton.setTooltip(MSG.view_titleBar_common_clickToAddFav());
}
}
@@ -188,9 +188,9 @@ public class ResourceGroupTitleBar extends LocatableHLayout {
public void onSuccess(Subject subject) {
String m;
if (favorite) {
- m = MSG.view_group_titleBar_addedFav(ResourceGroupTitleBar.this.group.getName());
+ m = MSG.view_titleBar_common_addedFav(ResourceGroupTitleBar.this.group.getName());
} else {
- m = MSG.view_group_titleBar_removedFav(ResourceGroupTitleBar.this.group.getName());
+ m = MSG.view_titleBar_common_removedFav(ResourceGroupTitleBar.this.group.getName());
}
CoreGUI.getMessageCenter().notify(new Message(m, Message.Severity.Info));
updateFavoriteButton();
@@ -199,9 +199,9 @@ public class ResourceGroupTitleBar extends LocatableHLayout {
public void onFailure(Throwable throwable) {
String m;
if (favorite) {
- m = MSG.view_group_titleBar_addedFavFailure(ResourceGroupTitleBar.this.group.getName());
+ m = MSG.view_titleBar_common_addedFavFailure(ResourceGroupTitleBar.this.group.getName());
} else {
- m = MSG.view_group_titleBar_removedFavFailure(ResourceGroupTitleBar.this.group.getName());
+ m = MSG.view_titleBar_common_removedFavFailure(ResourceGroupTitleBar.this.group.getName());
}
CoreGUI.getMessageCenter().notify(new Message(m, Message.Severity.Error));
// Revert back to our original favorite status, since the server update failed.
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
index b548590..5541161 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
@@ -651,45 +651,6 @@ view_dynagroup_loadDefinitionMissing=There is no group definition with the ID of
view_dynagroup_permUnknown=Could not determine if you have the proper permissions - access is denied~
view_dynagroup_permDenied=You do not have permission to view group definitions~
view_dynagroup_definitions=DynaGroup Definitions~
-view_group_titleBar_updateTagsSuccessful=The tags for the resource group [{0}] have been updated~
-view_group_titleBar_updateTagsFailure=Failed to update the tags for resource group [{0}]~
-view_group_titleBar_loadTagsFailure=Failed to load the tags for resource group [{0}]~
-view_group_titleBar_clickToRemoveFav=Click to remove this group as a favorite~
-view_group_titleBar_clickToAddFav=Click to add this group as a favorite~
-view_group_titleBar_removedFav=You have removed group [{0}] as one of your favorites~
-view_group_titleBar_addedFav=You have added group [{0}] as a favorite~
-view_group_titleBar_removedFavFailure=Failed to remove group [{0}] as one of your favorites~
-view_group_titleBar_addedFavFailure=Failed to add group [{0}] as a favorite~
-view_group_contextMenu_pluginConfiguration=Plugin Configuration~
-view_group_contextMenu_resourceConfiguration=Resource Configuration~
-view_group_contextMenu_editResourceConfiguration=Edit [{0}] Resource Configuration~
-view_group_contextMenu_operations=Operations~
-view_group_contextMenu_measurements=Measurements~
-view_group_contextMenu_addChartToDashboard=Add chart to dashboard [{0}]~
-view_group_contextMenu_chart=Chart~
-view_group_contextMenu_saveChartToDashboardSuccessful=You have saved dashboard [{0}]~
-view_group_contextMenu_saveChartToDashboardFailure=Failed to save the dashboard~
-view_group_tabs_summary=Summary~
-view_group_tabs_overview=Overview~
-view_group_tabs_timeline=Timeline~
-view_group_tabs_monitoring=Monitoring~
-view_group_tabs_graphs=Graphs~
-view_group_tabs_tables=Tables~
-view_group_tabs_traits=Traits~
-view_group_tabs_schedules=Schedules~
-view_group_tabs_calltime=Calltime~
-view_group_tabs_inventory=Inventory~
-view_group_tabs_members=Members~
-view_group_tabs_connectionSettings=Connection Settings~
-view_group_tabs_connectionSettingsHistory=Connection Settings History~
-view_group_tabs_operations=Operations~
-view_group_tabs_history=History~
-view_group_tabs_scheduled=Scheduled~
-view_group_tabs_alerts=Alerts~
-view_group_tabs_definitions=Definitions~
-view_group_tabs_current=Current~
-view_group_tabs_events=Events~
-view_group_tabs_configuration=Configuration~
view_group_membership_saveFailure=Failed to update membership of group [{0}]~
view_group_membership_saveSuccessful=You have updated the membership of group [{0}]~
view_group_resConfig_edit_saveTooltip=Update the configurations of all group members~
13 years, 7 months
[rhq] modules/enterprise
by Joseph Marques
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/NewResourceTreeDataSource.java | 97 ++++------
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/NewResourceTreeView.java | 41 ++--
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceDetailView.java | 86 ++++----
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTitleBar.java | 33 ++-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeDatasource.java | 25 +-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeView.java | 69 +++----
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties | 64 ++++++
7 files changed, 259 insertions(+), 156 deletions(-)
New commits:
commit 5f319735a944cf7c9e8b078af2705a75d7116d15
Author: Joseph Marques <joseph(a)redhat.com>
Date: Wed Nov 17 17:09:11 2010 -0500
i18n for org.rhq.enterprise.gui.coregui.client.inventory.resource.detail
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/NewResourceTreeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/NewResourceTreeDataSource.java
index ddda348..db193e1 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/NewResourceTreeDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/NewResourceTreeDataSource.java
@@ -28,6 +28,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.data.DSRequest;
import com.smartgwt.client.data.DSResponse;
@@ -48,6 +49,7 @@ import org.rhq.core.domain.resource.ResourceSubCategory;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.Messages;
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.resource.type.ResourceTypeRepository;
@@ -60,6 +62,8 @@ import org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTyp
@Deprecated
public class NewResourceTreeDataSource extends DataSource {
+ Messages MSG = CoreGUI.getMessages();
+
int rootId;
private ResourceGWTServiceAsync resourceService = GWTServiceLookup.getResourceService();
@@ -69,22 +73,23 @@ public class NewResourceTreeDataSource extends DataSource {
setDataProtocol(DSProtocol.CLIENTCUSTOM);
setDataFormat(DSDataFormat.CUSTOM);
-
this.rootId = rootId;
- DataSourceField idDataField = new DataSourceTextField("id", "ID");
+ DataSourceField idDataField = new DataSourceTextField("id", MSG.common_title_id());
idDataField.setPrimaryKey(true);
- DataSourceTextField nameDataField = new DataSourceTextField("name", "Name");
+ DataSourceTextField nameDataField = new DataSourceTextField("name", MSG.common_title_name());
nameDataField.setCanEdit(false);
- DataSourceTextField descriptionDataField = new DataSourceTextField("description", "Description");
+ DataSourceTextField descriptionDataField = new DataSourceTextField("description", MSG
+ .common_title_description());
descriptionDataField.setCanEdit(false);
- DataSourceImageField availabilityDataField = new DataSourceImageField("currentAvailability", "Availability");
+ DataSourceImageField availabilityDataField = new DataSourceImageField("currentAvailability", MSG
+ .common_title_availability());
descriptionDataField.setCanEdit(false);
- DataSourceTextField parentIdField = new DataSourceTextField("parentId", "Parent ID");
+ DataSourceTextField parentIdField = new DataSourceTextField("parentId", MSG.common_title_id_parent());
parentIdField.setForeignKey("id");
// parentIdField.setRootValue(rootId);
@@ -107,27 +112,26 @@ public class NewResourceTreeDataSource extends DataSource {
// Asume success
response.setStatus(0);
switch (request.getOperationType()) {
- case ADD:
- //executeAdd(request, response);
- break;
- case FETCH:
- executeFetch(requestId, request, response);
- break;
- case REMOVE:
- //executeRemove(lstRec);
- break;
- case UPDATE:
- //executeAdd(lstRec, false);
- break;
-
- default:
- break;
+ case ADD:
+ //executeAdd(request, response);
+ break;
+ case FETCH:
+ executeFetch(requestId, request, response);
+ break;
+ case REMOVE:
+ //executeRemove(lstRec);
+ break;
+ case UPDATE:
+ //executeAdd(lstRec, false);
+ break;
+
+ default:
+ break;
}
return request.getData();
}
-
public void executeFetch(final String requestId, final DSRequest request, final DSResponse response) {
final long start = System.currentTimeMillis();
@@ -136,12 +140,12 @@ public class NewResourceTreeDataSource extends DataSource {
ResourceCriteria criteria = new ResourceCriteria();
if (p == null) {
- com.allen_sauer.gwt.log.client.Log.info("DataSourceTree: Loading initial data");
+ Log.info("DataSourceTree: Loading initial data");
criteria.addFilterId(rootId);
} else {
- com.allen_sauer.gwt.log.client.Log.info("DataSourceTree: Loading " + p);
+ Log.info("DataSourceTree: Loading " + p);
criteria.addFilterParentResourceId(Integer.parseInt(p));
}
@@ -151,7 +155,7 @@ public class NewResourceTreeDataSource extends DataSource {
resourceService.findResourcesByCriteria(criteria, new AsyncCallback<PageList<Resource>>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to load resource data for tree", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_tree_common_loadFailed_generic(), caught);
response.setStatus(RPCResponse.STATUS_FAILURE);
processResponse(requestId, response);
}
@@ -164,15 +168,17 @@ public class NewResourceTreeDataSource extends DataSource {
private void processIncomingData(List<Resource> result, final DSResponse response, final String requestId) {
- ResourceTypeRepository.Cache.getInstance().loadResourceTypes(result,
- EnumSet.of(ResourceTypeRepository.MetadataType.operations, ResourceTypeRepository.MetadataType.children, ResourceTypeRepository.MetadataType.subCategory),
- new ResourceTypeRepository.ResourceTypeLoadedCallback() {
- public void onResourceTypeLoaded(List<Resource> result) {
-// response.setData(buildNodes(result));
- processResponse(requestId, response);
+ ResourceTypeRepository.Cache.getInstance().loadResourceTypes(
+ result,
+ EnumSet.of(ResourceTypeRepository.MetadataType.operations, ResourceTypeRepository.MetadataType.children,
+ ResourceTypeRepository.MetadataType.subCategory),
+ new ResourceTypeRepository.ResourceTypeLoadedCallback() {
+ public void onResourceTypeLoaded(List<Resource> result) {
+ // response.setData(buildNodes(result));
+ processResponse(requestId, response);
- }
- });
+ }
+ });
}
/**
@@ -196,20 +202,19 @@ public class NewResourceTreeDataSource extends DataSource {
}
return rootNode;
-// return introduceTypeFolders(records);
+ // return introduceTypeFolders(records);
}
private static void buildTree(TreeNode parent, Resource parentResource, Map<Integer, Resource> resources) {
HashMap<ResourceType, TypeTreeNode> types = new HashMap<ResourceType, TypeTreeNode>();
-
ArrayList<ResourceTreeNode> childNodes = new ArrayList<ResourceTreeNode>();
for (Resource res : resources.values()) {
if (res.getParentResource() != null && res.getParentResource().getId() == parentResource.getId()) {
-// parent.setChildren();
+ // parent.setChildren();
ResourceTreeNode child = new ResourceTreeNode(res);
@@ -224,20 +229,16 @@ public class NewResourceTreeDataSource extends DataSource {
}
-
-
-
private static TreeNode[] introduceTypeFolders(ResourceTreeNode[] nodes) {
ArrayList<TreeNode> built = new ArrayList<TreeNode>();
HashMap<ResourceSubCategory, CategoryTreeNode> categories = new HashMap<ResourceSubCategory, CategoryTreeNode>();
HashMap<ResourceType, TypeTreeNode> types = new HashMap<ResourceType, TypeTreeNode>();
-
for (ResourceTreeNode node : nodes) {
built.add(node);
if (!types.containsKey(node.getResourceType())
- && node.getResourceType().getCategory() != ResourceCategory.PLATFORM) {
+ && node.getResourceType().getCategory() != ResourceCategory.PLATFORM) {
String parentResourceId = String.valueOf(node.getResource().getParentResource().getId());
@@ -296,7 +297,6 @@ public class NewResourceTreeDataSource extends DataSource {
}
}
-
public static class TypeTreeNode extends TreeNode {
private TypeTreeNode(String parentId, String parentResourceId, String type) {
@@ -320,28 +320,27 @@ public class NewResourceTreeDataSource extends DataSource {
String id = String.valueOf(resource.getId());
String parentId = resource.getParentResource() == null ? null
- : (resource.getParentResource().getId() + "_" + resource.getResourceType().getName());
+ : (resource.getParentResource().getId() + "_" + resource.getResourceType().getName());
// com.allen_sauer.gwt.log.client.Log.info(id + " / " + parentId);
setID(id);
setParentID(parentId);
-
setAttribute("id", id);
setAttribute("parentId", parentId);
// setAttribute("parentKey", resource.getParentResource() == null ? 0 : (resource.getParentResource().getId() + resource.getResourceType().getName()));
setAttribute("name", resource.getName());
-// setAttribute("description", resource.getDescription());
+ // setAttribute("description", resource.getDescription());
setAttribute(
- "currentAvailability",
- resource.getCurrentAvailability().getAvailabilityType() == AvailabilityType.UP ? "/images/icons/availability_green_16.png"
- : "/images/icons/availability_red_16.png");
+ "currentAvailability",
+ resource.getCurrentAvailability().getAvailabilityType() == AvailabilityType.UP ? "/images/icons/availability_green_16.png"
+ : "/images/icons/availability_red_16.png");
setIsFolder((resource.getResourceType().getChildResourceTypes() != null && !resource.getResourceType()
- .getChildResourceTypes().isEmpty()));
+ .getChildResourceTypes().isEmpty()));
}
public Resource getResource() {
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/NewResourceTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/NewResourceTreeView.java
index 6fef545..9ce25ab 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/NewResourceTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/NewResourceTreeView.java
@@ -23,6 +23,7 @@ import java.util.EnumSet;
import java.util.HashMap;
import java.util.List;
+import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.user.client.History;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.types.SelectionStyle;
@@ -127,7 +128,7 @@ public class NewResourceTreeView extends LocatableVLayout {
if (treeGrid.getSelectedRecord() instanceof ResourceTreeDatasource.ResourceTreeNode) {
ResourceTreeDatasource.ResourceTreeNode node = (ResourceTreeDatasource.ResourceTreeNode) treeGrid
.getSelectedRecord();
- com.allen_sauer.gwt.log.client.Log.info("Resource selected in tree: " + node.getResource());
+ Log.info("Resource selected in tree: " + node.getResource());
String newToken = "Resource/" + node.getResource().getId();
String currentToken = History.getToken();
@@ -187,16 +188,16 @@ public class NewResourceTreeView extends LocatableVLayout {
private void buildResourceContextMenu(final Resource resource, final ResourceType resourceType) {
contextMenu.setItems(new MenuItem(resource.getName()));
- contextMenu.addItem(new MenuItem("Type: " + resourceType.getName()));
+ contextMenu.addItem(new MenuItem(MSG.view_tree_common_contextMenu_type_name_label(resourceType.getName())));
- MenuItem editPluginConfiguration = new MenuItem("Plugin Configuration");
+ MenuItem editPluginConfiguration = new MenuItem(MSG.view_tree_common_contextMenu_pluginConfiguration());
editPluginConfiguration.addClickHandler(new ClickHandler() {
public void onClick(MenuItemClickEvent event) {
int resourceId = resource.getId();
int resourceTypeId = resourceType.getId();
Window configEditor = new Window();
- configEditor.setTitle("Edit " + resource.getName() + " plugin configuration");
+ configEditor.setTitle(MSG.view_tree_common_contextMenu_editPluginConfiguration(resource.getName()));
configEditor.setWidth(800);
configEditor.setHeight(800);
configEditor.setIsModal(true);
@@ -212,14 +213,14 @@ public class NewResourceTreeView extends LocatableVLayout {
editPluginConfiguration.setEnabled(resourceType.getPluginConfigurationDefinition() != null);
contextMenu.addItem(editPluginConfiguration);
- MenuItem editResourceConfiguration = new MenuItem("Resource Configuration");
+ MenuItem editResourceConfiguration = new MenuItem(MSG.view_tree_common_contextMenu_resourceConfiguration());
editResourceConfiguration.addClickHandler(new ClickHandler() {
public void onClick(MenuItemClickEvent event) {
int resourceId = resource.getId();
int resourceTypeId = resourceType.getId();
final Window configEditor = new Window();
- configEditor.setTitle("Edit " + resource.getName() + " resource configuration");
+ configEditor.setTitle(MSG.view_tree_common_contextMenu_editResourceConfiguration(resource.getName()));
configEditor.setWidth(800);
configEditor.setHeight(800);
configEditor.setIsModal(true);
@@ -244,7 +245,7 @@ public class NewResourceTreeView extends LocatableVLayout {
contextMenu.addItem(new MenuItemSeparator());
// Operations Menu
- MenuItem operations = new MenuItem("Operations");
+ MenuItem operations = new MenuItem(MSG.view_tree_common_contextMenu_operations());
Menu opSubMenu = new Menu();
for (final OperationDefinition operationDefinition : resourceType.getOperationDefinitions()) {
MenuItem operationItem = new MenuItem(operationDefinition.getDisplayName());
@@ -263,7 +264,7 @@ public class NewResourceTreeView extends LocatableVLayout {
contextMenu.addItem(buildMetricsMenu(resourceType));
// Create Menu
- MenuItem createChildMenu = new MenuItem("Create Child");
+ MenuItem createChildMenu = new MenuItem(MSG.common_button_create_child());
Menu createChildSubMenu = new Menu();
for (final ResourceType childType : resourceType.getChildResourceTypes()) {
if (childType.isCreatable()) {
@@ -282,7 +283,7 @@ public class NewResourceTreeView extends LocatableVLayout {
contextMenu.addItem(createChildMenu);
// Manually Add Menu
- MenuItem importChildMenu = new MenuItem("Import");
+ MenuItem importChildMenu = new MenuItem(MSG.common_button_import());
Menu importChildSubMenu = new Menu();
for (ResourceType childType : resourceType.getChildResourceTypes()) {
if (childType.isSupportsManualAdd()) {
@@ -306,7 +307,8 @@ public class NewResourceTreeView extends LocatableVLayout {
criteria.fetchParentResourceTypes(true);
rts.findResourceTypesByCriteria(criteria, new AsyncCallback<PageList<ResourceType>>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to load platform manual add children", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_tree_common_contextMenu_loadFailed_manualAddChildren(),
+ caught);
}
public void onSuccess(PageList<ResourceType> result) {
@@ -326,7 +328,7 @@ public class NewResourceTreeView extends LocatableVLayout {
GWTServiceLookup.getDashboardService().findDashboardsForSubject(new AsyncCallback<List<Dashboard>>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to load user dashboards", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_tree_common_contextMenu_loadFailed_dashboard(), caught);
}
public void onSuccess(List<Dashboard> result) {
@@ -339,7 +341,8 @@ public class NewResourceTreeView extends LocatableVLayout {
defItem.setSubmenu(defSubItem);
for (final Dashboard d : result) {
- MenuItem addToDBItem = new MenuItem("Add chart to Dashboard: " + d.getName());
+ MenuItem addToDBItem = new MenuItem(MSG.view_tree_common_contextMenu_addChartToDashboard(d
+ .getName()));
defSubItem.addItem(addToDBItem);
addToDBItem.addClickHandler(new ClickHandler() {
@@ -357,14 +360,15 @@ public class NewResourceTreeView extends LocatableVLayout {
GWTServiceLookup.getDashboardService().storeDashboard(d,
new AsyncCallback<Dashboard>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to save dashboard to server",
- caught);
+ CoreGUI.getErrorHandler().handleError(
+ MSG.view_tree_common_contextMenu_saveChartToDashboardFailure(), caught);
}
public void onSuccess(Dashboard result) {
CoreGUI.getMessageCenter().notify(
- new Message("Saved dashboard " + result.getName() + " to server",
- Message.Severity.Info));
+ new Message(MSG
+ .view_tree_common_contextMenu_saveChartToDashboardSuccessful(result
+ .getName()), Message.Severity.Info));
}
});
@@ -431,7 +435,7 @@ public class NewResourceTreeView extends LocatableVLayout {
resourceService.getPlatformForResource(selectedResource.getId(), new AsyncCallback<Resource>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("adasdf", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_tree_common_loadFailed_root(), caught);
}
public void onSuccess(Resource result) {
@@ -443,7 +447,8 @@ public class NewResourceTreeView extends LocatableVLayout {
resourceService.findResourcesByCriteria(criteria, new AsyncCallback<PageList<Resource>>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("lkasldf", caught);
+ CoreGUI.getErrorHandler()
+ .handleError(MSG.view_tree_common_loadFailed_descendants(), caught);
}
public void onSuccess(PageList<Resource> result) {
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 356aa5b..29647f1 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
@@ -121,70 +121,80 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
protected List<TwoLevelTab> createTabs() {
List<TwoLevelTab> tabs = new ArrayList<TwoLevelTab>();
- summaryTab = new TwoLevelTab(getTabSet().extendLocatorId("Summary"), "Summary",
+ summaryTab = new TwoLevelTab(getTabSet().extendLocatorId("Summary"), MSG.view_tabs_common_summary(),
"/images/icons/Service_up_16.png");
- summaryOverview = new SubTab(summaryTab.extendLocatorId("Overview"), "Overview", null);
- summaryDashboard = new SubTab(summaryTab.extendLocatorId("Dashboard"), "Dashboard", null);
- summaryTimeline = new SubTab(summaryTab.extendLocatorId("Timeline"), "Timeline", null);
+ summaryOverview = new SubTab(summaryTab.extendLocatorId("Overview"), MSG.view_tabs_common_overview(), null);
+ summaryDashboard = new SubTab(summaryTab.extendLocatorId("Dashboard"), MSG.view_tabs_common_dashboard(), null);
+ summaryTimeline = new SubTab(summaryTab.extendLocatorId("Timeline"), MSG.view_tabs_common_timeline(), null);
summaryTab.registerSubTabs(summaryOverview, summaryDashboard, summaryTimeline);
tabs.add(summaryTab);
- monitoringTab = new TwoLevelTab(getTabSet().extendLocatorId("Monitoring"), "Monitoring",
+ monitoringTab = new TwoLevelTab(getTabSet().extendLocatorId("Monitoring"), MSG.view_tabs_common_monitoring(),
"/images/icons/Monitor_grey_16.png");
- monitorGraphs = new SubTab(monitoringTab.extendLocatorId("Graphs"), "Graphs", null);
- monitorTables = new SubTab(monitoringTab.extendLocatorId("Tables"), "Tables", null);
- monitorTraits = new SubTab(monitoringTab.extendLocatorId("Traits"), "Traits", null);
- monitorAvail = new SubTab(monitoringTab.extendLocatorId("Availability"), "Availability", null);
- monitorSched = new SubTab(monitoringTab.extendLocatorId("Schedules"), "Schedules", null);
- monitorCallTime = new SubTab(monitoringTab.extendLocatorId("CallTime"), "Call Time", null);
+ monitorGraphs = new SubTab(monitoringTab.extendLocatorId("Graphs"), MSG.view_tabs_common_graphs(), null);
+ monitorTables = new SubTab(monitoringTab.extendLocatorId("Tables"), MSG.view_tabs_common_tables(), null);
+ monitorTraits = new SubTab(monitoringTab.extendLocatorId("Traits"), MSG.view_tabs_common_traits(), null);
+ monitorAvail = new SubTab(monitoringTab.extendLocatorId("Availability"), MSG.view_tabs_common_availability(),
+ null);
+ monitorSched = new SubTab(monitoringTab.extendLocatorId("Schedules"), MSG.view_tabs_common_schedules(), null);
+ monitorCallTime = new SubTab(monitoringTab.extendLocatorId("CallTime"), MSG.view_tabs_common_calltime(), null);
monitoringTab.registerSubTabs(monitorGraphs, monitorTables, monitorTraits, monitorAvail, monitorSched,
monitorCallTime);
tabs.add(monitoringTab);
- inventoryTab = new TwoLevelTab(getTabSet().extendLocatorId("Inventory"), "Inventory",
+ inventoryTab = new TwoLevelTab(getTabSet().extendLocatorId("Inventory"), MSG.view_tabs_common_inventory(),
"/images/icons/Inventory_grey_16.png");
- inventoryChildren = new SubTab(inventoryTab.extendLocatorId("Children"), "Child Resources", null);
- inventoryChildHistory = new SubTab(inventoryTab.extendLocatorId("ChildHist"), "Child History", null);
- inventoryConn = new SubTab(inventoryTab.extendLocatorId("ConnectionSettings"), "Connection Settings", null);
- inventoryConnHistory = new SubTab(inventoryTab.extendLocatorId("ConnSetHist"), "Connection Settings History",
- null);
- inventoryGroups = new SubTab(inventoryTab.extendLocatorId("Groups"), "Groups", null);
- inventoryGroupMembership = new SubTab(inventoryTab.extendLocatorId("GroupMembership"), "Group Membership", null);
+ inventoryChildren = new SubTab(inventoryTab.extendLocatorId("Children"),
+ MSG.view_tabs_common_child_resources(), null);
+ inventoryChildHistory = new SubTab(inventoryTab.extendLocatorId("ChildHist"), MSG
+ .view_tabs_common_child_history(), null);
+ inventoryConn = new SubTab(inventoryTab.extendLocatorId("ConnectionSettings"), MSG
+ .view_tabs_common_connectionSettings(), null);
+ inventoryConnHistory = new SubTab(inventoryTab.extendLocatorId("ConnSetHist"), MSG
+ .view_tabs_common_connectionSettingsHistory(), null);
+ inventoryGroups = new SubTab(inventoryTab.extendLocatorId("Groups"), MSG.view_tabs_common_groups(), null);
+ inventoryGroupMembership = new SubTab(inventoryTab.extendLocatorId("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"), "Operations",
+ operationsTab = new TwoLevelTab(getTabSet().extendLocatorId("Operations"), MSG.view_tabs_common_operations(),
"/images/icons/Operation_grey_16.png");
- this.opHistory = new SubTab(operationsTab.extendLocatorId("History"), "History", null);
- this.opSched = new SubTab(operationsTab.extendLocatorId("Scheduled"), "Scheduled", null);
+ this.opHistory = new SubTab(operationsTab.extendLocatorId("History"), MSG.view_tabs_common_history(), null);
+ this.opSched = new SubTab(operationsTab.extendLocatorId("Scheduled"), MSG.view_tabs_common_scheduled(), null);
operationsTab.registerSubTabs(this.opHistory, this.opSched);
tabs.add(operationsTab);
- alertsTab = new TwoLevelTab(getTabSet().extendLocatorId("Alerts"), "Alerts", "/images/icons/Alert_grey_16.png");
- this.alertHistory = new SubTab(alertsTab.extendLocatorId("History"), "History", null);
- this.alertDef = new SubTab(alertsTab.extendLocatorId("Definitions"), "Definitions", null);
+ alertsTab = new TwoLevelTab(getTabSet().extendLocatorId("Alerts"), MSG.view_tabs_common_alerts(),
+ "/images/icons/Alert_grey_16.png");
+ this.alertHistory = new SubTab(alertsTab.extendLocatorId("History"), MSG.view_tabs_common_history(), null);
+ this.alertDef = new SubTab(alertsTab.extendLocatorId("Definitions"), MSG.view_tabs_common_definitions(), null);
alertsTab.registerSubTabs(alertHistory, alertDef);
tabs.add(alertsTab);
- configurationTab = new TwoLevelTab(getTabSet().extendLocatorId("Configuration"), "Configuration",
- "/images/icons/Configure_grey_16.png");
- this.configCurrent = new SubTab(configurationTab.extendLocatorId("Current"), "Current", null);
- this.configHistory = new SubTab(configurationTab.extendLocatorId("History"), "History", null);
+ configurationTab = new TwoLevelTab(getTabSet().extendLocatorId("Configuration"), MSG
+ .view_tabs_common_configuration(), "/images/icons/Configure_grey_16.png");
+ this.configCurrent = new SubTab(configurationTab.extendLocatorId("Current"), MSG.view_tabs_common_current(),
+ null);
+ this.configHistory = new SubTab(configurationTab.extendLocatorId("History"), MSG.view_tabs_common_history(),
+ null);
configurationTab.registerSubTabs(this.configCurrent, this.configHistory);
tabs.add(configurationTab);
- eventsTab = new TwoLevelTab(getTabSet().extendLocatorId("Events"), "Events", "/images/icons/Events_grey_16.png");
- this.eventHistory = new SubTab(eventsTab.extendLocatorId("History"), "History", null);
+ eventsTab = new TwoLevelTab(getTabSet().extendLocatorId("Events"), MSG.view_tabs_common_events(),
+ "/images/icons/Events_grey_16.png");
+ this.eventHistory = new SubTab(eventsTab.extendLocatorId("History"), MSG.view_tabs_common_history(), null);
eventsTab.registerSubTabs(eventHistory);
tabs.add(eventsTab);
- contentTab = new TwoLevelTab(getTabSet().extendLocatorId("Content"), "Content",
+ contentTab = new TwoLevelTab(getTabSet().extendLocatorId("Content"), MSG.view_tabs_common_content(),
"/images/icons/Content_grey_16.png");
- this.contentDeployed = new SubTab(contentTab.extendLocatorId("Deployed"), "Deployed", null);
- this.contentNew = new SubTab(contentTab.extendLocatorId("New"), "New", null);
- this.contentSubscrip = new SubTab(contentTab.extendLocatorId("Subscriptions"), "Subscriptions", null);
- this.contentHistory = new SubTab(contentTab.extendLocatorId("History"), "History", null);
+ this.contentDeployed = new SubTab(contentTab.extendLocatorId("Deployed"), MSG.view_tabs_common_deployed(), null);
+ this.contentNew = new SubTab(contentTab.extendLocatorId("New"), MSG.view_tabs_common_new(), null);
+ this.contentSubscrip = new SubTab(contentTab.extendLocatorId("Subscriptions"), MSG
+ .view_tabs_common_subscriptions(), null);
+ this.contentHistory = new SubTab(contentTab.extendLocatorId("History"), MSG.view_tabs_common_history(), null);
contentTab.registerSubTabs(contentDeployed, contentNew, contentSubscrip, contentHistory);
tabs.add(contentTab);
@@ -357,7 +367,7 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
new AsyncCallback<PageList<ResourceComposite>>() {
public void onFailure(Throwable caught) {
CoreGUI.getMessageCenter().notify(
- new Message("Resource with id [" + resourceId + "] does not exist or is not accessible.",
+ new Message(MSG.view_inventory_resource_loadFailed(String.valueOf(resourceId)),
Message.Severity.Warning));
CoreGUI.goToView(InventoryView.VIEW_ID);
@@ -366,7 +376,7 @@ public class ResourceDetailView extends AbstractTwoLevelTabSetView<ResourceCompo
public void onSuccess(PageList<ResourceComposite> result) {
if (result.isEmpty()) {
//noinspection ThrowableInstanceNeverThrown
- onFailure(new Exception("Resource with id [" + resourceId + "] does not exist."));
+ onFailure(new Exception(MSG.view_inventory_resource_loadFailed(String.valueOf(resourceId))));
} else {
final ResourceComposite resourceComposite = result.get(0);
// First load the user's permissions for the Resource.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTitleBar.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTitleBar.java
index bc1e0b7..c025e46 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTitleBar.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTitleBar.java
@@ -100,7 +100,8 @@ public class ResourceTitleBar extends LocatableHLayout {
public void onSuccess(Void result) {
CoreGUI.getMessageCenter().notify(
- new Message("Resource tags updated", Message.Severity.Info));
+ new Message(MSG.view_titleBar_common_updateTagsSuccessful(resource.getName()),
+ Message.Severity.Info));
// update what is essentially our local cache
resource.setTags(tags);
}
@@ -124,7 +125,8 @@ public class ResourceTitleBar extends LocatableHLayout {
GWTServiceLookup.getResourceService().findResourcesByCriteria(criteria,
new AsyncCallback<PageList<Resource>>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Could not load resource tags", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_titleBar_common_loadTagsFailure(resource.getName()),
+ caught);
}
public void onSuccess(PageList<Resource> result) {
@@ -164,7 +166,11 @@ public class ResourceTitleBar extends LocatableHLayout {
private void updateFavoriteButton() {
this.favoriteButton.setSrc(favorite ? FAV_ICON : NOT_FAV_ICON);
- this.favoriteButton.setTooltip("Click to " + (favorite ? "remove" : "add") + " this Resource as a favorite.");
+ if (favorite) {
+ this.favoriteButton.setTooltip(MSG.view_titleBar_common_clickToRemoveFav());
+ } else {
+ this.favoriteButton.setTooltip(MSG.view_titleBar_common_clickToAddFav());
+ }
}
private Set<Integer> toggleFavoriteLocally() {
@@ -181,16 +187,25 @@ public class ResourceTitleBar extends LocatableHLayout {
public class UpdateFavoritesCallback implements AsyncCallback<Subject> {
public void onSuccess(Subject subject) {
- CoreGUI.getMessageCenter().notify(
- new Message((favorite ? "Added " : "Removed ") + " Resource "
- + ResourceTitleBar.this.resource.getName() + " as a favorite.", Message.Severity.Info));
+ String msg = null;
+ if (favorite) {
+ msg = MSG.view_titleBar_common_addedFav(resource.getName());
+ } else {
+ msg = MSG.view_titleBar_common_removedFav(resource.getName());
+ }
+ CoreGUI.getMessageCenter().notify(new Message(msg, Message.Severity.Info));
updateFavoriteButton();
}
public void onFailure(Throwable throwable) {
- CoreGUI.getMessageCenter().notify(
- new Message("Failed to " + (favorite ? "add " : "remove ") + " Resource "
- + ResourceTitleBar.this.resource.getName() + " as a favorite.", Message.Severity.Error));
+ String msg = null;
+ if (favorite) {
+ msg = MSG.view_titleBar_common_addedFavFailure(resource.getName());
+ } else {
+ msg = MSG.view_titleBar_common_removedFavFailure(resource.getName());
+ }
+ CoreGUI.getMessageCenter().notify(new Message(msg, Message.Severity.Info));
+
// Revert back to our original favorite status, since the server update failed.
toggleFavoriteLocally();
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeDatasource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeDatasource.java
index 43d6b8c..2da1ce5 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeDatasource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeDatasource.java
@@ -24,6 +24,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
+import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.data.DSRequest;
import com.smartgwt.client.data.DSResponse;
@@ -41,6 +42,7 @@ import org.rhq.core.domain.resource.ResourceSubCategory;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.gui.coregui.client.CoreGUI;
+import org.rhq.enterprise.gui.coregui.client.Messages;
import org.rhq.enterprise.gui.coregui.client.components.tree.EnhancedTreeNode;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.gwt.ResourceGWTServiceAsync;
@@ -55,6 +57,9 @@ import org.rhq.enterprise.gui.coregui.client.util.StringUtility;
* @author Ian Springer
*/
public class ResourceTreeDatasource extends DataSource {
+
+ Messages MSG = CoreGUI.getMessages();
+
private List<Resource> initialData;
private List<Resource> lockedData;
@@ -68,16 +73,17 @@ public class ResourceTreeDatasource extends DataSource {
this.initialData = initialData;
this.lockedData = (null != lockedData) ? lockedData : new ArrayList<Resource>();
- DataSourceField idDataField = new DataSourceTextField("id", "ID");
+ DataSourceField idDataField = new DataSourceTextField("id", MSG.common_title_id());
idDataField.setPrimaryKey(true);
- DataSourceTextField nameDataField = new DataSourceTextField("name", "Name");
+ DataSourceTextField nameDataField = new DataSourceTextField("name", MSG.common_title_name());
nameDataField.setCanEdit(false);
- DataSourceTextField descriptionDataField = new DataSourceTextField("description", "Description");
+ DataSourceTextField descriptionDataField = new DataSourceTextField("description", MSG
+ .common_title_description());
descriptionDataField.setCanEdit(false);
- DataSourceTextField parentIdField = new DataSourceTextField("parentId", "Parent ID");
+ DataSourceTextField parentIdField = new DataSourceTextField("parentId", MSG.common_title_id_parent());
parentIdField.setForeignKey("id");
this.setDropExtraFields(false);
@@ -115,7 +121,7 @@ public class ResourceTreeDatasource extends DataSource {
public void executeFetch(final String requestId, final DSRequest request, final DSResponse response) {
//final long start = System.currentTimeMillis();
- String parentResourceId = request.getCriteria().getAttribute("parentId");
+ final String parentResourceId = request.getCriteria().getAttribute("parentId");
//com.allen_sauer.gwt.log.client.Log.info("All attributes: " + Arrays.toString(request.getCriteria().getAttributes()));
ResourceCriteria criteria = new ResourceCriteria();
@@ -124,7 +130,7 @@ public class ResourceTreeDatasource extends DataSource {
// If this gets called more than once it's a problem. Don't load initial data more than once.
// Subsequent fetches should be due to parent node tree expansion
if (null != this.initialData) {
- com.allen_sauer.gwt.log.client.Log.debug("ResourceTreeDatasource: Loading initial data...");
+ Log.debug("ResourceTreeDatasource: Loading initial data...");
processIncomingData(this.initialData, response, requestId);
response.setStatus(DSResponse.STATUS_SUCCESS);
@@ -135,14 +141,13 @@ public class ResourceTreeDatasource extends DataSource {
}
} else {
- com.allen_sauer.gwt.log.client.Log.debug("ResourceTreeDatasource: Loading Resource [" + parentResourceId
- + "]...");
+ Log.debug("ResourceTreeDatasource: Loading Resource [" + parentResourceId + "]...");
criteria.addFilterParentResourceId(Integer.parseInt(parentResourceId));
resourceService.findResourcesByCriteria(criteria, new AsyncCallback<PageList<Resource>>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to load resource data for tree", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_tree_common_loadFailed_children(), caught);
response.setStatus(RPCResponse.STATUS_FAILURE);
processResponse(requestId, response);
}
@@ -204,7 +209,7 @@ public class ResourceTreeDatasource extends DataSource {
for (ResourceTreeNode resourceNode : resourceNodes) {
if (allNodeIds.contains(resourceNode.getID())) {
- com.allen_sauer.gwt.log.client.Log.debug("Duplicate ResourceTreeNode - Skipping: " + resourceNode);
+ Log.debug("Duplicate ResourceTreeNode - Skipping: " + resourceNode);
continue;
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeView.java
index 21476d3..bd8b9b0 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/ResourceTreeView.java
@@ -28,6 +28,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.user.client.History;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.data.DSCallback;
@@ -149,7 +150,7 @@ public class ResourceTreeView extends LocatableVLayout {
ResourceTreeNode resourceNode = (ResourceTreeNode) selectedRecord;
if (!resourceNode.isLocked()) {
- System.out.println("Resource Node selected in tree: " + selectedRecord);
+ Log.info("Resource Node selected in tree: " + selectedRecord);
selectedNodeId = resourceNode.getID();
String viewPath = "Resource/" + resourceNode.getResource().getId();
@@ -164,13 +165,14 @@ public class ResourceTreeView extends LocatableVLayout {
}
}
} else if (selectedRecord instanceof AutoGroupTreeNode) {
- com.allen_sauer.gwt.log.client.Log.info("AutoGroup Node selected in tree: " + selectedRecord);
+ Log.info("AutoGroup Node selected in tree: " + selectedRecord);
AutoGroupTreeNode agNode = (AutoGroupTreeNode) selectedRecord;
selectedNodeId = agNode.getID();
getAutoGroupBackingGroup(agNode, new AsyncCallback<ResourceGroup>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to select autogroup node", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_tree_common_loadFailed_selection(),
+ caught);
}
public void onSuccess(ResourceGroup result) {
@@ -231,7 +233,7 @@ public class ResourceTreeView extends LocatableVLayout {
criteria.addFilterVisible(false);
resourceGroupService.findResourceGroupsByCriteria(criteria, new AsyncCallback<PageList<ResourceGroup>>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to fetch autogroup backing group", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_tree_common_loadFailed_node(), caught);
}
public void onSuccess(PageList<ResourceGroup> result) {
@@ -246,7 +248,7 @@ public class ResourceTreeView extends LocatableVLayout {
resourceGroupService.createPrivateResourceGroup(backingGroup, childIds,
new AsyncCallback<ResourceGroup>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to create resource autogroup", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_tree_common_loadFailed_create(), caught);
}
public void onSuccess(ResourceGroup result) {
@@ -268,8 +270,7 @@ public class ResourceTreeView extends LocatableVLayout {
resourceGroupService.setAssignedResources(backingGroup.getId(), childIds, false,
new AsyncCallback<Void>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(
- "Failed to set assigned members for autogroup backing group", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_tree_common_loadFailed_update(), caught);
}
public void onSuccess(Void result) {
@@ -341,7 +342,7 @@ public class ResourceTreeView extends LocatableVLayout {
private void showContextMenu(AutoGroupTreeNode agNode) {
getAutoGroupBackingGroup(agNode, new AsyncCallback<ResourceGroup>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to select AutoGroup node", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_tree_common_loadFailed_selection(), caught);
}
public void onSuccess(ResourceGroup result) {
@@ -369,16 +370,17 @@ public class ResourceTreeView extends LocatableVLayout {
private void buildResourceContextMenu(final Resource resource, final ResourceType resourceType) {
resourceContextMenu.setItems(new MenuItem(resource.getName()));
- resourceContextMenu.addItem(new MenuItem("Type: " + resourceType.getName()));
+ resourceContextMenu.addItem(new MenuItem(MSG.view_tree_common_contextMenu_type_name_label(resourceType
+ .getName())));
- MenuItem editPluginConfiguration = new MenuItem("Plugin Configuration");
+ MenuItem editPluginConfiguration = new MenuItem(MSG.view_tree_common_contextMenu_pluginConfiguration());
editPluginConfiguration.addClickHandler(new ClickHandler() {
public void onClick(MenuItemClickEvent event) {
int resourceId = resource.getId();
int resourceTypeId = resourceType.getId();
Window configEditor = new Window();
- configEditor.setTitle("Edit " + resource.getName() + " plugin configuration");
+ configEditor.setTitle(MSG.view_tree_common_contextMenu_editPluginConfiguration(resource.getName()));
configEditor.setWidth(800);
configEditor.setHeight(800);
configEditor.setIsModal(true);
@@ -394,14 +396,14 @@ public class ResourceTreeView extends LocatableVLayout {
editPluginConfiguration.setEnabled(resourceType.getPluginConfigurationDefinition() != null);
resourceContextMenu.addItem(editPluginConfiguration);
- MenuItem editResourceConfiguration = new MenuItem("Resource Configuration");
+ MenuItem editResourceConfiguration = new MenuItem(MSG.view_tree_common_contextMenu_resourceConfiguration());
editResourceConfiguration.addClickHandler(new ClickHandler() {
public void onClick(MenuItemClickEvent event) {
int resourceId = resource.getId();
int resourceTypeId = resourceType.getId();
final Window configEditor = new Window();
- configEditor.setTitle("Edit " + resource.getName() + " resource configuration");
+ configEditor.setTitle(MSG.view_tree_common_contextMenu_editResourceConfiguration(resource.getName()));
configEditor.setWidth(800);
configEditor.setHeight(800);
configEditor.setIsModal(true);
@@ -426,7 +428,7 @@ public class ResourceTreeView extends LocatableVLayout {
resourceContextMenu.addItem(new MenuItemSeparator());
// Operations Menu
- MenuItem operations = new MenuItem("Operations");
+ MenuItem operations = new MenuItem(MSG.view_tree_common_contextMenu_operations());
Menu opSubMenu = new Menu();
for (final OperationDefinition operationDefinition : resourceType.getOperationDefinitions()) {
MenuItem operationItem = new MenuItem(operationDefinition.getDisplayName());
@@ -441,8 +443,8 @@ public class ResourceTreeView extends LocatableVLayout {
GWTServiceLookup.getResourceService().findResourcesByCriteria(criteria,
new AsyncCallback<PageList<Resource>>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler()
- .handleError("Failed to get resource to run operation", caught);
+ CoreGUI.getErrorHandler().handleError(
+ MSG.view_tree_common_contextMenu_operations_loadFailed(), caught);
}
public void onSuccess(PageList<Resource> result) {
@@ -462,7 +464,7 @@ public class ResourceTreeView extends LocatableVLayout {
resourceContextMenu.addItem(buildMetricsMenu(resourceType));
// Create Menu
- MenuItem createChildMenu = new MenuItem("Create Child");
+ MenuItem createChildMenu = new MenuItem(MSG.common_button_create_child());
Menu createChildSubMenu = new Menu();
for (final ResourceType childType : resourceType.getChildResourceTypes()) {
if (childType.isCreatable()) {
@@ -483,7 +485,7 @@ public class ResourceTreeView extends LocatableVLayout {
resourceContextMenu.addItem(createChildMenu);
// Manually Add Menu
- MenuItem importChildMenu = new MenuItem("Import");
+ MenuItem importChildMenu = new MenuItem(MSG.common_button_import());
Menu importChildSubMenu = new Menu();
for (final ResourceType childType : resourceType.getChildResourceTypes()) {
if (childType.isSupportsManualAdd()) {
@@ -516,7 +518,8 @@ public class ResourceTreeView extends LocatableVLayout {
criteria.fetchParentResourceTypes(true);
rts.findResourceTypesByCriteria(criteria, new AsyncCallback<PageList<ResourceType>>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to load platform manual add children", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_tree_common_contextMenu_loadFailed_manualAddChildren(),
+ caught);
}
public void onSuccess(PageList<ResourceType> result) {
@@ -538,12 +541,12 @@ public class ResourceTreeView extends LocatableVLayout {
}
private MenuItem buildMetricsMenu(final ResourceType type) {
- MenuItem measurements = new MenuItem("Measurements");
+ MenuItem measurements = new MenuItem(MSG.view_tree_common_contextMenu_measurements());
final Menu measurementsSubMenu = new Menu();
GWTServiceLookup.getDashboardService().findDashboardsForSubject(new AsyncCallback<List<Dashboard>>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to load user dashboards", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_tree_common_contextMenu_loadFailed_dashboard(), caught);
}
public void onSuccess(List<Dashboard> result) {
@@ -556,7 +559,8 @@ public class ResourceTreeView extends LocatableVLayout {
defItem.setSubmenu(defSubItem);
for (final Dashboard d : result) {
- MenuItem addToDBItem = new MenuItem("Add chart to Dashboard: " + d.getName());
+ MenuItem addToDBItem = new MenuItem(MSG.view_tree_common_contextMenu_addChartToDashboard(d
+ .getName()));
defSubItem.addItem(addToDBItem);
addToDBItem.addClickHandler(new ClickHandler() {
@@ -575,14 +579,15 @@ public class ResourceTreeView extends LocatableVLayout {
GWTServiceLookup.getDashboardService().storeDashboard(d,
new AsyncCallback<Dashboard>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to save dashboard to server",
- caught);
+ CoreGUI.getErrorHandler().handleError(
+ MSG.view_tree_common_contextMenu_saveChartToDashboardFailure(), caught);
}
public void onSuccess(Dashboard result) {
CoreGUI.getMessageCenter().notify(
- new Message("Saved dashboard " + result.getName() + " to server",
- Message.Severity.Info));
+ new Message(MSG
+ .view_tree_common_contextMenu_saveChartToDashboardSuccessful(result
+ .getName()), Message.Severity.Info));
}
});
@@ -640,7 +645,7 @@ public class ResourceTreeView extends LocatableVLayout {
new AsyncCallback<List<ResourceLineageComposite>>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to lookup platform for tree", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_tree_common_loadFailed_root(), caught);
}
public void onSuccess(List<ResourceLineageComposite> result) {
@@ -673,7 +678,7 @@ public class ResourceTreeView extends LocatableVLayout {
treeGrid.fetchData(treeGrid.getCriteria(), new DSCallback() {
public void execute(DSResponse response, Object rawData, DSRequest request) {
- System.out.println("Done fetching data for tree.");
+ Log.info("Done fetching data for tree.");
updateSelection();
if (null != callback) {
@@ -701,8 +706,8 @@ public class ResourceTreeView extends LocatableVLayout {
} else {
CoreGUI.getMessageCenter().notify(
- new Message("Failed to select Resource [" + selectedResourceId
- + "] in tree.", Message.Severity.Warning));
+ new Message(MSG.view_tree_common_loadFailed_selection(),
+ Message.Severity.Warning));
}
}
@@ -732,7 +737,7 @@ public class ResourceTreeView extends LocatableVLayout {
criteria.fetchResourceType(true);
resourceGroupService.findResourceGroupsByCriteria(criteria, new AsyncCallback<PageList<ResourceGroup>>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to fetch autogroup backing group", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_tree_common_loadFailed_node(), caught);
}
public void onSuccess(PageList<ResourceGroup> result) {
@@ -742,7 +747,7 @@ public class ResourceTreeView extends LocatableVLayout {
@Override
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to load tree", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_tree_common_loadFailed_children(), caught);
}
@Override
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
index ed4b0c4..b548590 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
@@ -78,6 +78,7 @@ common_title_generalProp = General Properties~
common_title_group_def_total=Group Definition Total~
common_title_icon = icon~
common_title_id = ID~
+common_title_id_parent = Parent ID~
common_title_inventory = Inventory~
common_title_lastUpdated=Last Updated~
common_title_lastUpdatedBy=Last Updated By~
@@ -552,6 +553,7 @@ view_inventory_groups_descendants=Descendants~
view_inventory_groups_deleteSuccessful=You have successfully deleted the selected resource groups~
view_inventory_groups_deleteFailed=Failed to delete the selected resource groups~
view_inventory_groups_loadFailed=Failed to load group composite data~
+view_inventory_resource_loadFailed=Resource with id [{0}] does not exist or is not accessible~
view_inventory_resources_deleteConfirm=Are you sure you want to delete the selected resources?~
view_inventory_resources_deleteSuccessful=You have successfully deleted the selected resources~
view_inventory_resources_deleteFailed=Failed to delete the selected resources~
@@ -559,6 +561,68 @@ view_inventory_resources_loadFailed=Failed to load resource composite data~
view_inventory_resources_title=Member Resources~
view_inventory_resources_title_children=Child Resources~
view_inventory_resources_title_members=Member Resources~
+view_tree_common_loadFailed_generic=Failed to load data for tree~
+view_tree_common_loadFailed_root=Failed to load root for tree~
+view_tree_common_loadFailed_descendants=Failed to load descendants for tree~
+view_tree_common_loadFailed_children=Failed to load children for node~
+view_tree_common_loadFailed_selection=Failed to select this node~
+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=Type: {0}
+view_tree_common_contextMenu_pluginConfiguration=Plugin Configuration~
+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~
+view_tree_common_contextMenu_operations=Operations~
+view_tree_common_contextMenu_operations_loadFailed=Failure to start wizard for running operations~
+view_tree_common_contextMenu_measurements=Measurements~
+view_tree_common_contextMenu_addChartToDashboard=Add chart to dashboard [{0}]~
+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_loadFailed_dashboard=Failed to load user dashboards
+view_tree_common_contextMenu_loadFailed_manualAddChildren=Failed to load platform manual add children~
+view_tabs_common_summary=Summary~
+view_tabs_common_overview=Overview~
+view_tabs_common_dashboard=Dashboard~
+view_tabs_common_timeline=Timeline~
+view_tabs_common_monitoring=Monitoring~
+view_tabs_common_graphs=Graphs~
+view_tabs_common_tables=Tables~
+view_tabs_common_traits=Traits~
+view_tabs_common_availability=Availability~
+view_tabs_common_schedules=Schedules~
+view_tabs_common_calltime=Calltime~
+view_tabs_common_inventory=Inventory~
+view_tabs_common_groups=Groups~
+view_tabs_common_group_membership=Group Membership~
+view_tabs_common_members=Members~
+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_operations=Operations~
+view_tabs_common_history=History~
+view_tabs_common_scheduled=Scheduled~
+view_tabs_common_alerts=Alerts~
+view_tabs_common_definitions=Definitions~
+view_tabs_common_current=Current~
+view_tabs_common_events=Events~
+view_tabs_common_configuration=Configuration~
+view_tabs_common_content=Content~
+view_tabs_common_deployed=Deployed~
+view_tabs_common_new=New~
+view_tabs_common_subscriptions=Subscriptions~
+view_titleBar_common_updateTagsSuccessful=The tags for [{0}] have been updated~
+view_titleBar_common_updateTagsFailure=Failed to update the tags for [{0}]~
+view_titleBar_common_loadTagsFailure=Failed to load the tags for [{0}]~
+view_titleBar_common_clickToRemoveFav=Click to remove this as a favorite~
+view_titleBar_common_clickToAddFav=Click to add this as a favorite~
+view_titleBar_common_removedFav=You have removed [{0}] as one of your favorites~
+view_titleBar_common_addedFav=You have added [{0}] as a favorite~
+view_titleBar_common_removedFavFailure=Failed to remove [{0}] as one of your favorites~
+view_titleBar_common_addedFavFailure=Failed to add [{0}] as a favorite~
view_dynagroup_expressionSet=Expression Set~
view_dynagroup_recalculationInterval=Recalculation Interval~
view_dynagroup_lastCalculationTime=Last Calculation Time~
13 years, 7 months
[rhq] modules/enterprise
by Joseph Marques
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/util/RPCDataSource.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit f8ab2b95de1c37619df13f7e65983bf1644823f8
Author: Joseph Marques <joseph(a)redhat.com>
Date: Wed Nov 17 17:05:55 2010 -0500
fix compile error
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 f86063e..196d0b5 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
@@ -122,8 +122,8 @@ public abstract class RPCDataSource<T> extends DataSource {
break;
}
} catch (Throwable t) {
- CoreGUI.getErrorHandler().handleError(MSG.dataSource_rpc_error_transformRequestFailure(
- request.getOperationType().name()), t);
+ CoreGUI.getErrorHandler().handleError(
+ MSG.dataSource_rpc_error_transformRequestFailure(request.getOperationType().name()), t);
return null;
}
return request.getData();
@@ -419,7 +419,7 @@ public abstract class RPCDataSource<T> extends DataSource {
int[] intermediates = criteria.getAttributeAsIntArray(paramName);
resultArray = (S[]) new Integer[intermediates.length];
int index = 0;
- for (int next : intermediates) {
+ for (Integer next : intermediates) {
resultArray[index++] = (S) next;
}
} else if (type == String.class) {
@@ -519,5 +519,5 @@ public abstract class RPCDataSource<T> extends DataSource {
protected boolean userStillLoggedIn() {
return UserSessionManager.isLoggedIn();
}
-
+
}
13 years, 7 months
[rhq] modules/enterprise
by ips
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/PluginConfigurationEditView.java | 18 +--
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/ResourceResourceGroupSelector.java | 1
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/ResourceResourceGroupsView.java | 12 +-
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties | 53 ++++++++--
4 files changed, 63 insertions(+), 21 deletions(-)
New commits:
commit 354f93149000f3e03e47e33de7db6c09414e36ce
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Wed Nov 17 16:24:11 2010 -0500
i18n - resource connection settings views
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 b3a5709..fcfbf05 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
@@ -52,6 +52,7 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
*/
public class PluginConfigurationEditView extends LocatableVLayout
implements PropertyValueChangeListener, RefreshableView {
+
private Resource resource;
private ResourcePermission resourcePermission;
private ConfigurationEditor editor;
@@ -73,7 +74,7 @@ public class PluginConfigurationEditView extends LocatableVLayout
toolStrip.addMember(new LayoutSpacer());
- this.saveButton = new LocatableIButton(this.extendLocatorId("Save"), "Save");
+ this.saveButton = new LocatableIButton(this.extendLocatorId("Save"), MSG.common_button_save());
this.saveButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent clickEvent) {
save();
@@ -86,7 +87,7 @@ public class PluginConfigurationEditView extends LocatableVLayout
refresh();
if (!this.resourcePermission.isInventory()) {
- Message message = new Message("You do not have permission to edit this Resource's connection settings.",
+ Message message = new Message(MSG.view_connectionSettingsDetails_noPermission(),
Message.Severity.Info, EnumSet.of(Message.Option.Transient));
CoreGUI.getMessageCenter().notify(message);
}
@@ -115,13 +116,14 @@ public class PluginConfigurationEditView extends LocatableVLayout
GWTServiceLookup.getConfigurationService().updatePluginConfiguration(resource.getId(), updatedConfiguration,
new AsyncCallback<PluginConfigurationUpdate>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to update connection settings.", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_connectionSettingsDetails_error_updateFailure(),
+ caught);
}
public void onSuccess(PluginConfigurationUpdate result) {
CoreGUI.getMessageCenter().notify(
- new Message("Connection settings updated.",
- "Connection settings updated for Resource [" + resource.getName() + "]."));
+ new Message(MSG.view_connectionSettingsDetails_messageConcise_updateSuccess(),
+ MSG.view_connectionSettingsDetails_messageDetailed_updateSuccess(resource.getName())));
refresh();
}
});
@@ -135,12 +137,11 @@ public class PluginConfigurationEditView extends LocatableVLayout
Set<String> invalidPropertyNames = event.getInvalidPropertyNames();
if (invalidPropertyNames.isEmpty()) {
this.saveButton.enable();
- message = new Message("All connection settings have valid values, so the settings can now be saved.",
+ 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("The following connection settings have invalid values: " + invalidPropertyNames
- + ". The values must be corrected before the settings can be saved.",
+ message = new Message(MSG.view_connectionSettingsDetails_somePropertiesInvalid(invalidPropertyNames.toString()),
Message.Severity.Error, EnumSet.of(Message.Option.Transient, Message.Option.Sticky));
}
messageCenter.notify(message);
@@ -148,4 +149,5 @@ public class PluginConfigurationEditView extends LocatableVLayout
this.saveButton.enable();
}
}
+
}
\ No newline at end of file
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/ResourceResourceGroupSelector.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/ResourceResourceGroupSelector.java
index 6a178ea..e1fdce5 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/ResourceResourceGroupSelector.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/ResourceResourceGroupSelector.java
@@ -47,4 +47,5 @@ public class ResourceResourceGroupSelector extends ResourceGroupSelector {
this.setOverflow(Overflow.AUTO);
}
+
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/ResourceResourceGroupsView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/ResourceResourceGroupsView.java
index 7e2c344..8b34aee 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/ResourceResourceGroupsView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/inventory/ResourceResourceGroupsView.java
@@ -19,7 +19,6 @@
package org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.inventory;
-import java.util.HashSet;
import java.util.Set;
import com.google.gwt.user.client.rpc.AsyncCallback;
@@ -66,7 +65,7 @@ public class ResourceResourceGroupsView extends LocatableVLayout {
toolStrip.addMember(new LayoutSpacer());
- IButton saveButton = new LocatableIButton(this.extendLocatorId("Save"), "Save");
+ IButton saveButton = new LocatableIButton(this.extendLocatorId("Save"), MSG.common_button_save());
saveButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent clickEvent) {
save();
@@ -81,7 +80,7 @@ public class ResourceResourceGroupsView extends LocatableVLayout {
c.fetchExplicitGroups(true);
GWTServiceLookup.getResourceService().findResourcesByCriteria(c, new AsyncCallback<PageList<Resource>>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to fetch Resource's Groups", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_resourceResourceGroupList_error_fetchFailure(), caught);
}
public void onSuccess(PageList<Resource> result) {
@@ -100,13 +99,14 @@ public class ResourceResourceGroupsView extends LocatableVLayout {
GWTServiceLookup.getResourceGroupService().setAssignedResourceGroupsForResource(this.resource.getId(),
resourceGroupIds, true, new AsyncCallback<Void>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to update configuration", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_resourceResourceGroupList_error_updateFailure(),
+ caught);
}
public void onSuccess(Void result) {
CoreGUI.getMessageCenter().notify(
- new Message("Group membership updated for ["
- + ResourceResourceGroupsView.this.resource.getName() + "]", Message.Severity.Info));
+ new Message(MSG.view_resourceResourceGroupList_message_updateSuccess(
+ ResourceResourceGroupsView.this.resource.getName()), Message.Severity.Info));
CoreGUI.refresh();
}
});
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
index dbca63a..ed4b0c4 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
@@ -17,6 +17,7 @@ common_button_advanced = Advanced...~
common_button_apply = Apply~
common_button_cancel = Cancel~
common_button_close = Close~
+common_button_compare = Compare~
common_button_create_child = Create Child~
common_button_delete = Delete~
common_button_disable = Disable~
@@ -32,9 +33,8 @@ common_button_refresh = "Refresh"~
common_button_reset = Reset~
common_button_save = Save~
common_button_search = Search~
-common_button_uninventory = Uninventory~
-common_button_compare = Compare~
common_button_showDetails = Show Details...~
+common_button_uninventory = Uninventory~
# Common Labels
#------------------------
@@ -65,7 +65,10 @@ common_title_available_resources=Available Resources~
common_title_category = Category~
common_title_compatibleGroups = Compatible Groups~
common_title_compatibleGroups_total=Compatible Group Total~
+common_title_custom=Custom~
+common_title_dashboard_name=Dashboard Name~
common_title_dateCreated=Date Created~
+common_title_default=Default~
common_title_description=Description~
common_title_display=Display~
common_title_edit_mode=Edit Mode~
@@ -84,6 +87,7 @@ common_title_mixedGroups = Mixed Groups~
common_title_mixedGroups_total=Mixed Group Total~
common_title_name = Name~
common_title_new_dashboard=New Dashboard~
+common_title_operations=Operations~
common_title_operations_range=Operation Range~
common_title_over=Over~
common_title_platform_total=Platform Total~
@@ -163,14 +167,23 @@ widget_resourceFactoryWizard_uploadFileStepName=Upload Resource Content File~
widget_resourceFactoryWizard_uploadFailure=Failed to upload file~
widget_resourceFactoryWizard_editConfigStepName=Edit Configuration~
widget_resourceFactoryWizard_infoStepName=Resource Information~
+widget_resourceFactoryWizard_namePrompt=New Resource Name~
widget_resourceFactoryWizard_templatePrompt=Connection Settings Template~
widget_resourceFactoryWizard_contentTemplatePrompt=Deployment Time Configuration Templates~
+widget_resourceFactoryWizard_configTemplatePrompt=Resource Configuration Templates~
widget_resourceFactoryWizard_archPrompt=Package Architecture~
widget_resourceFactoryWizard_versionPrompt=Package Version~
widget_resourceFactoryWizard_importWizardWindowTitle=Resource Import Wizard~
widget_resourceFactoryWizard_importWizardTitle=Import Resource of Type [{0}]~
widget_resourceFactoryWizard_importFailure=Failed to manually import resource~
widget_resourceFactoryWizard_importSubmitted=A request to import a new resource of type [{0}] has been submitted~
+widget_resourceFactoryWizard_createWizardWindowTitle=Resource Create Wizard~
+widget_resourceFactoryWizard_createWizardTitle=Create New Resource of Type [{0}]~
+widget_resourceFactoryWizard_execute1=Failed to create a new resource - there is no package version~
+widget_resourceFactoryWizard_execute2=Failed to create a new resource~
+widget_resourceFactoryWizard_createSubmitType=A request to create a resource of type [{0}] has been submitted successfully.~
+widget_resourceFactoryWizard_createSubmit=A request to create a resource with the name of [{0}] has been submitted successfully.~
+widget_resourceFactoryWizard_failedToType=Failed to get backing package type for new resource~
#===================== Utils ======================
@@ -436,9 +449,18 @@ view_type_typeTreeLoadFailure=Failed to load resource type tree data~
#=================== Dashboard =====================
view_dashboardManager_error=Failed to store dashboard to server~
+
view_dashboardManager_success=Saved dashboard~
view_dashboards_title=Dashboard~
+view_dashboards_confirm1=Are you sure you want to delete~
+
+view_dashboardsManager_error1=Failed to add new dashboard~
+view_dashboardsManager_inventory_title=Inventory Summary~
+view_dashboardsManager_mashup_title=RHQ News~
+view_dashboardsManager_message_title=Welcome To RHQ~
+view_dashboardsManager_message_title_details=<h1>Welcome to 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_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~
@@ -501,11 +523,13 @@ view_inventory_problemGroups=Problem Groups~
view_inventory_collectionInterval=Collection Interval~
view_inventory_mixed=mixed~
view_inventory_downServers=Down Servers~
-view_inventory_allGroups=All Groups~
-view_inventory_allResources=All Resources~
-view_inventory_platforms=Platforms~
-view_inventory_servers=Servers~
-view_inventory_services=Services~
+view_inventory_groups = Groups~
+view_inventory_allGroups = All Groups~
+view_inventory_allResources = All Resources~
+view_inventory_platforms = Platforms~
+view_inventory_servers = Servers~
+view_inventory_services = Services~
+view_inventory_dynagroupDefs = Dynagroup Definitions~
view_metric_traits=Traits~
view_metric_viewTraitHistory=Value History for Trait [{0}]~
view_inventory_eventHistory_groupEventHistory=Group Event History~
@@ -653,6 +677,21 @@ view_group_summary_descUpdateFailure=Failed to change the description of the res
view_group_summary_descUpdateSuccessful=You have changed the description of this resource group~
view_group_summary_dynamicNote=Dynamic group names and descriptions are managed, and therefore are not editable~
+# Connection Settings Details
+#------------------------------------------
+view_connectionSettingsDetails_noPermission = You do not have permission to edit this Resource''s connection settings.~
+view_connectionSettingsDetails_error_updateFailure = Failed to update connection settings.~
+view_connectionSettingsDetails_messageConcise_updateSuccess = Connection settings updated.~
+view_connectionSettingsDetails_messageDetailed_updateSuccess = Connection settings updated for Resource [{0}].~
+view_connectionSettingsDetails_allPropertiesValid = All connection settings have valid values, so the settings can now be saved.~
+view_connectionSettingsDetails_somePropertiesInvalid = The following connection settings have invalid values: {0}. The values must be corrected before the settings can be saved.~
+
+# Resource Resource Groups
+#-----------------------------------------
+view_resourceResourceGroupList_error_fetchFailure = Failed to fetch Resource''s groups.~
+view_resourceResourceGroupList_error_updateFailure = Failed to update assigned Resource groups.~
+view_resourceResourceGroupList_message_updateSuccess = Group membership updated for [{0}].
+
# Configuration Details
#-------------------------------
view_configurationDetails_noPermission = You do not have permission to edit this Resource''s configuration.~
13 years, 7 months
[rhq] modules/enterprise
by ips
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/AbstractRecordEditor.java | 3
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ConfigurationHistoryDataSource.java | 62 ++--
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ConfigurationHistoryDetailView.java | 19 -
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ConfigurationHistoryView.java | 45 +--
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ResourceConfigurationEditView.java | 17 -
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties | 142 +++++++++-
6 files changed, 212 insertions(+), 76 deletions(-)
New commits:
commit 419c859bc2f3e4594a9c63e62fe529ae394106fc
Author: Ian Springer <ian.springer(a)redhat.com>
Date: Wed Nov 17 15:58:49 2010 -0500
i18n - resource config views
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/AbstractRecordEditor.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/AbstractRecordEditor.java
index dda7db7..9264867 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/AbstractRecordEditor.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/form/AbstractRecordEditor.java
@@ -59,7 +59,7 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
public abstract class AbstractRecordEditor<DS extends RPCDataSource> extends LocatableVLayout
implements BookmarkableView, DetailsView {
- private static final Label LOADING_LABEL = new Label("Loading...");
+ private static final Label LOADING_LABEL = new Label(MSG.widget_recordEditor_label_loading());
private static final String FIELD_ID = "id";
private static final String FIELD_NAME = "name";
@@ -352,4 +352,5 @@ public abstract class AbstractRecordEditor<DS extends RPCDataSource> extends Loc
private static String capitalize(String itemTitle) {
return Character.toUpperCase(itemTitle.charAt(0)) + itemTitle.substring(1);
}
+
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ConfigurationHistoryDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ConfigurationHistoryDataSource.java
index 4933639..5f4c167 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ConfigurationHistoryDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ConfigurationHistoryDataSource.java
@@ -44,6 +44,23 @@ import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
*/
public class ConfigurationHistoryDataSource extends RPCDataSource<ResourceConfigurationUpdate> {
+ public static abstract class Field {
+ public static final String ID = "id";
+ public static final String RESOURCE = "resource";
+ public static final String CREATED_TIME = "createdTime";
+ public static final String STATUS = "status";
+ public static final String SUBJECT = "subject";
+ public static final String RESOURCE_TYPE_ID = "resourceTypeId";
+ public static final String CONFIGURATION = "configuration";
+ public static final String DURATION = "duration";
+ public static final String ERROR_MESSAGE = "errorMessage";
+ public static final String MODIFIED_TIME = "modifiedTime";
+ }
+
+ public static abstract class CriteriaField {
+ public static final String RESOURCE_ID = "resourceId";
+ }
+
private ConfigurationGWTServiceAsync configurationService = GWTServiceLookup.getConfigurationService();
public ConfigurationHistoryDataSource() {
@@ -56,21 +73,26 @@ public class ConfigurationHistoryDataSource extends RPCDataSource<ResourceConfig
protected List<DataSourceField> addDataSourceFields() {
List<DataSourceField> fields = super.addDataSourceFields();
- DataSourceIntegerField idField = new DataSourceIntegerField("id");
+ DataSourceIntegerField idField = new DataSourceIntegerField(Field.ID,
+ MSG.dataSource_configurationHistory_field_id());
idField.setPrimaryKey(true);
fields.add(idField);
- DataSourceTextField resourceField = new DataSourceTextField("resource", "Resource");
+ DataSourceTextField resourceField = new DataSourceTextField(Field.RESOURCE,
+ MSG.dataSource_configurationHistory_field_resource());
fields.add(resourceField);
- DataSourceTextField submittedField = new DataSourceTextField("createdTime", "Created");
+ DataSourceTextField submittedField = new DataSourceTextField(Field.CREATED_TIME,
+ MSG.dataSource_configurationHistory_field_createdTime());
submittedField.setType(FieldType.DATETIME);
fields.add(submittedField);
- DataSourceTextField statusField = new DataSourceTextField("status", "Status");
+ DataSourceTextField statusField = new DataSourceTextField(Field.STATUS,
+ MSG.dataSource_configurationHistory_field_status());
fields.add(statusField);
- DataSourceTextField subjectField = new DataSourceTextField("subject", "Subject");
+ DataSourceTextField subjectField = new DataSourceTextField(Field.SUBJECT,
+ MSG.dataSource_configurationHistory_field_subject());
fields.add(subjectField);
return fields;
@@ -85,7 +107,7 @@ public class ConfigurationHistoryDataSource extends RPCDataSource<ResourceConfig
criteria.setPageControl(getPageControl(request));
- Integer resourceId = (Integer) request.getCriteria().getValues().get("resourceId");
+ Integer resourceId = (Integer) request.getCriteria().getValues().get(CriteriaField.RESOURCE_ID);
if (resourceId != null) {
criteria.addFilterResourceIds(resourceId);
}
@@ -93,7 +115,8 @@ public class ConfigurationHistoryDataSource extends RPCDataSource<ResourceConfig
configurationService.findResourceConfigurationUpdatesByCriteria(criteria,
new AsyncCallback<PageList<ResourceConfigurationUpdate>>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Unable to load configuration history", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.dataSource_configurationHistory_error_fetchFailure(),
+ caught);
response.setStatus(DSResponse.STATUS_FAILURE);
processResponse(request.getRequestId(), response);
}
@@ -108,24 +131,23 @@ public class ConfigurationHistoryDataSource extends RPCDataSource<ResourceConfig
@Override
public ResourceConfigurationUpdate copyValues(Record from) {
- return null; // TODO: Implement this method.
+ throw new UnsupportedOperationException("Updates are not supported.");
}
@Override
public ListGridRecord copyValues(ResourceConfigurationUpdate from) {
ListGridRecord record = new ListGridRecord();
- record.setAttribute("id", from.getId());
- record.setAttribute("resource", from.getResource());
- record.setAttribute("resourceTypeId", from.getResource().getResourceType().getId());
- record.setAttribute("subject", from.getSubjectName());
- record.setAttribute("configuration", from.getConfiguration());
- record.setAttribute("createdTime", new Date(from.getCreatedTime()));
- record.setAttribute("duration", from.getDuration());
- record.setAttribute("errorMessage", from.getErrorMessage());
- record.setAttribute("modifiedTime", new Date(from.getModifiedTime()));
- record.setAttribute("status", from.getStatus().name());
-
- record.setAttribute("entity", from);
+ record.setAttribute(Field.ID, from.getId());
+ record.setAttribute(Field.RESOURCE, from.getResource());
+ record.setAttribute(Field.RESOURCE_TYPE_ID, from.getResource().getResourceType().getId());
+ record.setAttribute(Field.SUBJECT, from.getSubjectName());
+ record.setAttribute(Field.CONFIGURATION, from.getConfiguration());
+ record.setAttribute(Field.CREATED_TIME, new Date(from.getCreatedTime()));
+ record.setAttribute(Field.DURATION, from.getDuration());
+ record.setAttribute(Field.ERROR_MESSAGE, from.getErrorMessage());
+ record.setAttribute(Field.MODIFIED_TIME, new Date(from.getModifiedTime()));
+ record.setAttribute(Field.STATUS, from.getStatus().name());
+
return record;
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ConfigurationHistoryDetailView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ConfigurationHistoryDetailView.java
index 5b13ffd..cc48ae9 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ConfigurationHistoryDetailView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ConfigurationHistoryDetailView.java
@@ -40,9 +40,7 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
* @author Greg Hinkle
*/
public class ConfigurationHistoryDetailView extends LocatableVLayout implements BookmarkableView {
-
- private int configurationUpdateId;
-
+
public ConfigurationHistoryDetailView(String locatorId) {
super(locatorId);
@@ -50,12 +48,6 @@ public class ConfigurationHistoryDetailView extends LocatableVLayout implements
setHeight100();
}
- @Override
- protected void onDraw() {
- super.onDraw();
-
- }
-
private void displayHistory(final ResourceConfigurationUpdate update) {
ResourceTypeRepository.Cache.getInstance().getResourceTypes(update.getResource().getResourceType().getId(),
@@ -63,9 +55,7 @@ public class ConfigurationHistoryDetailView extends LocatableVLayout implements
new ResourceTypeRepository.TypeLoadedCallback() {
public void onTypesLoaded(ResourceType type) {
-
ConfigurationDefinition definition = type.getResourceConfigurationDefinition();
-
ConfigurationEditor editor = new ConfigurationEditor("ResConfigHist-"
+ update.getResource().getName(), definition, update.getConfiguration());
editor.setReadOnly(true);
@@ -76,9 +66,8 @@ public class ConfigurationHistoryDetailView extends LocatableVLayout implements
}
public void displayInDialog() {
-
Window window = new Window();
- window.setTitle("Configuration Details");
+ window.setTitle(MSG.view_configurationHistoryDetails_dialogTitle());
window.setWidth(800);
window.setHeight(800);
window.setIsModal(true);
@@ -102,7 +91,8 @@ public class ConfigurationHistoryDetailView extends LocatableVLayout implements
GWTServiceLookup.getConfigurationService().findResourceConfigurationUpdatesByCriteria(criteria,
new AsyncCallback<PageList<ResourceConfigurationUpdate>>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Unable to load configuration history", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_configurationHistoryDetails_error_loadFailure(),
+ caught);
}
public void onSuccess(PageList<ResourceConfigurationUpdate> result) {
@@ -111,6 +101,5 @@ public class ConfigurationHistoryDetailView extends LocatableVLayout implements
displayHistory(update);
}
});
-
}
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ConfigurationHistoryView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ConfigurationHistoryView.java
index 1e908d2..1e933ef 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ConfigurationHistoryView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ConfigurationHistoryView.java
@@ -19,11 +19,12 @@
package org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.configuration;
import java.util.ArrayList;
+import java.util.List;
import com.smartgwt.client.data.Criteria;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.grid.CellFormatter;
-import com.smartgwt.client.widgets.grid.ListGrid;
+import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.grid.ListGridRecord;
import org.rhq.core.domain.configuration.ConfigurationUpdateStatus;
@@ -39,8 +40,9 @@ import org.rhq.enterprise.gui.coregui.client.components.table.TableSection;
* @author Greg Hinkle
*/
public class ConfigurationHistoryView extends TableSection {
+
public static final String VIEW_ID = "RecentConfigurationChanges";
- private static final String TITLE = "Configuration History";
+ private static final String TITLE = MSG.view_configurationHistoryList_title();
private Integer resourceId;
@@ -67,7 +69,7 @@ public class ConfigurationHistoryView extends TableSection {
private static Criteria createCriteria(int resourceId) {
Criteria criteria = new Criteria();
- criteria.addCriteria("resourceId", Integer.valueOf(resourceId));
+ criteria.addCriteria(ConfigurationHistoryDataSource.CriteriaField.RESOURCE_ID, resourceId);
return criteria;
}
@@ -75,24 +77,27 @@ public class ConfigurationHistoryView extends TableSection {
protected void configureTable() {
super.configureTable();
- ListGrid grid = getListGrid();
+ List<ListGridField> fields = new ArrayList<ListGridField>();
- grid.getField("id").setWidth(60);
- grid.getField("createdTime").setWidth(200);
+ ListGridField idField = new ListGridField(ConfigurationHistoryDataSource.Field.ID, 60);
+ fields.add(idField);
- if (resourceId != null) {
- grid.hideField("resource");
- } else {
- grid.getField("resource").setCellFormatter(new CellFormatter() {
+ ListGridField createdTimeField = new ListGridField(ConfigurationHistoryDataSource.Field.CREATED_TIME, 200);
+ fields.add(createdTimeField);
+
+ if (this.resourceId == null) {
+ ListGridField resourceField = new ListGridField(ConfigurationHistoryDataSource.Field.RESOURCE);
+ resourceField.setCellFormatter(new CellFormatter() {
public String format(Object o, ListGridRecord listGridRecord, int i, int i1) {
Resource res = (Resource) o;
return "<a href=\"#Resource/" + res.getId() + "\">" + res.getName() + "</a>";
}
});
+ fields.add(resourceField);
}
- grid.getField("status").setWidth(100);
- grid.getField("status").setCellFormatter(new CellFormatter() {
+ ListGridField statusField = new ListGridField(ConfigurationHistoryDataSource.Field.STATUS, 100);
+ statusField.setCellFormatter(new CellFormatter() {
public String format(Object o, ListGridRecord listGridRecord, int i, int i1) {
ConfigurationUpdateStatus status = ConfigurationUpdateStatus.valueOf((String) o);
String icon = "";
@@ -112,11 +117,16 @@ public class ConfigurationHistoryView extends TableSection {
return Canvas.imgHTML("subsystems/configure/Configure" + icon + "_16.png", 16, 16) + o;
}
});
+ fields.add(statusField);
+
+ ListGridField subjectField = new ListGridField(ConfigurationHistoryDataSource.Field.SUBJECT, 150);
+ fields.add(subjectField);
- grid.getField("subject").setWidth(150);
+ setListGridFields(fields.toArray(new ListGridField[fields.size()]));
- addTableAction(extendLocatorId("Delete"), "Delete",
- "Are you sure you want to delete # configuration history items?", new AbstractTableAction(
+ addTableAction(extendLocatorId("Delete"), MSG.common_button_delete(),
+ MSG.common_msg_deleteConfirm(MSG.common_msg_deleteConfirm(MSG.view_configurationHistoryList_itemNamePlural())),
+ new AbstractTableAction(
TableActionEnablement.ANY) {
public void executeAction(ListGridRecord[] selection, Object actionValue) {
// TODO: Implement this method.
@@ -124,7 +134,7 @@ public class ConfigurationHistoryView extends TableSection {
}
});
- addTableAction(extendLocatorId("Compare"), "Compare", null, new AbstractTableAction(
+ addTableAction(extendLocatorId("Compare"), MSG.common_button_compare(), null, new AbstractTableAction(
TableActionEnablement.MULTIPLE) {
public void executeAction(ListGridRecord[] selection, Object actionValue) {
ArrayList<ResourceConfigurationUpdate> configs = new ArrayList<ResourceConfigurationUpdate>();
@@ -137,7 +147,7 @@ public class ConfigurationHistoryView extends TableSection {
}
});
- addTableAction(extendLocatorId("ShowDetail"), "Show Details", null, new AbstractTableAction(
+ addTableAction(extendLocatorId("ShowDetail"), MSG.common_button_showDetails(), null, new AbstractTableAction(
TableActionEnablement.SINGLE) {
public void executeAction(ListGridRecord[] selection, Object actionValue) {
ListGridRecord record = selection[0];
@@ -152,7 +162,6 @@ public class ConfigurationHistoryView extends TableSection {
ConfigurationHistoryDetailView detailView = new ConfigurationHistoryDetailView(this.getLocatorId());
return detailView;
-
}
// -------- Static Utility loaders ------------
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 875fc0d..525b6a3 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
@@ -53,6 +53,7 @@ import org.rhq.enterprise.gui.coregui.client.util.selenium.LocatableVLayout;
*/
public class ResourceConfigurationEditView extends LocatableVLayout
implements PropertyValueChangeListener, RefreshableView {
+
private Resource resource;
private ResourcePermission resourcePermission;
private ConfigurationEditor editor;
@@ -74,7 +75,7 @@ public class ResourceConfigurationEditView extends LocatableVLayout
toolStrip.addMember(new LayoutSpacer());
- this.saveButton = new LocatableIButton(this.extendLocatorId("Save"), "Save");
+ this.saveButton = new LocatableIButton(this.extendLocatorId("Save"), MSG.common_button_save());
this.saveButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent clickEvent) {
save();
@@ -86,7 +87,7 @@ public class ResourceConfigurationEditView extends LocatableVLayout
refresh();
if (!this.resourcePermission.isConfigureWrite()) {
- Message message = new Message("You do not have permission to edit this Resource's configuration.",
+ Message message = new Message(MSG.view_configurationDetails_noPermission(),
Message.Severity.Info, EnumSet.of(Message.Option.Transient, Message.Option.Sticky));
CoreGUI.getMessageCenter().notify(message);
}
@@ -115,13 +116,13 @@ public class ResourceConfigurationEditView extends LocatableVLayout
GWTServiceLookup.getConfigurationService().updateResourceConfiguration(resource.getId(), updatedConfiguration,
new AsyncCallback<ResourceConfigurationUpdate>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError("Failed to update configuration.", caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_configurationDetails_error_updateFailure(), caught);
}
public void onSuccess(ResourceConfigurationUpdate result) {
CoreGUI.getMessageCenter().notify(
- new Message("Configuration updated.",
- "Configuration updated for Resource [" + resource.getName() + "].",
+ new Message(MSG.view_configurationDetails_messageConcise(),
+ MSG.view_configurationDetails_messageDetailed(resource.getName()),
Message.Severity.Info));
refresh();
}
@@ -136,12 +137,11 @@ public class ResourceConfigurationEditView extends LocatableVLayout
Set<String> invalidPropertyNames = event.getInvalidPropertyNames();
if (invalidPropertyNames.isEmpty()) {
this.saveButton.enable();
- message = new Message("All configuration properties have valid values, so the configuration can now be saved.",
+ 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("The following configuration properties have invalid values: "
- + invalidPropertyNames + ". The values must be corrected before the configuration can be saved.",
+ message = new Message(MSG.view_configurationDetails_somePropertiesInvalid(invalidPropertyNames.toString()),
Message.Severity.Error, EnumSet.of(Message.Option.Transient, Message.Option.Sticky));
}
messageCenter.notify(message);
@@ -149,4 +149,5 @@ public class ResourceConfigurationEditView extends LocatableVLayout
this.saveButton.enable();
}
}
+
}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
index e8bf31f..dbca63a 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
@@ -33,7 +33,8 @@ common_button_reset = Reset~
common_button_save = Save~
common_button_search = Search~
common_button_uninventory = Uninventory~
-
+common_button_compare = Compare~
+common_button_showDetails = Show Details...~
# Common Labels
#------------------------
@@ -48,6 +49,8 @@ common_label_items=items~
common_label_milliseconds=milliseconds~
common_label_minutes=minutes~
common_label_month=month~
+common_label_search=Search~
+common_label_scheduled_operations=scheduled operations~
common_label_seconds=seconds~
common_label_selected_resources = selected resources~
common_label_unlimited = unlimited~
@@ -57,23 +60,33 @@ common_label_week=week~
#--------------
common_title_alert_range=Alert Range~
common_title_availability = Availability~
+common_title_average_metrics=Average Metrics per Minute~
common_title_available_resources=Available Resources~
common_title_category = Category~
common_title_compatibleGroups = Compatible Groups~
+common_title_compatibleGroups_total=Compatible Group Total~
common_title_dateCreated=Date Created~
common_title_description=Description~
+common_title_display=Display~
+common_title_edit_mode=Edit Mode~
common_title_enabled=Enabled?~
common_title_end = End~
common_title_generalProp = General Properties~
+common_title_group_def_total=Group Definition Total~
common_title_icon = icon~
common_title_id = ID~
common_title_inventory = Inventory~
common_title_lastUpdated=Last Updated~
common_title_lastUpdatedBy=Last Updated By~
+common_title_mashup=Mashup~
common_title_metric = Metric~
common_title_mixedGroups = Mixed Groups~
+common_title_mixedGroups_total=Mixed Group Total~
common_title_name = Name~
+common_title_new_dashboard=New Dashboard~
common_title_operations_range=Operation Range~
+common_title_over=Over~
+common_title_platform_total=Platform Total~
common_title_plugin = Plugin~
common_title_recently_added = Recently Added Resources~
common_title_recent_operations=Recent Operations~
@@ -82,13 +95,21 @@ common_title_resource_inventory=Resource Inventory~
common_title_resource_name=Resource Name~
common_title_scheduled_operations=Scheduled Operations~
common_title_selected_resources=Selected Resources~
+common_title_server_total=Server Total~
+common_title_service_total=Service Total~
common_title_start = Start~
common_title_status=Status~
+common_title_tag_cloud=Tag Cloud~
+common_title_the=The
+common_title_summary_counts=Summary Counts~
common_title_timestamp =Date/Time~
+common_title_total=Total~
common_title_type = Type~
common_title_user=User~
common_title_value = Value~
common_title_version = Version~
+common_title_view_mode=View Mode~
+common_title_web_address=Web Address~
# Common Messages
#--------------
@@ -127,6 +148,29 @@ widget_recordEditor_info_recordsDeletedConcise = {0} {1} deleted.~
widget_recordEditor_info_recordsDeletedDetailed = {0} {1} deleted: {2}.~
widget_recordEditor_error_unsupportedOperationType = Unsupported operation type: [{0}]~
+# Resource Selector/Picker
+#--------------------------------
+widget_resourceSelector_selectResource=Select a Resource~
+widget_resourceSelector_pleaseSelectResource=Please select a resource~
+widget_resourceSelector_selectMultipleResources=Select Resources~
+widget_resourceSelector_pleaseSelectMultipleResource=Please select one or more resources~
+widget_resourceSelector_groupCategory=Group Category~
+
+# Resource Factory Wizard
+#--------------------------------
+widget_resourceFactoryWizard_uploadInProgress=The upload is in progress... This can take several minutes to complete for large distribution files.~
+widget_resourceFactoryWizard_uploadFileStepName=Upload Resource Content File~
+widget_resourceFactoryWizard_uploadFailure=Failed to upload file~
+widget_resourceFactoryWizard_editConfigStepName=Edit Configuration~
+widget_resourceFactoryWizard_infoStepName=Resource Information~
+widget_resourceFactoryWizard_templatePrompt=Connection Settings Template~
+widget_resourceFactoryWizard_contentTemplatePrompt=Deployment Time Configuration Templates~
+widget_resourceFactoryWizard_archPrompt=Package Architecture~
+widget_resourceFactoryWizard_versionPrompt=Package Version~
+widget_resourceFactoryWizard_importWizardWindowTitle=Resource Import Wizard~
+widget_resourceFactoryWizard_importWizardTitle=Import Resource of Type [{0}]~
+widget_resourceFactoryWizard_importFailure=Failed to manually import resource~
+widget_resourceFactoryWizard_importSubmitted=A request to import a new resource of type [{0}] has been submitted~
#===================== Utils ======================
@@ -179,7 +223,7 @@ dataSource_ContentRepoTree_field_parentId = Parent ID~
# Users
#------
-// dup in common
+###### dup in common
dataSource_users_field_id = ID~
dataSource_users_field_name = User Name~
dataSource_users_field_ldap = LDAP Login?~
@@ -255,28 +299,39 @@ dataSource_scheduledOperations_field_operation = Operation~
dataSource_scheduledOperations_field_time = Date/Time~
dataSource_scheduledOperations_error_fetchFailure = Failed to load scheduled operations.
+# Configuration History
+#-------------------------------
+dataSource_configurationHistory_field_id = ID~
+dataSource_configurationHistory_field_resource = Resource~
+dataSource_configurationHistory_field_createdTime = Created~
+dataSource_configurationHistory_field_status = Status~
+dataSource_configurationHistory_field_subject = Subject~
+dataSource_configurationHistory_error_fetchFailure = Unable to load configuration history.~
+
#********************************** VIEW-SPECIFIC *************************************
#================= Administration ==================
view_admin_administration = Administration~
-view_admin_affinityGroups = Affinity Groups~
-view_admin_agents = Agents~
view_admin_configuration = Configuration~
-view_admin_downloads = Downloads~
-view_admin_license = License~
-view_admin_paritionEvents = Partition Events~
-view_admin_plugins = Plugins~
view_admin_security = Security~
-view_admin_servers = Servers~
-view_admin_systemSettings = System Settings~
-view_admin_templates = Templates~
view_admin_topology = Topology~
-# Administration/Security/Users
-#------------------------------
-view_adminUsers_title = Users~
+view_adminSecurity_users = Users~
+view_adminSecurity_roles = Roles~
+
+view_adminTopology_affinityGroups = Affinity Groups~
+view_adminTopology_agents = Agents~
+view_adminTopology_partitionEvents = Partition Events~
+view_adminTopology_remoteAgentInstall = Remote Agent Install~
+view_adminTopology_servers = Servers~
+
+view_adminConfig_downloads = Downloads~
+view_adminConfig_license = License~
+view_adminConfig_plugins = Plugins~
+view_adminConfig_systemSettings = System Settings~
+view_adminConfig_templates = Templates~
# Administration/Security/Users/#
#--------------------------------
@@ -374,7 +429,16 @@ view_groupCreateWizard_createFailure=Failed to create the resource group~
view_groupCreateWizard_createSuccessful_concise=You have created a new resource group. [<a href="{0}">View Group</a>]~
view_groupCreateWizard_createSuccessful_full=You have created a new [{0}] resource group with the name [{1}] that contains [{2}] member resources~
+# Resource Type / Plugin View/Datasources
+view_type_resourceTypes=Resource Types~
+view_type_parentId=Parent ID~
+view_type_typeTreeLoadFailure=Failed to load resource type tree data~
+
#=================== Dashboard =====================
+view_dashboardManager_error=Failed to store dashboard to server~
+view_dashboardManager_success=Saved dashboard~
+
+view_dashboards_title=Dashboard~
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~
@@ -384,14 +448,39 @@ view_portlet_graph_help_msg = This Portlet supports the graphing of a resource m
view_portlet_graph_help_title = Graph Portlet~
view_portlet_graph_help_unconfigured=This graph is unconfigured, click the settings button to configure.~
view_portlet_graph_title = Resource Graph~
+view_portlet_inventory_error1=Failed to retrieve inventory summary~
+view_portlet_mashup_config_title=MashupPorlet Configuration~
+view_portlet_mashup_config_title_desc=The configuration settings for the mashup portlet.~
+view_portlet_mashup_help=This portlet can include a web page via an HTTP request into an iframe on the dashboard.~
+view_portlet_mashup_unconfigured=Page address not yet configured, click the settings button to setup this portlet.~
+view_portlet_message_config_title=MessagePortlet Configuration~
+view_portlet_message_config_title_desc=The configuration settings for the message portlet.~
+view_portlet_message_help=This portlet can display an HTML message on the dashboard.~
+view_portlet_message_title=Message~
+view_portlet_message_unconfigured=Message not yet configured, click the settings button to setup this portlet.~
+view_portlet_operations_config_completed_maximum=Maximum number of Completed operations to display.~
+view_portlet_operations_config_completed_enable=Whether to enable completed operations results grouping for dashboard.~
+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_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.~
view_portlet_operations_help_msg=This portlet displays both operations that have occurred and are scheduled to occur.~
view_portlet_platform_help_msg = This portlet displays information about platforms in inventory.~
view_portlet_platform_platform_error_1 = Failed to load platform metrics~
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_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_recentAlerts_config_members=Select Members~
view_portlet_recentAlerts_config_priority_label = priority Alerts,~
view_portlet_recentAlerts_config_when=within the past~
@@ -401,8 +490,11 @@ view_portlet_recentlyAdded_approved_platforms=recently approved platforms on das
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~
#=================== 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_cannotGetGlobalPerms = Could not determine global permissions - assuming none.~
view_inventory_problemGroups=Problem Groups~
@@ -410,6 +502,10 @@ view_inventory_collectionInterval=Collection Interval~
view_inventory_mixed=mixed~
view_inventory_downServers=Down Servers~
view_inventory_allGroups=All Groups~
+view_inventory_allResources=All Resources~
+view_inventory_platforms=Platforms~
+view_inventory_servers=Servers~
+view_inventory_services=Services~
view_metric_traits=Traits~
view_metric_viewTraitHistory=Value History for Trait [{0}]~
view_inventory_eventHistory_groupEventHistory=Group Event History~
@@ -557,6 +653,24 @@ view_group_summary_descUpdateFailure=Failed to change the description of the res
view_group_summary_descUpdateSuccessful=You have changed the description of this resource group~
view_group_summary_dynamicNote=Dynamic group names and descriptions are managed, and therefore are not editable~
+# Configuration Details
+#-------------------------------
+view_configurationDetails_noPermission = You do not have permission to edit this Resource''s configuration.~
+view_configurationDetails_error_updateFailure = Failed to update configuration.~
+view_configurationDetails_messageConcise = Configuration updated.~
+view_configurationDetails_messageDetailed = Configuration updated for Resource [{0}].~
+view_configurationDetails_allPropertiesValid = All configuration properties have valid values, so the configuration can now be saved.~
+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_itemNamePlural = configuration history items
+
+# Configuration History Details
+#------------------------------------------
+view_configurationHistoryDetails_dialogTitle = Configuration Details~
+view_configurationHistoryDetails_error_loadFailure = Unable to load configuration history.~
+
#==================== Reports ======================
13 years, 7 months
[rhq] modules/enterprise
by Joseph Marques
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceCompositeSearchView.java | 9 ++++-----
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceSearchView.java | 9 ++++-----
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties | 7 ++++---
3 files changed, 12 insertions(+), 13 deletions(-)
New commits:
commit 8164146dee50593b356effc183f739309eed3718
Author: Joseph Marques <joseph(a)redhat.com>
Date: Wed Nov 17 14:54:12 2010 -0500
do not parameterize verbs or terminology, keep the translations simple
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceCompositeSearchView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceCompositeSearchView.java
index 9236ec3..d3e4922 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceCompositeSearchView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/ResourceCompositeSearchView.java
@@ -53,8 +53,8 @@ public class ResourceCompositeSearchView extends ResourceSearchView {
super.configureTable();
- addTableAction(extendLocatorId("Delete"), MSG.common_button_delete(), MSG.common_msg_actionConfirm("delete",
- "resources"), new AbstractTableAction(TableActionEnablement.ANY) {
+ addTableAction(extendLocatorId("Delete"), MSG.common_button_delete(), MSG
+ .view_inventory_resources_deleteConfirm(), new AbstractTableAction(TableActionEnablement.ANY) {
// only enabled if all selected are a deletable type and if the user has delete permission
// on the resources.
@@ -84,13 +84,12 @@ public class ResourceCompositeSearchView extends ResourceSearchView {
resourceManager.deleteResources(resourceIds, new AsyncCallback<List<DeleteResourceHistory>>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(MSG.common_msg_actionFailure("delete", "resources"),
- caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_inventory_resources_deleteFailed(), caught);
}
public void onSuccess(List<DeleteResourceHistory> result) {
CoreGUI.getMessageCenter().notify(
- new Message(MSG.common_msg_actionSuccess("deleted", "resources"), Severity.Info));
+ new Message(MSG.view_inventory_resources_deleteSuccessful(), Severity.Info));
ResourceCompositeSearchView.this.refresh();
}
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 d13d949..078461f 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
@@ -142,21 +142,20 @@ public class ResourceSearchView extends Table {
setListGridFields(iconField, nameField, descriptionField, typeNameField, pluginNameField, categoryField,
availabilityField);
- addTableAction(extendLocatorId("Uninventory"), MSG.common_button_uninventory(), MSG.common_msg_actionConfirm(
- "uninventory", "resources"), new AbstractTableAction(TableActionEnablement.ANY) {
+ addTableAction(extendLocatorId("Uninventory"), MSG.common_button_uninventory(), MSG
+ .view_inventory_resources_deleteConfirm(), new AbstractTableAction(TableActionEnablement.ANY) {
public void executeAction(ListGridRecord[] selection, Object actionValue) {
int[] resourceIds = TableUtility.getIds(selection);
ResourceGWTServiceAsync resourceManager = GWTServiceLookup.getResourceService();
resourceManager.uninventoryResources(resourceIds, new AsyncCallback<List<Integer>>() {
public void onFailure(Throwable caught) {
- CoreGUI.getErrorHandler().handleError(MSG.common_msg_actionFailure("uninventory", "resource"),
- caught);
+ CoreGUI.getErrorHandler().handleError(MSG.view_inventory_resources_deleteFailed(), caught);
}
public void onSuccess(List<Integer> result) {
CoreGUI.getMessageCenter().notify(
- new Message(MSG.common_msg_actionSuccess("uninventoried", "resource"), Severity.Info));
+ new Message(MSG.view_inventory_resources_deleteSuccessful(), Severity.Info));
ResourceSearchView.this.refresh();
}
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
index 34b2f47..e8bf31f 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties
@@ -92,9 +92,6 @@ common_title_version = Version~
# Common Messages
#--------------
-common_msg_actionConfirm = Are you sure you want to {0} the # selected {1}?~
-common_msg_actionFailure = Failed to {0} the selected {1}?~
-common_msg_actionSuccess = Successfully {0} the selected {1}?~
common_msg_areYouSure = Are You Sure?~
common_msg_deleteConfirm = Are you sure you want to delete the # selected {0}?~
common_msg_loading = Loading...~
@@ -435,6 +432,10 @@ view_inventory_groups_descendants=Descendants~
view_inventory_groups_deleteSuccessful=You have successfully deleted the selected resource groups~
view_inventory_groups_deleteFailed=Failed to delete the selected resource groups~
view_inventory_groups_loadFailed=Failed to load group composite data~
+view_inventory_resources_deleteConfirm=Are you sure you want to delete the selected resources?~
+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_children=Child Resources~
view_inventory_resources_title_members=Member Resources~
13 years, 7 months