modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/calltime/CallTimeDataSource.java | 22 +++++----- modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/calltime/CallTimeView.java | 21 +++++---- modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties | 10 ++++ 3 files changed, 34 insertions(+), 19 deletions(-)
New commits: commit 32b4a6278837805caa9e38670d3af34fd8d143cc Author: Joseph Marques joseph@redhat.com Date: Wed Nov 17 18:09:13 2010 -0500
i18n for org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.monitoring.calltime
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/calltime/CallTimeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/calltime/CallTimeDataSource.java index 1b36cb0..85bf0f0 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/calltime/CallTimeDataSource.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/calltime/CallTimeDataSource.java @@ -53,17 +53,21 @@ public class CallTimeDataSource extends RPCDataSource<CallTimeDataComposite> { protected List<DataSourceField> addDataSourceFields() { List<DataSourceField> fields = super.addDataSourceFields();
- DataSourceTextField callDestination = new DataSourceTextField("callDestination", "Call Destination"); + DataSourceTextField callDestination = new DataSourceTextField("callDestination", MSG + .view_resource_monitor_calltime_destination()); fields.add(callDestination); - DataSourceIntegerField count = new DataSourceIntegerField("count"); + DataSourceIntegerField count = new DataSourceIntegerField("count", MSG.view_resource_monitor_calltime_count()); fields.add(count); - DataSourceIntegerField minimum = new DataSourceIntegerField("minimum"); + DataSourceIntegerField minimum = new DataSourceIntegerField("minimum", MSG + .view_resource_monitor_calltime_minimum()); fields.add(minimum); - DataSourceIntegerField average = new DataSourceIntegerField("average"); + DataSourceIntegerField average = new DataSourceIntegerField("average", MSG + .view_resource_monitor_calltime_average()); fields.add(average); - DataSourceIntegerField maximum = new DataSourceIntegerField("maximum"); + DataSourceIntegerField maximum = new DataSourceIntegerField("maximum", MSG + .view_resource_monitor_calltime_maximum()); fields.add(maximum); - DataSourceIntegerField total = new DataSourceIntegerField("total"); + DataSourceIntegerField total = new DataSourceIntegerField("total", MSG.view_resource_monitor_calltime_total()); fields.add(total);
return fields; @@ -80,7 +84,7 @@ public class CallTimeDataSource extends RPCDataSource<CallTimeDataComposite> { GWTServiceLookup.getMeasurementDataService().findCallTimeDataForResource(scheduleId, eightHoursAgo, now, pc, new AsyncCallback<PageList<CallTimeDataComposite>>() { public void onFailure(Throwable caught) { - CoreGUI.getErrorHandler().handleError("Could not load call time data", caught); + CoreGUI.getErrorHandler().handleError(MSG.view_resource_monitor_calltime_loadFailed(), caught); }
public void onSuccess(PageList<CallTimeDataComposite> result) { @@ -95,7 +99,7 @@ public class CallTimeDataSource extends RPCDataSource<CallTimeDataComposite> {
@Override public CallTimeDataComposite copyValues(Record from) { - throw new UnsupportedOperationException("Calltime not editable"); + throw new UnsupportedOperationException(MSG.view_resource_monitor_calltime_editFailed()); }
public void setGraphs(Record[] records) { @@ -111,7 +115,7 @@ public class CallTimeDataSource extends RPCDataSource<CallTimeDataComposite> { int maxWidth = (int) ((record.getAttributeAsInt("maximum") / maxMaximum) * 100d);
if (record instanceof ListGridRecord) { - ListGridRecord listGridRecord = (ListGridRecord)record; + ListGridRecord listGridRecord = (ListGridRecord) record; listGridRecord.setBackgroundComponent(new HTMLFlow("<div style="width: " + minWidth + "%; height: 33%; background-color: #A5B391;"> </div>" + "<div style="width: " + avgWidth + "%; height: 33%; background-color: #A5B391;"> </div>" + "<div style="width: " + maxWidth diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/calltime/CallTimeView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/calltime/CallTimeView.java index a8ad454..b13d5ee 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/calltime/CallTimeView.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/calltime/CallTimeView.java @@ -73,8 +73,8 @@ public class CallTimeView extends LocatableLayout { GWTServiceLookup.getResourceService().findResourcesByCriteria(criteria, new AsyncCallback<PageList<Resource>>() { public void onFailure(Throwable caught) { - CoreGUI.getErrorHandler().handleError("Failed to load resource for call time", - caught); + CoreGUI.getErrorHandler().handleError( + MSG.view_resource_monitor_calltime_lookupFailed(), caught); }
public void onSuccess(PageList<Resource> result) { @@ -112,25 +112,26 @@ public class CallTimeView extends LocatableLayout {
public void setup() {
- Table table = new Table(extendLocatorId("Table"), "Call Time Data", new Criteria("scheduleId", String - .valueOf(scheduleId))); + Table table = new Table(extendLocatorId("Table"), MSG.view_resource_monitor_calltime_title(), new Criteria( + "scheduleId", String.valueOf(scheduleId))); table.getListGrid().setAlternateRecordStyles(false); table.setDataSource(new CallTimeDataSource()); table.getListGrid().setUseAllDataSourceFields(true);
final NumberFormat format = NumberFormat.getFormat("0");
- ListGridField callDestination = new ListGridField("callDestination", "Call Destination"); - ListGridField count = new ListGridField("count", 70); - ListGridField minimum = new ListGridField("minimum", 70); - ListGridField average = new ListGridField("average", 70); + ListGridField callDestination = new ListGridField("callDestination", MSG + .view_resource_monitor_calltime_destination()); + ListGridField count = new ListGridField("count", MSG.view_resource_monitor_calltime_count(), 70); + ListGridField minimum = new ListGridField("minimum", MSG.view_resource_monitor_calltime_minimum(), 70); + ListGridField average = new ListGridField("average", MSG.view_resource_monitor_calltime_average(), 70); average.setCellFormatter(new CellFormatter() { public String format(Object o, ListGridRecord listGridRecord, int i, int i1) { return format.format(((Number) o).doubleValue()); } }); - ListGridField maximum = new ListGridField("maximum", 70); - ListGridField total = new ListGridField("total", 70); + ListGridField maximum = new ListGridField("maximum", MSG.view_resource_monitor_calltime_maximum(), 70); + ListGridField total = new ListGridField("total", MSG.view_resource_monitor_calltime_total(), 70);
table.getListGrid().setFields(callDestination, count, minimum, average, maximum, total);
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 a1bba52..a0c5291 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 @@ -637,6 +637,16 @@ view_resource_monitor_graphs_lookupFailed=Failed to find resource for graph~ view_resource_monitor_graph_instructions=Point your mouse to a data point on the chart~ view_resource_monitor_graph_live_tooltip=Click for a live graph of current values~ view_resource_monitor_detailed_graph_label=Detailed Graph~ +view_resource_monitor_calltime_title=Call Time Data~ +view_resource_monitor_calltime_destination=Call Destination~ +view_resource_monitor_calltime_count=Count~ +view_resource_monitor_calltime_minimum=Minimum~ +view_resource_monitor_calltime_average=Average~ +view_resource_monitor_calltime_maximum=Maximum~ +view_resource_monitor_calltime_total=Total~ +view_resource_monitor_calltime_loadFailed=Could not load call time data~ +view_resource_monitor_calltime_lookupFailed=Could not load resource for call time~ +view_resource_monitor_calltime_editFailed=Call time data can not be edited~ 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~
rhq-commits@lists.fedorahosted.org