You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.0 KiB
35 lines
1.0 KiB
extends ../layouts/main
|
|
block content
|
|
|
|
mixin renderHostList (hosts)
|
|
if Array.isArray(hosts) && (hosts.length > 0)
|
|
table.uk-table.uk-table-small.uk-table-divider
|
|
thead
|
|
th Host
|
|
th Status
|
|
th Memory
|
|
th Platform
|
|
th Arch
|
|
th Created
|
|
th Updated
|
|
tbody
|
|
each host in hosts
|
|
tr(data-host-id= host._id)
|
|
td
|
|
a(href=`/admin/host/${host._id}`)= host.hostname
|
|
td= host.status
|
|
td= numeral((host.totalmem - host.freemem) / host.totalmem).format('0.00%')
|
|
td= host.platform
|
|
td= host.arch
|
|
td= moment(host.created).fromNow()
|
|
td= host.updated ? moment(host.updated).fromNow() : 'N/A'
|
|
else
|
|
div The host list is empty
|
|
|
|
if Array.isArray(activeHosts) && (activeHosts.length > 0)
|
|
h2 Active hosts
|
|
+renderHostList(activeHosts)
|
|
|
|
if Array.isArray(crashedHosts) && (crashedHosts.length > 0)
|
|
h2 Crashed hosts
|
|
+renderHostList(crashedHosts)
|