aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2016-11-11 21:26:34 +0100
committerChristian Weiske <cweiske@cweiske.de>2016-11-11 21:27:02 +0100
commitf2b3557f358efc5b6363b1f8e4b0c30e93945feb (patch)
tree0e6201db8753e4ee60f41022d84065c37bef2252
parentcb577b3170e2d6e5c44aa29c37ab5d9751a66636 (diff)
downloadphinde-f2b3557f358efc5b6363b1f8e4b0c30e93945feb.tar.gz
phinde-f2b3557f358efc5b6363b1f8e4b0c30e93945feb.zip
format document number on status page
-rw-r--r--data/templates/status.htm4
-rw-r--r--www/status.php5
2 files changed, 6 insertions, 3 deletions
diff --git a/data/templates/status.htm b/data/templates/status.htm
index 79e875e..86c39fe 100644
--- a/data/templates/status.htm
+++ b/data/templates/status.htm
@@ -4,7 +4,7 @@
<meta name="robots" value="noindex,nofollow"/>
{% endblock %}
-{%block title %}phinde status{% endblock %}
+{%block title %}phinde status - {% endblock %}
{% block maincontent %}
<div class="container">
@@ -24,7 +24,7 @@
<tr>
<td rowspan="2">Elasticsearch</td>
<td>Documents</td>
- <td style="text-align: right">{{esStatus.documents}}</td>
+ <td style="text-align: right">{{esStatus.documents_human}}</td>
</tr>
<tr>
<td>Index size</td>
diff --git a/www/status.php b/www/status.php
index 08e2a0d..4118c9c 100644
--- a/www/status.php
+++ b/www/status.php
@@ -19,7 +19,10 @@ function human_filesize($bytes, $decimals = 2)
. ' ' . @$size[$factor];
}
-$esStatus['size_human'] = human_filesize($esStatus['size']);
+$esStatus['size_human'] = human_filesize($esStatus['size']);
+$esStatus['documents_human'] = number_format(
+ $esStatus['documents'], 0, '.', ' '
+);
render(
'status',