Display role vocabulary, migration commit fix, stale enforcement reports
This commit is contained in:
@@ -88,7 +88,14 @@
|
||||
</span>
|
||||
</td>
|
||||
<td class="muted">{{ report.appliedversion ?? '-' }} / {{ report.latestversion ?? '-' }}</td>
|
||||
<td><span class="badge" :class="statusClass(report.status)">{{ report.status }}</span></td>
|
||||
<!-- A PC that stops reporting keeps the status of its last good
|
||||
cycle, so silence has to outrank it: 'stale' shows instead,
|
||||
with what it last reported kept in the tooltip. -->
|
||||
<td>
|
||||
<span v-if="report.isstale" class="badge badge-warning"
|
||||
:title="staleTitle(report)">stale</span>
|
||||
<span v-else class="badge" :class="statusClass(report.status)">{{ report.status }}</span>
|
||||
</td>
|
||||
<td>{{ report.installed }}</td>
|
||||
<td class="muted">{{ report.skipped }}</td>
|
||||
<td :class="{ 'fail-count': report.failed }">{{ report.failed }}</td>
|
||||
@@ -183,6 +190,12 @@ async function openDetail(reportid) {
|
||||
function statusClass(status) {
|
||||
return { ok: 'badge-success', selfhealed: 'badge-info', failed: 'badge-danger' }[status] || ''
|
||||
}
|
||||
|
||||
function staleTitle(report) {
|
||||
const last = report.receivedat ? formatDate(report.receivedat) : 'never'
|
||||
return `No report for over ${report.staleafterminutes} minutes.`
|
||||
+ ` Last heard ${last}, reporting "${report.status}".`
|
||||
}
|
||||
function actionClass(action) {
|
||||
return { installed: 'badge-info', skipped: 'badge-success', failed: 'badge-danger',
|
||||
filtered: '' }[action] || ''
|
||||
|
||||
Reference in New Issue
Block a user