@juice-js/observability 1.4.0 → 1.5.0-alpha.46

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.
Files changed (61) hide show
  1. package/fesm2022/{juice-js-observability-agent.page-DE84_XZr.mjs → juice-js-observability-agent.page-Bwe-EmOJ.mjs} +2 -2
  2. package/fesm2022/{juice-js-observability-agent.page-DE84_XZr.mjs.map → juice-js-observability-agent.page-Bwe-EmOJ.mjs.map} +1 -1
  3. package/fesm2022/{juice-js-observability-agents.page-C-o-OXai.mjs → juice-js-observability-agents.page-CJYBSJ8O.mjs} +2 -2
  4. package/fesm2022/{juice-js-observability-agents.page-C-o-OXai.mjs.map → juice-js-observability-agents.page-CJYBSJ8O.mjs.map} +1 -1
  5. package/fesm2022/{juice-js-observability-alert.page-KyakwaUL.mjs → juice-js-observability-alert.page-CEGqjaqf.mjs} +3 -3
  6. package/fesm2022/{juice-js-observability-alert.page-KyakwaUL.mjs.map → juice-js-observability-alert.page-CEGqjaqf.mjs.map} +1 -1
  7. package/fesm2022/{juice-js-observability-alerts.page-up57Y8fX.mjs → juice-js-observability-alerts.page-C5zfUEHp.mjs} +2 -2
  8. package/fesm2022/{juice-js-observability-alerts.page-up57Y8fX.mjs.map → juice-js-observability-alerts.page-C5zfUEHp.mjs.map} +1 -1
  9. package/fesm2022/{juice-js-observability-approvals.page-BgHDUGd4.mjs → juice-js-observability-approvals.page-DaVTxyu1.mjs} +2 -2
  10. package/fesm2022/{juice-js-observability-approvals.page-BgHDUGd4.mjs.map → juice-js-observability-approvals.page-DaVTxyu1.mjs.map} +1 -1
  11. package/fesm2022/{juice-js-observability-incident.page-BryX9L8h.mjs → juice-js-observability-incident.page-g1q8yaVb.mjs} +3 -3
  12. package/fesm2022/{juice-js-observability-incident.page-BryX9L8h.mjs.map → juice-js-observability-incident.page-g1q8yaVb.mjs.map} +1 -1
  13. package/fesm2022/{juice-js-observability-incidents.page-B4DbQAWr.mjs → juice-js-observability-incidents.page-CObvTD52.mjs} +2 -2
  14. package/fesm2022/{juice-js-observability-incidents.page-B4DbQAWr.mjs.map → juice-js-observability-incidents.page-CObvTD52.mjs.map} +1 -1
  15. package/fesm2022/{juice-js-observability-load-runs.page-UPQFzG3h.mjs → juice-js-observability-load-runs.page-DSfhobd-.mjs} +2 -2
  16. package/fesm2022/{juice-js-observability-load-runs.page-UPQFzG3h.mjs.map → juice-js-observability-load-runs.page-DSfhobd-.mjs.map} +1 -1
  17. package/fesm2022/{juice-js-observability-logs.page-DtCoZuZg.mjs → juice-js-observability-logs.page-DC-mUpX6.mjs} +2 -2
  18. package/fesm2022/{juice-js-observability-logs.page-DtCoZuZg.mjs.map → juice-js-observability-logs.page-DC-mUpX6.mjs.map} +1 -1
  19. package/fesm2022/{juice-js-observability-metrics.page-By3pnaJz.mjs → juice-js-observability-metrics.page-BV9yMbns.mjs} +2 -2
  20. package/fesm2022/{juice-js-observability-metrics.page-By3pnaJz.mjs.map → juice-js-observability-metrics.page-BV9yMbns.mjs.map} +1 -1
  21. package/fesm2022/{juice-js-observability-notifications.page-DIXE52Rt.mjs → juice-js-observability-notifications.page-DVetQmgl.mjs} +2 -2
  22. package/fesm2022/{juice-js-observability-notifications.page-DIXE52Rt.mjs.map → juice-js-observability-notifications.page-DVetQmgl.mjs.map} +1 -1
  23. package/fesm2022/{juice-js-observability-overview.page-CdSUNH6a.mjs → juice-js-observability-overview.page-CndYucfJ.mjs} +2 -2
  24. package/fesm2022/{juice-js-observability-overview.page-CdSUNH6a.mjs.map → juice-js-observability-overview.page-CndYucfJ.mjs.map} +1 -1
  25. package/fesm2022/{juice-js-observability-resource.page-CIY0hWSX.mjs → juice-js-observability-resource.page-Yj_jtwmS.mjs} +2 -2
  26. package/fesm2022/{juice-js-observability-resource.page-CIY0hWSX.mjs.map → juice-js-observability-resource.page-Yj_jtwmS.mjs.map} +1 -1
  27. package/fesm2022/{juice-js-observability-resources.page-Ch6GVPyx.mjs → juice-js-observability-resources.page-5NFM0Q92.mjs} +2 -2
  28. package/fesm2022/{juice-js-observability-resources.page-Ch6GVPyx.mjs.map → juice-js-observability-resources.page-5NFM0Q92.mjs.map} +1 -1
  29. package/fesm2022/{juice-js-observability-rules.page-AbY-0A8n.mjs → juice-js-observability-rules.page-CXSJCNpv.mjs} +20 -8
  30. package/fesm2022/juice-js-observability-rules.page-CXSJCNpv.mjs.map +1 -0
  31. package/fesm2022/{juice-js-observability-service.page-BAUPza0x.mjs → juice-js-observability-service.page-CvS4LE89.mjs} +58 -4
  32. package/fesm2022/juice-js-observability-service.page-CvS4LE89.mjs.map +1 -0
  33. package/fesm2022/{juice-js-observability-services.page-CBtxLm0R.mjs → juice-js-observability-services.page-CtiBl1ji.mjs} +63 -29
  34. package/fesm2022/juice-js-observability-services.page-CtiBl1ji.mjs.map +1 -0
  35. package/fesm2022/{juice-js-observability-silences.page-WxGogpDD.mjs → juice-js-observability-silences.page-DMaUp5Ax.mjs} +2 -2
  36. package/fesm2022/{juice-js-observability-silences.page-WxGogpDD.mjs.map → juice-js-observability-silences.page-DMaUp5Ax.mjs.map} +1 -1
  37. package/fesm2022/{juice-js-observability-slo.page-BRigA4Ss.mjs → juice-js-observability-slo.page-11DGthNO.mjs} +3 -3
  38. package/fesm2022/{juice-js-observability-slo.page-BRigA4Ss.mjs.map → juice-js-observability-slo.page-11DGthNO.mjs.map} +1 -1
  39. package/fesm2022/{juice-js-observability-slos.page-DVg2gK4Y.mjs → juice-js-observability-slos.page-D1lpgmlH.mjs} +2 -2
  40. package/fesm2022/{juice-js-observability-slos.page-DVg2gK4Y.mjs.map → juice-js-observability-slos.page-D1lpgmlH.mjs.map} +1 -1
  41. package/fesm2022/{juice-js-observability-suggestions-CBuNlU0Y.mjs → juice-js-observability-suggestions-CgXS6o6u.mjs} +2 -2
  42. package/fesm2022/{juice-js-observability-suggestions-CBuNlU0Y.mjs.map → juice-js-observability-suggestions-CgXS6o6u.mjs.map} +1 -1
  43. package/fesm2022/{juice-js-observability-telemetry-CaunxC3Y.mjs → juice-js-observability-telemetry-BG91FqGp.mjs} +32 -4
  44. package/fesm2022/juice-js-observability-telemetry-BG91FqGp.mjs.map +1 -0
  45. package/fesm2022/{juice-js-observability-timeline.page-ChDtTC3b.mjs → juice-js-observability-timeline.page-CZND4ioM.mjs} +2 -2
  46. package/fesm2022/{juice-js-observability-timeline.page-ChDtTC3b.mjs.map → juice-js-observability-timeline.page-CZND4ioM.mjs.map} +1 -1
  47. package/fesm2022/{juice-js-observability-topology.page-BN5NL2st.mjs → juice-js-observability-topology.page-CwaImyQT.mjs} +2 -2
  48. package/fesm2022/{juice-js-observability-topology.page-BN5NL2st.mjs.map → juice-js-observability-topology.page-CwaImyQT.mjs.map} +1 -1
  49. package/fesm2022/{juice-js-observability-trace.page-CtJQZkNW.mjs → juice-js-observability-trace.page-BofeMnqj.mjs} +2 -2
  50. package/fesm2022/{juice-js-observability-trace.page-CtJQZkNW.mjs.map → juice-js-observability-trace.page-BofeMnqj.mjs.map} +1 -1
  51. package/fesm2022/{juice-js-observability-traces.page-BkGlHFEK.mjs → juice-js-observability-traces.page-CCVWmg44.mjs} +2 -2
  52. package/fesm2022/{juice-js-observability-traces.page-BkGlHFEK.mjs.map → juice-js-observability-traces.page-CCVWmg44.mjs.map} +1 -1
  53. package/fesm2022/juice-js-observability.mjs +35 -26
  54. package/fesm2022/juice-js-observability.mjs.map +1 -1
  55. package/package.json +1 -1
  56. package/styles/_observability.scss +38 -14
  57. package/types/juice-js-observability.d.ts +26 -1
  58. package/fesm2022/juice-js-observability-rules.page-AbY-0A8n.mjs.map +0 -1
  59. package/fesm2022/juice-js-observability-service.page-BAUPza0x.mjs.map +0 -1
  60. package/fesm2022/juice-js-observability-services.page-CBtxLm0R.mjs.map +0 -1
  61. package/fesm2022/juice-js-observability-telemetry-CaunxC3Y.mjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { ApiService, ContextService, LinkPipe, ObservabilityLinks } from "./juice-js-observability.mjs";
2
- import { _ as DurationPipe, a as TraceTable, c as ContextBar, g as AgoPipe, h as apiResource, i as ServiceStatsCharts, l as HealthBadge, n as LogTable, o as problemText, r as MetricExplorer, s as ConfidenceBadge, v as PercentPipe, y as ReasonPipe } from "./juice-js-observability-telemetry-CaunxC3Y.mjs";
2
+ import { _ as DurationPipe, a as TraceTable, c as ContextBar, g as AgoPipe, h as apiResource, i as ServiceStatsCharts, l as HealthBadge, n as LogTable, o as problemText, r as MetricExplorer, s as ConfidenceBadge, v as PercentPipe, y as ReasonPipe } from "./juice-js-observability-telemetry-BG91FqGp.mjs";
3
3
  import * as i0 from "@angular/core";
4
4
  import { ChangeDetectionStrategy, Component, computed, inject, input, linkedSignal, signal } from "@angular/core";
5
5
  import { Router, RouterLink } from "@angular/router";
@@ -569,6 +569,9 @@ var ServicePage = class ServicePage {
569
569
  })
570
570
  });
571
571
  error = computed(() => problemText(this.service.error()), ...ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []);
572
+ confirmingForget = signal(false, ...ngDevMode ? [{ debugName: "confirmingForget" }] : /* istanbul ignore next */ []);
573
+ forgetting = signal(false, ...ngDevMode ? [{ debugName: "forgetting" }] : /* istanbul ignore next */ []);
574
+ forgetError = signal("", ...ngDevMode ? [{ debugName: "forgetError" }] : /* istanbul ignore next */ []);
572
575
  health = computed(() => (this.service.value()?.health ?? []).filter((h) => h.subjectType === "service"), ...ngDevMode ? [{ debugName: "health" }] : /* istanbul ignore next */ []);
573
576
  instances = computed(() => {
574
577
  const env = this.ctx.environment();
@@ -634,6 +637,25 @@ var ServicePage = class ServicePage {
634
637
  queryParamsHandling: "merge"
635
638
  });
636
639
  }
640
+ forget() {
641
+ if (!this.confirmingForget()) {
642
+ this.confirmingForget.set(true);
643
+ return;
644
+ }
645
+ this.forgetting.set(true);
646
+ this.forgetError.set("");
647
+ this.api.forgetService(this.id()).subscribe({
648
+ next: () => {
649
+ this.forgetting.set(false);
650
+ this.router.navigate(this.links.to("services"), { queryParams: this.ctx.keep() });
651
+ },
652
+ error: (e) => {
653
+ this.forgetting.set(false);
654
+ this.confirmingForget.set(false);
655
+ this.forgetError.set(e.status === 403 ? "Forgetting a service needs the admin role." : problemText(e));
656
+ }
657
+ });
658
+ }
637
659
  static ɵfac = i0.ɵɵngDeclareFactory({
638
660
  minVersion: "12.0.0",
639
661
  version: "22.2.4",
@@ -705,12 +727,28 @@ var ServicePage = class ServicePage {
705
727
  <a [routerLink]="['services'] | jcLink" [queryParams]="ctx.keep()" class="jc-crumb">Services</a>
706
728
  <span class="jc-crumb-sep">›</span>
707
729
  <h1>{{ service.value()?.key ?? '…' }}</h1>
730
+ @if (service.value()?.signalPacks?.includes('juice')) { <span class="jc-badge jc-health-none" data-testid="service-juice" title="Sends Juice signals: the Juice rule templates and outbox figures apply">Juice</span> }
708
731
  @for (l of service.value()?.links ?? []; track l.url) { <a mat-button [href]="l.url" target="_blank" rel="noopener">{{ l.title }} ↗</a> }
709
732
  </jc-context-bar>
710
733
  @if (service.isLoading()) { <mat-progress-bar mode="indeterminate" /> }
711
734
  @if (service.error()) { <p class="jc-error">{{ error() }}</p> }
712
735
 
713
736
  @if (service.value(); as s) {
737
+ @if (s.retiredAt) {
738
+ <div class="jc-notice" data-testid="service-retired-notice">
739
+ <p><strong>Retired {{ s.retiredAt | ago }}</strong>, with no telemetry since {{ s.lastSeen | ago }}. It isn't evaluated, and the
740
+ Services list and topology leave it out unless asked. Telemetry from it brings it back.</p>
741
+ <p class="jc-small">Forgetting it removes the service with its instances, dependencies and health history. Alerts, incidents and the
742
+ audit log keep their records; telemetry seen later makes it a new service.</p>
743
+ @if (confirmingForget()) {
744
+ <button mat-flat-button color="warn" type="button" data-testid="forget-confirm" [disabled]="forgetting()" (click)="forget()">Forget {{ s.key }}</button>
745
+ <button mat-button type="button" (click)="confirmingForget.set(false)">Cancel</button>
746
+ } @else {
747
+ <button mat-stroked-button type="button" data-testid="forget" (click)="forget()">Forget service</button>
748
+ }
749
+ @if (forgetError()) { <span class="jc-error" data-testid="forget-error">{{ forgetError() }}</span> }
750
+ </div>
751
+ }
714
752
  <div class="jc-health-strip">
715
753
  @for (h of health(); track h.environment) {
716
754
  <div class="jc-card jc-health-card" [class.jc-selected]="h.environment === ctx.environment()">
@@ -729,7 +767,7 @@ var ServicePage = class ServicePage {
729
767
  <button mat-button (click)="ctx.set({ env: h.environment })">Investigate {{ h.environment }}</button>
730
768
  }
731
769
  </div>
732
- } @empty { <p class="jc-muted">No health evaluated yet: no data.</p> }
770
+ } @empty { <p class="jc-muted">{{ s.retiredAt ? 'Not evaluated while retired.' : 'No health evaluated yet: no data.' }}</p> }
733
771
  </div>
734
772
 
735
773
  <p><a mat-stroked-button [routerLink]="['timeline'] | jcLink" [queryParams]="ctx.keep({ service: id() })" data-testid="service-timeline">Timeline</a></p>
@@ -1051,12 +1089,28 @@ i0.ɵɵngDeclareClassMetadata({
1051
1089
  <a [routerLink]="['services'] | jcLink" [queryParams]="ctx.keep()" class="jc-crumb">Services</a>
1052
1090
  <span class="jc-crumb-sep">›</span>
1053
1091
  <h1>{{ service.value()?.key ?? '…' }}</h1>
1092
+ @if (service.value()?.signalPacks?.includes('juice')) { <span class="jc-badge jc-health-none" data-testid="service-juice" title="Sends Juice signals: the Juice rule templates and outbox figures apply">Juice</span> }
1054
1093
  @for (l of service.value()?.links ?? []; track l.url) { <a mat-button [href]="l.url" target="_blank" rel="noopener">{{ l.title }} ↗</a> }
1055
1094
  </jc-context-bar>
1056
1095
  @if (service.isLoading()) { <mat-progress-bar mode="indeterminate" /> }
1057
1096
  @if (service.error()) { <p class="jc-error">{{ error() }}</p> }
1058
1097
 
1059
1098
  @if (service.value(); as s) {
1099
+ @if (s.retiredAt) {
1100
+ <div class="jc-notice" data-testid="service-retired-notice">
1101
+ <p><strong>Retired {{ s.retiredAt | ago }}</strong>, with no telemetry since {{ s.lastSeen | ago }}. It isn't evaluated, and the
1102
+ Services list and topology leave it out unless asked. Telemetry from it brings it back.</p>
1103
+ <p class="jc-small">Forgetting it removes the service with its instances, dependencies and health history. Alerts, incidents and the
1104
+ audit log keep their records; telemetry seen later makes it a new service.</p>
1105
+ @if (confirmingForget()) {
1106
+ <button mat-flat-button color="warn" type="button" data-testid="forget-confirm" [disabled]="forgetting()" (click)="forget()">Forget {{ s.key }}</button>
1107
+ <button mat-button type="button" (click)="confirmingForget.set(false)">Cancel</button>
1108
+ } @else {
1109
+ <button mat-stroked-button type="button" data-testid="forget" (click)="forget()">Forget service</button>
1110
+ }
1111
+ @if (forgetError()) { <span class="jc-error" data-testid="forget-error">{{ forgetError() }}</span> }
1112
+ </div>
1113
+ }
1060
1114
  <div class="jc-health-strip">
1061
1115
  @for (h of health(); track h.environment) {
1062
1116
  <div class="jc-card jc-health-card" [class.jc-selected]="h.environment === ctx.environment()">
@@ -1075,7 +1129,7 @@ i0.ɵɵngDeclareClassMetadata({
1075
1129
  <button mat-button (click)="ctx.set({ env: h.environment })">Investigate {{ h.environment }}</button>
1076
1130
  }
1077
1131
  </div>
1078
- } @empty { <p class="jc-muted">No health evaluated yet: no data.</p> }
1132
+ } @empty { <p class="jc-muted">{{ s.retiredAt ? 'Not evaluated while retired.' : 'No health evaluated yet: no data.' }}</p> }
1079
1133
  </div>
1080
1134
 
1081
1135
  <p><a mat-stroked-button [routerLink]="['timeline'] | jcLink" [queryParams]="ctx.keep({ service: id() })" data-testid="service-timeline">Timeline</a></p>
@@ -1254,4 +1308,4 @@ i0.ɵɵngDeclareClassMetadata({
1254
1308
  });
1255
1309
  export { ServicePage };
1256
1310
 
1257
- //# sourceMappingURL=juice-js-observability-service.page-BAUPza0x.mjs.map
1311
+ //# sourceMappingURL=juice-js-observability-service.page-CvS4LE89.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"juice-js-observability-service.page-CvS4LE89.mjs","names":["i1","i3","i2"],"sources":["../../../../projects/juice-js/observability/src/lib/shared/capacity.ts","../../../../projects/juice-js/observability/src/lib/pages/service.page.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, inject, input, linkedSignal, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\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 { LinkPipe } from '../core/options';\nimport { Capacity } from '../core/models';\nimport { apiResource } from './resource';\nimport { problemText } from './telemetry';\n\nexport interface CapacityInputs {\n users: number;\n /** Seconds between one user's actions. */\n thinkSeconds: number;\n /** Requests or messages one user action causes in this service. */\n perAction: number;\n /** The CPU use to stay under, from 0 to 1. */\n targetCpu: number;\n coresPerInstance: number;\n}\n\nexport interface CapacityPlan {\n perSecond: number;\n instances: number;\n cores: number;\n /** Per instance; null without memory data. */\n memoryBytes: number | null;\n /** The load each instance would carry. */\n perInstance: number;\n /** That load over the highest measured: above 1 is beyond what was measured. */\n beyondMeasured: number | null;\n /** What set the number of instances: CPU, or a consumer that was already busy all the time. */\n limitedBy: 'cpu' | 'messages';\n}\n\n/**\n * The calculator: `null` when the inputs or the measurements can't give an answer, such as a target that idle CPU alone\n * already exceeds. Each instance can carry (target × cores − idle) ÷ CPU per unit, unless a consumer was seen busy all the\n * time: more CPU doesn't help one that handles a message at a time, so an instance carries only the rate it reached.\n */\nexport function planCapacity(m: Capacity, i: CapacityInputs): CapacityPlan | null {\n if (!m.cpuSecondsPerUnit || m.cpuSecondsPerUnit <= 0) return null;\n if (!(i.users > 0 && i.perAction > 0 && i.targetCpu > 0 && i.targetCpu <= 1 && i.coresPerInstance > 0 && i.thinkSeconds >= 0)) return null;\n const response = (m.responseMs ?? 0) / 1000;\n if (i.thinkSeconds + response <= 0) return null;\n\n const byCpu = (i.targetCpu * i.coresPerInstance - (m.idleCores ?? 0)) / m.cpuSecondsPerUnit;\n if (byCpu <= 0) return null;\n const limitedBy = consumerBusy(m) && m.peakMessagesPerSecond < byCpu ? 'messages' : 'cpu';\n const carried = limitedBy === 'messages' ? m.peakMessagesPerSecond : byCpu;\n const perSecond = i.users * i.perAction / (i.thinkSeconds + response);\n const instances = Math.max(1, Math.ceil(perSecond / carried));\n const perInstance = perSecond / instances;\n const memoryBytes = m.memoryModel === 'fitted'\n ? m.idleMemoryBytes! + m.memoryBytesPerInFlight! * perInstance * response\n : m.peakMemoryBytes;\n // A consumer held back by message handling never used its cores: count what it used, at the target, not the machine's.\n const coresEach = limitedBy === 'messages' && m.peakCores !== null\n ? Math.min(i.coresPerInstance, Math.ceil(m.peakCores / i.targetCpu))\n : i.coresPerInstance;\n return {\n perSecond, instances, cores: instances * coresEach, memoryBytes, perInstance,\n beyondMeasured: m.peakPerSecond > 0 ? perInstance / m.peakPerSecond : null,\n limitedBy,\n };\n}\n\n/** A consumer counts as busy all the time from this much message processing per second of time. */\nconst BUSY_CONSUMER = 0.9;\nfunction consumerBusy(m: Capacity): boolean { return m.peakMessagesInFlight >= BUSY_CONSUMER && m.peakMessagesPerSecond > 0; }\n\n/** A thread pool queue of a few items comes and goes on a healthy host; from this many, work was really waiting. */\nconst NOTABLE_QUEUE = 10;\n\n/** Response time counts as rising with load from this ratio between the busiest and quietest samples. */\nconst RISING_RESPONSE = 1.5;\n\nfunction bytes(value: number | null): string {\n if (value === null) return '—';\n return value >= 1024 ** 3 ? `${(value / 1024 ** 3).toFixed(1)} GB` : `${Math.round(value / 1024 ** 2)} MB`;\n}\nfunction rate(value: number): string { return value >= 10 ? value.toFixed(0) : value.toFixed(2); }\n\n/**\n * A service's Capacity tab: what it was measured to need in the selected window, and a calculator from users to instances,\n * cores and memory. The estimate says where it comes from and where it stops holding: scaling isn't linear, and the\n * service's own databases and brokers are not in it.\n */\n@Component({\n selector: 'jc-service-capacity',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [FormsModule, MatFormFieldModule, MatInputModule, MatProgressBarModule, RouterLink, LinkPipe],\n template: `\n @if (capacity.isLoading()) { <mat-progress-bar mode=\"indeterminate\" /> }\n @if (capacity.error()) { <p class=\"jc-error\">{{ error() }}</p> }\n @if (mixedEnvironments()) {\n <p class=\"jc-notice\">This service runs in more than one environment, and their hardware may differ. Choose an environment for an estimate that means something.</p>\n }\n @if (capacity.value(); as m) {\n @if (m.samples === 0) {\n <p class=\"jc-muted\">No telemetry from this service in this window.</p>\n } @else {\n <section class=\"jc-card\" aria-labelledby=\"jc-capacity-estimate\">\n <h3 id=\"jc-capacity-estimate\">Estimate</h3>\n <div class=\"jc-capacity-inputs\">\n <mat-form-field subscriptSizing=\"dynamic\"><mat-label>Concurrent users</mat-label>\n <input matInput type=\"number\" min=\"1\" name=\"users\" [ngModel]=\"users()\" (ngModelChange)=\"users.set($event)\" /></mat-form-field>\n <mat-form-field subscriptSizing=\"dynamic\"><mat-label>Seconds between actions</mat-label>\n <input matInput type=\"number\" min=\"0\" name=\"thinkSeconds\" [ngModel]=\"thinkSeconds()\" (ngModelChange)=\"thinkSeconds.set($event)\" /></mat-form-field>\n <mat-form-field subscriptSizing=\"dynamic\"><mat-label>Requests per action</mat-label>\n <input matInput type=\"number\" min=\"0\" name=\"perAction\" [ngModel]=\"perAction()\" (ngModelChange)=\"perAction.set($event)\" /></mat-form-field>\n <mat-form-field subscriptSizing=\"dynamic\"><mat-label>Target CPU use (%)</mat-label>\n <input matInput type=\"number\" min=\"1\" max=\"100\" name=\"targetCpu\" [ngModel]=\"targetCpu()\" (ngModelChange)=\"targetCpu.set($event)\" /></mat-form-field>\n <mat-form-field subscriptSizing=\"dynamic\"><mat-label>Cores per instance</mat-label>\n <input matInput type=\"number\" min=\"1\" name=\"coresPerInstance\" [ngModel]=\"coresPerInstance()\" (ngModelChange)=\"coresPerInstance.set($event)\" /></mat-form-field>\n </div>\n @if (plan(); as p) {\n <div class=\"jc-capacity-result\" data-testid=\"capacity-plan\">\n <div><strong>{{ p.instances }}</strong><span class=\"jc-muted\">instance{{ p.instances === 1 ? '' : 's' }}</span></div>\n <div><strong>{{ p.cores }}</strong><span class=\"jc-muted\">cores in total</span></div>\n <div><strong>{{ memory(p.memoryBytes) }}</strong><span class=\"jc-muted\">memory per instance{{ m.memoryModel === 'peak' ? ' (highest seen)' : '' }}</span></div>\n <div><strong>{{ perSecond(p.perSecond) }}</strong><span class=\"jc-muted\">requests and messages/s</span></div>\n </div>\n @if (p.beyondMeasured !== null && p.beyondMeasured > 1) {\n <p class=\"jc-notice\" data-testid=\"capacity-beyond\">Each instance would carry {{ perSecond(p.perInstance) }}/s, {{ p.beyondMeasured.toFixed(1) }}× the highest measured ({{ perSecond(m.peakPerSecond) }}/s). This is an extrapolation, and only a load test can confirm it.</p>\n }\n } @else if (m.cpuModel === 'none') {\n <p class=\"jc-notice\">No CPU data, so no estimate. CPU needs two readings at least a minute apart: choose a longer window, or wait. If it stays empty, add <code>AddMeter(\"System.Runtime\")</code> to the host's metrics (.NET 9+).</p>\n } @else {\n <p class=\"jc-notice\">No estimate for these values. Check them: idle CPU alone may already exceed the target.</p>\n }\n <ul class=\"jc-capacity-notes\">\n @if (responseRising(); as r) {\n <li class=\"jc-bad\">Response time already rises with load: {{ r.low }} ms when quiet, {{ r.high }} ms when busy. Something may be near its limit, so the real capacity may be lower.</li>\n }\n @if (busyConsumer()) {\n <li class=\"jc-bad\" data-testid=\"capacity-busy-consumer\">Message processing was busy nearly all the time, at about {{ perSecond(m.peakMessagesPerSecond) }} messages/s per instance. If it handles one message at a time, that is its limit whatever CPU says, and its queue may be growing. The estimate uses that rate, but a saturated consumer's rate can fall, so it may not hold. See which step takes the time in a trace.</li>\n }\n @if (m.outbox?.fallingBehind) {\n <li class=\"jc-bad\" data-testid=\"capacity-outbox-behind\">Outbox delivery is falling behind: {{ count(m.outbox!.undelivered) }} messages created in this window weren't delivered. CPU and requests can look healthy while this grows, and the estimate doesn't include it. If another service delivers this outbox, this doesn't apply.</li>\n }\n @if (m.peakQueue !== null && m.peakQueue >= notableQueue) {\n <li class=\"jc-bad\">The thread pool queue reached {{ m.peakQueue }}: work was waiting for a thread.</li>\n }\n @if (m.cpuModel === 'average') {\n <li data-testid=\"capacity-load-hint\">Load didn't vary enough here to separate idle CPU from the cost of each request, so this is rough. A <a [routerLink]=\"['load-runs'] | jcLink\" [queryParams]=\"ctx.keep()\">load test</a> gives a better estimate.</li>\n }\n <li>Assumes cost grows in a straight line with load. A database, lock or connection limit can be reached long before CPU runs out.</li>\n <li>Covers this service only, not its databases, brokers or the services it calls.</li>\n </ul>\n </section>\n\n <section class=\"jc-card\" aria-labelledby=\"jc-capacity-measured\">\n <h3 id=\"jc-capacity-measured\">Measured in this window</h3>\n <table class=\"jc-table jc-capacity-measured\">\n <tbody>\n <tr><th>CPU per request or message</th>\n <td>\n @if (m.cpuSecondsPerUnit !== null) { {{ (m.cpuSecondsPerUnit * 1000).toFixed(1) }} ms }\n @else { <span class=\"jc-muted\">No CPU data yet</span> }\n @if (m.cpuModel === 'average') {\n <div class=\"jc-muted jc-small\">Measured in the busiest samples and includes idle CPU, so it can read high. Load didn't vary enough, or CPU didn't follow it in a straight line, to separate the two.</div>\n }\n </td></tr>\n <tr><th>Idle CPU</th><td>@if (m.idleCores !== null) { {{ m.idleCores.toFixed(2) }} cores } @else { <span class=\"jc-muted\">Not separated</span> }</td></tr>\n <tr><th>Idle memory</th><td>@if (m.idleMemoryBytes !== null) { {{ memory(m.idleMemoryBytes) }} } @else { <span class=\"jc-muted\">Not separated</span> }</td></tr>\n <tr><th>Memory growth under load</th><td>@if (m.memoryBytesPerInFlight !== null) { {{ memory(m.memoryBytesPerInFlight) }} per request in flight } @else { <span class=\"jc-muted\">Not separated</span> }</td></tr>\n <tr><th>Highest load, one instance</th><td>{{ perSecond(m.peakPerSecond) }} requests and messages/s</td></tr>\n <tr><th>Highest use, one instance</th><td>\n {{ m.peakCores !== null ? m.peakCores.toFixed(2) + ' cores' : 'CPU unknown' }} · {{ m.peakMemoryBytes !== null ? memory(m.peakMemoryBytes) : 'memory unknown' }}</td></tr>\n <tr><th>Average response</th><td>{{ m.responseMs !== null ? m.responseMs.toFixed(0) + ' ms' : '—' }}</td></tr>\n <tr><th>Measured on</th><td>\n {{ m.instances }} instance{{ m.instances === 1 ? '' : 's' }}@if (m.coresPerInstance) {, {{ m.coresPerInstance }} cores each}@if (m.hosts.length) {, on {{ m.hosts.join(', ') }}}.\n <div class=\"jc-muted jc-small\">Figures from other hardware carry over only roughly.</div></td></tr>\n <tr><th>Based on</th><td>\n {{ m.samples }} samples of {{ m.stepSeconds }} s.\n <div class=\"jc-muted jc-small\">{{ sourceNote() }}</div>\n @if (m.truncated) { <div class=\"jc-bad jc-small\">Too many samples in this window, so only the newest were used. Choose a shorter one.</div> }</td></tr>\n </tbody>\n </table>\n </section>\n\n @if (m.outbox; as o) {\n <section class=\"jc-card\" aria-labelledby=\"jc-capacity-outbox\" data-testid=\"capacity-outbox\">\n <h3 id=\"jc-capacity-outbox\">Outbox delivery</h3>\n <table class=\"jc-table jc-capacity-measured\">\n <tbody>\n <tr><th>Messages created</th><td>{{ perSecond(o.createdPerSecond) }}/s</td></tr>\n <tr><th>Messages delivered</th><td>{{ perSecond(o.deliveredPerSecond) }}/s</td></tr>\n <tr><th>Created but not delivered</th><td [class.jc-bad]=\"o.fallingBehind\">{{ count(o.undelivered) }} in this window\n <div class=\"jc-muted jc-small\">Includes messages of rolled-back transactions, which are never delivered.</div></td></tr>\n <tr><th>Time to delivery, p95</th><td [class.jc-bad]=\"o.fallingBehind\">@if (o.recentDelaySeconds !== null) { {{ o.recentDelaySeconds.toFixed(1) }} s in the last 5 minutes } @else { <span class=\"jc-muted\">Nothing delivered in the last 5 minutes</span> }</td></tr>\n </tbody>\n </table>\n </section>\n }\n }\n }`,\n})\nexport class ServiceCapacity {\n protected readonly ctx = inject(ContextService);\n private readonly api = inject(ApiService);\n readonly serviceId = input.required<string>();\n /** The environments the service runs in: figures across several mix their hardware. */\n readonly environments = input<string[]>([]);\n\n protected readonly capacity = apiResource({\n params: () => ({ id: this.serviceId(), env: this.ctx.environment(), range: this.ctx.range(), abs: this.ctx.absolute() }),\n stream: ({ params }) => this.api.capacity({ serviceId: params.id, environment: params.env, ...this.ctx.window() }),\n });\n protected readonly users = signal(1000);\n protected readonly thinkSeconds = signal(10);\n protected readonly perAction = signal(1);\n protected readonly targetCpu = signal(60);\n protected readonly coresPerInstance = linkedSignal(() => this.capacity.value()?.coresPerInstance ?? 2);\n\n protected readonly error = computed(() => problemText(this.capacity.error()));\n protected readonly mixedEnvironments = computed(() => !this.ctx.environment() && new Set(this.environments()).size > 1);\n protected readonly plan = computed(() => {\n const m = this.capacity.value();\n return m ? planCapacity(m, {\n users: this.users(), thinkSeconds: this.thinkSeconds(), perAction: this.perAction(), targetCpu: this.targetCpu() / 100, coresPerInstance: this.coresPerInstance(),\n }) : null;\n });\n protected readonly busyConsumer = computed(() => { const m = this.capacity.value(); return !!m && consumerBusy(m); });\n protected readonly responseRising = computed(() => {\n const m = this.capacity.value();\n return m?.responseLowLoadMs && m.responseHighLoadMs && m.responseHighLoadMs >= RISING_RESPONSE * m.responseLowLoadMs\n ? { low: Math.round(m.responseLowLoadMs), high: Math.round(m.responseHighLoadMs) } : null;\n });\n protected readonly sourceNote = computed(() => this.capacity.value()?.requestSource === 'metrics'\n ? 'Requests are counted from the http.server.request.duration metric, messages from spans.'\n : 'Requests and messages are counted from spans, which undercount if traces are sampled. That makes the cost per request read high. Exporting http.server.request.duration fixes the request count.');\n\n protected readonly notableQueue = NOTABLE_QUEUE;\n protected readonly memory = bytes;\n protected readonly perSecond = rate;\n protected readonly count = (value: number) => Math.round(value).toLocaleString('en-US');\n}\n","import { LinkPipe, ObservabilityLinks } from '../core/options';\nimport { ChangeDetectionStrategy, Component, computed, inject, input, signal } from '@angular/core';\nimport { apiResource } from '../shared/resource';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { MatButtonModule } from '@angular/material/button';\nimport { Router, RouterLink } from '@angular/router';\nimport { ApiService } from '../core/api.service';\nimport { ContextService } from '../core/context.service';\nimport { AgoPipe, DurationPipe, PercentPipe, ReasonPipe } from '../shared/format';\nimport { ConfidenceBadge, ContextBar, HealthBadge } from '../shared/ui';\nimport { LogTable, MetricExplorer, ServiceStatsCharts, TraceTable, problemText } from '../shared/telemetry';\nimport { ServiceCapacity } from '../shared/capacity';\n\nconst TABS = ['overview', 'operations', 'dependencies', 'traces', 'logs', 'metrics', 'capacity'] as const;\n\n/**\n * One service across its environments (Console requirements §8): health with reasons, instances, operations,\n * dependencies, traces, logs and metrics, without leaving the service. The tab and the selected operation are in the\n * URL, so the investigation can be shared and the back button returns to it.\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [LinkPipe, RouterLink, MatTabsModule, MatProgressBarModule, MatButtonModule, ContextBar, HealthBadge, ConfidenceBadge,\n TraceTable, LogTable, MetricExplorer, ServiceStatsCharts, ServiceCapacity, AgoPipe, DurationPipe, PercentPipe, ReasonPipe],\n template: `\n <jc-context-bar>\n <a [routerLink]=\"['services'] | jcLink\" [queryParams]=\"ctx.keep()\" class=\"jc-crumb\">Services</a>\n <span class=\"jc-crumb-sep\">›</span>\n <h1>{{ service.value()?.key ?? '…' }}</h1>\n @if (service.value()?.signalPacks?.includes('juice')) { <span class=\"jc-badge jc-health-none\" data-testid=\"service-juice\" title=\"Sends Juice signals: the Juice rule templates and outbox figures apply\">Juice</span> }\n @for (l of service.value()?.links ?? []; track l.url) { <a mat-button [href]=\"l.url\" target=\"_blank\" rel=\"noopener\">{{ l.title }} ↗</a> }\n </jc-context-bar>\n @if (service.isLoading()) { <mat-progress-bar mode=\"indeterminate\" /> }\n @if (service.error()) { <p class=\"jc-error\">{{ error() }}</p> }\n\n @if (service.value(); as s) {\n @if (s.retiredAt) {\n <div class=\"jc-notice\" data-testid=\"service-retired-notice\">\n <p><strong>Retired {{ s.retiredAt | ago }}</strong>, with no telemetry since {{ s.lastSeen | ago }}. It isn't evaluated, and the\n Services list and topology leave it out unless asked. Telemetry from it brings it back.</p>\n <p class=\"jc-small\">Forgetting it removes the service with its instances, dependencies and health history. Alerts, incidents and the\n audit log keep their records; telemetry seen later makes it a new service.</p>\n @if (confirmingForget()) {\n <button mat-flat-button color=\"warn\" type=\"button\" data-testid=\"forget-confirm\" [disabled]=\"forgetting()\" (click)=\"forget()\">Forget {{ s.key }}</button>\n <button mat-button type=\"button\" (click)=\"confirmingForget.set(false)\">Cancel</button>\n } @else {\n <button mat-stroked-button type=\"button\" data-testid=\"forget\" (click)=\"forget()\">Forget service</button>\n }\n @if (forgetError()) { <span class=\"jc-error\" data-testid=\"forget-error\">{{ forgetError() }}</span> }\n </div>\n }\n <div class=\"jc-health-strip\">\n @for (h of health(); track h.environment) {\n <div class=\"jc-card jc-health-card\" [class.jc-selected]=\"h.environment === ctx.environment()\">\n <div class=\"jc-row\"><strong>{{ h.environment ?? 'no environment' }}</strong><jc-health [state]=\"h.state\" [stale]=\"h.stale\" /></div>\n <ul class=\"jc-reasons\">\n @for (r of h.reasons; track r) {\n <li>\n @if (dependencyOf(r); as dep) {\n {{ r | reason }} — <a [routerLink]=\"['services', dep.id] | jcLink\" [queryParams]=\"ctx.keep()\">open</a>\n } @else { {{ r | reason }} }\n </li>\n }\n </ul>\n <div class=\"jc-muted jc-small\">since {{ h.since | ago }} · evaluated {{ h.evaluatedAt | ago }}</div>\n @if (h.environment && h.environment !== ctx.environment()) {\n <button mat-button (click)=\"ctx.set({ env: h.environment })\">Investigate {{ h.environment }}</button>\n }\n </div>\n } @empty { <p class=\"jc-muted\">{{ s.retiredAt ? 'Not evaluated while retired.' : 'No health evaluated yet: no data.' }}</p> }\n </div>\n\n <p><a mat-stroked-button [routerLink]=\"['timeline'] | jcLink\" [queryParams]=\"ctx.keep({ service: id() })\" data-testid=\"service-timeline\">Timeline</a></p>\n <mat-tab-group [selectedIndex]=\"tabIndex()\" (selectedIndexChange)=\"openTab($event)\" animationDuration=\"0ms\" mat-stretch-tabs=\"false\">\n <mat-tab label=\"Overview\">\n @if (tabIndex() === 0) {\n <jc-service-stats [query]=\"{ serviceId: id() }\" />\n <h3>Instances</h3>\n <table class=\"jc-table\">\n <thead><tr><th>Instance</th><th>Environment</th><th>Health</th><th>Version</th><th>State</th><th>Last seen</th><th></th></tr></thead>\n <tbody>\n @for (i of instances(); track i.id) {\n <tr>\n <td>{{ i.instanceKey }}@if (i.keySource !== 'Observed') { <span class=\"jc-muted jc-small\" title=\"No service.instance.id: derived from host and process\"> (derived)</span> }</td>\n <td>{{ i.environment }}</td>\n <td><jc-health [state]=\"i.health\" /></td>\n <td>{{ i.serviceVersion ?? '—' }}</td>\n <td>{{ i.state }}</td>\n <td>{{ i.lastSeen | ago }}</td>\n <td class=\"jc-nowrap\">\n <a [routerLink]=\"[]\" [queryParams]=\"ctx.keep({ tab: 'traces', instance: i.id })\">traces</a> ·\n <a [routerLink]=\"[]\" [queryParams]=\"ctx.keep({ tab: 'logs', instance: i.id })\">logs</a>\n @if (i.hostResourceId) { · <a [routerLink]=\"['resources', i.hostResourceId] | jcLink\" [queryParams]=\"ctx.keep()\">host</a> }\n </td>\n </tr>\n } @empty { <tr><td colspan=\"7\" class=\"jc-muted\">No instances.</td></tr> }\n </tbody>\n </table>\n }\n </mat-tab>\n\n <mat-tab label=\"Operations\">\n @if (tabIndex() === 1) {\n @if (operations.isLoading()) { <mat-progress-bar mode=\"indeterminate\" /> }\n <table class=\"jc-table\">\n <thead><tr><th>Operation</th><th>Kind</th><th>Requests</th><th title=\"Average over the selected time range. The chart shows each moment, so a burst reads higher there.\">Avg/s</th><th>Errors</th><th>p50</th><th>p95</th><th>p99</th><th>Last seen</th><th></th></tr></thead>\n <tbody>\n @for (o of operations.value()?.items ?? []; track o.name + o.kind) {\n <tr [class.jc-selected]=\"o.name === operation()\">\n <td><a [routerLink]=\"[]\" [queryParams]=\"ctx.keep({ tab: 'operations', op: o.name })\">{{ o.name }}</a></td>\n <td>{{ o.kind }}</td>\n <td>{{ o.count }}</td>\n <td>{{ o.requestsPerSecond.toFixed(2) }}</td>\n <td [class.jc-bad]=\"o.errorRate >= 0.05\">{{ o.errorRate | percent2 }}</td>\n <td>{{ o.p50Ms | duration }}</td><td>{{ o.p95Ms | duration }}</td><td>{{ o.p99Ms | duration }}</td>\n <td>{{ o.lastSeen | ago }}</td>\n <td class=\"jc-nowrap\">\n <a [routerLink]=\"[]\" [queryParams]=\"ctx.keep({ tab: 'traces', op: o.name, status: 'error' })\">error traces</a> ·\n <a [routerLink]=\"[]\" [queryParams]=\"ctx.keep({ tab: 'traces', op: o.name, slow: o.p95Ms })\">slow traces</a>\n </td>\n </tr>\n } @empty { <tr><td colspan=\"10\" class=\"jc-muted\">No operations in this window.</td></tr> }\n </tbody>\n </table>\n @if (operation(); as op) {\n <h3>{{ op }}</h3>\n <jc-service-stats [query]=\"{ serviceId: id(), operation: op }\" />\n }\n }\n </mat-tab>\n\n <mat-tab label=\"Dependencies\">\n @if (tabIndex() === 2) {\n <h3>Calls and uses</h3>\n <table class=\"jc-table\">\n <thead><tr><th>Target</th><th>Relation</th><th>Evidence</th><th>Spans seen</th><th>Last seen</th><th></th></tr></thead>\n <tbody>\n @for (d of downstream(); track d.edge.id) {\n <tr>\n <td><a [routerLink]=\"d.link\" [queryParams]=\"ctx.keep()\">{{ d.name }}</a>&nbsp;<span class=\"jc-muted jc-small\">{{ d.type }}</span></td>\n <td>{{ d.edge.relation }}</td>\n <td><jc-confidence [confidence]=\"d.edge.confidence\" /></td>\n <td>{{ d.edge.spanCount }}</td>\n <td>{{ d.edge.lastSeen | ago }}</td>\n <td><a [routerLink]=\"['topology'] | jcLink\" [queryParams]=\"ctx.keep({ edge: d.edge.id })\">evidence</a> ·\n <a [routerLink]=\"[]\" [queryParams]=\"ctx.keep({ tab: 'traces', dependency: d.edge.id })\">traces</a></td>\n </tr>\n } @empty { <tr><td colspan=\"6\" class=\"jc-muted\">No downstream dependencies seen.</td></tr> }\n </tbody>\n </table>\n <h3>Called by</h3>\n <table class=\"jc-table\">\n <tbody>\n @for (d of upstream(); track d.edge.id) {\n <tr><td><a [routerLink]=\"d.link\" [queryParams]=\"ctx.keep()\">{{ d.name }}</a></td><td>{{ d.edge.relation }}</td>\n <td><jc-confidence [confidence]=\"d.edge.confidence\" /></td><td>{{ d.edge.lastSeen | ago }}</td>\n <td><a [routerLink]=\"['topology'] | jcLink\" [queryParams]=\"ctx.keep({ edge: d.edge.id })\">evidence</a></td></tr>\n } @empty { <tr><td class=\"jc-muted\">No callers seen.</td></tr> }\n </tbody>\n </table>\n }\n </mat-tab>\n\n <mat-tab label=\"Traces\">\n @if (tabIndex() === 3) {\n <div class=\"jc-filters\">\n @for (f of traceFilters(); track f.label) { <span class=\"jc-chip\">{{ f.label }} <a [routerLink]=\"[]\" [queryParams]=\"f.clear\" queryParamsHandling=\"merge\" [attr.aria-label]=\"'Remove ' + f.label\">×</a></span> }\n </div>\n <jc-trace-table [query]=\"traceQuery()\" />\n }\n </mat-tab>\n\n <mat-tab label=\"Logs\">\n @if (tabIndex() === 4) { <jc-log-table [query]=\"{ serviceId: id(), instanceId: instanceFilter() }\" /> }\n </mat-tab>\n\n <mat-tab label=\"Metrics\">\n @if (tabIndex() === 5) { <jc-metric-explorer [scope]=\"{ serviceId: id(), instanceId: instanceFilter() }\" /> }\n </mat-tab>\n\n <mat-tab label=\"Capacity\">\n @if (tabIndex() === 6) { <jc-service-capacity [serviceId]=\"id()\" [environments]=\"environments()\" /> }\n </mat-tab>\n </mat-tab-group>\n }`,\n})\nexport class ServicePage {\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\n readonly id = input.required<string>();\n readonly tab = input<string>();\n readonly op = input<string>();\n readonly status = input<string>();\n readonly slow = input<string>();\n readonly instance = input<string>();\n readonly dependency = input<string>();\n\n protected readonly tabIndex = computed(() => Math.max(0, TABS.indexOf((this.tab() ?? 'overview') as typeof TABS[number])));\n protected readonly operation = computed(() => this.op() ?? null);\n protected readonly instanceFilter = computed(() => this.instance() ?? null);\n\n protected readonly service = apiResource({ params: () => this.id(), stream: ({ params }) => this.api.resource(params) });\n protected readonly topology = apiResource({ params: () => this.ctx.environment(), stream: ({ params }) => this.api.topology(params || null) });\n protected readonly operations = apiResource({\n params: () => ({ id: this.id(), env: this.ctx.environment(), range: this.ctx.range(), abs: this.ctx.absolute(), on: this.tabIndex() === 1 }),\n stream: ({ params }) => this.api.operations({ serviceId: params.id, environment: params.env, ...this.ctx.window(), limit: 200 }),\n });\n\n protected readonly error = computed(() => problemText(this.service.error()));\n protected readonly confirmingForget = signal(false);\n protected readonly forgetting = signal(false);\n protected readonly forgetError = signal('');\n protected readonly health = computed(() => (this.service.value()?.health ?? []).filter(h => h.subjectType === 'service'));\n protected readonly instances = computed(() => {\n const env = this.ctx.environment();\n return (this.service.value()?.instances ?? []).filter(i => !env || i.environment === env);\n });\n\n protected readonly environments = computed(() => (this.service.value()?.instances ?? []).map(i => i.environment));\n\n private readonly nodes = computed(() => new Map((this.topology.value()?.nodes ?? []).map(n => [n.id, n])));\n private edgesWhere(match: 'source' | 'target') {\n const other = match === 'source' ? 'target' : 'source';\n return (this.topology.value()?.edges ?? []).filter(e => e[match] === this.id()).map(edge => {\n const node = this.nodes().get(edge[other]);\n return {\n edge, name: node?.displayName ?? edge[other], type: node?.type ?? '',\n link: this.links.to(node?.type === 'service' ? 'services' : 'resources', edge[other]),\n };\n });\n }\n protected readonly downstream = computed(() => this.edgesWhere('source'));\n protected readonly upstream = computed(() => this.edgesWhere('target'));\n\n /** `dependency_failed:shop/payments` links to that service when it is in the topology. */\n dependencyOf(reason: string) {\n const name = reason.match(/^(?:critical_)?dependency_(?:failed|unknown):(.+)$/)?.[1];\n if (!name) return null;\n const node = [...this.nodes().values()].find(n => n.type === 'service' && (n.displayName === name || name.endsWith(`/${n.displayName}`)));\n return node ? { id: node.id } : null;\n }\n\n protected readonly traceQuery = computed(() => ({\n serviceId: this.id(), operation: this.op(), status: this.status(), minDurationMs: this.slow(),\n instanceId: this.instance(), dependencyId: this.dependency(),\n }));\n /** The trace filters in effect, each removable on its own. */\n protected readonly traceFilters = computed(() => {\n const filters: { label: string; clear: Record<string, null> }[] = [];\n if (this.op()) filters.push({ label: `operation: ${this.op()}`, clear: { op: null } });\n if (this.status()) filters.push({ label: `status: ${this.status()}`, clear: { status: null } });\n if (this.slow()) filters.push({ label: `slower than ${Math.round(Number(this.slow()))} ms`, clear: { slow: null } });\n if (this.instance()) filters.push({ label: 'one instance', clear: { instance: null } });\n if (this.dependency()) filters.push({ label: 'through one dependency', clear: { dependency: null } });\n return filters;\n });\n\n openTab(index: number) {\n void this.router.navigate([], { queryParams: { tab: TABS[index] }, queryParamsHandling: 'merge' });\n }\n\n /** Forgets a retired service (admin), after a second click to confirm, then back to the list. */\n protected forget() {\n if (!this.confirmingForget()) { this.confirmingForget.set(true); return; }\n this.forgetting.set(true);\n this.forgetError.set('');\n this.api.forgetService(this.id()).subscribe({\n next: () => { this.forgetting.set(false); void this.router.navigate(this.links.to('services'), { queryParams: this.ctx.keep() }); },\n error: e => {\n this.forgetting.set(false);\n this.confirmingForget.set(false);\n this.forgetError.set((e as { status?: number }).status === 403 ? 'Forgetting a service needs the admin role.' : problemText(e));\n },\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA2CA,SAAgB,aAAa,GAAa,GAAiB;CACzD,IAAI,CAAC,EAAE,qBAAqB,EAAE,qBAAqB,GAAG,OAAO;CAC7D,IAAI,EAAE,EAAE,QAAQ,KAAK,EAAE,YAAY,KAAK,EAAE,YAAY,KAAK,EAAE,aAAa,KAAK,EAAE,mBAAmB,KAAK,EAAE,gBAAgB,IAAI,OAAO;CACtI,MAAM,YAAY,EAAE,cAAc,KAAK;CACvC,IAAI,EAAE,eAAe,YAAY,GAAG,OAAO;CAE3C,MAAM,SAAS,EAAE,YAAY,EAAE,oBAAoB,EAAE,aAAa,MAAM,EAAE;CAC1E,IAAI,SAAS,GAAG,OAAO;CACvB,MAAM,YAAY,aAAa,CA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;IAAe,UAAA;IAAA,QAAA,CAAA,aAAA,cAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MADjE;IAAQ,MAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAC2D;IAAO,MAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAY,MAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAW,MAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAU,MAAA;GAAA;EAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAmKhH,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAW,YAAA,CAAA;EAtKvB,MAAA;EAAU,MAAA,CAAA;GACT,iBAAiB,wBAAwB;GACzC,SAAS;IAAC;IAAU;IAAY;IAAe;IAAsB;IAAiB;IAAY;IAAa;IAC7G;IAAY;IAAU;IAAgB;IAAoB;IAAiB;IAAS;IAAc;IAAa;GAAU;GAC3H,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiKX,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { ApiService, ContextService, LinkPipe } from "./juice-js-observability.mjs";
2
- import { c as ContextBar, g as AgoPipe, h as apiResource, l as HealthBadge, m as screenPages, o as problemText, y as ReasonPipe } from "./juice-js-observability-telemetry-CaunxC3Y.mjs";
2
+ import { c as ContextBar, g as AgoPipe, h as apiResource, l as HealthBadge, m as screenPages, o as problemText, y as ReasonPipe } from "./juice-js-observability-telemetry-BG91FqGp.mjs";
3
3
  import * as i0 from "@angular/core";
4
4
  import { ChangeDetectionStrategy, Component, computed, inject, input, signal } from "@angular/core";
5
5
  import { RouterLink } from "@angular/router";
@@ -20,17 +20,22 @@ var ServicesPage = class ServicesPage {
20
20
  ctx = inject(ContextService);
21
21
  api = inject(ApiService);
22
22
  state = input(...ngDevMode ? [void 0, { debugName: "state" }] : /* istanbul ignore next */ []);
23
+ retired = input(...ngDevMode ? [void 0, { debugName: "retired" }] : /* istanbul ignore next */ []);
24
+ showRetired = computed(() => this.retired() === "true", ...ngDevMode ? [{ debugName: "showRetired" }] : /* istanbul ignore next */ []);
23
25
  filter = signal("", ...ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []);
24
26
  reasonPipe = new ReasonPipe();
25
27
  reason = (r) => this.reasonPipe.transform(r);
26
- data = apiResource({ stream: () => forkJoin({
27
- services: this.api.resources("service"),
28
- health: this.api.health({ subjectType: "service" })
29
- }).pipe(map(({ services, health }) => ({
30
- services: services.items,
31
- health: health.items,
32
- capped: services.nextCursor !== null || health.nextCursor !== null
33
- }))) });
28
+ data = apiResource({
29
+ params: () => ({ retired: this.showRetired() }),
30
+ stream: ({ params }) => forkJoin({
31
+ services: this.api.resources("service", params.retired),
32
+ health: this.api.health({ subjectType: "service" })
33
+ }).pipe(map(({ services, health }) => ({
34
+ services: services.items,
35
+ health: health.items,
36
+ capped: services.nextCursor !== null || health.nextCursor !== null
37
+ })))
38
+ });
34
39
  capped = computed(() => this.data.value()?.capped ?? false, ...ngDevMode ? [{ debugName: "capped" }] : /* istanbul ignore next */ []);
35
40
  error = computed(() => problemText(this.data.error()), ...ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []);
36
41
  rows = computed(() => {
@@ -48,7 +53,7 @@ var ServicesPage = class ServicesPage {
48
53
  health,
49
54
  worst
50
55
  };
51
- }).filter((s) => !env || s.health.length > 0).filter((s) => !q || s.key.toLowerCase().includes(q)).filter((s) => !this.state() || s.health.some((h) => h.state === this.state())).sort((a, b) => SEVERITY.indexOf(a.worst?.state ?? "Unknown") - SEVERITY.indexOf(b.worst?.state ?? "Unknown") || a.key.localeCompare(b.key));
56
+ }).filter((s) => !env || s.health.length > 0).filter((s) => !q || s.key.toLowerCase().includes(q)).filter((s) => !this.state() || s.health.some((h) => h.state === this.state())).sort((a, b) => Number(!!a.retiredAt) - Number(!!b.retiredAt) || SEVERITY.indexOf(a.worst?.state ?? "Unknown") - SEVERITY.indexOf(b.worst?.state ?? "Unknown") || a.key.localeCompare(b.key));
52
57
  }, ...ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []);
53
58
  pages = screenPages(this.rows);
54
59
  onSearch(query) {
@@ -68,17 +73,29 @@ var ServicesPage = class ServicesPage {
68
73
  type: ServicesPage,
69
74
  isStandalone: true,
70
75
  selector: "ng-component",
71
- inputs: { state: {
72
- classPropertyName: "state",
73
- publicName: "state",
74
- isSignal: true,
75
- isRequired: false,
76
- transformFunction: null
77
- } },
76
+ inputs: {
77
+ state: {
78
+ classPropertyName: "state",
79
+ publicName: "state",
80
+ isSignal: true,
81
+ isRequired: false,
82
+ transformFunction: null
83
+ },
84
+ retired: {
85
+ classPropertyName: "retired",
86
+ publicName: "retired",
87
+ isSignal: true,
88
+ isRequired: false,
89
+ transformFunction: null
90
+ }
91
+ },
78
92
  ngImport: i0,
79
93
  template: `
80
94
  <jc-context-bar><h1>Services</h1>
81
- @if (state()) { <span class="jc-chip">{{ state() }} <a [routerLink]="['services'] | jcLink" [queryParams]="ctx.keep()">×</a></span> }
95
+ @if (state()) { <span class="jc-chip">{{ state() }} <a [routerLink]="['services'] | jcLink" [queryParams]="ctx.keep({ retired: showRetired() || null })">×</a></span> }
96
+ <a class="jc-small" data-testid="services-retired" [routerLink]="['services'] | jcLink"
97
+ [queryParams]="ctx.keep({ state: state() || null, retired: showRetired() ? null : 'true' })"
98
+ title="Discovery retires a service after Discovery:ServiceRetireAfter without telemetry (14 days by default)">{{ showRetired() ? 'Hide retired' : 'Show retired' }}</a>
82
99
  </jc-context-bar>
83
100
  @if (data.isLoading()) { <mat-progress-bar mode="indeterminate" /> }
84
101
  @if (data.error()) { <p class="jc-error">{{ error() }}</p> }
@@ -90,9 +107,11 @@ var ServicesPage = class ServicesPage {
90
107
  <tr>
91
108
  <td><a [routerLink]="['services', s.id] | jcLink" [queryParams]="ctx.keep()">{{ s.key }}</a></td>
92
109
  <td class="jc-envs">
110
+ @if (s.retiredAt) { <span class="jc-badge jc-health-none" data-testid="service-retired" [title]="'Retired ' + (s.retiredAt | ago)">Retired</span> }
111
+ @if (s.signalPacks?.includes('juice')) { <span class="jc-badge jc-health-none" data-testid="service-juice" title="Sends Juice signals: the Juice rule templates and outbox figures apply">Juice</span> }
93
112
  @for (h of s.health; track h.environment) {
94
113
  <span><span class="jc-muted jc-small">{{ h.environment ?? '—' }}</span> <jc-health [state]="h.state" [stale]="h.stale" /></span>
95
- } @empty { <jc-health [state]="null" /> }
114
+ } @empty { @if (!s.retiredAt) { <jc-health [state]="null" /> } }
96
115
  </td>
97
116
  <td class="jc-small">{{ s.worst?.reasons?.slice(0, 2)?.map(reason)?.join(' · ') }}</td>
98
117
  <td>{{ s.lastSeen | ago }}</td>
@@ -209,7 +228,10 @@ i0.ɵɵngDeclareClassMetadata({
209
228
  ],
210
229
  template: `
211
230
  <jc-context-bar><h1>Services</h1>
212
- @if (state()) { <span class="jc-chip">{{ state() }} <a [routerLink]="['services'] | jcLink" [queryParams]="ctx.keep()">×</a></span> }
231
+ @if (state()) { <span class="jc-chip">{{ state() }} <a [routerLink]="['services'] | jcLink" [queryParams]="ctx.keep({ retired: showRetired() || null })">×</a></span> }
232
+ <a class="jc-small" data-testid="services-retired" [routerLink]="['services'] | jcLink"
233
+ [queryParams]="ctx.keep({ state: state() || null, retired: showRetired() ? null : 'true' })"
234
+ title="Discovery retires a service after Discovery:ServiceRetireAfter without telemetry (14 days by default)">{{ showRetired() ? 'Hide retired' : 'Show retired' }}</a>
213
235
  </jc-context-bar>
214
236
  @if (data.isLoading()) { <mat-progress-bar mode="indeterminate" /> }
215
237
  @if (data.error()) { <p class="jc-error">{{ error() }}</p> }
@@ -221,9 +243,11 @@ i0.ɵɵngDeclareClassMetadata({
221
243
  <tr>
222
244
  <td><a [routerLink]="['services', s.id] | jcLink" [queryParams]="ctx.keep()">{{ s.key }}</a></td>
223
245
  <td class="jc-envs">
246
+ @if (s.retiredAt) { <span class="jc-badge jc-health-none" data-testid="service-retired" [title]="'Retired ' + (s.retiredAt | ago)">Retired</span> }
247
+ @if (s.signalPacks?.includes('juice')) { <span class="jc-badge jc-health-none" data-testid="service-juice" title="Sends Juice signals: the Juice rule templates and outbox figures apply">Juice</span> }
224
248
  @for (h of s.health; track h.environment) {
225
249
  <span><span class="jc-muted jc-small">{{ h.environment ?? '—' }}</span> <jc-health [state]="h.state" [stale]="h.stale" /></span>
226
- } @empty { <jc-health [state]="null" /> }
250
+ } @empty { @if (!s.retiredAt) { <jc-health [state]="null" /> } }
227
251
  </td>
228
252
  <td class="jc-small">{{ s.worst?.reasons?.slice(0, 2)?.map(reason)?.join(' · ') }}</td>
229
253
  <td>{{ s.lastSeen | ago }}</td>
@@ -237,15 +261,25 @@ i0.ɵɵngDeclareClassMetadata({
237
261
  }`
238
262
  }]
239
263
  }],
240
- propDecorators: { state: [{
241
- type: i0.Input,
242
- args: [{
243
- isSignal: true,
244
- alias: "state",
245
- required: false
264
+ propDecorators: {
265
+ state: [{
266
+ type: i0.Input,
267
+ args: [{
268
+ isSignal: true,
269
+ alias: "state",
270
+ required: false
271
+ }]
272
+ }],
273
+ retired: [{
274
+ type: i0.Input,
275
+ args: [{
276
+ isSignal: true,
277
+ alias: "retired",
278
+ required: false
279
+ }]
246
280
  }]
247
- }] }
281
+ }
248
282
  });
249
283
  export { ServicesPage };
250
284
 
251
- //# sourceMappingURL=juice-js-observability-services.page-CBtxLm0R.mjs.map
285
+ //# sourceMappingURL=juice-js-observability-services.page-CtiBl1ji.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"juice-js-observability-services.page-CtiBl1ji.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({ retired: showRetired() || null })\">×</a></span> }\n <a class=\"jc-small\" data-testid=\"services-retired\" [routerLink]=\"['services'] | jcLink\"\n [queryParams]=\"ctx.keep({ state: state() || null, retired: showRetired() ? null : 'true' })\"\n title=\"Discovery retires a service after Discovery:ServiceRetireAfter without telemetry (14 days by default)\">{{ showRetired() ? 'Hide retired' : 'Show retired' }}</a>\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 @if (s.retiredAt) { <span class=\"jc-badge jc-health-none\" data-testid=\"service-retired\" [title]=\"'Retired ' + (s.retiredAt | ago)\">Retired</span> }\n @if (s.signalPacks?.includes('juice')) { <span class=\"jc-badge jc-health-none\" data-testid=\"service-juice\" title=\"Sends Juice signals: the Juice rule templates and outbox figures apply\">Juice</span> }\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 { @if (!s.retiredAt) { <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 /** `?retired=true`: retired services too, listed after the others. */\n readonly retired = input<string>();\n protected readonly showRetired = computed(() => this.retired() === 'true');\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 params: () => ({ retired: this.showRetired() }),\n stream: ({ params }) => forkJoin({\n services: this.api.resources('service', params.retired),\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 // Retired services last (they have no health), then the worst state first, then by key.\n .sort((a, b) => Number(!!a.retiredAt) - Number(!!b.retiredAt)\n || 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;AA2CrG,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;CAEvB,UAAU,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CACf,cAAc,eAAe,KAAK,QAAO,MAAO,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CACvD,SAAS,OAA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ContextBar, h as apiResource, o as problemText } from "./juice-js-observability-telemetry-CaunxC3Y.mjs";
2
+ import { c as ContextBar, h as apiResource, o as problemText } from "./juice-js-observability-telemetry-BG91FqGp.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-WxGogpDD.mjs.map
523
+ //# sourceMappingURL=juice-js-observability-silences.page-DMaUp5Ax.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"juice-js-observability-silences.page-WxGogpDD.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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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoDX,CAAA"}
1
+ {"version":3,"file":"juice-js-observability-silences.page-DMaUp5Ax.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":";;;;;;;;;;;;;;;;;;AA2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,CAAA,cAAA;IAAA,UAAA,CAAA,gBAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;GAAe;GAAA;IAAA,MAAA;IAAA,MAAA,GAAA;IAAA,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;IAAA;IAAA,SAAA;KAAA;KAAA;KAAA;KAAA;KAAA;IAAA;IAAA,UAAA,CAAA,WAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAA,GAAA;IAAA,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;IAAA;IAAA,SAAA,CAAA,mBAAA;IAAA,UAAA,CAAA,WAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAU,UAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAhJ;IAAQ,MAAA;GAAA;EAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAsDP,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,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,6 +1,6 @@
1
1
  import { ApiService, ContextService, LinkPipe } from "./juice-js-observability.mjs";
2
- import { c as ContextBar, h as apiResource, o as problemText } from "./juice-js-observability-telemetry-CaunxC3Y.mjs";
3
- import { burnText, objective, percent, sloState, times } from "./juice-js-observability-slos.page-DVg2gK4Y.mjs";
2
+ import { c as ContextBar, h as apiResource, o as problemText } from "./juice-js-observability-telemetry-BG91FqGp.mjs";
3
+ import { burnText, objective, percent, sloState, times } from "./juice-js-observability-slos.page-D1lpgmlH.mjs";
4
4
  import * as i0 from "@angular/core";
5
5
  import { ChangeDetectionStrategy, Component, computed, inject, input } from "@angular/core";
6
6
  import { DatePipe } from "@angular/common";
@@ -411,4 +411,4 @@ i0.ɵɵngDeclareClassMetadata({
411
411
  });
412
412
  export { SloPage };
413
413
 
414
- //# sourceMappingURL=juice-js-observability-slo.page-BRigA4Ss.mjs.map
414
+ //# sourceMappingURL=juice-js-observability-slo.page-11DGthNO.mjs.map