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@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@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@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@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@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@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@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) {
rhq-commits@lists.fedorahosted.org