Commit 5b6a2378 authored by Sven Franck's avatar Sven Franck

fixed results graph, except for colors

parent 2a25da18
...@@ -3,14 +3,14 @@ article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,su ...@@ -3,14 +3,14 @@ article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,su
/* splash */ /* splash */
.ui-mobile-rendering > * { visibility:visible!important; /* no need */} .ui-mobile-rendering > * { visibility:visible!important; /* no need */}
/*
.splash:before { width: 100%; position: absolute; top: 0; bottom: 0; left: 0; right: 0; display: block; height: 115%; z-index: 999999; background-color: white; content: "offline version initializing..."; text-align: center; color: #bbb; text-shadow: none; line-height: 150px; vertical-align: bottom; } .splash:before { width: 100%; position: absolute; top: 0; bottom: 0; left: 0; right: 0; display: block; height: 115%; z-index: 999999; background-color: white; content: "offline version initializing..."; text-align: center; color: #bbb; text-shadow: none; line-height: 150px; vertical-align: bottom; }
*/
/* webfonts /* webfonts
* { font-family: "Open Sans",Arial; font-size: 14.5px; } */ * { font-family: "Open Sans",Arial; font-size: 14.5px; } */
h1,h2,h3,h4, .ui-btn-inner{ font-weight: 400; } h1,h2,h3,h4, .ui-btn-inner{ font-weight: 400; }
/* custom layouting */ /* custom layouting */
.ui-title { .ui-title {
color: white; color: white;
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
</div> </div>
</div> </div>
<div class="ui-block-b"> <div class="ui-block-b">
<div class="ui-body ui-body-d ui-corner-all ui-shadow" style="padding:1em;"> <!--<div class="ui-body ui-body-d ui-corner-all ui-shadow" style="padding:1em;">
<div id="map_canvas_1"></div> <div id="map_canvas_1"></div>
<p class="mapControls"> <p class="mapControls">
<label for="from">From</label> <label for="from">From</label>
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<div class="ui-li ui-li-divider ui-btn ui-bar-a ui-corner-bottom ui-btn-up-undefined"></div> <div class="ui-li ui-li-divider ui-btn ui-bar-a ui-corner-bottom ui-btn-up-undefined"></div>
</div> </div>
</div> </div>
</div> </div>-->
</div> </div>
<script type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">
......
...@@ -223,7 +223,6 @@ ...@@ -223,7 +223,6 @@
} }
} }
colorObject.series_colors = colorArray; colorObject.series_colors = colorArray;
//add rest, too... //add rest, too...
if (axis === "log") { if (axis === "log") {
colorObject.yaxis = "yaxis"; colorObject.yaxis = "yaxis";
...@@ -231,7 +230,6 @@ ...@@ -231,7 +230,6 @@
colorObject.yaxis = "y2axis"; colorObject.yaxis = "y2axis";
} }
colorObject.legend = "#ccc"; colorObject.legend = "#ccc";
return colorObject; return colorObject;
}, },
...@@ -466,7 +464,7 @@ ...@@ -466,7 +464,7 @@
machine_price, machine_price,
machine_py, machine_py,
machine_sql, machine_sql,
machine_currency = "$", machine_currency,
machine_performance_unit = "s", machine_performance_unit = "s",
opts = "", opts = "",
t = getTemplate(use_template, template_library); t = getTemplate(use_template, template_library);
...@@ -484,6 +482,9 @@ ...@@ -484,6 +482,9 @@
// set values for table row // set values for table row
for (i = 0; i < response.length; i += 1) { for (i = 0; i < response.length; i += 1) {
entry = response[i]; entry = response[i];
machine_currency = "$";
machine_price = $.fn.fauna.pricing[entry["_id"]]
if (entry["provider"] !== "") { if (entry["provider"] !== "") {
machine_alias = entry["provider"]; machine_alias = entry["provider"];
machine_img = "../img/providers/" + entry["provider"].toLowerCase() + ".png"; machine_img = "../img/providers/" + entry["provider"].toLowerCase() + ".png";
...@@ -507,8 +508,6 @@ ...@@ -507,8 +508,6 @@
if ($.fn.fauna.pricing[entry["_id"]] === 0 || if ($.fn.fauna.pricing[entry["_id"]] === 0 ||
$.fn.fauna.pricing[entry["_id"]] === undefined) { $.fn.fauna.pricing[entry["_id"]] === undefined) {
machine_price = "n/a" machine_price = "n/a"
} else {
machine_price = $.fn.fauna.pricing[entry["_id"]]
} }
if (machine_price === "n/a") { if (machine_price === "n/a") {
machine_currency = ""; machine_currency = "";
...@@ -520,6 +519,7 @@ ...@@ -520,6 +519,7 @@
.replace(stored_regex.re_img_path, machine_img) .replace(stored_regex.re_img_path, machine_img)
.replace(stored_regex.re_percentile , roundNumber(entry["percentile"])) .replace(stored_regex.re_percentile , roundNumber(entry["percentile"]))
.replace(stored_regex.re_comp, entry["_id"]) .replace(stored_regex.re_comp, entry["_id"])
.replace(stored_regex.re_alias, machine_name)
.replace(stored_regex.re_price, machine_price) .replace(stored_regex.re_price, machine_price)
.replace(stored_regex.re_currency, machine_currency) .replace(stored_regex.re_currency, machine_currency)
.replace(stored_regex.re_py, machine_py) .replace(stored_regex.re_py, machine_py)
...@@ -580,13 +580,10 @@ ...@@ -580,13 +580,10 @@
// create data series arrays from available info // create data series arrays from available info
for (i = 0; i < response.length; i += 1) { for (i = 0; i < response.length; i += 1) {
entry = response[i]; entry = response[i];
if (entry["provider"] === "") { if (entry["provider"] !== "") {
series_providers.push("n/a");
} else {
series_providers.push(entry["provider"]); series_providers.push(entry["provider"]);
} series_availability.push( roundNumber(entry["percentile"]/100) )
series_availability.push( roundNumber(entry["percentile"]) ) series_cost.push( $.fn.fauna.pricing[entry["_id"]] || entry["cost"] || 0 );
series_cost.push( entry["cost"] || 0 );
// we could jio.get, but it takes to long to create an array // we could jio.get, but it takes to long to create an array
// looping over matching jIO records. Only use the performance // looping over matching jIO records. Only use the performance
...@@ -599,6 +596,7 @@ ...@@ -599,6 +596,7 @@
series_sql.push(0); series_sql.push(0);
} }
} }
}
// override barWidth for single results // override barWidth for single results
if (series_availability.length === 1) { if (series_availability.length === 1) {
...@@ -630,14 +628,14 @@ ...@@ -630,14 +628,14 @@
.append( $('<tr><td colspan="5"><div id="graph_container_cell"></div></td></tr>') ) .append( $('<tr><td colspan="5"><div id="graph_container_cell"></div></td></tr>') )
plotOpts = { plotOpts = {
title: 'System Availability/Cost', // title: 'Performance Benchmarks',
seriesDefaults:{ seriesDefaults:{
renderer:$.jqplot.BarRenderer, renderer:$.jqplot.BarRenderer,
rendererOptions:{ varyBarColor : true, barWidth: useBarWidth } rendererOptions:{ varyBarColor : true, barWidth: useBarWidth }
}, },
tickDefaults: { tickDefaults: {
syncTicks: true, syncTicks: true,
//useSeriesColor: true, useSeriesColor: true,
autoscale: true, autoscale: true,
alignTicks: true, alignTicks: true,
forceTickAt0: true forceTickAt0: true
...@@ -645,29 +643,38 @@ ...@@ -645,29 +643,38 @@
axes: { axes: {
xaxis: config_xaxis, xaxis: config_xaxis,
yaxis:{ yaxis:{
label:'Log Scale', label:'Performance (s)',
renderer:$.jqplot.LogAxisRenderer, renderer:$.jqplot.LogAxisRenderer,
// rendererOptions: { tickDistribution: "power" }, // rendererOptions: { tickDistribution: "power" },
// max: 100, // max: 1200,
// renderer: $.jqplot.CategoryAxisRenderer, // renderer: $.jqplot.CategoryAxisRenderer,
// tickSpacing: 50, // tickSpacing: 50,
// ticks: [[0],[90],[93],[96],[99],[99.3],[99.6],[99.7],[99.8],[99.9],[100]], // ticks: [[0],[90],[93],[96],[99],[99.3],[99.6],[99.7],[99.8],[99.9],[100]],
// autoscale: true, // autoscale: true,
// showLabel: false // showLabel: false
// autoscale: true
}, },
y2axis:{ y2axis:{
label: 'Normal Scale', label: 'Uptime (%), Cost($/h)',
//renderer: $.jqplot.CategoryAxisRenderer, // renderer: $.jqplot.CategoryAxisRenderer,
//autoscale:true, //btickSpacing: 50,
// min: 0,
// ticks: [[0],[0.05],[0.1],[0.25],[0.50],[0.990],[0.992],[0.994],[0.996],[0.998],[1.00]],
// autoscale:true,
// min: 0,
// max: 1000
} }
}, },
highlighter: { show: false }, highlighter: { show: false },
legend: { show: true, location: 'outsideGrid' } legend: {
show: true,
placement: 'outsideGrid'
}
}; };
// y-axis - only add series, if columntoggle is checked // y-axis - only add series, if columntoggle is checked
// needs to be set after defining object to update accordingly // needs to be set after defining object to update accordingly
// TODO: not generic, this is crap... // TODO: not generic.. redo...
for (i = 0; i < toggle_inputs.length; i += 1) { for (i = 0; i < toggle_inputs.length; i += 1) {
if (toggle_inputs[i].checked) { if (toggle_inputs[i].checked) {
switch (i) { switch (i) {
...@@ -681,13 +688,13 @@ ...@@ -681,13 +688,13 @@
// 0-5 // 0-5
plotSeries.push(series_py); plotSeries.push(series_py);
plotLables.push("PyStone"); plotLables.push("PyStone");
series_colors.push(makeColors(series_py, "min", "norm")); series_colors.push(makeColors(series_py, "min", "log"));
break; break;
case 4: case 4:
// 0-700 // 0-700
plotSeries.push(series_sql); plotSeries.push(series_sql);
plotLables.push("SQLBench"); plotLables.push("SQLBench");
series_colors.push(makeColors(series_sql, "min", "norm")); series_colors.push(makeColors(series_sql, "min", "log"));
break; break;
case 5: case 5:
// 0-1 // 0-1
...@@ -700,9 +707,9 @@ ...@@ -700,9 +707,9 @@
} }
plotOpts.legend.labels = plotLables; plotOpts.legend.labels = plotLables;
plotOpts.series = series_colors; plotOpts.series = series_colors;
console.log(series_colors);
console.log(plotOpts); // now we plot - only if a series is shown
// now we plot if (plotSeries.length !== 0) {
plot1 = $.jqplot('graph_container_cell', plotSeries, plotOpts); plot1 = $.jqplot('graph_container_cell', plotSeries, plotOpts);
// add i18n attributes // add i18n attributes
...@@ -735,6 +742,7 @@ ...@@ -735,6 +742,7 @@
plot1.replot( plotOpts, { resetAxes: true }); plot1.replot( plotOpts, { resetAxes: true });
}); });
} }
}
); );
} }
); );
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
"fr": "Français" "fr": "Français"
}, },
"show_all":"Alle anzeigen", "show_all":"Alle anzeigen",
"found": "Gefundene Provider:", "found": "Passende Systemkonfigurationen:",
"please_select": "Bitte wählen", "please_select": "Bitte wählen",
"all": "Alle anzeigen", "all": "Alle anzeigen",
"criteria": "Kriterien:", "criteria": "Kriterien:",
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
"providers_info":"Informationen über die jeweiligen Anbieter aufrufen", "providers_info":"Informationen über die jeweiligen Anbieter aufrufen",
"monitoring":"Monitoring", "monitoring":"Monitoring",
"monitoring_info":"Information zur Datenerhebung", "monitoring_info":"Information zur Datenerhebung",
"sys_vs_cost": "Systemverfügbarkeit/Kosten" "sys_vs_cost": "Übersicht Performance"
}, },
"pages": { "pages": {
"titles": { "titles": {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
"fr": "Français" "fr": "Français"
}, },
"show_all":"Show all", "show_all":"Show all",
"found": "Providers found:", "found": "Matching configurations:",
"please_select": "Please select", "please_select": "Please select",
"all": "Show all", "all": "Show all",
"criteria": "Criteria:", "criteria": "Criteria:",
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
"providers_info":"More information on the monitored providers", "providers_info":"More information on the monitored providers",
"monitoring":"Monitoring", "monitoring":"Monitoring",
"monitoring_info":"Information on how data is being gathered", "monitoring_info":"Information on how data is being gathered",
"sys_vs_cost": "System Availability/Cost" "sys_vs_cost": "Performance Benchmark"
}, },
"pages": { "pages": {
"titles": { "titles": {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
"fr": "Français" "fr": "Français"
}, },
"show_all":"Montrer tout", "show_all":"Montrer tout",
"found": "Fournisseur trouvés:", "found": "Correspondant à la configuration:",
"please_select": "Sélectionner", "please_select": "Sélectionner",
"all": "Montrer Tout", "all": "Montrer Tout",
"criteria": "Critères:", "criteria": "Critères:",
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
"providers_info":"Plus d'informations sur les fournisseurs surveillés.", "providers_info":"Plus d'informations sur les fournisseurs surveillés.",
"monitoring":"Méthodologie", "monitoring":"Méthodologie",
"monitoring_info":"Informations sur la façon dont les données sont recueillies.", "monitoring_info":"Informations sur la façon dont les données sont recueillies.",
"sys_vs_cost": "Disponibilité/Frais" "sys_vs_cost": "Critères de Performance"
}, },
"pages": { "pages": {
"titles": { "titles": {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment