modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/AbstractMetricGraph.java | 12 modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/MetricGraphData.java | 157 ++- modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/graphtype/StackedBarMetricGraphImpl.java | 22 modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/CoreGUI.gwt.xml | 2 modules/enterprise/gui/coregui/src/main/webapp/CoreGUI-4.10.0.css | 405 ++++++++++ modules/enterprise/gui/coregui/src/main/webapp/CoreGUI-4.9.0.css | 405 ---------- modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html | 4 modules/enterprise/gui/coregui/src/main/webapp/css/charts-4.10.0.css | 252 ++++++ modules/enterprise/gui/coregui/src/main/webapp/css/charts-4.9.0.css | 252 ------ modules/enterprise/gui/coregui/src/main/webapp/js/rhq-4.10.0.js | 189 ++++ modules/enterprise/gui/coregui/src/main/webapp/js/rhq-4.9.0.js | 183 ---- 11 files changed, 974 insertions(+), 909 deletions(-)
New commits: commit ec67bac995a335960f2d5d4a39070bc5d408f08b Author: Mike Thompson mithomps@redhat.com Date: Wed Dec 4 19:45:05 2013 -0800
[BZ 1035443] Chart legend not matching the same significant digits as summary metric portlet.
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/AbstractMetricGraph.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/AbstractMetricGraph.java index cc9e637..fbfe940 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/AbstractMetricGraph.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/AbstractMetricGraph.java @@ -207,6 +207,18 @@ public abstract class AbstractMetricGraph extends VLayout implements HasD3Metric return metricGraphData.isHideLegend(); }
+ public String getChartAverage(){ + return metricGraphData.getChartAverage(); + } + + public String getChartMin(){ + return metricGraphData.getChartMin(); + } + + public String getChartMax(){ + return metricGraphData.getChartMax(); + } + public void setGraphListView(AbstractD3GraphListView graphListView) { this.graphListView = graphListView; } diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/MetricGraphData.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/MetricGraphData.java index da90c55..878006e 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/MetricGraphData.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/MetricGraphData.java @@ -30,6 +30,7 @@ import org.rhq.core.domain.util.PageList; import org.rhq.coregui.client.CoreGUI; import org.rhq.coregui.client.JsonMetricProducer; import org.rhq.coregui.client.Messages; +import org.rhq.coregui.client.inventory.common.detail.summary.AbstractActivityView; import org.rhq.coregui.client.inventory.common.graph.graphtype.StackedBarMetricGraphImpl; import org.rhq.coregui.client.util.Log; import org.rhq.coregui.client.util.MeasurementConverterClient; @@ -74,49 +75,70 @@ public class MetricGraphData implements JsonMetricProducer { private Integer chartHeight; private boolean isPortalGraph; private boolean hideLegend; - + private double average = 0.0; + private double min = Double.MAX_VALUE; + private double max = Double.MIN_VALUE;
private MetricGraphData(int portalId) { isPortalGraph = true; this.portalId = portalId; }
- public static MetricGraphData createForDashboard(int portalId){ + public static MetricGraphData createForDashboard(int portalId) { return new MetricGraphData(portalId); }
- private MetricGraphData(int entityId, String entityName, MeasurementDefinition def, - List<MeasurementDataNumericHighLowComposite> metricData ) { + List<MeasurementDataNumericHighLowComposite> metricData) { this.entityName = entityName; setEntityId(entityId); setDefinitionId(def.getId()); this.definition = def; this.metricData = metricData; this.isPortalGraph = false; + + calcMinMaxAvg(metricData); }
public static MetricGraphData createForResourceGroup(int groupId, String groupName, MeasurementDefinition def, - List<MeasurementDataNumericHighLowComposite> metricData ){ - return new MetricGraphData(groupId,groupName,def, metricData ); + List<MeasurementDataNumericHighLowComposite> metricData) { + return new MetricGraphData(groupId, groupName, def, metricData); }
private MetricGraphData(int entityId, String entityName, MeasurementDefinition measurementDef, - List<MeasurementDataNumericHighLowComposite> metrics, - PageList<MeasurementOOBComposite> measurementOOBCompositeList ) { + List<MeasurementDataNumericHighLowComposite> metricData, + PageList<MeasurementOOBComposite> measurementOOBCompositeList) { this.entityName = entityName; setEntityId(entityId); setDefinitionId(measurementDef.getId()); this.definition = measurementDef; - this.metricData = metrics; + this.metricData = metricData; this.measurementOOBCompositeList = measurementOOBCompositeList; this.isPortalGraph = false; + calcMinMaxAvg(metricData); }
- public static MetricGraphData createForResource(int resourceId, String resourceName, MeasurementDefinition measurementDef, - List<MeasurementDataNumericHighLowComposite> metrics, - PageList<MeasurementOOBComposite> measurementOOBCompositeList ){ - return new MetricGraphData(resourceId, resourceName,measurementDef, metrics, measurementOOBCompositeList); + public static MetricGraphData createForResource(int resourceId, String resourceName, + MeasurementDefinition measurementDef, List<MeasurementDataNumericHighLowComposite> metrics, + PageList<MeasurementOOBComposite> measurementOOBCompositeList) { + return new MetricGraphData(resourceId, resourceName, measurementDef, metrics, measurementOOBCompositeList); + } + + private void calcMinMaxAvg(List<MeasurementDataNumericHighLowComposite> metricData) { + int averageCount = 0; + for (MeasurementDataNumericHighLowComposite measurement : metricData) { + if (!Double.isNaN(measurement.getLowValue())) { + min = Math.min(min, measurement.getLowValue()); + } + if (!Double.isNaN(measurement.getHighValue())) { + max = Math.max(max, measurement.getHighValue()); + } + if (!Double.isNaN(measurement.getValue())) { + average = average + measurement.getValue(); + averageCount++; + } + } + average = average / averageCount; }
public int getEntityId() { @@ -128,7 +150,6 @@ public class MetricGraphData implements JsonMetricProducer { //this.definition = null; }
- public void setEntityName(String entityName) { this.entityName = entityName; //this.definition = null; @@ -152,24 +173,22 @@ public class MetricGraphData implements JsonMetricProducer { }
public String getChartId() { - if(isPortalGraph){ - if(definition != null){ + if (isPortalGraph) { + if (definition != null) { return entityId + "-" + definition.getId(); - }else { + } else { // case when portlet has not been configured yet return ""; } - }else { + } else { return entityId + "-" + definitionId; } }
- public void setMetricData(List<MeasurementDataNumericHighLowComposite> metricData) { this.metricData = metricData; }
- public String getChartTitleMinLabel() { return chartTitleMinLabel; } @@ -182,6 +201,30 @@ public class MetricGraphData implements JsonMetricProducer { return chartTitlePeakLabel; }
+ public String getChartAverage() { + if(average != 0.0){ + return AbstractActivityView.convertLastValueForDisplay(average, definition); + }else { + return ""; + } + } + + public String getChartMax() { + if(max != Double.MIN_VALUE){ + return AbstractActivityView.convertLastValueForDisplay(max, definition); + }else { + return ""; + } + } + + public String getChartMin() { + if(min != Double.MAX_VALUE){ + return AbstractActivityView.convertLastValueForDisplay(min, definition); + }else { + return ""; + } + } + public String getChartDateLabel() { return chartDateLabel; } @@ -201,6 +244,7 @@ public class MetricGraphData implements JsonMetricProducer { public String getChartNoDataLabel() { return chartNoDataLabel; } + public String getChartSingleValueLabel() { return chartSingleValueLabel; } @@ -260,9 +304,10 @@ public class MetricGraphData implements JsonMetricProducer {
public String getChartTitle() {
- if(definition != null){ - return (entityName == null) ? definition.getDisplayName() : entityName + " - "+definition.getDisplayName(); - }else { + if (definition != null) { + return (entityName == null) ? definition.getDisplayName() : entityName + " - " + + definition.getDisplayName(); + } else { // handle case when dashboard portlet has not been configured yet. return "";
@@ -323,28 +368,29 @@ public class MetricGraphData implements JsonMetricProducer { sb.append(" "baselineMax":" + lastOOB.getBlMax() + ", "); }
- if (!Double.isNaN(measurement.getValue())) { - - MeasurementNumericValueAndUnits newHigh = normalizeUnitsAndValues(measurement.getHighValue(), - definition.getUnits()); - MeasurementNumericValueAndUnits newLow = normalizeUnitsAndValues(measurement.getLowValue(), - definition.getUnits()); - MeasurementNumericValueAndUnits newAvg = normalizeUnitsAndValues(measurement.getValue(), - definition.getUnits()); - if (!gotAdjustedMeasurementUnits) { - adjustedMeasurementUnits = newAvg.getUnits(); - gotAdjustedMeasurementUnits = true; - } - sb.append(" "barDuration": "" + barDurationString + "", "); - sb.append(" "high":" + cleanseHigh(newLow.getValue(), newAvg.getValue(),newHigh.getValue()) + ","); - sb.append(" "low":" + cleanseLow(newLow.getValue(), newAvg.getValue(), newHigh.getValue()) + ","); - sb.append(" "y":" + newAvg.getValue() + "},"); - } else { - // give it some values so that we dont have NaN - sb.append(" "high":0,"); - sb.append(" "low":0,"); - sb.append(" "y":0,"); - sb.append(" "nodata":true },"); + if (!Double.isNaN(measurement.getValue())) { + + MeasurementNumericValueAndUnits newHigh = normalizeUnitsAndValues(measurement.getHighValue(), + definition.getUnits()); + MeasurementNumericValueAndUnits newLow = normalizeUnitsAndValues(measurement.getLowValue(), + definition.getUnits()); + MeasurementNumericValueAndUnits newAvg = normalizeUnitsAndValues(measurement.getValue(), + definition.getUnits()); + if (!gotAdjustedMeasurementUnits) { + adjustedMeasurementUnits = newAvg.getUnits(); + gotAdjustedMeasurementUnits = true; + } + sb.append(" "barDuration": "" + barDurationString + "", "); + sb.append(" "high":" + cleanseHigh(newLow.getValue(), newAvg.getValue(), newHigh.getValue()) + + ","); + sb.append(" "low":" + cleanseLow(newLow.getValue(), newAvg.getValue(), newHigh.getValue()) + ","); + sb.append(" "y":" + newAvg.getValue() + "},"); + } else { + // give it some values so that we dont have NaN + sb.append(" "high":0,"); + sb.append(" "low":0,"); + sb.append(" "y":0,"); + sb.append(" "nodata":true },"); } if (!sb.toString().endsWith("},")) { sb.append(" },"); @@ -353,7 +399,7 @@ public class MetricGraphData implements JsonMetricProducer { sb.setLength(sb.length() - 1); // delete the last ',' sb.append("]"); } - Log.debug("Json data for: "+getChartTitle()); + Log.debug("Json data for: " + getChartTitle()); Log.debug(sb.toString()); return sb.toString(); } @@ -368,12 +414,12 @@ public class MetricGraphData implements JsonMetricProducer { * @param high supposed high value * @return the real high value */ - private Double cleanseHigh(Double low, Double avg, Double high){ - double highLowMax = Math.max(low, high); + private Double cleanseHigh(Double low, Double avg, Double high) { + double highLowMax = Math.max(low, high); return Math.max(highLowMax, avg); }
- private Double cleanseLow(Double low, Double avg, Double high){ + private Double cleanseLow(Double low, Double avg, Double high) { double highLowMin = Math.min(low, high); return Math.min(highLowMin, avg); } @@ -391,12 +437,14 @@ public class MetricGraphData implements JsonMetricProducer { public boolean showBarAvgTrendLine() { int numberOfAggBars = 0; for (MeasurementDataNumericHighLowComposite measurement : metricData) { - boolean noValuesInCurrentBarUndefined = (!Double.isNaN(measurement.getValue()) && !Double.isNaN(measurement.getHighValue()) && !Double.isNaN(measurement.getLowValue())); - boolean foundAggregateBar = (measurement.getValue() != measurement.getHighValue() || measurement.getHighValue() != measurement.getLowValue()); + boolean noValuesInCurrentBarUndefined = (!Double.isNaN(measurement.getValue()) + && !Double.isNaN(measurement.getHighValue()) && !Double.isNaN(measurement.getLowValue())); + boolean foundAggregateBar = (measurement.getValue() != measurement.getHighValue() || measurement + .getHighValue() != measurement.getLowValue()); // if there exists a even one aggregate bar then I can short circuit this and exit - if (noValuesInCurrentBarUndefined && foundAggregateBar){ + if (noValuesInCurrentBarUndefined && foundAggregateBar) { numberOfAggBars++; - if(numberOfAggBars > 4){ + if (numberOfAggBars > 4) { return true; } } @@ -422,7 +470,6 @@ public class MetricGraphData implements JsonMetricProducer { } }
- private MeasurementNumericValueAndUnits normalizeUnitsAndValues(double value, MeasurementUnits measurementUnits) { MeasurementNumericValueAndUnits newValue = MeasurementConverterClient.fit(value, measurementUnits); MeasurementNumericValueAndUnits returnValue; @@ -437,7 +484,6 @@ public class MetricGraphData implements JsonMetricProducer { return returnValue; }
- @Override public String toString() { final StringBuilder sb = new StringBuilder(); @@ -464,5 +510,4 @@ public class MetricGraphData implements JsonMetricProducer { return sb.toString(); }
- } diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/graphtype/StackedBarMetricGraphImpl.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/graphtype/StackedBarMetricGraphImpl.java index e3d5574..33e3d97 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/graphtype/StackedBarMetricGraphImpl.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/coregui/client/inventory/common/graph/graphtype/StackedBarMetricGraphImpl.java @@ -72,7 +72,10 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph { global.@org.rhq.coregui.client.inventory.common.graph.AbstractMetricGraph::getChartSingleValueLabel()(), global.@org.rhq.coregui.client.inventory.common.graph.AbstractMetricGraph::getXAxisTimeFormatHours()(), global.@org.rhq.coregui.client.inventory.common.graph.AbstractMetricGraph::getXAxisTimeFormatHoursMinutes()(), - global.@org.rhq.coregui.client.inventory.common.graph.AbstractMetricGraph::isHideLegend()() + global.@org.rhq.coregui.client.inventory.common.graph.AbstractMetricGraph::isHideLegend()(), + global.@org.rhq.coregui.client.inventory.common.graph.AbstractMetricGraph::getChartAverage()(), + global.@org.rhq.coregui.client.inventory.common.graph.AbstractMetricGraph::getChartMin()(), + global.@org.rhq.coregui.client.inventory.common.graph.AbstractMetricGraph::getChartMax()() );
@@ -216,21 +219,20 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph { .attr("height", height + margin.top - titleHeight - titleSpace + margin.bottom) .attr("transform", "translate(" + margin.left + "," + (+titleHeight + titleSpace + margin.top) + ")");
- legendUnDefined = (typeof min === 'undefined') || (typeof avg === 'undefined') || (typeof peak === 'undefined'); - if (!(chartContext.hideLegend && !useSmallCharts())) { - createMinAvgPeakSidePanel(chartContext.minChartTitle, min, chartContext.avgChartTitle, avg, chartContext.peakChartTitle, peak, chartContext.yAxisUnits); + legendUnDefined = (chartContext.chartAverage === ""); + if ((!chartContext.hideLegend && !useSmallCharts() && !legendUnDefined )) { + createMinAvgPeakSidePanel(chartContext.minChartTitle, chartContext.chartMin, chartContext.avgChartTitle, chartContext.chartAverage, chartContext.peakChartTitle, chartContext.chartMax, chartContext.yAxisUnits); } }
}
- function createMinAvgPeakSidePanel(minLabel, minValue, avgLabel, avgValue, highLabel, highValue, uom) { + function createMinAvgPeakSidePanel(minLabel, minValue, avgLabel, avgValue, highLabel, highValue ) { var xLabel = 772, xValue = 820, yBase = 100, - yInc = 25, - decimalPlaces = 0; + yInc = 25;
// title/header chart.append("g").append("rect") @@ -256,7 +258,7 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph { .attr("class", "highText") .attr("x", xValue) .attr("y", yBase) - .text(highValue.toFixed(decimalPlaces) + " " + uom); + .text(highValue); }
@@ -272,7 +274,7 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph { .attr("class", "avgText") .attr("x", xValue) .attr("y", yBase + yInc) - .text(avgValue.toFixed(decimalPlaces) + " " + uom); + .text(avgValue); }
// min @@ -287,7 +289,7 @@ public class StackedBarMetricGraphImpl extends AbstractMetricGraph { .attr("class", "minText") .attr("x", xValue) .attr("y", yBase + 2 * yInc) - .text(minValue.toFixed(decimalPlaces) + " " + uom); + .text(minValue); }
} diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/CoreGUI.gwt.xml b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/CoreGUI.gwt.xml index a5cbb9c..21eb46b 100644 --- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/CoreGUI.gwt.xml +++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/coregui/CoreGUI.gwt.xml @@ -51,7 +51,7 @@ </generate-with>
<script src="/coregui/js/moment-2.0.0.min.js"/> - <script src="/coregui/js/rhq-4.9.0.js"/> + <script src="/coregui/js/rhq-4.10.0.js"/> <!-- External javascript libraries --> <!-- jquery.sparkline requires jquery. --> diff --git a/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI-4.10.0.css b/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI-4.10.0.css new file mode 100644 index 0000000..888da4c --- /dev/null +++ b/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI-4.10.0.css @@ -0,0 +1,405 @@ +body { + color: #010101; +} + +body, p, td, th, option, input, textarea, select { + font-family: tahoma, verdana, sans-serif !important; + font-size: 11px !important; +} + +img { + border-style: none; +} + +hr { + background-color: #AAAAAA; + border: 0 none; + color: #AAAAAA; + height: 1px; + margin-left: 0; + margin-right: 0; + text-align: center; + width: 100%; +} + +a, a:link, a:visited, a:hover { + color: #4A5D75 !important; + font-weight: bold !important; +} + +a, a:link, a:visited { + text-decoration: none !important; +} + +a:hover { + text-decoration: underline !important; +} + +a.menuBar, a.menuBar:link, a.menuBar:visited, a.menuBar:hover { + color: inherit !important; +} + + +.backLink { + color: #4A5D75; + font-weight: bold; + text-decoration: none; +} + + +.HeaderLabel { + height: 35px; + font-size: 11pt; + font-weight: bold; + color: #444444; +} + + +.OddRow { + background-color: #ffffff; + border-right: 1px solid rgb(217, 224, 227); + border-bottom: 1px solid rgb(230, 234, 239); +} + +.OddRowDisabled { + background-color: #ffffff; + border-right: 1px solid rgb(217, 224, 227); + border-bottom: 1px solid rgb(230, 234, 239); +} + +.EvenRow { + background-color: rgb(246, 246, 246); + border-right: 1px solid rgb(217, 224, 227); + border-bottom: 1px solid rgb(230, 234, 239); +} + +.EvenRowDisabled { + background-color: rgb(246, 246, 246); + border-right: 1px solid rgb(217, 224, 227); + border-bottom: 1px solid rgb(230, 234, 239); +} + +.inheritColor { + color: inherit !important; +} + +.TopSectionLink, .TopSectionLinkSelected { + font-size: 12px !important; +} + +.TopSectionLink { + color: #4A5D75 !important; +} + +.TopSectionLinkSelected { + color: white !important; +} + +.TopSectionLinkDiv { +} + +.TopSectionLinkDivSelected { + background-image: url('images/header/header_bg_selected.png'); +} + +.BreadCrumb { + font-size: 10pt; + font-weight: bold; + text-decoration: none; + color: #363636; + height: 28px; +} + +.SectionHeader { + font-size: 16pt; + font-weight: bold; +} + +.textItemDisabled { + background: rgb(214, 213, 217); +} + +.formTitle, .formTitleFocused { + font-weight: bold; +} + +.subtitle { + color: #D6D6D6; + font-variant: small-caps; + font-weight: bold; + font-size: 12pt; +} + + +/* Availability Bar */ +.availBarLeftCap { + background-image: url("images/availBar/leftCap.png"); + width: 8px; + height: 28px; +} +.availBarRightCap { + background-image: url("images/availBar/rightCap.png"); + width: 8px; + height: 28px; +} + +.availBarUp { + background-image: url("images/availBar/up.png"); + background-repeat: repeat-x; + height: 28px; +} + +.availBarDown { + background: url("images/availBar/down.png") repeat-x; + height: 28px; +} + + + +.GraphTooltip { + background-color:#B5D5FF; + font-weight:bold; + padding:5px; +} + + +/* About Modal Window */ +.DisplayContent,.DisplayLabel { + font-size: 11px; +} + +.DisplayLabel { + font-weight: bold; +} + +.DisplaySubhead { + font-weight: bolder; + font-size: 16px; + color: #DE652D; +} + + +.SubTabButton, +.SubTabButtonOver, +.SubTabButtonFocused, +.SubTabButtonFocusedOver, +.SubTabButtonDown, +.SubTabButtonFocusedDown, +.SubTabButtonSelected, +.SubTabButtonSelectedFocused, +.SubTabButtonSelectedDown, +.SubTabButtonSelectedFocusedDown, +.SubTabButtonSelectedOver, +.SubTabButtonSelectedFocusedOver, +.SubTabButtonDisabled, +.SubTabButtonSelectedDisabled { + font-family: tahoma, verdona, sans-serif; + font-size: 11px; + padding: 2px; + } + +.SubTabButtonDisabled { + +} + +.SubTabButtonDisabled, +.SubTabButtonSelectedDisabled { + font-weight: normal; + color: #AAAAAA; +} + +.SubTabButtonFocused, +.SubTabButtonFocusedOver, +.SubTabButtonSelectedFocused, +.SubTabButtonSelectedFocusedOver, +.SubTabButtonSelectedFocusedDown { + +} + +.SubTabButtonOver, +.SubTabButtonFocusedOver, +.SubTabButtonSelectedFocused, +.SubTabButtonSelectedFocusedOver { + font-weight: bold; +} + +.SubTabButtonDown, +.SubTabButtonFocusedDown, +.SubTabButtonSelectedDown, +.SubTabButtonSelectedFocusedDown { + font-weight: bold; + font-size: 12px; +} + +.SubTabButtonSelected, +.SubTabButtonSelectedFocused, +.SubTabButtonSelectedOver, +.SubTabButtonSelectedFocusedOver, +.SubTabButtonSelectedDisabled { + font-weight: bold; +} + + + +.SimpleButton, +.SimpleButtonOver, +.SimpleButtonFocused, +.SimpleButtonFocusedOver, +.SimpleButtonDown, +.SimpleButtonFocusedDown, +.SimpleButtonSelected, +.SimpleButtonSelectedFocused, +.SimpleButtonSelectedDown, +.SimpleButtonSelectedFocusedDown, +.SimpleButtonSelectedOver, +.SimpleButtonSelectedFocusedOver, +.SimpleButtonDisabled, +.SimpleButtonSelectedDisabled, +.SimpleButtonDisabled, +.SimpleButtonDisabled, +.SimpleButtonSelectedDisabled, +.SimpleButtonFocused, +.SimpleButtonFocusedOver, +.SimpleButtonSelectedFocused, +.SimpleButtonSelectedFocusedOver, +.SimpleButtonSelectedFocusedDown , +.SimpleButtonOver, +.SimpleButtonFocusedOver, +.SimpleButtonSelectedFocused, +.SimpleButtonSelectedFocusedOver , +.SimpleButtonDown, +.SimpleButtonFocusedDown, +.SimpleButtonSelectedDown, +.SimpleButtonSelectedFocusedDown , +.SimpleButtonSelected, +.SimpleButtonSelectedFocused, +.SimpleButtonSelectedOver, +.SimpleButtonSelectedFocusedOver, +.SimpleButtonSelectedDisabled{ + font-family: tahoma, verdana, sans-serif; + font-size: 11px; + padding: 2px; + font-weight: bold; +} + + +.topMenuBar { + background: url('/coregui/org.rhq.coregui.CoreGUI/sc/skins/Enterprise/images/cssButton/button_stretch.png') repeat-x scroll 0 0 #DDDDDD; +} + +.menuButton, .menuButtonOver, .menuButtonDown, .menuButtonDisabled, .menuButtonSelected, .menuButtonSelectedDown, .menuButtonSelectedOver, .menuButtonSelectedDisabled { + border: none !important; + font-weight: bold !important; +} + + + +/** Not used right now **/ +.gwtMenuBar { + background: url('images/header/header_bg.png') repeat-x; + /*background-image: url("http://localhost:7080/coregui/org.rhq.coregui.CoreGUI/sc/skins/Enterprise/im... + padding: 0px; + -moz-box-sizing: border-box; + overflow: hidden; + cursor: auto; +} + +.gwtMenu, .gwt-MenuBarPopup, .gwt-MenuPopup { + background-color: white; +} + +.gwt-MenuItem { + padding: 0 10px; + font-weight: bold; + color: #666666; + font-size: 9pt; +} + +.gwt-MenuItemSeparator { + background-color: #666666; +} + +.gwt-MenuItem-Selected { + background-color: #999999; +} + +.selectedTag { + background-color: lightblue; + padding: 5px; + border: 1px solid darkblue; +} + + +/* This sets table mouse-over highlights to have an alpha component on browsers that support it. + It particularly helps with tables that have bar charts as a background component. + (e.g. problem metrics or call time) +*/ +.tallCellOver, .tallCellOverDark { + background-color: rgb(230,230,230) !important; /* for browsers that don't like alpha */ + background-color: rgba(230,230,230,0.6) !important; +} + +.editableText { + color: #070; +} + +.InfoBlock,.ConfirmationBlock,.WarnBlock,.ErrorBlock,.FatalBlock { + border: 1px solid; + color: #000000; +} + +.InfoBlock,.ConfirmationBlock { + background-color: #BFF1B5; /* light green */ + border-color: #00AC3D; /* medium green */ +} + +.WarnBlock { + background-color: #FFFD99; /* light yellow */ + border-color: #FF9C15; /* medium orange */ +} + +.ErrorBlock { + background-color: #FF9999; /* light red */ + border-color: #EE4444; /* medium red */ +} + +.FatalBlock { + background-color: #FF6666; /* slightly darker light red */ + border-color: #EE1111; /* slightly darker medium red */ +} + +.InlineNote { + color: #C22; +} + +.InlineInfo { + color: #00AC3D; /* medium green */ +} + +.InlineError { + color: #EE4444; /* medium red */ +} + +.log-panel { + z-index: 9999999 !important; +} + +.requiredFieldMarker { + font-weight: bolder; + color: #B77 /* medium red */ +} + +.configurationEditorHeaderCell { + border: 1px solid; + background-color: #EEE; /* light gray */ + font-weight: bolder; +} + +.menuButton, .menuButtonOver, .menuButtonDown, .menuButtonDisabled, .menuButtonSelected, .menuButtonSelectedDown, .menuButtonSelectedOver, .menuButtonSelectedDisabled { + border: none; + font-weight: bold; +} + +.noOutline { + outline:0; +} \ No newline at end of file diff --git a/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI-4.9.0.css b/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI-4.9.0.css deleted file mode 100644 index 888da4c..0000000 --- a/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI-4.9.0.css +++ /dev/null @@ -1,405 +0,0 @@ -body { - color: #010101; -} - -body, p, td, th, option, input, textarea, select { - font-family: tahoma, verdana, sans-serif !important; - font-size: 11px !important; -} - -img { - border-style: none; -} - -hr { - background-color: #AAAAAA; - border: 0 none; - color: #AAAAAA; - height: 1px; - margin-left: 0; - margin-right: 0; - text-align: center; - width: 100%; -} - -a, a:link, a:visited, a:hover { - color: #4A5D75 !important; - font-weight: bold !important; -} - -a, a:link, a:visited { - text-decoration: none !important; -} - -a:hover { - text-decoration: underline !important; -} - -a.menuBar, a.menuBar:link, a.menuBar:visited, a.menuBar:hover { - color: inherit !important; -} - - -.backLink { - color: #4A5D75; - font-weight: bold; - text-decoration: none; -} - - -.HeaderLabel { - height: 35px; - font-size: 11pt; - font-weight: bold; - color: #444444; -} - - -.OddRow { - background-color: #ffffff; - border-right: 1px solid rgb(217, 224, 227); - border-bottom: 1px solid rgb(230, 234, 239); -} - -.OddRowDisabled { - background-color: #ffffff; - border-right: 1px solid rgb(217, 224, 227); - border-bottom: 1px solid rgb(230, 234, 239); -} - -.EvenRow { - background-color: rgb(246, 246, 246); - border-right: 1px solid rgb(217, 224, 227); - border-bottom: 1px solid rgb(230, 234, 239); -} - -.EvenRowDisabled { - background-color: rgb(246, 246, 246); - border-right: 1px solid rgb(217, 224, 227); - border-bottom: 1px solid rgb(230, 234, 239); -} - -.inheritColor { - color: inherit !important; -} - -.TopSectionLink, .TopSectionLinkSelected { - font-size: 12px !important; -} - -.TopSectionLink { - color: #4A5D75 !important; -} - -.TopSectionLinkSelected { - color: white !important; -} - -.TopSectionLinkDiv { -} - -.TopSectionLinkDivSelected { - background-image: url('images/header/header_bg_selected.png'); -} - -.BreadCrumb { - font-size: 10pt; - font-weight: bold; - text-decoration: none; - color: #363636; - height: 28px; -} - -.SectionHeader { - font-size: 16pt; - font-weight: bold; -} - -.textItemDisabled { - background: rgb(214, 213, 217); -} - -.formTitle, .formTitleFocused { - font-weight: bold; -} - -.subtitle { - color: #D6D6D6; - font-variant: small-caps; - font-weight: bold; - font-size: 12pt; -} - - -/* Availability Bar */ -.availBarLeftCap { - background-image: url("images/availBar/leftCap.png"); - width: 8px; - height: 28px; -} -.availBarRightCap { - background-image: url("images/availBar/rightCap.png"); - width: 8px; - height: 28px; -} - -.availBarUp { - background-image: url("images/availBar/up.png"); - background-repeat: repeat-x; - height: 28px; -} - -.availBarDown { - background: url("images/availBar/down.png") repeat-x; - height: 28px; -} - - - -.GraphTooltip { - background-color:#B5D5FF; - font-weight:bold; - padding:5px; -} - - -/* About Modal Window */ -.DisplayContent,.DisplayLabel { - font-size: 11px; -} - -.DisplayLabel { - font-weight: bold; -} - -.DisplaySubhead { - font-weight: bolder; - font-size: 16px; - color: #DE652D; -} - - -.SubTabButton, -.SubTabButtonOver, -.SubTabButtonFocused, -.SubTabButtonFocusedOver, -.SubTabButtonDown, -.SubTabButtonFocusedDown, -.SubTabButtonSelected, -.SubTabButtonSelectedFocused, -.SubTabButtonSelectedDown, -.SubTabButtonSelectedFocusedDown, -.SubTabButtonSelectedOver, -.SubTabButtonSelectedFocusedOver, -.SubTabButtonDisabled, -.SubTabButtonSelectedDisabled { - font-family: tahoma, verdona, sans-serif; - font-size: 11px; - padding: 2px; - } - -.SubTabButtonDisabled { - -} - -.SubTabButtonDisabled, -.SubTabButtonSelectedDisabled { - font-weight: normal; - color: #AAAAAA; -} - -.SubTabButtonFocused, -.SubTabButtonFocusedOver, -.SubTabButtonSelectedFocused, -.SubTabButtonSelectedFocusedOver, -.SubTabButtonSelectedFocusedDown { - -} - -.SubTabButtonOver, -.SubTabButtonFocusedOver, -.SubTabButtonSelectedFocused, -.SubTabButtonSelectedFocusedOver { - font-weight: bold; -} - -.SubTabButtonDown, -.SubTabButtonFocusedDown, -.SubTabButtonSelectedDown, -.SubTabButtonSelectedFocusedDown { - font-weight: bold; - font-size: 12px; -} - -.SubTabButtonSelected, -.SubTabButtonSelectedFocused, -.SubTabButtonSelectedOver, -.SubTabButtonSelectedFocusedOver, -.SubTabButtonSelectedDisabled { - font-weight: bold; -} - - - -.SimpleButton, -.SimpleButtonOver, -.SimpleButtonFocused, -.SimpleButtonFocusedOver, -.SimpleButtonDown, -.SimpleButtonFocusedDown, -.SimpleButtonSelected, -.SimpleButtonSelectedFocused, -.SimpleButtonSelectedDown, -.SimpleButtonSelectedFocusedDown, -.SimpleButtonSelectedOver, -.SimpleButtonSelectedFocusedOver, -.SimpleButtonDisabled, -.SimpleButtonSelectedDisabled, -.SimpleButtonDisabled, -.SimpleButtonDisabled, -.SimpleButtonSelectedDisabled, -.SimpleButtonFocused, -.SimpleButtonFocusedOver, -.SimpleButtonSelectedFocused, -.SimpleButtonSelectedFocusedOver, -.SimpleButtonSelectedFocusedDown , -.SimpleButtonOver, -.SimpleButtonFocusedOver, -.SimpleButtonSelectedFocused, -.SimpleButtonSelectedFocusedOver , -.SimpleButtonDown, -.SimpleButtonFocusedDown, -.SimpleButtonSelectedDown, -.SimpleButtonSelectedFocusedDown , -.SimpleButtonSelected, -.SimpleButtonSelectedFocused, -.SimpleButtonSelectedOver, -.SimpleButtonSelectedFocusedOver, -.SimpleButtonSelectedDisabled{ - font-family: tahoma, verdana, sans-serif; - font-size: 11px; - padding: 2px; - font-weight: bold; -} - - -.topMenuBar { - background: url('/coregui/org.rhq.coregui.CoreGUI/sc/skins/Enterprise/images/cssButton/button_stretch.png') repeat-x scroll 0 0 #DDDDDD; -} - -.menuButton, .menuButtonOver, .menuButtonDown, .menuButtonDisabled, .menuButtonSelected, .menuButtonSelectedDown, .menuButtonSelectedOver, .menuButtonSelectedDisabled { - border: none !important; - font-weight: bold !important; -} - - - -/** Not used right now **/ -.gwtMenuBar { - background: url('images/header/header_bg.png') repeat-x; - /*background-image: url("http://localhost:7080/coregui/org.rhq.coregui.CoreGUI/sc/skins/Enterprise/im... - padding: 0px; - -moz-box-sizing: border-box; - overflow: hidden; - cursor: auto; -} - -.gwtMenu, .gwt-MenuBarPopup, .gwt-MenuPopup { - background-color: white; -} - -.gwt-MenuItem { - padding: 0 10px; - font-weight: bold; - color: #666666; - font-size: 9pt; -} - -.gwt-MenuItemSeparator { - background-color: #666666; -} - -.gwt-MenuItem-Selected { - background-color: #999999; -} - -.selectedTag { - background-color: lightblue; - padding: 5px; - border: 1px solid darkblue; -} - - -/* This sets table mouse-over highlights to have an alpha component on browsers that support it. - It particularly helps with tables that have bar charts as a background component. - (e.g. problem metrics or call time) -*/ -.tallCellOver, .tallCellOverDark { - background-color: rgb(230,230,230) !important; /* for browsers that don't like alpha */ - background-color: rgba(230,230,230,0.6) !important; -} - -.editableText { - color: #070; -} - -.InfoBlock,.ConfirmationBlock,.WarnBlock,.ErrorBlock,.FatalBlock { - border: 1px solid; - color: #000000; -} - -.InfoBlock,.ConfirmationBlock { - background-color: #BFF1B5; /* light green */ - border-color: #00AC3D; /* medium green */ -} - -.WarnBlock { - background-color: #FFFD99; /* light yellow */ - border-color: #FF9C15; /* medium orange */ -} - -.ErrorBlock { - background-color: #FF9999; /* light red */ - border-color: #EE4444; /* medium red */ -} - -.FatalBlock { - background-color: #FF6666; /* slightly darker light red */ - border-color: #EE1111; /* slightly darker medium red */ -} - -.InlineNote { - color: #C22; -} - -.InlineInfo { - color: #00AC3D; /* medium green */ -} - -.InlineError { - color: #EE4444; /* medium red */ -} - -.log-panel { - z-index: 9999999 !important; -} - -.requiredFieldMarker { - font-weight: bolder; - color: #B77 /* medium red */ -} - -.configurationEditorHeaderCell { - border: 1px solid; - background-color: #EEE; /* light gray */ - font-weight: bolder; -} - -.menuButton, .menuButtonOver, .menuButtonDown, .menuButtonDisabled, .menuButtonSelected, .menuButtonSelectedDown, .menuButtonSelectedOver, .menuButtonSelectedDisabled { - border: none; - font-weight: bold; -} - -.noOutline { - outline:0; -} \ No newline at end of file diff --git a/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html b/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html index f56517f..6a1bbdd 100644 --- a/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html +++ b/modules/enterprise/gui/coregui/src/main/webapp/CoreGUI.html @@ -10,9 +10,9 @@ <!-- support internationalized characters --> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
- <link rel="stylesheet" href="CoreGUI-4.9.0.css"> + <link rel="stylesheet" href="CoreGUI-4.10.0.css"> <!-- for d3 charting --> - <link rel="stylesheet" href="css/charts-4.9.0.css"> + <link rel="stylesheet" href="css/charts-4.10.0.css">
<script type="text/javascript"> var search = location.search; diff --git a/modules/enterprise/gui/coregui/src/main/webapp/css/charts-4.10.0.css b/modules/enterprise/gui/coregui/src/main/webapp/css/charts-4.10.0.css new file mode 100644 index 0000000..6f8df38 --- /dev/null +++ b/modules/enterprise/gui/coregui/src/main/webapp/css/charts-4.10.0.css @@ -0,0 +1,252 @@ +/*** + * CSS for the d3 SVG charts. This is SVG css not HTML css so some elements + * may look different from standard CSS. + * NOTE: the SVG <defs> section that contains gradients etc. is in the + * java class : /org/rhq/coregui/client/inventory/common/ResourceMetricD3Graph.java + * + */ + +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; + shape-rendering: crispEdges; +} + +/* Horizontal gridlines */ + +.grid .tick { + stroke: #f7f7f7; +} + +.y.axis .tick.minor { + stroke: #a7a7ac; +} + +.x.axis .tick.minor { + stroke: #a7a7ac; +} + +.y.axis text, .x.axis text { + font-family: Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: normal; + font-style: normal; + fill: #50505a; + text-rendering: optimize-legibility; + +} + +.x.axis path { + stroke: #50505a; +} + +.y.axis path { + stroke: #50505a; +} + /* Brush related css rules */ +.brush rect.extent { + fill: #0757ff; + fill-opacity: .15; + shape-rendering: crispEdges; +} + +.brush .resize path { + fill: #666; + fill-opacity: .8; + stroke: #000; + stroke-width: 1.5px; +} + +.minLabel, .avgLabel, .highLabel { + font-family: Arial, Verdana, sans-serif; + font-size: 12px; + font-weight: bold; + text-anchor: start; + fill: #003168; + text-rendering: optimize-legibility; +} + +.minText, .avgText, .highText { + font-family: Arial, Verdana, sans-serif; + font-size: 12px; + text-anchor: start; + fill: #003168; + text-rendering: optimize-legibility; +} + +.chartTitleName { + font-family: Arial, Verdana, sans-serif; + font-size: 12px; + font-weight: bold; + fill: #003168; +} +.chartTitleBox { + fill:none; + +} + +rect.high { + fill: #1794bc; +} + +rect.low { + fill: #70c4e2; +} + + + +/* CSS for new Chart Hovers*/ + +#availTooltip { + z-index: 990000; + position: absolute; + width: 150px; + height: auto; + padding: 5px; + background-color: #000; + opacity: 0.8; + -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; +} + +#availTooltip.hidden { + display: none; +} + +#availTooltip div { + margin: 0; + font-family: Arial, Verdana, sans-serif; + font-size: 9px; + color: #d3d3d6; +} + +.availTooltipLabel { + width: 40px; + font-weight: bold; + color: #d3d3d6; +} + +/* 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; +} + +#metricGraphTooltipLabel { + width: 40px; + font-weight: bold; + color: #d3d3d6; +} + +#metricGraphTooltipMaxLabel { + color: #1794BC; +} + +#metricGraphTooltipAvgLabel { + color: #2e376a; +} + +#metricGraphTooltipMinLabel { + color: #70c4e2; +} + +#noDataTooltip { + 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; +} + +#noDataTooltip.hidden { + display: none; +} + +#noDataTooltip div { + margin: 0; + font-family: Arial, Verdana, sans-serif; + font-size: 10px; + color: #d3d3d6; +} + + +#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/charts-4.9.0.css b/modules/enterprise/gui/coregui/src/main/webapp/css/charts-4.9.0.css deleted file mode 100644 index 6f8df38..0000000 --- a/modules/enterprise/gui/coregui/src/main/webapp/css/charts-4.9.0.css +++ /dev/null @@ -1,252 +0,0 @@ -/*** - * CSS for the d3 SVG charts. This is SVG css not HTML css so some elements - * may look different from standard CSS. - * NOTE: the SVG <defs> section that contains gradients etc. is in the - * java class : /org/rhq/coregui/client/inventory/common/ResourceMetricD3Graph.java - * - */ - -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; - shape-rendering: crispEdges; -} - -/* Horizontal gridlines */ - -.grid .tick { - stroke: #f7f7f7; -} - -.y.axis .tick.minor { - stroke: #a7a7ac; -} - -.x.axis .tick.minor { - stroke: #a7a7ac; -} - -.y.axis text, .x.axis text { - font-family: Arial, Helvetica, sans-serif; - font-size: 10px; - font-weight: normal; - font-style: normal; - fill: #50505a; - text-rendering: optimize-legibility; - -} - -.x.axis path { - stroke: #50505a; -} - -.y.axis path { - stroke: #50505a; -} - /* Brush related css rules */ -.brush rect.extent { - fill: #0757ff; - fill-opacity: .15; - shape-rendering: crispEdges; -} - -.brush .resize path { - fill: #666; - fill-opacity: .8; - stroke: #000; - stroke-width: 1.5px; -} - -.minLabel, .avgLabel, .highLabel { - font-family: Arial, Verdana, sans-serif; - font-size: 12px; - font-weight: bold; - text-anchor: start; - fill: #003168; - text-rendering: optimize-legibility; -} - -.minText, .avgText, .highText { - font-family: Arial, Verdana, sans-serif; - font-size: 12px; - text-anchor: start; - fill: #003168; - text-rendering: optimize-legibility; -} - -.chartTitleName { - font-family: Arial, Verdana, sans-serif; - font-size: 12px; - font-weight: bold; - fill: #003168; -} -.chartTitleBox { - fill:none; - -} - -rect.high { - fill: #1794bc; -} - -rect.low { - fill: #70c4e2; -} - - - -/* CSS for new Chart Hovers*/ - -#availTooltip { - z-index: 990000; - position: absolute; - width: 150px; - height: auto; - padding: 5px; - background-color: #000; - opacity: 0.8; - -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; -} - -#availTooltip.hidden { - display: none; -} - -#availTooltip div { - margin: 0; - font-family: Arial, Verdana, sans-serif; - font-size: 9px; - color: #d3d3d6; -} - -.availTooltipLabel { - width: 40px; - font-weight: bold; - color: #d3d3d6; -} - -/* 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; -} - -#metricGraphTooltipLabel { - width: 40px; - font-weight: bold; - color: #d3d3d6; -} - -#metricGraphTooltipMaxLabel { - color: #1794BC; -} - -#metricGraphTooltipAvgLabel { - color: #2e376a; -} - -#metricGraphTooltipMinLabel { - color: #70c4e2; -} - -#noDataTooltip { - 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; -} - -#noDataTooltip.hidden { - display: none; -} - -#noDataTooltip div { - margin: 0; - font-family: Arial, Verdana, sans-serif; - font-size: 10px; - color: #d3d3d6; -} - - -#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/js/rhq-4.10.0.js b/modules/enterprise/gui/coregui/src/main/webapp/js/rhq-4.10.0.js new file mode 100644 index 0000000..50839d7 --- /dev/null +++ b/modules/enterprise/gui/coregui/src/main/webapp/js/rhq-4.10.0.js @@ -0,0 +1,189 @@ +/** + * RHQ Charting Javascript Functions. + */ + +/** + * ChartContext Constructor Object + * Contains all of the data required to render a chart. + * A ChartContext can be passed to multiple chart renders to display different chart types + * of that data. + * @param chartId + * @param chartHeight + * @param metricsData + * @param xAxisLabel + * @param chartTitle + * @param yAxisUnits + * @param minChartTitle + * @param avgChartTitle + * @param peakChartTitle + * @param dateLabel + * @param timeLabel + * @param downLabel + * @param unknownLabel + * @param noDataLabel + * @param hoverStartLabel + * @param hoverEndLabel + * @param hoverPeriodLabel + * @param hoverBarLabel + * @param chartHoverTimeFormat + * @param chartHoverDateFormat + * @param isPortalGraph + * @param portalId + * @param buttonBarDateTimeFormat + * @param singleValueLabel + * @param chartXaxisTimeFormatHours + * @param chartXaxisTimeFormatHoursMinutes + * @param hideLegend + * @param chartAverage + * @param chartMin + * @param chartMax + * @constructor + */ +var ChartContext = function (chartId, chartHeight, metricsData, xAxisLabel, chartTitle, yAxisUnits, minChartTitle, avgChartTitle, peakChartTitle, dateLabel, timeLabel, downLabel, unknownLabel, noDataLabel, hoverStartLabel, hoverEndLabel, hoverPeriodLabel, hoverBarLabel, chartHoverTimeFormat, chartHoverDateFormat, isPortalGraph, portalId, buttonBarDateTimeFormat, singleValueLabel, chartXaxisTimeFormatHours, chartXaxisTimeFormatHoursMinutes, hideLegend, chartAverage, chartMin, chartMax) { + "use strict"; + if (!(this instanceof ChartContext)) { + throw new Error("ChartContext function cannot be called as a function."); + } + this.chartId = chartId; + this.chartHeight = chartHeight; + this.data = jQuery.parseJSON(metricsData); // make into json + this.xAxisLabel = xAxisLabel; + this.chartTitle = chartTitle; + this.yAxisUnits = yAxisUnits; + this.minChartTitle = minChartTitle; + this.avgChartTitle = avgChartTitle; + this.peakChartTitle = peakChartTitle; + this.dateLabel = dateLabel; + this.timeLabel = timeLabel; + this.downLabel = downLabel; + this.unknownLabel = unknownLabel; + this.singleValueLabel = singleValueLabel; + this.noDataLabel = noDataLabel; + this.hoverStartLabel = hoverStartLabel; + this.hoverEndLabel = hoverEndLabel; + this.hoverPeriodLabel = hoverPeriodLabel; + this.hoverBarLabel = hoverBarLabel; + this.chartHoverTimeFormat = chartHoverTimeFormat; + this.chartHoverDateFormat = chartHoverDateFormat; + this.isPortalGraph = isPortalGraph; + this.portalId = portalId; + if (isPortalGraph) { + this.chartHandle = "rChart-" + chartId + "-" + portalId; + } + else { + this.chartHandle = "rChart-" + chartId; + } + this.chartSelection = this.chartHandle + " svg"; + this.buttonBarDateTimeFormat = buttonBarDateTimeFormat; + this.chartXaxisTimeFormatHours = chartXaxisTimeFormatHours; + this.chartXaxisTimeFormatHoursMinutes = chartXaxisTimeFormatHoursMinutes; + this.hideLegend = hideLegend; + this.chartAverage = chartAverage; + this.chartMin = chartMin; + this.chartMax = chartMax; + + }, + /** + * Availability Context object constructor + * @param chartId + * @param availData + * @param dateLabel + * @param timeLabel + * @param hoverStartLabel + * @param hoverBarLabel + * @param availabilityLabel + * @param chartHoverTimeFormat + * @param chartHoverDateFormat + * @param chartTitle + * @param chartUpLabel + * @param chartDownLabel + * @param chartXaxisTimeFormatHours + * @param chartXaxisTimeFormatHoursMinutes + * @constructor + */ + AvailChartContext = function (chartId, availData, dateLabel, timeLabel, hoverStartLabel, hoverBarLabel, availabilityLabel, chartHoverTimeFormat, chartHoverDateFormat, chartTitle, chartUpLabel, chartDownLabel, chartXaxisTimeFormatHours, chartXaxisTimeFormatHoursMinutes) { + "use strict"; + if (!(this instanceof AvailChartContext)) { + throw new Error("AvailChartContext function cannot be called as a function."); + } + this.chartId = chartId; + this.chartHandle = "#availChart-" + this.chartId; + this.chartSelection = this.chartHandle + " svg"; + this.data = jQuery.parseJSON(availData); // make into json + this.dateLabel = dateLabel; + this.timeLabel = timeLabel; + this.hoverStartLabel = hoverStartLabel; + this.hoverBarLabel = hoverBarLabel; + this.hoverBarAvailabilityLabel = availabilityLabel; + this.chartHoverTimeFormat = chartHoverTimeFormat; + this.chartHoverDateFormat = chartHoverDateFormat; + this.chartTitle = chartTitle; + this.chartDownLabel = chartDownLabel; + this.chartUpLabel = chartUpLabel; + this.chartXaxisTimeFormatHours = chartXaxisTimeFormatHours; + this.chartXaxisTimeFormatHoursMinutes = chartXaxisTimeFormatHoursMinutes; + + }, + + /** + * GraphDateContext object constructor. + * @param startDate moment object representing startDate range + * @param endDate moment object representing endDate range + * @constructor + */ + GraphDateContext = function (startDate, endDate) { + "use strict"; + if (!(this instanceof GraphDateContext)) { + throw new Error("GraphDateContext function cannot be called as a function."); + } + this.startDate = startDate; + this.endDate = endDate; + }, + rhqCommon = (function () { + "use strict"; + + + var timeFormat = function (formats) { + return function(date) { + var i = formats.length - 1, f = formats[i]; + while (!f[1](date)) f = formats[--i]; + return f[0](date); + }; + }; + + return { + getD3CustomTimeFormat: function (xAxisTimeFormatHours, xAxisTimeFormatHoursMinutes) { + return timeFormat([ + [d3.time.format("%Y"), function () { + return true; + }], + [d3.time.format("%B"), function (d) { + return d.getMonth(); + }], + [d3.time.format("%b %d"), function (d) { + return d.getDate() != 1; + }], + [d3.time.format("%a %d"), function (d) { + return d.getDay() && d.getDate() != 1; + }], + [d3.time.format(xAxisTimeFormatHours), function (d) { + return d.getHours(); + }], + [d3.time.format(xAxisTimeFormatHoursMinutes), function (d) { + return d.getMinutes(); + }], + [d3.time.format(":%S"), function (d) { + return d.getSeconds(); + }], + [d3.time.format(".%L"), function (d) { + return d.getMilliseconds(); + }] + ]); + } + + }; + })(); + + + + diff --git a/modules/enterprise/gui/coregui/src/main/webapp/js/rhq-4.9.0.js b/modules/enterprise/gui/coregui/src/main/webapp/js/rhq-4.9.0.js deleted file mode 100644 index 7e89bb1..0000000 --- a/modules/enterprise/gui/coregui/src/main/webapp/js/rhq-4.9.0.js +++ /dev/null @@ -1,183 +0,0 @@ -/** - * RHQ Charting Javascript Functions. - */ - -/** - * ChartContext Constructor Object - * Contains all of the data required to render a chart. - * A ChartContext can be passed to multiple chart renders to display different chart types - * of that data. - * @param chartId - * @param chartHeight - * @param metricsData - * @param xAxisLabel - * @param chartTitle - * @param yAxisUnits - * @param minChartTitle - * @param avgChartTitle - * @param peakChartTitle - * @param dateLabel - * @param timeLabel - * @param downLabel - * @param unknownLabel - * @param noDataLabel - * @param hoverStartLabel - * @param hoverEndLabel - * @param hoverPeriodLabel - * @param hoverBarLabel - * @param chartHoverTimeFormat - * @param chartHoverDateFormat - * @param isPortalGraph - * @param portalId - * @param buttonBarDateTimeFormat - * @param singleValueLabel - * @param chartXaxisTimeFormatHours - * @param chartXaxisTimeFormatHoursMinutes - * @param hideLegend - * @constructor - */ -var ChartContext = function (chartId, chartHeight, metricsData, xAxisLabel, chartTitle, yAxisUnits, minChartTitle, avgChartTitle, peakChartTitle, dateLabel, timeLabel, downLabel, unknownLabel, noDataLabel, hoverStartLabel, hoverEndLabel, hoverPeriodLabel, hoverBarLabel, chartHoverTimeFormat, chartHoverDateFormat, isPortalGraph, portalId, buttonBarDateTimeFormat, singleValueLabel, chartXaxisTimeFormatHours, chartXaxisTimeFormatHoursMinutes, hideLegend) { - "use strict"; - if (!(this instanceof ChartContext)) { - throw new Error("ChartContext function cannot be called as a function."); - } - this.chartId = chartId; - this.chartHeight = chartHeight; - this.data = jQuery.parseJSON(metricsData); // make into json - this.xAxisLabel = xAxisLabel; - this.chartTitle = chartTitle; - this.yAxisUnits = yAxisUnits; - this.minChartTitle = minChartTitle; - this.avgChartTitle = avgChartTitle; - this.peakChartTitle = peakChartTitle; - this.dateLabel = dateLabel; - this.timeLabel = timeLabel; - this.downLabel = downLabel; - this.unknownLabel = unknownLabel; - this.singleValueLabel = singleValueLabel; - this.noDataLabel = noDataLabel; - this.hoverStartLabel = hoverStartLabel; - this.hoverEndLabel = hoverEndLabel; - this.hoverPeriodLabel = hoverPeriodLabel; - this.hoverBarLabel = hoverBarLabel; - this.chartHoverTimeFormat = chartHoverTimeFormat; - this.chartHoverDateFormat = chartHoverDateFormat; - this.isPortalGraph = isPortalGraph; - this.portalId = portalId; - if (isPortalGraph) { - this.chartHandle = "rChart-" + chartId + "-" + portalId; - } - else { - this.chartHandle = "rChart-" + chartId; - } - this.chartSelection = this.chartHandle + " svg"; - this.buttonBarDateTimeFormat = buttonBarDateTimeFormat; - this.chartXaxisTimeFormatHours = chartXaxisTimeFormatHours; - this.chartXaxisTimeFormatHoursMinutes = chartXaxisTimeFormatHoursMinutes; - this.hideLegend = hideLegend; - - }, - /** - * Availability Context object constructor - * @param chartId - * @param availData - * @param dateLabel - * @param timeLabel - * @param hoverStartLabel - * @param hoverBarLabel - * @param availabilityLabel - * @param chartHoverTimeFormat - * @param chartHoverDateFormat - * @param chartTitle - * @param chartUpLabel - * @param chartDownLabel - * @param chartXaxisTimeFormatHours - * @param chartXaxisTimeFormatHoursMinutes - * @constructor - */ - AvailChartContext = function (chartId, availData, dateLabel, timeLabel, hoverStartLabel, hoverBarLabel, availabilityLabel, chartHoverTimeFormat, chartHoverDateFormat, chartTitle, chartUpLabel, chartDownLabel, chartXaxisTimeFormatHours, chartXaxisTimeFormatHoursMinutes) { - "use strict"; - if (!(this instanceof AvailChartContext)) { - throw new Error("AvailChartContext function cannot be called as a function."); - } - this.chartId = chartId; - this.chartHandle = "#availChart-" + this.chartId; - this.chartSelection = this.chartHandle + " svg"; - this.data = jQuery.parseJSON(availData); // make into json - this.dateLabel = dateLabel; - this.timeLabel = timeLabel; - this.hoverStartLabel = hoverStartLabel; - this.hoverBarLabel = hoverBarLabel; - this.hoverBarAvailabilityLabel = availabilityLabel; - this.chartHoverTimeFormat = chartHoverTimeFormat; - this.chartHoverDateFormat = chartHoverDateFormat; - this.chartTitle = chartTitle; - this.chartDownLabel = chartDownLabel; - this.chartUpLabel = chartUpLabel; - this.chartXaxisTimeFormatHours = chartXaxisTimeFormatHours; - this.chartXaxisTimeFormatHoursMinutes = chartXaxisTimeFormatHoursMinutes; - - }, - - /** - * GraphDateContext object constructor. - * @param startDate moment object representing startDate range - * @param endDate moment object representing endDate range - * @constructor - */ - GraphDateContext = function (startDate, endDate) { - "use strict"; - if (!(this instanceof GraphDateContext)) { - throw new Error("GraphDateContext function cannot be called as a function."); - } - this.startDate = startDate; - this.endDate = endDate; - }, - rhqCommon = (function () { - "use strict"; - - - var timeFormat = function (formats) { - return function(date) { - var i = formats.length - 1, f = formats[i]; - while (!f[1](date)) f = formats[--i]; - return f[0](date); - }; - }; - - return { - getD3CustomTimeFormat: function (xAxisTimeFormatHours, xAxisTimeFormatHoursMinutes) { - return timeFormat([ - [d3.time.format("%Y"), function () { - return true; - }], - [d3.time.format("%B"), function (d) { - return d.getMonth(); - }], - [d3.time.format("%b %d"), function (d) { - return d.getDate() != 1; - }], - [d3.time.format("%a %d"), function (d) { - return d.getDay() && d.getDate() != 1; - }], - [d3.time.format(xAxisTimeFormatHours), function (d) { - return d.getHours(); - }], - [d3.time.format(xAxisTimeFormatHoursMinutes), function (d) { - return d.getMinutes(); - }], - [d3.time.format(":%S"), function (d) { - return d.getSeconds(); - }], - [d3.time.format(".%L"), function (d) { - return d.getMilliseconds(); - }] - ]); - } - - }; - })(); - - - -
rhq-commits@lists.fedorahosted.org