mirror of https://gitee.com/bigwinds/arangodb
cluster view charts update
This commit is contained in:
parent
1290c1230c
commit
5cf1c1aa3c
|
@ -54,7 +54,7 @@
|
|||
<div class="pure-u-1-1 pure-u-md-12-24 pure-u-lg-6-24">
|
||||
<div class="graphWrapper">
|
||||
<div id='clusterAverage'></div>
|
||||
<div class="graphLabel">TRANSFER SIZE</div>
|
||||
<div class="graphLabel">AVG Request Time</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -284,7 +284,7 @@
|
|||
self.chartsOptions[1].options[0].values.push({x:time, y: self.calcTotalHttp(data.http, key)});
|
||||
|
||||
//AVERAGE
|
||||
self.chartsOptions[2].options[0].values.push({x:time, y: data.avgRequestTime[key]});
|
||||
self.chartsOptions[2].options[0].values.push({x:time, y: data.avgRequestTime[key] / self.coordinators.length});
|
||||
});
|
||||
self.historyInit = true;
|
||||
}
|
||||
|
@ -308,16 +308,16 @@
|
|||
//AVERAGE
|
||||
self.chartsOptions[2].options[0].values.push({
|
||||
x: data.times[data.times.length - 1],
|
||||
y: data.avgRequestTime[data.bytesSentPerSecond.length - 1]
|
||||
y: data.avgRequestTime[data.bytesSentPerSecond.length - 1] / self.coordinators.length
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
chartsOptions: [
|
||||
{
|
||||
id: "#clusterData",
|
||||
type: 'bytes',
|
||||
count: 2,
|
||||
options: [
|
||||
{
|
||||
|
@ -340,6 +340,7 @@
|
|||
},
|
||||
{
|
||||
id: "#clusterHttp",
|
||||
type: 'bytes',
|
||||
options: [{
|
||||
area: true,
|
||||
values: [],
|
||||
|
@ -351,10 +352,11 @@
|
|||
{
|
||||
id: "#clusterAverage",
|
||||
data: [],
|
||||
type: 'seconds',
|
||||
options: [{
|
||||
area: true,
|
||||
values: [],
|
||||
key: "Bytes",
|
||||
key: "Seconds",
|
||||
color: "rgb(243, 156, 18)",
|
||||
fillOpacity: 0.1
|
||||
}]
|
||||
|
@ -392,11 +394,22 @@
|
|||
self.charts[c.id].yAxis
|
||||
.axisLabel('')
|
||||
.tickFormat(function(d) {
|
||||
if (d === null) {
|
||||
return 'N/A';
|
||||
var formatted;
|
||||
|
||||
if (c.type === 'bytes') {
|
||||
if (d === null) {
|
||||
return 'N/A';
|
||||
}
|
||||
formatted = parseFloat(d3.format(".2f")(d));
|
||||
return prettyBytes(formatted);
|
||||
}
|
||||
else if (c.type === 'seconds') {
|
||||
if (d === null) {
|
||||
return 'N/A';
|
||||
}
|
||||
formatted = parseFloat(d3.format(".2f")(d));
|
||||
return formatted;
|
||||
}
|
||||
var formatted = parseFloat(d3.format(".2f")(d));
|
||||
return prettyBytes(formatted);
|
||||
});
|
||||
|
||||
var data, lines = self.returnGraphOptions(c.id);
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
}.bind(this);
|
||||
|
||||
var cb = function() {
|
||||
console.log("node complete");
|
||||
console.log("");
|
||||
};
|
||||
|
||||
if (!this.initCoordDone) {
|
||||
|
|
Loading…
Reference in New Issue