2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 04:36:36 +00:00

statistics2: remove FHEM release chart, move "Last FHEM update" chart to first tab, extend "Last FHEM update" pie with installations >1year

git-svn-id: https://svn.fhem.de/fhem/trunk@14695 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
markusbloch 2017-07-12 20:05:52 +00:00
parent c6cabc1326
commit ed71429403
3 changed files with 8 additions and 13 deletions

View File

@ -66,7 +66,7 @@ function drawGooglePieChart(data, el, subst, sort="byKey") {
legend: {position: 'right',labeledValueText: 'both'},
pieSliceText: 'none',
height: 350,
sliceVisibilityThreshold: 0.005
sliceVisibilityThreshold: 0.004
};
var container = document.getElementById(id);
@ -329,12 +329,11 @@ function onSuccess(data, textStatus, jqXHR) {
drawGoogleWorldMap(data.data.geo.countrycode,$("div#maptab-world"));
// draw google pie charts
drawGooglePieChart(data.data.system.release, $("div#versiontab-FHEM"));
drawGooglePieChart(data.data.system.os, $("div#versiontab-os"), {"linux":"Linux","MSWin32":"Windows","darwin":"MacOS"}, "byValue");
drawGooglePieChart(data.data.system.perl, $("div#versiontab-perl"));
delete data.data.system.age.unknown; // don't display unknown update age systems
drawGooglePieChart(data.data.system.age, $("div#versiontab-update"), {"0":"≤ 1 day", "7": "1 day - 1 week", "30": "1 week - 1 month", "180": "1 month - 6 months", "365": "> 6 months"}, false);
drawGooglePieChart(data.data.system.age, $("div#versiontab-update"), {"0":"≤ 1 day", "7": "1 day - 1 week", "30": "1 week - 1 month", "180": "1 month - 6 months", "365": "6 months - 1 year", "999": "> 1 year"}, false);
// create module table
createModulTable(data.data.modules,data.data.models, $("table#module-table"));

View File

@ -51,22 +51,19 @@
</div>
<h3>Used versions</h3>
<h3>Installation Data</h3>
<div id="maptab" class="tabs">
<ul>
<li><a href="#versiontab-FHEM">FHEM-Release</a></li>
<li><a href="#versiontab-update">Last FHEM update</a></li>
<li><a href="#versiontab-perl">Perl</a></li>
<li><a href="#versiontab-os">OS</a></li>
<li><a href="#versiontab-update">Last FHEM update</a></li>
</ul>
<div id="versiontab-FHEM">
<div id="versiontab-update">
</div>
<div id="versiontab-perl">
</div>
<div id="versiontab-os">
</div>
<div id="versiontab-update">
</div>
</div>
<h3>Used FHEM moduls</h3>

View File

@ -206,10 +206,9 @@ sub doAggregate() {
$countAll{'system'}{'age'}{'7'}++ if ($age > 1 && $age <= 7);
$countAll{'system'}{'age'}{'30'}++ if ($age > 7 && $age <= 30);
$countAll{'system'}{'age'}{'180'}++ if ($age > 30 && $age <= 180);
$countAll{'system'}{'age'}{'365'}++ if ($age > 180);
} else {
$countAll{'system'}{'age'}{'unknown'}++;
}
$countAll{'system'}{'age'}{'365'}++ if ($age > 180 && $age <= 366);
$countAll{'system'}{'age'}{'999'}++ if ($age > 366);
}
$res = undef;