status page
[phinde.git] / www / status.php
diff --git a/www/status.php b/www/status.php
new file mode 100644 (file)
index 0000000..3bc52cf
--- /dev/null
@@ -0,0 +1,18 @@
+<?php
+namespace phinde;
+require 'www-header.php';
+
+$es = new Elasticsearch($GLOBALS['phinde']['elasticsearch']);
+$esDocs = $es->countDocuments();
+
+$queue = new Queue();
+$gearStatus = $queue->getServerStatus();
+
+render(
+    'status',
+    array(
+        'esDocs' => $esDocs,
+        'gearStatus' => $gearStatus,
+    )
+);
+?>