@juice-js/observability 1.3.1-alpha.43 → 1.4.0
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/README.md +6 -2
- package/fesm2022/{juice-js-observability-agent.page-BJ0R-pGG.mjs → juice-js-observability-agent.page-DE84_XZr.mjs} +3 -3
- package/fesm2022/{juice-js-observability-agent.page-BJ0R-pGG.mjs.map → juice-js-observability-agent.page-DE84_XZr.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-agents.page-D-z66p2m.mjs → juice-js-observability-agents.page-C-o-OXai.mjs} +3 -3
- package/fesm2022/{juice-js-observability-agents.page-D-z66p2m.mjs.map → juice-js-observability-agents.page-C-o-OXai.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-alert.page-DhcSGLH0.mjs → juice-js-observability-alert.page-KyakwaUL.mjs} +4 -4
- package/fesm2022/{juice-js-observability-alert.page-DhcSGLH0.mjs.map → juice-js-observability-alert.page-KyakwaUL.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-alerts.page-B0ZpGPk9.mjs → juice-js-observability-alerts.page-up57Y8fX.mjs} +2 -2
- package/fesm2022/{juice-js-observability-alerts.page-B0ZpGPk9.mjs.map → juice-js-observability-alerts.page-up57Y8fX.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-approvals.page-l5mwxlcl.mjs → juice-js-observability-approvals.page-BgHDUGd4.mjs} +3 -3
- package/fesm2022/{juice-js-observability-approvals.page-l5mwxlcl.mjs.map → juice-js-observability-approvals.page-BgHDUGd4.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-incident.page-DyT-D0XB.mjs → juice-js-observability-incident.page-BryX9L8h.mjs} +4 -4
- package/fesm2022/{juice-js-observability-incident.page-DyT-D0XB.mjs.map → juice-js-observability-incident.page-BryX9L8h.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-incidents.page-AK09qCjN.mjs → juice-js-observability-incidents.page-B4DbQAWr.mjs} +3 -3
- package/fesm2022/{juice-js-observability-incidents.page-AK09qCjN.mjs.map → juice-js-observability-incidents.page-B4DbQAWr.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-load-runs.page-CGCfrsZj.mjs → juice-js-observability-load-runs.page-UPQFzG3h.mjs} +2 -2
- package/fesm2022/{juice-js-observability-load-runs.page-CGCfrsZj.mjs.map → juice-js-observability-load-runs.page-UPQFzG3h.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-logs.page-DZiAYl0A.mjs → juice-js-observability-logs.page-DtCoZuZg.mjs} +2 -2
- package/fesm2022/{juice-js-observability-logs.page-DZiAYl0A.mjs.map → juice-js-observability-logs.page-DtCoZuZg.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-metrics.page-DY8SFoxp.mjs → juice-js-observability-metrics.page-By3pnaJz.mjs} +2 -2
- package/fesm2022/{juice-js-observability-metrics.page-DY8SFoxp.mjs.map → juice-js-observability-metrics.page-By3pnaJz.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-notifications.page-COeOVY1T.mjs → juice-js-observability-notifications.page-DIXE52Rt.mjs} +3 -3
- package/fesm2022/{juice-js-observability-notifications.page-COeOVY1T.mjs.map → juice-js-observability-notifications.page-DIXE52Rt.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-overview.page-CUJFOlnm.mjs → juice-js-observability-overview.page-CdSUNH6a.mjs} +3 -3
- package/fesm2022/{juice-js-observability-overview.page-CUJFOlnm.mjs.map → juice-js-observability-overview.page-CdSUNH6a.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-resource.page-BrLwpTXN.mjs → juice-js-observability-resource.page-CIY0hWSX.mjs} +2 -2
- package/fesm2022/{juice-js-observability-resource.page-BrLwpTXN.mjs.map → juice-js-observability-resource.page-CIY0hWSX.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-resources.page-Dyh7AjOW.mjs → juice-js-observability-resources.page-Ch6GVPyx.mjs} +2 -2
- package/fesm2022/{juice-js-observability-resources.page-Dyh7AjOW.mjs.map → juice-js-observability-resources.page-Ch6GVPyx.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-rules.page-C_qiLXN_.mjs → juice-js-observability-rules.page-AbY-0A8n.mjs} +2 -2
- package/fesm2022/{juice-js-observability-rules.page-C_qiLXN_.mjs.map → juice-js-observability-rules.page-AbY-0A8n.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-service.page-AxzRoXqg.mjs → juice-js-observability-service.page-BAUPza0x.mjs} +2 -2
- package/fesm2022/{juice-js-observability-service.page-AxzRoXqg.mjs.map → juice-js-observability-service.page-BAUPza0x.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-services.page-CpEdbC2L.mjs → juice-js-observability-services.page-CBtxLm0R.mjs} +2 -2
- package/fesm2022/{juice-js-observability-services.page-CpEdbC2L.mjs.map → juice-js-observability-services.page-CBtxLm0R.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-silences.page-DI4q9Fx-.mjs → juice-js-observability-silences.page-WxGogpDD.mjs} +2 -2
- package/fesm2022/{juice-js-observability-silences.page-DI4q9Fx-.mjs.map → juice-js-observability-silences.page-WxGogpDD.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-slo.page-CAdDtj28.mjs → juice-js-observability-slo.page-BRigA4Ss.mjs} +4 -4
- package/fesm2022/{juice-js-observability-slo.page-CAdDtj28.mjs.map → juice-js-observability-slo.page-BRigA4Ss.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-slos.page-CQRX3Kmn.mjs → juice-js-observability-slos.page-DVg2gK4Y.mjs} +3 -3
- package/fesm2022/{juice-js-observability-slos.page-CQRX3Kmn.mjs.map → juice-js-observability-slos.page-DVg2gK4Y.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-suggestions-CX_srxh1.mjs → juice-js-observability-suggestions-CBuNlU0Y.mjs} +3 -3
- package/fesm2022/{juice-js-observability-suggestions-CX_srxh1.mjs.map → juice-js-observability-suggestions-CBuNlU0Y.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-telemetry-CwdIXE9m.mjs → juice-js-observability-telemetry-CaunxC3Y.mjs} +2 -2
- package/fesm2022/{juice-js-observability-telemetry-CwdIXE9m.mjs.map → juice-js-observability-telemetry-CaunxC3Y.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-timeline.page-dH4NzP4l.mjs → juice-js-observability-timeline.page-ChDtTC3b.mjs} +3 -3
- package/fesm2022/{juice-js-observability-timeline.page-dH4NzP4l.mjs.map → juice-js-observability-timeline.page-ChDtTC3b.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-topology.page-IJrW71aU.mjs → juice-js-observability-topology.page-BN5NL2st.mjs} +2 -2
- package/fesm2022/{juice-js-observability-topology.page-IJrW71aU.mjs.map → juice-js-observability-topology.page-BN5NL2st.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-trace.page-Bp8ZBzEh.mjs → juice-js-observability-trace.page-CtJQZkNW.mjs} +3 -3
- package/fesm2022/{juice-js-observability-trace.page-Bp8ZBzEh.mjs.map → juice-js-observability-trace.page-CtJQZkNW.mjs.map} +1 -1
- package/fesm2022/{juice-js-observability-traces.page-CPcODdxw.mjs → juice-js-observability-traces.page-BkGlHFEK.mjs} +2 -2
- package/fesm2022/{juice-js-observability-traces.page-CPcODdxw.mjs.map → juice-js-observability-traces.page-BkGlHFEK.mjs.map} +1 -1
- package/fesm2022/juice-js-observability.mjs +43 -121
- package/fesm2022/juice-js-observability.mjs.map +1 -1
- package/package.json +3 -3
- package/types/juice-js-observability.d.ts +8 -19
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"juice-js-observability.mjs","names":[],"sources":["../../../../projects/juice-js/observability/src/lib/core/api.service.ts","../../../../projects/juice-js/observability/src/lib/core/approval-count.ts","../../../../projects/juice-js/observability/src/lib/core/options.ts","../../../../projects/juice-js/observability/src/lib/core/context.service.ts","../../../../projects/juice-js/observability/src/lib/observability.routes.ts"],"sourcesContent":["import { HttpClient, HttpParams } from '@angular/common/http';\nimport { Injectable, inject, signal } from '@angular/core';\nimport { EMPTY, Observable, expand, map, reduce, shareReplay, switchMap, tap } from 'rxjs';\nimport { OBSERVABILITY_OPTIONS } from './options';\nimport {\n ActionRequest, ActionRequestsWaiting, ActionTarget, Agent, SloDetail, SloSummary, AgentActions, AgentCommand, AgentPackage, EnrollmentToken, AlertDetail, AlertNotifications, Alert, AllowlistEntry, Application, Channel, ChannelTestResult, Delivery, EscalationPolicy, IncidentDetail, IncidentEvent, IncidentSummary, Silence, DependencyEvidence, DependencyStatsPage, DeploymentEnvironment, LoadRun, LoadRunResults, Related, Timeline, Health, LogRecord, MetricInfo, Operation,\n Page, PlatformOverview, ResourceDetail, ResourceSummary, Rule, SearchHit, Series, Capacity, ServiceStats, Tenant, TelemetryPage, Topology, Trace,\n TraceSummary, Suggestions, CorrelationDecision,\n} from './models';\n\n/**\n * A random UUID v4 for `Idempotency-Key`. Not `crypto.randomUUID()`: browsers offer it only in a secure context (HTTPS or localhost), so it\n * throws on a Console opened over plain HTTP at the machine's address, as the local stack is. `getRandomValues` works everywhere.\n */\nexport function idempotencyKey(): string {\n const b = crypto.getRandomValues(new Uint8Array(16));\n b[6] = (b[6] & 0x0f) | 0x40;\n b[8] = (b[8] & 0x3f) | 0x80;\n const hex = Array.from(b, x => x.toString(16).padStart(2, '0')).join('');\n return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;\n}\n\nexport type Query =Record<string, string | number | boolean | string[] | null | undefined>;\n\n/**\n * The Console's only backend: the Juice API (Console requirements §3). One deployment serves one tenant, the one the\n * signed-in user's token names.\n */\n@Injectable({ providedIn: 'root' })\nexport class ApiService {\n private readonly http = inject(HttpClient);\n private readonly base = `${inject(OBSERVABILITY_OPTIONS).apiBase}/api/v1`;\n\n /** Set once a page has fetched the caller's tenant: the user is signed in, so background calls such as {@link ApprovalCount}'s may start. */\n readonly tenantKnown = signal(false);\n\n /** The caller's tenant, fetched once. */\n readonly tenant$: Observable<Tenant> = this.http.get<Page<Tenant>>(`${this.base}/tenants`).pipe(\n map(page => {\n if (page.items.length === 0) throw new Error('No tenant is authorized for this user.');\n return page.items[0];\n }),\n tap(() => this.tenantKnown.set(true)),\n shareReplay(1),\n );\n\n private get<T>(path: string, query: Query = {}): Observable<T> {\n let params = new HttpParams();\n for (const [key, value] of Object.entries(query)) {\n if (value === null || value === undefined || value === '') continue;\n for (const item of Array.isArray(value) ? value : [value]) params = params.append(key, String(item));\n }\n return this.tenant$.pipe(switchMap(t => this.http.get<T>(`${this.base}/tenants/${t.id}${path}`, { params })));\n }\n\n /** A change. `Idempotency-Key` on what can be retried, so a repeated click or a lost response doesn't do it twice. */\n private send<T>(method: 'POST' | 'PUT' | 'DELETE', path: string, body?: unknown, headers: Record<string, string> = {}): Observable<T> {\n return this.tenant$.pipe(switchMap(t => this.http.request<T>(method, `${this.base}/tenants/${t.id}${path}`, { body, headers })));\n }\n private once<T>(path: string, body: unknown): Observable<T> { return this.send<T>('POST', path, body, { 'Idempotency-Key': idempotencyKey() }); }\n\n /** Every page of a cursor-paged list (bounded: at most `maxPages` requests). */\n private all<T>(path: string, query: Query = {}, maxPages = 25): Observable<Page<T>> {\n let pages = 0;\n return this.get<Page<T>>(path, { ...query, limit: 200 }).pipe(\n expand(page => page.nextCursor && ++pages < maxPages ? this.get<Page<T>>(path, { ...query, limit: 200, cursor: page.nextCursor }) : EMPTY),\n reduce((all, page) => ({ items: [...all.items, ...page.items], nextCursor: page.nextCursor }), { items: [] as T[], nextCursor: null as string | null }),\n );\n }\n\n environments() { return this.get<Page<DeploymentEnvironment>>('/environments'); }\n applications() { return this.get<Page<Application>>('/applications', { limit: 200 }); }\n resources(type?: string) { return this.all<ResourceSummary>('/resources', { type }); }\n resource(id: string) { return this.get<ResourceDetail>(`/resources/${id}`); }\n health(query: Query) { return this.all<Health>('/health', query); }\n topology(environment?: string | null) { return this.get<Topology>('/topology', { environment }); }\n\n rules() { return this.get<Page<Rule>>('/rules', { limit: 200 }); }\n createRule(definition: unknown) { return this.send<Rule>('POST', '/rules', definition); }\n /** With the rule's etag, so a change made since it was read isn't overwritten. */\n updateRule(key: string, definition: unknown, etag: string) { return this.send<Rule>('PUT', `/rules/${key}`, definition, { 'If-Match': `\"${etag}\"` }); }\n\n channels() { return this.get<Page<Channel>>('/webhooks'); }\n createChannel(body: unknown) { return this.send<Channel>('POST', '/webhooks', body); }\n updateChannel(id: string, body: unknown) { return this.send<Channel>('PUT', `/webhooks/${id}`, body); }\n deliveries(id: string, query: Query = {}) { return this.get<Page<Delivery>>(`/webhooks/${id}/deliveries`, { limit: 50, ...query }); }\n testChannel(id: string) { return this.send<ChannelTestResult>('POST', `/webhooks/${id}/test`); }\n retryDelivery(channelId: string, deliveryId: string) { return this.send<Delivery>('POST', `/webhooks/${channelId}/deliveries/${deliveryId}/retry`); }\n allowlist() { return this.get<Page<AllowlistEntry>>('/webhooks/allowlist'); }\n putAllowlist(destination: string, ports: number[]) { return this.send<AllowlistEntry>('PUT', '/webhooks/allowlist', { destination, ports }); }\n removeAllowlist(destination: string) { return this.send<void>('DELETE', `/webhooks/allowlist?destination=${encodeURIComponent(destination)}`); }\n\n escalationPolicies() { return this.get<Page<EscalationPolicy>>('/escalation-policies'); }\n createEscalationPolicy(body: unknown) { return this.send<EscalationPolicy>('POST', '/escalation-policies', body); }\n updateEscalationPolicy(key: string, body: unknown) { return this.send<EscalationPolicy>('PUT', `/escalation-policies/${key}`, body); }\n\n silences(query: Query = {}) { return this.get<Page<Silence>>('/silences', { limit: 200, ...query }); }\n createSilence(body: unknown) { return this.once<Silence>('/silences', body); }\n cancelSilence(id: string) { return this.send<void>('DELETE', `/silences/${id}`); }\n\n incidents(query: Query = {}) { return this.get<Page<IncidentSummary>>('/incidents', { limit: 100, ...query }); }\n incident(id: string) { return this.get<IncidentDetail>(`/incidents/${id}`); }\n createIncident(body: unknown) { return this.once<IncidentSummary>('/incidents', body); }\n moveIncident(id: string, to: string, comment: string) { return this.once<IncidentSummary>(`/incidents/${id}/transitions`, { to, comment }); }\n addIncidentNote(id: string, text: string) { return this.once<IncidentEvent>(`/incidents/${id}/notes`, { text }); }\n removeIncidentAlert(id: string, alertId: string) { return this.send<void>('DELETE', `/incidents/${id}/alerts/${alertId}`); }\n /** Active agents, or with `all` the revoked ones too (at most 500). */\n agents(all = false) { return this.get<Page<Agent>>('/agents', { all: all || null }); }\n agent(id: string) { return this.get<Agent>(`/agents/${id}`); }\n createEnrollmentToken(purpose: string, expiresInMinutes: number) { return this.send<EnrollmentToken>('POST', '/agents/enrollment-tokens', { purpose, expiresInMinutes }); }\n revokeAgent(id: string, reason: string) { return this.send<Agent>('POST', `/agents/${id}/revocation`, { reason }); }\n /** What the agent reported it can run, custom actions included, with what its host permits; the built-ins if it never reported. */\n agentActions(id: string) { return this.get<AgentActions>(`/agents/${id}/actions`); }\n agentPackages() { return this.get<Page<AgentPackage>>('/agents/packages'); }\n /** Idempotent: a repeated click or a lost response signs one command, not two. */\n issueCommand(id: string, action: string, parameters: Record<string, unknown>) { return this.once<AgentCommand>(`/agents/${id}/commands`, { action, parameters }); }\n /** Asks for an action under its approval policy: issued at once when nobody else needs to approve, otherwise waiting. */\n requestAction(agentId: string, action: string, parameters: Record<string, unknown>, reason: string, target: ActionTarget | null = null) {\n return this.once<ActionRequest>(`/agents/${agentId}/action-requests`, { action, parameters, reason, target });\n }\n actionRequests(query: Query = {}) { return this.get<Page<ActionRequest>>('/action-requests', { limit: 100, ...query }); }\n /** The platform panel and capacity view (operators and admins of this deployment; a viewer gets 403). Not under a tenant: the platform's own. */\n platformOverview(): Observable<PlatformOverview> { return this.tenant$.pipe(switchMap(() => this.http.get<PlatformOverview>(`${this.base}/platform/overview`))); }\n\n /** A diagnostic bundle's zip (operators and admins; audited). */\n downloadBundle(agentId: string, bundleId: string) {\n return this.tenant$.pipe(switchMap(t => this.http.get(`${this.base}/tenants/${t.id}/agents/${agentId}/bundles/${bundleId}`, { responseType: 'blob', observe: 'response' })));\n }\n /** SLOs, technical or business apart (category), with their budgets and burn rates. */\n slos(category?: string) { return this.get<Page<SloSummary>>('/slos', { category }); }\n slo(key: string) { return this.get<SloDetail>(`/slos/${encodeURIComponent(key)}`); }\n /** How many requests wait, and how many of them the signed-in user can decide. */\n waitingRequests() { return this.get<ActionRequestsWaiting>('/action-requests/waiting'); }\n approveRequest(id: string, comment: string) { return this.send<ActionRequest>('POST', `/action-requests/${id}/approval`, { comment }); }\n rejectRequest(id: string, comment: string) { return this.send<ActionRequest>('POST', `/action-requests/${id}/rejection`, { comment }); }\n cancelRequest(id: string) { return this.send<ActionRequest>('POST', `/action-requests/${id}/cancellation`, {}); }\n agentCommands(id: string, cursor?: string | null) { return this.get<Page<AgentCommand>>(`/agents/${id}/commands`, { limit: 25, cursor }); }\n\n alertNotifications(id: string) { return this.get<AlertNotifications>(`/alerts/${id}/notifications`); }\n\n /** One page of alerts, newest first; pass the previous page's `nextCursor` as `cursor` for the next. */\n alerts(query: Query) { return this.get<Page<Alert>>('/alerts', { limit: 100, ...query }); }\n /** Every alert matching the query (bounded, like the other complete lists). */\n allAlerts(query: Query) { return this.all<Alert>('/alerts', query); }\n alert(id: string) { return this.get<AlertDetail>(`/alerts/${id}`); }\n acknowledge(id: string, comment: string): Observable<Alert> {\n return this.tenant$.pipe(switchMap(t => this.http.post<Alert>(`${this.base}/tenants/${t.id}/alerts/${id}/acknowledgement`,\n { comment }, { headers: { 'Idempotency-Key': idempotencyKey() } })));\n }\n\n traces(query: Query) { return this.get<TelemetryPage<TraceSummary>>('/telemetry/traces', query); }\n trace(traceId: string) { return this.get<Trace>(`/telemetry/traces/${traceId}`); }\n logs(query: Query) { return this.get<TelemetryPage<LogRecord>>('/telemetry/logs', query); }\n operations(query: Query) { return this.get<TelemetryPage<Operation>>('/telemetry/operations', query); }\n metrics(query: Query) { return this.get<TelemetryPage<MetricInfo>>('/telemetry/metrics', query); }\n series(query: Query) { return this.get<Series>('/telemetry/metrics/series', query); }\n serviceStats(query: Query) { return this.get<ServiceStats>('/telemetry/service-stats', query); }\n capacity(query: Query) { return this.get<Capacity>('/telemetry/capacity', query); }\n timeline(query: Query) { return this.get<Timeline>('/timeline', query); }\n relatedToAlert(id: string) { return this.get<Related>(`/alerts/${id}/related`); }\n alertSuggestions(id: string) { return this.get<Suggestions>(`/alerts/${id}/suggestions`); }\n incidentSuggestions(id: string) { return this.get<Suggestions>(`/incidents/${id}/suggestions`); }\n acceptSuggestion(alertId: string, otherId: string) { return this.once<CorrelationDecision>(`/alerts/${alertId}/suggestions/${otherId}/accept`, {}); }\n dismissSuggestion(alertId: string, otherId: string, reason: string) { return this.once<CorrelationDecision>(`/alerts/${alertId}/suggestions/${otherId}/dismiss`, { reason }); }\n loadRuns(query: Query) { return this.get<Page<LoadRun>>('/load-runs', query); }\n loadRunResults(id: string) { return this.get<LoadRunResults>(`/load-runs/${id}/results`); }\n dependencyStats(query: Query) { return this.get<DependencyStatsPage>('/telemetry/dependencies', query); }\n dependency(id: string, query: Query) { return this.get<DependencyEvidence>(`/telemetry/dependencies/${id}`, query); }\n search(q: string) { return this.get<TelemetryPage<SearchHit>>('/search', { q }); }\n}\n","import { DestroyRef, Injectable, effect, inject, signal, untracked } from '@angular/core';\nimport { NavigationEnd, Router } from '@angular/router';\nimport { Subscription, filter, timer, switchMap } from 'rxjs';\nimport { ApiService } from './api.service';\n\n/**\n * How many action requests wait for the signed-in user to decide, refreshed every 30 seconds from whatever page is open, and at once\n * when a page made or decided one ({@link refresh}). It starts only once a page has fetched the tenant: before that the user may still be\n * signing in, and an early call would fail, along with the page's own call sharing it. It stops on an error (signed out, or no rights)\n * until the next navigation, so a signed-out tab doesn't keep asking.\n */\n@Injectable({ providedIn: 'root' })\nexport class ApprovalCount {\n static readonly Every = 30_000;\n\n private readonly api = inject(ApiService);\n private polling: Subscription | null = null;\n /** Requests the signed-in user can approve or reject now. */\n readonly forYou = signal(0);\n\n constructor() {\n effect(() => { if (this.api.tenantKnown() && !untracked(() => this.polling)) untracked(() => this.start()); });\n const navigations = inject(Router).events.pipe(filter(e => e instanceof NavigationEnd))\n .subscribe(() => { if (!this.polling && this.api.tenantKnown()) this.start(); });\n inject(DestroyRef).onDestroy(() => { navigations.unsubscribe(); this.polling?.unsubscribe(); });\n }\n\n /** Asks again now, for a page that just changed what waits. */\n refresh() { if (this.api.tenantKnown()) this.start(); }\n\n private start() {\n this.polling?.unsubscribe();\n this.polling = timer(0, ApprovalCount.Every).pipe(switchMap(() => this.api.waitingRequests())).subscribe({\n next: w => this.forYou.set(w.forYou),\n error: () => { this.forYou.set(0); this.polling = null; },\n });\n }\n}\n\n/**\n * Shows {@link ApprovalCount} on the Approvals entry of juice-layout's side menu, found by its icon. juice-layout's menu has no badge of its\n * own, so this adds one beside the label, and on the header of the menu group it sits in while that group is closed, and puts it back\n * whenever the menu is drawn again. With the menu folded to icons, it sits on the icon.\n */\n@Injectable({ providedIn: 'root' })\nexport class ApprovalMenuBadge {\n static readonly Icon = 'approval';\n\n private readonly count = inject(ApprovalCount);\n private observer: MutationObserver | null = null;\n\n constructor() {\n if (typeof document === 'undefined' || typeof MutationObserver === 'undefined') return;\n effect(() => this.apply(this.count.forYou()));\n let scheduled = false;\n const schedule = () => {\n if (scheduled) return;\n scheduled = true;\n requestAnimationFrame(() => { scheduled = false; this.apply(this.count.forYou()); });\n };\n // The menu drawn again (anywhere in the page, as the shell may be rebuilt).\n this.observer = new MutationObserver(schedule);\n this.observer.observe(document.body, { childList: true, subtree: true });\n // Within the menu only: a group opening or closing (its class) moves the count.\n this.classes = new MutationObserver(schedule);\n // The menu folding, unfolding or coming into view moves the icon a folded menu's count sits on: measure again.\n if (typeof ResizeObserver !== 'undefined') this.resizes = new ResizeObserver(schedule);\n inject(DestroyRef).onDestroy(() => { this.observer?.disconnect(); this.classes?.disconnect(); this.resizes?.disconnect(); });\n }\n\n private classes: MutationObserver | null = null;\n private resizes: ResizeObserver | null = null;\n /** The side menu being watched for classes and size: the one on screen. */\n private watched: Element | null = null;\n\n private apply(count: number) {\n const menu = document.querySelector('juice-nav-menu');\n if (menu !== this.watched) {\n // A new menu (the shell rebuilt): stop watching the old one, so it isn't kept.\n this.classes?.disconnect();\n this.resizes?.disconnect();\n if (menu) {\n this.classes?.observe(menu, { subtree: true, attributes: true, attributeFilter: ['class'] });\n this.resizes?.observe(menu);\n }\n this.watched = menu;\n }\n const counted = new Set<HTMLElement>();\n for (const icon of Array.from(document.querySelectorAll<HTMLElement>('juice-nav-menu mat-icon'))) {\n if (icon.textContent?.trim() !== ApprovalMenuBadge.Icon) continue;\n const item = icon.closest<HTMLElement>('mat-list-item, .mat-mdc-list-item');\n if (!item) continue;\n this.badge(item, count, 'approvals-badge');\n counted.add(item);\n // Inside a menu group (Automation) the entry is hidden while the group is closed: then the group's header counts.\n const panel = icon.closest<HTMLElement>('mat-expansion-panel');\n const header = panel?.querySelector<HTMLElement>('mat-expansion-panel-header .mat-mdc-list-item');\n if (panel && header) {\n this.badge(header, panel.classList.contains('mat-expanded') ? 0 : count, 'approvals-group-badge');\n counted.add(header);\n }\n }\n // A count left on an entry that no longer holds Approvals (the menu changed for this user): take it away.\n // (Also a hint left where no badge could be drawn.)\n const marks = 'juice-nav-menu .jc-menu-badge, juice-nav-menu [title$=\"waiting for your approval\"]';\n for (const stale of Array.from(document.querySelectorAll<HTMLElement>(marks))) {\n const item = stale.closest<HTMLElement>('mat-list-item, .mat-mdc-list-item');\n if (item && !counted.has(item)) this.badge(item, 0, '');\n }\n }\n\n /**\n * The count beside the item's label; on its icon's corner when the label isn't drawn (the side menu folded to icons).\n * No count: no badge and no hint.\n */\n private badge(item: HTMLElement, count: number, testId: string) {\n // The hint goes with the count, wherever (and whether) the badge can be drawn.\n const hint = count > 0 ? `${count} request${count === 1 ? '' : 's'} waiting for your approval` : null;\n if (hint === null) item.removeAttribute('title');\n else if (item.getAttribute('title') !== hint) item.setAttribute('title', hint);\n\n const title = item.querySelector<HTMLElement>('[matListItemTitle], .mdc-list-item__primary-text');\n const icon = item.querySelector<HTMLElement>('mat-icon');\n const host = title ?? (icon ? item : null);\n let badge = item.querySelector<HTMLElement>('.jc-menu-badge');\n if (badge && (count <= 0 || badge.parentElement !== host)) { badge.remove(); badge = null; }\n if (count <= 0 || !host) return;\n if (!badge) {\n badge = document.createElement('span');\n badge.className = 'jc-menu-badge';\n badge.setAttribute('data-testid', testId);\n const look = 'min-width:1.25rem;padding:0 .375rem;border-radius:999px;font-size:.75rem;line-height:1.25rem;text-align:center;'\n + 'font-weight:600;background:var(--mat-sys-error,#b3261e);color:var(--mat-sys-on-error,#fff);box-sizing:border-box';\n badge.style.cssText = title\n ? `display:inline-block;margin-left:.5rem;${look}`\n // Folded to icons (no label): small, on the icon's top right corner, inside the row (which clips).\n : `position:absolute;transform:scale(.75);transform-origin:top left;pointer-events:none;${look}`;\n host.appendChild(badge);\n }\n const text = count > 99 ? '99+' : String(count);\n if (badge.textContent !== text) badge.textContent = text;\n if (!title && icon) {\n if (getComputedStyle(item).position === 'static') item.style.position = 'relative';\n const row = item.getBoundingClientRect(), mark = icon.getBoundingClientRect();\n // Not laid out (the menu hidden): place it on a later pass, which the menu's size change brings.\n if (row.width === 0 || mark.width === 0) return;\n const left = `${Math.round(mark.right - row.left - 10)}px`, top = `${Math.max(0, Math.round(mark.top - row.top - 6))}px`;\n if (badge.style.left !== left) badge.style.left = left;\n if (badge.style.top !== top) badge.style.top = top;\n }\n }\n}\n","import { EnvironmentProviders, Injectable, InjectionToken, Pipe, PipeTransform, inject, makeEnvironmentProviders, provideEnvironmentInitializer } from '@angular/core';\nimport { ApprovalMenuBadge } from './approval-count';\n\n/** How the host app mounts Juice Observability. */\nexport interface ObservabilityOptions {\n /** The Juice API origin; empty when the API serves the app (same origin). */\n apiBase: string;\n /** Where the host mounts {@link OBSERVABILITY_ROUTES}: `/` for the whole app, or a path such as `/observability`. */\n basePath: string;\n /**\n * A link to the audit records of a trace, shown on the trace page: for the Juice Audit pages mounted at `/audit`,\n * `id => ['/audit/traces', id]`. A string is an external URL. Without it, no link.\n */\n auditLink?: ((traceId: string) => unknown[] | string | null) | null;\n /** Show on the Approvals menu entry how many action requests wait for the signed-in user. On unless false. */\n approvalCount?: boolean;\n}\n\nexport const OBSERVABILITY_OPTIONS = new InjectionToken<ObservabilityOptions>('OBSERVABILITY_OPTIONS', {\n providedIn: 'root',\n factory: () => ({ apiBase: '', basePath: '/', auditLink: null }),\n});\n\n/**\n * Configures the pages: where the API is, where the host mounted the routes, and where a trace's audit records open. Also shows the count\n * of requests waiting for approval on the Approvals menu entry, unless `approvalCount: false`.\n */\nexport function provideJuiceObservability(options: Partial<ObservabilityOptions> = {}): EnvironmentProviders {\n return makeEnvironmentProviders([\n {\n provide: OBSERVABILITY_OPTIONS,\n useValue: {\n apiBase: options.apiBase ?? '',\n basePath: options.basePath ?? '/',\n auditLink: options.auditLink ?? null,\n } satisfies ObservabilityOptions,\n },\n ...(options.approvalCount === false ? [] : [provideEnvironmentInitializer(() => { inject(ApprovalMenuBadge); })]),\n ]);\n}\n\n/** `/observability/` → `/observability`; `` and `/` → `/`. */\nexport function normalizeBasePath(basePath: string): string {\n const trimmed = basePath.trim().replace(/^\\/+|\\/+$/g, '');\n return trimmed ? `/${trimmed}` : '/';\n}\n\n/** Router links to the pages, under the host's mount path. */\n@Injectable({ providedIn: 'root' })\nexport class ObservabilityLinks {\n private readonly options = inject(OBSERVABILITY_OPTIONS);\n readonly base = normalizeBasePath(this.options.basePath);\n\n /** `to('services', id)` → `['/observability', 'services', id]`. */\n to(...segments: unknown[]): unknown[] { return [this.base, ...segments]; }\n\n /** The host's link to the audit records of a trace, if it gave one. */\n audit(traceId: string | null | undefined): { route: unknown[] } | { href: string } | null {\n if (!traceId || !this.options.auditLink) return null;\n const link = this.options.auditLink(traceId);\n if (!link) return null;\n return typeof link === 'string' ? { href: link } : { route: link };\n }\n}\n\n/** `['services', id] | jcLink`: the same as {@link ObservabilityLinks.to} in a template. */\n@Pipe({ name: 'jcLink' })\nexport class LinkPipe implements PipeTransform {\n private readonly links = inject(ObservabilityLinks);\n transform(segments: unknown[]): unknown[] { return this.links.to(...segments); }\n}\n","import { Injectable, computed, inject } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { ActivatedRoute, NavigationEnd, Params, Router } from '@angular/router';\nimport { filter, map, startWith } from 'rxjs';\n\nexport const RANGES: Record<string, number> = {\n '15m': 15 * 60_000, '1h': 3_600_000, '6h': 6 * 3_600_000, '24h': 24 * 3_600_000, '7d': 7 * 24 * 3_600_000,\n};\n\n/** Search ranges are at most 24 hours (the API's bound); series and operations take up to 7 days. */\nexport const MAX_SEARCH_MS = RANGES['24h'];\n\n/**\n * The investigation context that follows the user between pages (Console requirements §17): environment and time\n * range. It lives in the URL (`env`, and `range` or `from`/`to`), so every page is a deep link and the browser's back\n * button restores it.\n */\n@Injectable({ providedIn: 'root' })\nexport class ContextService {\n private readonly router = inject(Router);\n\n // Created on first use, after the first navigation may already have ended: start from the current URL.\n private readonly params = toSignal(this.router.events.pipe(\n filter(e => e instanceof NavigationEnd),\n startWith(null),\n map(() => this.leaf().snapshot.queryParams),\n ), { initialValue: {} as Params });\n\n readonly environment = computed(() => (this.params()['env'] as string | undefined) ?? '');\n readonly range = computed(() => {\n const p = this.params();\n return p['from'] && p['to'] ? 'custom' : ((p['range'] as string | undefined) ?? '1h');\n });\n readonly absolute = computed(() => {\n const p = this.params();\n return p['from'] && p['to'] ? { from: p['from'] as string, to: p['to'] as string } : null;\n });\n\n /** The window as ISO strings, evaluated now for a relative range. */\n window(maxMs?: number): { from: string; to: string } {\n const absolute = this.absolute();\n if (absolute) return absolute;\n const to = Date.now();\n const span = Math.min(RANGES[this.range()] ?? RANGES['1h'], maxMs ?? Number.MAX_SAFE_INTEGER);\n return { from: new Date(to - span).toISOString(), to: new Date(to).toISOString() };\n }\n\n /** Query parameters for a link: the context plus the target page's own. */\n keep(extra: Params = {}): Params {\n const p = this.params();\n const context: Params = {};\n for (const key of ['env', 'range', 'from', 'to']) if (p[key]) context[key] = p[key];\n return { ...context, ...extra };\n }\n\n /** Changes the context on the current page, keeping its other parameters. */\n set(change: { env?: string | null; range?: string | null; from?: string | null; to?: string | null }) {\n const queryParams: Params = { ...change };\n if (change.range) Object.assign(queryParams, { from: null, to: null });\n void this.router.navigate([], { relativeTo: this.leaf(), queryParams, queryParamsHandling: 'merge' });\n }\n\n /** A time window centred on a moment, for \"around this span\" links. */\n around(at: string, durationMs: number, paddingMs = 5 * 60_000): Params {\n const start = new Date(at).getTime();\n return this.keep({\n from: new Date(start - paddingMs).toISOString(),\n to: new Date(start + durationMs + paddingMs).toISOString(),\n range: null,\n });\n }\n\n private leaf(): ActivatedRoute {\n let route = this.router.routerState.root;\n while (route.firstChild) route = route.firstChild;\n return route;\n }\n}\n","import { Routes } from '@angular/router';\nimport { Menus } from '@juice-js/core';\nimport { normalizeBasePath } from './core/options';\n\nfunction page(path: string, title: string, load: Routes[number]['loadComponent']): Routes[number] {\n return { path, title: `${title} · Juice Observability`, loadComponent: load };\n}\n\n/**\n * The pages, investigation first (Console requirements §4): services, traces, topology, logs and metrics; alerts and\n * rules after. Detail pages are deep links (§17) and carry the environment and time range in their query parameters.\n * The host mounts them at its `basePath` (see {@link provideJuiceObservability}) and adds its own guards.\n */\nexport const OBSERVABILITY_ROUTES: Routes = [\n page('', 'Overview', () => import('./pages/overview.page').then(m => m.OverviewPage)),\n page('services', 'Services', () => import('./pages/services.page').then(m => m.ServicesPage)),\n page('services/:id', 'Service', () => import('./pages/service.page').then(m => m.ServicePage)),\n page('traces', 'Traces', () => import('./pages/traces.page').then(m => m.TracesPage)),\n page('traces/:traceId', 'Trace', () => import('./pages/trace.page').then(m => m.TracePage)),\n page('topology', 'Dependencies', () => import('./pages/topology.page').then(m => m.TopologyPage)),\n page('logs', 'Logs', () => import('./pages/logs.page').then(m => m.LogsPage)),\n page('metrics', 'Metrics', () => import('./pages/metrics.page').then(m => m.MetricsPage)),\n page('resources', 'Resources', () => import('./pages/resources.page').then(m => m.ResourcesPage)),\n page('resources/:id', 'Resource', () => import('./pages/resource.page').then(m => m.ResourcePage)),\n page('alerts', 'Alerts', () => import('./pages/alerts.page').then(m => m.AlertsPage)),\n page('alerts/:id', 'Alert', () => import('./pages/alert.page').then(m => m.AlertPage)),\n page('rules', 'Rules', () => import('./pages/rules.page').then(m => m.RulesPage)),\n page('notifications', 'Notifications', () => import('./pages/notifications.page').then(m => m.NotificationsPage)),\n page('silences', 'Silences', () => import('./pages/silences.page').then(m => m.SilencesPage)),\n page('incidents', 'Incidents', () => import('./pages/incidents.page').then(m => m.IncidentsPage)),\n page('incidents/:id', 'Incident', () => import('./pages/incident.page').then(m => m.IncidentPage)),\n page('agents', 'Agents', () => import('./pages/agents.page').then(m => m.AgentsPage)),\n page('agents/:id', 'Agent', () => import('./pages/agent.page').then(m => m.AgentPage)),\n page('approvals', 'Approvals', () => import('./pages/approvals.page').then(m => m.ApprovalsPage)),\n page('slos', 'SLOs', () => import('./pages/slos.page').then(m => m.SlosPage)),\n page('slos/:key', 'SLO', () => import('./pages/slo.page').then(m => m.SloPage)),\n page('timeline', 'Timeline', () => import('./pages/timeline.page').then(m => m.TimelinePage)),\n page('load-runs', 'Load runs', () => import('./pages/load-runs.page').then(m => m.LoadRunsPage)),\n];\n\n/**\n * The side menu entries (juice-layout), linking under `basePath`. The pages an investigation starts from sit at the top\n * with a `shortcut` for the shell's go-to keys; the rest are grouped (Explore, Automation, Configure).\n *\n * A group links to its first page and keeps its pages' own links (`replaceChildRouterLink: false`): juice-layout 2.1\n * only opens and closes the group on a click (it has no page of its own), 2.0.2 opens that page.\n * Group ids carry an `observability-` prefix, as the host's menu sits beside them.\n */\nexport function observabilityMenus(basePath = '/', order = 1): Menus {\n const base = normalizeBasePath(basePath);\n const link = (path: string) => (base === '/' ? `/${path}` : path ? `${base}/${path}` : base);\n const group = (id: string, label: string, icon: string, children: Menus): Menus[number] =>\n ({ id, label, icon, routerLink: children[0].routerLink, replaceChildRouterLink: false, children });\n const menus: Menus = [\n { id: 'overview', label: 'Overview', icon: 'dashboard', routerLink: link(''), shortcut: 'g o' },\n { id: 'services', label: 'Services', icon: 'hub', routerLink: link('services'), shortcut: 'g s' },\n { id: 'traces', label: 'Traces', icon: 'timeline', routerLink: link('traces'), shortcut: 'g t' },\n { id: 'logs', label: 'Logs', icon: 'notes', routerLink: link('logs'), shortcut: 'g l' },\n { id: 'metrics', label: 'Metrics', icon: 'show_chart', routerLink: link('metrics'), shortcut: 'g m' },\n { id: 'alerts', label: 'Alerts', icon: 'notifications', routerLink: link('alerts'), shortcut: 'g a' },\n { id: 'incidents', label: 'Incidents', icon: 'emergency', routerLink: link('incidents'), shortcut: 'g i' },\n group('observability-explore', 'Explore', 'explore', [\n { id: 'topology', label: 'Dependencies', icon: 'account_tree', routerLink: link('topology') },\n { id: 'resources', label: 'Resources', icon: 'dns', routerLink: link('resources') },\n { id: 'slos', label: 'SLOs', icon: 'track_changes', routerLink: link('slos') },\n { id: 'timeline', label: 'Timeline', icon: 'history', routerLink: link('timeline') },\n { id: 'load-runs', label: 'Load runs', icon: 'speed', routerLink: link('load-runs') },\n ]),\n group('observability-automation', 'Automation', 'precision_manufacturing', [\n { id: 'agents', label: 'Agents', icon: 'smart_toy', routerLink: link('agents') },\n { id: 'approvals', label: 'Approvals', icon: 'approval', routerLink: link('approvals') },\n ]),\n group('observability-configure', 'Configure', 'tune', [\n { id: 'rules', label: 'Rules', icon: 'rule', routerLink: link('rules') },\n { id: 'silences', label: 'Silences', icon: 'notifications_paused', routerLink: link('silences') },\n { id: 'notifications', label: 'Notifications', icon: 'campaign', routerLink: link('notifications') },\n ]),\n ];\n return menus.map((menu, index) => ({ ...menu, order: order + index }));\n}\n"],"mappings":";;;;;;AAcA,SAAgB,iBAAc;CAC5B,MAAM,IAAI,OAAO,gCAAgB,IAAI,WAAW,EAAE,CAAC;CACnD,EAAE,KAAM,EAAE,KAAK,KAAQ;CACvB,EAAE,KAAM,EAAE,KAAK,KAAQ;CACvB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K,OAAO;GAAC;GACtE;IAAE,IAAI;IAAY,OAAO;IAAY,MAAM;IAAwB,YAAY,KAAK,UAAU;GAAC;GAC/F;IAAE,IAAI;IAAiB,OAAO;IAAiB,MAAM;IAAY,YAAY,KAAK,eAAe;GAAC;EACnG,CAAA;CAEI,CAAA,CAAM,KAAK,MAAM,WAAW;EAAE,GAAG;EAAM,OAAO,QAAQ;CAAK,EAAG;AACvE"}
|
|
1
|
+
{"version":3,"file":"juice-js-observability.mjs","names":[],"sources":["../../../../projects/juice-js/observability/src/lib/core/api.service.ts","../../../../projects/juice-js/observability/src/lib/core/approval-count.ts","../../../../projects/juice-js/observability/src/lib/core/options.ts","../../../../projects/juice-js/observability/src/lib/core/context.service.ts","../../../../projects/juice-js/observability/src/lib/observability.routes.ts"],"sourcesContent":["import { HttpClient, HttpParams } from '@angular/common/http';\nimport { Injectable, inject, signal } from '@angular/core';\nimport { EMPTY, Observable, expand, map, reduce, shareReplay, switchMap, tap } from 'rxjs';\nimport { OBSERVABILITY_OPTIONS } from './options';\nimport {\n ActionRequest, ActionRequestsWaiting, ActionTarget, Agent, SloDetail, SloSummary, AgentActions, AgentCommand, AgentPackage, EnrollmentToken, AlertDetail, AlertNotifications, Alert, AllowlistEntry, Application, Channel, ChannelTestResult, Delivery, EscalationPolicy, IncidentDetail, IncidentEvent, IncidentSummary, Silence, DependencyEvidence, DependencyStatsPage, DeploymentEnvironment, LoadRun, LoadRunResults, Related, Timeline, Health, LogRecord, MetricInfo, Operation,\n Page, PlatformOverview, ResourceDetail, ResourceSummary, Rule, SearchHit, Series, Capacity, ServiceStats, Tenant, TelemetryPage, Topology, Trace,\n TraceSummary, Suggestions, CorrelationDecision,\n} from './models';\n\n/**\n * A random UUID v4 for `Idempotency-Key`. Not `crypto.randomUUID()`: browsers offer it only in a secure context (HTTPS or localhost), so it\n * throws on a Console opened over plain HTTP at the machine's address, as the local stack is. `getRandomValues` works everywhere.\n */\nexport function idempotencyKey(): string {\n const b = crypto.getRandomValues(new Uint8Array(16));\n b[6] = (b[6] & 0x0f) | 0x40;\n b[8] = (b[8] & 0x3f) | 0x80;\n const hex = Array.from(b, x => x.toString(16).padStart(2, '0')).join('');\n return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;\n}\n\nexport type Query =Record<string, string | number | boolean | string[] | null | undefined>;\n\n/**\n * The Console's only backend: the Juice API (Console requirements §3). One deployment serves one tenant, the one the\n * signed-in user's token names.\n */\n@Injectable({ providedIn: 'root' })\nexport class ApiService {\n private readonly http = inject(HttpClient);\n private readonly base = `${inject(OBSERVABILITY_OPTIONS).apiBase}/api/v1`;\n\n /** Set once a page has fetched the caller's tenant: the user is signed in, so background calls such as {@link ApprovalCount}'s may start. */\n readonly tenantKnown = signal(false);\n\n /** The caller's tenant, fetched once. */\n readonly tenant$: Observable<Tenant> = this.http.get<Page<Tenant>>(`${this.base}/tenants`).pipe(\n map(page => {\n if (page.items.length === 0) throw new Error('No tenant is authorized for this user.');\n return page.items[0];\n }),\n tap(() => this.tenantKnown.set(true)),\n shareReplay(1),\n );\n\n private get<T>(path: string, query: Query = {}): Observable<T> {\n let params = new HttpParams();\n for (const [key, value] of Object.entries(query)) {\n if (value === null || value === undefined || value === '') continue;\n for (const item of Array.isArray(value) ? value : [value]) params = params.append(key, String(item));\n }\n return this.tenant$.pipe(switchMap(t => this.http.get<T>(`${this.base}/tenants/${t.id}${path}`, { params })));\n }\n\n /** A change. `Idempotency-Key` on what can be retried, so a repeated click or a lost response doesn't do it twice. */\n private send<T>(method: 'POST' | 'PUT' | 'DELETE', path: string, body?: unknown, headers: Record<string, string> = {}): Observable<T> {\n return this.tenant$.pipe(switchMap(t => this.http.request<T>(method, `${this.base}/tenants/${t.id}${path}`, { body, headers })));\n }\n private once<T>(path: string, body: unknown): Observable<T> { return this.send<T>('POST', path, body, { 'Idempotency-Key': idempotencyKey() }); }\n\n /** Every page of a cursor-paged list (bounded: at most `maxPages` requests). */\n private all<T>(path: string, query: Query = {}, maxPages = 25): Observable<Page<T>> {\n let pages = 0;\n return this.get<Page<T>>(path, { ...query, limit: 200 }).pipe(\n expand(page => page.nextCursor && ++pages < maxPages ? this.get<Page<T>>(path, { ...query, limit: 200, cursor: page.nextCursor }) : EMPTY),\n reduce((all, page) => ({ items: [...all.items, ...page.items], nextCursor: page.nextCursor }), { items: [] as T[], nextCursor: null as string | null }),\n );\n }\n\n environments() { return this.get<Page<DeploymentEnvironment>>('/environments'); }\n applications() { return this.get<Page<Application>>('/applications', { limit: 200 }); }\n resources(type?: string) { return this.all<ResourceSummary>('/resources', { type }); }\n resource(id: string) { return this.get<ResourceDetail>(`/resources/${id}`); }\n health(query: Query) { return this.all<Health>('/health', query); }\n topology(environment?: string | null) { return this.get<Topology>('/topology', { environment }); }\n\n rules() { return this.get<Page<Rule>>('/rules', { limit: 200 }); }\n createRule(definition: unknown) { return this.send<Rule>('POST', '/rules', definition); }\n /** With the rule's etag, so a change made since it was read isn't overwritten. */\n updateRule(key: string, definition: unknown, etag: string) { return this.send<Rule>('PUT', `/rules/${key}`, definition, { 'If-Match': `\"${etag}\"` }); }\n\n channels() { return this.get<Page<Channel>>('/webhooks'); }\n createChannel(body: unknown) { return this.send<Channel>('POST', '/webhooks', body); }\n updateChannel(id: string, body: unknown) { return this.send<Channel>('PUT', `/webhooks/${id}`, body); }\n deliveries(id: string, query: Query = {}) { return this.get<Page<Delivery>>(`/webhooks/${id}/deliveries`, { limit: 50, ...query }); }\n testChannel(id: string) { return this.send<ChannelTestResult>('POST', `/webhooks/${id}/test`); }\n retryDelivery(channelId: string, deliveryId: string) { return this.send<Delivery>('POST', `/webhooks/${channelId}/deliveries/${deliveryId}/retry`); }\n allowlist() { return this.get<Page<AllowlistEntry>>('/webhooks/allowlist'); }\n putAllowlist(destination: string, ports: number[]) { return this.send<AllowlistEntry>('PUT', '/webhooks/allowlist', { destination, ports }); }\n removeAllowlist(destination: string) { return this.send<void>('DELETE', `/webhooks/allowlist?destination=${encodeURIComponent(destination)}`); }\n\n escalationPolicies() { return this.get<Page<EscalationPolicy>>('/escalation-policies'); }\n createEscalationPolicy(body: unknown) { return this.send<EscalationPolicy>('POST', '/escalation-policies', body); }\n updateEscalationPolicy(key: string, body: unknown) { return this.send<EscalationPolicy>('PUT', `/escalation-policies/${key}`, body); }\n\n silences(query: Query = {}) { return this.get<Page<Silence>>('/silences', { limit: 200, ...query }); }\n createSilence(body: unknown) { return this.once<Silence>('/silences', body); }\n cancelSilence(id: string) { return this.send<void>('DELETE', `/silences/${id}`); }\n\n incidents(query: Query = {}) { return this.get<Page<IncidentSummary>>('/incidents', { limit: 100, ...query }); }\n incident(id: string) { return this.get<IncidentDetail>(`/incidents/${id}`); }\n createIncident(body: unknown) { return this.once<IncidentSummary>('/incidents', body); }\n moveIncident(id: string, to: string, comment: string) { return this.once<IncidentSummary>(`/incidents/${id}/transitions`, { to, comment }); }\n addIncidentNote(id: string, text: string) { return this.once<IncidentEvent>(`/incidents/${id}/notes`, { text }); }\n removeIncidentAlert(id: string, alertId: string) { return this.send<void>('DELETE', `/incidents/${id}/alerts/${alertId}`); }\n /** Active agents, or with `all` the revoked ones too (at most 500). */\n agents(all = false) { return this.get<Page<Agent>>('/agents', { all: all || null }); }\n agent(id: string) { return this.get<Agent>(`/agents/${id}`); }\n createEnrollmentToken(purpose: string, expiresInMinutes: number) { return this.send<EnrollmentToken>('POST', '/agents/enrollment-tokens', { purpose, expiresInMinutes }); }\n revokeAgent(id: string, reason: string) { return this.send<Agent>('POST', `/agents/${id}/revocation`, { reason }); }\n /** What the agent reported it can run, custom actions included, with what its host permits; the built-ins if it never reported. */\n agentActions(id: string) { return this.get<AgentActions>(`/agents/${id}/actions`); }\n agentPackages() { return this.get<Page<AgentPackage>>('/agents/packages'); }\n /** Idempotent: a repeated click or a lost response signs one command, not two. */\n issueCommand(id: string, action: string, parameters: Record<string, unknown>) { return this.once<AgentCommand>(`/agents/${id}/commands`, { action, parameters }); }\n /** Asks for an action under its approval policy: issued at once when nobody else needs to approve, otherwise waiting. */\n requestAction(agentId: string, action: string, parameters: Record<string, unknown>, reason: string, target: ActionTarget | null = null) {\n return this.once<ActionRequest>(`/agents/${agentId}/action-requests`, { action, parameters, reason, target });\n }\n actionRequests(query: Query = {}) { return this.get<Page<ActionRequest>>('/action-requests', { limit: 100, ...query }); }\n /** The platform panel and capacity view (operators and admins of this deployment; a viewer gets 403). Not under a tenant: the platform's own. */\n platformOverview(): Observable<PlatformOverview> { return this.tenant$.pipe(switchMap(() => this.http.get<PlatformOverview>(`${this.base}/platform/overview`))); }\n\n /** A diagnostic bundle's zip (operators and admins; audited). */\n downloadBundle(agentId: string, bundleId: string) {\n return this.tenant$.pipe(switchMap(t => this.http.get(`${this.base}/tenants/${t.id}/agents/${agentId}/bundles/${bundleId}`, { responseType: 'blob', observe: 'response' })));\n }\n /** SLOs, technical or business apart (category), with their budgets and burn rates. */\n slos(category?: string) { return this.get<Page<SloSummary>>('/slos', { category }); }\n slo(key: string) { return this.get<SloDetail>(`/slos/${encodeURIComponent(key)}`); }\n /** How many requests wait, and how many of them the signed-in user can decide. */\n waitingRequests() { return this.get<ActionRequestsWaiting>('/action-requests/waiting'); }\n approveRequest(id: string, comment: string) { return this.send<ActionRequest>('POST', `/action-requests/${id}/approval`, { comment }); }\n rejectRequest(id: string, comment: string) { return this.send<ActionRequest>('POST', `/action-requests/${id}/rejection`, { comment }); }\n cancelRequest(id: string) { return this.send<ActionRequest>('POST', `/action-requests/${id}/cancellation`, {}); }\n agentCommands(id: string, cursor?: string | null) { return this.get<Page<AgentCommand>>(`/agents/${id}/commands`, { limit: 25, cursor }); }\n\n alertNotifications(id: string) { return this.get<AlertNotifications>(`/alerts/${id}/notifications`); }\n\n /** One page of alerts, newest first; pass the previous page's `nextCursor` as `cursor` for the next. */\n alerts(query: Query) { return this.get<Page<Alert>>('/alerts', { limit: 100, ...query }); }\n /** Every alert matching the query (bounded, like the other complete lists). */\n allAlerts(query: Query) { return this.all<Alert>('/alerts', query); }\n alert(id: string) { return this.get<AlertDetail>(`/alerts/${id}`); }\n acknowledge(id: string, comment: string): Observable<Alert> {\n return this.tenant$.pipe(switchMap(t => this.http.post<Alert>(`${this.base}/tenants/${t.id}/alerts/${id}/acknowledgement`,\n { comment }, { headers: { 'Idempotency-Key': idempotencyKey() } })));\n }\n\n traces(query: Query) { return this.get<TelemetryPage<TraceSummary>>('/telemetry/traces', query); }\n trace(traceId: string) { return this.get<Trace>(`/telemetry/traces/${traceId}`); }\n logs(query: Query) { return this.get<TelemetryPage<LogRecord>>('/telemetry/logs', query); }\n operations(query: Query) { return this.get<TelemetryPage<Operation>>('/telemetry/operations', query); }\n metrics(query: Query) { return this.get<TelemetryPage<MetricInfo>>('/telemetry/metrics', query); }\n series(query: Query) { return this.get<Series>('/telemetry/metrics/series', query); }\n serviceStats(query: Query) { return this.get<ServiceStats>('/telemetry/service-stats', query); }\n capacity(query: Query) { return this.get<Capacity>('/telemetry/capacity', query); }\n timeline(query: Query) { return this.get<Timeline>('/timeline', query); }\n relatedToAlert(id: string) { return this.get<Related>(`/alerts/${id}/related`); }\n alertSuggestions(id: string) { return this.get<Suggestions>(`/alerts/${id}/suggestions`); }\n incidentSuggestions(id: string) { return this.get<Suggestions>(`/incidents/${id}/suggestions`); }\n acceptSuggestion(alertId: string, otherId: string) { return this.once<CorrelationDecision>(`/alerts/${alertId}/suggestions/${otherId}/accept`, {}); }\n dismissSuggestion(alertId: string, otherId: string, reason: string) { return this.once<CorrelationDecision>(`/alerts/${alertId}/suggestions/${otherId}/dismiss`, { reason }); }\n loadRuns(query: Query) { return this.get<Page<LoadRun>>('/load-runs', query); }\n loadRunResults(id: string) { return this.get<LoadRunResults>(`/load-runs/${id}/results`); }\n dependencyStats(query: Query) { return this.get<DependencyStatsPage>('/telemetry/dependencies', query); }\n dependency(id: string, query: Query) { return this.get<DependencyEvidence>(`/telemetry/dependencies/${id}`, query); }\n search(q: string) { return this.get<TelemetryPage<SearchHit>>('/search', { q }); }\n}\n","import { DOCUMENT } from '@angular/common';\nimport { DestroyRef, Injectable, effect, inject, signal, untracked } from '@angular/core';\nimport { NavigationEnd, Router } from '@angular/router';\nimport { Subscription, filter, fromEvent, timer, switchMap } from 'rxjs';\nimport { MenuBadgeService } from '@juice-js/layout';\nimport { ApiService } from './api.service';\n\n/**\n * How many action requests wait for the signed-in user to decide, refreshed every 30 seconds from whatever page is open, and at once\n * when a page made or decided one ({@link refresh}). It starts only once a page has fetched the tenant: before that the user may still be\n * signing in, and an early call would fail, along with the page's own call sharing it. It stops on an error (signed out, or no rights)\n * until the next navigation, so a signed-out tab doesn't keep asking. A tab out of sight doesn't ask either; it asks at once on coming back.\n */\n@Injectable({ providedIn: 'root' })\nexport class ApprovalCount {\n static readonly Every = 30_000;\n\n private readonly api = inject(ApiService);\n private readonly document = inject(DOCUMENT);\n private polling: Subscription | null = null;\n /** Requests the signed-in user can approve or reject now. */\n readonly forYou = signal(0);\n\n constructor() {\n effect(() => { if (this.api.tenantKnown() && !untracked(() => this.polling)) untracked(() => this.start()); });\n const navigations = inject(Router).events.pipe(filter(e => e instanceof NavigationEnd))\n .subscribe(() => { if (!this.polling && this.api.tenantKnown()) this.start(); });\n // Back in sight: what waits may have changed meanwhile.\n const shown = fromEvent(this.document, 'visibilitychange').pipe(filter(() => !this.document.hidden))\n .subscribe(() => { if (this.polling) this.start(); });\n inject(DestroyRef).onDestroy(() => { navigations.unsubscribe(); shown.unsubscribe(); this.polling?.unsubscribe(); });\n }\n\n /** Asks again now, for a page that just changed what waits. */\n refresh() { if (this.api.tenantKnown()) this.start(); }\n\n private start() {\n this.polling?.unsubscribe();\n this.polling = timer(0, ApprovalCount.Every).pipe(filter(() => !this.document.hidden), switchMap(() => this.api.waitingRequests())).subscribe({\n next: w => this.forYou.set(w.forYou),\n error: () => { this.forYou.set(0); this.polling = null; },\n });\n }\n}\n\n/** The menu id of the Approvals entry in {@link observabilityMenus}, where {@link ApprovalMenuBadge} shows the count. */\nexport const APPROVALS_MENU_ID = 'approvals';\n\n/**\n * Shows {@link ApprovalCount} on the Approvals entry of juice-layout's side menu (by its menu id, {@link APPROVALS_MENU_ID}). The menu\n * draws it: beside the label, on the icon while folded, and on the header of the closed group it sits in.\n */\n@Injectable({ providedIn: 'root' })\nexport class ApprovalMenuBadge {\n constructor() {\n const count = inject(ApprovalCount), badges = inject(MenuBadgeService);\n effect(() => {\n const n = count.forYou();\n badges.set(APPROVALS_MENU_ID, { count: n, hint: `${n} request${n === 1 ? '' : 's'} waiting for your approval` });\n });\n inject(DestroyRef).onDestroy(() => badges.clear(APPROVALS_MENU_ID));\n }\n}\n","import { EnvironmentProviders, Injectable, InjectionToken, Pipe, PipeTransform, inject, makeEnvironmentProviders, provideEnvironmentInitializer } from '@angular/core';\nimport { ApprovalMenuBadge } from './approval-count';\n\n/** How the host app mounts Juice Observability. */\nexport interface ObservabilityOptions {\n /** The Juice API origin; empty when the API serves the app (same origin). */\n apiBase: string;\n /** Where the host mounts {@link OBSERVABILITY_ROUTES}: `/` for the whole app, or a path such as `/observability`. */\n basePath: string;\n /**\n * A link to the audit records of a trace, shown on the trace page: for the Juice Audit pages mounted at `/audit`,\n * `id => ['/audit/traces', id]`. A string is an external URL. Without it, no link.\n */\n auditLink?: ((traceId: string) => unknown[] | string | null) | null;\n /** Show on the Approvals menu entry how many action requests wait for the signed-in user. On unless false. */\n approvalCount?: boolean;\n}\n\nexport const OBSERVABILITY_OPTIONS = new InjectionToken<ObservabilityOptions>('OBSERVABILITY_OPTIONS', {\n providedIn: 'root',\n factory: () => ({ apiBase: '', basePath: '/', auditLink: null }),\n});\n\n/**\n * Configures the pages: where the API is, where the host mounted the routes, and where a trace's audit records open. Also shows the count\n * of requests waiting for approval on the Approvals menu entry, unless `approvalCount: false`.\n */\nexport function provideJuiceObservability(options: Partial<ObservabilityOptions> = {}): EnvironmentProviders {\n return makeEnvironmentProviders([\n {\n provide: OBSERVABILITY_OPTIONS,\n useValue: {\n apiBase: options.apiBase ?? '',\n basePath: options.basePath ?? '/',\n auditLink: options.auditLink ?? null,\n } satisfies ObservabilityOptions,\n },\n ...(options.approvalCount === false ? [] : [provideEnvironmentInitializer(() => { inject(ApprovalMenuBadge); })]),\n ]);\n}\n\n/** `/observability/` → `/observability`; `` and `/` → `/`. */\nexport function normalizeBasePath(basePath: string): string {\n const trimmed = basePath.trim().replace(/^\\/+|\\/+$/g, '');\n return trimmed ? `/${trimmed}` : '/';\n}\n\n/** Router links to the pages, under the host's mount path. */\n@Injectable({ providedIn: 'root' })\nexport class ObservabilityLinks {\n private readonly options = inject(OBSERVABILITY_OPTIONS);\n readonly base = normalizeBasePath(this.options.basePath);\n\n /** `to('services', id)` → `['/observability', 'services', id]`. */\n to(...segments: unknown[]): unknown[] { return [this.base, ...segments]; }\n\n /** The host's link to the audit records of a trace, if it gave one. */\n audit(traceId: string | null | undefined): { route: unknown[] } | { href: string } | null {\n if (!traceId || !this.options.auditLink) return null;\n const link = this.options.auditLink(traceId);\n if (!link) return null;\n return typeof link === 'string' ? { href: link } : { route: link };\n }\n}\n\n/** `['services', id] | jcLink`: the same as {@link ObservabilityLinks.to} in a template. */\n@Pipe({ name: 'jcLink' })\nexport class LinkPipe implements PipeTransform {\n private readonly links = inject(ObservabilityLinks);\n transform(segments: unknown[]): unknown[] { return this.links.to(...segments); }\n}\n","import { Injectable, computed, inject } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { ActivatedRoute, NavigationEnd, Params, Router } from '@angular/router';\nimport { filter, map, startWith } from 'rxjs';\n\nexport const RANGES: Record<string, number> = {\n '15m': 15 * 60_000, '1h': 3_600_000, '6h': 6 * 3_600_000, '24h': 24 * 3_600_000, '7d': 7 * 24 * 3_600_000,\n};\n\n/** Search ranges are at most 24 hours (the API's bound); series and operations take up to 7 days. */\nexport const MAX_SEARCH_MS = RANGES['24h'];\n\n/**\n * The investigation context that follows the user between pages (Console requirements §17): environment and time\n * range. It lives in the URL (`env`, and `range` or `from`/`to`), so every page is a deep link and the browser's back\n * button restores it.\n */\n@Injectable({ providedIn: 'root' })\nexport class ContextService {\n private readonly router = inject(Router);\n\n // Created on first use, after the first navigation may already have ended: start from the current URL.\n private readonly params = toSignal(this.router.events.pipe(\n filter(e => e instanceof NavigationEnd),\n startWith(null),\n map(() => this.leaf().snapshot.queryParams),\n ), { initialValue: {} as Params });\n\n readonly environment = computed(() => (this.params()['env'] as string | undefined) ?? '');\n readonly range = computed(() => {\n const p = this.params();\n return p['from'] && p['to'] ? 'custom' : ((p['range'] as string | undefined) ?? '1h');\n });\n readonly absolute = computed(() => {\n const p = this.params();\n return p['from'] && p['to'] ? { from: p['from'] as string, to: p['to'] as string } : null;\n });\n\n /** The window as ISO strings, evaluated now for a relative range. */\n window(maxMs?: number): { from: string; to: string } {\n const absolute = this.absolute();\n if (absolute) return absolute;\n const to = Date.now();\n const span = Math.min(RANGES[this.range()] ?? RANGES['1h'], maxMs ?? Number.MAX_SAFE_INTEGER);\n return { from: new Date(to - span).toISOString(), to: new Date(to).toISOString() };\n }\n\n /** Query parameters for a link: the context plus the target page's own. */\n keep(extra: Params = {}): Params {\n const p = this.params();\n const context: Params = {};\n for (const key of ['env', 'range', 'from', 'to']) if (p[key]) context[key] = p[key];\n return { ...context, ...extra };\n }\n\n /** Changes the context on the current page, keeping its other parameters. */\n set(change: { env?: string | null; range?: string | null; from?: string | null; to?: string | null }) {\n const queryParams: Params = { ...change };\n if (change.range) Object.assign(queryParams, { from: null, to: null });\n void this.router.navigate([], { relativeTo: this.leaf(), queryParams, queryParamsHandling: 'merge' });\n }\n\n /** A time window centred on a moment, for \"around this span\" links. */\n around(at: string, durationMs: number, paddingMs = 5 * 60_000): Params {\n const start = new Date(at).getTime();\n return this.keep({\n from: new Date(start - paddingMs).toISOString(),\n to: new Date(start + durationMs + paddingMs).toISOString(),\n range: null,\n });\n }\n\n private leaf(): ActivatedRoute {\n let route = this.router.routerState.root;\n while (route.firstChild) route = route.firstChild;\n return route;\n }\n}\n","import { Routes } from '@angular/router';\nimport { Menus } from '@juice-js/core';\nimport { APPROVALS_MENU_ID } from './core/approval-count';\nimport { normalizeBasePath } from './core/options';\n\nfunction page(path: string, title: string, load: Routes[number]['loadComponent']): Routes[number] {\n return { path, title: `${title} · Juice Observability`, loadComponent: load };\n}\n\n/**\n * The pages, investigation first (Console requirements §4): services, traces, topology, logs and metrics; alerts and\n * rules after. Detail pages are deep links (§17) and carry the environment and time range in their query parameters.\n * The host mounts them at its `basePath` (see {@link provideJuiceObservability}) and adds its own guards.\n */\nexport const OBSERVABILITY_ROUTES: Routes = [\n page('', 'Overview', () => import('./pages/overview.page').then(m => m.OverviewPage)),\n page('services', 'Services', () => import('./pages/services.page').then(m => m.ServicesPage)),\n page('services/:id', 'Service', () => import('./pages/service.page').then(m => m.ServicePage)),\n page('traces', 'Traces', () => import('./pages/traces.page').then(m => m.TracesPage)),\n page('traces/:traceId', 'Trace', () => import('./pages/trace.page').then(m => m.TracePage)),\n page('topology', 'Dependencies', () => import('./pages/topology.page').then(m => m.TopologyPage)),\n page('logs', 'Logs', () => import('./pages/logs.page').then(m => m.LogsPage)),\n page('metrics', 'Metrics', () => import('./pages/metrics.page').then(m => m.MetricsPage)),\n page('resources', 'Resources', () => import('./pages/resources.page').then(m => m.ResourcesPage)),\n page('resources/:id', 'Resource', () => import('./pages/resource.page').then(m => m.ResourcePage)),\n page('alerts', 'Alerts', () => import('./pages/alerts.page').then(m => m.AlertsPage)),\n page('alerts/:id', 'Alert', () => import('./pages/alert.page').then(m => m.AlertPage)),\n page('rules', 'Rules', () => import('./pages/rules.page').then(m => m.RulesPage)),\n page('notifications', 'Notifications', () => import('./pages/notifications.page').then(m => m.NotificationsPage)),\n page('silences', 'Silences', () => import('./pages/silences.page').then(m => m.SilencesPage)),\n page('incidents', 'Incidents', () => import('./pages/incidents.page').then(m => m.IncidentsPage)),\n page('incidents/:id', 'Incident', () => import('./pages/incident.page').then(m => m.IncidentPage)),\n page('agents', 'Agents', () => import('./pages/agents.page').then(m => m.AgentsPage)),\n page('agents/:id', 'Agent', () => import('./pages/agent.page').then(m => m.AgentPage)),\n page('approvals', 'Approvals', () => import('./pages/approvals.page').then(m => m.ApprovalsPage)),\n page('slos', 'SLOs', () => import('./pages/slos.page').then(m => m.SlosPage)),\n page('slos/:key', 'SLO', () => import('./pages/slo.page').then(m => m.SloPage)),\n page('timeline', 'Timeline', () => import('./pages/timeline.page').then(m => m.TimelinePage)),\n page('load-runs', 'Load runs', () => import('./pages/load-runs.page').then(m => m.LoadRunsPage)),\n];\n\n/**\n * The side menu entries (juice-layout), linking under `basePath`. The pages an investigation starts from sit at the top\n * with a `shortcut` for the shell's go-to keys; the rest are grouped (Explore, Automation, Configure).\n *\n * A group links to its first page and keeps its pages' own links (`replaceChildRouterLink: false`): juice-layout only\n * opens and closes the group on a click (it has no page of its own).\n * Group ids carry an `observability-` prefix, as the host's menu sits beside them.\n */\nexport function observabilityMenus(basePath = '/', order = 1): Menus {\n const base = normalizeBasePath(basePath);\n const link = (path: string) => (base === '/' ? `/${path}` : path ? `${base}/${path}` : base);\n const group = (id: string, label: string, icon: string, children: Menus): Menus[number] =>\n ({ id, label, icon, routerLink: children[0].routerLink, replaceChildRouterLink: false, children });\n const menus: Menus = [\n { id: 'overview', label: 'Overview', icon: 'dashboard', routerLink: link(''), shortcut: 'g o' },\n { id: 'services', label: 'Services', icon: 'hub', routerLink: link('services'), shortcut: 'g s' },\n { id: 'traces', label: 'Traces', icon: 'timeline', routerLink: link('traces'), shortcut: 'g t' },\n { id: 'logs', label: 'Logs', icon: 'notes', routerLink: link('logs'), shortcut: 'g l' },\n { id: 'metrics', label: 'Metrics', icon: 'show_chart', routerLink: link('metrics'), shortcut: 'g m' },\n { id: 'alerts', label: 'Alerts', icon: 'notifications', routerLink: link('alerts'), shortcut: 'g a' },\n { id: 'incidents', label: 'Incidents', icon: 'emergency', routerLink: link('incidents'), shortcut: 'g i' },\n group('observability-explore', 'Explore', 'explore', [\n { id: 'topology', label: 'Dependencies', icon: 'account_tree', routerLink: link('topology') },\n { id: 'resources', label: 'Resources', icon: 'dns', routerLink: link('resources') },\n { id: 'slos', label: 'SLOs', icon: 'track_changes', routerLink: link('slos') },\n { id: 'timeline', label: 'Timeline', icon: 'history', routerLink: link('timeline') },\n { id: 'load-runs', label: 'Load runs', icon: 'speed', routerLink: link('load-runs') },\n ]),\n group('observability-automation', 'Automation', 'precision_manufacturing', [\n { id: 'agents', label: 'Agents', icon: 'smart_toy', routerLink: link('agents') },\n { id: APPROVALS_MENU_ID, label: 'Approvals', icon: 'approval', routerLink: link('approvals') },\n ]),\n group('observability-configure', 'Configure', 'tune', [\n { id: 'rules', label: 'Rules', icon: 'rule', routerLink: link('rules') },\n { id: 'silences', label: 'Silences', icon: 'notifications_paused', routerLink: link('silences') },\n { id: 'notifications', label: 'Notifications', icon: 'campaign', routerLink: link('notifications') },\n ]),\n ];\n return menus.map((menu, index) => ({ ...menu, order: order + index }));\n}\n"],"mappings":";;;;;;;;AAcA,SAAgB,iBAAc;CAC5B,MAAM,IAAI,OAAO,gCAAgB,IAAI,WAAW,EAAE,CAAC;CACnD,EAAE,KAAM,EAAE,KAAK,KAAQ;CACvB,EAAE,KAAM,EAAE,KAAK,KAAQ;CACvB,MAAM,MAAM,MAAM,KAAK,IAAG,MAAK,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE;CACvE,OAAO,GAAG,IAAI,MAAM,GAAG,CAAC,EAAC,GAAI,IAAI,MAAM,GAAG,EAAE,EAAC,GAAI,IAAI,MAAM,IAAI,EAAE,EAAC,GAAI,IAAI,MAAM,IAAI,EAAE,EAAC,GAAI,IAAI,MAAM,EAAE;AACzG;AASA,IAAa,aAAb,MAAa,WAAU;CACJ,OAAO,OAAO,UAAU;CACxB,OAAO,GAAG,OAAO,qBAAqB,CAAC,CAAC,QAAO;CAGvD,cAAc,OAAO,OAAM,GAAA,YAAA,CAA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;GAAE,IAAI;GAAa,OAAO;GAAa,MAAM;GAAa,YAAY,KAAK,WAAW;GAAG,UAAU;EAAK;EACxG,MAAM,yBAAyB,WAAW,WAAW;GACnD;IAAE,IAAI;IAAY,OAAO;IAAgB,MAAM;IAAgB,YAAY,KAAK,UAAU;GAAC;GAC3F;IAAE,IAAI;IAAa,OAAO;IAAa,MAAM;IAAO,YAAY,KAAK,WAAW;GAAC;GACjF;IAAE,IAAI;IAAQ,OAAO;IAAQ,MAAM;IAAiB,YAAY,KAAK,MAAM;GAAC;GAC5E;IAAE,IAAI;IAAY,OAAO;IAAY,MAAM;IAAW,YAAY,KAAK,UAAU;GAAC;GAClF;IAAE,IAAI;IAAa,OAAO;IAAa,MAAM;IAAS,YAAY,KAAK,WAAW;GAAC;EACpF,CAAA;EACD,MAAM,4BAA4B,cAAc,2BAA2B,CACzE;GAAE,IAAI;GAAU,OAAO;GAAU,MAAM;GAAa,YAAY,KAAK,QAAQ;EAAC,GAC9E;GAAE,IAAI;GAAmB,OAAO;GAAa,MAAM;GAAY,YAAY,KAAK,WAAW;EAAC,CAC7F,CAAA;EACD,MAAM,2BAA2B,aAAa,QAAQ;GACpD;IAAE,IAAI;IAAS,OAAO;IAAS,MAAM;IAAQ,YAAY,KAAK,OAAO;GAAC;GACtE;IAAE,IAAI;IAAY,OAAO;IAAY,MAAM;IAAwB,YAAY,KAAK,UAAU;GAAC;GAC/F;IAAE,IAAI;IAAiB,OAAO;IAAiB,MAAM;IAAY,YAAY,KAAK,eAAe;GAAC;EACnG,CAAA;CAEI,CAAA,CAAM,KAAK,MAAM,WAAW;EAAE,GAAG;EAAM,OAAO,QAAQ;CAAK,EAAG;AACvE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juice-js/observability",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Juice Observability pages (services, traces, topology, logs, metrics, resources, alerts, rules) for an Angular app on juice-layout",
|
|
5
5
|
"author": "jack@creatorflow.io",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"@angular/forms": "^22.0.0",
|
|
25
25
|
"@angular/material": "^22.0.0",
|
|
26
26
|
"@angular/router": "^22.0.0",
|
|
27
|
-
"@juice-js/core": "^2.0
|
|
28
|
-
"@juice-js/layout": "^2.0
|
|
27
|
+
"@juice-js/core": "^2.2.0",
|
|
28
|
+
"@juice-js/layout": "^2.2.0",
|
|
29
29
|
"rxjs": "^7.8.0"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
@@ -1100,11 +1100,12 @@ export declare class ContextService {
|
|
|
1100
1100
|
* How many action requests wait for the signed-in user to decide, refreshed every 30 seconds from whatever page is open, and at once
|
|
1101
1101
|
* when a page made or decided one ({@link refresh}). It starts only once a page has fetched the tenant: before that the user may still be
|
|
1102
1102
|
* signing in, and an early call would fail, along with the page's own call sharing it. It stops on an error (signed out, or no rights)
|
|
1103
|
-
* until the next navigation, so a signed-out tab doesn't keep asking.
|
|
1103
|
+
* until the next navigation, so a signed-out tab doesn't keep asking. A tab out of sight doesn't ask either; it asks at once on coming back.
|
|
1104
1104
|
*/
|
|
1105
1105
|
export declare class ApprovalCount {
|
|
1106
1106
|
static readonly Every = 30000;
|
|
1107
1107
|
private readonly api;
|
|
1108
|
+
private readonly document;
|
|
1108
1109
|
private polling;
|
|
1109
1110
|
/** Requests the signed-in user can approve or reject now. */
|
|
1110
1111
|
readonly forYou: import("@angular/core").WritableSignal<number>;
|
|
@@ -1115,26 +1116,14 @@ export declare class ApprovalCount {
|
|
|
1115
1116
|
static ɵfac: i0.ɵɵFactoryDeclaration<ApprovalCount, never>;
|
|
1116
1117
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1117
1118
|
}
|
|
1119
|
+
/** The menu id of the Approvals entry in {@link observabilityMenus}, where {@link ApprovalMenuBadge} shows the count. */
|
|
1120
|
+
export declare const APPROVALS_MENU_ID = "approvals";
|
|
1118
1121
|
/**
|
|
1119
|
-
* Shows {@link ApprovalCount} on the Approvals entry of juice-layout's side menu
|
|
1120
|
-
*
|
|
1121
|
-
* whenever the menu is drawn again. With the menu folded to icons, it sits on the icon.
|
|
1122
|
+
* Shows {@link ApprovalCount} on the Approvals entry of juice-layout's side menu (by its menu id, {@link APPROVALS_MENU_ID}). The menu
|
|
1123
|
+
* draws it: beside the label, on the icon while folded, and on the header of the closed group it sits in.
|
|
1122
1124
|
*/
|
|
1123
1125
|
export declare class ApprovalMenuBadge {
|
|
1124
|
-
static readonly Icon = "approval";
|
|
1125
|
-
private readonly count;
|
|
1126
|
-
private observer;
|
|
1127
1126
|
constructor();
|
|
1128
|
-
private classes;
|
|
1129
|
-
private resizes;
|
|
1130
|
-
/** The side menu being watched for classes and size: the one on screen. */
|
|
1131
|
-
private watched;
|
|
1132
|
-
private apply;
|
|
1133
|
-
/**
|
|
1134
|
-
* The count beside the item's label; on its icon's corner when the label isn't drawn (the side menu folded to icons).
|
|
1135
|
-
* No count: no badge and no hint.
|
|
1136
|
-
*/
|
|
1137
|
-
private badge;
|
|
1138
1127
|
static ɵfac: i0.ɵɵFactoryDeclaration<ApprovalMenuBadge, never>;
|
|
1139
1128
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
1140
1129
|
}
|
|
@@ -1148,8 +1137,8 @@ export declare const OBSERVABILITY_ROUTES: Routes;
|
|
|
1148
1137
|
* The side menu entries (juice-layout), linking under `basePath`. The pages an investigation starts from sit at the top
|
|
1149
1138
|
* with a `shortcut` for the shell's go-to keys; the rest are grouped (Explore, Automation, Configure).
|
|
1150
1139
|
*
|
|
1151
|
-
* A group links to its first page and keeps its pages' own links (`replaceChildRouterLink: false`): juice-layout
|
|
1152
|
-
*
|
|
1140
|
+
* A group links to its first page and keeps its pages' own links (`replaceChildRouterLink: false`): juice-layout only
|
|
1141
|
+
* opens and closes the group on a click (it has no page of its own).
|
|
1153
1142
|
* Group ids carry an `observability-` prefix, as the host's menu sits beside them.
|
|
1154
1143
|
*/
|
|
1155
1144
|
export declare function observabilityMenus(basePath?: string, order?: number): Menus;
|