@juice-js/observability 1.2.0 → 1.3.0-alpha.39
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-Vb7LDThl.mjs → juice-js-observability-agent.page-Coq-V7gR.mjs} +2 -20
- package/fesm2022/juice-js-observability-agent.page-Coq-V7gR.mjs.map +1 -0
- package/fesm2022/{juice-js-observability-agents.page-Ch-tBwQO.mjs → juice-js-observability-agents.page-BBYRMhUD.mjs} +2 -2
- package/fesm2022/{juice-js-observability-agents.page-Ch-tBwQO.mjs.map → juice-js-observability-agents.page-BBYRMhUD.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-alert.page-2kfKksIG.mjs → juice-js-observability-alert.page-BsnDaMDk.mjs} +3 -3
- package/fesm2022/{juice-js-observability-alert.page-2kfKksIG.mjs.map → juice-js-observability-alert.page-BsnDaMDk.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-alerts.page-BNmez0Ak.mjs → juice-js-observability-alerts.page-HFFiapGB.mjs} +2 -2
- package/fesm2022/{juice-js-observability-alerts.page-BNmez0Ak.mjs.map → juice-js-observability-alerts.page-HFFiapGB.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-approvals.page-DBLw-vl1.mjs → juice-js-observability-approvals.page-CU-EP0l4.mjs} +2 -2
- package/fesm2022/{juice-js-observability-approvals.page-DBLw-vl1.mjs.map → juice-js-observability-approvals.page-CU-EP0l4.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-incident.page-D2GvuIft.mjs → juice-js-observability-incident.page-D21BdwGq.mjs} +3 -3
- package/fesm2022/{juice-js-observability-incident.page-D2GvuIft.mjs.map → juice-js-observability-incident.page-D21BdwGq.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-incidents.page-DhC3BkBo.mjs → juice-js-observability-incidents.page-DHD3qgKI.mjs} +2 -2
- package/fesm2022/{juice-js-observability-incidents.page-DhC3BkBo.mjs.map → juice-js-observability-incidents.page-DHD3qgKI.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-load-runs.page-DVuO4zFp.mjs → juice-js-observability-load-runs.page-BalwtIhB.mjs} +2 -2
- package/fesm2022/{juice-js-observability-load-runs.page-DVuO4zFp.mjs.map → juice-js-observability-load-runs.page-BalwtIhB.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-logs.page-PXWQMcvL.mjs → juice-js-observability-logs.page-CpgT6y_E.mjs} +2 -2
- package/fesm2022/{juice-js-observability-logs.page-PXWQMcvL.mjs.map → juice-js-observability-logs.page-CpgT6y_E.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-metrics.page-Ctm_EEFb.mjs → juice-js-observability-metrics.page-CBHK7a9l.mjs} +2 -2
- package/fesm2022/{juice-js-observability-metrics.page-Ctm_EEFb.mjs.map → juice-js-observability-metrics.page-CBHK7a9l.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-notifications.page-CtcV3Ei4.mjs → juice-js-observability-notifications.page-Diy63nji.mjs} +2 -2
- package/fesm2022/{juice-js-observability-notifications.page-CtcV3Ei4.mjs.map → juice-js-observability-notifications.page-Diy63nji.mjs.map} +1 -1
- package/fesm2022/juice-js-observability-overview.page-g4Cv_Y5c.mjs +601 -0
- package/fesm2022/juice-js-observability-overview.page-g4Cv_Y5c.mjs.map +1 -0
- package/fesm2022/{juice-js-observability-resource.page-O4GGdirR.mjs → juice-js-observability-resource.page-DZ7DT_3f.mjs} +2 -2
- package/fesm2022/{juice-js-observability-resource.page-O4GGdirR.mjs.map → juice-js-observability-resource.page-DZ7DT_3f.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-resources.page-B_AVPpes.mjs → juice-js-observability-resources.page-Bp9o-_QG.mjs} +2 -2
- package/fesm2022/{juice-js-observability-resources.page-B_AVPpes.mjs.map → juice-js-observability-resources.page-Bp9o-_QG.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-rules.page-CARCWaw_.mjs → juice-js-observability-rules.page-zvXo2xtw.mjs} +2 -2
- package/fesm2022/{juice-js-observability-rules.page-CARCWaw_.mjs.map → juice-js-observability-rules.page-zvXo2xtw.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-service.page-DRj1GO0Q.mjs → juice-js-observability-service.page-Dx4p3DmT.mjs} +2 -2
- package/fesm2022/{juice-js-observability-service.page-DRj1GO0Q.mjs.map → juice-js-observability-service.page-Dx4p3DmT.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-services.page-BbFbbvyH.mjs → juice-js-observability-services.page-C5-ohRLS.mjs} +2 -2
- package/fesm2022/{juice-js-observability-services.page-BbFbbvyH.mjs.map → juice-js-observability-services.page-C5-ohRLS.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-silences.page-CoTqfGxY.mjs → juice-js-observability-silences.page-CR5LpnsR.mjs} +2 -2
- package/fesm2022/{juice-js-observability-silences.page-CoTqfGxY.mjs.map → juice-js-observability-silences.page-CR5LpnsR.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-slo.page-l7TOat-D.mjs → juice-js-observability-slo.page-BvqkTyKS.mjs} +3 -3
- package/fesm2022/{juice-js-observability-slo.page-l7TOat-D.mjs.map → juice-js-observability-slo.page-BvqkTyKS.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-slos.page-DNG6g6_R.mjs → juice-js-observability-slos.page-CiTI82Sq.mjs} +2 -2
- package/fesm2022/{juice-js-observability-slos.page-DNG6g6_R.mjs.map → juice-js-observability-slos.page-CiTI82Sq.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-suggestions-eQK_z0Nd.mjs → juice-js-observability-suggestions-BNFraGRP.mjs} +2 -2
- package/fesm2022/{juice-js-observability-suggestions-eQK_z0Nd.mjs.map → juice-js-observability-suggestions-BNFraGRP.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-telemetry-DVwUTHSz.mjs → juice-js-observability-telemetry-7uv9jeKI.mjs} +23 -3
- package/fesm2022/juice-js-observability-telemetry-7uv9jeKI.mjs.map +1 -0
- package/fesm2022/{juice-js-observability-timeline.page-CFSigOgk.mjs → juice-js-observability-timeline.page-BcMxG1eb.mjs} +2 -2
- package/fesm2022/{juice-js-observability-timeline.page-CFSigOgk.mjs.map → juice-js-observability-timeline.page-BcMxG1eb.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-topology.page-BDfNpiql.mjs → juice-js-observability-topology.page-Blq_mVC2.mjs} +2 -2
- package/fesm2022/{juice-js-observability-topology.page-BDfNpiql.mjs.map → juice-js-observability-topology.page-Blq_mVC2.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-trace.page-CdW09ADY.mjs → juice-js-observability-trace.page-rr-T5b3i.mjs} +2 -2
- package/fesm2022/{juice-js-observability-trace.page-CdW09ADY.mjs.map → juice-js-observability-trace.page-rr-T5b3i.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-traces.page-CMuItN_m.mjs → juice-js-observability-traces.page-C2z6MUzK.mjs} +2 -2
- package/fesm2022/{juice-js-observability-traces.page-CMuItN_m.mjs.map → juice-js-observability-traces.page-C2z6MUzK.mjs.map} +1 -1
- package/fesm2022/juice-js-observability.mjs +27 -24
- package/fesm2022/juice-js-observability.mjs.map +1 -1
- package/package.json +1 -1
- package/types/juice-js-observability.d.ts +113 -0
- package/fesm2022/juice-js-observability-agent.page-Vb7LDThl.mjs.map +0 -1
- package/fesm2022/juice-js-observability-overview.page-BRGpTOyc.mjs +0 -249
- package/fesm2022/juice-js-observability-overview.page-BRGpTOyc.mjs.map +0 -1
- package/fesm2022/juice-js-observability-telemetry-DVwUTHSz.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"juice-js-observability-services.page-
|
|
1
|
+
{"version":3,"file":"juice-js-observability-services.page-C5-ohRLS.mjs","names":[],"sources":["../../../../projects/juice-js/observability/src/lib/pages/services.page.ts"],"sourcesContent":["import { LinkPipe } from '../core/options';\nimport { ChangeDetectionStrategy, Component, computed, inject, input, signal } from '@angular/core';\nimport { apiResource } from '../shared/resource';\nimport { MatPaginatorModule } from '@angular/material/paginator';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { RouterLink } from '@angular/router';\nimport { SearchablePage } from '@juice-js/layout';\nimport { forkJoin, map } from 'rxjs';\nimport { ApiService } from '../core/api.service';\nimport { ContextService } from '../core/context.service';\nimport { Health, HealthState } from '../core/models';\nimport { AgoPipe, ReasonPipe } from '../shared/format';\nimport { ContextBar, HealthBadge } from '../shared/ui';\nimport { problemText } from '../shared/telemetry';\nimport { screenPages } from '../shared/paging';\n\nconst SEVERITY: HealthState[] = ['Critical', 'Unhealthy', 'Degraded', 'Offline', 'Unknown', 'Healthy'];\n\n/**\n * The service catalog (Console requirements §8): one row per service, environment-independent, with its health in\n * each environment. The toolbar search box filters it.\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [LinkPipe, RouterLink, MatPaginatorModule, MatProgressBarModule, ContextBar, HealthBadge, AgoPipe],\n template: `\n <jc-context-bar><h1>Services</h1>\n @if (state()) { <span class=\"jc-chip\">{{ state() }} <a [routerLink]=\"['services'] | jcLink\" [queryParams]=\"ctx.keep()\">×</a></span> }\n </jc-context-bar>\n @if (data.isLoading()) { <mat-progress-bar mode=\"indeterminate\" /> }\n @if (data.error()) { <p class=\"jc-error\">{{ error() }}</p> }\n @if (capped()) { <p class=\"jc-notice\">Showing the first 5,000 only. Narrow the list with the search box or a filter.</p> }\n <table class=\"jc-table\">\n <thead><tr><th>Service</th><th>Health by environment</th><th>Why</th><th>Last seen</th></tr></thead>\n <tbody>\n @for (s of pages.visible(); track s.id) {\n <tr>\n <td><a [routerLink]=\"['services', s.id] | jcLink\" [queryParams]=\"ctx.keep()\">{{ s.key }}</a></td>\n <td class=\"jc-envs\">\n @for (h of s.health; track h.environment) {\n <span><span class=\"jc-muted jc-small\">{{ h.environment ?? '—' }}</span> <jc-health [state]=\"h.state\" [stale]=\"h.stale\" /></span>\n } @empty { <jc-health [state]=\"null\" /> }\n </td>\n <td class=\"jc-small\">{{ s.worst?.reasons?.slice(0, 2)?.map(reason)?.join(' · ') }}</td>\n <td>{{ s.lastSeen | ago }}</td>\n </tr>\n } @empty { <tr><td colspan=\"4\" class=\"jc-muted\">No services{{ filter() ? ' match \"' + filter() + '\"' : '' }}.</td></tr> }\n </tbody>\n </table>\n @if (pages.needed()) {\n <mat-paginator [length]=\"rows().length\" [pageSize]=\"pages.size()\" [pageIndex]=\"pages.index()\" [pageSizeOptions]=\"pages.sizes\"\n (page)=\"pages.change($event)\" aria-label=\"Pages\" />\n }`,\n})\nexport class ServicesPage implements SearchablePage {\n protected readonly ctx = inject(ContextService);\n private readonly api = inject(ApiService);\n readonly state = input<string>();\n protected readonly filter = signal('');\n private readonly reasonPipe = new ReasonPipe();\n protected readonly reason = (r: string) => this.reasonPipe.transform(r);\n\n protected readonly data = apiResource({\n stream: () => forkJoin({\n services: this.api.resources('service'),\n health: this.api.health({ subjectType: 'service' }),\n }).pipe(map(({ services, health }) => ({\n services: services.items, health: health.items, capped: services.nextCursor !== null || health.nextCursor !== null,\n }))),\n });\n protected readonly capped = computed(() => this.data.value()?.capped ?? false);\n protected readonly error = computed(() => problemText(this.data.error()));\n\n protected readonly rows = computed(() => {\n const data = this.data.value();\n if (!data) return [];\n const env = this.ctx.environment();\n const byService = new Map<string, Health[]>();\n for (const h of data.health) byService.set(h.subjectId, [...(byService.get(h.subjectId) ?? []), h]);\n const q = this.filter().toLowerCase();\n return data.services\n .map(s => {\n const health = (byService.get(s.id) ?? []).filter(h => !env || h.environment === env);\n const worst = [...health].sort((a, b) => SEVERITY.indexOf(a.state) - SEVERITY.indexOf(b.state))[0];\n return { ...s, health, worst };\n })\n // With an environment chosen, only the services seen in it.\n .filter(s => !env || s.health.length > 0)\n .filter(s => !q || s.key.toLowerCase().includes(q))\n .filter(s => !this.state() || s.health.some(h => h.state === this.state()))\n .sort((a, b) => SEVERITY.indexOf(a.worst?.state ?? 'Unknown') - SEVERITY.indexOf(b.worst?.state ?? 'Unknown') || a.key.localeCompare(b.key));\n });\n\n protected readonly pages = screenPages(this.rows);\n\n onSearch(query: string) { this.filter.set(query); }\n}\n"],"mappings":";;;;;;;;;;AAgBA,MAAM,WAA0B;CAAC;CAAY;CAAa;CAAY;CAAW;CAAW;AAAS;AAsCrG,IAAa,eAAb,MAAa,aAAY;CACJ,MAAM,OAAO,cAAc;CAC7B,MAAM,OAAO,UAAU;CAC/B,QAAQ,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CACb,SAAS,OAAO,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CACrB,aAAa,IAAI,WAAU;CACzB,UAAU,MAAc,KAAK,WAAW,UAAU,CAAC;CAEnD,OAAO,YAAY,EACpC,cAAc,SAAS;EACrB,UAAU,KAAK,IAAI,UAAU,SAAS;EACtC,QAAQ,KAAK,IAAI,OAAO,EAAE,aAAa,UAAS,CAAE;CACnD,CAAA,CAAC,CAAC,KAAK,KAAK,EAAE,UAAU,cAAc;EACrC,UAAU,SAAS;EAAO,QAAQ,OAAO;EAAO,QAAQ,SAAS,eAAe,QAAQ,OAAO,eAAe;CAC/G,EAAC,CAAC,EACJ,CAAA;CACkB,SAAS,eAAe,KAAK,KAAK,MAAK,CAAE,EAAE,UAAU,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CAC3D,QAAQ,eAAe,YAAY,KAAK,KAAK,MAAK,CAAE,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAEtD,OAAO,eAAc;EACtC,MAAM,OAAO,KAAK,KAAK,MAAK;EAC5B,IAAI,CAAC,MAAM,OAAO,CAAA;EAClB,MAAM,MAAM,KAAK,IAAI,YAAW;EAChC,MAAM,4BAAY,IAAI,IAAG;EACzB,KAAK,MAAM,KAAK,KAAK,QAAQ,UAAU,I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O;GAC1G,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BX,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiService } from "./juice-js-observability.mjs";
|
|
2
|
-
import { c as ContextBar, h as apiResource, o as problemText } from "./juice-js-observability-telemetry-
|
|
2
|
+
import { c as ContextBar, h as apiResource, o as problemText } from "./juice-js-observability-telemetry-7uv9jeKI.mjs";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
import { ChangeDetectionStrategy, Component, computed, inject, input, signal } from "@angular/core";
|
|
5
5
|
import { DatePipe } from "@angular/common";
|
|
@@ -520,4 +520,4 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
520
520
|
});
|
|
521
521
|
export { SilencesPage };
|
|
522
522
|
|
|
523
|
-
//# sourceMappingURL=juice-js-observability-silences.page-
|
|
523
|
+
//# sourceMappingURL=juice-js-observability-silences.page-CR5LpnsR.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"juice-js-observability-silences.page-CoTqfGxY.mjs","names":[],"sources":["../../../../projects/juice-js/observability/src/lib/pages/silences.page.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, OnInit, computed, inject, input, signal } from '@angular/core';\nimport { DatePipe } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\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 { ApiService } from '../core/api.service';\nimport { Silence } from '../core/models';\nimport { apiResource } from '../shared/resource';\nimport { problemText } from '../shared/telemetry';\nimport { ContextBar } from '../shared/ui';\n\n/**\n * Silences and maintenance windows. Alerts go on firing and resolving under one: only what is sent changes, and what was held is sent when it ends if it still matters. Every\n * silence has an end and a reason, and shows how much it's holding, so a forgotten one can't quietly hide an outage.\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [DatePipe, FormsModule, MatButtonModule, MatCheckboxModule, MatFormFieldModule, MatInputModule, MatProgressBarModule, MatSelectModule, ContextBar],\n template: `\n <jc-context-bar>\n <h1>Silences</h1>\n <span class=\"jc-spacer\"></span>\n <mat-checkbox [ngModel]=\"showAll()\" (ngModelChange)=\"showAll.set($event)\" data-testid=\"silences-all\">Include ended</mat-checkbox>\n </jc-context-bar>\n @if (silences.isLoading()) { <mat-progress-bar mode=\"indeterminate\" /> }\n @if (silences.error()) { <p class=\"jc-error\">{{ error() }}</p> }\n\n <section class=\"jc-card\">\n <h2>New</h2>\n <form class=\"jc-form\" data-testid=\"silence-form\" (ngSubmit)=\"create()\">\n <mat-form-field subscriptSizing=\"dynamic\" class=\"jc-field-sm\"><mat-label>Kind</mat-label>\n <mat-select name=\"kind\" [(ngModel)]=\"kind\"><mat-option value=\"Silence\">Silence, from now</mat-option><mat-option value=\"Maintenance\">Maintenance window</mat-option></mat-select>\n </mat-form-field>\n <mat-form-field subscriptSizing=\"dynamic\" class=\"jc-field-wide\"><mat-label>Why</mat-label><input matInput name=\"comment\" data-testid=\"silence-comment\" [(ngModel)]=\"comment\" maxlength=\"500\"></mat-form-field>\n @if (kind === 'Maintenance') {\n <mat-form-field subscriptSizing=\"dynamic\"><mat-label>Starts</mat-label><input matInput type=\"datetime-local\" name=\"starts\" [(ngModel)]=\"starts\"></mat-form-field>\n <mat-checkbox name=\"weekly\" [(ngModel)]=\"weekly\">Every week</mat-checkbox>\n }\n <mat-form-field subscriptSizing=\"dynamic\" class=\"jc-field-sm\"><mat-label>For (hours)</mat-label><input matInput type=\"number\" min=\"0.1\" step=\"0.5\" name=\"hours\" data-testid=\"silence-hours\" [(ngModel)]=\"hours\"></mat-form-field>\n <p class=\"jc-muted jc-small jc-form-actions\">What to hold. Everything filled in must match.</p>\n <mat-form-field subscriptSizing=\"dynamic\"><mat-label>Service</mat-label><input matInput name=\"service\" data-testid=\"silence-service\" [(ngModel)]=\"serviceField\" [disabled]=\"all\"></mat-form-field>\n <mat-form-field subscriptSizing=\"dynamic\"><mat-label>Environment</mat-label><input matInput name=\"environment\" [(ngModel)]=\"environmentField\" [disabled]=\"all\"></mat-form-field>\n <mat-form-field subscriptSizing=\"dynamic\"><mat-label>Host</mat-label><input matInput name=\"host\" [(ngModel)]=\"hostField\" [disabled]=\"all\"></mat-form-field>\n <mat-form-field subscriptSizing=\"dynamic\"><mat-label>Rules, comma separated</mat-label><input matInput name=\"rules\" [(ngModel)]=\"rules\" [disabled]=\"all\"></mat-form-field>\n <mat-form-field subscriptSizing=\"dynamic\" class=\"jc-field-sm\"><mat-label>Severity up to</mat-label>\n <mat-select name=\"maximum\" [(ngModel)]=\"maximum\" [disabled]=\"all\"><mat-option value=\"\">Any</mat-option><mat-option value=\"Info\">Info</mat-option><mat-option value=\"Warning\">Warning</mat-option></mat-select>\n </mat-form-field>\n <mat-checkbox name=\"all\" [(ngModel)]=\"all\">Everything</mat-checkbox>\n <div class=\"jc-form-actions\">\n <button mat-flat-button type=\"submit\" data-testid=\"silence-save\" [disabled]=\"saving()\">{{ kind === 'Silence' ? 'Silence' : 'Schedule' }}</button>\n @if (saveError()) { <span class=\"jc-error\" data-testid=\"silence-error\">{{ saveError() }}</span> }\n </div>\n </form>\n </section>\n\n <table class=\"jc-table\" data-testid=\"silences\">\n <thead><tr><th>Why</th><th>Holds</th><th>When</th><th>Holding</th><th>By</th><th></th></tr></thead>\n <tbody>\n @for (s of silences.value()?.items ?? []; track s.id) {\n <tr [class.jc-muted]=\"s.cancelledAt\">\n <td><strong>{{ s.comment }}</strong><div class=\"jc-small\">@if (s.active) { <span class=\"jc-badge jc-health-degraded\">Active</span> } @else if (s.cancelledAt) { Cancelled by {{ s.cancelledBy }} } @else { {{ s.kind === 'Maintenance' ? 'Maintenance' : 'Silence' }} }</div></td>\n <td class=\"jc-small\">{{ scope(s) }}</td>\n <td class=\"jc-nowrap jc-small\">{{ s.startsAt | date: 'MMM d, HH:mm' }} to {{ s.endsAt | date: 'MMM d, HH:mm' }}@if (s.repeatWeekly) { <div>every week</div> }</td>\n <td>{{ s.held }}</td>\n <td>{{ s.createdBy }}</td>\n <td class=\"jc-row-actions\">@if (!s.cancelledAt && !over(s)) { <button mat-button type=\"button\" [attr.data-testid]=\"'silence-cancel-' + s.id\" (click)=\"cancel(s)\">End now</button> }</td>\n </tr>\n } @empty { <tr><td colspan=\"6\" class=\"jc-muted\">No silences: every matching alert notifies.</td></tr> }\n </tbody>\n </table>`,\n})\nexport class SilencesPage implements OnInit {\n private readonly api = inject(ApiService);\n /** Filled in from an alert's \"Silence this\". */\n readonly service = input<string>();\n readonly environment = input<string>();\n readonly host = input<string>();\n\n protected readonly showAll = signal(false);\n protected readonly saving = signal(false);\n protected readonly saveError = signal('');\n protected kind = 'Silence';\n protected comment = '';\n protected hours = 1;\n protected starts = '';\n protected weekly = false;\n protected serviceField = '';\n protected environmentField = '';\n protected hostField = '';\n protected rules = '';\n protected maximum = '';\n protected all = false;\n\n protected readonly silences = apiResource({ params: () => ({ all: this.showAll() }), stream: ({ params }) => this.api.silences({ all: params.all || null }) });\n protected readonly error = computed(() => problemText(this.silences.error()));\n\n ngOnInit() {\n this.serviceField = this.service() ?? '';\n this.environmentField = this.environment() ?? '';\n this.hostField = this.host() ?? '';\n }\n\n protected scope(s: Silence): string {\n if (s.allAlerts) return 'Everything';\n return [s.service, s.environment, s.host, s.ruleKeys.join(', '), s.maximumSeverity ? `up to ${s.maximumSeverity}` : ''].filter(Boolean).join(' · ');\n }\n\n protected over(s: Silence): boolean { return !s.repeatWeekly && new Date(s.endsAt).getTime() <= Date.now(); }\n\n protected create() {\n const start = this.kind === 'Maintenance' && this.starts ? new Date(this.starts) : new Date();\n const end = new Date(start.getTime() + (this.hours || 0) * 3_600_000);\n this.saving.set(true);\n this.saveError.set('');\n this.api.createSilence({\n kind: this.kind, comment: this.comment, startsAt: this.kind === 'Maintenance' ? start.toISOString() : undefined, endsAt: end.toISOString(), repeatWeekly: this.kind === 'Maintenance' && this.weekly,\n allAlerts: this.all, service: this.all ? undefined : this.serviceField, environment: this.all ? undefined : this.environmentField, host: this.all ? undefined : this.hostField,\n ruleKeys: this.all ? [] : this.rules.split(',').map(r => r.trim()).filter(Boolean), maximumSeverity: this.all ? undefined : this.maximum || undefined,\n }).subscribe({\n next: () => { this.saving.set(false); this.comment = ''; this.silences.reload(); },\n error: e => { this.saving.set(false); this.saveError.set((e as { status?: number }).status === 403 ? 'Silencing needs the operator or admin role.' : problemText(e)); },\n });\n }\n\n protected cancel(s: Silence) {\n this.api.cancelSilence(s.id).subscribe({\n next: () => this.silences.reload(),\n error: e => this.saveError.set((e as { status?: number }).status === 403 ? 'Ending a silence needs the operator or admin role.' : problemText(e)),\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA2EA,IAAa,eAAb,MAAa,aAAY;CACN,MAAM,OAAO,UAAU;CAE/B,UAAU,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CACzB,cAAc,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAC7B,OAAO,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAEZ,UAAU,OAAO,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CACvB,SAAS,OAAO,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CACtB,YAAY,OAAO,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAC/B,OAAO;CACP,UAAU;CACV,QAAQ;CACR,SAAS;CACT,SAAS;CACT,eAAe;CACf,mBAAmB;CACnB,YAAY;CACZ,QAAQ;CACR,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A,UAAA;CAAA,MAAA;CAAY,YAAA,CAAA;EAxDxB,MAAA;EAAU,MAAA,CAAA;GACT,iBAAiB,wBAAwB;GACzC,SAAS;IAAC;IAAU;IAAa;IAAiB;IAAmB;IAAoB;IAAgB;IAAsB;IAAiB;GAAU;GAC1J,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoDX,CAAA"}
|
|
1
|
+
{"version":3,"file":"juice-js-observability-silences.page-CR5LpnsR.mjs","names":[],"sources":["../../../../projects/juice-js/observability/src/lib/pages/silences.page.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, OnInit, computed, inject, input, signal } from '@angular/core';\nimport { DatePipe } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\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 { ApiService } from '../core/api.service';\nimport { Silence } from '../core/models';\nimport { apiResource } from '../shared/resource';\nimport { problemText } from '../shared/telemetry';\nimport { ContextBar } from '../shared/ui';\n\n/**\n * Silences and maintenance windows. Alerts go on firing and resolving under one: only what is sent changes, and what was held is sent when it ends if it still matters. Every\n * silence has an end and a reason, and shows how much it's holding, so a forgotten one can't quietly hide an outage.\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [DatePipe, FormsModule, MatButtonModule, MatCheckboxModule, MatFormFieldModule, MatInputModule, MatProgressBarModule, MatSelectModule, ContextBar],\n template: `\n <jc-context-bar>\n <h1>Silences</h1>\n <span class=\"jc-spacer\"></span>\n <mat-checkbox [ngModel]=\"showAll()\" (ngModelChange)=\"showAll.set($event)\" data-testid=\"silences-all\">Include ended</mat-checkbox>\n </jc-context-bar>\n @if (silences.isLoading()) { <mat-progress-bar mode=\"indeterminate\" /> }\n @if (silences.error()) { <p class=\"jc-error\">{{ error() }}</p> }\n\n <section class=\"jc-card\">\n <h2>New</h2>\n <form class=\"jc-form\" data-testid=\"silence-form\" (ngSubmit)=\"create()\">\n <mat-form-field subscriptSizing=\"dynamic\" class=\"jc-field-sm\"><mat-label>Kind</mat-label>\n <mat-select name=\"kind\" [(ngModel)]=\"kind\"><mat-option value=\"Silence\">Silence, from now</mat-option><mat-option value=\"Maintenance\">Maintenance window</mat-option></mat-select>\n </mat-form-field>\n <mat-form-field subscriptSizing=\"dynamic\" class=\"jc-field-wide\"><mat-label>Why</mat-label><input matInput name=\"comment\" data-testid=\"silence-comment\" [(ngModel)]=\"comment\" maxlength=\"500\"></mat-form-field>\n @if (kind === 'Maintenance') {\n <mat-form-field subscriptSizing=\"dynamic\"><mat-label>Starts</mat-label><input matInput type=\"datetime-local\" name=\"starts\" [(ngModel)]=\"starts\"></mat-form-field>\n <mat-checkbox name=\"weekly\" [(ngModel)]=\"weekly\">Every week</mat-checkbox>\n }\n <mat-form-field subscriptSizing=\"dynamic\" class=\"jc-field-sm\"><mat-label>For (hours)</mat-label><input matInput type=\"number\" min=\"0.1\" step=\"0.5\" name=\"hours\" data-testid=\"silence-hours\" [(ngModel)]=\"hours\"></mat-form-field>\n <p class=\"jc-muted jc-small jc-form-actions\">What to hold. Everything filled in must match.</p>\n <mat-form-field subscriptSizing=\"dynamic\"><mat-label>Service</mat-label><input matInput name=\"service\" data-testid=\"silence-service\" [(ngModel)]=\"serviceField\" [disabled]=\"all\"></mat-form-field>\n <mat-form-field subscriptSizing=\"dynamic\"><mat-label>Environment</mat-label><input matInput name=\"environment\" [(ngModel)]=\"environmentField\" [disabled]=\"all\"></mat-form-field>\n <mat-form-field subscriptSizing=\"dynamic\"><mat-label>Host</mat-label><input matInput name=\"host\" [(ngModel)]=\"hostField\" [disabled]=\"all\"></mat-form-field>\n <mat-form-field subscriptSizing=\"dynamic\"><mat-label>Rules, comma separated</mat-label><input matInput name=\"rules\" [(ngModel)]=\"rules\" [disabled]=\"all\"></mat-form-field>\n <mat-form-field subscriptSizing=\"dynamic\" class=\"jc-field-sm\"><mat-label>Severity up to</mat-label>\n <mat-select name=\"maximum\" [(ngModel)]=\"maximum\" [disabled]=\"all\"><mat-option value=\"\">Any</mat-option><mat-option value=\"Info\">Info</mat-option><mat-option value=\"Warning\">Warning</mat-option></mat-select>\n </mat-form-field>\n <mat-checkbox name=\"all\" [(ngModel)]=\"all\">Everything</mat-checkbox>\n <div class=\"jc-form-actions\">\n <button mat-flat-button type=\"submit\" data-testid=\"silence-save\" [disabled]=\"saving()\">{{ kind === 'Silence' ? 'Silence' : 'Schedule' }}</button>\n @if (saveError()) { <span class=\"jc-error\" data-testid=\"silence-error\">{{ saveError() }}</span> }\n </div>\n </form>\n </section>\n\n <table class=\"jc-table\" data-testid=\"silences\">\n <thead><tr><th>Why</th><th>Holds</th><th>When</th><th>Holding</th><th>By</th><th></th></tr></thead>\n <tbody>\n @for (s of silences.value()?.items ?? []; track s.id) {\n <tr [class.jc-muted]=\"s.cancelledAt\">\n <td><strong>{{ s.comment }}</strong><div class=\"jc-small\">@if (s.active) { <span class=\"jc-badge jc-health-degraded\">Active</span> } @else if (s.cancelledAt) { Cancelled by {{ s.cancelledBy }} } @else { {{ s.kind === 'Maintenance' ? 'Maintenance' : 'Silence' }} }</div></td>\n <td class=\"jc-small\">{{ scope(s) }}</td>\n <td class=\"jc-nowrap jc-small\">{{ s.startsAt | date: 'MMM d, HH:mm' }} to {{ s.endsAt | date: 'MMM d, HH:mm' }}@if (s.repeatWeekly) { <div>every week</div> }</td>\n <td>{{ s.held }}</td>\n <td>{{ s.createdBy }}</td>\n <td class=\"jc-row-actions\">@if (!s.cancelledAt && !over(s)) { <button mat-button type=\"button\" [attr.data-testid]=\"'silence-cancel-' + s.id\" (click)=\"cancel(s)\">End now</button> }</td>\n </tr>\n } @empty { <tr><td colspan=\"6\" class=\"jc-muted\">No silences: every matching alert notifies.</td></tr> }\n </tbody>\n </table>`,\n})\nexport class SilencesPage implements OnInit {\n private readonly api = inject(ApiService);\n /** Filled in from an alert's \"Silence this\". */\n readonly service = input<string>();\n readonly environment = input<string>();\n readonly host = input<string>();\n\n protected readonly showAll = signal(false);\n protected readonly saving = signal(false);\n protected readonly saveError = signal('');\n protected kind = 'Silence';\n protected comment = '';\n protected hours = 1;\n protected starts = '';\n protected weekly = false;\n protected serviceField = '';\n protected environmentField = '';\n protected hostField = '';\n protected rules = '';\n protected maximum = '';\n protected all = false;\n\n protected readonly silences = apiResource({ params: () => ({ all: this.showAll() }), stream: ({ params }) => this.api.silences({ all: params.all || null }) });\n protected readonly error = computed(() => problemText(this.silences.error()));\n\n ngOnInit() {\n this.serviceField = this.service() ?? '';\n this.environmentField = this.environment() ?? '';\n this.hostField = this.host() ?? '';\n }\n\n protected scope(s: Silence): string {\n if (s.allAlerts) return 'Everything';\n return [s.service, s.environment, s.host, s.ruleKeys.join(', '), s.maximumSeverity ? `up to ${s.maximumSeverity}` : ''].filter(Boolean).join(' · ');\n }\n\n protected over(s: Silence): boolean { return !s.repeatWeekly && new Date(s.endsAt).getTime() <= Date.now(); }\n\n protected create() {\n const start = this.kind === 'Maintenance' && this.starts ? new Date(this.starts) : new Date();\n const end = new Date(start.getTime() + (this.hours || 0) * 3_600_000);\n this.saving.set(true);\n this.saveError.set('');\n this.api.createSilence({\n kind: this.kind, comment: this.comment, startsAt: this.kind === 'Maintenance' ? start.toISOString() : undefined, endsAt: end.toISOString(), repeatWeekly: this.kind === 'Maintenance' && this.weekly,\n allAlerts: this.all, service: this.all ? undefined : this.serviceField, environment: this.all ? undefined : this.environmentField, host: this.all ? undefined : this.hostField,\n ruleKeys: this.all ? [] : this.rules.split(',').map(r => r.trim()).filter(Boolean), maximumSeverity: this.all ? undefined : this.maximum || undefined,\n }).subscribe({\n next: () => { this.saving.set(false); this.comment = ''; this.silences.reload(); },\n error: e => { this.saving.set(false); this.saveError.set((e as { status?: number }).status === 403 ? 'Silencing needs the operator or admin role.' : problemText(e)); },\n });\n }\n\n protected cancel(s: Silence) {\n this.api.cancelSilence(s.id).subscribe({\n next: () => this.silences.reload(),\n error: e => this.saveError.set((e as { status?: number }).status === 403 ? 'Ending a silence needs the operator or admin role.' : problemText(e)),\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA2EA,IAAa,eAAb,MAAa,aAAY;CACN,MAAM,OAAO,UAAU;CAE/B,UAAU,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CACzB,cAAc,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAC7B,OAAO,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAEZ,UAAU,OAAO,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CACvB,SAAS,OAAO,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CACtB,YAAY,OAAO,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAC/B,OAAO;CACP,UAAU;CACV,QAAQ;CACR,SAAS;CACT,SAAS;CACT,eAAe;CACf,mBAAmB;CACnB,YAAY;CACZ,QAAQ;CACR,UAAU;CACV,MAAM;CAEG,WAAW,YAAY;EAAE,eAAe,EAAE,KAAK,KAAK,QAAO,EAAE;EAAK,SAAS,EAAE,aAAa,KAAK,IAAI,SAAS,EAAE,KAAK,OAAO,OAAO,KAAI,CAAE;CAAC,CAAE;CAC1I,QAAQ,eAAe,YAAY,KAAK,SAAS,MAAK,CAAE,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAE7E,WAAQ;EACN,KAAK,eAAe,KAAK,QAAO,KAAM;EACtC,KAAK,mB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
|
-
import { c as ContextBar, h as apiResource, o as problemText } from "./juice-js-observability-telemetry-
|
|
3
|
-
import { burnText, objective, percent, sloState, times } from "./juice-js-observability-slos.page-
|
|
2
|
+
import { c as ContextBar, h as apiResource, o as problemText } from "./juice-js-observability-telemetry-7uv9jeKI.mjs";
|
|
3
|
+
import { burnText, objective, percent, sloState, times } from "./juice-js-observability-slos.page-CiTI82Sq.mjs";
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
import { ChangeDetectionStrategy, Component, computed, inject, input } from "@angular/core";
|
|
6
6
|
import { RouterLink } from "@angular/router";
|
|
@@ -411,4 +411,4 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
411
411
|
});
|
|
412
412
|
export { SloPage };
|
|
413
413
|
|
|
414
|
-
//# sourceMappingURL=juice-js-observability-slo.page-
|
|
414
|
+
//# sourceMappingURL=juice-js-observability-slo.page-BvqkTyKS.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"juice-js-observability-slo.page-l7TOat-D.mjs","names":[],"sources":["../../../../projects/juice-js/observability/src/lib/pages/slo.page.ts"],"sourcesContent":["import { DatePipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { RouterLink } from '@angular/router';\nimport { ApiService } from '../core/api.service';\nimport { ContextService } from '../core/context.service';\nimport { SloDay, SloDefinition, SloSummary } from '../core/models';\nimport { LinkPipe } from '../core/options';\nimport { apiResource } from '../shared/resource';\nimport { problemText } from '../shared/telemetry';\nimport { ContextBar } from '../shared/ui';\nimport { burnText, objective, percent, sloState, times } from './slos.page';\n\nconst WINDOWS: Record<string, string> = { '5m': '5 minutes', '30m': '30 minutes', '1h': '1 hour', '6h': '6 hours', '3d': '3 days' };\n\n/**\n * One SLO (roadmap Phase 9): its budget over the last 30 days, how fast it burns in each window, its days, what counts as a request, and its versions.\n * A window with too few requests, or too many minutes that weren't counted, says so instead of a figure.\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [RouterLink, LinkPipe, DatePipe, MatProgressBarModule, ContextBar],\n template: `\n <jc-context-bar>\n <a class=\"jc-crumb\" [routerLink]=\"['slos'] | jcLink\" [queryParams]=\"ctx.keep()\">SLOs</a><span class=\"jc-crumb-sep\">›</span>\n <h1>{{ detail.value()?.slo?.name ?? key() }}</h1>\n </jc-context-bar>\n @if (detail.isLoading() && !detail.value()) { <mat-progress-bar mode=\"indeterminate\" /> }\n @if (detail.error()) { <p class=\"jc-error\">{{ error() }}</p> }\n @if (detail.value(); as d) {\n <p class=\"jc-summary\">\n <span class=\"jc-badge\" [class]=\"state(d.slo.state).css\" data-testid=\"slo-state\">{{ state(d.slo.state).text }}</span>\n <strong>{{ objective(d.slo) }}</strong> · {{ d.slo.category }} · {{ d.slo.service }} in {{ d.slo.environment }} · version {{ d.slo.version }}\n @if (d.slo.pendingVersion) { <span class=\"jc-muted\"> (version {{ d.slo.pendingVersion }} pending)</span> }\n @if (d.slo.retired) { <span class=\"jc-muted\"> · retired</span> }\n </p>\n\n <section class=\"jc-card\" data-testid=\"slo-budget\">\n <h2>Error budget, last 30 days</h2>\n @switch (d.slo.state) {\n @case ('Unknown') {\n <p data-testid=\"slo-budget-unknown\">Only {{ percent(d.slo.coverage, 1) }} of the last 30 days' minutes are counted, so there's no budget to show yet. Minutes that weren't\n read are never taken as good: either counting is still catching up, or telemetry didn't arrive.</p>\n }\n @case ('InsufficientData') {\n <p>{{ d.slo.total.toLocaleString() }} requests in 30 days: too few to say whether the objective is met.</p>\n }\n @default {\n <p><strong>{{ percent(d.slo.attainment, 3) }}</strong> of {{ d.slo.total.toLocaleString() }} requests were good, against an objective of {{ d.slo.target }}%.</p>\n @if ((d.slo.budgetUsed ?? 0) <= 1) {\n <p>{{ percent(d.slo.budgetUsed, 1) }} of the budget is used ({{ d.slo.bad.toLocaleString() }} bad of {{ allowed(d.slo).toLocaleString() }} allowed),\n {{ percent(d.slo.budgetRemaining, 1) }} left.</p>\n } @else {\n <p class=\"jc-bad\">The budget is overspent: {{ d.slo.bad.toLocaleString() }} bad requests against {{ allowed(d.slo).toLocaleString() }} allowed, {{ times(d.slo.budgetUsed!) }} the budget.</p>\n }\n }\n }\n </section>\n\n <section class=\"jc-card\" data-testid=\"slo-burn\">\n <h2>Burn rate</h2>\n <p class=\"jc-muted jc-small\">How fast the budget is being spent: 1× spends it exactly over 30 days. A window needs enough requests, and nearly all its minutes counted.</p>\n <table class=\"jc-table\">\n <thead><tr><th>Window</th><th>Requests</th><th>Good</th><th>Burn rate</th></tr></thead>\n <tbody>\n @for (w of d.slo.burn; track w.name) {\n <tr [attr.data-testid]=\"'slo-burn-' + w.name\">\n <td>{{ windowName(w.name) }}</td><td>{{ w.total.toLocaleString() }}</td><td>{{ percent(w.attainment, 2) }}</td><td>{{ burn(w) }}</td>\n </tr>\n }\n </tbody>\n </table>\n </section>\n\n <section class=\"jc-card\" data-testid=\"slo-alerts\">\n <h2>Burn alerts</h2>\n <p class=\"jc-muted jc-small\">Fast burn (14.4× over 1 hour and 5 minutes) is critical; slow burn (6× over 6 hours and 30 minutes, 1× over 3 days and 6 hours) a warning.\n Each fires when both its windows reach the rate and resolves when its short window is under it, then waits at least 10 minutes before firing\n again. A window without a rate holds the alert as it is.</p>\n @if (d.alerts.length) {\n <table class=\"jc-table\">\n <thead><tr><th>Alert</th><th>State</th><th>Fired</th><th>Resolved</th><th>Burn rate</th></tr></thead>\n <tbody>\n @for (a of d.alerts; track a.id) {\n <tr [attr.data-testid]=\"'slo-alert-' + a.rule\">\n <td><a [routerLink]=\"['alerts', a.id] | jcLink\" [queryParams]=\"ctx.keep()\">{{ a.rule }}</a> <span class=\"jc-muted jc-small\">{{ a.severity }}</span></td>\n <td>{{ a.state }}@if (a.noData && a.state !== 'Resolved') { <span class=\"jc-muted jc-small\"> · held: a window has no rate</span> }</td>\n <td class=\"jc-nowrap\">{{ a.firedAt | date: 'MMM d, HH:mm' }}</td>\n <td class=\"jc-nowrap\">{{ a.resolvedAt ? (a.resolvedAt | date: 'MMM d, HH:mm') : '—' }}</td>\n <td>{{ a.burnRate === null ? '—' : times(a.burnRate) }}</td>\n </tr>\n }\n </tbody>\n </table>\n } @else { <p class=\"jc-muted\">No burn alerts yet.</p> }\n </section>\n\n <section class=\"jc-card\" data-testid=\"slo-days\">\n <h2>By day</h2>\n @if (d.days.length) {\n <table class=\"jc-table\">\n <thead><tr><th>Day</th><th>Requests</th><th>Good</th><th>Left out</th><th>Minutes counted</th></tr></thead>\n <tbody>\n @for (day of daysNewestFirst(d.days); track day.day) {\n <tr>\n <td class=\"jc-nowrap\">{{ day.day | date: 'MMM d' : 'UTC' }}</td>\n <td>{{ day.total.toLocaleString() }}</td>\n <td [class.jc-bad]=\"day.attainment !== null && day.attainment * 100 < d.slo.target\">{{ percent(day.attainment, 3) }}</td>\n <td class=\"jc-small\">{{ excluded(day) }}</td>\n <td [class.jc-bad]=\"day.minutes < day.expectedMinutes && !isToday(day)\">{{ day.minutes }} of {{ day.expectedMinutes }}</td>\n </tr>\n }\n </tbody>\n </table>\n } @else { <p class=\"jc-muted\">Nothing counted yet.</p> }\n </section>\n\n <section class=\"jc-card\" data-testid=\"slo-eligibility\">\n <h2>What counts</h2>\n <ul class=\"jc-small\">\n <li>Requests to <strong>{{ d.definition.service }}</strong> in {{ d.definition.environment }}: its server and consumer spans,\n {{ d.definition.operations.length ? 'only ' + d.definition.operations.join(', ') : 'every operation' }}.</li>\n <li>Never counted: {{ d.definition.excludeOperations.join(', ') || 'nothing' }} (health checks and the like).</li>\n <li>5xx, 429, a failed span and a failed message are bad.</li>\n <li>Other 4xx (the client's mistake): {{ clientErrors(d.definition) }}.</li>\n <li>408 and 499 (the client gave up): {{ d.definition.cancellations === 'Bad' ? 'counted as bad' : 'not counted' }}.</li>\n <li>Retries: each attempt the service received is its own request.</li>\n @if (d.definition.sli === 'Latency') { <li>Latency counts requests that succeeded: good at {{ d.definition.thresholdMs }} ms or less.</li> }\n </ul>\n </section>\n\n <section class=\"jc-card\" data-testid=\"slo-versions\">\n <h2>Versions</h2>\n <table class=\"jc-table\">\n <thead><tr><th>Version</th><th>Objective</th><th>From</th><th>Status</th><th>Loaded</th></tr></thead>\n <tbody>\n @for (v of d.versions; track v.version) {\n <tr [attr.data-testid]=\"'slo-version-' + v.version\">\n <td>{{ v.version }}</td><td>{{ objective(v.definition) }}</td><td class=\"jc-nowrap\">{{ v.effectiveFrom | date: 'MMM d, HH:mm' }}</td>\n <td>{{ v.status }}</td><td class=\"jc-small\">{{ v.createdAt | date: 'MMM d, HH:mm' }} by {{ v.createdBy }}</td>\n </tr>\n }\n </tbody>\n </table>\n <p class=\"jc-muted jc-small\">Each minute is counted under the version in effect then, so a new objective doesn't rewrite the past.</p>\n </section>\n }\n `,\n})\nexport class SloPage {\n readonly key = input.required<string>();\n protected readonly ctx = inject(ContextService);\n private readonly api = inject(ApiService);\n protected readonly detail = apiResource({ params: () => this.key(), stream: ({ params }) => this.api.slo(params) });\n protected readonly error = computed(() => problemText(this.detail.error()));\n protected readonly objective = objective;\n protected readonly percent = percent;\n protected readonly burn = burnText;\n\n protected readonly state = sloState;\n protected readonly times = times;\n protected windowName(name: string) { return WINDOWS[name] ?? name; }\n /** The API's allowance: each version's requests at its own target, so it agrees with the budget used. */\n protected allowed(s: SloSummary) { return Math.round(s.budgetAllowed); }\n protected daysNewestFirst(days: SloDay[]) { return [...days].reverse(); }\n protected isToday(day: SloDay) { return day.day.slice(0, 10) === new Date().toISOString().slice(0, 10); }\n protected excluded(day: SloDay) {\n const parts = [[day.excludedHealth, 'health checks'], [day.excludedCancelled, 'given up'], [day.excludedClientErrors, 'client errors']]\n .filter(([n]) => (n as number) > 0).map(([n, what]) => `${(n as number).toLocaleString()} ${what}`);\n return parts.length ? parts.join(', ') : '—';\n }\n protected clientErrors(d: SloDefinition) { return d.clientErrors === 'Bad' ? 'bad' : d.clientErrors === 'Exclude' ? 'not counted' : 'counted as good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,iBAAiB,wBAAwB;GACzC,SAAS;IAAC;IAAY;IAAU;IAAU;IAAsB;GAAU;GAC1E,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8HX,CAAA"}
|
|
1
|
+
{"version":3,"file":"juice-js-observability-slo.page-BvqkTyKS.mjs","names":[],"sources":["../../../../projects/juice-js/observability/src/lib/pages/slo.page.ts"],"sourcesContent":["import { DatePipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { RouterLink } from '@angular/router';\nimport { ApiService } from '../core/api.service';\nimport { ContextService } from '../core/context.service';\nimport { SloDay, SloDefinition, SloSummary } from '../core/models';\nimport { LinkPipe } from '../core/options';\nimport { apiResource } from '../shared/resource';\nimport { problemText } from '../shared/telemetry';\nimport { ContextBar } from '../shared/ui';\nimport { burnText, objective, percent, sloState, times } from './slos.page';\n\nconst WINDOWS: Record<string, string> = { '5m': '5 minutes', '30m': '30 minutes', '1h': '1 hour', '6h': '6 hours', '3d': '3 days' };\n\n/**\n * One SLO (roadmap Phase 9): its budget over the last 30 days, how fast it burns in each window, its days, what counts as a request, and its versions.\n * A window with too few requests, or too many minutes that weren't counted, says so instead of a figure.\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [RouterLink, LinkPipe, DatePipe, MatProgressBarModule, ContextBar],\n template: `\n <jc-context-bar>\n <a class=\"jc-crumb\" [routerLink]=\"['slos'] | jcLink\" [queryParams]=\"ctx.keep()\">SLOs</a><span class=\"jc-crumb-sep\">›</span>\n <h1>{{ detail.value()?.slo?.name ?? key() }}</h1>\n </jc-context-bar>\n @if (detail.isLoading() && !detail.value()) { <mat-progress-bar mode=\"indeterminate\" /> }\n @if (detail.error()) { <p class=\"jc-error\">{{ error() }}</p> }\n @if (detail.value(); as d) {\n <p class=\"jc-summary\">\n <span class=\"jc-badge\" [class]=\"state(d.slo.state).css\" data-testid=\"slo-state\">{{ state(d.slo.state).text }}</span>\n <strong>{{ objective(d.slo) }}</strong> · {{ d.slo.category }} · {{ d.slo.service }} in {{ d.slo.environment }} · version {{ d.slo.version }}\n @if (d.slo.pendingVersion) { <span class=\"jc-muted\"> (version {{ d.slo.pendingVersion }} pending)</span> }\n @if (d.slo.retired) { <span class=\"jc-muted\"> · retired</span> }\n </p>\n\n <section class=\"jc-card\" data-testid=\"slo-budget\">\n <h2>Error budget, last 30 days</h2>\n @switch (d.slo.state) {\n @case ('Unknown') {\n <p data-testid=\"slo-budget-unknown\">Only {{ percent(d.slo.coverage, 1) }} of the last 30 days' minutes are counted, so there's no budget to show yet. Minutes that weren't\n read are never taken as good: either counting is still catching up, or telemetry didn't arrive.</p>\n }\n @case ('InsufficientData') {\n <p>{{ d.slo.total.toLocaleString() }} requests in 30 days: too few to say whether the objective is met.</p>\n }\n @default {\n <p><strong>{{ percent(d.slo.attainment, 3) }}</strong> of {{ d.slo.total.toLocaleString() }} requests were good, against an objective of {{ d.slo.target }}%.</p>\n @if ((d.slo.budgetUsed ?? 0) <= 1) {\n <p>{{ percent(d.slo.budgetUsed, 1) }} of the budget is used ({{ d.slo.bad.toLocaleString() }} bad of {{ allowed(d.slo).toLocaleString() }} allowed),\n {{ percent(d.slo.budgetRemaining, 1) }} left.</p>\n } @else {\n <p class=\"jc-bad\">The budget is overspent: {{ d.slo.bad.toLocaleString() }} bad requests against {{ allowed(d.slo).toLocaleString() }} allowed, {{ times(d.slo.budgetUsed!) }} the budget.</p>\n }\n }\n }\n </section>\n\n <section class=\"jc-card\" data-testid=\"slo-burn\">\n <h2>Burn rate</h2>\n <p class=\"jc-muted jc-small\">How fast the budget is being spent: 1× spends it exactly over 30 days. A window needs enough requests, and nearly all its minutes counted.</p>\n <table class=\"jc-table\">\n <thead><tr><th>Window</th><th>Requests</th><th>Good</th><th>Burn rate</th></tr></thead>\n <tbody>\n @for (w of d.slo.burn; track w.name) {\n <tr [attr.data-testid]=\"'slo-burn-' + w.name\">\n <td>{{ windowName(w.name) }}</td><td>{{ w.total.toLocaleString() }}</td><td>{{ percent(w.attainment, 2) }}</td><td>{{ burn(w) }}</td>\n </tr>\n }\n </tbody>\n </table>\n </section>\n\n <section class=\"jc-card\" data-testid=\"slo-alerts\">\n <h2>Burn alerts</h2>\n <p class=\"jc-muted jc-small\">Fast burn (14.4× over 1 hour and 5 minutes) is critical; slow burn (6× over 6 hours and 30 minutes, 1× over 3 days and 6 hours) a warning.\n Each fires when both its windows reach the rate and resolves when its short window is under it, then waits at least 10 minutes before firing\n again. A window without a rate holds the alert as it is.</p>\n @if (d.alerts.length) {\n <table class=\"jc-table\">\n <thead><tr><th>Alert</th><th>State</th><th>Fired</th><th>Resolved</th><th>Burn rate</th></tr></thead>\n <tbody>\n @for (a of d.alerts; track a.id) {\n <tr [attr.data-testid]=\"'slo-alert-' + a.rule\">\n <td><a [routerLink]=\"['alerts', a.id] | jcLink\" [queryParams]=\"ctx.keep()\">{{ a.rule }}</a> <span class=\"jc-muted jc-small\">{{ a.severity }}</span></td>\n <td>{{ a.state }}@if (a.noData && a.state !== 'Resolved') { <span class=\"jc-muted jc-small\"> · held: a window has no rate</span> }</td>\n <td class=\"jc-nowrap\">{{ a.firedAt | date: 'MMM d, HH:mm' }}</td>\n <td class=\"jc-nowrap\">{{ a.resolvedAt ? (a.resolvedAt | date: 'MMM d, HH:mm') : '—' }}</td>\n <td>{{ a.burnRate === null ? '—' : times(a.burnRate) }}</td>\n </tr>\n }\n </tbody>\n </table>\n } @else { <p class=\"jc-muted\">No burn alerts yet.</p> }\n </section>\n\n <section class=\"jc-card\" data-testid=\"slo-days\">\n <h2>By day</h2>\n @if (d.days.length) {\n <table class=\"jc-table\">\n <thead><tr><th>Day</th><th>Requests</th><th>Good</th><th>Left out</th><th>Minutes counted</th></tr></thead>\n <tbody>\n @for (day of daysNewestFirst(d.days); track day.day) {\n <tr>\n <td class=\"jc-nowrap\">{{ day.day | date: 'MMM d' : 'UTC' }}</td>\n <td>{{ day.total.toLocaleString() }}</td>\n <td [class.jc-bad]=\"day.attainment !== null && day.attainment * 100 < d.slo.target\">{{ percent(day.attainment, 3) }}</td>\n <td class=\"jc-small\">{{ excluded(day) }}</td>\n <td [class.jc-bad]=\"day.minutes < day.expectedMinutes && !isToday(day)\">{{ day.minutes }} of {{ day.expectedMinutes }}</td>\n </tr>\n }\n </tbody>\n </table>\n } @else { <p class=\"jc-muted\">Nothing counted yet.</p> }\n </section>\n\n <section class=\"jc-card\" data-testid=\"slo-eligibility\">\n <h2>What counts</h2>\n <ul class=\"jc-small\">\n <li>Requests to <strong>{{ d.definition.service }}</strong> in {{ d.definition.environment }}: its server and consumer spans,\n {{ d.definition.operations.length ? 'only ' + d.definition.operations.join(', ') : 'every operation' }}.</li>\n <li>Never counted: {{ d.definition.excludeOperations.join(', ') || 'nothing' }} (health checks and the like).</li>\n <li>5xx, 429, a failed span and a failed message are bad.</li>\n <li>Other 4xx (the client's mistake): {{ clientErrors(d.definition) }}.</li>\n <li>408 and 499 (the client gave up): {{ d.definition.cancellations === 'Bad' ? 'counted as bad' : 'not counted' }}.</li>\n <li>Retries: each attempt the service received is its own request.</li>\n @if (d.definition.sli === 'Latency') { <li>Latency counts requests that succeeded: good at {{ d.definition.thresholdMs }} ms or less.</li> }\n </ul>\n </section>\n\n <section class=\"jc-card\" data-testid=\"slo-versions\">\n <h2>Versions</h2>\n <table class=\"jc-table\">\n <thead><tr><th>Version</th><th>Objective</th><th>From</th><th>Status</th><th>Loaded</th></tr></thead>\n <tbody>\n @for (v of d.versions; track v.version) {\n <tr [attr.data-testid]=\"'slo-version-' + v.version\">\n <td>{{ v.version }}</td><td>{{ objective(v.definition) }}</td><td class=\"jc-nowrap\">{{ v.effectiveFrom | date: 'MMM d, HH:mm' }}</td>\n <td>{{ v.status }}</td><td class=\"jc-small\">{{ v.createdAt | date: 'MMM d, HH:mm' }} by {{ v.createdBy }}</td>\n </tr>\n }\n </tbody>\n </table>\n <p class=\"jc-muted jc-small\">Each minute is counted under the version in effect then, so a new objective doesn't rewrite the past.</p>\n </section>\n }\n `,\n})\nexport class SloPage {\n readonly key = input.required<string>();\n protected readonly ctx = inject(ContextService);\n private readonly api = inject(ApiService);\n protected readonly detail = apiResource({ params: () => this.key(), stream: ({ params }) => this.api.slo(params) });\n protected readonly error = computed(() => problemText(this.detail.error()));\n protected readonly objective = objective;\n protected readonly percent = percent;\n protected readonly burn = burnText;\n\n protected readonly state = sloState;\n protected readonly times = times;\n protected windowName(name: string) { return WINDOWS[name] ?? name; }\n /** The API's allowance: each version's requests at its own target, so it agrees with the budget used. */\n protected allowed(s: SloSummary) { return Math.round(s.budgetAllowed); }\n protected daysNewestFirst(days: SloDay[]) { return [...days].reverse(); }\n protected isToday(day: SloDay) { return day.day.slice(0, 10) === new Date().toISOString().slice(0, 10); }\n protected excluded(day: SloDay) {\n const parts = [[day.excludedHealth, 'health checks'], [day.excludedCancelled, 'given up'], [day.excludedClientErrors, 'client errors']]\n .filter(([n]) => (n as number) > 0).map(([n, what]) => `${(n as number).toLocaleString()} ${what}`);\n return parts.length ? parts.join(', ') : '—';\n }\n protected clientErrors(d: SloDefinition) { return d.clientErrors === 'Bad' ? 'bad' : d.clientErrors === 'Exclude' ? 'not counted' : 'counted as good'; }\n}\n"],"mappings":";;;;;;;;;AAaA,MAAM,UAAkC;CAAE,MAAM;CAAa,OAAO;CAAc,MAAM;CAAU,MAAM;CAAW,MAAM;AAAQ;AAwIjI,IAAa,UAAb,MAAa,QAAO;CACT,MAAM,MAAM,SAAkB,GAAA,YAAA,CAAA,EAAA,WAAA,MAAA,CAAA,+BAAA,CAAA,CAAA;CACpB,MAAM,OAAO,cAAc;CAC7B,MAAM,OAAO,UAAU;CACrB,SAAS,YAAY;EAAE,cAAc,KAAK,IAAG;EAAI,SAAS,EAAE,aA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ContextBar, h as apiResource, o as problemText } from "./juice-js-observability-telemetry-
|
|
2
|
+
import { c as ContextBar, h as apiResource, o as problemText } from "./juice-js-observability-telemetry-7uv9jeKI.mjs";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
import { ChangeDetectionStrategy, Component, computed, inject } from "@angular/core";
|
|
5
5
|
import { RouterLink } from "@angular/router";
|
|
@@ -264,4 +264,4 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
264
264
|
});
|
|
265
265
|
export { SlosPage, burnText, objective, percent, sloState, times };
|
|
266
266
|
|
|
267
|
-
//# sourceMappingURL=juice-js-observability-slos.page-
|
|
267
|
+
//# sourceMappingURL=juice-js-observability-slos.page-CiTI82Sq.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"juice-js-observability-slos.page-
|
|
1
|
+
{"version":3,"file":"juice-js-observability-slos.page-CiTI82Sq.mjs","names":[],"sources":["../../../../projects/juice-js/observability/src/lib/pages/slos.page.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, inject } from '@angular/core';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { RouterLink } from '@angular/router';\nimport { ApiService } from '../core/api.service';\nimport { ContextService } from '../core/context.service';\nimport { SloSummary, SloWindow } from '../core/models';\nimport { LinkPipe } from '../core/options';\nimport { apiResource } from '../shared/resource';\nimport { problemText } from '../shared/telemetry';\nimport { ContextBar } from '../shared/ui';\n\n/** How a state reads, and how its badge looks. */\nexport const SLO_STATES: Record<string, { text: string; css: string }> = {\n Met: { text: 'Met', css: 'jc-health-healthy' },\n AtRisk: { text: 'At risk', css: 'jc-health-degraded' },\n Exhausted: { text: 'Budget exhausted', css: 'jc-health-unhealthy' },\n InsufficientData: { text: 'Not enough data', css: 'jc-health-none' },\n Unknown: { text: 'Unknown', css: 'jc-health-none' },\n};\n\n/** `99.5` → `99.5%`; an attainment ratio → percent with enough decimals to see it move. */\nexport function percent(ratio: number | null | undefined, digits = 2): string {\n return ratio === null || ratio === undefined ? '—' : `${(ratio * 100).toFixed(digits)}%`;\n}\n\nexport function objective(s: { sli: string; target: number; thresholdMs: number | null }): string {\n return s.sli === 'Latency' ? `${s.target}% within ${s.thresholdMs} ms` : `${s.target}% available`;\n}\n\n/** A state's badge text and class; an unknown name shows as itself. */\nexport function sloState(name: string): { text: string; css: string } {\n return SLO_STATES[name] ?? { text: name, css: 'jc-health-none' };\n}\n\n/** How many times over the budget is: `3.5×`, `91×`. */\nexport function times(used: number): string {\n return `${used >= 10 ? Math.round(used).toLocaleString() : used.toFixed(1)}×`;\n}\n\nexport function burnText(w: SloWindow | undefined): string {\n if (!w) return '—';\n if (w.state === 'Unknown') return 'unknown';\n if (w.state === 'InsufficientData') return 'too few requests';\n return `${(w.burnRate ?? 0).toFixed(1)}×`;\n}\n\n/**\n * Service level objectives (roadmap Phase 9), as the deployment's file defines them: technical ones (availability, latency) and business ones apart.\n * Missing data never reads as good: an SLO without enough counted minutes or requests says so instead of showing a budget.\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet, RouterLink, LinkPipe, MatProgressBarModule, ContextBar],\n template: `\n <jc-context-bar><h1>SLOs</h1></jc-context-bar>\n @if (data.isLoading()) { <mat-progress-bar mode=\"indeterminate\" /> }\n @if (data.error()) { <p class=\"jc-error\">{{ error() }}</p> }\n\n <section class=\"jc-card\" data-testid=\"slos-technical\">\n <h2>Technical</h2>\n <p class=\"jc-muted jc-small\">Availability and latency of services, from their requests over the last 30 days. Defined in the deployment's SLO file.</p>\n <ng-container *ngTemplateOutlet=\"table; context: { $implicit: technical() }\" />\n @if (!technical().length && !data.isLoading()) { <p class=\"jc-muted\" data-testid=\"slos-none\">No technical SLOs are defined: add them to the file named by <code>Slos:File</code>.</p> }\n </section>\n\n <section class=\"jc-card\" data-testid=\"slos-business\">\n <h2>Business</h2>\n @if (business().length) {\n <ng-container *ngTemplateOutlet=\"table; context: { $implicit: business() }\" />\n } @else {\n <p class=\"jc-muted\">No business SLOs yet. Business measures (a business success rate, message processing, queue latency, data freshness) are kept apart from\n technical ones, and come in a later version.</p>\n }\n </section>\n\n <ng-template #table let-items>\n @if (items.length) {\n <table class=\"jc-table\">\n <thead><tr><th>SLO</th><th>Objective</th><th>State</th><th>Last 30 days</th><th>Budget left</th><th>Burn, 1 h</th><th>Burn, 6 h</th></tr></thead>\n <tbody>\n @for (s of items; track s.key) {\n <tr [attr.data-testid]=\"'slo-' + s.key\">\n <td><a [routerLink]=\"['slos', s.key] | jcLink\" [queryParams]=\"ctx.keep()\">{{ s.name }}</a>\n <div class=\"jc-muted jc-small\">{{ s.service }} · {{ s.environment }}@if (s.pendingVersion) { · version {{ s.pendingVersion }} pending }</div></td>\n <td>{{ objective(s) }}</td>\n <td><span class=\"jc-badge\" [class]=\"state(s.state).css\" data-testid=\"slo-state\">{{ state(s.state).text }}</span></td>\n <td>{{ percent(s.attainment, 3) }}<div class=\"jc-muted jc-small\">{{ s.total.toLocaleString() }} requests</div></td>\n <td data-testid=\"slo-budget-left\">@if (s.budgetRemaining !== null && s.budgetUsed !== null) {\n @if (s.budgetRemaining >= 0) { <div class=\"jc-meter\"><span [style.width.%]=\"meter(s.budgetRemaining)\"></span></div>{{ percent(s.budgetRemaining, 0) }} }\n @else { <span class=\"jc-bad\">none: overspent {{ times(s.budgetUsed) }}</span> }\n } @else { — }</td>\n <td>{{ burn(s, '1h') }}</td>\n <td>{{ burn(s, '6h') }}</td>\n </tr>\n }\n </tbody>\n </table>\n }\n </ng-template>\n `,\n styles: [`\n .jc-meter { display: inline-block; width: 64px; height: 6px; margin-right: 8px; border-radius: 3px; background: var(--jc-border, rgba(127,127,127,.25)); vertical-align: middle; overflow: hidden; }\n .jc-meter span { display: block; height: 100%; background: currentColor; }\n `],\n})\nexport class SlosPage {\n protected readonly ctx = inject(ContextService);\n private readonly api = inject(ApiService);\n protected readonly data = apiResource({ params: () => true, stream: () => this.api.slos() });\n private readonly all = computed(() => this.data.value()?.items ?? []);\n protected readonly technical = computed(() => this.all().filter(s => s.category === 'Technical'));\n protected readonly business = computed(() => this.all().filter(s => s.category === 'Business'));\n protected readonly error = computed(() => problemText(this.data.error()));\n protected readonly objective = objective;\n protected readonly percent = percent;\n\n protected readonly state = sloState;\n protected readonly times = times;\n protected burn(s: SloSummary, name: string) { return burnText(s.burn.find(w => w.name === name)); }\n protected meter(remaining: number) { return Math.max(0, Math.min(100, remaining * 100)); }\n}\n"],"mappings":";;;;;;;;AAaA,MAAa,aAA4D;CACvE,KAAK;EAAE,MAAM;EAAO,KAAK;CAAmB;CAC5C,QAAQ;EAAE,MAAM;EAAW,KAAK;CAAoB;CACpD,WAAW;EAAE,MAAM;EAAoB,KAAK;CAAqB;CACjE,kBAAkB;EAAE,MAAM;EAAmB,KAAK;CAAgB;CAClE,SAAS;EAAE,MAAM;EAAW,KAAK;CAAgB;AAClD;AAGD,SAAgB,QAAQ,OAAkC,SAAS,GAAC;CAClE,OAAO,UAAU,QAAQ,UAAU,SAAY,MAAM,IAAI,QAAQ,IAAA,CAAK,QAAQ,MAAM,EAAC;AACvF;AAEA,SAAgB,UAAU,GAA8D;CACtF,OAAO,EAAE,QAAQ,YAAY,GAAG,EAAE,OAAM,WAAY,EAAE,YAAW,OAAQ,GAAG,EAAE,OAAM;AACtF;AAGA,SAAgB,SAAS,MAAY;CACnC,OAAO,WAAW,SAAS;EAAE,MAAM;EAAM,KAAK;CAAgB;AAChE;AAGA,SAAgB,MAAM,MAAY;CAChC,OAAO,GAAG,QAAQ,KAAK,KAAK,MAAM,IAAI,CAAC,CAAC,eAAc,IAAK,KAAK,QAAQ,CAAC,EAAC;AAC5E;AAEA,SAAgB,SAAS,GAAwB;CAC/C,IAAI,CAAC,GAAG,OAAO;CACf,IAAI,EAAE,UAAU,WAAW,OAAO;CAClC,IAAI,EAAE,UAAU,oBAAoB,OAAO;CAC3C,OAAO,IAAI,EAAE,YAAY,EAAA,CAAG,Q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;;;;;;;;;;;;;;;EA8CT,UAAA;EAAA,QAAA,CAAA,sPAAA;EAAA,cAAA;GAAA;IAAA,MAAA;IAAA,MA/CS;IAAgB,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;IAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAU,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;IAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAY;GAAoB;GAAA;IAAA,MAAA;IAAA,MAAA,GAAA;IAAA,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;KAAA;IAAA;IAAA,SAAA,CAAA,cAAA;IAAA,UAAA,CAAA,gBAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAU,UAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAA1C;IAAQ,MAAA;GAAA;EAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAqDrC,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAQ,YAAA,CAAA;EAvDpB,MAAA;EACkB,MAAA,CAAA;GAAA,iBAAA,wBAAwB;GAAM,SACtC;IAAC;IAAkB;IAAY;IAAU;IAAsB;GAAU;GAAC,UACzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CT,QAAA,CAAA,sPAAA;EAAA,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiService, ContextService, LinkPipe } from "./juice-js-observability.mjs";
|
|
2
|
-
import { o as problemText } from "./juice-js-observability-telemetry-
|
|
2
|
+
import { o as problemText } from "./juice-js-observability-telemetry-7uv9jeKI.mjs";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
import { ChangeDetectionStrategy, Component, inject, input, output, signal } from "@angular/core";
|
|
5
5
|
import { RouterLink } from "@angular/router";
|
|
@@ -364,4 +364,4 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
364
364
|
});
|
|
365
365
|
export { SuggestionsCard as t };
|
|
366
366
|
|
|
367
|
-
//# sourceMappingURL=juice-js-observability-suggestions-
|
|
367
|
+
//# sourceMappingURL=juice-js-observability-suggestions-BNFraGRP.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"juice-js-observability-suggestions-
|
|
1
|
+
{"version":3,"file":"juice-js-observability-suggestions-BNFraGRP.mjs","names":[],"sources":["../../../../projects/juice-js/observability/src/lib/shared/suggestions.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, inject, input, output, signal } from '@angular/core';\nimport { DatePipe, DecimalPipe } 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 { RouterLink } from '@angular/router';\nimport { ApiService } from '../core/api.service';\nimport { ContextService } from '../core/context.service';\nimport { CorrelationDecision, Suggestion, Suggestions } from '../core/models';\nimport { LinkPipe } from '../core/options';\nimport { problemText } from './telemetry';\n\n/**\n * Alerts suggested together (Phase 9, R9), on the alert and incident pages: each with its score and every piece of evidence and its weight,\n * labelled as correlation. An operator accepts (merge into one incident) or dismisses with a reason; nothing merges on its own.\n */\n@Component({\n selector: 'jc-suggestions',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [LinkPipe, RouterLink, DatePipe, DecimalPipe, FormsModule, MatButtonModule, MatFormFieldModule, MatInputModule],\n template: `\n @if (suggestions(); as s) {\n <p class=\"jc-notice\" data-testid=\"suggestions-note\">{{ s.note }}</p>\n <table class=\"jc-table\"><tbody>\n @for (x of s.items; track x.alert.id + x.other.id) {\n <tr data-testid=\"suggestion\">\n <td>\n <a [routerLink]=\"['alerts', x.other.id] | jcLink\" [queryParams]=\"ctx.keep()\"><strong>{{ x.other.rule }}</strong></a>\n <div class=\"jc-small\">{{ x.other.subjectKey }} · {{ x.other.severity }} · fired {{ x.other.firedAt | date: 'HH:mm:ss' }}</div>\n @if (withAlert()) { <div class=\"jc-muted jc-small\">with {{ x.alert.rule }} on {{ x.alert.subjectKey }}</div> }\n </td>\n <td class=\"jc-nowrap\"><strong data-testid=\"suggestion-score\">{{ x.score | number: '1.2-2' }}</strong></td>\n <td class=\"jc-small\"><ul class=\"jc-reasons\">@for (e of x.evidence; track e.code) { <li>{{ e.text }} <span class=\"jc-muted\">(+{{ e.weight | number: '1.2-2' }})</span></li> }</ul></td>\n <td class=\"jc-row-actions\">\n @if (dismissing() === key(x)) {\n <form class=\"jc-filter-form\" (ngSubmit)=\"dismiss(x)\">\n <mat-form-field subscriptSizing=\"dynamic\"><mat-label>Why not related</mat-label><input matInput name=\"reason\" data-testid=\"suggestion-reason\" [(ngModel)]=\"reason\" maxlength=\"500\" required></mat-form-field>\n <button mat-stroked-button type=\"submit\" data-testid=\"suggestion-dismiss-confirm\" [disabled]=\"sending() || !reason.trim()\">Dismiss</button>\n <button mat-button type=\"button\" (click)=\"dismissing.set('')\">Cancel</button>\n </form>\n } @else {\n <button mat-flat-button type=\"button\" data-testid=\"suggestion-accept\" [disabled]=\"sending()\" (click)=\"accept(x)\">{{ acceptLabel(x) }}</button>\n <button mat-button type=\"button\" data-testid=\"suggestion-dismiss\" [disabled]=\"sending()\" (click)=\"dismissing.set(key(x)); reason = ''\">Dismiss</button>\n }\n </td>\n </tr>\n } @empty { <tr><td class=\"jc-muted\">No alerts fired with this one closely enough, or with enough in common, to suggest (a score of {{ s.threshold | number: '1.1-1' }} or more).</td></tr> }\n </tbody></table>\n @if (error()) { <p class=\"jc-error\" data-testid=\"suggestion-error\">{{ error() }}</p> }\n }`,\n})\nexport class SuggestionsCard {\n protected readonly ctx = inject(ContextService);\n private readonly api = inject(ApiService);\n readonly suggestions = input<Suggestions | undefined>();\n /** On an incident page, the alert in the incident each suggestion goes with. */\n readonly withAlert = input(false);\n /** The incident the page shows, so accepting into it says \"this incident\". */\n readonly incident = input<string | null>(null);\n /** A decision made, or null when one was refused as stale (decided meanwhile, no longer suggested): the page reads the list again. */\n readonly decided = output<CorrelationDecision | null>();\n protected readonly sending = signal(false);\n protected readonly error = signal('');\n protected readonly dismissing = signal('');\n protected reason = '';\n\n protected key(x: Suggestion) { return `${x.alert.id}:${x.other.id}`; }\n\n protected acceptLabel(x: Suggestion) {\n if (!x.incidentId) return 'Merge into a new incident';\n return x.incidentId === this.incident() ? 'Add to this incident' : 'Add to its incident';\n }\n\n protected accept(x: Suggestion) { this.run(this.api.acceptSuggestion(x.alert.id, x.other.id)); }\n\n protected dismiss(x: Suggestion) { this.run(this.api.dismissSuggestion(x.alert.id, x.other.id, this.reason.trim())); }\n\n private run(request: ReturnType<ApiService['acceptSuggestion']>) {\n this.sending.set(true);\n this.error.set('');\n request.subscribe({\n next: d => { this.sending.set(false); this.dismissing.set(''); this.decided.emit(d); },\n error: e => {\n const status = (e as { status?: number }).status;\n this.sending.set(false);\n this.error.set(status === 403 ? 'Deciding needs the operator or admin role.' : problemText(e));\n // The row was stale: someone decided it, or it stopped being suggested. Show the list as it is now, keeping the reason why.\n if (status === 409) { this.dismissing.set(''); this.decided.emit(null); }\n },\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAoDA,IAAa,kBAAb,MAAa,gBAAe;CACP,MAAM,OAAO,cAAc;CAC7B,MAAM,OAAO,UAAU;CAC/B,cAAc,MAAgC,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAE9C,YAAY,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAExB,WAAW,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAErC,UAAU,OAAM;CACN,UAAU,OAAO,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CA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
|
}
|
|
34
|
+
function formatBytes(bytes) {
|
|
35
|
+
if (bytes === null || bytes === void 0) return "—";
|
|
36
|
+
const units = [
|
|
37
|
+
"B",
|
|
38
|
+
"KB",
|
|
39
|
+
"MB",
|
|
40
|
+
"GB",
|
|
41
|
+
"TB",
|
|
42
|
+
"PB"
|
|
43
|
+
];
|
|
44
|
+
let value = bytes;
|
|
45
|
+
let unit = 0;
|
|
46
|
+
while (value >= 1024 && unit < units.length - 1) {
|
|
47
|
+
value /= 1024;
|
|
48
|
+
unit++;
|
|
49
|
+
}
|
|
50
|
+
return `${value < 10 && unit > 0 ? value.toFixed(1) : Math.round(value)} ${units[unit]}`;
|
|
51
|
+
}
|
|
34
52
|
function formatPercent(rate) {
|
|
35
53
|
if (rate === null || rate === void 0) return "—";
|
|
36
54
|
const p = rate * 100;
|
|
@@ -981,7 +999,9 @@ function problemText(error) {
|
|
|
981
999
|
const e = error;
|
|
982
1000
|
if (!e) return "";
|
|
983
1001
|
if (e.status === 0) return "The Juice API cannot be reached.";
|
|
984
|
-
|
|
1002
|
+
const text = [e.error?.title, e.error?.detail].filter(Boolean).join(": ");
|
|
1003
|
+
if (!text && e.status === 503) return "Busy, try again: the platform is answering as many queries as it allows.";
|
|
1004
|
+
return text || `Request failed (${e.status}).`;
|
|
985
1005
|
}
|
|
986
1006
|
var TraceTable = class TraceTable {
|
|
987
1007
|
ctx = inject(ContextService);
|
|
@@ -2033,6 +2053,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2033
2053
|
}]
|
|
2034
2054
|
}] }
|
|
2035
2055
|
});
|
|
2036
|
-
export {
|
|
2056
|
+
export { formatPercent as C, formatDuration as S, preciseTime as T, DurationPipe as _, TraceTable as a, copyText as b, ContextBar as c, onThemeChange as d, themeColor as f, AgoPipe as g, apiResource as h, ServiceStatsCharts as i, HealthBadge as l, screenPages as m, LogTable as n, problemText as o, cursorList as p, MetricExplorer as r, ConfidenceBadge as s, InstanceMetric as t, KeyValueTable as u, PercentPipe as v, plainTraceId as w, formatBytes as x, ReasonPipe as y };
|
|
2037
2057
|
|
|
2038
|
-
//# sourceMappingURL=juice-js-observability-telemetry-
|
|
2058
|
+
//# sourceMappingURL=juice-js-observability-telemetry-7uv9jeKI.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"juice-js-observability-telemetry-7uv9jeKI.mjs","names":["i1","i2","i3"],"sources":["../../../../projects/juice-js/observability/src/lib/shared/format.ts","../../../../projects/juice-js/observability/src/lib/shared/resource.ts","../../../../projects/juice-js/observability/src/lib/shared/paging.ts","../../../../projects/juice-js/observability/src/lib/shared/theme.ts","../../../../projects/juice-js/observability/src/lib/shared/ui.ts","../../../../projects/juice-js/observability/src/lib/shared/telemetry.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n/** Milliseconds since the epoch of an ISO 8601 time, keeping the sub-millisecond digits that Date.parse drops. */\nexport function preciseTime(iso: string): number {\n const fraction = /\\.\\d{3}(\\d+)/.exec(iso)?.[1];\n return Date.parse(iso) + (fraction ? Number(`0.${fraction}`) : 0);\n}\n\n/** The 32-hex trace id of a W3C traceparent (\"00-<trace id>-<span id>-01\"); any other text unchanged but trimmed and lower-cased. */\nexport function plainTraceId(text: string): string {\n const lower = text.trim().toLowerCase();\n return /^[0-9a-f]{2}-([0-9a-f]{32})-[0-9a-f]{16}-[0-9a-f]{2}$/.exec(lower)?.[1] ?? lower;\n}\n\n/** 0.8 ms, 120 ms, 1.42 s, 2 m 05 s. */\nexport function formatDuration(ms: number | null | undefined): string {\n if (ms === null || ms === undefined || Number.isNaN(ms)) return '—';\n if (ms < 1) return `${ms.toFixed(2)} ms`;\n if (ms < 1000) return `${Math.round(ms * 10) / 10} ms`;\n if (ms < 60_000) return `${(ms / 1000).toFixed(2)} s`;\n const s = Math.round(ms / 1000);\n return `${Math.floor(s / 60)} m ${String(s % 60).padStart(2, '0')} s`;\n}\n\nexport function 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\nexport function formatPercent(rate: number | null | undefined): string {\n if (rate === null || rate === undefined) return '—';\n const p = rate * 100;\n return `${p === 0 ? '0' : p < 0.1 ? '<0.1' : p.toFixed(p < 10 ? 1 : 0)} %`;\n}\n\nexport function formatAgo(iso: string | null | undefined): string {\n if (!iso) return '—';\n const s = Math.round((Date.now() - new Date(iso).getTime()) / 1000);\n if (s < 60) return `${Math.max(s, 0)} s ago`;\n if (s < 3600) return `${Math.round(s / 60)} min ago`;\n if (s < 86_400) return `${Math.round(s / 3600)} h ago`;\n return `${Math.round(s / 86_400)} d ago`;\n}\n\n/**\n * Copies text to the clipboard. Over plain HTTP at an address the browser has no clipboard API: the element showing the text is selected instead,\n * ready for Ctrl+C. Says which happened.\n */\nexport async function copyText(text: string, shownIn: Element | null): Promise<'copied' | 'selected'> {\n try {\n if (navigator.clipboard) { await navigator.clipboard.writeText(text); return 'copied'; }\n } catch { /* refused: select it instead */ }\n if (shownIn) window.getSelection()?.selectAllChildren(shownIn);\n return 'selected';\n}\n\n@Pipe({ name: 'duration' })\nexport class DurationPipe implements PipeTransform {\n transform(ms: number | null | undefined) { return formatDuration(ms); }\n}\n\n@Pipe({ name: 'percent2' })\nexport class PercentPipe implements PipeTransform {\n transform(rate: number | null | undefined) { return formatPercent(rate); }\n}\n\n@Pipe({ name: 'ago' })\nexport class AgoPipe implements PipeTransform {\n transform(iso: string | null | undefined) { return formatAgo(iso); }\n}\n\n/** A reason code such as `dependency_failed:shop/payments` as words. */\n@Pipe({ name: 'reason' })\nexport class ReasonPipe implements PipeTransform {\n transform(code: string) {\n const [what, subject] = code.split(/:(.*)/s);\n const text = what.replace(/_/g, ' ');\n return subject ? `${text}: ${subject}` : text;\n }\n}\n","import { ResourceRef, Signal, computed, isSignal } from '@angular/core';\nimport { RxResourceOptions, rxResource } from '@angular/core/rxjs-interop';\n\n/** A resource whose `value()` is `undefined` while its request failed, instead of throwing. */\nexport type ApiResource<T> = Omit<ResourceRef<T | undefined>, 'value'> & { readonly value: Signal<T | undefined> };\n\n/**\n * An `rxResource` for an API read. Angular's `value()` throws while the resource is in error, so a failed request (a\n * trace not found, a 500, the API unreachable) would break the page's rendering, and with it every overlay such as a\n * select's options. Here `value()` reads `undefined` then, and `error()` says why.\n */\nexport function apiResource<T, P>(options: RxResourceOptions<T, P>): ApiResource<T> {\n const ref = rxResource<T, P>(options);\n const value = computed(() => (ref.hasValue() ? ref.value() : undefined));\n return new Proxy(ref, {\n get(target, prop) {\n if (prop === 'value') return value;\n const member = Reflect.get(target, prop, target);\n return typeof member === 'function' && !isSignal(member) ? member.bind(target) : member;\n },\n }) as unknown as ApiResource<T>;\n}\n","import { DestroyRef, Signal, computed, inject, linkedSignal, signal } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { apiResource } from './resource';\nimport { PageEvent } from '@angular/material/paginator';\nimport { Observable, map } from 'rxjs';\nimport { Query } from '../core/api.service';\n\n/** A page from an API list that pages with a cursor: alerts, traces, logs. */\nexport interface CursorPage<T> { items: T[]; nextCursor?: string | null; }\n\n/**\n * A newest-first list read page by page with the API's cursor. The first page loads whenever `params` change; `more()`\n * appends the next page, asked with exactly the query of the first one (its time window included), so the list grows\n * without shifting, skipping or repeating rows. Call it in an injection context, such as a field initializer.\n */\nexport function cursorList<P, T>(params: () => P, query: (params: P) => Query, fetch: (query: Query) => Observable<CursorPage<T>>) {\n const destroyRef = inject(DestroyRef);\n const first = apiResource({\n params,\n stream: ({ params }) => {\n const q = query(params);\n return fetch(q).pipe(map(page => ({ page, query: q })));\n },\n });\n // Pages after the first; reset whenever the first page reloads.\n const rest = linkedSignal({ source: first.value, computation: () => ({ items: [] as T[], cursor: undefined as string | null | undefined }) });\n const loadingMore = signal(false);\n const moreError = signal<unknown>(null);\n const items = computed(() => [...(first.value()?.page.items ?? []), ...rest().items]);\n const cursor = computed(() => rest().cursor !== undefined ? rest().cursor! : first.value()?.page.nextCursor ?? null);\n\n function more() {\n const current = first.value();\n const next = cursor();\n if (!current || !next || loadingMore()) return;\n loadingMore.set(true);\n moreError.set(null);\n fetch({ ...current.query, cursor: next }).pipe(takeUntilDestroyed(destroyRef)).subscribe({\n next: page => rest.update(r => ({ items: [...r.items, ...page.items], cursor: page.nextCursor ?? null })),\n error: e => { moreError.set(e); loadingMore.set(false); },\n complete: () => loadingMore.set(false),\n });\n }\n\n return { first, items, hasMore: computed(() => cursor() !== null), loadingMore, moreError: moreError.asReadonly(), more };\n}\n\n/**\n * Pages a list already in memory for display (the inventory lists, which the Console sorts and filters itself). Goes\n * back to the first page whenever the rows change, for example when a filter narrows them.\n */\nexport function screenPages<T>(rows: Signal<T[]>, sizes = [50, 100, 200]) {\n const size = signal(sizes[0]);\n const index = linkedSignal({ source: rows, computation: () => 0 });\n return {\n sizes,\n size: size.asReadonly(),\n index: index.asReadonly(),\n visible: computed(() => rows().slice(index() * size(), (index() + 1) * size())),\n /** More rows than one page: show the paginator. */\n needed: computed(() => rows().length > sizes[0]),\n change(event: PageEvent) { size.set(event.pageSize); index.set(event.pageIndex); },\n };\n}\n","/**\n * The app's colours, as `observability.colors($theme)` wrote them in `--jc-*` custom properties, for what CSS cannot\n * colour itself: the charts (ECharts) and the dependency graph (Cytoscape) draw on their own.\n */\nexport function themeColor(name: string, element: Element = document.body): string {\n return getComputedStyle(element).getPropertyValue(`--jc-${name}`).trim();\n}\n\n/** The categorical colours (`$series`): services in a trace, lines in a chart. */\nexport function seriesColors(element: Element = document.body): string[] {\n const count = Number(themeColor('series-count', element)) || 0;\n return Array.from({ length: count }, (_, i) => themeColor(`series-${i + 1}`, element)).filter(Boolean);\n}\n\n/**\n * Calls back when the app switches theme: a class change on `<html>` or `<body>`, as juice-layout's dark-mode toggle\n * makes. Returns the function that stops listening.\n */\nexport function onThemeChange(callback: () => void): () => void {\n const observer = new MutationObserver(callback);\n for (const element of [document.documentElement, document.body]) {\n observer.observe(element, { attributes: true, attributeFilter: ['class'] });\n }\n return () => observer.disconnect();\n}\n","import { ObservabilityLinks } from '../core/options';\nimport {\n ChangeDetectionStrategy, Component, ElementRef, OnDestroy, afterNextRender, computed, effect, inject, input, signal, viewChild,\n} from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { FormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatSelectModule } from '@angular/material/select';\nimport { Router } from '@angular/router';\nimport { catchError, map, of } from 'rxjs';\nimport type { ECharts, EChartsOption } from 'echarts';\nimport { ApiService } from '../core/api.service';\nimport { ContextService, RANGES } from '../core/context.service';\nimport { HealthState } from '../core/models';\nimport { onThemeChange, seriesColors, themeColor } from './theme';\n\n/** A health state, with \"no data\" for a missing one (Console requirements §10: missing data is not zero). */\n@Component({\n selector: 'jc-health',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `<span class=\"jc-badge\" [class]=\"'jc-health-' + (state() ?? 'none').toLowerCase()\"\n [attr.title]=\"stale() ? 'Evaluation has stopped: this state may be out of date' : null\">\n {{ state() ?? 'No data' }}@if (stale()) {<span class=\"jc-stale\"> · stale</span>}</span>`,\n})\nexport class HealthBadge {\n readonly state = input<HealthState | null | undefined>();\n readonly stale = input(false);\n}\n\n/** Observed or inferred dependency evidence (Console requirements §9): inferred is never shown as confirmed. */\n@Component({\n selector: 'jc-confidence',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `<span class=\"jc-badge\" [class.jc-observed]=\"observed()\" [class.jc-inferred]=\"!observed()\"\n [attr.title]=\"observed() ? 'Seen in traces: a call from one service to the other' : 'Inferred from span attributes, not a confirmed call'\">\n {{ observed() ? 'observed' : 'inferred' }}</span>`,\n})\nexport class ConfidenceBadge {\n readonly confidence = input.required<string>();\n protected readonly observed = computed(() => this.confidence().toLowerCase() === 'observed');\n}\n\n/** Attributes as a key/value table, sorted, values wrapped. */\n@Component({\n selector: 'jc-kv',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @if (entries().length === 0) { <p class=\"jc-muted\">{{ empty() }}</p> }\n @else {\n <table class=\"jc-kv\"><tbody>\n @for (e of entries(); track e[0]) { <tr><th>{{ e[0] }}</th><td>{{ e[1] }}</td></tr> }\n </tbody></table>\n }`,\n})\nexport class KeyValueTable {\n readonly values = input<Record<string, string | null | undefined>>({});\n readonly empty = input('None');\n protected readonly entries = computed(() =>\n Object.entries(this.values()).filter((e): e is [string, string] => e[1] !== null && e[1] !== undefined && e[1] !== '')\n .sort((a, b) => a[0].localeCompare(b[0])));\n}\n\n/**\n * The context bar on every page (Console requirements §13, §17): environment, time range, and a global lookup for a\n * trace id, a span id or a service name.\n */\n@Component({\n selector: 'jc-context-bar',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [FormsModule, MatSelectModule, MatIconModule, MatButtonModule],\n template: `\n <div class=\"jc-context\">\n <ng-content />\n <span class=\"jc-spacer\"></span>\n <mat-form-field subscriptSizing=\"dynamic\" class=\"jc-field-sm\">\n <mat-label>Environment</mat-label>\n <mat-select [value]=\"ctx.environment()\" (valueChange)=\"ctx.set({ env: $event || null })\">\n <mat-option value=\"\">All</mat-option>\n @for (e of environments(); track e.id) { <mat-option [value]=\"e.key\">{{ e.key }}</mat-option> }\n </mat-select>\n </mat-form-field>\n <mat-form-field subscriptSizing=\"dynamic\" class=\"jc-field-sm\">\n <mat-label>Time range</mat-label>\n <mat-select [value]=\"ctx.range()\" (valueChange)=\"ctx.set({ range: $event })\">\n @for (r of ranges; track r) { <mat-option [value]=\"r\">Last {{ r }}</mat-option> }\n @if (ctx.range() === 'custom') { <mat-option value=\"custom\" disabled>Custom window</mat-option> }\n </mat-select>\n </mat-form-field>\n <form class=\"jc-lookup\" (ngSubmit)=\"lookup()\">\n <mat-icon>search</mat-icon>\n <input name=\"q\" [(ngModel)]=\"query\" placeholder=\"Trace ID, span ID or service\" aria-label=\"Go to trace, span or service\">\n </form>\n </div>\n @if (message()) { <p class=\"jc-muted jc-lookup-message\">{{ message() }}</p> }`,\n})\nexport class ContextBar {\n protected readonly ctx = inject(ContextService);\n private readonly api = inject(ApiService);\n private readonly router = inject(Router);\n private readonly links = inject(ObservabilityLinks);\n protected readonly ranges = Object.keys(RANGES);\n protected readonly environments = toSignal(this.api.environments().pipe(map(p => p.items), catchError(() => of([]))), { initialValue: [] });\n protected query = '';\n protected readonly message = signal('');\n\n lookup() {\n const q = this.query.trim();\n if (!q) return;\n this.message.set('Searching…');\n this.api.search(q).subscribe({\n next: page => {\n const hit = page.items[0];\n if (!hit) { this.message.set(`Nothing found for \"${q}\".`); return; }\n this.message.set(page.items.length > 1 ? `${page.items.length} matches; showing the first.` : '');\n const extra = hit.kind === 'span' ? { span: hit.id } : {};\n void (hit.kind === 'service'\n ? this.router.navigate(this.links.to('services', hit.id), { queryParams: this.ctx.keep() })\n : this.router.navigate(this.links.to('traces', hit.traceId), { queryParams: this.ctx.keep(extra) }));\n },\n error: () => this.message.set('Search failed.'),\n });\n }\n}\n\nexport interface ChartSeries { name: string; points: { at: string; value: number | null }[]; unit?: string; }\n\n/**\n * The API returns no point for a bucket without data; give each missing bucket a null so the chart shows a gap\n * instead of drawing a line across it (no data is not zero).\n */\nexport function withGaps(points: { at: string; value: number | null }[], from: string, to: string, stepSeconds: number) {\n const step = stepSeconds * 1000;\n const byTime = new Map(points.map(p => [new Date(p.at).getTime(), p.value]));\n const out: { at: string; value: number | null }[] = [];\n for (let t = Math.floor(new Date(from).getTime() / step) * step; t < new Date(to).getTime(); t += step) {\n out.push({ at: new Date(t).toISOString(), value: byTime.get(t) ?? null });\n }\n return out;\n}\n\n/**\n * A time series chart (Apache ECharts, loaded on first use). A missing bucket is a gap in the line, never zero.\n */\n@Component({\n selector: 'jc-chart',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `<div class=\"jc-chart-title\">{{ title() }}</div>\n @if (empty()) { <div class=\"jc-chart jc-chart-empty\">No data in this window</div> }\n <div #host class=\"jc-chart\" [hidden]=\"empty()\"></div>`,\n})\nexport class Chart implements OnDestroy {\n readonly title = input('');\n readonly series = input<ChartSeries[]>([]);\n readonly format = input<(v: number) => string>(v => String(Math.round(v * 100) / 100));\n /** Moments to mark with a vertical line. */\n readonly marks = input<string[]>([]);\n private readonly host = viewChild.required<ElementRef<HTMLDivElement>>('host');\n protected readonly empty = computed(() => this.series().every(s => s.points.every(p => p.value === null)));\n private chart?: ECharts;\n private observer?: ResizeObserver;\n private stopThemeWatch?: () => void;\n\n constructor() {\n afterNextRender(async () => {\n // Only what a line chart needs: the full library is three times the size.\n const [echarts, charts, components, renderers] = await Promise.all([\n import('echarts/core'), import('echarts/charts'), import('echarts/components'), import('echarts/renderers')]);\n echarts.use([charts.LineChart, components.GridComponent, components.TooltipComponent, components.LegendComponent, components.MarkLineComponent, renderers.SVGRenderer]);\n this.chart = echarts.init(this.host().nativeElement, undefined, { renderer: 'svg' });\n this.observer = new ResizeObserver(() => this.chart?.resize());\n this.observer.observe(this.host().nativeElement);\n this.stopThemeWatch = onThemeChange(() => this.render());\n this.render();\n });\n effect(() => { this.series(); this.marks(); this.render(); });\n }\n\n private render() {\n if (!this.chart) return;\n const format = this.format();\n // The app's theme colours (observability.colors), read at each render so a theme switch repaints.\n const host = this.host().nativeElement;\n const [text, muted, border, colors] = [themeColor('text', host), themeColor('muted', host), themeColor('border', host), seriesColors(host)];\n const option: EChartsOption = {\n animation: false,\n color: colors.length ? colors : undefined,\n grid: { left: 56, right: 16, top: 16, bottom: 28 },\n tooltip: { trigger: 'axis', valueFormatter: v => (typeof v === 'number' ? format(v) : '—') },\n legend: this.series().length > 1 ? { top: 0, textStyle: { color: text } } : undefined,\n xAxis: { type: 'time', axisLabel: { color: muted, hideOverlap: true }, axisLine: { lineStyle: { color: border } } },\n yAxis: { type: 'value', axisLabel: { color: muted, formatter: (v: number) => format(v) },\n splitLine: { lineStyle: { color: border } } },\n series: this.series().map((s, i) => ({\n name: s.name, type: 'line', showSymbol: false, connectNulls: false,\n data: s.points.map(p => [p.at, p.value]),\n ...(i === 0 && this.marks().length ? { markLine: {\n silent: true, symbol: 'none', label: { show: false }, lineStyle: { color: muted, type: 'dashed' as const },\n data: this.marks().map(at => ({ xAxis: at })),\n } } : {}),\n })),\n };\n this.chart.setOption(option, true);\n }\n\n ngOnDestroy() {\n this.observer?.disconnect();\n this.stopThemeWatch?.();\n this.chart?.dispose();\n }\n}\n","import { LinkPipe } from '../core/options';\nimport { ChangeDetectionStrategy, Component, computed, inject, input, linkedSignal } from '@angular/core';\nimport { apiResource } from './resource';\nimport { DatePipe } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatSelectModule } from '@angular/material/select';\nimport { RouterLink } from '@angular/router';\nimport { ApiService, Query } from '../core/api.service';\nimport { ContextService, MAX_SEARCH_MS } from '../core/context.service';\nimport { DurationPipe } from './format';\nimport { cursorList } from './paging';\nimport { Chart, withGaps } from './ui';\n\n/** Shows a request's failure as a short line instead of a broken page. */\nexport function problemText(error: unknown): string {\n const e = error as { status?: number; error?: { title?: string; detail?: string } } | undefined;\n if (!e) return '';\n if (e.status === 0) return 'The Juice API cannot be reached.';\n const text = [e.error?.title, e.error?.detail].filter(Boolean).join(': ');\n // The API answers a search refused for load as 503 \"Busy, try again\" with its own text; a proxy's bare 503 says the same here.\n if (!text && e.status === 503) return 'Busy, try again: the platform is answering as many queries as it allows.';\n return text || `Request failed (${e.status}).`;\n}\n\n/**\n * Traces matching a query in the current context, newest first (Console requirements §5): enough per row to pick a\n * useful one, and one click to its waterfall.\n */\n@Component({\n selector: 'jc-trace-table',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [LinkPipe, RouterLink, DatePipe, DurationPipe, MatProgressBarModule, MatButtonModule],\n template: `\n @if (traces.first.isLoading()) { <mat-progress-bar mode=\"indeterminate\" /> }\n @if (traces.first.error()) { <p class=\"jc-error\">{{ error() }}</p> }\n @if (traces.first.hasValue()) {\n @if (rows().length === 0) { <p class=\"jc-muted\">No traces match in this window.</p> }\n @else {\n <table class=\"jc-table\">\n <thead><tr><th>Start</th><th>Root operation</th><th>Duration</th><th>Spans</th><th>Status</th><th>Instance</th></tr></thead>\n <tbody>\n @for (t of rows(); track t.traceId) {\n <tr>\n <td class=\"jc-nowrap\">{{ t.startedAt | date: 'MMM d, HH:mm:ss.SSS' }}</td>\n <td><a [routerLink]=\"['traces', t.traceId] | jcLink\" [queryParams]=\"ctx.keep()\">{{ t.rootService }} · {{ t.rootOperation }}</a>\n @if (t.services.length > 1) { <div class=\"jc-muted jc-small\">{{ t.services.join(' → ') }}</div> }</td>\n <td class=\"jc-nowrap\"><span class=\"jc-bar\" [style.width.px]=\"barWidth(t.durationMs)\"></span>{{ t.durationMs | duration }}</td>\n <td>{{ t.spanCount }}</td>\n <td>@if (t.errorCount > 0) { <span class=\"jc-badge jc-health-unhealthy\">{{ t.errorCount }} error{{ t.errorCount > 1 ? 's' : '' }}</span> }\n @else { <span class=\"jc-badge jc-health-healthy\">ok</span> }</td>\n <td class=\"jc-muted jc-small\">{{ t.rootInstance ?? t.rootHost ?? '—' }}</td>\n </tr>\n }\n </tbody>\n </table>\n <div class=\"jc-more\">\n <span class=\"jc-muted\">{{ rows().length }} trace{{ rows().length === 1 ? '' : 's' }}{{ traces.hasMore() ? ', newest first' : '' }}</span>\n @if (traces.hasMore()) {\n <button mat-button (click)=\"traces.more()\" [disabled]=\"traces.loadingMore()\">{{ traces.loadingMore() ? 'Loading…' : 'Older traces' }}</button>\n }\n @if (traces.moreError()) { <span class=\"jc-error\">{{ moreError() }}</span> }\n </div>\n }\n }`,\n})\nexport class TraceTable {\n protected readonly ctx = inject(ContextService);\n private readonly api = inject(ApiService);\n readonly query = input<Query>({});\n readonly limit = input(50);\n\n /** \"Older traces\" appends the next page of the same search, over the same window. */\n protected readonly traces = cursorList(\n () => ({ query: this.query(), env: this.ctx.environment(), range: this.ctx.range(), abs: this.ctx.absolute(), limit: this.limit() }),\n p => ({ environment: p.env, ...this.ctx.window(MAX_SEARCH_MS), limit: p.limit, ...p.query }),\n q => this.api.traces(q));\n protected readonly rows = this.traces.items;\n protected readonly longest = computed(() => Math.max(1, ...this.rows().map(t => t.durationMs)));\n /** Pixels, not a percentage: an auto-sized cell ignores a percentage width, so a full bar pushed the time into the next column. */\n protected barWidth(ms: number) { return Math.max(2, 80 * ms / this.longest()); }\n protected readonly error = computed(() => problemText(this.traces.first.error()));\n protected readonly moreError = computed(() => problemText(this.traces.moreError()));\n}\n\n/**\n * Log records for a query in the current context (Console requirements §7): each with its trace and span, when the\n * record carries them.\n */\n@Component({\n selector: 'jc-log-table',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [LinkPipe, RouterLink, DatePipe, MatProgressBarModule, MatButtonModule],\n template: `\n @if (logs.first.isLoading()) { <mat-progress-bar mode=\"indeterminate\" /> }\n @if (logs.first.error()) { <p class=\"jc-error\">{{ error() }}</p> }\n @if (logs.first.hasValue()) {\n @if (rows().length === 0) { <p class=\"jc-muted\">No log records match in this window.</p> }\n @else {\n <table class=\"jc-table jc-logs\">\n <thead><tr><th>Time</th><th>Severity</th>@if (!compact()) { <th>Service</th> }<th>Message</th>@if (!compact()) { <th>Trace</th> }</tr></thead>\n <tbody>\n @for (l of rows(); track $index) {\n <tr>\n <td class=\"jc-nowrap\">{{ l.timestamp | date: 'MMM d, HH:mm:ss.SSS' }}</td>\n <td><span class=\"jc-badge\" [class]=\"severityClass(l.severityNumber)\">{{ l.severity || l.severityNumber }}</span></td>\n @if (!compact()) { <td class=\"jc-nowrap\">{{ l.service }}@if (l.instance) {<div class=\"jc-muted jc-small\">{{ l.instance }}</div>}</td> }\n <td><pre class=\"jc-body\">{{ l.body }}@if (l.bodyTruncated) {…}</pre></td>\n @if (!compact()) { <td class=\"jc-nowrap\">\n @if (l.traceId) {\n <a [routerLink]=\"['traces', l.traceId] | jcLink\" [queryParams]=\"ctx.keep(l.spanId ? { span: l.spanId } : {})\">{{ l.spanId ? 'span' : 'trace' }} ↗</a>\n } @else { <span class=\"jc-muted\">—</span> }\n </td> }\n </tr>\n }\n </tbody>\n </table>\n <div class=\"jc-more\">\n <span class=\"jc-muted\">{{ rows().length }} record{{ rows().length === 1 ? '' : 's' }}{{ logs.hasMore() ? ', newest first' : '' }}</span>\n @if (logs.hasMore()) {\n <button mat-button (click)=\"logs.more()\" [disabled]=\"logs.loadingMore()\">{{ logs.loadingMore() ? 'Loading…' : 'Older logs' }}</button>\n }\n @if (logs.moreError()) { <span class=\"jc-error\">{{ moreError() }}</span> }\n </div>\n }\n }`,\n})\nexport class LogTable {\n protected readonly ctx = inject(ContextService);\n private readonly api = inject(ApiService);\n readonly query = input<Query>({});\n /** Inside a span: its service and trace are already on screen, so only time, severity and message. */\n readonly compact = input(false);\n\n /** \"Older logs\" appends the next page of the same search, over the same window. */\n protected readonly logs = cursorList(\n () => ({ query: this.query(), env: this.ctx.environment(), range: this.ctx.range(), abs: this.ctx.absolute() }),\n p => ({ environment: p.env, ...this.ctx.window(MAX_SEARCH_MS), limit: 200, ...p.query }),\n q => this.api.logs(q));\n protected readonly rows = this.logs.items;\n protected readonly error = computed(() => problemText(this.logs.first.error()));\n protected readonly moreError = computed(() => problemText(this.logs.moreError()));\n\n severityClass(n: number) {\n return n >= 17 ? 'jc-health-unhealthy' : n >= 13 ? 'jc-health-degraded' : n >= 9 ? 'jc-health-healthy' : 'jc-health-none';\n }\n}\n\n/**\n * The metrics reported for a scope (service, instance or host) and a chart of the one selected (Console requirements\n * §7): a counter as a rate, a gauge or histogram as an average.\n */\n@Component({\n selector: 'jc-metric-explorer',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [FormsModule, MatSelectModule, MatProgressBarModule, Chart],\n template: `\n @if (metrics.isLoading()) { <mat-progress-bar mode=\"indeterminate\" /> }\n @if (metrics.error()) { <p class=\"jc-error\">{{ metricsError() }}</p> }\n @if (metrics.hasValue()) {\n @if (names().length === 0) { <p class=\"jc-muted\">No metrics reported in this window.</p> }\n @else {\n <mat-form-field subscriptSizing=\"dynamic\" class=\"jc-field-wide\">\n <mat-label>Metric</mat-label>\n <mat-select [value]=\"selected()\" (valueChange)=\"selected.set($event)\">\n @for (m of names(); track m.name) { <mat-option [value]=\"m.name\">{{ m.name }} <span class=\"jc-muted\">({{ m.type }}{{ m.unit ? ', ' + m.unit : '' }})</span></mat-option> }\n </mat-select>\n </mat-form-field>\n @if (series.value(); as s) {\n <jc-chart [title]=\"title()\" [series]=\"[{ name: s.name, points: points() }]\" />\n }\n }\n }`,\n})\nexport class MetricExplorer {\n private readonly ctx = inject(ContextService);\n private readonly api = inject(ApiService);\n readonly scope = input<Query>({});\n readonly initial = input<string | null>(null);\n\n protected readonly metrics = apiResource({\n params: () => ({ scope: this.scope(), env: this.ctx.environment(), range: this.ctx.range(), abs: this.ctx.absolute() }),\n stream: ({ params }) => this.api.metrics({ environment: params.env, ...this.ctx.window(), ...params.scope }),\n });\n protected readonly names = computed(() => this.metrics.value()?.items ?? []);\n protected readonly selected = linkedSignal(() => {\n const names = this.names();\n // The app's own metrics first: host and runtime metrics say less about a service, and sort before most names.\n return names.find(m => m.name === this.initial())?.name\n ?? names.find(m => !/^(dotnet|process|system)./.test(m.name))?.name ?? names[0]?.name ?? null;\n });\n protected readonly series = apiResource({\n // Idle until a metric is chosen.\n params: () => this.selected() ? { name: this.selected()!, scope: this.scope(), env: this.ctx.environment(), range: this.ctx.range(), abs: this.ctx.absolute() } : undefined,\n stream: ({ params }) => {\n this.window = this.ctx.window();\n return this.api.series({ name: params.name, environment: params.env, ...this.window, ...params.scope });\n },\n });\n private window = { from: '', to: '' };\n protected readonly points = computed(() => {\n const s = this.series.value();\n return s ? withGaps(s.points, this.window.from, this.window.to, s.stepSeconds) : [];\n });\n protected readonly title = computed(() => {\n const s = this.series.value();\n if (!s) return '';\n const what = s.aggregation === 'rate' ? 'rate per second' : 'average';\n return `${s.name} — ${what}${s.unit ? ` (${s.unit}${s.aggregation === 'rate' ? '/s' : ''})` : ''}`;\n });\n protected readonly metricsError = computed(() => problemText(this.metrics.error()));\n}\n\n/**\n * One resource metric of one instance around a moment, for the trace page. A counter reads as a rate. The window is\n * fixed by the trace, not the context bar's range.\n */\n@Component({\n selector: 'jc-instance-metric',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [Chart],\n template: `<jc-chart [title]=\"title()\" [series]=\"[{ name: name(), points: points() }]\" [format]=\"format()\" [marks]=\"marks()\" />`,\n})\nexport class InstanceMetric {\n private readonly api = inject(ApiService);\n readonly title = input.required<string>();\n readonly name = input.required<string>();\n readonly instanceId = input.required<string>();\n readonly from = input.required<string>();\n readonly to = input.required<string>();\n readonly marks = input<string[]>([]);\n readonly format = input<(v: number) => string>(v => String(Math.round(v * 100) / 100));\n /** Reads the metric as a level, even if the host reports it as a counter. */\n readonly level = input(false);\n\n private readonly series = apiResource({\n params: () => ({ name: this.name(), instanceId: this.instanceId(), from: this.from(), to: this.to(), ...(this.level() ? { level: true } : {}) }),\n stream: ({ params }) => this.api.series(params),\n });\n protected readonly points = computed(() => {\n const s = this.series.value();\n return s ? withGaps(s.points, this.from(), this.to(), s.stepSeconds) : [];\n });\n}\n\n/** Requests, error rate and p95 of a service (or one operation) over the window. */\n@Component({\n selector: 'jc-service-stats',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [Chart, MatProgressBarModule],\n template: `\n @if (stats.isLoading()) { <mat-progress-bar mode=\"indeterminate\" /> }\n @if (stats.hasValue()) {\n <div class=\"jc-grid-3\">\n <jc-chart [title]=\"rates().length > 1 ? 'Requests and messages per second' : rates()[0].title\" [series]=\"rates()\" />\n <jc-chart title=\"Error rate\" [series]=\"[{ name: 'errors', points: pick('errorRate') }]\" [format]=\"percent\" />\n <jc-chart title=\"p95 latency\" [series]=\"[{ name: 'p95', points: pick('p95Ms') }]\" [format]=\"ms\" />\n </div>\n }`,\n})\nexport class ServiceStatsCharts {\n private readonly ctx = inject(ContextService);\n private readonly api = inject(ApiService);\n readonly query = input.required<Query>();\n private window = { from: '', to: '' };\n protected readonly percent = (v: number) => `${Math.round(v * 1000) / 10} %`;\n protected readonly ms = (v: number) => `${Math.round(v)} ms`;\n\n protected readonly stats = apiResource({\n params: () => ({ query: this.query(), env: this.ctx.environment(), range: this.ctx.range(), abs: this.ctx.absolute() }),\n stream: ({ params }) => {\n this.window = this.ctx.window();\n return this.api.serviceStats({ environment: params.env, ...this.window, ...params.query });\n },\n });\n\n /** Requests and messages are separate lines; a service with only one of them shows only that one. */\n rates() {\n const points = this.stats.value()?.points ?? [];\n const requests = { title: 'Requests per second', name: 'requests/s', points: this.pick('requestsPerSecond') };\n const messages = { title: 'Messages per second', name: 'messages/s', points: this.pick('messagesPerSecond') };\n if (!points.some(p => p.messagesPerSecond > 0)) return [requests];\n return points.some(p => p.requestsPerSecond > 0) ? [requests, messages] : [messages];\n }\n\n pick(field: 'requestsPerSecond' | 'messagesPerSecond' | 'errorRate' | 'p95Ms') {\n const s = this.stats.value();\n return s ? withGaps(s.points.map(p => ({ at: p.at, value: p[field] })), this.window.from, this.window.to, s.stepSeconds) : [];\n }\n}\n\n"],"mappings":";;;;;;;;;;;;;;;;;AAGA,SAAgB,YAAY,KAAW;CACrC,MAAM,WAAW,eAAe,KAAK,GAAG,CAAC,GAAG;CAC5C,OAAO,KAAK,MAAM,GAAG,KAAK,WAAW,OAAO,KAAK,UAAU,IAAI;AACjE;AAGA,SAAgB,aAAa,MAAY;CACvC,MAAM,QAAQ,KAAK,KAAI,CAAE,CAAC,YAAW;CACrC,OAAO,wDAAwD,KAAK,KAAK,CAAC,GAAG,MAAM;AACrF;AAGA,SAAgB,eAAe,IAA6B;CAC1D,IAAI,OAAO,QAAQ,OAA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A,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAkB,cAAA;EAAA,UAAA;EAAA,QAAA,EAAA,OAAA;GAAA,mBAAA;GAAA,YAAA;GAAA,UAAA;GAAA,YAAA;GAAA,mBAAA;EAAA,EAAA;EAAA,UAAA;EAAA,UAVnB;;;;;;;;;EAQN,UAAA;EAAA,cAAA;GAAA;IAAA,MAAA;IAAA,MATM;IAAK,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;KAAA;IAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;GAAoB;GAAA;IAAA,MAAA;IAAA,MAAA,GAAA;IAAA,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;KAAA;IAAA;IAAA,SAAA,CAAA,cAAA;IAAA,UAAA,CAAA,gBAAA;GAAA;EAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAW1B,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAkB,YAAA,CAAA;EAd9B,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,iBAAiB,wBAAwB;GACzC,SAAS,CAAC,OAAO,oBAAoB;GACrC,UAAU;;;;;;;;;EASX,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiService, ContextService, LinkPipe } from "./juice-js-observability.mjs";
|
|
2
|
-
import { c as ContextBar, h as apiResource, i as ServiceStatsCharts, o as problemText } from "./juice-js-observability-telemetry-
|
|
2
|
+
import { c as ContextBar, h as apiResource, i as ServiceStatsCharts, o as problemText } from "./juice-js-observability-telemetry-7uv9jeKI.mjs";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
import { ChangeDetectionStrategy, Component, computed, inject, input } from "@angular/core";
|
|
5
5
|
import { RouterLink } from "@angular/router";
|
|
@@ -210,4 +210,4 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
210
210
|
});
|
|
211
211
|
export { TimelinePage };
|
|
212
212
|
|
|
213
|
-
//# sourceMappingURL=juice-js-observability-timeline.page-
|
|
213
|
+
//# sourceMappingURL=juice-js-observability-timeline.page-BcMxG1eb.mjs.map
|