mirror of
https://github.com/holos-run/holos.git
synced 2026-03-22 10:15:01 +00:00
This patch adds the GetVersion rpc method to holos.system.v1alpha1.SystemService and wires the version information up to the Web UI. This is a good example to crib from later regarding fetching and refreshing data from the web ui using grpc and field masks.
24 lines
841 B
HTML
24 lines
841 B
HTML
@if (version$ | async; as version) {
|
|
<button mat-button [matMenuTriggerFor]="menu">
|
|
{{ version.version }}
|
|
</button>
|
|
|
|
<mat-menu class="version-menu" #menu="matMenu">
|
|
<mat-card class="version-card">
|
|
<mat-card-header>
|
|
<mat-card-title>{{ version.version }}</mat-card-title>
|
|
<mat-card-subtitle>Server version info</mat-card-subtitle>
|
|
</mat-card-header>
|
|
<mat-card-content>
|
|
<pre>Git: {{ version.gitCommit | truncate }}</pre>
|
|
<pre>Go: {{ version.goVersion | truncate }}</pre>
|
|
<pre>OS: {{ version.os | truncate }}</pre>
|
|
<pre>Arch: {{ version.arch | truncate }}</pre>
|
|
</mat-card-content>
|
|
<mat-card-actions>
|
|
<button mat-button (click)="refreshVersion()" [disabled]="isLoading">Refresh</button>
|
|
</mat-card-actions>
|
|
</mat-card>
|
|
</mat-menu>
|
|
}
|