modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/MetricGraphData.java | 142 +++++++++-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/MetricStackedBarGraph.java | 44 ++-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/ResourceMetricD3GraphView.java | 2
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages.properties | 3
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties | 3
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties | 3
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties | 3
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties | 3
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties | 3
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties | 3
modules/enterprise/gui/coregui/src/main/webapp/js/rhq.js | 5
11 files changed, 183 insertions(+), 31 deletions(-)
New commits:
commit 4f980569947b7744d30f52d88a7fda88e46c5036
Author: Mike Thompson <mithomps(a)redhat.com>
Date: Fri Jan 18 09:08:04 2013 -0800
Add intervals to down and unknown chart hover areas.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/MetricGraphData.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/MetricGraphData.java
index 561aeb0..d079022 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/MetricGraphData.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/MetricGraphData.java
@@ -19,6 +19,7 @@
package org.rhq.enterprise.gui.coregui.client.inventory.common.charttype;
import java.util.Date;
+import java.util.LinkedList;
import java.util.List;
import org.rhq.core.domain.measurement.Availability;
@@ -51,6 +52,9 @@ public class MetricGraphData implements JsonMetricProducer {
private final String chartTimeLabel = MSG.chart_time_label();
private final String chartDownLabel = MSG.chart_down_label();
private final String chartUnknownLabel = MSG.chart_unknown_label();
+ private final String chartHoverStartLabel = MSG.chart_hover_start_label();
+ private final String chartHoverEndLabel = MSG.chart_hover_end_label();
+ private final String chartHoverPeriodLabel = MSG.chart_hover_period_label();
private int entityId;
private String entityName;
@@ -59,6 +63,7 @@ public class MetricGraphData implements JsonMetricProducer {
private MeasurementUnits adjustedMeasurementUnits;
private MeasurementDefinition definition;
private List<MeasurementDataNumericHighLowComposite> metricData;
+ private List<DatePair> unknownIntervalList;
private PageList<Availability> availabilityDownList;
public MetricGraphData() {
@@ -70,7 +75,7 @@ public class MetricGraphData implements JsonMetricProducer {
* @param entityId
* @param measurementDefId
*/
- public MetricGraphData(int entityId, int measurementDefId){
+ public MetricGraphData(int entityId, int measurementDefId) {
setEntityId(entityId);
setDefinitionId(measurementDefId);
}
@@ -115,8 +120,8 @@ public class MetricGraphData implements JsonMetricProducer {
}
public String getChartId() {
- Log.debug("DefId: "+ definitionId);
- Log.debug("EntityId: "+entityId );
+ Log.debug("DefId: " + definitionId);
+ Log.debug("EntityId: " + entityId);
return entityId + "-" + definitionId;
}
@@ -164,6 +169,18 @@ public class MetricGraphData implements JsonMetricProducer {
return chartUnknownLabel;
}
+ public String getChartHoverStartLabel() {
+ return chartHoverStartLabel;
+ }
+
+ public String getChartHoverEndLabel() {
+ return chartHoverEndLabel;
+ }
+
+ public String getChartHoverPeriodLabel() {
+ return chartHoverPeriodLabel;
+ }
+
public String getYAxisTitle() {
if (null != definition.getDisplayName() && definition.getDisplayName().length() > 55) {
return entityName + " - " + definition.getDisplayName().substring(0, 55) + "...";
@@ -190,13 +207,31 @@ public class MetricGraphData implements JsonMetricProducer {
}
@Override
+ /**
+ * Format the json for the front JSNI(javascript) UI to consume.
+ */
public String getJsonMetrics() {
StringBuilder sb = new StringBuilder("[");
boolean gotAdjustedMeasurementUnits = false;
//Log.debug(" avail records loaded: "+getAvailabilityDownList().size());
- if(null != metricData){
+ if (null != metricData) {
+ calculateUnknownIntervals();
+ dumpUnknownIntervals();
+
for (MeasurementDataNumericHighLowComposite measurement : metricData) {
sb.append("{ x:" + measurement.getTimestamp() + ",");
+
+ // loop through the avail down intervals
+ for (Availability availability : availabilityDownList) {
+ // we know we are in an interval
+ //if (barDateTime.after(datePair.startDateTime) && barDateTime.before(datePair.getEndDateTime())) {
+ if (measurement.getTimestamp() >= availability.getStartTime() && measurement.getTimestamp() <= availability.getEndTime()) {
+ sb.append(" availStart:" + availability.getStartTime() + ", ");
+ sb.append(" availEnd:" + availability.getEndTime() + ", ");
+ break;
+ }
+ }
+
if (isTimestampDownOrDisabled(measurement.getTimestamp())) {
sb.append(" down:true, ");
}
@@ -216,27 +251,81 @@ public class MetricGraphData implements JsonMetricProducer {
sb.append(" low:" + newLow.getValue() + ",");
sb.append(" y:" + newValue.getValue() + "},");
} else {
- // NaN measure no measurement was collected
- sb.append(" nodata:true },");
+ if(!isTimestampDownOrDisabled(measurement.getTimestamp())){
+ // NaN measure no measurement was collected
+ // loop through the unknown intervals
+ for (DatePair datePair : unknownIntervalList) {
+ // we know we are in an interval
+ if (measurement.getTimestamp() >= datePair.getStartDateTime().getTime() &&
+ measurement.getTimestamp() <= datePair.getEndDateTime().getTime()) {
+ sb.append(" unknownStart:" + datePair.getStartDateTime().getTime() + ", ");
+ sb.append(" unknownEnd:" + datePair.getEndDateTime().getTime() + ", ");
+ break;
+ }
+ }
+ sb.append(" nodata:true },");
+ }else {
+ sb.append(" },");
+ }
}
}
+ //}
sb.setLength(sb.length() - 1); // delete the last ','
}
sb.append("]");
- //Log.debug("Json data has "+data.size()+" entries.");
- //Log.debug(sb.toString());
+ Log.debug(sb.toString());
return sb.toString();
}
+ private void dumpUnknownIntervals(){
+ for (DatePair datePair : unknownIntervalList) {
+ Log.debug("Interval: "+ datePair.getStartDateTime()+ " - "+ datePair.getEndDateTime());
+ }
+ }
+
+ private void calculateUnknownIntervals() {
+
+ unknownIntervalList = new LinkedList<DatePair>();
+ List<Integer> startPoints = new LinkedList<Integer>();
+ //find all possible starting interval points
+ int i = 0;
+ for (MeasurementDataNumericHighLowComposite measurement : metricData) {
+ boolean notAtStart = i > 1;
+ boolean currentBarUndefined = Double.isNaN(measurement.getValue());
+ boolean previousBarDefined = (notAtStart) ? !Double.isNaN(metricData.get(i -1).getValue()) : false;
+ if(currentBarUndefined && previousBarDefined && notAtStart){
+ Log.debug("Adding Down or Disabled start Point: "+i);
+ startPoints.add(i);
+ }
+ i++;
+ }
+ // iterate over the start points to the end of the consecutive bars or end of metricData
+ // from the starting interval points find the interval end point
+ for (Integer startPoint : startPoints) {
+ Log.debug("StartPoint: " + new Date(metricData.get(startPoint).getTimestamp()));
+ for (int j = 0; j < metricData.size() -1 ; j++) {
+ boolean notAtEnd = i < metricData.size();
+ boolean currentBarUndefined = Double.isNaN(metricData.get(j).getValue());
+ boolean nextBarDefined = (notAtEnd) ? !Double.isNaN(metricData.get(j +1).getValue()) : false;
+ if(currentBarUndefined && nextBarDefined && notAtEnd){
+ Date startDate = new Date(metricData.get(startPoint).getTimestamp());
+ Date endDate = new Date(metricData.get(j - 1).getTimestamp());
+ Log.debug("\n\nStartDate: " + startDate);
+ Log.debug("EndDate: " + endDate);
+ DatePair datePair = new DatePair(startDate, endDate);
+ //Log.debug(" metricDataIntervalSet " + unknownIntervalList);
+ unknownIntervalList.add(datePair);
+ }
+ }
+ }
+ Log.debug("intervalDatePairList.size():"+ unknownIntervalList.size());
+ }
+
private boolean isTimestampDownOrDisabled(long timestamp) {
Date timestampDate = new Date(timestamp);
- if (null == availabilityDownList) {
- //@todo: take this out this is just to testing purposes
- Log.debug("AvailabilityList is null");
- }
if (null != availabilityDownList) {
for (Availability availability : availabilityDownList) {
- if (timestampDate.after(new Date(availability.getStartTime()))
+ if (null != timestampDate && timestampDate.after(new Date(availability.getStartTime()))
&& timestampDate.before(new Date(availability.getEndTime()))) {
return true;
}
@@ -247,7 +336,7 @@ public class MetricGraphData implements JsonMetricProducer {
private MeasurementNumericValueAndUnits normalizeUnitsAndValues(double value, MeasurementUnits measurementUnits) {
MeasurementNumericValueAndUnits newValue = MeasurementConverterClient.fit(value, measurementUnits);
- MeasurementNumericValueAndUnits returnValue = null;
+ MeasurementNumericValueAndUnits returnValue;
// adjust for percentage numbers
if (measurementUnits.equals(MeasurementUnits.PERCENTAGE)) {
@@ -271,4 +360,29 @@ public class MetricGraphData implements JsonMetricProducer {
long timeThreshold = 24 * 60 * 60 * 1000; // 1 days
return startTime + timeThreshold < endTime;
}
+
+ /**
+ * Immutable DatePair for storing the start and DateTime for an interval.
+ * Used in measuring downtime and unknown intervals.
+ * Intervals are inclusive of the startDateTime and endDateTime.
+ */
+ private final class DatePair {
+
+ private Date startDateTime;
+ private Date endDateTime;
+
+ public DatePair(Date startDateTime, Date endDateTime) {
+ this.startDateTime = startDateTime;
+ this.endDateTime = endDateTime;
+ }
+
+ public Date getStartDateTime() {
+ return startDateTime;
+ }
+
+ public Date getEndDateTime() {
+ return endDateTime;
+ }
+
+ }
}
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/MetricStackedBarGraph.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/MetricStackedBarGraph.java
index cd32289..1532fc2 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/MetricStackedBarGraph.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/charttype/MetricStackedBarGraph.java
@@ -67,7 +67,10 @@ public final class MetricStackedBarGraph extends MetricGraphData implements HasD
global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.MetricGraphData::getChartDateLabel()(),
global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.MetricGraphData::getChartTimeLabel()(),
global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.MetricGraphData::getChartDownLabel()(),
- global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.MetricGraphData::getChartUnknownLabel()()
+ global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.MetricGraphData::getChartUnknownLabel()(),
+ global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.MetricGraphData::getChartHoverStartLabel()(),
+ global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.MetricGraphData::getChartHoverEndLabel()(),
+ global.@org.rhq.enterprise.gui.coregui.client.inventory.common.charttype.MetricGraphData::getChartHoverPeriodLabel()()
);
@@ -117,7 +120,7 @@ public final class MetricStackedBarGraph extends MetricGraphData implements HasD
xAxis = $wnd.d3.svg.axis()
.scale(timeScale)
- .ticks(10)
+ .ticks(12)
.tickSubdivide(5)
.tickSize(4, 4, 0)
.orient("bottom"),
@@ -299,7 +302,6 @@ public final class MetricStackedBarGraph extends MetricGraphData implements HasD
})
.attr("opacity", 0.9)
.attr("fill", "#1794bc");
- //.attr("fill", "url(#topBarGrad)");
// lower portion representing avg to low
@@ -326,7 +328,6 @@ public final class MetricStackedBarGraph extends MetricGraphData implements HasD
})
.attr("opacity", 0.9)
.attr("fill", "#70c4e2");
- //.attr("fill", "url(#bottomBarGrad)");
// if high == low put a "cap" on the bar to show non-aggregated bar
svg.selectAll("rect.singleValue")
@@ -382,6 +383,10 @@ public final class MetricStackedBarGraph extends MetricGraphData implements HasD
svg.append("g")
.attr("class", "x axis")
.attr("transform", "translate(0," + height + ")")
+ .attr("font-size", "10px")
+ .attr("font-family", "'Liberation Sans', Arial, Helvetica, sans-serif")
+ .attr("letter-spacing", "3")
+ .style("text-anchor", "end")
.call(xAxis);
@@ -488,37 +493,46 @@ public final class MetricStackedBarGraph extends MetricGraphData implements HasD
var hoverString,
xValue = (d.x == undefined) ? 0 : +d.x,
date = new Date(+xValue),
+ availStartDate = new Date(+d.availStart),
+ availEndDate = new Date(+d.availEnd),
+ unknownStartDate = new Date(+d.unknownStart),
+ unknownEndDate = new Date(+d.unknownEnd),
timeFormatter = $wnd.d3.time.format("%I:%M:%S %P"),
dateFormatter = $wnd.d3.time.format("%m/%d/%y"),
highValue = (d.high == undefined) ? 0 : d.high.toFixed(2),
lowValue = (d.low == undefined) ? 0 : d.low.toFixed(2),
avgValue = (d.y == undefined) ? 0 : d.y.toFixed(2);
- if (d.y == undefined) {
+ if (d.down) {
hoverString =
'<div style="text-align:left;z-index:401000;"><span style="width:50px;font-weight: bold;color:#d3d3d6";">' + chartContext.timeLabel + ': </span>' + timeFormatter(date) + '</div>' +
'<div style="text-align: left;"><span style="width:50px;font-weight: bold;color:#d3d3d6"";">' + chartContext.dateLabel + ': </span>' + dateFormatter(date) + '</div>' +
- '<hr style="width:100%;text-align: center;border: #d3d3d3 solid thin;"></div>' +
- '<div style="text-align: right;"><span style="width:100%;font-weight:bold;color:#d3d3d6"";">'+chartContext.unknownLabel+'</span></div>' +
- '</div>'
+ '<hr style="width:100%;text-align: center;border: #d3d3d3 solid thin;"></hr>' +
+ '<div style="text-align: right;"><span style="width:100%;font-weight:bold;color:#d3d3d6"";">'+chartContext.hoverStartLabel+": "+ timeFormatter(availStartDate)+ '</span></div>' +
+ '<div style="text-align: right;"><span style="width:100%;font-weight:bold;color:#d3d3d6"";">'+chartContext.hoverStartLabel+": "+ timeFormatter(availEndDate) + '</span></div>' +
+ '<div style="text-align: right;"><span style="width:100%;font-weight: bold;color:#ff8a9a"";">'+chartContext.downLabel +'</span></div>' +
+ '</div>';
}
- else if (d.down) {
+ else if (d.y == undefined) {
hoverString =
'<div style="text-align:left;z-index:401000;"><span style="width:50px;font-weight: bold;color:#d3d3d6";">' + chartContext.timeLabel + ': </span>' + timeFormatter(date) + '</div>' +
'<div style="text-align: left;"><span style="width:50px;font-weight: bold;color:#d3d3d6"";">' + chartContext.dateLabel + ': </span>' + dateFormatter(date) + '</div>' +
- '<hr style="width:100%;text-align: center;border: #d3d3d3 solid thin;"></div>' +
- '<div style="text-align: right;"><span style="width:100%;font-weight: bold;color:#ff8a9a"";">Down</span></div>' +
- '</div>'
+ '<hr style="width:100%;text-align: center;border: #d3d3d3 solid thin;"></hr>' +
+ '<div style="text-align: right;"><span style="width:100%;font-weight:bold;color:#d3d3d6"";">'+chartContext.hoverStartLabel+": "+ timeFormatter(unknownStartDate)+ '</span></div>' +
+ '<div style="text-align: right;"><span style="width:100%;font-weight:bold;color:#d3d3d6"";">'+chartContext.hoverEndLabel+": "+ timeFormatter(unknownEndDate) + '</span></div>' +
+ '<div style="text-align: right;"><span style="width:100%;font-weight:bold;color:#d3d3d6"";">'+chartContext.unknownLabel+'</span></div>' +
+ '</div>';
}
else {
hoverString =
'<div style="text-align:left;z-index:401000;"><span style="width:50px;font-weight: bold;color:#d3d3d6";">' + chartContext.timeLabel + ': </span><span style="width:50px;">' + timeFormatter(date) + '</span></div>' +
'<div style="text-align: left;"><span style="width:50px;font-weight: bold;color:#d3d3d6"";">' + chartContext.dateLabel + ': </span><span style="width:50px;">' + dateFormatter(date) + '</span></div>' +
- '<hr style="width:100%;text-align: center;border: #d3d3d3 solid thin;"></div>' +
+ '<hr style="width:100%;text-align: center;border: #d3d3d3 solid thin;"></hr>' +
'<div style="text-align: right;"><span style="width:50px;font-weight:bold;color:#ff8a9a;";">' + chartContext.peakChartTitle + ': </span><span style="width:50px;">' + highValue + '</span></div>' +
'<div style="text-align: right;"><span style="text-align:right;width:50px;font-weight:bold;color: #b0d9b0;"">' + chartContext.avgChartTitle + ': </span style="width:50px;">' + avgValue + '</span></div>' +
- '<div style="text-align: right;"><span style="width:50px;font-weight:bold;color:#8ad6ff"">' + chartContext.minChartTitle + ': </span><span style="width:50px;">' + lowValue + '</span></div>';
+ '<div style="text-align: right;"><span style="width:50px;font-weight:bold;color:#8ad6ff"">' + chartContext.minChartTitle + ': </span><span style="width:50px;">' + lowValue + '</span></div>' +
+ '</div>';
}
return hoverString;
@@ -532,7 +546,7 @@ public final class MetricStackedBarGraph extends MetricGraphData implements HasD
trigger: 'hover',
title: function () {
var d = this.__data__;
- //console.log("y: " + d.y);
+ console.log("y: " + d.y);
return formatHovers(chartContext, d);
}
});
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/ResourceMetricD3GraphView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/ResourceMetricD3GraphView.java
index 213e385..90b5338 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/ResourceMetricD3GraphView.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/ResourceMetricD3GraphView.java
@@ -90,7 +90,7 @@ public class ResourceMetricD3GraphView extends AbstractMetricD3GraphView
Log.debug("Chart path for: dashboard metrics");
queryMetricsDataForDashboardGraphs();
} else {
- Log.debug("Chart path for: loaded metrics");
+ Log.debug("Chart path for: non-dashboard metrics");
drawGraph();
}
}
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 6cef557..07bfb99 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
@@ -13,6 +13,9 @@ chart_unknown_label = Unknown
chart_title_avg_label = Avg
chart_title_min_label = Min
chart_title_peak_label = Peak
+chart_hover_start_label = Start
+chart_hover_end_label = End
+chart_hover_period_label = Period
common_alert_high = High
common_alert_low = Low
common_alert_medium = Medium
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
index e28f368..1082e5d 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_cs.properties
@@ -36,6 +36,9 @@
##chart_title_avg_label = Avg
##chart_title_min_label = Min
##chart_title_peak_label = Peak
+##chart_hover_start_label = Start
+##chart_hover_end_label = End
+##chart_hover_period_label = Period
common_alert_high = Vysoká
common_alert_low = Nízká
common_alert_medium = Střední
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
index fc73e11..135af03 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_de.properties
@@ -16,6 +16,9 @@
##chart_title_avg_label = Avg
##chart_title_min_label = Min
##chart_title_peak_label = Peak
+##chart_hover_start_label = Start
+##chart_hover_end_label = End
+##chart_hover_period_label = Period
common_alert_high = HOCH
common_alert_low = NIEDRIG
common_alert_medium = MITTEL
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
index e33186c..753bd5f 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ja.properties
@@ -16,6 +16,9 @@
##chart_title_avg_label = Avg
##chart_title_min_label = Min
##chart_title_peak_label = Peak
+##chart_hover_start_label = Start
+##chart_hover_end_label = End
+##chart_hover_period_label = Period
common_alert_high = 高
common_alert_low = 低
common_alert_medium = 中
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
index 59e0948..64f6538 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_pt.properties
@@ -13,6 +13,9 @@
##chart_title_avg_label = Avg
##chart_title_min_label = Min
##chart_title_peak_label = Peak
+##chart_hover_start_label = Start
+##chart_hover_end_label = End
+##chart_hover_period_label = Period
view_admin_systemSettings_BaselineDataSet_desc = Quantidade de dados mensurados que ser\u00E1 utilizada para determinar um baseline. Valor especificado em dias.
common_alert_high = Alto
common_alert_low = Baixo
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
index ac50a84..a5b62ef 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_ru.properties
@@ -13,6 +13,9 @@
##chart_title_avg_label = Avg
##chart_title_min_label = Min
##chart_title_peak_label = Peak
+##chart_hover_start_label = Start
+##chart_hover_end_label = End
+##chart_hover_period_label = Period
#common_alert_high = High
#common_alert_low = Low
#common_alert_medium = Medium
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
index c662f30..83bc3f3 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/client/Messages_zh.properties
@@ -13,6 +13,9 @@
##chart_title_avg_label = Avg
##chart_title_min_label = Min
##chart_title_peak_label = Peak
+##chart_hover_start_label = Start
+##chart_hover_end_label = End
+##chart_hover_period_label = Period
common_alert_high = High
common_alert_low = Low
common_alert_medium = Medium
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/js/rhq.js b/modules/enterprise/gui/coregui/src/main/webapp/js/rhq.js
index 7a306ee..16af41f 100644
--- a/modules/enterprise/gui/coregui/src/main/webapp/js/rhq.js
+++ b/modules/enterprise/gui/coregui/src/main/webapp/js/rhq.js
@@ -9,7 +9,7 @@
* A ChartContext can be passed to multiple chart renders to display different chart types
* of that data.
*/
-var ChartContext = function (chartId, metricsData, xAxisLabel, yAxisLabel, yAxisUnits, minChartTitle, avgChartTitle, peakChartTitle, dateLabel, timeLabel, downLabel, unknownLabel)
+var ChartContext = function (chartId, metricsData, xAxisLabel, yAxisLabel, yAxisUnits, minChartTitle, avgChartTitle, peakChartTitle, dateLabel, timeLabel, downLabel, unknownLabel, hoverStartLabel,hoverEndLabel, hoverPeriodLabel)
{
this.chartId = chartId;
this.chartHandle = "#rChart-" + this.chartId;
@@ -25,6 +25,9 @@ var ChartContext = function (chartId, metricsData, xAxisLabel, yAxisLabel, yAxis
this.timeLabel = timeLabel;
this.downLabel = downLabel;
this.unknownLabel = unknownLabel;
+ this.hoverStartLabel = hoverStartLabel;
+ this.hoverEndLabel = hoverEndLabel;
+ this.hoverPeriodLabel = hoverPeriodLabel;
/**
* Can be called to validate the charting arguments.
* @return {boolean}