core: update detailed status

This commit is contained in:
undefined committed 2021-04-03 12:17:27 +08:00
1 parent 51ce9f80d5
commit b9e08c7e93
15 files changed
+142 -99

No files matched your search

@@ -163,6 +163,7 @@ env.addGlobal('static_url', (assetName) => {
});
// eslint-disable-next-line no-eval
env.addGlobal('eval', eval);
env.addGlobal('global', global);
env.addGlobal('typeof', (o) => typeof o);
env.addGlobal('datetimeSpan', misc.datetimeSpan);
env.addGlobal('paginate', misc.paginate);
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/ui-default",
"version": "4.5.0",
"version": "4.5.1",
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0",
"main": "hydro.js",
+6 -3
View File
@@ -1,15 +1,18 @@
.page--status
.col--id
width: 70px
width: 100px
.col--os
width: 200px
.col--status
width: 100px
width: 130px
.col--memory
width: 150px
.col--request
width: 100px
width: 130px
+mobile()
.col--os
@@ -66,7 +66,7 @@
{%- for html in (model.system.get('ui-default.footer_extra_html')|default('')).split('\n') -%}
<li class="footer__extra-link-item">{{ html|safe }}</li>
{%- endfor -%}
<li class="footer__extra-link-item">Powered by <a href="https://hydro.js.org">Hydro</a></li>
<li class="footer__extra-link-item">Powered by <a href="https://hydro.js.org">Hydro v{{ global.Hydro.version.hydrooj }}</a></li>
</ol>
</div>
</div>
+4 -4
View File
@@ -27,11 +27,11 @@
<tbody>
{%- for doc in stats -%}
<tr>
<td class="col--id">{{ doc._id.toHexString()|truncate(6,True,'') }}</td>
<td class="col--id">{{ doc._id.toHexString()|truncate(8,True,'') }}</td>
<td class="col--status">{% if doc.isOnline %}{{ doc.status }}{% else %}{{ datetimeSpan(doc.updateAt)|safe }}{% endif %}</td>
<td class="col--os">{{ doc.osinfo }}</td>
<td class="col--cpu" data-tooltip="{{ doc.flags }}">{{ doc.cpu }}</td>
<td class="col--memory"{% if doc.stack %} data-tooltip="Stack size: {{ doc.stack }}MB"{% endif %}>{{ doc.memory }}</td>
<td class="col--os" data-tooltip="{{ doc.osinfo.kernel }}">{{ doc.osinfo.distro }} {{ doc.osinfo.release }} {{ doc.osinfo.codename }} {{ doc.osinfo.arch }}</td>
<td class="col--cpu" data-tooltip="{{ doc.cpu.flags }}">{{ doc.cpu.manufacturer }} {{ doc.cpu.brand }}@{{ doc.cpu.speed }}GHz</td>
<td class="col--memory"{% if doc.stack %} data-tooltip="Stack size: {{ doc.stack }}MB"{% endif %}>{{ size(doc.memory.used) }}/{{ size(doc.memory.total) }}</td>
<td class="col--request">{{ doc.reqCount }}</td>
</tr>
{%- endfor -%}