@juice-js/observability 0.0.0-stage → 1.0.0-alpha.5
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 +60 -2
- package/fesm2022/juice-js-observability-alert.page-BHKAUvR-.mjs +404 -0
- package/fesm2022/juice-js-observability-alert.page-BHKAUvR-.mjs.map +1 -0
- package/fesm2022/juice-js-observability-alerts.page-C2tXzLQl.mjs +208 -0
- package/fesm2022/juice-js-observability-alerts.page-C2tXzLQl.mjs.map +1 -0
- package/fesm2022/juice-js-observability-logs.page--j6W1Ej-.mjs +413 -0
- package/fesm2022/juice-js-observability-logs.page--j6W1Ej-.mjs.map +1 -0
- package/fesm2022/juice-js-observability-metrics.page-DR6qZtfl.mjs +267 -0
- package/fesm2022/juice-js-observability-metrics.page-DR6qZtfl.mjs.map +1 -0
- package/fesm2022/juice-js-observability-overview.page-DU0GxSXQ.mjs +243 -0
- package/fesm2022/juice-js-observability-overview.page-DU0GxSXQ.mjs.map +1 -0
- package/fesm2022/juice-js-observability-resource.page-D6qpvo_f.mjs +274 -0
- package/fesm2022/juice-js-observability-resource.page-D6qpvo_f.mjs.map +1 -0
- package/fesm2022/juice-js-observability-resources.page-CR7-DFsh.mjs +209 -0
- package/fesm2022/juice-js-observability-resources.page-CR7-DFsh.mjs.map +1 -0
- package/fesm2022/juice-js-observability-rules.page-fq-wO5I_.mjs +175 -0
- package/fesm2022/juice-js-observability-rules.page-fq-wO5I_.mjs.map +1 -0
- package/fesm2022/juice-js-observability-service.page-Qc6FYChB.mjs +726 -0
- package/fesm2022/juice-js-observability-service.page-Qc6FYChB.mjs.map +1 -0
- package/fesm2022/juice-js-observability-services.page-CX6S7sUu.mjs +251 -0
- package/fesm2022/juice-js-observability-services.page-CX6S7sUu.mjs.map +1 -0
- package/fesm2022/juice-js-observability-telemetry-D9EYxkdr.mjs +1783 -0
- package/fesm2022/juice-js-observability-telemetry-D9EYxkdr.mjs.map +1 -0
- package/fesm2022/juice-js-observability-topology.page-CLz7J5pq.mjs +483 -0
- package/fesm2022/juice-js-observability-topology.page-CLz7J5pq.mjs.map +1 -0
- package/fesm2022/juice-js-observability-trace.page-DccvH1SV.mjs +518 -0
- package/fesm2022/juice-js-observability-trace.page-DccvH1SV.mjs.map +1 -0
- package/fesm2022/juice-js-observability-traces.page-BZxnac4Y.mjs +520 -0
- package/fesm2022/juice-js-observability-traces.page-BZxnac4Y.mjs.map +1 -0
- package/fesm2022/juice-js-observability.mjs +396 -0
- package/fesm2022/juice-js-observability.mjs.map +1 -0
- package/package.json +48 -4
- package/styles/_observability.scss +216 -0
- package/types/juice-js-observability.d.ts +387 -0
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { ApiService, ContextService, LinkPipe } from "./juice-js-observability.mjs";
|
|
2
|
+
import { a as problemText, l as ContextBar, m as AgoPipe, o as cursorList } from "./juice-js-observability-telemetry-D9EYxkdr.mjs";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import { ChangeDetectionStrategy, Component, computed, inject, input } from "@angular/core";
|
|
5
|
+
import { RouterLink } from "@angular/router";
|
|
6
|
+
import * as i1 from "@angular/material/button";
|
|
7
|
+
import { MatButtonModule } from "@angular/material/button";
|
|
8
|
+
import * as i2 from "@angular/material/progress-bar";
|
|
9
|
+
import { MatProgressBarModule } from "@angular/material/progress-bar";
|
|
10
|
+
var AlertsPage = class AlertsPage {
|
|
11
|
+
ctx = inject(ContextService);
|
|
12
|
+
api = inject(ApiService);
|
|
13
|
+
states = [
|
|
14
|
+
"firing",
|
|
15
|
+
"pending",
|
|
16
|
+
"resolved"
|
|
17
|
+
];
|
|
18
|
+
state = input(...ngDevMode ? [void 0, { debugName: "state" }] : /* istanbul ignore next */ []);
|
|
19
|
+
alerts = cursorList(() => this.state() ?? "firing", (state) => ({ state }), (q) => this.api.alerts(q));
|
|
20
|
+
error = computed(() => problemText(this.alerts.first.error()), ...ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []);
|
|
21
|
+
moreError = computed(() => problemText(this.alerts.moreError()), ...ngDevMode ? [{ debugName: "moreError" }] : /* istanbul ignore next */ []);
|
|
22
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
23
|
+
minVersion: "12.0.0",
|
|
24
|
+
version: "22.2.4",
|
|
25
|
+
ngImport: i0,
|
|
26
|
+
type: AlertsPage,
|
|
27
|
+
deps: [],
|
|
28
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
29
|
+
});
|
|
30
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
31
|
+
minVersion: "17.0.0",
|
|
32
|
+
version: "22.2.4",
|
|
33
|
+
type: AlertsPage,
|
|
34
|
+
isStandalone: true,
|
|
35
|
+
selector: "ng-component",
|
|
36
|
+
inputs: { state: {
|
|
37
|
+
classPropertyName: "state",
|
|
38
|
+
publicName: "state",
|
|
39
|
+
isSignal: true,
|
|
40
|
+
isRequired: false,
|
|
41
|
+
transformFunction: null
|
|
42
|
+
} },
|
|
43
|
+
ngImport: i0,
|
|
44
|
+
template: `
|
|
45
|
+
<jc-context-bar><h1>Alerts</h1>
|
|
46
|
+
@for (s of states; track s) {
|
|
47
|
+
<a class="jc-chip" [class.jc-selected]="s === (state() ?? 'firing')" [routerLink]="['alerts'] | jcLink" [queryParams]="ctx.keep({ state: s })">{{ s }}</a>
|
|
48
|
+
}
|
|
49
|
+
</jc-context-bar>
|
|
50
|
+
@if (alerts.first.isLoading()) { <mat-progress-bar mode="indeterminate" /> }
|
|
51
|
+
@if (alerts.first.error()) { <p class="jc-error">{{ error() }}</p> }
|
|
52
|
+
<table class="jc-table">
|
|
53
|
+
<thead><tr><th>Severity</th><th>Rule</th><th>Subject</th><th>State</th><th>Value</th><th>Fired</th><th>Acknowledged</th></tr></thead>
|
|
54
|
+
<tbody>
|
|
55
|
+
@for (a of alerts.items(); track a.id) {
|
|
56
|
+
<tr>
|
|
57
|
+
<td><span class="jc-badge" [class.jc-health-unhealthy]="a.severity === 'Critical'" [class.jc-health-degraded]="a.severity === 'Warning'">{{ a.severity }}</span></td>
|
|
58
|
+
<td><a [routerLink]="['alerts', a.id] | jcLink" [queryParams]="ctx.keep()">{{ a.rule }}</a></td>
|
|
59
|
+
<td>{{ a.subjectKey }}</td>
|
|
60
|
+
<td>{{ a.state }}@if (a.noData) { <span class="jc-muted" title="The last evaluation had too few samples; the state is kept"> · no data</span> }</td>
|
|
61
|
+
<td>{{ a.lastValue ?? '—' }}</td>
|
|
62
|
+
<td>{{ a.firedAt | ago }}</td>
|
|
63
|
+
<td>{{ a.acknowledgedBy ?? '—' }}</td>
|
|
64
|
+
</tr>
|
|
65
|
+
} @empty { @if (alerts.first.hasValue()) { <tr><td colspan="7" class="jc-muted">No {{ state() ?? 'firing' }} alerts.</td></tr> } }
|
|
66
|
+
</tbody>
|
|
67
|
+
</table>
|
|
68
|
+
@if (alerts.items().length > 0) {
|
|
69
|
+
<div class="jc-more">
|
|
70
|
+
<span class="jc-muted">{{ alerts.items().length }} {{ state() ?? 'firing' }} alert{{ alerts.items().length === 1 ? '' : 's' }}{{ alerts.hasMore() ? ', newest first' : '' }}</span>
|
|
71
|
+
@if (alerts.hasMore()) {
|
|
72
|
+
<button mat-button (click)="alerts.more()" [disabled]="alerts.loadingMore()">{{ alerts.loadingMore() ? 'Loading…' : 'Load more' }}</button>
|
|
73
|
+
}
|
|
74
|
+
@if (alerts.moreError()) { <span class="jc-error">{{ moreError() }}</span> }
|
|
75
|
+
</div>
|
|
76
|
+
}`,
|
|
77
|
+
isInline: true,
|
|
78
|
+
dependencies: [
|
|
79
|
+
{
|
|
80
|
+
kind: "directive",
|
|
81
|
+
type: RouterLink,
|
|
82
|
+
selector: "[routerLink]",
|
|
83
|
+
inputs: [
|
|
84
|
+
"target",
|
|
85
|
+
"queryParams",
|
|
86
|
+
"fragment",
|
|
87
|
+
"queryParamsHandling",
|
|
88
|
+
"state",
|
|
89
|
+
"info",
|
|
90
|
+
"relativeTo",
|
|
91
|
+
"preserveFragment",
|
|
92
|
+
"skipLocationChange",
|
|
93
|
+
"replaceUrl",
|
|
94
|
+
"browserUrl",
|
|
95
|
+
"routerLink"
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
kind: "ngmodule",
|
|
100
|
+
type: MatButtonModule
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
kind: "component",
|
|
104
|
+
type: i1.MatButton,
|
|
105
|
+
selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ",
|
|
106
|
+
inputs: ["matButton"],
|
|
107
|
+
exportAs: ["matButton", "matAnchor"]
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
kind: "ngmodule",
|
|
111
|
+
type: MatProgressBarModule
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
kind: "component",
|
|
115
|
+
type: i2.MatProgressBar,
|
|
116
|
+
selector: "mat-progress-bar",
|
|
117
|
+
inputs: [
|
|
118
|
+
"color",
|
|
119
|
+
"value",
|
|
120
|
+
"bufferValue",
|
|
121
|
+
"mode"
|
|
122
|
+
],
|
|
123
|
+
outputs: ["animationEnd"],
|
|
124
|
+
exportAs: ["matProgressBar"]
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
kind: "component",
|
|
128
|
+
type: ContextBar,
|
|
129
|
+
selector: "jc-context-bar"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
kind: "pipe",
|
|
133
|
+
type: LinkPipe,
|
|
134
|
+
name: "jcLink"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
kind: "pipe",
|
|
138
|
+
type: AgoPipe,
|
|
139
|
+
name: "ago"
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
146
|
+
minVersion: "12.0.0",
|
|
147
|
+
version: "22.2.4",
|
|
148
|
+
ngImport: i0,
|
|
149
|
+
type: AlertsPage,
|
|
150
|
+
decorators: [{
|
|
151
|
+
type: Component,
|
|
152
|
+
args: [{
|
|
153
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
154
|
+
imports: [
|
|
155
|
+
LinkPipe,
|
|
156
|
+
RouterLink,
|
|
157
|
+
MatButtonModule,
|
|
158
|
+
MatProgressBarModule,
|
|
159
|
+
ContextBar,
|
|
160
|
+
AgoPipe
|
|
161
|
+
],
|
|
162
|
+
template: `
|
|
163
|
+
<jc-context-bar><h1>Alerts</h1>
|
|
164
|
+
@for (s of states; track s) {
|
|
165
|
+
<a class="jc-chip" [class.jc-selected]="s === (state() ?? 'firing')" [routerLink]="['alerts'] | jcLink" [queryParams]="ctx.keep({ state: s })">{{ s }}</a>
|
|
166
|
+
}
|
|
167
|
+
</jc-context-bar>
|
|
168
|
+
@if (alerts.first.isLoading()) { <mat-progress-bar mode="indeterminate" /> }
|
|
169
|
+
@if (alerts.first.error()) { <p class="jc-error">{{ error() }}</p> }
|
|
170
|
+
<table class="jc-table">
|
|
171
|
+
<thead><tr><th>Severity</th><th>Rule</th><th>Subject</th><th>State</th><th>Value</th><th>Fired</th><th>Acknowledged</th></tr></thead>
|
|
172
|
+
<tbody>
|
|
173
|
+
@for (a of alerts.items(); track a.id) {
|
|
174
|
+
<tr>
|
|
175
|
+
<td><span class="jc-badge" [class.jc-health-unhealthy]="a.severity === 'Critical'" [class.jc-health-degraded]="a.severity === 'Warning'">{{ a.severity }}</span></td>
|
|
176
|
+
<td><a [routerLink]="['alerts', a.id] | jcLink" [queryParams]="ctx.keep()">{{ a.rule }}</a></td>
|
|
177
|
+
<td>{{ a.subjectKey }}</td>
|
|
178
|
+
<td>{{ a.state }}@if (a.noData) { <span class="jc-muted" title="The last evaluation had too few samples; the state is kept"> · no data</span> }</td>
|
|
179
|
+
<td>{{ a.lastValue ?? '—' }}</td>
|
|
180
|
+
<td>{{ a.firedAt | ago }}</td>
|
|
181
|
+
<td>{{ a.acknowledgedBy ?? '—' }}</td>
|
|
182
|
+
</tr>
|
|
183
|
+
} @empty { @if (alerts.first.hasValue()) { <tr><td colspan="7" class="jc-muted">No {{ state() ?? 'firing' }} alerts.</td></tr> } }
|
|
184
|
+
</tbody>
|
|
185
|
+
</table>
|
|
186
|
+
@if (alerts.items().length > 0) {
|
|
187
|
+
<div class="jc-more">
|
|
188
|
+
<span class="jc-muted">{{ alerts.items().length }} {{ state() ?? 'firing' }} alert{{ alerts.items().length === 1 ? '' : 's' }}{{ alerts.hasMore() ? ', newest first' : '' }}</span>
|
|
189
|
+
@if (alerts.hasMore()) {
|
|
190
|
+
<button mat-button (click)="alerts.more()" [disabled]="alerts.loadingMore()">{{ alerts.loadingMore() ? 'Loading…' : 'Load more' }}</button>
|
|
191
|
+
}
|
|
192
|
+
@if (alerts.moreError()) { <span class="jc-error">{{ moreError() }}</span> }
|
|
193
|
+
</div>
|
|
194
|
+
}`
|
|
195
|
+
}]
|
|
196
|
+
}],
|
|
197
|
+
propDecorators: { state: [{
|
|
198
|
+
type: i0.Input,
|
|
199
|
+
args: [{
|
|
200
|
+
isSignal: true,
|
|
201
|
+
alias: "state",
|
|
202
|
+
required: false
|
|
203
|
+
}]
|
|
204
|
+
}] }
|
|
205
|
+
});
|
|
206
|
+
export { AlertsPage };
|
|
207
|
+
|
|
208
|
+
//# sourceMappingURL=juice-js-observability-alerts.page-C2tXzLQl.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"juice-js-observability-alerts.page-C2tXzLQl.mjs","names":[],"sources":["../../../../projects/juice-js/observability/src/lib/pages/alerts.page.ts"],"sourcesContent":["import { LinkPipe } from '../core/options';\nimport { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\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 { AgoPipe } from '../shared/format';\nimport { ContextBar } from '../shared/ui';\nimport { cursorList } from '../shared/paging';\nimport { problemText } from '../shared/telemetry';\n\n/** Alerts, newest first (Console requirements §14), filtered by state; 100 at a time, with the next on request. */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [LinkPipe, RouterLink, MatButtonModule, MatProgressBarModule, ContextBar, AgoPipe],\n template: `\n <jc-context-bar><h1>Alerts</h1>\n @for (s of states; track s) {\n <a class=\"jc-chip\" [class.jc-selected]=\"s === (state() ?? 'firing')\" [routerLink]=\"['alerts'] | jcLink\" [queryParams]=\"ctx.keep({ state: s })\">{{ s }}</a>\n }\n </jc-context-bar>\n @if (alerts.first.isLoading()) { <mat-progress-bar mode=\"indeterminate\" /> }\n @if (alerts.first.error()) { <p class=\"jc-error\">{{ error() }}</p> }\n <table class=\"jc-table\">\n <thead><tr><th>Severity</th><th>Rule</th><th>Subject</th><th>State</th><th>Value</th><th>Fired</th><th>Acknowledged</th></tr></thead>\n <tbody>\n @for (a of alerts.items(); track a.id) {\n <tr>\n <td><span class=\"jc-badge\" [class.jc-health-unhealthy]=\"a.severity === 'Critical'\" [class.jc-health-degraded]=\"a.severity === 'Warning'\">{{ a.severity }}</span></td>\n <td><a [routerLink]=\"['alerts', a.id] | jcLink\" [queryParams]=\"ctx.keep()\">{{ a.rule }}</a></td>\n <td>{{ a.subjectKey }}</td>\n <td>{{ a.state }}@if (a.noData) { <span class=\"jc-muted\" title=\"The last evaluation had too few samples; the state is kept\"> · no data</span> }</td>\n <td>{{ a.lastValue ?? '—' }}</td>\n <td>{{ a.firedAt | ago }}</td>\n <td>{{ a.acknowledgedBy ?? '—' }}</td>\n </tr>\n } @empty { @if (alerts.first.hasValue()) { <tr><td colspan=\"7\" class=\"jc-muted\">No {{ state() ?? 'firing' }} alerts.</td></tr> } }\n </tbody>\n </table>\n @if (alerts.items().length > 0) {\n <div class=\"jc-more\">\n <span class=\"jc-muted\">{{ alerts.items().length }} {{ state() ?? 'firing' }} alert{{ alerts.items().length === 1 ? '' : 's' }}{{ alerts.hasMore() ? ', newest first' : '' }}</span>\n @if (alerts.hasMore()) {\n <button mat-button (click)=\"alerts.more()\" [disabled]=\"alerts.loadingMore()\">{{ alerts.loadingMore() ? 'Loading…' : 'Load more' }}</button>\n }\n @if (alerts.moreError()) { <span class=\"jc-error\">{{ moreError() }}</span> }\n </div>\n }`,\n})\nexport class AlertsPage {\n protected readonly ctx = inject(ContextService);\n private readonly api = inject(ApiService);\n protected readonly states = ['firing', 'pending', 'resolved'];\n readonly state = input<string>();\n protected readonly alerts = cursorList(() => this.state() ?? 'firing', state => ({ state }), q => this.api.alerts(q));\n protected readonly error = computed(() => problemText(this.alerts.first.error()));\n protected readonly moreError = computed(() => problemText(this.alerts.moreError()));\n}\n"],"mappings":";;;;;;;;;AAkDA,IAAa,aAAb,MAAa,WAAU;CACF,MAAM,OAAO,cAAc;CAC7B,MAAM,OAAO,UAAU;CACrB,SAAS;EAAC;EAAU;EAAW;CAAU;CACnD,QAAQ,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CACb,SAAS,iBAAiB,KAAK,MAAK,KAAM,WAAU,WAAU,EAAE,MAAK,KAAK,MAAK,KAAK,IAAI,OAAO,CAAC,CAAC;CACjG,QAAQ,eAAe,YAAY,KAAK,OAAO,MAAM,MAAK,CAAE,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAC9D,YAAY,eAAe,YAAY,KAAK,OAAO,UAAS,CAAE,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAPxE,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAU,MAAA,CAAA;EAA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AAA"}
|
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
import { ApiService, ContextService } from "./juice-js-observability.mjs";
|
|
2
|
+
import { l as ContextBar, t as LogTable, x as apiResource } from "./juice-js-observability-telemetry-D9EYxkdr.mjs";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import { ChangeDetectionStrategy, Component, computed, inject, input } from "@angular/core";
|
|
5
|
+
import { map } from "rxjs";
|
|
6
|
+
import { Router } from "@angular/router";
|
|
7
|
+
import * as i1 from "@angular/forms";
|
|
8
|
+
import { FormsModule } from "@angular/forms";
|
|
9
|
+
import * as i2 from "@angular/material/button";
|
|
10
|
+
import { MatButtonModule } from "@angular/material/button";
|
|
11
|
+
import { MatFormFieldModule } from "@angular/material/form-field";
|
|
12
|
+
import * as i4 from "@angular/material/input";
|
|
13
|
+
import { MatInputModule } from "@angular/material/input";
|
|
14
|
+
import * as i3 from "@angular/material/select";
|
|
15
|
+
import { MatSelectModule } from "@angular/material/select";
|
|
16
|
+
var LogsPage = class LogsPage {
|
|
17
|
+
ctx = inject(ContextService);
|
|
18
|
+
api = inject(ApiService);
|
|
19
|
+
router = inject(Router);
|
|
20
|
+
service = input(...ngDevMode ? [void 0, { debugName: "service" }] : /* istanbul ignore next */ []);
|
|
21
|
+
severity = input(...ngDevMode ? [void 0, { debugName: "severity" }] : /* istanbul ignore next */ []);
|
|
22
|
+
q = input(...ngDevMode ? [void 0, { debugName: "q" }] : /* istanbul ignore next */ []);
|
|
23
|
+
trace = input(...ngDevMode ? [void 0, { debugName: "trace" }] : /* istanbul ignore next */ []);
|
|
24
|
+
spanId = input(...ngDevMode ? [void 0, { debugName: "spanId" }] : /* istanbul ignore next */ []);
|
|
25
|
+
instance = input(...ngDevMode ? [void 0, { debugName: "instance" }] : /* istanbul ignore next */ []);
|
|
26
|
+
resource = input(...ngDevMode ? [void 0, { debugName: "resource" }] : /* istanbul ignore next */ []);
|
|
27
|
+
services = apiResource({ stream: () => this.api.resources("service").pipe(map((p) => p.items)) });
|
|
28
|
+
query = computed(() => ({
|
|
29
|
+
serviceId: this.service(),
|
|
30
|
+
minSeverity: this.severity(),
|
|
31
|
+
q: this.q(),
|
|
32
|
+
traceId: this.trace(),
|
|
33
|
+
spanId: this.spanId(),
|
|
34
|
+
instanceId: this.instance(),
|
|
35
|
+
resourceId: this.resource()
|
|
36
|
+
}), ...ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []);
|
|
37
|
+
apply(value) {
|
|
38
|
+
const queryParams = {};
|
|
39
|
+
for (const [key, v] of Object.entries(value)) queryParams[key] = v === "" || v === void 0 ? null : v;
|
|
40
|
+
this.router.navigate([], {
|
|
41
|
+
queryParams,
|
|
42
|
+
queryParamsHandling: "merge"
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
clear() {
|
|
46
|
+
this.router.navigate([], { queryParams: this.ctx.keep() });
|
|
47
|
+
}
|
|
48
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
49
|
+
minVersion: "12.0.0",
|
|
50
|
+
version: "22.2.4",
|
|
51
|
+
ngImport: i0,
|
|
52
|
+
type: LogsPage,
|
|
53
|
+
deps: [],
|
|
54
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
55
|
+
});
|
|
56
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
57
|
+
minVersion: "17.0.0",
|
|
58
|
+
version: "22.2.4",
|
|
59
|
+
type: LogsPage,
|
|
60
|
+
isStandalone: true,
|
|
61
|
+
selector: "ng-component",
|
|
62
|
+
inputs: {
|
|
63
|
+
service: {
|
|
64
|
+
classPropertyName: "service",
|
|
65
|
+
publicName: "service",
|
|
66
|
+
isSignal: true,
|
|
67
|
+
isRequired: false,
|
|
68
|
+
transformFunction: null
|
|
69
|
+
},
|
|
70
|
+
severity: {
|
|
71
|
+
classPropertyName: "severity",
|
|
72
|
+
publicName: "severity",
|
|
73
|
+
isSignal: true,
|
|
74
|
+
isRequired: false,
|
|
75
|
+
transformFunction: null
|
|
76
|
+
},
|
|
77
|
+
q: {
|
|
78
|
+
classPropertyName: "q",
|
|
79
|
+
publicName: "q",
|
|
80
|
+
isSignal: true,
|
|
81
|
+
isRequired: false,
|
|
82
|
+
transformFunction: null
|
|
83
|
+
},
|
|
84
|
+
trace: {
|
|
85
|
+
classPropertyName: "trace",
|
|
86
|
+
publicName: "trace",
|
|
87
|
+
isSignal: true,
|
|
88
|
+
isRequired: false,
|
|
89
|
+
transformFunction: null
|
|
90
|
+
},
|
|
91
|
+
spanId: {
|
|
92
|
+
classPropertyName: "spanId",
|
|
93
|
+
publicName: "spanId",
|
|
94
|
+
isSignal: true,
|
|
95
|
+
isRequired: false,
|
|
96
|
+
transformFunction: null
|
|
97
|
+
},
|
|
98
|
+
instance: {
|
|
99
|
+
classPropertyName: "instance",
|
|
100
|
+
publicName: "instance",
|
|
101
|
+
isSignal: true,
|
|
102
|
+
isRequired: false,
|
|
103
|
+
transformFunction: null
|
|
104
|
+
},
|
|
105
|
+
resource: {
|
|
106
|
+
classPropertyName: "resource",
|
|
107
|
+
publicName: "resource",
|
|
108
|
+
isSignal: true,
|
|
109
|
+
isRequired: false,
|
|
110
|
+
transformFunction: null
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
ngImport: i0,
|
|
114
|
+
template: `
|
|
115
|
+
<jc-context-bar><h1>Logs</h1></jc-context-bar>
|
|
116
|
+
<form class="jc-filter-form" (ngSubmit)="apply(f.value)" #f="ngForm">
|
|
117
|
+
<mat-form-field subscriptSizing="dynamic">
|
|
118
|
+
<mat-label>Service</mat-label>
|
|
119
|
+
<mat-select name="service" [ngModel]="service() ?? ''">
|
|
120
|
+
<mat-option value="">Any</mat-option>
|
|
121
|
+
@for (s of services.value() ?? []; track s.id) { <mat-option [value]="s.id">{{ s.key }}</mat-option> }
|
|
122
|
+
</mat-select>
|
|
123
|
+
</mat-form-field>
|
|
124
|
+
<mat-form-field subscriptSizing="dynamic" class="jc-field-sm">
|
|
125
|
+
<mat-label>Severity at least</mat-label>
|
|
126
|
+
<mat-select name="severity" [ngModel]="severity() ?? ''">
|
|
127
|
+
<mat-option value="">Any</mat-option><mat-option value="5">Debug</mat-option><mat-option value="9">Info</mat-option>
|
|
128
|
+
<mat-option value="13">Warn</mat-option><mat-option value="17">Error</mat-option><mat-option value="21">Fatal</mat-option>
|
|
129
|
+
</mat-select>
|
|
130
|
+
</mat-form-field>
|
|
131
|
+
<mat-form-field subscriptSizing="dynamic" class="jc-field-wide"><mat-label>Message contains</mat-label><input matInput name="q" [ngModel]="q() ?? ''"></mat-form-field>
|
|
132
|
+
<mat-form-field subscriptSizing="dynamic"><mat-label>Trace ID</mat-label><input matInput name="trace" [ngModel]="trace() ?? ''"></mat-form-field>
|
|
133
|
+
<mat-form-field subscriptSizing="dynamic"><mat-label>Span ID</mat-label><input matInput name="spanId" [ngModel]="spanId() ?? ''"></mat-form-field>
|
|
134
|
+
<button mat-flat-button type="submit">Search</button>
|
|
135
|
+
<button mat-button type="button" (click)="clear()">Clear</button>
|
|
136
|
+
</form>
|
|
137
|
+
<jc-log-table [query]="query()" />`,
|
|
138
|
+
isInline: true,
|
|
139
|
+
dependencies: [
|
|
140
|
+
{
|
|
141
|
+
kind: "ngmodule",
|
|
142
|
+
type: FormsModule
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
kind: "directive",
|
|
146
|
+
type: i1.ɵNgNoValidate,
|
|
147
|
+
selector: "form:not([ngNoForm]):not([ngNativeValidate])"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
kind: "directive",
|
|
151
|
+
type: i1.DefaultValueAccessor,
|
|
152
|
+
selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
kind: "directive",
|
|
156
|
+
type: i1.NgControlStatus,
|
|
157
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
kind: "directive",
|
|
161
|
+
type: i1.NgControlStatusGroup,
|
|
162
|
+
selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
kind: "directive",
|
|
166
|
+
type: i1.NgModel,
|
|
167
|
+
selector: "[ngModel]:not([formControlName]):not([formControl])",
|
|
168
|
+
inputs: [
|
|
169
|
+
"name",
|
|
170
|
+
"disabled",
|
|
171
|
+
"ngModel",
|
|
172
|
+
"ngModelOptions"
|
|
173
|
+
],
|
|
174
|
+
outputs: ["ngModelChange"],
|
|
175
|
+
exportAs: ["ngModel"]
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
kind: "directive",
|
|
179
|
+
type: i1.NgForm,
|
|
180
|
+
selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]",
|
|
181
|
+
inputs: ["ngFormOptions"],
|
|
182
|
+
outputs: ["ngSubmit"],
|
|
183
|
+
exportAs: ["ngForm"]
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
kind: "ngmodule",
|
|
187
|
+
type: MatButtonModule
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
kind: "component",
|
|
191
|
+
type: i2.MatButton,
|
|
192
|
+
selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ",
|
|
193
|
+
inputs: ["matButton"],
|
|
194
|
+
exportAs: ["matButton", "matAnchor"]
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
kind: "ngmodule",
|
|
198
|
+
type: MatFormFieldModule
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
kind: "component",
|
|
202
|
+
type: i3.MatFormField,
|
|
203
|
+
selector: "mat-form-field",
|
|
204
|
+
inputs: [
|
|
205
|
+
"hideRequiredMarker",
|
|
206
|
+
"color",
|
|
207
|
+
"floatLabel",
|
|
208
|
+
"appearance",
|
|
209
|
+
"subscriptSizing",
|
|
210
|
+
"hintLabel"
|
|
211
|
+
],
|
|
212
|
+
exportAs: ["matFormField"]
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
kind: "directive",
|
|
216
|
+
type: i3.MatLabel,
|
|
217
|
+
selector: "mat-label"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
kind: "ngmodule",
|
|
221
|
+
type: MatInputModule
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
kind: "directive",
|
|
225
|
+
type: i4.MatInput,
|
|
226
|
+
selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",
|
|
227
|
+
inputs: [
|
|
228
|
+
"disabled",
|
|
229
|
+
"id",
|
|
230
|
+
"placeholder",
|
|
231
|
+
"name",
|
|
232
|
+
"required",
|
|
233
|
+
"type",
|
|
234
|
+
"errorStateMatcher",
|
|
235
|
+
"aria-describedby",
|
|
236
|
+
"value",
|
|
237
|
+
"readonly",
|
|
238
|
+
"disabledInteractive"
|
|
239
|
+
],
|
|
240
|
+
exportAs: ["matInput"]
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
kind: "ngmodule",
|
|
244
|
+
type: MatSelectModule
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
kind: "component",
|
|
248
|
+
type: i3.MatSelect,
|
|
249
|
+
selector: "mat-select",
|
|
250
|
+
inputs: [
|
|
251
|
+
"aria-describedby",
|
|
252
|
+
"panelClass",
|
|
253
|
+
"disabled",
|
|
254
|
+
"disableRipple",
|
|
255
|
+
"tabIndex",
|
|
256
|
+
"hideSingleSelectionIndicator",
|
|
257
|
+
"placeholder",
|
|
258
|
+
"required",
|
|
259
|
+
"multiple",
|
|
260
|
+
"disableOptionCentering",
|
|
261
|
+
"compareWith",
|
|
262
|
+
"value",
|
|
263
|
+
"aria-label",
|
|
264
|
+
"aria-labelledby",
|
|
265
|
+
"errorStateMatcher",
|
|
266
|
+
"typeaheadDebounceInterval",
|
|
267
|
+
"sortComparator",
|
|
268
|
+
"id",
|
|
269
|
+
"panelWidth",
|
|
270
|
+
"canSelectNullableOptions"
|
|
271
|
+
],
|
|
272
|
+
outputs: [
|
|
273
|
+
"openedChange",
|
|
274
|
+
"opened",
|
|
275
|
+
"closed",
|
|
276
|
+
"selectionChange",
|
|
277
|
+
"valueChange"
|
|
278
|
+
],
|
|
279
|
+
exportAs: ["matSelect"]
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
kind: "component",
|
|
283
|
+
type: i3.MatOption,
|
|
284
|
+
selector: "mat-option",
|
|
285
|
+
inputs: [
|
|
286
|
+
"value",
|
|
287
|
+
"id",
|
|
288
|
+
"disabled"
|
|
289
|
+
],
|
|
290
|
+
outputs: ["onSelectionChange"],
|
|
291
|
+
exportAs: ["matOption"]
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
kind: "component",
|
|
295
|
+
type: ContextBar,
|
|
296
|
+
selector: "jc-context-bar"
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
kind: "component",
|
|
300
|
+
type: LogTable,
|
|
301
|
+
selector: "jc-log-table",
|
|
302
|
+
inputs: ["query", "compact"]
|
|
303
|
+
}
|
|
304
|
+
],
|
|
305
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
306
|
+
});
|
|
307
|
+
};
|
|
308
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
309
|
+
minVersion: "12.0.0",
|
|
310
|
+
version: "22.2.4",
|
|
311
|
+
ngImport: i0,
|
|
312
|
+
type: LogsPage,
|
|
313
|
+
decorators: [{
|
|
314
|
+
type: Component,
|
|
315
|
+
args: [{
|
|
316
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
317
|
+
imports: [
|
|
318
|
+
FormsModule,
|
|
319
|
+
MatButtonModule,
|
|
320
|
+
MatFormFieldModule,
|
|
321
|
+
MatInputModule,
|
|
322
|
+
MatSelectModule,
|
|
323
|
+
ContextBar,
|
|
324
|
+
LogTable
|
|
325
|
+
],
|
|
326
|
+
template: `
|
|
327
|
+
<jc-context-bar><h1>Logs</h1></jc-context-bar>
|
|
328
|
+
<form class="jc-filter-form" (ngSubmit)="apply(f.value)" #f="ngForm">
|
|
329
|
+
<mat-form-field subscriptSizing="dynamic">
|
|
330
|
+
<mat-label>Service</mat-label>
|
|
331
|
+
<mat-select name="service" [ngModel]="service() ?? ''">
|
|
332
|
+
<mat-option value="">Any</mat-option>
|
|
333
|
+
@for (s of services.value() ?? []; track s.id) { <mat-option [value]="s.id">{{ s.key }}</mat-option> }
|
|
334
|
+
</mat-select>
|
|
335
|
+
</mat-form-field>
|
|
336
|
+
<mat-form-field subscriptSizing="dynamic" class="jc-field-sm">
|
|
337
|
+
<mat-label>Severity at least</mat-label>
|
|
338
|
+
<mat-select name="severity" [ngModel]="severity() ?? ''">
|
|
339
|
+
<mat-option value="">Any</mat-option><mat-option value="5">Debug</mat-option><mat-option value="9">Info</mat-option>
|
|
340
|
+
<mat-option value="13">Warn</mat-option><mat-option value="17">Error</mat-option><mat-option value="21">Fatal</mat-option>
|
|
341
|
+
</mat-select>
|
|
342
|
+
</mat-form-field>
|
|
343
|
+
<mat-form-field subscriptSizing="dynamic" class="jc-field-wide"><mat-label>Message contains</mat-label><input matInput name="q" [ngModel]="q() ?? ''"></mat-form-field>
|
|
344
|
+
<mat-form-field subscriptSizing="dynamic"><mat-label>Trace ID</mat-label><input matInput name="trace" [ngModel]="trace() ?? ''"></mat-form-field>
|
|
345
|
+
<mat-form-field subscriptSizing="dynamic"><mat-label>Span ID</mat-label><input matInput name="spanId" [ngModel]="spanId() ?? ''"></mat-form-field>
|
|
346
|
+
<button mat-flat-button type="submit">Search</button>
|
|
347
|
+
<button mat-button type="button" (click)="clear()">Clear</button>
|
|
348
|
+
</form>
|
|
349
|
+
<jc-log-table [query]="query()" />`
|
|
350
|
+
}]
|
|
351
|
+
}],
|
|
352
|
+
propDecorators: {
|
|
353
|
+
service: [{
|
|
354
|
+
type: i0.Input,
|
|
355
|
+
args: [{
|
|
356
|
+
isSignal: true,
|
|
357
|
+
alias: "service",
|
|
358
|
+
required: false
|
|
359
|
+
}]
|
|
360
|
+
}],
|
|
361
|
+
severity: [{
|
|
362
|
+
type: i0.Input,
|
|
363
|
+
args: [{
|
|
364
|
+
isSignal: true,
|
|
365
|
+
alias: "severity",
|
|
366
|
+
required: false
|
|
367
|
+
}]
|
|
368
|
+
}],
|
|
369
|
+
q: [{
|
|
370
|
+
type: i0.Input,
|
|
371
|
+
args: [{
|
|
372
|
+
isSignal: true,
|
|
373
|
+
alias: "q",
|
|
374
|
+
required: false
|
|
375
|
+
}]
|
|
376
|
+
}],
|
|
377
|
+
trace: [{
|
|
378
|
+
type: i0.Input,
|
|
379
|
+
args: [{
|
|
380
|
+
isSignal: true,
|
|
381
|
+
alias: "trace",
|
|
382
|
+
required: false
|
|
383
|
+
}]
|
|
384
|
+
}],
|
|
385
|
+
spanId: [{
|
|
386
|
+
type: i0.Input,
|
|
387
|
+
args: [{
|
|
388
|
+
isSignal: true,
|
|
389
|
+
alias: "spanId",
|
|
390
|
+
required: false
|
|
391
|
+
}]
|
|
392
|
+
}],
|
|
393
|
+
instance: [{
|
|
394
|
+
type: i0.Input,
|
|
395
|
+
args: [{
|
|
396
|
+
isSignal: true,
|
|
397
|
+
alias: "instance",
|
|
398
|
+
required: false
|
|
399
|
+
}]
|
|
400
|
+
}],
|
|
401
|
+
resource: [{
|
|
402
|
+
type: i0.Input,
|
|
403
|
+
args: [{
|
|
404
|
+
isSignal: true,
|
|
405
|
+
alias: "resource",
|
|
406
|
+
required: false
|
|
407
|
+
}]
|
|
408
|
+
}]
|
|
409
|
+
}
|
|
410
|
+
});
|
|
411
|
+
export { LogsPage };
|
|
412
|
+
|
|
413
|
+
//# sourceMappingURL=juice-js-observability-logs.page--j6W1Ej-.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"juice-js-observability-logs.page--j6W1Ej-.mjs","names":[],"sources":["../../../../projects/juice-js/observability/src/lib/pages/logs.page.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';\nimport { apiResource } from '../shared/resource';\nimport { FormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\nimport { Router } from '@angular/router';\nimport { map } from 'rxjs';\nimport { ApiService } from '../core/api.service';\nimport { ContextService } from '../core/context.service';\nimport { ContextBar } from '../shared/ui';\nimport { LogTable } from '../shared/telemetry';\n\n/** Log search (Console requirements §7): by service, severity, text, trace or span; each record links to its trace. */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [FormsModule, MatButtonModule, MatFormFieldModule, MatInputModule, MatSelectModule, ContextBar, LogTable],\n template: `\n <jc-context-bar><h1>Logs</h1></jc-context-bar>\n <form class=\"jc-filter-form\" (ngSubmit)=\"apply(f.value)\" #f=\"ngForm\">\n <mat-form-field subscriptSizing=\"dynamic\">\n <mat-label>Service</mat-label>\n <mat-select name=\"service\" [ngModel]=\"service() ?? ''\">\n <mat-option value=\"\">Any</mat-option>\n @for (s of services.value() ?? []; track s.id) { <mat-option [value]=\"s.id\">{{ s.key }}</mat-option> }\n </mat-select>\n </mat-form-field>\n <mat-form-field subscriptSizing=\"dynamic\" class=\"jc-field-sm\">\n <mat-label>Severity at least</mat-label>\n <mat-select name=\"severity\" [ngModel]=\"severity() ?? ''\">\n <mat-option value=\"\">Any</mat-option><mat-option value=\"5\">Debug</mat-option><mat-option value=\"9\">Info</mat-option>\n <mat-option value=\"13\">Warn</mat-option><mat-option value=\"17\">Error</mat-option><mat-option value=\"21\">Fatal</mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field subscriptSizing=\"dynamic\" class=\"jc-field-wide\"><mat-label>Message contains</mat-label><input matInput name=\"q\" [ngModel]=\"q() ?? ''\"></mat-form-field>\n <mat-form-field subscriptSizing=\"dynamic\"><mat-label>Trace ID</mat-label><input matInput name=\"trace\" [ngModel]=\"trace() ?? ''\"></mat-form-field>\n <mat-form-field subscriptSizing=\"dynamic\"><mat-label>Span ID</mat-label><input matInput name=\"spanId\" [ngModel]=\"spanId() ?? ''\"></mat-form-field>\n <button mat-flat-button type=\"submit\">Search</button>\n <button mat-button type=\"button\" (click)=\"clear()\">Clear</button>\n </form>\n <jc-log-table [query]=\"query()\" />`,\n})\nexport class LogsPage {\n protected readonly ctx = inject(ContextService);\n private readonly api = inject(ApiService);\n private readonly router = inject(Router);\n\n readonly service = input<string>();\n readonly severity = input<string>();\n readonly q = input<string>();\n readonly trace = input<string>();\n readonly spanId = input<string>();\n readonly instance = input<string>();\n readonly resource = input<string>();\n\n protected readonly services = apiResource({ stream: () => this.api.resources('service').pipe(map(p => p.items)) });\n protected readonly query = computed(() => ({\n serviceId: this.service(), minSeverity: this.severity(), q: this.q(), traceId: this.trace(), spanId: this.spanId(),\n instanceId: this.instance(), resourceId: this.resource(),\n }));\n\n apply(value: Record<string, unknown>) {\n const queryParams: Record<string, unknown> = {};\n for (const [key, v] of Object.entries(value)) queryParams[key] = v === '' || v === undefined ? null : v;\n void this.router.navigate([], { queryParams, queryParamsHandling: 'merge' });\n }\n\n clear() { void this.router.navigate([], { queryParams: this.ctx.keep() }); }\n}\n"],"mappings":";;;;;;;;;;;;;;;AA2CA,IAAa,WAAb,MAAa,SAAQ;CACA,MAAM,OAAO,cAAc;CAC7B,MAAM,OAAO,UAAU;CACvB,SAAS,OAAO,MAAM;CAE9B,UAAU,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,C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