Skip to content

Commit

Permalink
status: move ping to front
Browse files Browse the repository at this point in the history
  • Loading branch information
pulsejet committed May 11, 2024
1 parent 2868b62 commit 23e3864
Showing 1 changed file with 18 additions and 20 deletions.
38 changes: 18 additions & 20 deletions framework/ndn-testbed-status/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
<th>Prefix</th>
<th>HTTPS</th>

<th>Revision</th>
<th>Status</th>

<th>TLS Expiry</th>
<th>WSS</th>
<th>Revision</th>

<th v-for="node in routers">{{ node.shortname }}</th>

<th>Host OS</th>
<th>Kernel</th>
Expand All @@ -22,8 +23,6 @@
<th>NLSR Version</th>

<th v-for="service in services">{{ service }}</th>

<th v-for="node in routers"> {{ node.shortname }} </th>
</tr>
</thead>

Expand All @@ -40,24 +39,31 @@
<td>{{ router.prefix }}</td>
<td><a :href="`https://${router.host}`" target="_blank">{{ router.host }}</a></td>

<td>
<a v-if="router.status?.revision"
:href="getRevUrl(router)"
target="_blank">
{{ router.status?.revision }}
</a>
</td>
<td :class="{
warning: getFromNow(router.status?.timestamp ?? 0) < -1800,
}">{{ getFromNowStr(router.status?.timestamp, 'seconds') }}</td>

<td :class="{
warning: (router.status?.tls?.expiry ?? -1) < 0,
okay: getFromNow(router.status?.tls?.expiry ?? -1) > 7 * 86400,
}">{{ getFromNowStr(router.status?.tls?.expiry, 'days') || router.status?.tls?.error }}</td>
<td :class="{ okay: router.status?.['ws-tls']}">
{{ router.status?.['ws-tls'] ? 'OK' : '' }}
</td>
<td>
<a v-if="router.status?.revision"
:href="getRevUrl(router)"
target="_blank">
{{ router.status?.revision }}
</a>
</td>

<td v-for="node in routers" :class="{
error: !router.status?.ndnping[node.shortname],
okay: (router.shortname != node.shortname) && (router.status?.ndnping[node.shortname] ?? 0 > 0),
blue: (router.shortname == node.shortname),
}">
{{ router.status?.ndnping[node.shortname] || '' }}
</td>

<td>{{ router.status?.host_info?.os }}</td>
<td>{{ router.status?.host_info?.kernel }}</td>
Expand All @@ -74,14 +80,6 @@
{{ router.status.services[service].status }}
</span>
</td>

<td v-for="node in routers" :class="{
error: !router.status?.ndnping[node.shortname],
okay: (router.shortname != node.shortname) && (router.status?.ndnping[node.shortname] ?? 0 > 0),
blue: (router.shortname == node.shortname),
}">
{{ router.status?.ndnping[node.shortname] || '' }}
</td>
</tr>
</tbody>
</table>
Expand Down

0 comments on commit 23e3864

Please sign in to comment.