mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
WIP: IP, pubkey, system time, system uptime, ca fingerprint (#2091)
* closes #923, #2063, #2012, #1153 * add ca fingerprint * add `server.time` * add `ip-info` to `server-info` * add ssh pubkey * support multiple IPs * rename key * add `ca-fingerprint` and `system-start-time` * fix off-by-one * update compat cargo lock Co-authored-by: Aiden McClelland <me@drbonez.dev>
This commit is contained in:
committed by
Aiden McClelland
parent
673e5af030
commit
06cf83b901
@@ -15,6 +15,32 @@
|
||||
|
||||
<div id="metricSection">
|
||||
<ng-container *ngIf="!loading">
|
||||
<ion-item-group>
|
||||
<ion-item-divider>Time</ion-item-divider>
|
||||
<ion-item>
|
||||
<ion-label>System Time</ion-label>
|
||||
<ion-note slot="end" class="metric-note">
|
||||
<ion-text style="color: white"
|
||||
>{{ systemTime$ | async | date:'MMMM d, y, h:mm a z':'UTC'
|
||||
}}</ion-text
|
||||
>
|
||||
</ion-note>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label>System Uptime</ion-label>
|
||||
<ion-note
|
||||
*ngIf="systemUptime$ | async as uptime"
|
||||
slot="end"
|
||||
class="metric-note"
|
||||
>
|
||||
<ion-text style="color: white">
|
||||
<b>{{ uptime.days }}</b> Days, <b>{{ uptime.hours }}</b> Hours,
|
||||
<b>{{ uptime.minutes }}</b> Minutes
|
||||
</ion-text>
|
||||
</ion-note>
|
||||
</ion-item>
|
||||
</ion-item-group>
|
||||
|
||||
<ion-item-group
|
||||
*ngFor="let metricGroup of metrics | keyvalue : asIsOrder"
|
||||
>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Component } from '@angular/core'
|
||||
import { Metrics } from 'src/app/services/api/api.types'
|
||||
import { ApiService } from 'src/app/services/api/embassy-api.service'
|
||||
import { TimeService } from 'src/app/services/time-service'
|
||||
import { pauseFor, ErrorToastService } from '@start9labs/shared'
|
||||
|
||||
@Component({
|
||||
@@ -13,9 +14,13 @@ export class ServerMetricsPage {
|
||||
going = false
|
||||
metrics: Metrics = {}
|
||||
|
||||
readonly systemTime$ = this.timeService.systemTime$
|
||||
readonly systemUptime$ = this.timeService.systemUptime$
|
||||
|
||||
constructor(
|
||||
private readonly errToast: ErrorToastService,
|
||||
private readonly embassyApi: ApiService,
|
||||
private readonly timeService: TimeService,
|
||||
) {}
|
||||
|
||||
async ngOnInit() {
|
||||
|
||||
@@ -8,28 +8,28 @@
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<ion-item-divider>Basic</ion-item-divider>
|
||||
|
||||
<ion-item-group *ngIf="server$ | async as server">
|
||||
<ion-item-divider>embassyOS Info</ion-item-divider>
|
||||
<ion-item>
|
||||
<ion-label>
|
||||
<h2>embassyOS Version</h2>
|
||||
<h2>Version</h2>
|
||||
<p>{{ server.version | displayEmver }}</p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-label>
|
||||
<h2>Git Hash</h2>
|
||||
<p>{{ gitHash }}</p>
|
||||
</ion-label>
|
||||
<ion-button slot="end" fill="clear" (click)="copy(gitHash)">
|
||||
<ion-icon slot="icon-only" name="copy-outline"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-item>
|
||||
|
||||
<ion-item-divider>Addresses</ion-item-divider>
|
||||
|
||||
<ion-item-divider>Web Addresses</ion-item-divider>
|
||||
<ion-item>
|
||||
<ion-label class="break-all">
|
||||
<h2>Tor Address</h2>
|
||||
<h2>Tor</h2>
|
||||
<p>{{ server['tor-address'] }}</p>
|
||||
</ion-label>
|
||||
<ion-button slot="end" fill="clear" (click)="copy(server['tor-address'])">
|
||||
@@ -38,12 +38,49 @@
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label class="break-all">
|
||||
<h2>LAN Address</h2>
|
||||
<h2>LAN</h2>
|
||||
<p>{{ server['lan-address'] }}</p>
|
||||
</ion-label>
|
||||
<ion-button slot="end" fill="clear" (click)="copy(server['lan-address'])">
|
||||
<ion-icon slot="icon-only" name="copy-outline"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-item>
|
||||
<ng-container *ngFor="let ip of server['ip-info'] | keyvalue">
|
||||
<ng-container *ngFor="let entry of ip.value | keyvalue">
|
||||
<ion-item *ngIf="entry.value as address">
|
||||
<ion-label>
|
||||
<h2>{{ ip.key }} ({{ entry.key }})</h2>
|
||||
<p>{{ address }}</p>
|
||||
</ion-label>
|
||||
<ion-button slot="end" fill="clear" (click)="copy(address)">
|
||||
<ion-icon slot="icon-only" name="copy-outline"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-item>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
|
||||
<ion-item-divider>Device Credentials</ion-item-divider>
|
||||
<ion-item>
|
||||
<ion-label>
|
||||
<h2>Pubkey</h2>
|
||||
<p>{{ server['pubkey'] }}</p>
|
||||
</ion-label>
|
||||
<ion-button slot="end" fill="clear" (click)="copy(server['pubkey'])">
|
||||
<ion-icon slot="icon-only" name="copy-outline"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-label>
|
||||
<h2>CA fingerprint</h2>
|
||||
<p>{{ server['ca-fingerprint'] }}</p>
|
||||
</ion-label>
|
||||
<ion-button
|
||||
slot="end"
|
||||
fill="clear"
|
||||
(click)="copy(server['ca-fingerprint'])"
|
||||
>
|
||||
<ion-icon slot="icon-only" name="copy-outline"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-item>
|
||||
</ion-item-group>
|
||||
</ion-content>
|
||||
|
||||
Reference in New Issue
Block a user