1
0
Fork 0

dashboard refactoring

This commit is contained in:
scottashton 2014-04-14 17:45:32 +02:00
parent 5eb28e2468
commit 388787c717
1 changed files with 7 additions and 3 deletions

View File

@ -53,7 +53,8 @@
var self = this;
console.log(e);
var figure = $(e.currentTarget).attr("id").replace(/ChartContainer/g, "");
var figure = $(e.currentTarget).attr("id").replace(/DistributionContainer/g, "");
figure = figure.replace(/DistributionContainer/g, "");
figure = figure.replace(/Container/g, "");
console.log(figure);
this.getStatistics(figure);
var options = this.dygraphConfig.getDetailChartConfig(figure);
@ -191,11 +192,14 @@
});
},
mergeHistory: function (newData) {
mergeHistory: function (newData, detailMode) {
var self = this, i;
for (i = 0; i < newData.times.length; ++i) {
this.mergeDygraphHistory(newData, i);
}
if (detailMode) {
return;
}
Object.keys(this.tendencies).forEach(function (a) {
if (a === "virtualSizeCurrent" ||
a === "virtualSizeAverage") {
@ -290,7 +294,7 @@
).done(
function (d) {
console.log("got result", d);
self.mergeHistory(d);
self.mergeHistory(d, !!figure);
}
);