@memberjunction/ng-dashboards 6.2.0-edge.2 → 6.2.0-edge.4
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/dist/AI/components/analytics/realtime/realtime-transcripts-data.d.ts +4 -3
- package/dist/AI/components/analytics/realtime/realtime-transcripts-data.d.ts.map +1 -1
- package/dist/AI/components/analytics/realtime/realtime-transcripts-data.js +8 -5
- package/dist/AI/components/analytics/realtime/realtime-transcripts-data.js.map +1 -1
- package/dist/AI/components/duplicates/compare-value.component.d.ts +67 -0
- package/dist/AI/components/duplicates/compare-value.component.d.ts.map +1 -0
- package/dist/AI/components/duplicates/compare-value.component.js +168 -0
- package/dist/AI/components/duplicates/compare-value.component.js.map +1 -0
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.d.ts +49 -3
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.d.ts.map +1 -1
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.js +287 -169
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.js.map +1 -1
- package/dist/AI/components/duplicates/duplicate-detection-run-scope.d.ts +77 -0
- package/dist/AI/components/duplicates/duplicate-detection-run-scope.d.ts.map +1 -0
- package/dist/AI/components/duplicates/duplicate-detection-run-scope.js +116 -0
- package/dist/AI/components/duplicates/duplicate-detection-run-scope.js.map +1 -0
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.d.ts +1 -0
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.d.ts.map +1 -1
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js +16 -4
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js.map +1 -1
- package/dist/AI/components/tags/tags-resource.component.d.ts +2 -0
- package/dist/AI/components/tags/tags-resource.component.d.ts.map +1 -1
- package/dist/AI/components/tags/tags-resource.component.js +12 -6
- package/dist/AI/components/tags/tags-resource.component.js.map +1 -1
- package/dist/AI/components/vectors/vector-index-auto.d.ts +29 -0
- package/dist/AI/components/vectors/vector-index-auto.d.ts.map +1 -0
- package/dist/AI/components/vectors/vector-index-auto.js +59 -0
- package/dist/AI/components/vectors/vector-index-auto.js.map +1 -0
- package/dist/AI/components/vectors/vector-management-resource.component.d.ts +9 -0
- package/dist/AI/components/vectors/vector-management-resource.component.d.ts.map +1 -1
- package/dist/AI/components/vectors/vector-management-resource.component.js +65 -20
- package/dist/AI/components/vectors/vector-management-resource.component.js.map +1 -1
- package/dist/Actions/components/actions-overview.component.d.ts.map +1 -1
- package/dist/Actions/components/actions-overview.component.js +7 -3
- package/dist/Actions/components/actions-overview.component.js.map +1 -1
- package/dist/Actions/components/categories-list-view.component.d.ts.map +1 -1
- package/dist/Actions/components/categories-list-view.component.js +3 -2
- package/dist/Actions/components/categories-list-view.component.js.map +1 -1
- package/dist/ComponentStudio/component-studio-dashboard.component.d.ts.map +1 -1
- package/dist/ComponentStudio/component-studio-dashboard.component.js +1 -0
- package/dist/ComponentStudio/component-studio-dashboard.component.js.map +1 -1
- package/dist/ComponentStudio/components/ai-assistant/ai-assistant-panel.component.d.ts +0 -3
- package/dist/ComponentStudio/components/ai-assistant/ai-assistant-panel.component.d.ts.map +1 -1
- package/dist/ComponentStudio/components/ai-assistant/ai-assistant-panel.component.js +5 -14
- package/dist/ComponentStudio/components/ai-assistant/ai-assistant-panel.component.js.map +1 -1
- package/dist/ComponentStudio/components/artifact-load-dialog.component.d.ts.map +1 -1
- package/dist/ComponentStudio/components/artifact-load-dialog.component.js +1 -0
- package/dist/ComponentStudio/components/artifact-load-dialog.component.js.map +1 -1
- package/dist/ComponentStudio/components/artifact-selection-dialog.component.d.ts.map +1 -1
- package/dist/ComponentStudio/components/artifact-selection-dialog.component.js +1 -0
- package/dist/ComponentStudio/components/artifact-selection-dialog.component.js.map +1 -1
- package/dist/ComponentStudio/components/form-override-dialog.component.d.ts +12 -1
- package/dist/ComponentStudio/components/form-override-dialog.component.d.ts.map +1 -1
- package/dist/ComponentStudio/components/form-override-dialog.component.js +128 -81
- package/dist/ComponentStudio/components/form-override-dialog.component.js.map +1 -1
- package/dist/Credentials/components/credentials-list-resource.component.d.ts +2 -0
- package/dist/Credentials/components/credentials-list-resource.component.d.ts.map +1 -1
- package/dist/Credentials/components/credentials-list-resource.component.js +12 -10
- package/dist/Credentials/components/credentials-list-resource.component.js.map +1 -1
- package/dist/DashboardBrowser/dashboard-browser-agent-context.d.ts +14 -43
- package/dist/DashboardBrowser/dashboard-browser-agent-context.d.ts.map +1 -1
- package/dist/DashboardBrowser/dashboard-browser-agent-context.js +6 -29
- package/dist/DashboardBrowser/dashboard-browser-agent-context.js.map +1 -1
- package/dist/DashboardBrowser/dashboard-browser-resource.component.d.ts +174 -321
- package/dist/DashboardBrowser/dashboard-browser-resource.component.d.ts.map +1 -1
- package/dist/DashboardBrowser/dashboard-browser-resource.component.js +522 -1195
- package/dist/DashboardBrowser/dashboard-browser-resource.component.js.map +1 -1
- package/dist/DashboardBrowser/dashboard-library-filter.d.ts +116 -0
- package/dist/DashboardBrowser/dashboard-library-filter.d.ts.map +1 -0
- package/dist/DashboardBrowser/dashboard-library-filter.js +277 -0
- package/dist/DashboardBrowser/dashboard-library-filter.js.map +1 -0
- package/dist/DashboardBrowser/dashboard-share-dialog.component.d.ts +1 -1
- package/dist/DashboardBrowser/dashboard-share-dialog.component.js.map +1 -1
- package/dist/DashboardBrowser/dashboards-agent-tools.d.ts +26 -0
- package/dist/DashboardBrowser/dashboards-agent-tools.d.ts.map +1 -0
- package/dist/DashboardBrowser/dashboards-agent-tools.js +32 -0
- package/dist/DashboardBrowser/dashboards-agent-tools.js.map +1 -0
- package/dist/DashboardBrowser/dashboards-categories-resource.component.d.ts +58 -0
- package/dist/DashboardBrowser/dashboards-categories-resource.component.d.ts.map +1 -0
- package/dist/DashboardBrowser/dashboards-categories-resource.component.js +391 -0
- package/dist/DashboardBrowser/dashboards-categories-resource.component.js.map +1 -0
- package/dist/DashboardBrowser/dashboards-categories.helpers.d.ts +37 -0
- package/dist/DashboardBrowser/dashboards-categories.helpers.d.ts.map +1 -0
- package/dist/DashboardBrowser/dashboards-categories.helpers.js +68 -0
- package/dist/DashboardBrowser/dashboards-categories.helpers.js.map +1 -0
- package/dist/DashboardEditor/dashboard-editor.component.d.ts +295 -0
- package/dist/DashboardEditor/dashboard-editor.component.d.ts.map +1 -0
- package/dist/DashboardEditor/dashboard-editor.component.js +1022 -0
- package/dist/DashboardEditor/dashboard-editor.component.js.map +1 -0
- package/dist/DashboardEditor/dashboard-editor.types.d.ts +23 -0
- package/dist/DashboardEditor/dashboard-editor.types.d.ts.map +1 -0
- package/dist/DashboardEditor/dashboard-editor.types.js +3 -0
- package/dist/DashboardEditor/dashboard-editor.types.js.map +1 -0
- package/dist/DashboardEditor/dashboard-viewer-factory.d.ts +11 -0
- package/dist/DashboardEditor/dashboard-viewer-factory.d.ts.map +1 -0
- package/dist/DashboardEditor/dashboard-viewer-factory.js +17 -0
- package/dist/DashboardEditor/dashboard-viewer-factory.js.map +1 -0
- package/dist/DataExplorer/data-explorer-dashboard.component.d.ts +30 -0
- package/dist/DataExplorer/data-explorer-dashboard.component.d.ts.map +1 -1
- package/dist/DataExplorer/data-explorer-dashboard.component.js +349 -232
- package/dist/DataExplorer/data-explorer-dashboard.component.js.map +1 -1
- package/dist/DataExplorer/services/explorer-state.service.d.ts +1 -1
- package/dist/DataExplorer/services/explorer-state.service.js +2 -5
- package/dist/DataExplorer/services/explorer-state.service.js.map +1 -1
- package/dist/FormBuilder/form-builder-resource.component.d.ts +0 -14
- package/dist/FormBuilder/form-builder-resource.component.d.ts.map +1 -1
- package/dist/FormBuilder/form-builder-resource.component.js +7 -29
- package/dist/FormBuilder/form-builder-resource.component.js.map +1 -1
- package/dist/Home/home-agent-context.d.ts +29 -10
- package/dist/Home/home-agent-context.d.ts.map +1 -1
- package/dist/Home/home-agent-context.js +50 -24
- package/dist/Home/home-agent-context.js.map +1 -1
- package/dist/Home/home-dashboard-switcher.component.d.ts +95 -0
- package/dist/Home/home-dashboard-switcher.component.d.ts.map +1 -0
- package/dist/Home/home-dashboard-switcher.component.js +442 -0
- package/dist/Home/home-dashboard-switcher.component.js.map +1 -0
- package/dist/Home/home-dashboard.component.d.ts +330 -17
- package/dist/Home/home-dashboard.component.d.ts.map +1 -1
- package/dist/Home/home-dashboard.component.js +1702 -1014
- package/dist/Home/home-dashboard.component.js.map +1 -1
- package/dist/Home/home-menus.d.ts +38 -0
- package/dist/Home/home-menus.d.ts.map +1 -0
- package/dist/Home/home-menus.js +53 -0
- package/dist/Home/home-menus.js.map +1 -0
- package/dist/Home/home-pinned-dashboards.d.ts +33 -0
- package/dist/Home/home-pinned-dashboards.d.ts.map +1 -0
- package/dist/Home/home-pinned-dashboards.js +76 -0
- package/dist/Home/home-pinned-dashboards.js.map +1 -0
- package/dist/PredictiveStudio/components/ps-production.component.d.ts +5 -1
- package/dist/PredictiveStudio/components/ps-production.component.d.ts.map +1 -1
- package/dist/PredictiveStudio/components/ps-production.component.js +64 -41
- package/dist/PredictiveStudio/components/ps-production.component.js.map +1 -1
- package/dist/QueryBrowser/query-browser-resource.component.d.ts.map +1 -1
- package/dist/QueryBrowser/query-browser-resource.component.js +3 -2
- package/dist/QueryBrowser/query-browser-resource.component.js.map +1 -1
- package/dist/RealtimeRecordings/realtime-recordings-dashboard.component.js +2 -2
- package/dist/RealtimeRecordings/realtime-recordings-dashboard.component.js.map +1 -1
- package/dist/TelephonyOperations/telephony-operations-agent-context.d.ts +107 -0
- package/dist/TelephonyOperations/telephony-operations-agent-context.d.ts.map +1 -0
- package/dist/TelephonyOperations/telephony-operations-agent-context.js +216 -0
- package/dist/TelephonyOperations/telephony-operations-agent-context.js.map +1 -0
- package/dist/TelephonyOperations/telephony-operations-dashboard.component.d.ts +58 -0
- package/dist/TelephonyOperations/telephony-operations-dashboard.component.d.ts.map +1 -0
- package/dist/TelephonyOperations/telephony-operations-dashboard.component.js +812 -0
- package/dist/TelephonyOperations/telephony-operations-dashboard.component.js.map +1 -0
- package/dist/Testing/components/testing-explorer.component.d.ts.map +1 -1
- package/dist/Testing/components/testing-explorer.component.js +7 -7
- package/dist/Testing/components/testing-explorer.component.js.map +1 -1
- package/dist/WorkQueue/components/work-queue-bindings.component.d.ts +37 -0
- package/dist/WorkQueue/components/work-queue-bindings.component.d.ts.map +1 -0
- package/dist/WorkQueue/components/work-queue-bindings.component.js +210 -0
- package/dist/WorkQueue/components/work-queue-bindings.component.js.map +1 -0
- package/dist/WorkQueue/components/work-queue-dead-letters.component.d.ts +70 -0
- package/dist/WorkQueue/components/work-queue-dead-letters.component.d.ts.map +1 -0
- package/dist/WorkQueue/components/work-queue-dead-letters.component.js +496 -0
- package/dist/WorkQueue/components/work-queue-dead-letters.component.js.map +1 -0
- package/dist/WorkQueue/components/work-queue-discard-dialog.component.d.ts +22 -0
- package/dist/WorkQueue/components/work-queue-discard-dialog.component.d.ts.map +1 -0
- package/dist/WorkQueue/components/work-queue-discard-dialog.component.js +99 -0
- package/dist/WorkQueue/components/work-queue-discard-dialog.component.js.map +1 -0
- package/dist/WorkQueue/components/work-queue-overview.component.d.ts +29 -0
- package/dist/WorkQueue/components/work-queue-overview.component.d.ts.map +1 -0
- package/dist/WorkQueue/components/work-queue-overview.component.js +278 -0
- package/dist/WorkQueue/components/work-queue-overview.component.js.map +1 -0
- package/dist/WorkQueue/components/work-queue-partitions.component.d.ts +59 -0
- package/dist/WorkQueue/components/work-queue-partitions.component.d.ts.map +1 -0
- package/dist/WorkQueue/components/work-queue-partitions.component.js +359 -0
- package/dist/WorkQueue/components/work-queue-partitions.component.js.map +1 -0
- package/dist/WorkQueue/services/work-queue-operator.service.d.ts +22 -0
- package/dist/WorkQueue/services/work-queue-operator.service.d.ts.map +1 -0
- package/dist/WorkQueue/services/work-queue-operator.service.js +44 -0
- package/dist/WorkQueue/services/work-queue-operator.service.js.map +1 -0
- package/dist/WorkQueue/work-queue-agent-context.d.ts +67 -0
- package/dist/WorkQueue/work-queue-agent-context.d.ts.map +1 -0
- package/dist/WorkQueue/work-queue-agent-context.js +119 -0
- package/dist/WorkQueue/work-queue-agent-context.js.map +1 -0
- package/dist/WorkQueue/work-queue-dashboard.component.d.ts +94 -0
- package/dist/WorkQueue/work-queue-dashboard.component.d.ts.map +1 -0
- package/dist/WorkQueue/work-queue-dashboard.component.js +545 -0
- package/dist/WorkQueue/work-queue-dashboard.component.js.map +1 -0
- package/dist/WorkQueue/work-queue-types.d.ts +40 -0
- package/dist/WorkQueue/work-queue-types.d.ts.map +1 -0
- package/dist/WorkQueue/work-queue-types.js +2 -0
- package/dist/WorkQueue/work-queue-types.js.map +1 -0
- package/dist/ai-dashboards.module.d.ts +21 -20
- package/dist/ai-dashboards.module.d.ts.map +1 -1
- package/dist/ai-dashboards.module.js +4 -1
- package/dist/ai-dashboards.module.js.map +1 -1
- package/dist/core-dashboards.module.d.ts +69 -61
- package/dist/core-dashboards.module.d.ts.map +1 -1
- package/dist/core-dashboards.module.js +29 -2
- package/dist/core-dashboards.module.js.map +1 -1
- package/dist/data-explorer-dashboards.module.d.ts +1 -1
- package/dist/data-explorer-dashboards.module.d.ts.map +1 -1
- package/dist/data-explorer-dashboards.module.js +3 -1
- package/dist/data-explorer-dashboards.module.js.map +1 -1
- package/dist/module.d.ts +14 -13
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +7 -0
- package/dist/module.js.map +1 -1
- package/dist/public-api.d.ts +6 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +9 -0
- package/dist/public-api.js.map +1 -1
- package/dist/shared/dashboard-library-changes.d.ts +23 -0
- package/dist/shared/dashboard-library-changes.d.ts.map +1 -0
- package/dist/shared/dashboard-library-changes.js +26 -0
- package/dist/shared/dashboard-library-changes.js.map +1 -0
- package/dist/shared/dashboard-owner-names.d.ts +17 -0
- package/dist/shared/dashboard-owner-names.d.ts.map +1 -0
- package/dist/shared/dashboard-owner-names.js +65 -0
- package/dist/shared/dashboard-owner-names.js.map +1 -0
- package/dist/shared/dashboard-recents.d.ts +34 -0
- package/dist/shared/dashboard-recents.d.ts.map +1 -0
- package/dist/shared/dashboard-recents.js +87 -0
- package/dist/shared/dashboard-recents.js.map +1 -0
- package/dist/shared/dashboards-app-install.d.ts +59 -0
- package/dist/shared/dashboards-app-install.d.ts.map +1 -0
- package/dist/shared/dashboards-app-install.js +97 -0
- package/dist/shared/dashboards-app-install.js.map +1 -0
- package/dist/shared/dashboards-app.helpers.d.ts +42 -0
- package/dist/shared/dashboards-app.helpers.d.ts.map +1 -0
- package/dist/shared/dashboards-app.helpers.js +143 -0
- package/dist/shared/dashboards-app.helpers.js.map +1 -0
- package/dist/work-queue-dashboards.module.d.ts +23 -0
- package/dist/work-queue-dashboards.module.d.ts.map +1 -0
- package/dist/work-queue-dashboards.module.js +92 -0
- package/dist/work-queue-dashboards.module.js.map +1 -0
- package/package.json +73 -66
|
@@ -0,0 +1,545 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
8
|
+
import { BaseDashboard, SharedService } from '@memberjunction/ng-shared';
|
|
9
|
+
import { RegisterClass, UUIDsEqual } from '@memberjunction/global';
|
|
10
|
+
import { CompositeKey } from '@memberjunction/core';
|
|
11
|
+
import { WorkQueueEngineBase } from '@memberjunction/work-queue-base';
|
|
12
|
+
import { Subject } from 'rxjs';
|
|
13
|
+
import { debounceTime } from 'rxjs/operators';
|
|
14
|
+
import { BuildWorkQueueAgentContext, IsValidPartitionCondition, IsValidWorkQueueTab, ResolveSubscription, WORK_QUEUE_PARTITION_CONDITIONS, WORK_QUEUE_TAB_LABELS, WORK_QUEUE_TABS, } from './work-queue-agent-context';
|
|
15
|
+
import { validateEnumParam, validateStringParam } from '../shared/agent-tool-validation';
|
|
16
|
+
import * as i0 from "@angular/core";
|
|
17
|
+
import * as i1 from "./services/work-queue-operator.service";
|
|
18
|
+
import * as i2 from "@memberjunction/ng-ui-components";
|
|
19
|
+
import * as i3 from "./components/work-queue-overview.component";
|
|
20
|
+
import * as i4 from "./components/work-queue-dead-letters.component";
|
|
21
|
+
import * as i5 from "./components/work-queue-partitions.component";
|
|
22
|
+
import * as i6 from "./components/work-queue-bindings.component";
|
|
23
|
+
function WorkQueueDashboardComponent_Conditional_3_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
24
|
+
i0.ɵɵelement(0, "mj-stat-badge", 16);
|
|
25
|
+
} if (rf & 2) {
|
|
26
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
27
|
+
i0.ɵɵproperty("Count", ctx_r0.TotalBlockedKeys);
|
|
28
|
+
} }
|
|
29
|
+
function WorkQueueDashboardComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
30
|
+
i0.ɵɵelement(0, "mj-stat-badge", 13)(1, "mj-stat-badge", 14)(2, "mj-stat-badge", 15);
|
|
31
|
+
i0.ɵɵconditionalCreate(3, WorkQueueDashboardComponent_Conditional_3_Conditional_3_Template, 1, 1, "mj-stat-badge", 16);
|
|
32
|
+
} if (rf & 2) {
|
|
33
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
34
|
+
i0.ɵɵproperty("Count", ctx_r0.TotalPending);
|
|
35
|
+
i0.ɵɵadvance();
|
|
36
|
+
i0.ɵɵproperty("Count", ctx_r0.TotalInFlight)("Variant", ctx_r0.TotalInFlight > 0 ? "running" : "default");
|
|
37
|
+
i0.ɵɵadvance();
|
|
38
|
+
i0.ɵɵproperty("Count", ctx_r0.TotalDeadLettered)("Variant", ctx_r0.TotalDeadLettered > 0 ? "error" : "default");
|
|
39
|
+
i0.ɵɵadvance();
|
|
40
|
+
i0.ɵɵconditional(ctx_r0.TotalBlockedKeys > 0 ? 3 : -1);
|
|
41
|
+
} }
|
|
42
|
+
function WorkQueueDashboardComponent_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
43
|
+
i0.ɵɵelement(0, "mj-alert", 7);
|
|
44
|
+
} if (rf & 2) {
|
|
45
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
46
|
+
i0.ɵɵproperty("Message", ctx_r0.LoadError);
|
|
47
|
+
} }
|
|
48
|
+
function WorkQueueDashboardComponent_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
49
|
+
i0.ɵɵelement(0, "mj-alert", 8);
|
|
50
|
+
} }
|
|
51
|
+
function WorkQueueDashboardComponent_Case_12_Template(rf, ctx) { if (rf & 1) {
|
|
52
|
+
const _r2 = i0.ɵɵgetCurrentView();
|
|
53
|
+
i0.ɵɵelementStart(0, "mj-work-queue-overview", 17);
|
|
54
|
+
i0.ɵɵlistener("SubscriptionSelected", function WorkQueueDashboardComponent_Case_12_Template_mj_work_queue_overview_SubscriptionSelected_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnOverviewSubscriptionSelected($event)); })("OpenRecord", function WorkQueueDashboardComponent_Case_12_Template_mj_work_queue_overview_OpenRecord_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnOpenRecord($event)); });
|
|
55
|
+
i0.ɵɵelementEnd();
|
|
56
|
+
} if (rf & 2) {
|
|
57
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
58
|
+
i0.ɵɵproperty("Rows", ctx_r0.Rows)("IsLoading", ctx_r0.IsLoading)("LastRefreshedAt", ctx_r0.LastRefreshedAt);
|
|
59
|
+
} }
|
|
60
|
+
function WorkQueueDashboardComponent_Case_13_Template(rf, ctx) { if (rf & 1) {
|
|
61
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
62
|
+
i0.ɵɵelementStart(0, "mj-work-queue-dead-letters", 18);
|
|
63
|
+
i0.ɵɵlistener("SelectedSubscriptionChange", function WorkQueueDashboardComponent_Case_13_Template_mj_work_queue_dead_letters_SelectedSubscriptionChange_0_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnSubscriptionChange($event)); })("Changed", function WorkQueueDashboardComponent_Case_13_Template_mj_work_queue_dead_letters_Changed_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnQueueChanged()); })("Loaded", function WorkQueueDashboardComponent_Case_13_Template_mj_work_queue_dead_letters_Loaded_0_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnDeadLettersLoaded($event)); });
|
|
64
|
+
i0.ɵɵelementEnd();
|
|
65
|
+
} if (rf & 2) {
|
|
66
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
67
|
+
i0.ɵɵproperty("Provider", ctx_r0.ProviderToUse)("Subscriptions", ctx_r0.SubscriptionOptions)("SelectedSubscription", ctx_r0.SelectedSubscription)("CanOperate", ctx_r0.CanOperate);
|
|
68
|
+
} }
|
|
69
|
+
function WorkQueueDashboardComponent_Case_14_Template(rf, ctx) { if (rf & 1) {
|
|
70
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
71
|
+
i0.ɵɵelementStart(0, "mj-work-queue-partitions", 19);
|
|
72
|
+
i0.ɵɵlistener("SelectedSubscriptionChange", function WorkQueueDashboardComponent_Case_14_Template_mj_work_queue_partitions_SelectedSubscriptionChange_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnSubscriptionChange($event)); })("ConditionChange", function WorkQueueDashboardComponent_Case_14_Template_mj_work_queue_partitions_ConditionChange_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnConditionChange($event)); })("Changed", function WorkQueueDashboardComponent_Case_14_Template_mj_work_queue_partitions_Changed_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnQueueChanged()); })("Loaded", function WorkQueueDashboardComponent_Case_14_Template_mj_work_queue_partitions_Loaded_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnPartitionsLoaded($event)); });
|
|
73
|
+
i0.ɵɵelementEnd();
|
|
74
|
+
} if (rf & 2) {
|
|
75
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
76
|
+
i0.ɵɵproperty("Provider", ctx_r0.ProviderToUse)("Subscriptions", ctx_r0.SubscriptionOptions)("SelectedSubscription", ctx_r0.SelectedSubscription)("Condition", ctx_r0.PartitionCondition)("CanOperate", ctx_r0.CanOperate);
|
|
77
|
+
} }
|
|
78
|
+
function WorkQueueDashboardComponent_Case_15_Template(rf, ctx) { if (rf & 1) {
|
|
79
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
80
|
+
i0.ɵɵelementStart(0, "mj-work-queue-bindings", 20);
|
|
81
|
+
i0.ɵɵlistener("Loaded", function WorkQueueDashboardComponent_Case_15_Template_mj_work_queue_bindings_Loaded_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnBindingsLoaded($event)); });
|
|
82
|
+
i0.ɵɵelementEnd();
|
|
83
|
+
} if (rf & 2) {
|
|
84
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
85
|
+
i0.ɵɵproperty("Provider", ctx_r0.ProviderToUse)("Transports", ctx_r0.TransportOptions);
|
|
86
|
+
} }
|
|
87
|
+
/** Interval between automatic stats refreshes while the dashboard is visible (spec 09b §refresh). */
|
|
88
|
+
const AUTO_REFRESH_MS = 15_000;
|
|
89
|
+
/**
|
|
90
|
+
* Work Queue operator dashboard (spec 09b): topology + live stats, dead-letter triage, Ordered partition state and
|
|
91
|
+
* binding validation, on top of the seven WorkQueue.* remote operations. The dashboard owns the topology load
|
|
92
|
+
* (WorkQueueEngineBase) and the stats read; each tab owns its own operation calls through WorkQueueOperatorService.
|
|
93
|
+
*
|
|
94
|
+
* 🔒 SAFETY BOUNDARY: the agent tools registered here are read-only and navigational. Replay and discard are
|
|
95
|
+
* mutations that require the operator's explicit confirmation in the UI and are never exposed as tools.
|
|
96
|
+
*/
|
|
97
|
+
let WorkQueueDashboardComponent = class WorkQueueDashboardComponent extends BaseDashboard {
|
|
98
|
+
cdr;
|
|
99
|
+
operator;
|
|
100
|
+
IsLoading = false;
|
|
101
|
+
LoadError = null;
|
|
102
|
+
ActiveTab = 'overview';
|
|
103
|
+
SelectedSubscription = null;
|
|
104
|
+
PartitionCondition = null;
|
|
105
|
+
Rows = [];
|
|
106
|
+
SubscriptionOptions = [];
|
|
107
|
+
TransportOptions = [];
|
|
108
|
+
StatsFailures = [];
|
|
109
|
+
StatsLoaded = false;
|
|
110
|
+
LastRefreshedAt = null;
|
|
111
|
+
/** Update on MJ: Work Queue Subscriptions gates replay/discard (spec 09b §permissions). */
|
|
112
|
+
CanOperate = false;
|
|
113
|
+
DeadLetterCount = null;
|
|
114
|
+
SelectedDeadLetterCount = 0;
|
|
115
|
+
BlockedPartitionCount = null;
|
|
116
|
+
BindingErrorCount = null;
|
|
117
|
+
BindingWarningCount = null;
|
|
118
|
+
isVisible = true;
|
|
119
|
+
autoRefreshHandle = null;
|
|
120
|
+
stateChangeSubject = new Subject();
|
|
121
|
+
lastRegisteredToolTab = null;
|
|
122
|
+
constructor(cdr, operator) {
|
|
123
|
+
super();
|
|
124
|
+
this.cdr = cdr;
|
|
125
|
+
this.operator = operator;
|
|
126
|
+
this.stateChangeSubject.pipe(debounceTime(50)).subscribe((state) => this.UserStateChanged.emit(state));
|
|
127
|
+
}
|
|
128
|
+
// ------------------------------------------------------------------ lifecycle
|
|
129
|
+
async GetResourceDisplayName(_data) {
|
|
130
|
+
return 'Work Queue';
|
|
131
|
+
}
|
|
132
|
+
async GetResourceIconClass(_data) {
|
|
133
|
+
return 'fa-solid fa-layer-group';
|
|
134
|
+
}
|
|
135
|
+
ngAfterViewInit() {
|
|
136
|
+
this.publishAgentContext();
|
|
137
|
+
this.syncAgentToolsForTab();
|
|
138
|
+
this.startAutoRefresh();
|
|
139
|
+
}
|
|
140
|
+
ngOnDestroy() {
|
|
141
|
+
super.ngOnDestroy();
|
|
142
|
+
this.stopAutoRefresh();
|
|
143
|
+
this.stateChangeSubject.complete();
|
|
144
|
+
}
|
|
145
|
+
SetVisible(visible) {
|
|
146
|
+
super.SetVisible(visible);
|
|
147
|
+
this.isVisible = visible;
|
|
148
|
+
if (visible) {
|
|
149
|
+
void this.refreshStats();
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
initDashboard() {
|
|
153
|
+
this.applyQueryParams(this.GetQueryParams());
|
|
154
|
+
this.CanOperate = this.resolveCanOperate();
|
|
155
|
+
}
|
|
156
|
+
async loadData() {
|
|
157
|
+
this.applyUserState();
|
|
158
|
+
this.IsLoading = true;
|
|
159
|
+
this.LoadError = null;
|
|
160
|
+
this.cdr.markForCheck();
|
|
161
|
+
try {
|
|
162
|
+
await WorkQueueEngineBase.Instance.Config(true, undefined, this.ProviderToUse);
|
|
163
|
+
this.buildTopology();
|
|
164
|
+
await this.refreshStats();
|
|
165
|
+
}
|
|
166
|
+
catch (error) {
|
|
167
|
+
this.LoadError = error instanceof Error ? error.message : String(error);
|
|
168
|
+
}
|
|
169
|
+
finally {
|
|
170
|
+
this.IsLoading = false;
|
|
171
|
+
this.publishAgentContext();
|
|
172
|
+
this.cdr.markForCheck();
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
OnQueryParamsChanged(params, _source) {
|
|
176
|
+
this.applyQueryParams(params);
|
|
177
|
+
this.syncAgentToolsForTab();
|
|
178
|
+
this.publishAgentContext();
|
|
179
|
+
}
|
|
180
|
+
// ------------------------------------------------------------------ template API
|
|
181
|
+
get Tabs() {
|
|
182
|
+
const deadLettered = this.StatsLoaded ? this.Rows.reduce((n, r) => n + (r.Stats?.DeadLettered ?? 0), 0) : 0;
|
|
183
|
+
const blocked = this.StatsLoaded ? this.Rows.reduce((n, r) => n + (r.Stats?.BlockedKeys ?? 0), 0) : 0;
|
|
184
|
+
return [
|
|
185
|
+
{ key: 'overview', label: WORK_QUEUE_TAB_LABELS.overview, icon: 'fa-solid fa-gauge-high' },
|
|
186
|
+
{ key: 'dead-letters', label: WORK_QUEUE_TAB_LABELS['dead-letters'], icon: 'fa-solid fa-envelope-open-text', badge: deadLettered > 0 ? deadLettered : null },
|
|
187
|
+
{ key: 'partitions', label: WORK_QUEUE_TAB_LABELS.partitions, icon: 'fa-solid fa-list-ol', badge: blocked > 0 ? blocked : null },
|
|
188
|
+
{ key: 'bindings', label: WORK_QUEUE_TAB_LABELS.bindings, icon: 'fa-solid fa-link', badge: (this.BindingErrorCount ?? 0) > 0 ? this.BindingErrorCount : null },
|
|
189
|
+
];
|
|
190
|
+
}
|
|
191
|
+
get TotalPending() {
|
|
192
|
+
return this.Rows.reduce((n, r) => n + (r.Stats?.Pending ?? 0), 0);
|
|
193
|
+
}
|
|
194
|
+
get TotalInFlight() {
|
|
195
|
+
return this.Rows.reduce((n, r) => n + (r.Stats?.InFlight ?? 0), 0);
|
|
196
|
+
}
|
|
197
|
+
get TotalDeadLettered() {
|
|
198
|
+
return this.Rows.reduce((n, r) => n + (r.Stats?.DeadLettered ?? 0), 0);
|
|
199
|
+
}
|
|
200
|
+
get TotalBlockedKeys() {
|
|
201
|
+
return this.Rows.reduce((n, r) => n + (r.Stats?.BlockedKeys ?? 0), 0);
|
|
202
|
+
}
|
|
203
|
+
OnTabChange(tabId) {
|
|
204
|
+
if (!IsValidWorkQueueTab(tabId) || tabId === this.ActiveTab)
|
|
205
|
+
return;
|
|
206
|
+
this.ActiveTab = tabId;
|
|
207
|
+
setTimeout(() => SharedService.Instance.InvokeManualResize(), 100);
|
|
208
|
+
this.UpdateQueryParams({ section: tabId });
|
|
209
|
+
this.emitStateChange();
|
|
210
|
+
this.syncAgentToolsForTab();
|
|
211
|
+
this.publishAgentContext();
|
|
212
|
+
this.cdr.markForCheck();
|
|
213
|
+
}
|
|
214
|
+
OnSubscriptionChange(name) {
|
|
215
|
+
this.SelectedSubscription = name;
|
|
216
|
+
this.UpdateQueryParams({ subscription: name });
|
|
217
|
+
this.emitStateChange();
|
|
218
|
+
this.publishAgentContext();
|
|
219
|
+
this.cdr.markForCheck();
|
|
220
|
+
}
|
|
221
|
+
OnConditionChange(condition) {
|
|
222
|
+
this.PartitionCondition = condition;
|
|
223
|
+
this.UpdateQueryParams({ condition });
|
|
224
|
+
this.emitStateChange();
|
|
225
|
+
this.publishAgentContext();
|
|
226
|
+
this.cdr.markForCheck();
|
|
227
|
+
}
|
|
228
|
+
/** Overview row click: jump to the dead letters of that subscription. */
|
|
229
|
+
OnOverviewSubscriptionSelected(name) {
|
|
230
|
+
this.SelectedSubscription = name;
|
|
231
|
+
this.ActiveTab = 'dead-letters';
|
|
232
|
+
this.UpdateQueryParams({ section: 'dead-letters', subscription: name });
|
|
233
|
+
this.emitStateChange();
|
|
234
|
+
this.syncAgentToolsForTab();
|
|
235
|
+
this.publishAgentContext();
|
|
236
|
+
this.cdr.markForCheck();
|
|
237
|
+
}
|
|
238
|
+
OnOpenRecord(request) {
|
|
239
|
+
this.navigationService.OpenEntityRecord(request.EntityName, CompositeKey.FromID(request.ID)); // first-pk-ok: the request names an MJ core work-queue entity, all single-column ID keyed
|
|
240
|
+
}
|
|
241
|
+
OnDeadLettersLoaded(event) {
|
|
242
|
+
this.DeadLetterCount = event.Count;
|
|
243
|
+
this.SelectedDeadLetterCount = event.Selected;
|
|
244
|
+
this.publishAgentContext();
|
|
245
|
+
this.cdr.markForCheck();
|
|
246
|
+
}
|
|
247
|
+
OnPartitionsLoaded(event) {
|
|
248
|
+
this.BlockedPartitionCount = event.Blocked;
|
|
249
|
+
this.publishAgentContext();
|
|
250
|
+
this.cdr.markForCheck();
|
|
251
|
+
}
|
|
252
|
+
OnBindingsLoaded(event) {
|
|
253
|
+
this.BindingErrorCount = event.Errors;
|
|
254
|
+
this.BindingWarningCount = event.Warnings;
|
|
255
|
+
this.publishAgentContext();
|
|
256
|
+
this.cdr.markForCheck();
|
|
257
|
+
}
|
|
258
|
+
/** A tab reports that replay/discard changed queue state: re-read stats so badges and totals catch up. */
|
|
259
|
+
OnQueueChanged() {
|
|
260
|
+
void this.refreshStats();
|
|
261
|
+
}
|
|
262
|
+
// ------------------------------------------------------------------ data
|
|
263
|
+
buildTopology() {
|
|
264
|
+
const engine = WorkQueueEngineBase.Instance;
|
|
265
|
+
this.TransportOptions = engine.Transports.map((t) => ({ ID: t.ID, Name: t.Name, DriverClass: t.DriverClass, Status: t.Status }));
|
|
266
|
+
this.Rows = engine.Subscriptions.flatMap((s) => {
|
|
267
|
+
const topic = engine.TopicOf(s);
|
|
268
|
+
const transport = topic ? engine.TransportOf(topic) : undefined;
|
|
269
|
+
if (!topic || !transport)
|
|
270
|
+
return [];
|
|
271
|
+
return [{
|
|
272
|
+
TransportID: transport.ID,
|
|
273
|
+
Transport: transport.Name,
|
|
274
|
+
DriverClass: transport.DriverClass,
|
|
275
|
+
TopicID: topic.ID,
|
|
276
|
+
Topic: topic.Name,
|
|
277
|
+
IsFifo: topic.IsFifo,
|
|
278
|
+
SubscriptionID: s.ID,
|
|
279
|
+
Subscription: s.Name,
|
|
280
|
+
PartitionMode: s.PartitionMode,
|
|
281
|
+
Status: s.Status,
|
|
282
|
+
HostType: s.HostType,
|
|
283
|
+
HandlerKey: s.HandlerKey,
|
|
284
|
+
Stats: null,
|
|
285
|
+
Error: null,
|
|
286
|
+
}];
|
|
287
|
+
});
|
|
288
|
+
this.SubscriptionOptions = this.Rows.map((r) => ({
|
|
289
|
+
ID: r.SubscriptionID, Name: r.Subscription, Topic: r.Topic, Transport: r.Transport, DriverClass: r.DriverClass, PartitionMode: r.PartitionMode, Status: r.Status,
|
|
290
|
+
}));
|
|
291
|
+
}
|
|
292
|
+
async refreshStats() {
|
|
293
|
+
if (this.Rows.length === 0) {
|
|
294
|
+
this.StatsLoaded = true;
|
|
295
|
+
this.LastRefreshedAt = new Date();
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
try {
|
|
299
|
+
const output = await this.operator.GetStats(this.ProviderToUse);
|
|
300
|
+
const byName = new Map(output.subscriptions.map((s) => [s.SubscriptionName, s]));
|
|
301
|
+
const failures = new Map(output.failures.map((f) => [f.subscriptionName, f.error]));
|
|
302
|
+
this.Rows = this.Rows.map((r) => ({ ...r, Stats: byName.get(r.Subscription) ?? r.Stats, Error: failures.get(r.Subscription) ?? null }));
|
|
303
|
+
this.StatsFailures = output.failures.map((f) => `${f.subscriptionName}: ${f.error}`);
|
|
304
|
+
this.StatsLoaded = true;
|
|
305
|
+
this.LastRefreshedAt = new Date();
|
|
306
|
+
this.LoadError = null;
|
|
307
|
+
}
|
|
308
|
+
catch (error) {
|
|
309
|
+
this.LoadError = error instanceof Error ? error.message : String(error);
|
|
310
|
+
}
|
|
311
|
+
this.publishAgentContext();
|
|
312
|
+
this.cdr.markForCheck();
|
|
313
|
+
}
|
|
314
|
+
startAutoRefresh() {
|
|
315
|
+
this.stopAutoRefresh();
|
|
316
|
+
this.autoRefreshHandle = setInterval(() => {
|
|
317
|
+
if (this.isVisible && !this.IsLoading && typeof document !== 'undefined' && !document.hidden) {
|
|
318
|
+
void this.refreshStats();
|
|
319
|
+
}
|
|
320
|
+
}, AUTO_REFRESH_MS);
|
|
321
|
+
}
|
|
322
|
+
stopAutoRefresh() {
|
|
323
|
+
if (this.autoRefreshHandle !== null) {
|
|
324
|
+
clearInterval(this.autoRefreshHandle);
|
|
325
|
+
this.autoRefreshHandle = null;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
resolveCanOperate() {
|
|
329
|
+
const provider = this.ProviderToUse;
|
|
330
|
+
const entity = provider.EntityByName('MJ: Work Queue Subscriptions');
|
|
331
|
+
const user = provider.CurrentUser;
|
|
332
|
+
if (!entity || !user)
|
|
333
|
+
return false;
|
|
334
|
+
return entity.GetUserPermisions(user).CanUpdate;
|
|
335
|
+
}
|
|
336
|
+
// ------------------------------------------------------------------ state
|
|
337
|
+
applyQueryParams(params) {
|
|
338
|
+
const section = params['section'];
|
|
339
|
+
if (IsValidWorkQueueTab(section))
|
|
340
|
+
this.ActiveTab = section;
|
|
341
|
+
if ('subscription' in params)
|
|
342
|
+
this.SelectedSubscription = params['subscription'] || null;
|
|
343
|
+
const condition = params['condition'];
|
|
344
|
+
if (!condition) {
|
|
345
|
+
if ('condition' in params)
|
|
346
|
+
this.PartitionCondition = null;
|
|
347
|
+
}
|
|
348
|
+
else if (IsValidPartitionCondition(condition)) {
|
|
349
|
+
this.PartitionCondition = condition;
|
|
350
|
+
}
|
|
351
|
+
this.cdr.markForCheck();
|
|
352
|
+
}
|
|
353
|
+
applyUserState() {
|
|
354
|
+
const state = this.Config?.userState;
|
|
355
|
+
if (!state)
|
|
356
|
+
return;
|
|
357
|
+
// Deep-link params win over remembered state; only fill what the URL did not set.
|
|
358
|
+
const params = this.GetQueryParams();
|
|
359
|
+
if (!params['section'] && IsValidWorkQueueTab(state.activeTab))
|
|
360
|
+
this.ActiveTab = state.activeTab;
|
|
361
|
+
if (!('subscription' in params) && state.subscription !== undefined)
|
|
362
|
+
this.SelectedSubscription = state.subscription;
|
|
363
|
+
if (!('condition' in params) && (state.condition === null || IsValidPartitionCondition(state.condition)))
|
|
364
|
+
this.PartitionCondition = state.condition ?? null;
|
|
365
|
+
}
|
|
366
|
+
emitStateChange() {
|
|
367
|
+
this.stateChangeSubject.next({ activeTab: this.ActiveTab, subscription: this.SelectedSubscription, condition: this.PartitionCondition });
|
|
368
|
+
}
|
|
369
|
+
// ------------------------------------------------------------------ agent surface
|
|
370
|
+
get subscriptionSnapshots() {
|
|
371
|
+
return this.Rows.map((r) => ({
|
|
372
|
+
ID: r.SubscriptionID,
|
|
373
|
+
Name: r.Subscription,
|
|
374
|
+
Topic: r.Topic,
|
|
375
|
+
Transport: r.Transport,
|
|
376
|
+
PartitionMode: r.PartitionMode,
|
|
377
|
+
Status: r.Status,
|
|
378
|
+
Pending: r.Stats?.Pending ?? null,
|
|
379
|
+
InFlight: r.Stats?.InFlight ?? null,
|
|
380
|
+
DeadLettered: r.Stats?.DeadLettered ?? null,
|
|
381
|
+
BlockedKeys: r.Stats?.BlockedKeys ?? null,
|
|
382
|
+
OldestPendingAgeSeconds: r.Stats?.OldestPendingAgeSeconds ?? null,
|
|
383
|
+
}));
|
|
384
|
+
}
|
|
385
|
+
publishAgentContext() {
|
|
386
|
+
this.navigationService.SetAgentContext(this, BuildWorkQueueAgentContext({
|
|
387
|
+
ActiveTab: this.ActiveTab,
|
|
388
|
+
Subscriptions: this.subscriptionSnapshots,
|
|
389
|
+
StatsFailures: this.StatsFailures,
|
|
390
|
+
StatsLoaded: this.StatsLoaded,
|
|
391
|
+
SelectedSubscription: this.SelectedSubscription,
|
|
392
|
+
PartitionCondition: this.PartitionCondition,
|
|
393
|
+
DeadLetterCount: this.DeadLetterCount,
|
|
394
|
+
SelectedDeadLetterCount: this.SelectedDeadLetterCount,
|
|
395
|
+
BindingErrorCount: this.BindingErrorCount,
|
|
396
|
+
BindingWarningCount: this.BindingWarningCount,
|
|
397
|
+
LastRefreshedAt: this.LastRefreshedAt?.toISOString() ?? null,
|
|
398
|
+
}));
|
|
399
|
+
}
|
|
400
|
+
syncAgentToolsForTab() {
|
|
401
|
+
if (this.lastRegisteredToolTab === this.ActiveTab)
|
|
402
|
+
return;
|
|
403
|
+
this.lastRegisteredToolTab = this.ActiveTab;
|
|
404
|
+
const tools = [...this.buildCommonTools()];
|
|
405
|
+
if (this.ActiveTab === 'partitions')
|
|
406
|
+
tools.push(this.buildFilterPartitionsTool());
|
|
407
|
+
this.navigationService.SetAgentClientTools(this, tools);
|
|
408
|
+
}
|
|
409
|
+
buildCommonTools() {
|
|
410
|
+
return [
|
|
411
|
+
{
|
|
412
|
+
Name: 'SwitchWorkQueueTab',
|
|
413
|
+
Description: `Switch the Work Queue dashboard to a tab. One of: ${WORK_QUEUE_TABS.join(', ')}.`,
|
|
414
|
+
ParameterSchema: { type: 'object', properties: { tab: { type: 'string', enum: [...WORK_QUEUE_TABS] } }, required: ['tab'] },
|
|
415
|
+
Handler: async (params) => {
|
|
416
|
+
const tab = validateEnumParam(params['tab'], WORK_QUEUE_TABS, 'tab');
|
|
417
|
+
if (!tab.ok)
|
|
418
|
+
return tab.result;
|
|
419
|
+
this.OnTabChange(tab.value);
|
|
420
|
+
return { Success: true };
|
|
421
|
+
},
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
Name: 'RefreshWorkQueue',
|
|
425
|
+
Description: 'Reload the topology and re-read the stats of every subscription.',
|
|
426
|
+
ParameterSchema: { type: 'object', properties: {} },
|
|
427
|
+
Handler: async () => {
|
|
428
|
+
await this.Refresh();
|
|
429
|
+
return { Success: true };
|
|
430
|
+
},
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
Name: 'SelectSubscription',
|
|
434
|
+
Description: 'Select a subscription by name or ID; the Dead Letters and Partitions tabs show that subscription.',
|
|
435
|
+
ParameterSchema: { type: 'object', properties: { subscription: { type: 'string' } }, required: ['subscription'] },
|
|
436
|
+
Handler: async (params) => this.selectSubscriptionTool(params['subscription']),
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
Name: 'OpenSubscriptionRecord',
|
|
440
|
+
Description: 'Open the MJ: Work Queue Subscriptions record for a subscription (by name or ID) in a new tab.',
|
|
441
|
+
ParameterSchema: { type: 'object', properties: { subscription: { type: 'string' } }, required: ['subscription'] },
|
|
442
|
+
Handler: async (params) => {
|
|
443
|
+
const resolved = this.resolveSubscriptionParam(params['subscription']);
|
|
444
|
+
if (!resolved.ok)
|
|
445
|
+
return resolved.result;
|
|
446
|
+
this.OnOpenRecord({ EntityName: 'MJ: Work Queue Subscriptions', ID: resolved.value.ID });
|
|
447
|
+
return { Success: true };
|
|
448
|
+
},
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
Name: 'GetSubscriptionStats',
|
|
452
|
+
Description: 'Return the latest stats (pending, in flight, dead-lettered, blocked keys, oldest pending age) for one subscription, or all when omitted.',
|
|
453
|
+
ParameterSchema: { type: 'object', properties: { subscription: { type: 'string' } } },
|
|
454
|
+
Handler: async (params) => {
|
|
455
|
+
if (params['subscription'] === undefined)
|
|
456
|
+
return { Success: true, Stats: this.subscriptionSnapshots };
|
|
457
|
+
const resolved = this.resolveSubscriptionParam(params['subscription']);
|
|
458
|
+
if (!resolved.ok)
|
|
459
|
+
return resolved.result;
|
|
460
|
+
return { Success: true, Stats: this.subscriptionSnapshots.filter((s) => UUIDsEqual(s.ID, resolved.value.ID)) };
|
|
461
|
+
},
|
|
462
|
+
},
|
|
463
|
+
];
|
|
464
|
+
}
|
|
465
|
+
buildFilterPartitionsTool() {
|
|
466
|
+
return {
|
|
467
|
+
Name: 'FilterPartitions',
|
|
468
|
+
Description: `Filter the Partitions tab by condition (${WORK_QUEUE_PARTITION_CONDITIONS.join(', ')}); pass an empty string to clear.`,
|
|
469
|
+
ParameterSchema: { type: 'object', properties: { condition: { type: 'string', enum: ['', ...WORK_QUEUE_PARTITION_CONDITIONS] } }, required: ['condition'] },
|
|
470
|
+
Handler: async (params) => {
|
|
471
|
+
if (params['condition'] === '') {
|
|
472
|
+
this.OnConditionChange(null);
|
|
473
|
+
return { Success: true };
|
|
474
|
+
}
|
|
475
|
+
const condition = validateEnumParam(params['condition'], WORK_QUEUE_PARTITION_CONDITIONS, 'condition');
|
|
476
|
+
if (!condition.ok)
|
|
477
|
+
return condition.result;
|
|
478
|
+
this.OnConditionChange(condition.value);
|
|
479
|
+
return { Success: true };
|
|
480
|
+
},
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
selectSubscriptionTool(raw) {
|
|
484
|
+
const resolved = this.resolveSubscriptionParam(raw);
|
|
485
|
+
if (!resolved.ok)
|
|
486
|
+
return resolved.result;
|
|
487
|
+
this.OnSubscriptionChange(resolved.value.Name);
|
|
488
|
+
return { Success: true };
|
|
489
|
+
}
|
|
490
|
+
resolveSubscriptionParam(raw) {
|
|
491
|
+
const query = validateStringParam(raw, 'subscription');
|
|
492
|
+
if (!query.ok)
|
|
493
|
+
return query;
|
|
494
|
+
const resolution = ResolveSubscription(this.SubscriptionOptions, query.value);
|
|
495
|
+
switch (resolution.Kind) {
|
|
496
|
+
case 'Match':
|
|
497
|
+
return { ok: true, value: resolution.Item };
|
|
498
|
+
case 'Ambiguous':
|
|
499
|
+
return { ok: false, result: { Success: false, ErrorMessage: `"${query.value}" matches several subscriptions: ${resolution.Matches.map((m) => m.Name).join(', ')}.` } };
|
|
500
|
+
default:
|
|
501
|
+
return { ok: false, result: { Success: false, ErrorMessage: `No subscription matches "${query.value}".` } };
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
static ɵfac = function WorkQueueDashboardComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || WorkQueueDashboardComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1.WorkQueueOperatorService)); };
|
|
505
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WorkQueueDashboardComponent, selectors: [["mj-work-queue-dashboard"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 16, vars: 7, consts: [["Title", "Work Queue", "Icon", "fa-solid fa-layer-group", "Subtitle", "Topics, subscriptions and the deliveries moving through them"], ["meta", ""], ["actions", ""], [3, "Clicked", "Loading"], ["toolbar", ""], [3, "TabChange", "Tabs", "ActiveKey"], [1, "work-queue-body"], ["Variant", "error", "Title", "Work queue data could not be loaded", 3, "Message"], ["Variant", "info", "Size", "sm", "Message", "Replay and discard are disabled: your roles do not grant Update on MJ: Work Queue Subscriptions."], [3, "Rows", "IsLoading", "LastRefreshedAt"], [3, "Provider", "Subscriptions", "SelectedSubscription", "CanOperate"], [3, "Provider", "Subscriptions", "SelectedSubscription", "Condition", "CanOperate"], [3, "Provider", "Transports"], ["Icon", "fa-solid fa-hourglass-half", "Label", "pending", 3, "Count"], ["Icon", "fa-solid fa-bolt", "Label", "in flight", 3, "Count", "Variant"], ["Icon", "fa-solid fa-envelope-open-text", "Label", "dead-lettered", 3, "Count", "Variant"], ["Icon", "fa-solid fa-lock", "Label", "blocked keys", "Variant", "warning", 3, "Count"], [3, "SubscriptionSelected", "OpenRecord", "Rows", "IsLoading", "LastRefreshedAt"], [3, "SelectedSubscriptionChange", "Changed", "Loaded", "Provider", "Subscriptions", "SelectedSubscription", "CanOperate"], [3, "SelectedSubscriptionChange", "ConditionChange", "Changed", "Loaded", "Provider", "Subscriptions", "SelectedSubscription", "Condition", "CanOperate"], [3, "Loaded", "Provider", "Transports"]], template: function WorkQueueDashboardComponent_Template(rf, ctx) { if (rf & 1) {
|
|
506
|
+
i0.ɵɵelementStart(0, "mj-page-layout")(1, "mj-page-header", 0)(2, "div", 1);
|
|
507
|
+
i0.ɵɵconditionalCreate(3, WorkQueueDashboardComponent_Conditional_3_Template, 4, 6);
|
|
508
|
+
i0.ɵɵelementEnd();
|
|
509
|
+
i0.ɵɵelementStart(4, "div", 2)(5, "mj-refresh-button", 3);
|
|
510
|
+
i0.ɵɵlistener("Clicked", function WorkQueueDashboardComponent_Template_mj_refresh_button_Clicked_5_listener() { return ctx.Refresh(); });
|
|
511
|
+
i0.ɵɵelementEnd()();
|
|
512
|
+
i0.ɵɵelementStart(6, "div", 4)(7, "mj-tab-nav", 5);
|
|
513
|
+
i0.ɵɵlistener("TabChange", function WorkQueueDashboardComponent_Template_mj_tab_nav_TabChange_7_listener($event) { return ctx.OnTabChange($event); });
|
|
514
|
+
i0.ɵɵelementEnd()()();
|
|
515
|
+
i0.ɵɵelementStart(8, "mj-page-body")(9, "div", 6);
|
|
516
|
+
i0.ɵɵconditionalCreate(10, WorkQueueDashboardComponent_Conditional_10_Template, 1, 1, "mj-alert", 7);
|
|
517
|
+
i0.ɵɵconditionalCreate(11, WorkQueueDashboardComponent_Conditional_11_Template, 1, 0, "mj-alert", 8);
|
|
518
|
+
i0.ɵɵconditionalCreate(12, WorkQueueDashboardComponent_Case_12_Template, 1, 3, "mj-work-queue-overview", 9)(13, WorkQueueDashboardComponent_Case_13_Template, 1, 4, "mj-work-queue-dead-letters", 10)(14, WorkQueueDashboardComponent_Case_14_Template, 1, 5, "mj-work-queue-partitions", 11)(15, WorkQueueDashboardComponent_Case_15_Template, 1, 2, "mj-work-queue-bindings", 12);
|
|
519
|
+
i0.ɵɵelementEnd()()();
|
|
520
|
+
} if (rf & 2) {
|
|
521
|
+
let tmp_6_0;
|
|
522
|
+
i0.ɵɵadvance(3);
|
|
523
|
+
i0.ɵɵconditional(ctx.StatsLoaded ? 3 : -1);
|
|
524
|
+
i0.ɵɵadvance(2);
|
|
525
|
+
i0.ɵɵproperty("Loading", ctx.IsLoading);
|
|
526
|
+
i0.ɵɵadvance(2);
|
|
527
|
+
i0.ɵɵproperty("Tabs", ctx.Tabs)("ActiveKey", ctx.ActiveTab);
|
|
528
|
+
i0.ɵɵadvance(3);
|
|
529
|
+
i0.ɵɵconditional(ctx.LoadError ? 10 : -1);
|
|
530
|
+
i0.ɵɵadvance();
|
|
531
|
+
i0.ɵɵconditional(!ctx.CanOperate && ctx.ActiveTab !== "overview" && ctx.ActiveTab !== "bindings" ? 11 : -1);
|
|
532
|
+
i0.ɵɵadvance();
|
|
533
|
+
i0.ɵɵconditional((tmp_6_0 = ctx.ActiveTab) === "overview" ? 12 : tmp_6_0 === "dead-letters" ? 13 : tmp_6_0 === "partitions" ? 14 : tmp_6_0 === "bindings" ? 15 : -1);
|
|
534
|
+
} }, dependencies: [i2.MJAlertComponent, i2.MJPageBodyComponent, i2.MJPageHeaderComponent, i2.MJPageLayoutComponent, i2.MJRefreshButtonComponent, i2.MJStatBadgeComponent, i2.MJTabNavComponent, i3.WorkQueueOverviewComponent, i4.WorkQueueDeadLettersComponent, i5.WorkQueuePartitionsComponent, i6.WorkQueueBindingsComponent], styles: ["[_nghost-%COMP%] {\n display: block;\n height: 100%;\n}\n\n.work-queue-body[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 16px;\n padding: 16px;\n background: var(--mj-bg-page);\n min-height: 100%;\n}"], changeDetection: 0 });
|
|
535
|
+
};
|
|
536
|
+
WorkQueueDashboardComponent = __decorate([
|
|
537
|
+
RegisterClass(BaseDashboard, 'WorkQueueDashboard')
|
|
538
|
+
], WorkQueueDashboardComponent);
|
|
539
|
+
export { WorkQueueDashboardComponent };
|
|
540
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WorkQueueDashboardComponent, [{
|
|
541
|
+
type: Component,
|
|
542
|
+
args: [{ standalone: false, selector: 'mj-work-queue-dashboard', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mj-page-layout>\n <mj-page-header Title=\"Work Queue\" Icon=\"fa-solid fa-layer-group\" Subtitle=\"Topics, subscriptions and the deliveries moving through them\">\n <div meta>\n @if (StatsLoaded) {\n <mj-stat-badge Icon=\"fa-solid fa-hourglass-half\" [Count]=\"TotalPending\" Label=\"pending\" />\n <mj-stat-badge Icon=\"fa-solid fa-bolt\" [Count]=\"TotalInFlight\" Label=\"in flight\" [Variant]=\"TotalInFlight > 0 ? 'running' : 'default'\" />\n <mj-stat-badge Icon=\"fa-solid fa-envelope-open-text\" [Count]=\"TotalDeadLettered\" Label=\"dead-lettered\" [Variant]=\"TotalDeadLettered > 0 ? 'error' : 'default'\" />\n @if (TotalBlockedKeys > 0) {\n <mj-stat-badge Icon=\"fa-solid fa-lock\" [Count]=\"TotalBlockedKeys\" Label=\"blocked keys\" Variant=\"warning\" />\n }\n }\n </div>\n\n <div actions>\n <mj-refresh-button [Loading]=\"IsLoading\" (Clicked)=\"Refresh()\"></mj-refresh-button>\n </div>\n\n <div toolbar>\n <mj-tab-nav [Tabs]=\"Tabs\" [ActiveKey]=\"ActiveTab\" (TabChange)=\"OnTabChange($any($event))\"></mj-tab-nav>\n </div>\n </mj-page-header>\n\n <mj-page-body>\n <div class=\"work-queue-body\">\n @if (LoadError) {\n <mj-alert Variant=\"error\" Title=\"Work queue data could not be loaded\" [Message]=\"LoadError\"></mj-alert>\n }\n @if (!CanOperate && ActiveTab !== 'overview' && ActiveTab !== 'bindings') {\n <mj-alert Variant=\"info\" Size=\"sm\" Message=\"Replay and discard are disabled: your roles do not grant Update on MJ: Work Queue Subscriptions.\"></mj-alert>\n }\n @switch (ActiveTab) {\n @case ('overview') {\n <mj-work-queue-overview [Rows]=\"Rows\" [IsLoading]=\"IsLoading\" [LastRefreshedAt]=\"LastRefreshedAt\"\n (SubscriptionSelected)=\"OnOverviewSubscriptionSelected($event)\" (OpenRecord)=\"OnOpenRecord($event)\"></mj-work-queue-overview>\n }\n @case ('dead-letters') {\n <mj-work-queue-dead-letters [Provider]=\"ProviderToUse\" [Subscriptions]=\"SubscriptionOptions\" [SelectedSubscription]=\"SelectedSubscription\" [CanOperate]=\"CanOperate\"\n (SelectedSubscriptionChange)=\"OnSubscriptionChange($event)\" (Changed)=\"OnQueueChanged()\" (Loaded)=\"OnDeadLettersLoaded($event)\"></mj-work-queue-dead-letters>\n }\n @case ('partitions') {\n <mj-work-queue-partitions [Provider]=\"ProviderToUse\" [Subscriptions]=\"SubscriptionOptions\" [SelectedSubscription]=\"SelectedSubscription\" [Condition]=\"PartitionCondition\" [CanOperate]=\"CanOperate\"\n (SelectedSubscriptionChange)=\"OnSubscriptionChange($event)\" (ConditionChange)=\"OnConditionChange($event)\" (Changed)=\"OnQueueChanged()\" (Loaded)=\"OnPartitionsLoaded($event)\"></mj-work-queue-partitions>\n }\n @case ('bindings') {\n <mj-work-queue-bindings [Provider]=\"ProviderToUse\" [Transports]=\"TransportOptions\" (Loaded)=\"OnBindingsLoaded($event)\"></mj-work-queue-bindings>\n }\n }\n </div>\n </mj-page-body>\n</mj-page-layout>\n", styles: [":host {\n display: block;\n height: 100%;\n}\n\n.work-queue-body {\n display: flex;\n flex-direction: column;\n gap: 16px;\n padding: 16px;\n background: var(--mj-bg-page);\n min-height: 100%;\n}\n"] }]
|
|
543
|
+
}], () => [{ type: i0.ChangeDetectorRef }, { type: i1.WorkQueueOperatorService }], null); })();
|
|
544
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WorkQueueDashboardComponent, { className: "WorkQueueDashboardComponent", filePath: "src/WorkQueue/work-queue-dashboard.component.ts", lineNumber: 59 }); })();
|
|
545
|
+
//# sourceMappingURL=work-queue-dashboard.component.js.map
|