statistics2: center alignment of model counter values

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@14624 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
markusbloch 2017-07-02 12:09:42 +00:00
parent d354ddbd9c
commit fea0454703
2 changed files with 7 additions and 3 deletions

View File

@ -23,3 +23,7 @@ div#loading {
background-repeat: no-repeat; background-repeat: no-repeat;
background-attachment: fixed; background-attachment: fixed;
} }
td.modelValue {
text-align:center;
}

View File

@ -55,7 +55,7 @@ function drawGooglePieChart(data, el) {
var options = { is3D: true, var options = { is3D: true,
chartArea : { height:'80%',width:'95%' }, chartArea : { height:'80%',width:'95%' },
tooltip: { trigger: 'selection' }, tooltip: { trigger: 'focus' },
width: 450, width: 450,
legend: {position: 'right'}, legend: {position: 'right'},
pieSliceText: 'none', pieSliceText: 'none',
@ -287,10 +287,10 @@ function generateModelsOverview(moduleName, modelData)
return a[0].toLowerCase().localeCompare(b[0].toLowerCase()); return a[0].toLowerCase().localeCompare(b[0].toLowerCase());
}); });
str += '<table class="block"><tr><th>Model</th><th># of installations</th><th># of definitions</th></tr>' str += '<table class="block modelOverview"><tr><th>Model</th><th># of installations</th><th># of definitions</th></tr>'
var cl = "odd"; var cl = "odd";
$.each(models, function(index, arr) { $.each(models, function(index, arr) {
str += '<tr class="'+cl+'"><td>'+convertHtmlEntities(arr[0])+"</td><td>"+arr[1].installations+"</td><td>"+arr[1].definitions+"</td></tr>"; str += '<tr class="'+cl+'"><td class="modelName">'+convertHtmlEntities(arr[0])+'</td><td class="modelValue">'+arr[1].installations+'</td><td class="modelValue">'+arr[1].definitions+"</td></tr>";
cl = (cl == "odd" ? "even" : "odd"); cl = (cl == "odd" ? "even" : "odd");
}); });