@juice-js/observability 1.1.0-alpha.30 → 1.1.0-alpha.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/{juice-js-observability-agent.page-CKcuCUVP.mjs → juice-js-observability-agent.page-Vb7LDThl.mjs} +55 -3
- package/fesm2022/juice-js-observability-agent.page-Vb7LDThl.mjs.map +1 -0
- package/fesm2022/juice-js-observability-slo.page-DZGsui_P.mjs +368 -0
- package/fesm2022/juice-js-observability-slo.page-DZGsui_P.mjs.map +1 -0
- package/fesm2022/juice-js-observability-slos.page-DNG6g6_R.mjs +267 -0
- package/fesm2022/juice-js-observability-slos.page-DNG6g6_R.mjs.map +1 -0
- package/fesm2022/juice-js-observability.mjs +21 -1
- package/fesm2022/juice-js-observability.mjs.map +1 -1
- package/package.json +1 -1
- package/types/juice-js-observability.d.ts +95 -0
- package/fesm2022/juice-js-observability-agent.page-CKcuCUVP.mjs.map +0 -1
|
@@ -282,6 +282,20 @@ export interface ActionTarget {
|
|
|
282
282
|
id: string;
|
|
283
283
|
environmentId?: string | null;
|
|
284
284
|
}
|
|
285
|
+
/** What a diagnostics.bundle command answered: where the platform keeps the zip, and what's in it. */
|
|
286
|
+
export interface BundleSummary {
|
|
287
|
+
bundleId: string;
|
|
288
|
+
sizeBytes: number;
|
|
289
|
+
sha256: string;
|
|
290
|
+
entries: {
|
|
291
|
+
name: string;
|
|
292
|
+
source: string | null;
|
|
293
|
+
bytes: number;
|
|
294
|
+
lines: number | null;
|
|
295
|
+
}[];
|
|
296
|
+
skipped: string[];
|
|
297
|
+
redacted: number;
|
|
298
|
+
}
|
|
285
299
|
/** Requests waiting for a decision: all of them, and those the signed-in user can decide. */
|
|
286
300
|
export interface ActionRequestsWaiting {
|
|
287
301
|
total: number;
|
|
@@ -704,6 +718,82 @@ export interface SearchHit {
|
|
|
704
718
|
title: string;
|
|
705
719
|
traceId: string | null;
|
|
706
720
|
}
|
|
721
|
+
/** One window of an SLO: its SLI events, attainment and burn rate, or why it has none (state InsufficientData or Unknown). */
|
|
722
|
+
export interface SloWindow {
|
|
723
|
+
name: string;
|
|
724
|
+
total: number;
|
|
725
|
+
good: number;
|
|
726
|
+
bad: number;
|
|
727
|
+
attainment: number | null;
|
|
728
|
+
burnRate: number | null;
|
|
729
|
+
coverage: number;
|
|
730
|
+
state: string;
|
|
731
|
+
}
|
|
732
|
+
/** An SLO as it stands now. State is Met, AtRisk, Exhausted, InsufficientData or Unknown; the last two have no budget figures. */
|
|
733
|
+
export interface SloSummary {
|
|
734
|
+
key: string;
|
|
735
|
+
name: string;
|
|
736
|
+
category: string;
|
|
737
|
+
sli: string;
|
|
738
|
+
service: string;
|
|
739
|
+
environment: string;
|
|
740
|
+
target: number;
|
|
741
|
+
thresholdMs: number | null;
|
|
742
|
+
version: number;
|
|
743
|
+
pendingVersion: number | null;
|
|
744
|
+
retired: boolean;
|
|
745
|
+
state: string;
|
|
746
|
+
attainment: number | null;
|
|
747
|
+
budgetUsed: number | null;
|
|
748
|
+
budgetRemaining: number | null;
|
|
749
|
+
total: number;
|
|
750
|
+
good: number;
|
|
751
|
+
bad: number;
|
|
752
|
+
budgetAllowed: number;
|
|
753
|
+
coverage: number;
|
|
754
|
+
burn: SloWindow[];
|
|
755
|
+
}
|
|
756
|
+
export interface SloDefinition {
|
|
757
|
+
name: string;
|
|
758
|
+
sli: string;
|
|
759
|
+
service: string;
|
|
760
|
+
environment: string;
|
|
761
|
+
target: number;
|
|
762
|
+
thresholdMs: number | null;
|
|
763
|
+
operations: string[];
|
|
764
|
+
excludeOperations: string[];
|
|
765
|
+
clientErrors: string;
|
|
766
|
+
cancellations: string;
|
|
767
|
+
}
|
|
768
|
+
export interface SloVersion {
|
|
769
|
+
version: number;
|
|
770
|
+
target: number;
|
|
771
|
+
effectiveFrom: string;
|
|
772
|
+
createdAt: string;
|
|
773
|
+
createdBy: string;
|
|
774
|
+
hash: string;
|
|
775
|
+
status: string;
|
|
776
|
+
definition: SloDefinition;
|
|
777
|
+
}
|
|
778
|
+
export interface SloDay {
|
|
779
|
+
day: string;
|
|
780
|
+
total: number;
|
|
781
|
+
good: number;
|
|
782
|
+
bad: number;
|
|
783
|
+
attainment: number | null;
|
|
784
|
+
excludedHealth: number;
|
|
785
|
+
excludedCancelled: number;
|
|
786
|
+
excludedClientErrors: number;
|
|
787
|
+
minutes: number;
|
|
788
|
+
expectedMinutes: number;
|
|
789
|
+
}
|
|
790
|
+
export interface SloDetail {
|
|
791
|
+
slo: SloSummary;
|
|
792
|
+
definition: SloDefinition;
|
|
793
|
+
versions: SloVersion[];
|
|
794
|
+
days: SloDay[];
|
|
795
|
+
countedThrough: string | null;
|
|
796
|
+
}
|
|
707
797
|
/**
|
|
708
798
|
* A random UUID v4 for `Idempotency-Key`. Not `crypto.randomUUID()`: browsers offer it only in a secure context (HTTPS or localhost), so it
|
|
709
799
|
* throws on a Console opened over plain HTTP at the machine's address, as the local stack is. `getRandomValues` works everywhere.
|
|
@@ -771,6 +861,11 @@ export declare class ApiService {
|
|
|
771
861
|
/** Asks for an action under its approval policy: issued at once when nobody else needs to approve, otherwise waiting. */
|
|
772
862
|
requestAction(agentId: string, action: string, parameters: Record<string, unknown>, reason: string, target?: ActionTarget | null): Observable<ActionRequest>;
|
|
773
863
|
actionRequests(query?: Query): Observable<Page<ActionRequest>>;
|
|
864
|
+
/** A diagnostic bundle's zip (operators and admins; audited). */
|
|
865
|
+
downloadBundle(agentId: string, bundleId: string): Observable<import("@angular/common/http").HttpResponse<Blob>>;
|
|
866
|
+
/** SLOs, technical or business apart (category), with their budgets and burn rates. */
|
|
867
|
+
slos(category?: string): Observable<Page<SloSummary>>;
|
|
868
|
+
slo(key: string): Observable<SloDetail>;
|
|
774
869
|
/** How many requests wait, and how many of them the signed-in user can decide. */
|
|
775
870
|
waitingRequests(): Observable<ActionRequestsWaiting>;
|
|
776
871
|
approveRequest(id: string, comment: string): Observable<ActionRequest>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"juice-js-observability-agent.page-CKcuCUVP.mjs","names":[],"sources":["../../../../projects/juice-js/observability/src/lib/pages/agent.page.ts"],"sourcesContent":["import { LinkPipe } from '../core/options';\nimport { ChangeDetectionStrategy, Component, computed, effect, inject, input, signal, untracked } from '@angular/core';\nimport { DatePipe } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatSelectModule } from '@angular/material/select';\nimport { RouterLink } from '@angular/router';\nimport { ApiService } from '../core/api.service';\nimport { ApprovalCount } from '../core/approval-count';\nimport { ContextService } from '../core/context.service';\nimport { ActionParameter, AgentAction, AgentCommand, EnrollmentToken } from '../core/models';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { AgoPipe, ReasonPipe, copyText } from '../shared/format';\nimport { apiResource } from '../shared/resource';\nimport { problemText } from '../shared/telemetry';\nimport { ContextBar } from '../shared/ui';\n\n/** What the actions return (Juice.Observability.Agent's Diagnostics). */\ninterface HostSummary {\n hostname: string; operatingSystem: string; architecture: string; uptimeSeconds: number; processorCount: number; loadAverage: number[] | null;\n memoryTotalBytes: number | null; memoryAvailableBytes: number | null; agentVersion: string;\n}\ninterface Filesystem { mountPoint: string; format: string; totalBytes: number; freeBytes: number; availableBytes: number; }\ninterface DiskUsage { filesystems: Filesystem[]; truncated: boolean; }\ninterface TcpReachability { host: string; port: number; reachable: boolean; address: string | null; elapsedMs: number; error: string | null; }\n\nconst WAITING = ['Pending', 'Delivered'];\nconst LABELS: Record<string, string> = {\n 'host.summary': 'Host summary', 'disk.usage': 'Disk usage', 'tcp.reachability': 'TCP reachability', 'agent.update': 'Update the agent',\n 'service.restart': 'Restart a service', 'files.cleanup': 'Clean up old files',\n};\nconst PARAMETER_LABELS: Record<string, string> = {\n pathPrefix: 'Only under this path', host: 'Host', port: 'Port', timeoutMs: 'Wait (ms)', service: 'Service', folder: 'Folder',\n keepHours: 'Keep files from the last (hours)', dryRun: 'Dry run: only report what would go',\n};\n\nfunction formatBytes(bytes: number | null | undefined): string {\n if (bytes === null || bytes === undefined) return '—';\n const units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB'];\n let value = bytes;\n let unit = 0;\n while (value >= 1024 && unit < units.length - 1) { value /= 1024; unit++; }\n return `${value < 10 && unit > 0 ? value.toFixed(1) : Math.round(value)} ${units[unit]}`;\n}\n\nfunction formatUptime(seconds: number): string {\n const days = Math.floor(seconds / 86_400);\n const hours = Math.floor((seconds % 86_400) / 3600);\n return days > 0 ? `${days} d ${hours} h` : hours > 0 ? `${hours} h ${Math.floor((seconds % 3600) / 60)} min` : `${Math.floor(seconds / 60)} min`;\n}\n\n/**\n * One Juice Agent: whether it's calling in, what it was asked and what it answered. Operators run the read-only diagnostics; admins update and\n * revoke it. The platform signs each command, and the agent's own allowlist on its host still decides: a refusal there shows as `Rejected`.\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [LinkPipe, RouterLink, DatePipe, FormsModule, MatButtonModule, MatCheckboxModule, MatFormFieldModule, MatInputModule, MatProgressBarModule, MatSelectModule, ContextBar, AgoPipe, ReasonPipe],\n template: `\n <jc-context-bar>\n <a [routerLink]=\"['agents'] | jcLink\" [queryParams]=\"ctx.keep()\" class=\"jc-crumb\">Agents</a><span class=\"jc-crumb-sep\">›</span>\n <h1>{{ agent.value()?.hostname ?? '…' }}</h1>\n </jc-context-bar>\n @if (agent.isLoading() && !agent.value()) { <mat-progress-bar mode=\"indeterminate\" /> }\n @if (agent.error()) { <p class=\"jc-error\">{{ error() }}</p> }\n @if (agent.value(); as a) {\n <div class=\"jc-summary\" data-testid=\"agent-summary\">\n <span class=\"jc-badge\" data-testid=\"agent-state\" [class.jc-health-healthy]=\"a.online\" [class.jc-health-offline]=\"!a.online && a.status === 'Active'\" [class.jc-health-none]=\"a.status !== 'Active'\">\n {{ a.status !== 'Active' ? a.status : a.online ? 'Online' : 'Not calling in' }}</span>\n <span>{{ a.operatingSystem }}</span>\n <span>version <span class=\"jc-mono\" data-testid=\"agent-version\">{{ a.version }}</span></span>\n <span class=\"jc-muted\">last seen {{ a.lastSeenAt | ago }}</span>\n @if (a.resourceId) { <a [routerLink]=\"['resources', a.resourceId] | jcLink\" [queryParams]=\"ctx.keep()\">Host resource</a> }\n </div>\n <p class=\"jc-muted jc-small\">Enrolled {{ a.enrolledAt | date: 'MMM d, y, HH:mm' }} by {{ a.enrolledBy }}. Certificate valid until {{ a.certificateNotAfter | date: 'MMM d, HH:mm' }}; the agent renews it when a third is left.</p>\n @if (a.status !== 'Active') {\n <p class=\"jc-notice\" data-testid=\"agent-revoked\">Revoked {{ a.revokedAt | date: 'MMM d, y, HH:mm' }} by {{ a.revokedBy }}: {{ a.revokeReason }}. The platform refuses its certificate for good.</p>\n @if (successor(); as s) {\n <p data-testid=\"agent-successor\">{{ a.hostname }} enrolled again {{ s.enrolledAt | date: 'MMM d, HH:mm' }} as <a [routerLink]=\"['agents', s.id] | jcLink\" [queryParams]=\"ctx.keep()\">a new agent</a>.</p>\n } @else {\n <section class=\"jc-card\" data-testid=\"reenroll\">\n <h2>Bring this host back</h2>\n <p class=\"jc-muted jc-small\">The host comes back as a new agent, with a new key: this one stays revoked, with its history. It needs a new token from an admin, put on the host.</p>\n <button mat-flat-button type=\"button\" data-testid=\"reenroll-create\" [disabled]=\"creating()\" (click)=\"reenroll(a.hostname)\">Create a token for {{ a.hostname }}</button>\n @if (reenrollError()) { <span class=\"jc-error\" data-testid=\"reenroll-error\"> {{ reenrollError() }}</span> }\n @if (token(); as t) {\n <div class=\"jc-notice\" data-testid=\"reenroll-token\">\n <p>Replace the token in the agent's token file (<span class=\"jc-mono\">Agent:EnrollmentTokenFile</span>) with this one. It works once, until {{ t.expiresAt | date: 'MMM d, HH:mm' }}, and <strong>won't be shown again</strong>.</p>\n <p class=\"jc-row\"><span class=\"jc-mono\" data-testid=\"reenroll-token-value\">{{ t.token }}</span>\n <button mat-button type=\"button\" (click)=\"copy(t.token)\">{{ copied() === 'copied' ? 'Copied' : copied() === 'selected' ? 'Selected: press Ctrl+C' : 'Copy' }}</button></p>\n <p>The agent notices it within seconds, sets its old identity aside and enrolls again: nothing else on the host changes. An agent from before 9 November doesn't: clear its data directory's identity files and restart it.</p>\n </div>\n }\n </section>\n }\n } @else {\n <section class=\"jc-card\">\n <h2>Ask the agent</h2>\n <form class=\"jc-form\" data-testid=\"command-form\" (ngSubmit)=\"issue()\">\n <mat-form-field subscriptSizing=\"dynamic\" class=\"jc-field-wide\"><mat-label>Action</mat-label>\n <mat-select name=\"action\" data-testid=\"command-action\" [ngModel]=\"action()\" (ngModelChange)=\"choose($event)\">\n @for (o of actionList(); track o.name) {\n <mat-option [value]=\"o.name\" [disabled]=\"o.permitted === false\" [attr.data-testid]=\"'action-' + o.name\">\n {{ label(o.name) }}@if (o.custom) { <span class=\"jc-muted\"> · custom</span> }@if (o.permitted === false) { <span class=\"jc-muted\"> · not allowed on this host</span> }\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n @if (action() === 'agent.update') {\n <mat-form-field subscriptSizing=\"dynamic\" class=\"jc-field-md\"><mat-label>Version</mat-label>\n <mat-select name=\"version\" data-testid=\"command-version\" [(ngModel)]=\"version\">\n @for (p of packages.value()?.items ?? []; track p.version) { <mat-option [value]=\"p.version\">{{ p.version }}</mat-option> }\n </mat-select>\n </mat-form-field>\n @if (packages.value()?.items?.length === 0) { <span class=\"jc-muted jc-small\">No signed packages are offered: see Agents:PackageDirectory.</span> }\n } @else {\n @for (p of selected()?.parameters ?? []; track p.name) {\n @if (p.type === 'boolean') {\n <mat-checkbox [name]=\"p.name\" [attr.data-testid]=\"'command-param-' + p.name\" [ngModel]=\"values()[p.name] === true\" (ngModelChange)=\"set(p.name, $event)\">{{ title(p) }}</mat-checkbox>\n } @else if (p.allowed?.length) {\n <mat-form-field subscriptSizing=\"dynamic\" [class.jc-field-md]=\"p.type !== 'string'\" [class.jc-field-wide]=\"p.type === 'string'\"><mat-label>{{ title(p) }}</mat-label>\n <mat-select [name]=\"p.name\" [attr.data-testid]=\"'command-param-' + p.name\" [ngModel]=\"values()[p.name] ?? ''\" (ngModelChange)=\"set(p.name, $event)\">\n @if (!p.required) { <mat-option value=\"\">Any</mat-option> }\n @for (v of p.allowed; track v) { <mat-option [value]=\"v\">{{ v }}</mat-option> }\n </mat-select>\n </mat-form-field>\n } @else {\n <mat-form-field subscriptSizing=\"dynamic\" [class.jc-field-sm]=\"p.type === 'integer'\" [class.jc-field-wide]=\"p.type === 'string'\"><mat-label>{{ title(p) }}</mat-label>\n <input matInput [type]=\"p.type === 'integer' ? 'number' : 'text'\" [name]=\"p.name\" [attr.data-testid]=\"'command-param-' + p.name\" [attr.min]=\"p.minimum\" [attr.max]=\"p.maximum\"\n [attr.maxlength]=\"p.maxLength\" [placeholder]=\"p.description ?? ''\" [ngModel]=\"values()[p.name] ?? ''\" (ngModelChange)=\"set(p.name, $event)\">\n </mat-form-field>\n }\n }\n }\n @if (needsApproval()) {\n <mat-form-field subscriptSizing=\"dynamic\" class=\"jc-field-wide\"><mat-label>Why (for whoever approves it)</mat-label>\n <input matInput name=\"requestReason\" data-testid=\"request-reason\" maxlength=\"500\" [(ngModel)]=\"requestReason\">\n </mat-form-field>\n @if (selected()?.changing && agent.value()?.resourceId) {\n <mat-checkbox name=\"watchHost\" data-testid=\"request-watch-host\" [(ngModel)]=\"watchHost\">Fix this host's health: run only while it's unhealthy, and confirm recovery after</mat-checkbox>\n }\n }\n <div class=\"jc-form-actions\">\n <button mat-flat-button type=\"submit\" data-testid=\"command-issue\" [disabled]=\"issuing() || selected()?.permitted === false\">{{ needsApproval() ? 'Request' : action() === 'agent.update' ? 'Update' : 'Run' }}</button>\n @if (issueError()) { <span class=\"jc-error\" data-testid=\"command-error\">{{ issueError() }}</span> }\n @if (issued()) { <span class=\"jc-muted\" data-testid=\"command-issued\">{{ issued() }}</span> }\n </div>\n @if (selected(); as s) {\n <div class=\"jc-muted jc-small jc-form-actions\" data-testid=\"command-hint\">\n <div>{{ s.description }} <span data-testid=\"command-approval\">{{ s.risk }} risk: {{ approvalText(s.approval) }}.</span></div>\n @if (s.limits.length) { <div data-testid=\"command-limits\">On this host: {{ s.limits.join('; ') }}.</div> }\n </div>\n }\n </form>\n @if (actions.value(); as list) {\n @if (!list.reportedAt) {\n <p class=\"jc-notice\" data-testid=\"actions-not-reported\">This agent doesn't report what its host allows (it's older than this platform): the list shows the built-in actions, and one its host doesn't permit comes back <strong>Rejected</strong>.</p>\n } @else {\n <p class=\"jc-muted jc-small\">As the agent reported {{ list.reportedAt | ago }}, when it started. Its host still checks every command.</p>\n }\n }\n </section>\n }\n\n @if (requestList().length) {\n <section class=\"jc-card\" data-testid=\"requests\">\n <h2>Requests</h2>\n <table class=\"jc-table\">\n <thead><tr><th>Asked</th><th>Action</th><th>By, and why</th><th>State</th><th>Decided</th><th></th></tr></thead>\n <tbody>\n @for (r of requestList(); track r.id) {\n <tr [attr.data-testid]=\"'request-' + r.id\">\n <td class=\"jc-nowrap\">{{ r.requestedAt | date: 'MMM d, HH:mm:ss' }}</td>\n <td><strong>{{ r.action }}</strong><div class=\"jc-muted jc-small\">{{ r.risk }} risk</div></td>\n <td>{{ r.requestedBy }}<div class=\"jc-small\">{{ r.reason }}</div></td>\n <td class=\"jc-nowrap\"><span class=\"jc-badge\" [class.jc-health-degraded]=\"r.state === 'Pending'\" [class.jc-health-healthy]=\"r.state === 'Issued'\"\n [class.jc-health-none]=\"r.state !== 'Pending' && r.state !== 'Issued'\" data-testid=\"request-state\">{{ r.state === 'Pending' ? 'Waiting for approval' : r.state }}</span>\n @if (r.state === 'Pending') { <div class=\"jc-muted jc-small\">until {{ r.expiresAt | date: 'HH:mm' }}</div> }\n @if (r.verification && r.verification !== 'None') {\n <div class=\"jc-small\" data-testid=\"request-verification\" [class.jc-error]=\"r.verification === 'NotVerified'\" [title]=\"r.verificationNote ?? ''\">{{ verificationText(r.verification) }}</div>\n }</td>\n <td class=\"jc-small\">@if (r.decidedBy) { {{ r.decidedBy }}, {{ r.decidedAt | date: 'HH:mm' }} }@if (r.comment) { <div>{{ r.comment }}</div> }</td>\n <td class=\"jc-row-actions\">@if (r.state === 'Pending') { <button mat-button type=\"button\" [attr.data-testid]=\"'request-cancel-' + r.id\" (click)=\"cancelRequest(r.id)\">Cancel</button> }</td>\n </tr>\n }\n </tbody>\n </table>\n </section>\n }\n\n <section class=\"jc-card\" data-testid=\"commands\">\n <h2>Commands</h2>\n @if (commands.error()) { <p class=\"jc-error\">{{ commandsError() }}</p> }\n <table class=\"jc-table\">\n <thead><tr><th>Issued</th><th>Action</th><th>By</th><th>State</th><th>Answer</th></tr></thead>\n <tbody>\n @for (c of allCommands(); track c.id) {\n <tr [attr.data-testid]=\"'command-' + c.id\">\n <td class=\"jc-nowrap\">{{ c.issuedAt | date: 'MMM d, HH:mm:ss' }}</td>\n <td><strong>{{ c.action }}</strong>@if (describe(c); as d) { <div class=\"jc-small jc-mono\">{{ d }}</div> }</td>\n <td>{{ c.issuedBy }}</td>\n <td class=\"jc-nowrap\">\n <span class=\"jc-badge\" [class.jc-health-healthy]=\"c.state === 'Succeeded'\" [class.jc-health-unhealthy]=\"c.state === 'Failed' || c.state === 'Rejected'\"\n [class.jc-health-degraded]=\"waiting(c)\" [class.jc-health-none]=\"c.state === 'Expired' || c.state === 'Cancelled'\" data-testid=\"command-state\">{{ c.state }}</span>\n @if (c.durationMs !== null) { <div class=\"jc-muted jc-small\">{{ c.durationMs }} ms</div> }\n </td>\n <td class=\"jc-small\" data-testid=\"command-answer\">\n @if (c.reason) { <div [class.jc-bad]=\"c.state !== 'Succeeded'\">{{ c.reason | reason }}</div> }\n @if (c.state === 'Succeeded' && c.result) {\n @switch (c.action) {\n @case ('host.summary') {\n @if (summary(c); as h) {\n <div>{{ h.hostname }} · {{ h.operatingSystem }} {{ h.architecture }} · up {{ uptime(h.uptimeSeconds) }}</div>\n <div>{{ h.processorCount }} CPUs@if (h.loadAverage) { · load {{ h.loadAverage.join(' ') }} }@if (h.memoryTotalBytes) { · memory {{ bytes(h.memoryAvailableBytes) }} of {{ bytes(h.memoryTotalBytes) }} available }</div>\n }\n }\n @case ('disk.usage') {\n @if (disk(c); as d) {\n <table class=\"jc-kv\" data-testid=\"disk-result\">\n @for (f of fullestFirst(d, expanded().has(c.id)); track f.mountPoint) {\n <tr [class.jc-bad]=\"low(f)\">\n <td class=\"jc-mono\">{{ f.mountPoint }}</td><td>{{ f.format }}</td><td class=\"jc-nowrap\">{{ bytes(f.availableBytes) }} free of {{ bytes(f.totalBytes) }}</td>\n </tr>\n } @empty { <tr><td class=\"jc-muted\">No filesystems there.</td></tr> }\n </table>\n @if (d.filesystems.length > shown) {\n <button mat-button type=\"button\" [attr.data-testid]=\"'disk-toggle-' + c.id\" (click)=\"toggle(c.id)\">\n {{ expanded().has(c.id) ? 'Show the fullest ' + shown : 'Show all ' + d.filesystems.length }}</button>\n }\n @if (d.truncated) { <div class=\"jc-muted\">More filesystems than the agent reports at once.</div> }\n }\n }\n @case ('tcp.reachability') {\n @if (tcp(c); as t) {\n @if (t.reachable) { <div>Reachable at {{ t.address }} in {{ t.elapsedMs }} ms</div> }\n @else { <div class=\"jc-bad\">Not reachable after {{ t.elapsedMs }} ms: {{ t.error }}</div> }\n }\n }\n @default {\n @if (flat(c.result); as rows) {\n <table class=\"jc-kv\" data-testid=\"custom-result\">@for (r of rows; track r[0]) { <tr><td>{{ r[0] }}</td><td class=\"jc-mono\">{{ r[1] }}</td></tr> }</table>\n } @else { <pre class=\"jc-mono\" style=\"white-space: pre-wrap; margin: 0\" data-testid=\"custom-result\">{{ json(c.result) }}</pre> }\n }\n }\n }\n @if (waiting(c)) { <div class=\"jc-muted\">{{ c.state === 'Pending' ? 'Waiting for the agent to call in' : 'Handed to the agent' }}, until {{ c.expiresAt | date: 'HH:mm:ss' }}</div> }\n </td>\n </tr>\n } @empty { <tr><td colspan=\"5\" class=\"jc-muted\">Nothing asked yet.</td></tr> }\n </tbody>\n </table>\n @if (nextCursor()) { <button mat-button type=\"button\" data-testid=\"commands-older\" (click)=\"loadOlder()\">Older</button> }\n </section>\n\n @if (a.status === 'Active') {\n <section class=\"jc-card\">\n <h2>Revoke</h2>\n <p class=\"jc-muted jc-small\">The agent stops at its next call: the platform refuses its certificate from then on, and commands still waiting are cancelled. It can't be undone; the host would enroll again with a new token.</p>\n <form class=\"jc-form\" (ngSubmit)=\"revoke()\">\n <mat-form-field subscriptSizing=\"dynamic\" class=\"jc-field-wide\"><mat-label>Why</mat-label><input matInput name=\"reason\" data-testid=\"revoke-reason\" [(ngModel)]=\"reason\" maxlength=\"500\" (ngModelChange)=\"confirming.set(false)\"></mat-form-field>\n @if (confirming()) {\n <button mat-flat-button color=\"warn\" type=\"submit\" data-testid=\"revoke-confirm\" [disabled]=\"revoking()\">Revoke {{ a.hostname }}</button>\n <button mat-button type=\"button\" (click)=\"confirming.set(false)\">Cancel</button>\n } @else {\n <button mat-stroked-button type=\"submit\" data-testid=\"revoke\" [disabled]=\"!reason.trim()\">Revoke</button>\n }\n @if (revokeError()) { <span class=\"jc-error\" data-testid=\"revoke-error\">{{ revokeError() }}</span> }\n </form>\n </section>\n }\n }`,\n})\nexport class AgentPage {\n protected readonly ctx = inject(ContextService);\n private readonly api = inject(ApiService);\n private readonly approvalCount = inject(ApprovalCount);\n readonly id = input.required<string>();\n protected readonly action = signal('host.summary');\n /** The form's values for the chosen action, by parameter name. */\n protected readonly values = signal<Record<string, unknown>>({});\n protected readonly issuing = signal(false);\n protected readonly issueError = signal('');\n protected readonly confirming = signal(false);\n protected readonly revoking = signal(false);\n protected readonly revokeError = signal('');\n protected version = '';\n protected reason = '';\n protected requestReason = '';\n /** Aim the request at this agent's host: checked unhealthy before it runs, and watched for recovery after. */\n protected watchHost = false;\n /** What happened to the last request, when it didn't simply run. */\n protected readonly issued = signal('');\n protected readonly needsApproval = computed(() => (this.selected()?.approval ?? 'None') !== 'None');\n protected readonly requests = apiResource({ params: () => this.id(), stream: ({ params }) => this.api.actionRequests({ agentId: params, limit: 20 }) });\n protected readonly requestList = computed(() => this.requests.value()?.items ?? []);\n protected readonly creating = signal(false);\n protected readonly reenrollError = signal('');\n protected readonly token = signal<EnrollmentToken | null>(null);\n protected readonly copied = signal<'' | 'copied' | 'selected'>('');\n\n /** For a revoked agent: the active one its host enrolled as since, if any. */\n private readonly everyone = apiResource({ params: () => this.agent.value()?.status === 'Revoked' || undefined, stream: () => this.api.agents(true) });\n protected readonly successor = computed(() => {\n const revoked = this.agent.value();\n if (!revoked?.revokedAt) return undefined;\n return (this.everyone.value()?.items ?? []).find(a => a.status === 'Active' && a.hostname === revoked.hostname && Date.parse(a.enrolledAt) > Date.parse(revoked.revokedAt!));\n });\n\n /** What the agent reported it can run, with its host's bounds: the menu and the form come from it, custom actions included. */\n protected readonly actions = apiResource({ params: () => this.id(), stream: ({ params }) => this.api.agentActions(params) });\n protected readonly actionList = computed(() => this.actions.value()?.items ?? []);\n protected readonly selected = computed<AgentAction | undefined>(() => this.actionList().find(a => a.name === this.action()));\n\n protected readonly agent = apiResource({ params: () => this.id(), stream: ({ params }) => this.api.agent(params) });\n protected readonly error = computed(() => problemText(this.agent.error()));\n protected readonly commands = apiResource({ params: () => this.id(), stream: ({ params }) => this.api.agentCommands(params) });\n protected readonly commandsError = computed(() => problemText(this.commands.error()));\n /** Asked for only once someone picks an update, since only admins can use it. */\n protected readonly packages = apiResource({ params: () => this.action() === 'agent.update' || undefined, stream: () => this.api.agentPackages() });\n private readonly older = signal<{ items: AgentCommand[]; cursor: string | null } | null>(null);\n protected readonly allCommands = computed(() => {\n const first = this.commands.value()?.items ?? [];\n const seen = new Set(first.map(c => c.id));\n return [...first, ...(this.older()?.items ?? []).filter(c => !seen.has(c.id))];\n });\n protected readonly nextCursor = computed(() => this.older() ? this.older()!.cursor : this.commands.value()?.nextCursor ?? null);\n\n constructor() {\n // Once the list is in, start on an action the host permits, with its defaults filled in.\n effect(() => {\n const list = this.actionList();\n if (list.length === 0) return;\n const current = list.find(a => a.name === untracked(this.action));\n if (!current || current.permitted === false) this.choose((list.find(a => a.permitted !== false) ?? list[0]).name);\n else if (Object.keys(untracked(this.values)).length === 0) this.choose(current.name);\n });\n // While a command waits, look again every 2 seconds, and at the agent too, since an update changes its version. While a request waits for\n // approval, every 5: someone else decides it.\n effect(onCleanup => {\n const running = this.allCommands().some(c => this.waiting(c));\n const deciding = this.requestList().some(r => r.state === 'Pending');\n if (!running && !deciding) return;\n const timer = setTimeout(() => { this.commands.reload(); this.agent.reload(); this.requests.reload(); }, running ? 2000 : 5000);\n onCleanup(() => clearTimeout(timer));\n });\n }\n\n protected waiting(c: AgentCommand): boolean { return WAITING.includes(c.state) && new Date(c.expiresAt).getTime() > Date.now(); }\n\n protected describe(c: AgentCommand): string {\n const p = c.parameters ?? {};\n switch (c.action) {\n case 'disk.usage': return p['pathPrefix'] ? `under ${p['pathPrefix']}` : 'all filesystems';\n case 'tcp.reachability': return `${p['host']}:${p['port']}, wait ${p['timeoutMs']} ms`;\n case 'agent.update': return `to ${p['version']}`;\n default: return Object.entries(p).map(([k, v]) => `${k}=${typeof v === 'string' ? v : JSON.stringify(v)}`).join(', ');\n }\n }\n\n /** The built-ins by name as people say them; a custom action by its own name. */\n protected label(name: string): string { return LABELS[name] ?? name; }\n\n protected title(p: ActionParameter): string {\n const words = PARAMETER_LABELS[p.name] ?? p.name.replace(/([A-Z])/g, ' $1').replace(/^./, c => c.toUpperCase());\n return p.required || p.type === 'boolean' ? words : `${words} (optional)`;\n }\n\n protected choose(name: string) {\n this.action.set(name);\n this.issueError.set('');\n const defaults: Record<string, unknown> = {};\n for (const p of this.actionList().find(a => a.name === name)?.parameters ?? []) {\n if (p.default !== null) defaults[p.name] = p.type === 'integer' ? Number(p.default) : p.type === 'boolean' ? p.default === 'true' : p.default;\n else if (p.required && p.allowed?.length === 1) defaults[p.name] = p.allowed[0];\n }\n this.values.set(defaults);\n }\n\n protected set(name: string, value: unknown) { this.values.update(v => ({ ...v, [name]: value })); }\n\n /** A result of plain values reads as a table; anything nested as JSON. */\n protected flat(result: unknown): [string, string][] | null {\n if (!result || typeof result !== 'object' || Array.isArray(result)) return null;\n const entries = Object.entries(result as Record<string, unknown>);\n return entries.every(([, v]) => v === null || ['string', 'number', 'boolean'].includes(typeof v)) ? entries.map(([k, v]) => [k, v === null ? '—' : String(v)]) : null;\n }\n\n protected summary(c: AgentCommand) { return c.result as unknown as HostSummary; }\n protected disk(c: AgentCommand) { return c.result as unknown as DiskUsage; }\n protected tcp(c: AgentCommand) { return c.result as unknown as TcpReachability; }\n /** A whole host can have dozens of mounts: the fullest come first, and the rest on request. */\n protected readonly shown = 8;\n protected readonly expanded = signal(new Set<string>());\n protected toggle(id: string) { this.expanded.update(s => { const next = new Set(s); if (!next.delete(id)) next.add(id); return next; }); }\n protected fullestFirst(d: DiskUsage, all: boolean): Filesystem[] {\n const free = (f: Filesystem) => (f.totalBytes > 0 ? f.availableBytes / f.totalBytes : 1);\n const sizable = (f: Filesystem) => Number(f.totalBytes >= 1024 ** 3);\n const sorted = [...d.filesystems].sort((a, b) => Number(this.low(b)) - Number(this.low(a)) || sizable(b) - sizable(a) || free(a) - free(b));\n return all ? sorted : sorted.slice(0, this.shown);\n }\n /** Under 10 % free. Small read-only images (ISO, modules, squashfs) are always full by design, so only filesystems of 1 GB or more count. */\n protected low(f: Filesystem): boolean { return f.totalBytes >= 1024 ** 3 && f.availableBytes / f.totalBytes < 0.1; }\n protected bytes(n: number | null) { return formatBytes(n); }\n protected uptime(s: number) { return formatUptime(s); }\n protected json(v: unknown) { return JSON.stringify(v, null, 2); }\n\n /** The form's values, typed as the action declares them; an empty optional one left out. The API and the agent check them again. */\n private parameters(): Record<string, unknown> {\n if (this.action() === 'agent.update') return { version: this.version };\n const values = this.values();\n const out: Record<string, unknown> = {};\n for (const p of this.selected()?.parameters ?? []) {\n const v = values[p.name];\n if (p.type === 'boolean') { if (v === true || p.required) out[p.name] = v === true; continue; }\n if (v === undefined || v === null || v === '') continue;\n out[p.name] = p.type === 'integer' ? Number(v) : String(v).trim();\n }\n return out;\n }\n\n /** Whether it fixed what it was for: only health from telemetry after the action says so, never the agent. */\n protected verificationText(verification: string): string {\n switch (verification) {\n case 'Verifying': return 'Watching health for recovery';\n case 'Verified': return 'Recovery confirmed by health';\n case 'NotVerified': return 'Recovery not confirmed';\n default: return verification;\n }\n }\n\n protected approvalText(policy: string): string {\n switch (policy) {\n case 'None': return 'runs when asked';\n case 'Admin': return 'needs an admin: an admin\\'s request runs at once, an operator\\'s waits for an admin to approve it';\n default: return 'needs a second person: an admin other than whoever asks approves it';\n }\n }\n\n /** What needs no one else runs; what needs approval becomes a request, which runs once approved. */\n protected issue() {\n const action = this.action();\n this.issuing.set(true);\n this.issueError.set('');\n this.issued.set('');\n const failed = (e: unknown) => {\n this.issuing.set(false);\n this.issueError.set((e as { status?: number }).status === 403 ? 'Asking an agent needs the operator or admin role.' : problemText(e));\n };\n if (!this.needsApproval()) {\n this.api.issueCommand(this.id(), action, this.parameters()).subscribe({ next: () => { this.issuing.set(false); this.commands.reload(); }, error: failed });\n return;\n }\n const host = this.watchHost && this.selected()?.changing ? this.agent.value()?.resourceId : null;\n this.api.requestAction(this.id(), action, this.parameters(), this.requestReason.trim(), host ? { type: 'Host', id: host } : null).subscribe({\n next: r => {\n this.issuing.set(false);\n this.requestReason = '';\n this.issued.set(r.state !== 'Issued' ? 'Requested: it runs once approved, on the Approvals page.' : r.policy === 'None' ? 'Needs no approval as asked: running.' : 'Approved by your role: running.');\n this.requests.reload();\n this.commands.reload();\n this.approvalCount.refresh();\n },\n error: failed,\n });\n }\n\n protected cancelRequest(id: string) {\n this.api.cancelRequest(id).subscribe({ next: () => { this.requests.reload(); this.approvalCount.refresh(); }, error: e => this.issueError.set(problemText(e)) });\n }\n\n protected loadOlder() {\n const cursor = this.nextCursor();\n if (!cursor) return;\n this.api.agentCommands(this.id(), cursor).subscribe({\n next: page => this.older.update(o => ({ items: [...(o?.items ?? []), ...page.items], cursor: page.nextCursor })),\n error: e => this.issueError.set(problemText(e)),\n });\n }\n\n /** A token for this host to enroll again with. Admins only; shown once. */\n protected reenroll(hostname: string) {\n this.creating.set(true);\n this.reenrollError.set('');\n this.copied.set('');\n this.api.createEnrollmentToken(`re-enroll ${hostname}`, 60).subscribe({\n next: t => { this.creating.set(false); this.token.set(t); },\n error: e => { this.creating.set(false); this.reenrollError.set((e as { status?: number }).status === 403 ? 'Enrolling an agent needs the admin role.' : problemText(e)); },\n });\n }\n\n protected copy(text: string) {\n copyText(text, document.querySelector('[data-testid=reenroll-token-value]')).then(done => this.copied.set(done));\n }\n\n protected revoke() {\n if (!this.confirming()) { this.confirming.set(true); return; }\n this.revoking.set(true);\n this.revokeError.set('');\n this.api.revokeAgent(this.id(), this.reason.trim()).subscribe({\n next: () => { this.revoking.set(false); this.confirming.set(false); this.agent.reload(); this.commands.reload(); },\n error: e => { this.revoking.set(false); this.revokeError.set((e as { status?: number }).status === 403 ? 'Revoking an agent needs the admin role.' : problemText(e)); },\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA6BA,MAAM,UAAU,CAAC,WAAW,WAAW;AACvC,MAAM,SAAiC;CACrC,gBAAgB;CAAgB,cAAc;CAAc,oBAAoB;CAAoB,gBAAgB;CACpH,mBAAmB;CAAqB,iBAAiB;AAC1D;AACD,MAAM,mBAA2C;CAC/C,YAAY;CAAwB,MAAM;CAAQ,MAAM;CAAQ,WAAW;CAAa,SAAS;CAAW,QAAQ;CACpH,WAAW;CAAoC,QAAQ;AACxD;AAED,SAAS,YAAY,OAAgC;CACnD,IAAI,UAAU,QAAQ,UAAU,QAAW,OAAO;CAClD,MAAM,QAAQ;EAAC;EAAK;EAAM;EAAM;EAAM;EAAM;CAAI;CAChD,IAAI,QAAQ;CACZ,IAAI,OAAO;CACX,OAAO,SAAS,QAAQ,OAA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