modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/graph/ButtonBarDateTimeRangeEditor.java
| 11
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/graph/graphtype/AvailabilityOverUnderGraphType.java
| 4
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/graph/graphtype/StackedBarMetricGraphImpl.java
| 223 ++-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/MetricD3Graph.java
| 106 +
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/avail/AvailabilityD3GraphView.java
| 8
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/table/MetricsResourceView.java
| 3
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/table/MetricsTableView.java
| 14
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
| 1
modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html
| 2
modules/enterprise/gui/coregui/src/main/webapp/css/charts.css
| 150 +-
modules/enterprise/gui/coregui/src/main/webapp/css/nv.d3.css
| 702 ----------
modules/enterprise/gui/coregui/src/main/webapp/css/tipsy.css
| 140 -
modules/enterprise/gui/coregui/src/main/webapp/js/jquery.tipsy.js
| 336 ----
13 files changed, 400 insertions(+), 1300 deletions(-)
New commits:
commit 1bec04c047ae968979c25b37e9634b7b2a938934
Author: Mike Thompson <mithomps(a)redhat.com>
Date: Wed Aug 28 12:54:16 2013 -0700
Fix the svg charts from cutting off at 300px. Removal of the nvd3.css code that
contained the global svg css rule: display:block; width:100%; caused this.
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/css/charts.css
b/modules/enterprise/gui/coregui/src/main/webapp/css/charts.css
index f3e8ddd..0d123b2 100644
--- a/modules/enterprise/gui/coregui/src/main/webapp/css/charts.css
+++ b/modules/enterprise/gui/coregui/src/main/webapp/css/charts.css
@@ -6,6 +6,21 @@
*
*/
+svg {
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ /* Trying to get SVG to act like a greedy block in all browsers */
+ display: block;
+ width:100%;
+ height:100%;
+}
+
+
+
.axis path, .axis line {
fill: none;
stroke: #000;
commit 7db3e79f58698142a93e3aeb0eaaba903eb336b2
Author: Mike Thompson <mithomps(a)redhat.com>
Date: Wed Aug 28 11:19:36 2013 -0700
Change the positioning of the new chart hovers.
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/graph/graphtype/StackedBarMetricGraphImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/graph/graphtype/StackedBarMetricGraphImpl.java
index aec1707..df45c97 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/graph/graphtype/StackedBarMetricGraphImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/graph/graphtype/StackedBarMetricGraphImpl.java
@@ -106,8 +106,7 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph {
svg;
// adjust the min scale so blue low line is not in axis
- function determineLowBound(min, peak) {
- //var newLow = min - ((peak - min) * 0.1);
+ function determineLowBound(min) {
newLow = min;
if (newLow < 0) {
return 0;
@@ -170,7 +169,7 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph {
min = $wnd.d3.min(minFiltered.map(function (d) {
return d.low;
}));
- lowBound = determineLowBound(min, peak);
+ lowBound = determineLowBound(min);
highBound = peak + ((peak - min) * 0.1);
oobMax = $wnd.d3.max(chartContext.data.map(function (d) {
if (typeof d.baselineMax === 'undefined') {
@@ -325,7 +324,7 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph {
metricGraphTooltipDiv =
$wnd.d3.select("#metricGraphTooltip");
metricGraphTooltipDiv.style("left", + timeScale(+d.x) + 55 +
"px")
- .style("top", + yScale(+d.y)+ "px");
+ .style("top", "70px");
metricGraphTooltipDiv.select("#metricGraphTooltipTimeLabel")
.text(chartContext.timeLabel);
@@ -369,8 +368,8 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph {
startDate = new Date(+d.x),
noDataTooltipDiv = $wnd.d3.select("#noDataTooltip");
- noDataTooltipDiv.style("left", + timeScale(+d.x)+10 +
"px")
- .style("top", + yScale(+d.y)+"px");
+ noDataTooltipDiv.style("left", + timeScale(+d.x)+55 +
"px")
+ .style("top", "70px");
noDataTooltipDiv.select("#noDataTooltipTimeLabel")
.text(chartContext.timeLabel);
commit 3d66ca789e3ef01d2aff8e43eb72ed553e36d161
Author: Mike Thompson <mithomps(a)redhat.com>
Date: Tue Aug 27 15:39:28 2013 -0700
Make the new IE tooltip work for 'no data' and 'single value' bars
like old tooltips.
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/graph/graphtype/StackedBarMetricGraphImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/graph/graphtype/StackedBarMetricGraphImpl.java
index 49a6f66..aec1707 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/graph/graphtype/StackedBarMetricGraphImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/graph/graphtype/StackedBarMetricGraphImpl.java
@@ -318,22 +318,13 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph
{
}
function showFullMetricBarHover(d){
- console.log("ShowFullMetricBarHover"+timeScale(+d.x));
+
var timeFormatter =
$wnd.d3.time.format(chartContext.chartHoverTimeFormat),
dateFormatter =
$wnd.d3.time.format(chartContext.chartHoverDateFormat),
startDate = new Date(+d.x),
- hoverX,
metricGraphTooltipDiv =
$wnd.d3.select("#metricGraphTooltip");
- // as we approach the right margin change the side of the bar that
- // the hover is on from right to left
- if(timeScale(+d.x) > 500){
- hoverX = timeScale(+d.x) - 200;
- } else {
- hoverX = timeScale(+d.x) + 55;
- }
-
- metricGraphTooltipDiv.style("left", + hoverX + "px")
+ metricGraphTooltipDiv.style("left", + timeScale(+d.x) + 55 +
"px")
.style("top", + yScale(+d.y)+ "px");
metricGraphTooltipDiv.select("#metricGraphTooltipTimeLabel")
@@ -373,12 +364,12 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph
{
}
function showNoDataBarHover(d){
- console.log("NoData Hover"+ d.x);
var timeFormatter =
$wnd.d3.time.format(chartContext.chartHoverTimeFormat),
dateFormatter =
$wnd.d3.time.format(chartContext.chartHoverDateFormat),
startDate = new Date(+d.x),
- noDataTooltipDiv = $wnd.d3.select("#noDataTooltip")
- .style("left", + timeScale(+d.x)+10 + "px")
+ noDataTooltipDiv = $wnd.d3.select("#noDataTooltip");
+
+ noDataTooltipDiv.style("left", + timeScale(+d.x)+10 +
"px")
.style("top", + yScale(+d.y)+"px");
noDataTooltipDiv.select("#noDataTooltipTimeLabel")
@@ -444,13 +435,21 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph
{
showNoDataBarHover(d);
}
else {
- showFullMetricBarHover(d);
+ if(+d.high === +d.low){
+ showSingleValueMetricBarHover(d);
+ } else {
+ showFullMetricBarHover(d);
+ }
}
}).on("mouseout", function (d) {
if (d.down || d.unknown || d.nodata) {
$wnd.d3.select("#noDataTooltip").classed("hidden", true);
}else {
-
$wnd.d3.select("#metricGraphTooltip").classed("hidden", true);
+ if(+d.high === +d.low){
+
$wnd.d3.select("#singleValueTooltip").classed("hidden", true);
+ } else {
+
$wnd.d3.select("#metricGraphTooltip").classed("hidden", true);
+ }
}
});
@@ -483,7 +482,6 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph {
.attr("opacity", 0.9)
.on("mouseover",function (d) {
showFullMetricBarHover(d);
-//
}).on("mouseout", function (d) {
if (d.down || d.unknown || d.nodata) {
$wnd.d3.select("#noDataTooltip").classed("hidden", true);
@@ -533,7 +531,7 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph {
startDate = new Date(+d.x),
singleValueGraphTooltipDiv =
$wnd.d3.select("#singleValueTooltip")
.style("left", + timeScale(+d.x) +55 +
"px")
- .style("top", + + "px");
+ .style("top", + yScale(+d.y)+
"px");
singleValueGraphTooltipDiv.select("#singleValueTooltipTimeLabel")
.text(chartContext.timeLabel);
@@ -752,52 +750,6 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph {
}
-// function formatHovers(chartContext, d) {
-// var hoverString,
-// xValue = (typeof d.x === 'undefined') ? 0 : +d.x,
-// date = new Date(+xValue),
-// barDuration = d.barDuration,
-// timeFormatter =
$wnd.d3.time.format(chartContext.chartHoverTimeFormat),
-// dateFormatter =
$wnd.d3.time.format(chartContext.chartHoverDateFormat),
-// highValue = d.high.toFixed(2),
-// lowValue = d.low.toFixed(2),
-// avgValue = d.y.toFixed(2);
-//
-//
-// // our special condition to indicate no data because avg lines dont
like discontinuous data
-// if (d.y === 0 && d.high === 0 && d.low === 0) {
-// // no data
-// hoverString =
-// '<div
class="chartHoverEnclosingDiv"><span class="chartHoverTimeLabel"
>' + chartContext.timeLabel + ': </span>' + timeFormatter(date) +
-// '<div
class="chartHoverAlignLeft"><span
class="chartHoverDateLabel">' + chartContext.dateLabel + ':
</span>' + dateFormatter(date) + '</div>' +
-// '<hr class="chartHoverDivider"
></hr>' +
-// '<div
class="chartHoverAlignRight"><span
class="chartHoverLabelSpan">' + chartContext.noDataLabel +
'</span></div>' +
-// '</div>';
-//
-//
-// } else if (d.y === d.high && d.high === d.low ) {
-// // single point of data not a duration
-// hoverString =
-// '<div
class="chartHoverEnclosingDiv"><span class="chartHoverTimeLabel"
>' + chartContext.timeLabel + ': </span>' + timeFormatter(date) +
-// '<div
class="chartHoverAlignLeft"><span
class="chartHoverDateLabel">' + chartContext.dateLabel + ':
</span>' + dateFormatter(date) + '</div>' +
-// '<div
class="chartHoverAlignRight"><span class="chartHoverDateLabel"
>' + chartContext.singleValueLabel + ': </span><span
style="width:50px;">' + avgValue + '</span></div>' +
-// '</div>';
-// } else {
-// // regular bar hover for duration
-// hoverString =
-// '<div
class="chartHoverEnclosingDiv"><span
class="chartHoverTimeLabel">' + chartContext.timeLabel + ':
</span><span style="width:50px;">' + timeFormatter(date) +
'</span>' +
-// '<div
class="chartHoverAlignLeft"><span
class="chartHoverDateLabel">' + chartContext.dateLabel + ':
</span><span style="width:50px;">' + dateFormatter(date) +
'</span></div>' +
-// '<div
class="chartHoverAlignLeft"><span
class="chartHoverLabelSpan">' + chartContext.hoverBarLabel + ":
" + barDuration + '</span></div>' +
-// '<hr
class="chartHoverDivider"></hr>' +
-// '<div
class="chartHoverAlignRight"><span id="chartHoverPeakValue"
>' + chartContext.peakChartTitle + ': </span><span
style="width:50px;">' + highValue + '</span></div>'
+
-// '<div
class="chartHoverAlignRight"><span id="chartHoverAvgValue"
>' + chartContext.avgChartTitle + ': </span><span
style="width:50px;">' + avgValue + '</span></div>' +
-// '<div
class="chartHoverAlignRight"><span id="chartHoverLowValue"
>' + chartContext.minChartTitle + ': </span><span
style="width:50px;">' + lowValue + '</span></div>' +
-// '</div>';
-// }
-// return hoverString;
-//
-// }
-
return {
// Public API
draw: function (chartContext) {
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/MetricD3Graph.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/MetricD3Graph.java
index 57681d2..6081aef 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/MetricD3Graph.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/MetricD3Graph.java
@@ -168,9 +168,9 @@ public class MetricD3Graph<T extends AbstractD3GraphListView>
extends EnhancedVL
+ height + "px;\">");
divAndSvgDefs.append(getSvgDefs());
divAndSvgDefs.append("</svg>");
- divAndSvgDefs.append(createMetricTooltip());
divAndSvgDefs.append(createSingleValueTooltip());
divAndSvgDefs.append(createNoDataTooltip());
+ divAndSvgDefs.append(createMetricTooltip());
divAndSvgDefs.append("</div>");
return divAndSvgDefs.toString();
@@ -180,7 +180,6 @@ public class MetricD3Graph<T extends AbstractD3GraphListView>
extends EnhancedVL
StringBuilder tooltipDivs = new StringBuilder();
tooltipDivs.append("<div id=\"metricGraphTooltip\"
class=\"hidden\" >");
- tooltipDivs.append("<div>");
tooltipDivs.append("<div>");
tooltipDivs.append("<span id=\"metricGraphTooltipTimeLabel\"
></span>");
@@ -220,7 +219,6 @@ public class MetricD3Graph<T extends AbstractD3GraphListView>
extends EnhancedVL
tooltipDivs.append("<div/>");
- tooltipDivs.append("</div>");
tooltipDivs.append("</div>"); // end metricGraphTooltipDiv
return tooltipDivs.toString();
}
@@ -229,7 +227,6 @@ public class MetricD3Graph<T extends AbstractD3GraphListView>
extends EnhancedVL
StringBuilder tooltipDivs = new StringBuilder();
tooltipDivs.append("<div id=\"noDataTooltip\"
class=\"hidden\" >");
- tooltipDivs.append("<div>");
tooltipDivs.append("<div>");
tooltipDivs.append("<span id=\"noDataTooltipTimeLabel\"
></span>");
@@ -246,8 +243,7 @@ public class MetricD3Graph<T extends AbstractD3GraphListView>
extends EnhancedVL
tooltipDivs.append("<div id=\"noDataLabel\"
></div>");
- tooltipDivs.append("</div>");
- tooltipDivs.append("</div>"); // end metricGraphTooltipDiv
+ tooltipDivs.append("</div>"); // end noDataTooltipDiv
return tooltipDivs.toString();
}
@@ -255,7 +251,6 @@ public class MetricD3Graph<T extends AbstractD3GraphListView>
extends EnhancedVL
StringBuilder tooltipDivs = new StringBuilder();
tooltipDivs.append("<div id=\"singleValueTooltip\"
class=\"hidden\" >");
- tooltipDivs.append("<div>");
tooltipDivs.append("<div>");
tooltipDivs.append("<span id=\"singleValueTooltipTimeLabel\"
></span>");
@@ -276,8 +271,7 @@ public class MetricD3Graph<T extends AbstractD3GraphListView>
extends EnhancedVL
tooltipDivs.append("<span id=\"singleValueTooltipValue\"
></span>");
tooltipDivs.append("</div>");
- tooltipDivs.append("</div>");
- tooltipDivs.append("</div>"); // end metricGraphTooltipDiv
+ tooltipDivs.append("</div>"); // end singleValueTooltipDiv
return tooltipDivs.toString();
}
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/css/charts.css
b/modules/enterprise/gui/coregui/src/main/webapp/css/charts.css
index e43e3ec..f3e8ddd 100644
--- a/modules/enterprise/gui/coregui/src/main/webapp/css/charts.css
+++ b/modules/enterprise/gui/coregui/src/main/webapp/css/charts.css
@@ -104,7 +104,7 @@ rect.low {
height: auto;
padding: 5px;
background-color: #000;
- opacity: 0.55;
+ opacity: 0.8;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
@@ -206,17 +206,6 @@ rect.low {
color: #d3d3d6;
}
-/*#noDataTooltip {*/
- /*width: 40px;*/
- /*font-weight: bold;*/
- /*color: #d3d3d6;*/
-/*}*/
-
-/*#metricGraphTooltipMaxLabel {*/
- /*color: #1794BC;*/
-/*}*/
-
-
#singleValueTooltip {
z-index: 990000;
commit 23ca696d80fd39987e164d69fe8bdfc7939fc6aa
Author: Mike Thompson <mithomps(a)redhat.com>
Date: Fri Aug 23 16:01:25 2013 -0700
Graph Tooltip creation to be more compatible with IE.
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/graph/ButtonBarDateTimeRangeEditor.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/graph/ButtonBarDateTimeRangeEditor.java
index e6578ed..7c79fc4 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/graph/ButtonBarDateTimeRangeEditor.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/graph/ButtonBarDateTimeRangeEditor.java
@@ -173,8 +173,19 @@ public class ButtonBarDateTimeRangeEditor extends EnhancedVLayout {
public void updateDateTimeRangeDisplay(Date startDate, Date endDate) {
String rangeString = fmt.format(startDate) + " - " +
fmt.format(endDate);
dateRangeLabel.setContents(rangeString);
+ //setTimeRangeDuration(startDate.getTime(), endDate.getTime());
}
+ // public native String setTimeRangeDuration(double startDate, double endDate) /*-{
+
+ //var formattedDateRange = startDate.format(chartContext.buttonBarDateTimeFormat)
+ ' - ' + endDate.format(chartContext.buttonBarDateTimeFormat);
+ //var timeRange = endDate.from(startDate,true);
+ //$wnd.jQuery('.graphDateTimeRangeLabel').text(formattedDateRange+'
('+timeRange+')');
+ //$wnd.jQuery('.graphDateTimeRangeLabel').text('Mike you are so
cool');
+
+ // }-*/;
+
+
/**
* Whenever we make a change to the date range save it here so it gets propogated to
* the correct places.
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/graph/graphtype/AvailabilityOverUnderGraphType.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/graph/graphtype/AvailabilityOverUnderGraphType.java
index eb20d40..c903e02 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/graph/graphtype/AvailabilityOverUnderGraphType.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/graph/graphtype/AvailabilityOverUnderGraphType.java
@@ -256,8 +256,10 @@ public class AvailabilityOverUnderGraphType implements
AvailabilityGraphType {
dateFormatter =
$wnd.d3.time.format(availChartContext.chartHoverDateFormat),
availStart = new Date(+d.availStart),
xPosition =
parseFloat($wnd.d3.select(this).attr("x")),
+ xWidth =
parseFloat($wnd.d3.select(this).attr("width")),
+ xMidPoint = xPosition + (xWidth/2),
availTooltipDiv =
$wnd.d3.select("#availTooltip")
- .style("left", xPosition + "px")
+ .style("left", + xMidPoint +
"px")
.style("top", "0px");
availTooltipDiv.select("#availTooltipLabel")
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/graph/graphtype/StackedBarMetricGraphImpl.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/graph/graphtype/StackedBarMetricGraphImpl.java
index 0c95f44..49a6f66 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/graph/graphtype/StackedBarMetricGraphImpl.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/graph/graphtype/StackedBarMetricGraphImpl.java
@@ -122,6 +122,7 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph {
}
function useSmallCharts() {
+ console.log("getChartWidth: "+ getChartWidth());
return getChartWidth() <= smallChartThresholdInPixels;
}
@@ -138,7 +139,7 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph {
chartData = chartContext.data.slice(chartContext.data.length -
numberOfBarsForSmallGraph, chartContext.data.length);
}
else {
- console.log("Using Large Charts Profile");
+ console.log("Using Large Charts Profile, width: "+
width);
// we use the width already defined above
xTicks = 8;
xTickSubDivide = 5;
@@ -316,6 +317,88 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph {
}
+ function showFullMetricBarHover(d){
+ console.log("ShowFullMetricBarHover"+timeScale(+d.x));
+ var timeFormatter =
$wnd.d3.time.format(chartContext.chartHoverTimeFormat),
+ dateFormatter =
$wnd.d3.time.format(chartContext.chartHoverDateFormat),
+ startDate = new Date(+d.x),
+ hoverX,
+ metricGraphTooltipDiv =
$wnd.d3.select("#metricGraphTooltip");
+
+ // as we approach the right margin change the side of the bar that
+ // the hover is on from right to left
+ if(timeScale(+d.x) > 500){
+ hoverX = timeScale(+d.x) - 200;
+ } else {
+ hoverX = timeScale(+d.x) + 55;
+ }
+
+ metricGraphTooltipDiv.style("left", + hoverX + "px")
+ .style("top", + yScale(+d.y)+ "px");
+
+ metricGraphTooltipDiv.select("#metricGraphTooltipTimeLabel")
+ .text(chartContext.timeLabel);
+ metricGraphTooltipDiv.select("#metricGraphTooltipTimeValue")
+ .text(timeFormatter(startDate));
+
+ metricGraphTooltipDiv.select("#metricGraphTooltipDateLabel")
+ .text(chartContext.dateLabel);
+ metricGraphTooltipDiv.select("#metricGraphTooltipDateValue")
+ .text(dateFormatter(startDate));
+
+
metricGraphTooltipDiv.select("#metricGraphTooltipDurationLabel")
+ .text(chartContext.hoverBarLabel);
+
metricGraphTooltipDiv.select("#metricGraphTooltipDurationValue")
+ .text(d.barDuration);
+
+ metricGraphTooltipDiv.select("#metricGraphTooltipMaxLabel")
+ .text(chartContext.peakChartTitle);
+ metricGraphTooltipDiv.select("#metricGraphTooltipMaxValue")
+ .text(d.high.toFixed(1));
+
+ metricGraphTooltipDiv.select("#metricGraphTooltipAvgLabel")
+ .text(chartContext.avgChartTitle);
+ metricGraphTooltipDiv.select("#metricGraphTooltipAvgValue")
+ .text(d.y.toFixed(1));
+
+
+ metricGraphTooltipDiv.select("#metricGraphTooltipMinLabel")
+ .text(chartContext.minChartTitle);
+ metricGraphTooltipDiv.select("#metricGraphTooltipMinValue")
+ .text(d.low.toFixed(1));
+
+
+ //Show the tooltip
+
$wnd.d3.select("#metricGraphTooltip").classed("hidden", false);
+
+ }
+ function showNoDataBarHover(d){
+ console.log("NoData Hover"+ d.x);
+ var timeFormatter =
$wnd.d3.time.format(chartContext.chartHoverTimeFormat),
+ dateFormatter =
$wnd.d3.time.format(chartContext.chartHoverDateFormat),
+ startDate = new Date(+d.x),
+ noDataTooltipDiv = $wnd.d3.select("#noDataTooltip")
+ .style("left", + timeScale(+d.x)+10 + "px")
+ .style("top", + yScale(+d.y)+"px");
+
+ noDataTooltipDiv.select("#noDataTooltipTimeLabel")
+ .text(chartContext.timeLabel);
+ noDataTooltipDiv.select("#noDataTooltipTimeValue")
+ .text(timeFormatter(startDate));
+
+ noDataTooltipDiv.select("#noDataTooltipDateLabel")
+ .text(chartContext.dateLabel);
+ noDataTooltipDiv.select("#noDataTooltipDateValue")
+ .text(dateFormatter(startDate));
+
+ noDataTooltipDiv.select("#noDataLabel")
+ .text(chartContext.noDataLabel);
+
+ //Show the tooltip
+ $wnd.d3.select("#noDataTooltip").classed("hidden",
false);
+
+ }
+
function createStackedBars() {
var pixelsOffHeight = 0;
@@ -356,7 +439,20 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph {
else {
return "#d3d3d6";
}
- });
+ }).on("mouseover",function (d) {
+ if (d.down || d.unknown || d.nodata) {
+ showNoDataBarHover(d);
+ }
+ else {
+ showFullMetricBarHover(d);
+ }
+ }).on("mouseout", function (d) {
+ if (d.down || d.unknown || d.nodata) {
+
$wnd.d3.select("#noDataTooltip").classed("hidden", true);
+ }else {
+
$wnd.d3.select("#metricGraphTooltip").classed("hidden", true);
+ }
+ });
// upper portion representing avg to high
@@ -384,7 +480,18 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph {
.attr("data-rhq-value", function (d) {
return d.y;
})
- .attr("opacity", 0.9);
+ .attr("opacity", 0.9)
+ .on("mouseover",function (d) {
+ showFullMetricBarHover(d);
+//
+ }).on("mouseout", function (d) {
+ if (d.down || d.unknown || d.nodata) {
+
$wnd.d3.select("#noDataTooltip").classed("hidden", true);
+ }else {
+
$wnd.d3.select("#metricGraphTooltip").classed("hidden", true);
+ }
+ });
+
// lower portion representing avg to low
@@ -409,7 +516,46 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph {
.attr("width", function () {
return calcBarWidth();
})
- .attr("opacity", 0.9);
+ .attr("opacity", 0.9)
+ .on("mouseover",function (d) {
+ showFullMetricBarHover(d);
+ }).on("mouseout", function (d) {
+ if (d.down || d.unknown || d.nodata) {
+
$wnd.d3.select("#noDataTooltip").classed("hidden", true);
+ }else {
+
$wnd.d3.select("#metricGraphTooltip").classed("hidden", true);
+ }
+ });
+
+ function showSingleValueMetricBarHover(d){
+ var timeFormatter =
$wnd.d3.time.format(chartContext.chartHoverTimeFormat),
+ dateFormatter =
$wnd.d3.time.format(chartContext.chartHoverDateFormat),
+ startDate = new Date(+d.x),
+ singleValueGraphTooltipDiv =
$wnd.d3.select("#singleValueTooltip")
+ .style("left", + timeScale(+d.x) +55 +
"px")
+ .style("top", + + "px");
+
+
singleValueGraphTooltipDiv.select("#singleValueTooltipTimeLabel")
+ .text(chartContext.timeLabel);
+
singleValueGraphTooltipDiv.select("#singleValueTooltipTimeValue")
+ .text(timeFormatter(startDate));
+
+
singleValueGraphTooltipDiv.select("#singleValueTooltipDateLabel")
+ .text(chartContext.dateLabel);
+
singleValueGraphTooltipDiv.select("#singleValueTooltipDateValue")
+ .text(dateFormatter(startDate));
+
+
singleValueGraphTooltipDiv.select("#singleValueTooltipValueLabel")
+ .text(chartContext.singleValueLabel);
+
singleValueGraphTooltipDiv.select("#singleValueTooltipValue")
+ .text(d.y.toFixed(1));
+
+
+ //Show the tooltip
+
$wnd.d3.select("#singleValueTooltip").classed("hidden", false);
+
+ }
+
// if high == low put a "cap" on the bar to show non-aggregated
bar
svg.selectAll("rect.singleValue")
@@ -446,6 +592,10 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph {
else {
return "#70c4e2";
}
+ }).on("mouseover",function (d) {
+ showSingleValueMetricBarHover(d);
+ }).on("mouseout", function () {
+
$wnd.d3.select("#singleValueTooltip").classed("hidden", true);
});
}
@@ -602,66 +752,51 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph
{
}
- function formatHovers(chartContext, d) {
- var hoverString,
- xValue = (typeof d.x === 'undefined') ? 0 : +d.x,
- date = new Date(+xValue),
- barDuration = d.barDuration,
- timeFormatter =
$wnd.d3.time.format(chartContext.chartHoverTimeFormat),
- dateFormatter =
$wnd.d3.time.format(chartContext.chartHoverDateFormat),
- highValue = d.high.toFixed(2),
- lowValue = d.low.toFixed(2),
- avgValue = d.y.toFixed(2);
-
-
- // our special condition to indicate no data because avg lines dont like
discontinuous data
- if (d.y === 0 && d.high === 0 && d.low === 0) {
- // no data
- hoverString =
- '<div
class="chartHoverEnclosingDiv"><span class="chartHoverTimeLabel"
>' + chartContext.timeLabel + ': </span>' + timeFormatter(date) +
- '<div
class="chartHoverAlignLeft"><span
class="chartHoverDateLabel">' + chartContext.dateLabel + ':
</span>' + dateFormatter(date) + '</div>' +
- '<hr class="chartHoverDivider"
></hr>' +
- '<div
class="chartHoverAlignRight"><span
class="chartHoverLabelSpan">' + chartContext.noDataLabel +
'</span></div>' +
- '</div>';
-
-
- } else if (d.y === d.high && d.high === d.low ) {
- // single point of data not a duration
- hoverString =
- '<div class="chartHoverEnclosingDiv"><span
class="chartHoverTimeLabel" >' + chartContext.timeLabel + ':
</span>' + timeFormatter(date) +
- '<div
class="chartHoverAlignLeft"><span
class="chartHoverDateLabel">' + chartContext.dateLabel + ':
</span>' + dateFormatter(date) + '</div>' +
- '<div
class="chartHoverAlignRight"><span class="chartHoverDateLabel"
>' + chartContext.singleValueLabel + ': </span><span
style="width:50px;">' + avgValue + '</span></div>' +
- '</div>';
- } else {
- // regular bar hover for duration
- hoverString =
- '<div
class="chartHoverEnclosingDiv"><span
class="chartHoverTimeLabel">' + chartContext.timeLabel + ':
</span><span style="width:50px;">' + timeFormatter(date) +
'</span>' +
- '<div
class="chartHoverAlignLeft"><span
class="chartHoverDateLabel">' + chartContext.dateLabel + ':
</span><span style="width:50px;">' + dateFormatter(date) +
'</span></div>' +
- '<div
class="chartHoverAlignLeft"><span
class="chartHoverLabelSpan">' + chartContext.hoverBarLabel + ":
" + barDuration + '</span></div>' +
- '<hr
class="chartHoverDivider"></hr>' +
- '<div
class="chartHoverAlignRight"><span id="chartHoverPeakValue"
>' + chartContext.peakChartTitle + ': </span><span
style="width:50px;">' + highValue + '</span></div>'
+
- '<div
class="chartHoverAlignRight"><span id="chartHoverAvgValue"
>' + chartContext.avgChartTitle + ': </span><span
style="width:50px;">' + avgValue + '</span></div>' +
- '<div
class="chartHoverAlignRight"><span id="chartHoverLowValue"
>' + chartContext.minChartTitle + ': </span><span
style="width:50px;">' + lowValue + '</span></div>' +
- '</div>';
- }
- return hoverString;
-
- }
-
- function createHovers(chartContext) {
- $wnd.jQuery('svg rect.leaderBar, svg rect.high, svg rect.low, svg
rect.singleValue').tipsy({
- gravity: 'w',
- html: true,
- trigger: 'hover',
- title: function () {
- var d = this.__data__;
- return formatHovers(chartContext, d);
- },
- show: function (e, el) {
- el.css({ 'z-index': '990000'})
- }
- });
- }
+// function formatHovers(chartContext, d) {
+// var hoverString,
+// xValue = (typeof d.x === 'undefined') ? 0 : +d.x,
+// date = new Date(+xValue),
+// barDuration = d.barDuration,
+// timeFormatter =
$wnd.d3.time.format(chartContext.chartHoverTimeFormat),
+// dateFormatter =
$wnd.d3.time.format(chartContext.chartHoverDateFormat),
+// highValue = d.high.toFixed(2),
+// lowValue = d.low.toFixed(2),
+// avgValue = d.y.toFixed(2);
+//
+//
+// // our special condition to indicate no data because avg lines dont
like discontinuous data
+// if (d.y === 0 && d.high === 0 && d.low === 0) {
+// // no data
+// hoverString =
+// '<div
class="chartHoverEnclosingDiv"><span class="chartHoverTimeLabel"
>' + chartContext.timeLabel + ': </span>' + timeFormatter(date) +
+// '<div
class="chartHoverAlignLeft"><span
class="chartHoverDateLabel">' + chartContext.dateLabel + ':
</span>' + dateFormatter(date) + '</div>' +
+// '<hr class="chartHoverDivider"
></hr>' +
+// '<div
class="chartHoverAlignRight"><span
class="chartHoverLabelSpan">' + chartContext.noDataLabel +
'</span></div>' +
+// '</div>';
+//
+//
+// } else if (d.y === d.high && d.high === d.low ) {
+// // single point of data not a duration
+// hoverString =
+// '<div
class="chartHoverEnclosingDiv"><span class="chartHoverTimeLabel"
>' + chartContext.timeLabel + ': </span>' + timeFormatter(date) +
+// '<div
class="chartHoverAlignLeft"><span
class="chartHoverDateLabel">' + chartContext.dateLabel + ':
</span>' + dateFormatter(date) + '</div>' +
+// '<div
class="chartHoverAlignRight"><span class="chartHoverDateLabel"
>' + chartContext.singleValueLabel + ': </span><span
style="width:50px;">' + avgValue + '</span></div>' +
+// '</div>';
+// } else {
+// // regular bar hover for duration
+// hoverString =
+// '<div
class="chartHoverEnclosingDiv"><span
class="chartHoverTimeLabel">' + chartContext.timeLabel + ':
</span><span style="width:50px;">' + timeFormatter(date) +
'</span>' +
+// '<div
class="chartHoverAlignLeft"><span
class="chartHoverDateLabel">' + chartContext.dateLabel + ':
</span><span style="width:50px;">' + dateFormatter(date) +
'</span></div>' +
+// '<div
class="chartHoverAlignLeft"><span
class="chartHoverLabelSpan">' + chartContext.hoverBarLabel + ":
" + barDuration + '</span></div>' +
+// '<hr
class="chartHoverDivider"></hr>' +
+// '<div
class="chartHoverAlignRight"><span id="chartHoverPeakValue"
>' + chartContext.peakChartTitle + ': </span><span
style="width:50px;">' + highValue + '</span></div>'
+
+// '<div
class="chartHoverAlignRight"><span id="chartHoverAvgValue"
>' + chartContext.avgChartTitle + ': </span><span
style="width:50px;">' + avgValue + '</span></div>' +
+// '<div
class="chartHoverAlignRight"><span id="chartHoverLowValue"
>' + chartContext.minChartTitle + ': </span><span
style="width:50px;">' + lowValue + '</span></div>' +
+// '</div>';
+// }
+// return hoverString;
+//
+// }
return {
// Public API
@@ -685,7 +820,6 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph {
console.log("OOB Data Exists!");
createOOBLines();
}
- createHovers(chartContext);
}
}
}; // end public closure
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/MetricD3Graph.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/MetricD3Graph.java
index 20eb39b..57681d2 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/MetricD3Graph.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/MetricD3Graph.java
@@ -167,10 +167,120 @@ public class MetricD3Graph<T extends AbstractD3GraphListView>
extends EnhancedVL
+ "\" ><svg
xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\"
xmlns:xlink=\"http://www.w3.org/1999/xlink\" style=\"height:"
+ height + "px;\">");
divAndSvgDefs.append(getSvgDefs());
- divAndSvgDefs.append("</svg></div>");
+ divAndSvgDefs.append("</svg>");
+ divAndSvgDefs.append(createMetricTooltip());
+ divAndSvgDefs.append(createSingleValueTooltip());
+ divAndSvgDefs.append(createNoDataTooltip());
+ divAndSvgDefs.append("</div>");
+
return divAndSvgDefs.toString();
}
+ private static String createMetricTooltip() {
+ StringBuilder tooltipDivs = new StringBuilder();
+
+ tooltipDivs.append("<div id=\"metricGraphTooltip\"
class=\"hidden\" >");
+ tooltipDivs.append("<div>");
+
+ tooltipDivs.append("<div>");
+ tooltipDivs.append("<span id=\"metricGraphTooltipTimeLabel\"
></span>");
+ tooltipDivs.append("<span>: </span>");
+ tooltipDivs.append("<span id=\"metricGraphTooltipTimeValue\"
></span>");
+ tooltipDivs.append("</div>");
+
+ tooltipDivs.append("<div>");
+ tooltipDivs.append("<span id=\"metricGraphTooltipDateLabel\"
></span>");
+ tooltipDivs.append("<span>: </span>");
+ tooltipDivs.append("<span id=\"metricGraphTooltipDateValue\"
></span>");
+ tooltipDivs.append("</div>");
+
+ tooltipDivs.append("<div>");
+ tooltipDivs.append("<span
id=\"metricGraphTooltipDurationLabel\" ></span>");
+ tooltipDivs.append("<span>: </span>");
+ tooltipDivs.append("<span
id=\"metricGraphTooltipDurationValue\" ></span>");
+ tooltipDivs.append("<div/>");
+ tooltipDivs.append("<hr></hr>");
+
+ tooltipDivs.append("<div >");
+ tooltipDivs.append("<span id=\"metricGraphTooltipMaxLabel\"
></span>");
+ tooltipDivs.append("<span> : </span>");
+ tooltipDivs.append("<span id=\"metricGraphTooltipMaxValue\"
></span>");
+ tooltipDivs.append("<div/>");
+
+ tooltipDivs.append("<div>");
+ tooltipDivs.append("<span id=\"metricGraphTooltipAvgLabel\"
></span>");
+ tooltipDivs.append("<span> : </span>");
+ tooltipDivs.append("<span id=\"metricGraphTooltipAvgValue\"
></span>");
+ tooltipDivs.append("<div/>");
+
+ tooltipDivs.append("<div>");
+ tooltipDivs.append("<span id=\"metricGraphTooltipMinLabel\"
></span>");
+ tooltipDivs.append("<span> : </span>");
+ tooltipDivs.append("<span id=\"metricGraphTooltipMinValue\"
></span>");
+ tooltipDivs.append("<div/>");
+
+
+ tooltipDivs.append("</div>");
+ tooltipDivs.append("</div>"); // end metricGraphTooltipDiv
+ return tooltipDivs.toString();
+ }
+
+ private static String createNoDataTooltip() {
+ StringBuilder tooltipDivs = new StringBuilder();
+
+ tooltipDivs.append("<div id=\"noDataTooltip\"
class=\"hidden\" >");
+ tooltipDivs.append("<div>");
+
+ tooltipDivs.append("<div>");
+ tooltipDivs.append("<span id=\"noDataTooltipTimeLabel\"
></span>");
+ tooltipDivs.append("<span>: </span>");
+ tooltipDivs.append("<span id=\"noDataTooltipTimeValue\"
></span>");
+ tooltipDivs.append("</div>");
+
+ tooltipDivs.append("<div>");
+ tooltipDivs.append("<span id=\"noDataTooltipDateLabel\"
></span>");
+ tooltipDivs.append("<span>: </span>");
+ tooltipDivs.append("<span id=\"noDataTooltipDateValue\"
></span>");
+ tooltipDivs.append("</div>");
+ tooltipDivs.append("<hr></hr>");
+
+ tooltipDivs.append("<div id=\"noDataLabel\"
></div>");
+
+ tooltipDivs.append("</div>");
+ tooltipDivs.append("</div>"); // end metricGraphTooltipDiv
+ return tooltipDivs.toString();
+ }
+
+ private static String createSingleValueTooltip() {
+ StringBuilder tooltipDivs = new StringBuilder();
+
+ tooltipDivs.append("<div id=\"singleValueTooltip\"
class=\"hidden\" >");
+ tooltipDivs.append("<div>");
+
+ tooltipDivs.append("<div>");
+ tooltipDivs.append("<span id=\"singleValueTooltipTimeLabel\"
></span>");
+ tooltipDivs.append("<span>: </span>");
+ tooltipDivs.append("<span id=\"singleValueTooltipTimeValue\"
></span>");
+ tooltipDivs.append("</div>");
+
+ tooltipDivs.append("<div>");
+ tooltipDivs.append("<span id=\"singleValueTooltipDateLabel\"
></span>");
+ tooltipDivs.append("<span>: </span>");
+ tooltipDivs.append("<span id=\"singleValueTooltipDateValue\"
></span>");
+ tooltipDivs.append("</div>");
+ tooltipDivs.append("<hr></hr>");
+
+ tooltipDivs.append("<div>");
+ tooltipDivs.append("<span id=\"singleValueTooltipValueLabel\"
></span>");
+ tooltipDivs.append("<span>: </span>");
+ tooltipDivs.append("<span id=\"singleValueTooltipValue\"
></span>");
+ tooltipDivs.append("</div>");
+
+ tooltipDivs.append("</div>");
+ tooltipDivs.append("</div>"); // end metricGraphTooltipDiv
+ return tooltipDivs.toString();
+ }
+
/**
* Delegate the call to rendering the JSNI chart.
* This way the chart type can be swapped out at any time.
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/avail/AvailabilityD3GraphView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/avail/AvailabilityD3GraphView.java
index 2c3a4c7..b914cd4 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/avail/AvailabilityD3GraphView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/avail/AvailabilityD3GraphView.java
@@ -85,6 +85,12 @@ public class AvailabilityD3GraphView<T extends
AvailabilityGraphType> extends En
+ "\" ><svg
xmlns=\"http://www.w3.org/2000/svg\"
version=\"1.1\" style=\"height:65px;\">");
divAndSvgDefs.append(getSvgDefs());
divAndSvgDefs.append("</svg>");
+ createTooltip(divAndSvgDefs);
+ divAndSvgDefs.append("</div>");
+ return divAndSvgDefs.toString();
+ }
+
+ private void createTooltip(StringBuilder divAndSvgDefs) {
divAndSvgDefs.append("<div id=\"availTooltip\"
class=\"hidden\" >");
divAndSvgDefs.append("<div>");
divAndSvgDefs.append("<span id=\"availTooltipLabel\"
class=\"availTooltipLabel\"></span>");
@@ -99,8 +105,6 @@ public class AvailabilityD3GraphView<T extends
AvailabilityGraphType> extends En
divAndSvgDefs.append("<span id=\"availTooltipStartTime\"
></span>");
divAndSvgDefs.append("</div>");
divAndSvgDefs.append("</div>"); // end availTooltipDiv
- divAndSvgDefs.append("</div>");
- return divAndSvgDefs.toString();
}
public void addGraphMarkerComponent(){
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/table/MetricsResourceView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/table/MetricsResourceView.java
index d856410..32436b0 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/table/MetricsResourceView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/table/MetricsResourceView.java
@@ -65,6 +65,7 @@ public class MetricsResourceView extends AbstractD3GraphListView {
this.resource = resource;
metricsTableView = new MetricsTableView(resource, this);
availabilityDetails = new ResourceMetricAvailabilityView(resource);
+
}
@@ -158,6 +159,8 @@ public class MetricsResourceView extends AbstractD3GraphListView {
@Override
public void run() {
availabilityGraph.drawJsniChart();
+ metricsTableView.refreshOpenGridRows();
+
}
}.schedule(150);
}
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/table/MetricsTableView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/table/MetricsTableView.java
index 242efe0..525ec42 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/table/MetricsTableView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/monitoring/table/MetricsTableView.java
@@ -265,6 +265,20 @@ public class MetricsTableView extends
Table<MetricsViewDataSource> implements Re
}
+ public void refreshOpenGridRows(){
+ ListGridRecord[] metricsRecords = metricsTableListGrid.getRecords();
+ for (int i = 0; i < metricsRecords.length; i++) {
+ ListGridRecord metricsRecord = metricsRecords[i];
+ if(null != metricsRecord){
+ int metricDefinitionId = metricsRecord
+ .getAttributeAsInt(MetricsViewDataSource.FIELD_METRIC_DEF_ID);
+ if(expandedRows.contains(metricDefinitionId)){
+ metricsTableListGrid.expandRecord(metricsRecord);
+ }
+ }
+ }
+ }
+
public class MetricsTableListGrid extends ListGrid {
private static final int TREEVIEW_DETAIL_CHART_HEIGHT = 205;
diff --git
a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
index 8ef78e0..a71b26e 100644
---
a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
+++
b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
@@ -58,7 +58,6 @@
<script src="/coregui/js/jquery-1.7.2.min.js"/>
<script src="/coregui/js/jquery.sparkline-2.1.min.js"/>
<script src="/coregui/js/d3.v3.min.js"/>
- <script src="/coregui/js/jquery.tipsy.js"/>
<!--
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html
b/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html
index 32c5789..2567253 100644
--- a/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html
+++ b/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html
@@ -12,8 +12,6 @@
<link rel="stylesheet" href="CoreGUI.css">
<!-- for d3 charting -->
- <link rel="stylesheet" href="css/nv.d3.css">
- <link rel="stylesheet" href="css/tipsy.css">
<link rel="stylesheet" href="css/charts.css">
<script type="text/javascript">
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/css/charts.css
b/modules/enterprise/gui/coregui/src/main/webapp/css/charts.css
index 6a004b4..e43e3ec 100644
--- a/modules/enterprise/gui/coregui/src/main/webapp/css/charts.css
+++ b/modules/enterprise/gui/coregui/src/main/webapp/css/charts.css
@@ -93,78 +93,99 @@ rect.low {
fill: #70c4e2;
}
-/**
- * CSS for html chart hovers.
- */
-.chartHoverEnclosingDiv {
- text-align: left;
- z-index: 990000;
-}
-.chartHoverAlignLeft {
- text-align: left;
-}
-.chartHoverAlignRight {
- text-align: right;
+/* CSS for new Chart Hovers*/
+
+#availTooltip {
+ z-index: 990000;
+ position: absolute;
+ width: 150px;
+ height: auto;
+ padding: 5px;
+ background-color: #000;
+ opacity: 0.55;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+ -webkit-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
+ -moz-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
+ box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
+ pointer-events: none;
}
-.chartHoverDivider {
- width: 100%;
- text-align: center;
- border: #d3d3d3 solid thin;
+#availTooltip.hidden {
+ display: none;
}
-.chartHoverLabelSpan {
- width: 100%;
- font-weight: bold;
+#availTooltip div {
+ margin: 0;
+ font-family: Arial, Verdana, sans-serif;
+ font-size: 9px;
color: #d3d3d6;
}
-.chartHoverTimeLabel {
- width: 50px;
+.availTooltipLabel {
+ width: 40px;
font-weight: bold;
color: #d3d3d6;
}
-.chartHoverDateLabel {
- width: 50px;
- font-weight: bold;
+/* CSS for metric graph tooltips */
+#metricGraphTooltip {
+ z-index: 990000;
+ position: absolute;
+ width: 100px;
+ height: auto;
+ padding: 5px;
+ background-color: #000;
+ opacity: 0.80;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+ -webkit-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
+ -moz-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
+ box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
+ pointer-events: none;
+}
+
+#metricGraphTooltip.hidden {
+ display: none;
+}
+
+#metricGraphTooltip div {
+ margin: 0;
+ font-family: Arial, Verdana, sans-serif;
+ font-size: 10px;
color: #d3d3d6;
}
-#chartHoverDownValue {
- width: 100%;
+#metricGraphTooltipLabel {
+ width: 40px;
font-weight: bold;
- color: #ff8a9a;
+ color: #d3d3d6;
}
-#chartHoverPeakValue {
- width: 50px;
- font-weight: bold;
+#metricGraphTooltipMaxLabel {
color: #1794BC;
}
-#chartHoverAvgValue {
- width: 50px;
- font-weight: bold;
+#metricGraphTooltipAvgLabel {
color: #2e376a;
}
-#chartHoverLowValue {
- width: 50px;
- font-weight: bold;
+#metricGraphTooltipMinLabel {
color: #70c4e2;
}
-#availTooltip {
+#noDataTooltip {
z-index: 990000;
position: absolute;
- width: 150px;
+ width: 100px;
height: auto;
padding: 5px;
background-color: #000;
- opacity: 0.55;
+ opacity: 0.80;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
@@ -174,21 +195,54 @@ rect.low {
pointer-events: none;
}
-#availTooltip.hidden {
+#noDataTooltip.hidden {
display: none;
}
-#availTooltip div {
+#noDataTooltip div {
margin: 0;
font-family: Arial, Verdana, sans-serif;
- font-size: 9px;
+ font-size: 10px;
color: #d3d3d6;
}
-.availTooltipLabel {
- width: 40px;
- font-weight: bold;
- color: #d3d3d6;
+/*#noDataTooltip {*/
+ /*width: 40px;*/
+ /*font-weight: bold;*/
+ /*color: #d3d3d6;*/
+/*}*/
+
+/*#metricGraphTooltipMaxLabel {*/
+ /*color: #1794BC;*/
+/*}*/
+
+
+
+#singleValueTooltip {
+ z-index: 990000;
+ position: absolute;
+ width: 100px;
+ height: auto;
+ padding: 5px;
+ background-color: #000;
+ opacity: 0.80;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+ -webkit-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
+ -moz-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
+ box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
+ pointer-events: none;
+}
+
+#singleValueTooltip.hidden {
+ display: none;
}
+#singleValueTooltip div {
+ margin: 0;
+ font-family: Arial, Verdana, sans-serif;
+ font-size: 10px;
+ color: #d3d3d6;
+}
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/css/nv.d3.css
b/modules/enterprise/gui/coregui/src/main/webapp/css/nv.d3.css
deleted file mode 100755
index 163b9a8..0000000
--- a/modules/enterprise/gui/coregui/src/main/webapp/css/nv.d3.css
+++ /dev/null
@@ -1,702 +0,0 @@
-
-/********************
- * HTML CSS
- */
-
-
-.chartWrap {
- margin: 0;
- padding: 0;
- overflow: hidden;
-}
-
-
-/********************
- * TOOLTIP CSS
- */
-
-.nvtooltip {
- position: absolute;
- background-color: rgba(255,255,255,1);
- padding: 1px;
- border: 1px solid rgba(0,0,0,.2);
- z-index: 10000;
-
- font-family: Arial;
- font-size: 13px;
-
- transition: opacity 500ms linear;
- -moz-transition: opacity 500ms linear;
- -webkit-transition: opacity 500ms linear;
-
- transition-delay: 500ms;
- -moz-transition-delay: 500ms;
- -webkit-transition-delay: 500ms;
-
- -moz-box-shadow: 0 5px 10px rgba(0,0,0,.2);
- -webkit-box-shadow: 0 5px 10px rgba(0,0,0,.2);
- box-shadow: 0 5px 10px rgba(0,0,0,.2);
-
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px;
-
- pointer-events: none;
-
- -webkit-touch-callout: none;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
-}
-
-.nvtooltip.x-nvtooltip,
-.nvtooltip.y-nvtooltip {
- padding: 8px;
-}
-
-.nvtooltip h3 {
- margin: 0;
- padding: 4px 14px;
- line-height: 18px;
- font-weight: normal;
- background-color: #f7f7f7;
- text-align: center;
-
- border-bottom: 1px solid #ebebeb;
-
- -webkit-border-radius: 5px 5px 0 0;
- -moz-border-radius: 5px 5px 0 0;
- border-radius: 5px 5px 0 0;
-}
-
-.nvtooltip p {
- margin: 0;
- padding: 5px 14px;
- text-align: center;
-}
-
-.nvtooltip span {
- display: inline-block;
- margin: 2px 0;
-}
-
-.nvtooltip-pending-removal {
- position: absolute;
- pointer-events: none;
-}
-
-
-/********************
- * SVG CSS
- */
-
-
-svg {
- -webkit-touch-callout: none;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- /* Trying to get SVG to act like a greedy block in all browsers */
- display: block;
- width:100%;
- height:100%;
-}
-
-
-svg text {
- font: normal 12px Arial;
-}
-
-svg .title {
- font: bold 14px Arial;
-}
-
-.nvd3 .nv-background {
- fill: white;
- fill-opacity: 0;
- /*
- pointer-events: none;
- */
-}
-
-.nvd3.nv-noData {
- font-size: 18px;
- font-weight: bold;
-}
-
-
-/**********
-* Brush
-*/
-
-.nv-brush .extent {
- fill-opacity: .125;
- shape-rendering: crispEdges;
-}
-
-
-
-/**********
-* Legend
-*/
-
-.nvd3 .nv-legend .nv-series {
- cursor: pointer;
-}
-
-.nvd3 .nv-legend .disabled circle {
- fill-opacity: 0;
-}
-
-
-
-/**********
-* Axes
-*/
-
-.nvd3 .nv-axis path {
- fill: none;
- stroke: #000;
- stroke-opacity: .75;
- shape-rendering: crispEdges;
-}
-
-.nvd3 .nv-axis path.domain {
- stroke-opacity: .75;
-}
-
-.nvd3 .nv-axis.nv-x path.domain {
- stroke-opacity: 0;
-}
-
-.nvd3 .nv-axis line {
- fill: none;
- stroke: #000;
- stroke-opacity: .25;
- shape-rendering: crispEdges;
-}
-
-.nvd3 .nv-axis line.zero {
- stroke-opacity: .75;
-}
-
-.nvd3 .nv-axis .nv-axisMaxMin text {
- font-weight: bold;
-}
-
-.nvd3 .x .nv-axis .nv-axisMaxMin text,
-.nvd3 .x2 .nv-axis .nv-axisMaxMin text,
-.nvd3 .x3 .nv-axis .nv-axisMaxMin text {
- text-anchor: middle
-}
-
-
-
-/**********
-* Brush
-*/
-
-.nv-brush .resize path {
- fill: #eee;
- stroke: #666;
-}
-
-
-
-/**********
-* Bars
-*/
-
-.nvd3 .nv-bars .negative rect {
- zfill: brown;
-}
-
-.nvd3 .nv-bars rect {
- zfill: steelblue;
- fill-opacity: .75;
-
- transition: fill-opacity 250ms linear;
- -moz-transition: fill-opacity 250ms linear;
- -webkit-transition: fill-opacity 250ms linear;
-}
-
-.nvd3 .nv-bars rect:hover {
- fill-opacity: 1;
-}
-
-.nvd3 .nv-bars .hover rect {
- fill: lightblue;
-}
-
-.nvd3 .nv-bars text {
- fill: rgba(0,0,0,0);
-}
-
-.nvd3 .nv-bars .hover text {
- fill: rgba(0,0,0,1);
-}
-
-
-/**********
-* Bars
-*/
-
-.nvd3 .nv-multibar .nv-groups rect,
-.nvd3 .nv-multibarHorizontal .nv-groups rect,
-.nvd3 .nv-discretebar .nv-groups rect {
- stroke-opacity: 0;
-
- transition: fill-opacity 250ms linear;
- -moz-transition: fill-opacity 250ms linear;
- -webkit-transition: fill-opacity 250ms linear;
-}
-
-.nvd3 .nv-multibar .nv-groups rect:hover,
-.nvd3 .nv-multibarHorizontal .nv-groups rect:hover,
-.nvd3 .nv-discretebar .nv-groups rect:hover {
- fill-opacity: 1;
-}
-
-.nvd3 .nv-discretebar .nv-groups text,
-.nvd3 .nv-multibarHorizontal .nv-groups text {
- font-weight: bold;
- fill: rgba(0,0,0,1);
- stroke: rgba(0,0,0,0);
-}
-
-/***********
-* Pie Chart
-*/
-
-.nvd3.nv-pie path {
- stroke-opacity: 0;
-
- transition: fill-opacity 250ms linear, stroke-width 250ms linear, stroke-opacity 250ms
linear;
- -moz-transition: fill-opacity 250ms linear, stroke-width 250ms linear, stroke-opacity
250ms linear;
- -webkit-transition: fill-opacity 250ms linear, stroke-width 250ms linear,
stroke-opacity 250ms linear;
-
-}
-
-.nvd3.nv-pie .nv-slice text {
- stroke: #000;
- stroke-width: 0;
-}
-
-.nvd3.nv-pie path {
- stroke: #fff;
- stroke-width: 1px;
- stroke-opacity: 1;
-}
-
-.nvd3.nv-pie .hover path {
- fill-opacity: .7;
-/*
- stroke-width: 6px;
- stroke-opacity: 1;
-*/
-}
-
-.nvd3.nv-pie .nv-label rect {
- fill-opacity: 0;
- stroke-opacity: 0;
-}
-
-/**********
-* Lines
-*/
-
-.nvd3 .nv-groups path.nv-line {
- fill: none;
- stroke-width: 2.5px;
- /*
- stroke-linecap: round;
- shape-rendering: geometricPrecision;
-
- transition: stroke-width 250ms linear;
- -moz-transition: stroke-width 250ms linear;
- -webkit-transition: stroke-width 250ms linear;
-
- transition-delay: 250ms
- -moz-transition-delay: 250ms;
- -webkit-transition-delay: 250ms;
- */
-}
-
-.nvd3 .nv-groups path.nv-area {
- stroke: none;
- /*
- stroke-linecap: round;
- shape-rendering: geometricPrecision;
-
- stroke-width: 2.5px;
- transition: stroke-width 250ms linear;
- -moz-transition: stroke-width 250ms linear;
- -webkit-transition: stroke-width 250ms linear;
-
- transition-delay: 250ms
- -moz-transition-delay: 250ms;
- -webkit-transition-delay: 250ms;
- */
-}
-
-.nvd3 .nv-line.hover path {
- stroke-width: 6px;
-}
-
-/*
-.nvd3.scatter .groups .point {
- fill-opacity: 0.1;
- stroke-opacity: 0.1;
-}
- */
-
-.nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point {
- fill-opacity: 0;
- stroke-opacity: 0;
-}
-
-.nvd3.nv-scatter.nv-single-point .nv-groups .nv-point {
- fill-opacity: .5 !important;
- stroke-opacity: .5 !important;
-}
-
-
-.nvd3 .nv-groups .nv-point {
- transition: stroke-width 250ms linear, stroke-opacity 250ms linear;
- -moz-transition: stroke-width 250ms linear, stroke-opacity 250ms linear;
- -webkit-transition: stroke-width 250ms linear, stroke-opacity 250ms linear;
-}
-
-.nvd3.nv-scatter .nv-groups .nv-point.hover,
-.nvd3 .nv-groups .nv-point.hover {
- stroke-width: 20px;
- fill-opacity: .5 !important;
- stroke-opacity: .5 !important;
-}
-
-
-.nvd3 .nv-point-paths path {
- stroke: #aaa;
- stroke-opacity: 0;
- fill: #eee;
- fill-opacity: 0;
-}
-
-
-
-.nvd3 .nv-indexLine {
- cursor: ew-resize;
-}
-
-
-/**********
-* Distribution
-*/
-
-.nvd3 .nv-distribution {
- pointer-events: none;
-}
-
-
-
-/**********
-* Scatter
-*/
-
-/* **Attempting to remove this for useVoronoi(false), need to see if it's required
anywhere
-.nvd3 .nv-groups .nv-point {
- pointer-events: none;
-}
-*/
-
-.nvd3 .nv-groups .nv-point.hover {
- stroke-width: 20px;
- stroke-opacity: .5;
-}
-
-.nvd3 .nv-scatter .nv-point.hover {
- fill-opacity: 1;
-}
-
-/*
-.nv-group.hover .nv-point {
- fill-opacity: 1;
-}
-*/
-
-
-/**********
-* Stacked Area
-*/
-
-.nvd3.nv-stackedarea path.nv-area {
- fill-opacity: .7;
- /*
- stroke-opacity: .65;
- fill-opacity: 1;
- */
- stroke-opacity: 0;
-
- transition: fill-opacity 250ms linear, stroke-opacity 250ms linear;
- -moz-transition: fill-opacity 250ms linear, stroke-opacity 250ms linear;
- -webkit-transition: fill-opacity 250ms linear, stroke-opacity 250ms linear;
-
- /*
- transition-delay: 500ms;
- -moz-transition-delay: 500ms;
- -webkit-transition-delay: 500ms;
- */
-
-}
-
-.nvd3.nv-stackedarea path.nv-area.hover {
- fill-opacity: .9;
- /*
- stroke-opacity: .85;
- */
-}
-/*
-.d3stackedarea .groups path {
- stroke-opacity: 0;
-}
- */
-
-
-
-.nvd3.nv-stackedarea .nv-groups .nv-point {
- stroke-opacity: 0;
- fill-opacity: 0;
-}
-
-.nvd3.nv-stackedarea .nv-groups .nv-point.hover {
- stroke-width: 20px;
- stroke-opacity: .75;
- fill-opacity: 1;
-}
-
-
-
-/**********
-* Line Plus Bar
-*/
-
-.nvd3.nv-linePlusBar .nv-bar rect {
- fill-opacity: .75;
-}
-
-.nvd3.nv-linePlusBar .nv-bar rect:hover {
- fill-opacity: 1;
-}
-
-
-/**********
-* Bullet
-*/
-
-.nvd3.nv-bullet { font: 10px sans-serif; }
-.nvd3.nv-bullet .nv-measure { fill-opacity: .8; }
-.nvd3.nv-bullet .nv-measure:hover { fill-opacity: 1; }
-.nvd3.nv-bullet .nv-marker { stroke: #000; stroke-width: 2px; }
-.nvd3.nv-bullet .nv-markerTriangle { stroke: #000; fill: #fff; stroke-width: 1.5px; }
-.nvd3.nv-bullet .nv-tick line { stroke: #666; stroke-width: .5px; }
-.nvd3.nv-bullet .nv-range.nv-s0 { fill: #eee; }
-.nvd3.nv-bullet .nv-range.nv-s1 { fill: #ddd; }
-.nvd3.nv-bullet .nv-range.nv-s2 { fill: #ccc; }
-.nvd3.nv-bullet .nv-title { font-size: 14px; font-weight: bold; }
-.nvd3.nv-bullet .nv-subtitle { fill: #999; }
-
-
-.nvd3.nv-bullet .nv-range {
- fill: #999;
- fill-opacity: .4;
-}
-.nvd3.nv-bullet .nv-range:hover {
- fill-opacity: .7;
-}
-
-
-
-/**********
-* Sparkline
-*/
-
-.nvd3.nv-sparkline path {
- fill: none;
-}
-
-.nvd3.nv-sparklineplus g.nv-hoverValue {
- pointer-events: none;
-}
-
-.nvd3.nv-sparklineplus .nv-hoverValue line {
- stroke: #333;
- stroke-width: 1.5px;
- }
-
-.nvd3.nv-sparklineplus,
-.nvd3.nv-sparklineplus g {
- pointer-events: all;
-}
-
-.nvd3 .nv-hoverArea {
- fill-opacity: 0;
- stroke-opacity: 0;
-}
-
-.nvd3.nv-sparklineplus .nv-xValue,
-.nvd3.nv-sparklineplus .nv-yValue {
- /*
- stroke: #666;
- */
- stroke-width: 0;
- font-size: .9em;
- font-weight: normal;
-}
-
-.nvd3.nv-sparklineplus .nv-yValue {
- stroke: #f66;
-}
-
-.nvd3.nv-sparklineplus .nv-maxValue {
- stroke: #2ca02c;
- fill: #2ca02c;
-}
-
-.nvd3.nv-sparklineplus .nv-minValue {
- stroke: #d62728;
- fill: #d62728;
-}
-
-.nvd3.nv-sparklineplus .nv-currentValue {
- /*
- stroke: #444;
- fill: #000;
- */
- font-weight: bold;
- font-size: 1.1em;
-}
-
-/**********
-* historical stock
-*/
-
-.nvd3.nv-ohlcBar .nv-ticks .nv-tick {
- stroke-width: 2px;
-}
-
-.nvd3.nv-ohlcBar .nv-ticks .nv-tick.hover {
- stroke-width: 4px;
-}
-
-.nvd3.nv-ohlcBar .nv-ticks .nv-tick.positive {
- stroke: #2ca02c;
-}
-
-.nvd3.nv-ohlcBar .nv-ticks .nv-tick.negative {
- stroke: #d62728;
-}
-
-.nvd3.nv-historicalStockChart .nv-axis .nv-axislabel {
- font-weight: bold;
-}
-
-.nvd3.nv-historicalStockChart .nv-dragTarget {
- fill-opacity: 0;
- stroke: none;
- cursor: move;
-}
-
-.nvd3 .nv-brush .extent {
- /*
- cursor: ew-resize !important;
- */
- fill-opacity: 0 !important;
-}
-
-.nvd3 .nv-brushBackground rect {
- stroke: #000;
- stroke-width: .4;
- fill: #fff;
- fill-opacity: .7;
-}
-
-
-
-/**********
-* Indented Tree
-*/
-
-
-/**
- * TODO: the following 3 selectors are based on classes used in the example. I should
either make them standard and leave them here, or move to a CSS file not included in the
library
- */
-.nvd3.nv-indentedtree .name {
- margin-left: 5px;
-}
-
-.nvd3.nv-indentedtree .clickable {
- color: #08C;
- cursor: pointer;
-}
-
-.nvd3.nv-indentedtree span.clickable:hover {
- color: #005580;
- text-decoration: underline;
-}
-
-
-.nvd3.nv-indentedtree .nv-childrenCount {
- display: inline-block;
- margin-left: 5px;
-}
-
-.nvd3.nv-indentedtree .nv-treeicon {
- cursor: pointer;
- /*
- cursor: n-resize;
- */
-}
-
-.nvd3.nv-indentedtree .nv-treeicon.nv-folded {
- cursor: pointer;
- /*
- cursor: s-resize;
- */
-}
-
-/**********
-* Parallel Coordinates
-*/
-
-.nvd3 .background path {
- fill: none;
- stroke: #ccc;
- stroke-opacity: .4;
- shape-rendering: crispEdges;
-}
-
-.nvd3 .foreground path {
- fill: none;
- stroke: steelblue;
- stroke-opacity: .7;
-}
-
-.nvd3 .brush .extent {
- fill-opacity: .3;
- stroke: #fff;
- shape-rendering: crispEdges;
-}
-
-.nvd3 .axis line, .axis path {
- fill: none;
- stroke: #000;
- shape-rendering: crispEdges;
-}
-
-.nvd3 .axis text {
- text-shadow: 0 1px 0 #fff;
-}
\ No newline at end of file
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/css/tipsy.css
b/modules/enterprise/gui/coregui/src/main/webapp/css/tipsy.css
deleted file mode 100644
index f1f734f..0000000
--- a/modules/enterprise/gui/coregui/src/main/webapp/css/tipsy.css
+++ /dev/null
@@ -1,140 +0,0 @@
-.tipsy {
- font-size: 10px;
- position: absolute;
- padding: 5px;
- z-index: 990000;
-}
-
-.tipsy-inner {
- background-color: #000;
- color: #FFF;
- max-width: 200px;
- padding: 5px 8px 4px 8px;
- text-align: center;
- z-index: 990000;
-}
-
-/* Rounded corners */
-.tipsy-inner {
- border-radius: 3px;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- z-index: 990000;
-}
-
-/* Uncomment for shadow */
-/*.tipsy-inner { box-shadow: 0 0 5px #000000; -webkit-box-shadow: 0 0 5px #000000;
-moz-box-shadow: 0 0 5px #000000; }*/
-
-.tipsy-arrow {
- position: absolute;
- width: 0;
- height: 0;
- line-height: 0;
- border: 5px dashed #000;
- z-index: 990000;
-}
-
-/* Rules to colour arrows */
-.tipsy-arrow-n {
- border-bottom-color: #000;
- z-index: 990000;
-}
-
-.tipsy-arrow-s {
- border-top-color: #000;
- z-index: 990000;
-}
-
-.tipsy-arrow-e {
- border-left-color: #000;
- z-index: 990000;
-}
-
-.tipsy-arrow-w {
- border-right-color: #000;
- z-index: 990000;
-}
-
-.tipsy-n .tipsy-arrow {
- top: 0;
- left: 50%;
- margin-left: -5px;
- border-bottom-style: solid;
- border-top: none;
- border-left-color: transparent;
- border-right-color: transparent;
- z-index: 990000;
-}
-
-.tipsy-nw .tipsy-arrow {
- top: 0;
- left: 10px;
- border-bottom-style: solid;
- border-top: none;
- border-left-color: transparent;
- border-right-color: transparent;
- z-index: 990000;
-}
-
-.tipsy-ne .tipsy-arrow {
- top: 0;
- right: 10px;
- border-bottom-style: solid;
- border-top: none;
- border-left-color: transparent;
- border-right-color: transparent;
- z-index: 990000;
-}
-
-.tipsy-s .tipsy-arrow {
- bottom: 0;
- left: 50%;
- margin-left: -5px;
- border-top-style: solid;
- border-bottom: none;
- border-left-color: transparent;
- border-right-color: transparent;
- z-index: 990000;
-}
-
-.tipsy-sw .tipsy-arrow {
- bottom: 0;
- left: 10px;
- border-top-style: solid;
- border-bottom: none;
- border-left-color: transparent;
- border-right-color: transparent;
- z-index: 990000;
-}
-
-.tipsy-se .tipsy-arrow {
- bottom: 0;
- right: 10px;
- border-top-style: solid;
- border-bottom: none;
- border-left-color: transparent;
- border-right-color: transparent;
- z-index: 990000;
-}
-
-.tipsy-e .tipsy-arrow {
- right: 0;
- top: 50%;
- margin-top: -5px;
- border-left-style: solid;
- border-right: none;
- border-top-color: transparent;
- border-bottom-color: transparent;
- z-index: 990000;
-}
-
-.tipsy-w .tipsy-arrow {
- left: 0;
- top: 50%;
- margin-top: -5px;
- border-right-style: solid;
- border-left: none;
- border-top-color: transparent;
- border-bottom-color: transparent;
- z-index: 990000;
-}
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/js/jquery.tipsy.js
b/modules/enterprise/gui/coregui/src/main/webapp/js/jquery.tipsy.js
deleted file mode 100644
index bba968c..0000000
--- a/modules/enterprise/gui/coregui/src/main/webapp/js/jquery.tipsy.js
+++ /dev/null
@@ -1,336 +0,0 @@
-// tipsy, facebook style tooltips for jquery
-// version 1.0.0a
-// (c) 2008-2010 jason frame [jason(a)onehackoranother.com]
-// released under the MIT license
-
-(function($) {
-
- function maybeCall(thing, ctx) {
- return (typeof thing == 'function') ? (thing.call(ctx)) : thing;
- }
-
- // CAUTION the current implementation does not allow for tipsied elements to stay out
of DOM (in between events)
- // i.e. don't remove, store, then re-insert tipsied elements (and why would you
want to do that anyway?)
- var garbageCollect = (function() {
- var currentInterval;
- var to = null;
- var tipsies = [];
-
- function _do() {
- for (var i = 0; i < tipsies.length;) {
- var t = tipsies[i];
- // FIXME? the 2nd (non-paranoid) check is from the link below, it should
be replaced if a better way is found
- //
http://stackoverflow.com/questions/4040715/check-if-cached-jquery-object-...
- if (t.options.gcInterval === 0 ||
t.$element.closest('body').length === 0) {
- t.hoverState = 'out';
- t.hide();
- tipsies.splice(i,1);
- } else {
- i++;
- }
- }
- }
- function _loop() {
- to = setTimeout(function() { _do(); _loop(); }, currentInterval);
- }
-
- return function(t) {
- if (t.options.gcInterval === 0) return;
-
- if (to && t.options.gcInterval < currentInterval) {
- clearTimeout(to); to = null;
- currentInterval = t.options.gcInterval;
- }
- tipsies.push(t);
- if (!to) _loop();
- };
- })();
-
- function Tipsy(element, options) {
- this.$element = $(element);
- this.options = options;
- this.enabled = true;
- this.fixTitle();
- garbageCollect(this);
- }
-
-
- Tipsy.prototype = {
- show: function() {
- var title = this.getTitle();
- if (title && this.enabled) {
- var $tip = this.tip();
-
- $tip.find('.tipsy-inner')[this.options.html ? 'html' :
'text'](title);
- $tip[0].className = 'tipsy'; // reset classname in case of
dynamic gravity
- $tip.remove().css({top: 0, left: 0, visibility: 'hidden',
display: 'block'}).prependTo(document.body);
-
- var pos = $.extend({}, this.$element.offset(), {
- width: this.$element[0].offsetWidth || 0,
- height: this.$element[0].offsetHeight || 0
- });
-
- if (typeof this.$element[0].nearestViewportElement == 'object')
{
- // SVG
- var el = this.$element[0];
- var rect = el.getBoundingClientRect();
- pos.width = rect.width;
- pos.height = rect.height;
- }
-
-
- var actualWidth = $tip[0].offsetWidth,
- actualHeight = $tip[0].offsetHeight,
- gravity = maybeCall(this.options.gravity, this.$element[0]);
-
- var tp;
- switch (gravity.charAt(0)) {
- case 'n':
- tp = {top: pos.top + pos.height + this.options.offset, left:
pos.left + pos.width / 2 - actualWidth / 2};
- break;
- case 's':
- tp = {top: pos.top - actualHeight - this.options.offset, left:
pos.left + pos.width / 2 - actualWidth / 2};
- break;
- case 'e':
- tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left:
pos.left - actualWidth - this.options.offset};
- break;
- case 'w':
- tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left:
pos.left + pos.width + this.options.offset};
- break;
- }
-
- if (gravity.length == 2) {
- if (gravity.charAt(1) == 'w') {
- tp.left = pos.left + pos.width / 2 - 15;
- } else {
- tp.left = pos.left + pos.width / 2 - actualWidth + 15;
- }
- }
-
- $tip.css(tp).addClass('tipsy-' + gravity);
- $tip.find('.tipsy-arrow')[0].className = 'tipsy-arrow
tipsy-arrow-' + gravity.charAt(0);
- if (this.options.className) {
- $tip.addClass(maybeCall(this.options.className, this.$element[0]));
- }
-
- if (this.options.fade) {
- $tip.stop().css({opacity: 0, display: 'block', visibility:
'visible'}).animate({opacity: this.options.opacity});
- } else {
- $tip.css({visibility: 'visible', opacity:
this.options.opacity});
- }
-
- var t = this;
- var set_hovered = function(set_hover){
- return function(){
- t.$tip.stop();
- t.tipHovered = set_hover;
- if (!set_hover){
- if (t.options.delayOut === 0 && t.options.trigger !=
'manual') {
- t.hide();
- } else {
- setTimeout(function() {
- if (t.hoverState == 'out') t.hide(); },
t.options.delayOut);
- }
- }
- };
- };
- $tip.hover(set_hovered(true), set_hovered(false));
- }
- },
-
- hide: function() {
- if (this.options.fade) {
- this.tip().stop().fadeOut(function() { $(this).remove(); });
- } else {
- this.tip().remove();
- }
- },
-
- fixTitle: function() {
- var $e = this.$element;
-
- if ($e.attr('title') || typeof($e.attr('original-title')) !=
'string') {
- $e.attr('original-title', $e.attr('title') ||
'').removeAttr('title');
- }
- if (typeof $e.context.nearestViewportElement == 'object'){
- if ($e.children('title').length){
- $e.append('<original-title>' +
($e.children('title').text() || '') + '</original-title>')
- .children('title').remove();
- }
- }
- },
-
- getTitle: function() {
-
- var title, $e = this.$element, o = this.options;
- this.fixTitle();
-
- if (typeof o.title == 'string') {
- var title_name = o.title == 'title' ? 'original-title' :
o.title;
- if ($e.children(title_name).length){
- title = $e.children(title_name).html();
- } else{
- title = $e.attr(title_name);
- if (typeof title == 'undefined') title = ''
- }
-
- } else if (typeof o.title == 'function') {
- title = o.title.call($e[0]);
- }
- title = ('' + title).replace(/(^\s*|\s*$)/, "");
- return title || o.fallback;
- },
-
- tip: function() {
- if (!this.$tip) {
- this.$tip = $('<div
class="tipsy"></div>').html('<div
class="tipsy-arrow"></div><div
class="tipsy-inner"></div>');
- }
- return this.$tip;
- },
-
- validate: function() {
- if (!this.$element[0].parentNode) {
- this.hide();
- this.$element = null;
- this.options = null;
- }
- },
-
- enable: function() { this.enabled = true; },
- disable: function() { this.enabled = false; },
- toggleEnabled: function() { this.enabled = !this.enabled; }
- };
-
- $.fn.tipsy = function(options) {
-
- if (options === true) {
- return this.data('tipsy');
- } else if (typeof options == 'string') {
- $(this).each(function(i,el){
- if ($(el).data('tipsy')) {
- tipsy = $(el).data('tipsy')
- tipsy[options]();
- }
- });
- return this;
- }
-
- options = $.extend({}, $.fn.tipsy.defaults, options);
-
- if (options.hoverlock && options.delayOut === 0) {
- options.delayOut = 100;
- }
-
- function get(ele) {
- var tipsy = $.data(ele, 'tipsy');
- if (!tipsy) {
- tipsy = new Tipsy(ele, $.fn.tipsy.elementOptions(ele, options));
- $.data(ele, 'tipsy', tipsy);
- }
- return tipsy;
- }
-
- function enter() {
- var tipsy = get(this);
- tipsy.hoverState = 'in';
- if (options.delayIn === 0) {
- tipsy.show();
- } else {
- tipsy.fixTitle();
- setTimeout(function() { if (tipsy.hoverState == 'in')
tipsy.show(); }, options.delayIn);
- }
- }
-
- function leave() {
- var tipsy = get(this);
- tipsy.hoverState = 'out';
- if (options.delayOut === 0) {
- tipsy.hide();
- } else {
- var to = function() {
- if (!tipsy.tipHovered || !options.hoverlock){
- if (tipsy.hoverState == 'out') tipsy.hide();
- }
- };
- setTimeout(to, options.delayOut);
- }
- }
-
- if (!options.live) this.each(function() { get(this); });
-
- if (options.trigger != 'manual') {
- var binder = options.live ? 'live' : 'bind',
- eventIn = options.trigger == 'hover' ? 'mouseenter' :
'focus',
- eventOut = options.trigger == 'hover' ? 'mouseleave' :
'blur';
- this[binder](eventIn, enter)[binder](eventOut, leave);
- }
-
- return this;
-
- };
-
- $.fn.tipsy.defaults = {
- className: null,
- delayIn: 0,
- delayOut: 0,
- fade: false,
- fallback: '',
- gcInterval: 0,
- gravity: 'n',
- html: false,
- live: false,
- offset: 0,
- opacity: 0.8,
- title: 'title',
- trigger: 'hover',
- hoverlock: false
- };
-
- // Overwrite this method to provide options on a per-element basis.
- // For example, you could store the gravity in a 'tipsy-gravity' attribute:
- // return $.extend({}, options, {gravity: $(ele).attr('tipsy-gravity') ||
'n' });
- // (remember - do not modify 'options' in place!)
- $.fn.tipsy.elementOptions = function(ele, options) {
- return $.metadata ? $.extend({}, options, $(ele).metadata()) : options;
- };
-
- $.fn.tipsy.autoNS = function() {
- return $(this).offset().top > ($(document).scrollTop() + $(window).height() /
2) ? 's' : 'n';
- };
-
- $.fn.tipsy.autoWE = function() {
- return $(this).offset().left > ($(document).scrollLeft() + $(window).width() /
2) ? 'e' : 'w';
- };
-
- /**
- * yields a closure of the supplied parameters, producing a function that takes
- * no arguments and is suitable for use as an autogravity function like so:
- *
- * @param margin (int) - distance from the viewable region edge that an
- * element should be before setting its tooltip's gravity to be away
- * from that edge.
- * @param prefer (string, e.g. 'n', 'sw', 'w') - the
direction to prefer
- * if there are no viewable region edges effecting the tooltip's
- * gravity. It will try to vary from this minimally, for example,
- * if 'sw' is preferred and an element is near the right viewable
- * region edge, but not the top edge, it will set the gravity for
- * that element's tooltip to be 'se', preserving the southern
- * component.
- */
- $.fn.tipsy.autoBounds = function(margin, prefer) {
- return function() {
- var dir = {ns: prefer[0], ew: (prefer.length > 1 ? prefer[1] : false)},
- boundTop = $(document).scrollTop() + margin,
- boundLeft = $(document).scrollLeft() + margin,
- $this = $(this);
-
- if ($this.offset().top < boundTop) dir.ns = 'n';
- if ($this.offset().left < boundLeft) dir.ew = 'w';
- if ($(window).width() + $(document).scrollLeft() - $this.offset().left < margin)
dir.ew = 'e';
- if ($(window).height() + $(document).scrollTop() - $this.offset().top < margin)
dir.ns = 's';
-
- return dir.ns + (dir.ew ? dir.ew : '');
- };
- };
-})(jQuery);
-