@meshmakers/octo-meshboard 3.4.1480 → 3.5.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 +244 -1
- package/fesm2022/meshmakers-octo-meshboard.mjs +5106 -200
- package/fesm2022/meshmakers-octo-meshboard.mjs.map +1 -1
- package/package.json +1 -1
- package/types/meshmakers-octo-meshboard.d.ts +2216 -20
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { ProcessWidgetSpecificConfig } from '@meshmakers/octo-process-diagrams';
|
|
2
2
|
import * as _angular_core from '@angular/core';
|
|
3
|
-
import { Signal, AfterViewInit, OnChanges, EventEmitter, SimpleChanges, Type, OnDestroy, OnInit, EnvironmentProviders, InjectionToken } from '@angular/core';
|
|
3
|
+
import { Signal, AfterViewInit, OnChanges, EventEmitter, SimpleChanges, Type, OnDestroy, OnInit, EnvironmentProviders, InjectionToken, Provider } from '@angular/core';
|
|
4
4
|
import { ControlValueAccessor } from '@angular/forms';
|
|
5
5
|
import * as i1 from '@meshmakers/shared-ui';
|
|
6
|
-
import { EntitySelectDialogDataSource, ColumnDefinition, DialogFetchOptions, DialogFetchResult, EntitySelectInputComponent, TimeRange, FetchDataOptions, FetchResultTyped, TableColumn as TableColumn$1, HasUnsavedChanges, TimeRangePickerLabels, TimeRangeSelection as TimeRangeSelection$1 } from '@meshmakers/shared-ui';
|
|
6
|
+
import { EntitySelectDialogDataSource, ColumnDefinition, DialogFetchOptions, DialogFetchResult, EntitySelectInputComponent, TimeRange, FetchDataOptions, FetchResultTyped, TableColumn as TableColumn$1, ListViewMessages, HasUnsavedChanges, TimeRangePickerLabels, TimeRangeSelection as TimeRangeSelection$1 } from '@meshmakers/shared-ui';
|
|
7
7
|
import { Observable, Subject } from 'rxjs';
|
|
8
8
|
import { EntitySelectDataSource, EntitySelectResult } from '@meshmakers/shared-services';
|
|
9
9
|
import * as Types from '@meshmakers/octo-services';
|
|
10
|
-
import { CkTypeSelectorItem, RuntimeEntityItem, RuntimeEntitySelectDataSource, RuntimeEntityDialogDataSource, SortDto, FieldFilterDto, QueryModeDto, ResolveSeriesQueryInputDto, CkRollupFunctionDto, SeriesResolutionSignalDto, AttributeItem, TenantIdProvider } from '@meshmakers/octo-services';
|
|
10
|
+
import { CkTypeSelectorItem, RuntimeEntityItem, RuntimeEntitySelectDataSource, RuntimeEntityDialogDataSource, SortDto, FieldFilterDto, QueryModeDto, ResolveSeriesQueryInputDto, CkRollupFunctionDto, SeriesResolutionSignalDto, AttributeItem, TenantIdProvider, TenantFeaturesStatus, HealthCheck } from '@meshmakers/octo-services';
|
|
11
11
|
export { RuntimeEntityDialogDataSource, RuntimeEntityItem, RuntimeEntitySelectDataSource, TENANT_ID_PROVIDER, TenantIdProvider } from '@meshmakers/octo-services';
|
|
12
12
|
import * as Apollo from 'apollo-angular';
|
|
13
13
|
import { CkTypeSelectorInputComponent, AttributeValueTypeDto, FieldFilterItem, FilterVariable, PropertyGridItem, PropertyGridConfig, OctoGraphQlDataSource, FieldFilterEditorComponent } from '@meshmakers/octo-ui';
|
|
14
14
|
import * as _meshmakers_octo_meshboard from '@meshmakers/octo-meshboard';
|
|
15
15
|
import * as _progress_kendo_svg_icons from '@progress/kendo-svg-icons';
|
|
16
16
|
import { SVGIcon } from '@progress/kendo-svg-icons';
|
|
17
|
+
import * as ngx_markdown from 'ngx-markdown';
|
|
17
18
|
import { TileLayoutReorderEvent, TileLayoutResizeEvent } from '@progress/kendo-angular-layout';
|
|
18
19
|
|
|
19
20
|
/**
|
|
@@ -417,7 +418,7 @@ type DataSource = RuntimeEntityDataSource | StaticDataSource | PersistentQueryDa
|
|
|
417
418
|
/**
|
|
418
419
|
* Supported widget types
|
|
419
420
|
*/
|
|
420
|
-
type WidgetType = 'entityCard' | 'entityWithAssociations' | 'kpi' | 'table' | 'gauge' | 'pieChart' | 'barChart' | 'lineChart' | 'heatmap' | 'statsGrid' | 'statusIndicator' | 'serviceHealth' | 'process' | 'widgetGroup' | 'markdown' | 'statusList' | 'summaryCard' | 'alertBanner' | 'alertList' | 'aiInsights';
|
|
421
|
+
type WidgetType = 'entityCard' | 'entityWithAssociations' | 'kpi' | 'table' | 'gauge' | 'pieChart' | 'barChart' | 'lineChart' | 'heatmap' | 'statsGrid' | 'statusIndicator' | 'serviceHealth' | 'process' | 'widgetGroup' | 'markdown' | 'statusList' | 'summaryCard' | 'alertBanner' | 'alertList' | 'aiInsights' | CockpitWidgetType | 'recentItems';
|
|
421
422
|
/**
|
|
422
423
|
* Widget placement zone.
|
|
423
424
|
* - 'grid': Rendered inside the Kendo TileLayout grid (default)
|
|
@@ -579,6 +580,12 @@ interface TableColumn {
|
|
|
579
580
|
title: string;
|
|
580
581
|
width?: number;
|
|
581
582
|
dataType?: string;
|
|
583
|
+
/**
|
|
584
|
+
* Display format passed to the list view. For `dataType: 'numeric'` it is an Angular
|
|
585
|
+
* DecimalPipe digits info, e.g. `'1.2-2'` for exactly two decimals; without it the
|
|
586
|
+
* pipe's default (up to three decimals) applies.
|
|
587
|
+
*/
|
|
588
|
+
format?: string;
|
|
582
589
|
statusMapping?: Record<string, TableColumnStatusIconMapping>;
|
|
583
590
|
}
|
|
584
591
|
/**
|
|
@@ -655,7 +662,26 @@ interface PieChartWidgetConfig extends WidgetConfig {
|
|
|
655
662
|
legendPosition?: 'top' | 'bottom' | 'left' | 'right';
|
|
656
663
|
/** Field filters for data source */
|
|
657
664
|
filters?: WidgetFilterConfig[];
|
|
665
|
+
/**
|
|
666
|
+
* Colour per category (AB#5622), keyed by the raw category value (`PAID`; case-insensitive) or
|
|
667
|
+
* its displayed label. Value: a hex / CSS colour, a custom property (`--brand-paid`,
|
|
668
|
+
* `var(--brand-paid, #2fb37a)`) or a status name (`success`, `warning`, `error`, `info`).
|
|
669
|
+
* Categories without an entry keep the default (status colour, else the theme palette).
|
|
670
|
+
*/
|
|
671
|
+
categoryColors?: Record<string, string>;
|
|
672
|
+
/**
|
|
673
|
+
* Where slice labels sit while `showLabels` is on (AB#5622): `outside` (with connector lines),
|
|
674
|
+
* `inside` or `none` (no labels). Absent = the chart default (outside, unchanged).
|
|
675
|
+
*/
|
|
676
|
+
labelPosition?: PieChartLabelPosition;
|
|
677
|
+
/**
|
|
678
|
+
* Overlap handling (AB#5622): slices smaller than this share of the total (in percent, e.g. `3`)
|
|
679
|
+
* get no label, so small neighbours do not overlap. Absent / 0 = every slice is labelled.
|
|
680
|
+
*/
|
|
681
|
+
hideLabelsBelowPercent?: number;
|
|
658
682
|
}
|
|
683
|
+
/** Slice label position of a pie / donut chart (AB#5622). */
|
|
684
|
+
type PieChartLabelPosition = 'inside' | 'outside' | 'none';
|
|
659
685
|
/**
|
|
660
686
|
* Bar Chart types available
|
|
661
687
|
* - column: Vertical bars (standard column chart)
|
|
@@ -1136,8 +1162,82 @@ interface AiInsightsWidgetConfig extends WidgetConfig {
|
|
|
1136
1162
|
/** Domain context hint (default: energy management) */
|
|
1137
1163
|
domainContext?: string;
|
|
1138
1164
|
}
|
|
1165
|
+
/**
|
|
1166
|
+
* Platform health widgets, formerly hard-wired on the Refinery Studio's Home cockpit (AB#5545).
|
|
1167
|
+
* They read fixed platform data (adapters, pools, CK models, data flows, tenant features) instead
|
|
1168
|
+
* of a configurable data source, gate every check on the viewer's roles and the tenant's CK models
|
|
1169
|
+
* (`COCKPIT_VIEWER_ACCESS`) and are registered with `provideCockpitWidgets()`.
|
|
1170
|
+
*/
|
|
1171
|
+
type CockpitWidgetType = 'attentionList' | 'adapterStatus' | 'ckModelState' | 'pipelineExecutions' | 'tenantCount' | 'blueprintUpdates' | 'servicesHealth' | 'versionInfo';
|
|
1172
|
+
/** The cockpit widget types (e.g. to tell whether a board already shows them). */
|
|
1173
|
+
declare const COCKPIT_WIDGET_TYPES: readonly CockpitWidgetType[];
|
|
1174
|
+
/** True for the cockpit widget types. */
|
|
1175
|
+
declare function isCockpitWidgetType(type: string | null | undefined): type is CockpitWidgetType;
|
|
1176
|
+
/**
|
|
1177
|
+
* "Attention list" — rule-based health findings (ResolveFailed CK models, unregistered pools,
|
|
1178
|
+
* features enabled but not installed, adapters in error / offline, host-provided checks such as
|
|
1179
|
+
* secrets needing re-entry). Each provider runs only when the viewer may open what it links to.
|
|
1180
|
+
*/
|
|
1181
|
+
interface AttentionListWidgetConfig extends WidgetConfig {
|
|
1182
|
+
type: 'attentionList';
|
|
1183
|
+
/** Provider ids to run (`AttentionProvider.id`); empty / undefined = every registered provider. */
|
|
1184
|
+
providerIds?: string[];
|
|
1185
|
+
/** Findings shown before "and N more" (default 6). */
|
|
1186
|
+
maxItems?: number;
|
|
1187
|
+
/** Show "✦ Explain" on findings when the host's assistant is enabled (default true). */
|
|
1188
|
+
showExplain?: boolean;
|
|
1189
|
+
}
|
|
1190
|
+
/** Display options shared by the cockpit KPI widgets. */
|
|
1191
|
+
interface CockpitKpiWidgetOptions {
|
|
1192
|
+
/** Show the secondary line under the value (default true). */
|
|
1193
|
+
showDetail?: boolean;
|
|
1194
|
+
}
|
|
1195
|
+
/** "Adapter status" — adapters online of those expected to run (the shared adapter online rule). */
|
|
1196
|
+
interface AdapterStatusWidgetConfig extends WidgetConfig, CockpitKpiWidgetOptions {
|
|
1197
|
+
type: 'adapterStatus';
|
|
1198
|
+
}
|
|
1199
|
+
/** "CK model state" — CK models available of all, ResolveFailed as error, importing as progress. */
|
|
1200
|
+
interface CkModelStateWidgetConfig extends WidgetConfig, CockpitKpiWidgetOptions {
|
|
1201
|
+
type: 'ckModelState';
|
|
1202
|
+
}
|
|
1203
|
+
/** "Pipeline executions 24 h" — executions of all data flows with failed count and hourly sparkline. */
|
|
1204
|
+
interface PipelineExecutionsWidgetConfig extends WidgetConfig, CockpitKpiWidgetOptions {
|
|
1205
|
+
type: 'pipelineExecutions';
|
|
1206
|
+
/** Show the hourly sparkline (default true). */
|
|
1207
|
+
showSparkline?: boolean;
|
|
1208
|
+
}
|
|
1209
|
+
/** "Tenants" (system cockpit, AB#5558) — child tenants of the current tenant. */
|
|
1210
|
+
interface TenantCountWidgetConfig extends WidgetConfig, CockpitKpiWidgetOptions {
|
|
1211
|
+
type: 'tenantCount';
|
|
1212
|
+
}
|
|
1213
|
+
/** "Blueprint updates" (system cockpit, AB#5558) — installed blueprints with a newer catalog version. */
|
|
1214
|
+
interface BlueprintUpdatesWidgetConfig extends WidgetConfig, CockpitKpiWidgetOptions {
|
|
1215
|
+
type: 'blueprintUpdates';
|
|
1216
|
+
}
|
|
1217
|
+
/** "Services healthy" (system cockpit, AB#5558) — platform services whose health check is Healthy. */
|
|
1218
|
+
interface ServicesHealthWidgetConfig extends WidgetConfig, CockpitKpiWidgetOptions {
|
|
1219
|
+
type: 'servicesHealth';
|
|
1220
|
+
}
|
|
1221
|
+
/** "Version" (system cockpit, AB#5558) — the host application's versions (`COCKPIT_VERSION_SOURCE`). */
|
|
1222
|
+
interface VersionInfoWidgetConfig extends WidgetConfig, CockpitKpiWidgetOptions {
|
|
1223
|
+
type: 'versionInfo';
|
|
1224
|
+
}
|
|
1225
|
+
/** Any cockpit KPI widget. */
|
|
1226
|
+
type CockpitKpiWidgetConfig = AdapterStatusWidgetConfig | CkModelStateWidgetConfig | PipelineExecutionsWidgetConfig | TenantCountWidgetConfig | BlueprintUpdatesWidgetConfig | ServicesHealthWidgetConfig | VersionInfoWidgetConfig;
|
|
1227
|
+
/**
|
|
1228
|
+
* "Recent items" (AB#5558) — the viewer's recently opened pages, entities and boards, from the
|
|
1229
|
+
* host's `COCKPIT_RECENT_ITEMS` source (in the Refinery Studio the same history as the empty
|
|
1230
|
+
* Cmd+K palette). Per user, so the board only stores how many rows to show. Registered by
|
|
1231
|
+
* `provideCockpitWidgets()`, but deliberately NOT a {@link CockpitWidgetType}: it is no health
|
|
1232
|
+
* widget, so a board that only shows recents still gets a host's health fallbacks.
|
|
1233
|
+
*/
|
|
1234
|
+
interface RecentItemsWidgetConfig extends WidgetConfig {
|
|
1235
|
+
type: 'recentItems';
|
|
1236
|
+
/** Rows shown (default 8, 1–20). */
|
|
1237
|
+
maxItems?: number;
|
|
1238
|
+
}
|
|
1139
1239
|
|
|
1140
|
-
type AnyWidgetConfig = EntityCardWidgetConfig | EntityWithAssociationsWidgetConfig | KpiWidgetConfig | TableWidgetConfig | GaugeWidgetConfig | PieChartWidgetConfig | BarChartWidgetConfig | LineChartWidgetConfig | HeatmapWidgetConfig | StatsGridWidgetConfig | StatusIndicatorWidgetConfig | ServiceHealthWidgetConfig | ProcessWidgetConfig | WidgetGroupConfig | MarkdownWidgetConfig | StatusListWidgetConfig | SummaryCardWidgetConfig | AlertBannerWidgetConfig | AlertListWidgetConfig | AiInsightsWidgetConfig;
|
|
1240
|
+
type AnyWidgetConfig = EntityCardWidgetConfig | EntityWithAssociationsWidgetConfig | KpiWidgetConfig | TableWidgetConfig | GaugeWidgetConfig | PieChartWidgetConfig | BarChartWidgetConfig | LineChartWidgetConfig | HeatmapWidgetConfig | StatsGridWidgetConfig | StatusIndicatorWidgetConfig | ServiceHealthWidgetConfig | ProcessWidgetConfig | WidgetGroupConfig | MarkdownWidgetConfig | StatusListWidgetConfig | SummaryCardWidgetConfig | AlertBannerWidgetConfig | AlertListWidgetConfig | AiInsightsWidgetConfig | AttentionListWidgetConfig | AdapterStatusWidgetConfig | CkModelStateWidgetConfig | PipelineExecutionsWidgetConfig | TenantCountWidgetConfig | BlueprintUpdatesWidgetConfig | ServicesHealthWidgetConfig | VersionInfoWidgetConfig | RecentItemsWidgetConfig;
|
|
1141
1241
|
/**
|
|
1142
1242
|
* Supported variable types
|
|
1143
1243
|
*/
|
|
@@ -1352,8 +1452,24 @@ interface MeshBoardConfig {
|
|
|
1352
1452
|
* tab is hidden. Stream-data and runtime widgets refresh identically.
|
|
1353
1453
|
*/
|
|
1354
1454
|
autoRefreshSeconds?: number;
|
|
1455
|
+
/**
|
|
1456
|
+
* Host-app navigation settings. A pinned board is listed in the host's
|
|
1457
|
+
* end-user (Home) navigation; `undefined` means not pinned. Stored
|
|
1458
|
+
* in the encoded description blob like the other settings above.
|
|
1459
|
+
*/
|
|
1460
|
+
navigation?: MeshBoardNavigationConfig;
|
|
1355
1461
|
widgets: AnyWidgetConfig[];
|
|
1356
1462
|
}
|
|
1463
|
+
/**
|
|
1464
|
+
* Navigation settings of a MeshBoard in the host application.
|
|
1465
|
+
* Only `pinned: true` is ever persisted; an unpinned board stores nothing.
|
|
1466
|
+
*/
|
|
1467
|
+
interface MeshBoardNavigationConfig {
|
|
1468
|
+
/** Shown in the host app's end-user navigation. */
|
|
1469
|
+
pinned: boolean;
|
|
1470
|
+
/** Sort position among pinned boards (ascending). Boards without one sort last, by name. */
|
|
1471
|
+
order?: number;
|
|
1472
|
+
}
|
|
1357
1473
|
/** @deprecated Use MeshBoardConfig instead */
|
|
1358
1474
|
type DashboardConfig = MeshBoardConfig;
|
|
1359
1475
|
interface EntityAttribute {
|
|
@@ -1460,6 +1576,188 @@ interface CategoryValueItem {
|
|
|
1460
1576
|
displayValue: string;
|
|
1461
1577
|
}
|
|
1462
1578
|
|
|
1579
|
+
/**
|
|
1580
|
+
* Marker that separates the human-readable MeshBoard description from the
|
|
1581
|
+
* JSON blob the MeshBoard persists alongside it (variables, time filter,
|
|
1582
|
+
* entity selectors, auto-refresh, navigation).
|
|
1583
|
+
*
|
|
1584
|
+
* Format: `<description>\n---MESHBOARD_VARIABLES---\n<json>`
|
|
1585
|
+
*
|
|
1586
|
+
* This is a stop-gap until System.UI/Dashboard gets a first-class config
|
|
1587
|
+
* attribute. The backend may trim leading/trailing whitespace, so the marker
|
|
1588
|
+
* can sit at the very start of the stored string when the description is empty.
|
|
1589
|
+
*/
|
|
1590
|
+
declare const MESHBOARD_DESCRIPTION_MARKER = "---MESHBOARD_VARIABLES---";
|
|
1591
|
+
/** A stored description split into its two halves. */
|
|
1592
|
+
interface EncodedDescription {
|
|
1593
|
+
/** The part a person wrote, without the marker and without trailing newlines. */
|
|
1594
|
+
description: string;
|
|
1595
|
+
/**
|
|
1596
|
+
* The parsed JSON blob, or `null` when the stored string carries no marker
|
|
1597
|
+
* (or the JSON after it is unreadable). A legacy blob that was a bare
|
|
1598
|
+
* variables array is normalised to `{ variables: [...] }`.
|
|
1599
|
+
*/
|
|
1600
|
+
data: Record<string, unknown> | null;
|
|
1601
|
+
}
|
|
1602
|
+
/**
|
|
1603
|
+
* Splits a stored description into the human-readable text and the encoded
|
|
1604
|
+
* JSON data. Never throws: unreadable JSON yields `data: null` and the text
|
|
1605
|
+
* before the marker is still returned.
|
|
1606
|
+
*/
|
|
1607
|
+
declare function splitEncodedDescription(raw: string | null | undefined): EncodedDescription;
|
|
1608
|
+
/**
|
|
1609
|
+
* Joins a description and its data blob back into the stored form. An empty
|
|
1610
|
+
* or `null` blob yields the bare description, so a board without any encoded
|
|
1611
|
+
* settings never carries a dangling marker.
|
|
1612
|
+
*/
|
|
1613
|
+
declare function joinEncodedDescription(description: string, data: Record<string, unknown> | null): string;
|
|
1614
|
+
/**
|
|
1615
|
+
* Reads the navigation settings of a MeshBoard from its stored description.
|
|
1616
|
+
* Returns `undefined` when the board carries none (= not pinned).
|
|
1617
|
+
*/
|
|
1618
|
+
declare function readMeshBoardNavigation(raw: string | null | undefined): MeshBoardNavigationConfig | undefined;
|
|
1619
|
+
/**
|
|
1620
|
+
* Returns the stored description with the navigation settings replaced.
|
|
1621
|
+
* Passing `undefined` (or `{ pinned: false }`) removes the entry so unpinned
|
|
1622
|
+
* boards store nothing. Every other encoded setting is preserved verbatim.
|
|
1623
|
+
*/
|
|
1624
|
+
declare function withMeshBoardNavigation(raw: string | null | undefined, navigation: MeshBoardNavigationConfig | undefined): string;
|
|
1625
|
+
/**
|
|
1626
|
+
* Validates an untyped navigation entry. Only a pinned board is worth storing,
|
|
1627
|
+
* so anything that is not `{ pinned: true }` collapses to `undefined`.
|
|
1628
|
+
*/
|
|
1629
|
+
declare function normalizeNavigation(value: unknown): MeshBoardNavigationConfig | undefined;
|
|
1630
|
+
/**
|
|
1631
|
+
* Sort comparator for pinned boards: explicit `order` first (ascending),
|
|
1632
|
+
* boards without an order afterwards, ties broken by name.
|
|
1633
|
+
*/
|
|
1634
|
+
declare function compareMeshBoardNavigation(a: {
|
|
1635
|
+
name: string;
|
|
1636
|
+
navigation?: MeshBoardNavigationConfig;
|
|
1637
|
+
}, b: {
|
|
1638
|
+
name: string;
|
|
1639
|
+
navigation?: MeshBoardNavigationConfig;
|
|
1640
|
+
}): number;
|
|
1641
|
+
|
|
1642
|
+
/**
|
|
1643
|
+
* Category helpers of the MeshBoard charts (visual check #15 of the Studio rebuild): enum-style
|
|
1644
|
+
* categories such as `RESOLVE_FAILED` read as "Resolve failed", well-known state categories get
|
|
1645
|
+
* status colours (a failed state must never be drawn in the success/accent colour), and a legend
|
|
1646
|
+
* beside a narrow chart moves below it so the plot keeps its size.
|
|
1647
|
+
*/
|
|
1648
|
+
/** `RESOLVE_FAILED` / `ResolveFailed` → `Resolve failed`; other text is returned unchanged. */
|
|
1649
|
+
declare function humanizeCategory(category: string): string;
|
|
1650
|
+
type CategoryStatus = 'success' | 'warning' | 'error' | 'info';
|
|
1651
|
+
/**
|
|
1652
|
+
* THE status table of well-known state names (CK enum option names, query categories), keys
|
|
1653
|
+
* normalised (lower case, no separators). Shared by the MeshBoard charts and the Refinery Studio
|
|
1654
|
+
* Data Explorer enum chips, so a state reads the same everywhere.
|
|
1655
|
+
*/
|
|
1656
|
+
declare const STATE_STATUS_BY_KEY: Readonly<Record<string, CategoryStatus>>;
|
|
1657
|
+
/** Status of a well-known state category (case and separators ignored), else null. */
|
|
1658
|
+
declare function categoryStatus(category: string): CategoryStatus | null;
|
|
1659
|
+
/**
|
|
1660
|
+
* The theme colour of a status for an SVG chart. Charts need a concrete colour, so the host's
|
|
1661
|
+
* `--theme-status-<status>` (Studio Deep Sea tokens), then `--kendo-color-<status>` are read from
|
|
1662
|
+
* the document; a fixed colour is the last resort (and the value in environments without CSS).
|
|
1663
|
+
*/
|
|
1664
|
+
declare function statusColor(status: CategoryStatus, doc?: Document | null): string;
|
|
1665
|
+
/**
|
|
1666
|
+
* Text and line colours of a Kendo chart (AB#5568). Kendo reads its chart theme from the DOM once
|
|
1667
|
+
* per page load, so legend, axis and data labels keep the colours of the theme the page was loaded
|
|
1668
|
+
* with; the widgets therefore pass these resolved tokens explicitly.
|
|
1669
|
+
*/
|
|
1670
|
+
interface ChartThemeColors {
|
|
1671
|
+
/** Legend and data labels. */
|
|
1672
|
+
text: string;
|
|
1673
|
+
/** Axis labels and axis titles. */
|
|
1674
|
+
muted: string;
|
|
1675
|
+
/** Major grid lines. */
|
|
1676
|
+
grid: string;
|
|
1677
|
+
}
|
|
1678
|
+
/** Fixed series colours, the last resort when the host theme defines no chart palette (or no CSS). */
|
|
1679
|
+
declare const FALLBACK_SERIES_COLORS: readonly string[];
|
|
1680
|
+
/**
|
|
1681
|
+
* The categorical chart palette of the current theme (AB#5622): the host's `--theme-chart-1…12`
|
|
1682
|
+
* (Studio tokens), else the Kendo theme's `--kendo-chart-series-1…12`, else
|
|
1683
|
+
* `--kendo-color-series-a…f`, else {@link FALLBACK_SERIES_COLORS}. Values that are empty, still
|
|
1684
|
+
* contain `var()` or are no valid colour are skipped — Kendo resolves its series colours once per
|
|
1685
|
+
* page load, and a token it could not resolve rendered a slice black in dark mode. The charts set
|
|
1686
|
+
* these colours explicitly on every data item, so the palette also follows a live theme switch.
|
|
1687
|
+
*/
|
|
1688
|
+
declare function chartSeriesColors(doc?: Document | null): string[];
|
|
1689
|
+
/**
|
|
1690
|
+
* Resolves a configured colour (per-category colour of a chart, AB#5622): a status name
|
|
1691
|
+
* (`success`, `warning`, `error`, `info` → theme status colour), a custom property (`--brand-paid`
|
|
1692
|
+
* or `var(--brand-paid, #2fb37a)`) read from the document root, or any CSS colour (`#2fb37a`,
|
|
1693
|
+
* `rgb(…)`) used as it is. Returns `undefined` when it cannot be resolved (the default colour applies).
|
|
1694
|
+
*/
|
|
1695
|
+
declare function resolveChartColor(token: string | null | undefined, doc?: Document | null): string | undefined;
|
|
1696
|
+
/**
|
|
1697
|
+
* Calls `onChange` when the colour theme really changed: `<html>` `data-theme`, `class` or
|
|
1698
|
+
* `style` mutated (the Studio ThemeService sets `data-theme`) or the OS colour scheme switched,
|
|
1699
|
+
* **and** the theme signature (`themeSignature`) differs from the last one. Hovering a chart
|
|
1700
|
+
* opens tooltips / popups that mutate `<html>`; reacting to every mutation made the pie redraw
|
|
1701
|
+
* endlessly (AB#5568). Returns the unsubscribe.
|
|
1702
|
+
*/
|
|
1703
|
+
declare function observeThemeChanges(onChange: () => void, doc?: Document | null): () => void;
|
|
1704
|
+
|
|
1705
|
+
/**
|
|
1706
|
+
* `?edit=1` on a MeshBoard URL opens the board in edit mode once it has loaded (e.g. "Edit" in a
|
|
1707
|
+
* host's board list). Pure helpers so the rule is unit-testable without the view.
|
|
1708
|
+
*/
|
|
1709
|
+
/** Query parameter that requests edit mode. */
|
|
1710
|
+
declare const MESHBOARD_EDIT_QUERY_PARAM = "edit";
|
|
1711
|
+
|
|
1712
|
+
/**
|
|
1713
|
+
* How much of its header a MeshBoard view shows (AB#5558). The header is a property of the
|
|
1714
|
+
* host page, not of the board: the same board is shown with its name in UI › MeshBoards and
|
|
1715
|
+
* without it on a host page that already names it (e.g. a Home tab under a greeting).
|
|
1716
|
+
*
|
|
1717
|
+
* - `full` (default): board name, description and the board controls.
|
|
1718
|
+
* - `compact`: no name and no description; the controls (time filter, entity selectors,
|
|
1719
|
+
* refresh, and for editable boards manager / settings / edit / add / save) stay in a slim
|
|
1720
|
+
* row aligned right.
|
|
1721
|
+
* - `none`: no header row at all — for hosts that offer their own controls. Hints (unselected
|
|
1722
|
+
* entity selectors, variable errors) and the "not found" / "not available" help still show.
|
|
1723
|
+
*
|
|
1724
|
+
* Pure helpers so the rule is unit-testable without the view.
|
|
1725
|
+
*/
|
|
1726
|
+
type MeshBoardHeaderMode = 'full' | 'compact' | 'none';
|
|
1727
|
+
/** Route data key a route uses when it loads the view directly (no template to bind the input). */
|
|
1728
|
+
declare const MESHBOARD_HEADER_MODE_ROUTE_DATA = "meshBoardHeaderMode";
|
|
1729
|
+
/** Whether the value is a known header mode. */
|
|
1730
|
+
declare function isMeshBoardHeaderMode(value: unknown): value is MeshBoardHeaderMode;
|
|
1731
|
+
/**
|
|
1732
|
+
* The effective header mode: the bound input wins over the route data; unknown or missing
|
|
1733
|
+
* values fall back to `full`.
|
|
1734
|
+
*/
|
|
1735
|
+
declare function resolveMeshBoardHeaderMode(inputMode: unknown, routeDataMode: unknown): MeshBoardHeaderMode;
|
|
1736
|
+
|
|
1737
|
+
/**
|
|
1738
|
+
* Whether a MeshBoard view draws its own outer frame (AB#5558). Like the header mode this is a
|
|
1739
|
+
* property of the host page: a standalone board page frames the board, a host page that already
|
|
1740
|
+
* provides the surface and the gutter (e.g. a Home tab) embeds it plain.
|
|
1741
|
+
*
|
|
1742
|
+
* - `framed` (default): the view paints its own background, the header bar (background and
|
|
1743
|
+
* bottom border) and the grid padding around the widgets.
|
|
1744
|
+
* - `plain`: no outer background, no header bar background or border and no outer padding — the
|
|
1745
|
+
* widgets sit directly on the host page and align with its gutter. The widget frames (tile
|
|
1746
|
+
* border, background, shadow) and the gap between the widgets stay unchanged.
|
|
1747
|
+
*
|
|
1748
|
+
* Pure helpers so the rule is unit-testable without the view.
|
|
1749
|
+
*/
|
|
1750
|
+
type MeshBoardChrome = 'framed' | 'plain';
|
|
1751
|
+
/** Route data key a route uses when it loads the view directly (no template to bind the input). */
|
|
1752
|
+
declare const MESHBOARD_CHROME_ROUTE_DATA = "meshBoardChrome";
|
|
1753
|
+
/** Whether the value is a known chrome. */
|
|
1754
|
+
declare function isMeshBoardChrome(value: unknown): value is MeshBoardChrome;
|
|
1755
|
+
/**
|
|
1756
|
+
* The effective chrome: the bound input wins over the route data; unknown or missing values
|
|
1757
|
+
* fall back to `framed`.
|
|
1758
|
+
*/
|
|
1759
|
+
declare function resolveMeshBoardChrome(inputChrome: unknown, routeDataChrome: unknown): MeshBoardChrome;
|
|
1760
|
+
|
|
1463
1761
|
type GetSystemPersistentQueriesQueryVariablesDto = Types.Exact<{
|
|
1464
1762
|
after?: Types.InputMaybe<Types.Scalars['String']['input']>;
|
|
1465
1763
|
first?: Types.InputMaybe<Types.Scalars['Int']['input']>;
|
|
@@ -1809,6 +2107,13 @@ declare class MeshBoardPersistenceService {
|
|
|
1809
2107
|
* Renames a MeshBoard (updates name and description)
|
|
1810
2108
|
*/
|
|
1811
2109
|
renameMeshBoard(rtId: string, name: string, description: string): Promise<void>;
|
|
2110
|
+
/**
|
|
2111
|
+
* Pins or unpins a MeshBoard for the host app's end-user navigation.
|
|
2112
|
+
* Only the description is written: the navigation entry lives in the encoded
|
|
2113
|
+
* blob, and every other encoded setting (variables, time filter, …) is kept.
|
|
2114
|
+
* Returns the description as it was stored.
|
|
2115
|
+
*/
|
|
2116
|
+
setMeshBoardPinned(meshBoard: PersistedMeshBoard, pinned: boolean): Promise<string>;
|
|
1812
2117
|
/**
|
|
1813
2118
|
* Encodes variables and timeFilter into the description field.
|
|
1814
2119
|
* Format: <description>\n---MESHBOARD_VARIABLES---\n<json>
|
|
@@ -1837,6 +2142,7 @@ declare class MeshBoardStateService {
|
|
|
1837
2142
|
private readonly ckModelService;
|
|
1838
2143
|
private readonly persistenceService;
|
|
1839
2144
|
private readonly gridService;
|
|
2145
|
+
private readonly tenantIdProvider;
|
|
1840
2146
|
private readonly _meshBoardConfig;
|
|
1841
2147
|
private readonly _persistedMeshBoardId;
|
|
1842
2148
|
/** Stores the rtIds of widgets that exist in the backend */
|
|
@@ -1858,6 +2164,26 @@ declare class MeshBoardStateService {
|
|
|
1858
2164
|
* no dirty state. Cleared on every board switch.
|
|
1859
2165
|
*/
|
|
1860
2166
|
private readonly _widgetVariables;
|
|
2167
|
+
/**
|
|
2168
|
+
* Widgets that reported "nothing for this viewer" (AB#5558, e.g. a cockpit KPI an end user may not
|
|
2169
|
+
* use). Transient, per board load; the view leaves them out outside edit mode.
|
|
2170
|
+
*/
|
|
2171
|
+
private readonly _hiddenForViewer;
|
|
2172
|
+
readonly hiddenForViewer: _angular_core.Signal<ReadonlySet<string>>;
|
|
2173
|
+
/**
|
|
2174
|
+
* Natural content height (px) reported by content-sized widgets (AB#5558: the cockpit attention
|
|
2175
|
+
* and recent-items lists). On the phone tier the view grows their tiles to fit instead of
|
|
2176
|
+
* clipping; other tiers ignore it. Transient, cleared on board switch.
|
|
2177
|
+
*/
|
|
2178
|
+
private readonly _widgetContentHeights;
|
|
2179
|
+
readonly widgetContentHeights: _angular_core.Signal<ReadonlyMap<string, number>>;
|
|
2180
|
+
/**
|
|
2181
|
+
* Tenant the loaded board belongs to (from `TENANT_ID_PROVIDER` at load time; `null` when the host
|
|
2182
|
+
* provides none). The service is a singleton across tenant switches, so a host comparing
|
|
2183
|
+
* well-known names (e.g. the Studio's `cockpit`) must also compare this (AB#5558).
|
|
2184
|
+
*/
|
|
2185
|
+
private readonly _loadedTenantId;
|
|
2186
|
+
readonly loadedTenantId: _angular_core.Signal<string | null>;
|
|
1861
2187
|
readonly meshBoardConfig: _angular_core.Signal<MeshBoardConfig>;
|
|
1862
2188
|
readonly persistedMeshBoardId: _angular_core.Signal<string | null>;
|
|
1863
2189
|
/** @deprecated Use existingWidgetRtIds instead */
|
|
@@ -1993,6 +2319,12 @@ declare class MeshBoardStateService {
|
|
|
1993
2319
|
renameMeshBoard(rtId: string, name: string, description: string): Promise<void>;
|
|
1994
2320
|
/** @deprecated Use renameMeshBoard instead */
|
|
1995
2321
|
renameDashboard(rtId: string, name: string, description: string): Promise<void>;
|
|
2322
|
+
/**
|
|
2323
|
+
* Pins or unpins the specified MeshBoard for the host app's end-user
|
|
2324
|
+
* navigation and refreshes the list. The active board's config follows, so
|
|
2325
|
+
* a later save does not revert the change.
|
|
2326
|
+
*/
|
|
2327
|
+
setMeshBoardPinned(rtId: string, pinned: boolean): Promise<void>;
|
|
1996
2328
|
/**
|
|
1997
2329
|
* Duplicates an existing MeshBoard including all its widgets, variables, and time filter settings.
|
|
1998
2330
|
* Returns the rtId of the newly created MeshBoard.
|
|
@@ -2022,6 +2354,18 @@ declare class MeshBoardStateService {
|
|
|
2022
2354
|
* nothing when name and value are unchanged, so publishing effects cannot loop.
|
|
2023
2355
|
*/
|
|
2024
2356
|
setWidgetVariable(widgetId: string, name: string, value: string): void;
|
|
2357
|
+
private currentTenantId;
|
|
2358
|
+
/**
|
|
2359
|
+
* A content-sized widget reports the natural height of its content in px (`null` removes it).
|
|
2360
|
+
* Must be measured on content whose height does not depend on the tile height, or a growing
|
|
2361
|
+
* tile would grow again. Changes below 1 px are ignored.
|
|
2362
|
+
*/
|
|
2363
|
+
setWidgetContentHeight(widgetId: string, height: number | null): void;
|
|
2364
|
+
/**
|
|
2365
|
+
* A widget reports that it has nothing for the current viewer (`hidden: true`) or has again.
|
|
2366
|
+
* The view collapses such widgets outside edit mode; the flag is cleared on board switch.
|
|
2367
|
+
*/
|
|
2368
|
+
setWidgetHiddenForViewer(widgetId: string, hidden: boolean): void;
|
|
2025
2369
|
/**
|
|
2026
2370
|
* Removes the runtime variable published by a widget (e.g. when it is destroyed).
|
|
2027
2371
|
*/
|
|
@@ -2163,6 +2507,11 @@ declare class MeshBoardStateService {
|
|
|
2163
2507
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MeshBoardStateService, never>;
|
|
2164
2508
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<MeshBoardStateService>;
|
|
2165
2509
|
}
|
|
2510
|
+
/**
|
|
2511
|
+
* Layout defaults of a new, empty MeshBoard (6 columns, 200 px rows, 16 px gap). Shared by
|
|
2512
|
+
* `createNewMeshBoard` and hosts that create boards themselves (e.g. a board list page).
|
|
2513
|
+
*/
|
|
2514
|
+
declare function newMeshBoardConfig(name: string, description?: string): MeshBoardConfig;
|
|
2166
2515
|
|
|
2167
2516
|
/**
|
|
2168
2517
|
* Grouped data item for chart visualization
|
|
@@ -2216,6 +2565,7 @@ declare class MeshBoardDataService {
|
|
|
2216
2565
|
private readonly getEntitiesByCkTypeGQL;
|
|
2217
2566
|
private readonly queryExecutor;
|
|
2218
2567
|
private readonly getAssociationTargetsGQL;
|
|
2568
|
+
private readonly secretSafeNames;
|
|
2219
2569
|
private readonly getCkTypeAttributesGQL;
|
|
2220
2570
|
private readonly apollo;
|
|
2221
2571
|
private readonly stateService;
|
|
@@ -2232,6 +2582,11 @@ declare class MeshBoardDataService {
|
|
|
2232
2582
|
* Fetches a single entity with associations by rtId and ckTypeId (using generic query)
|
|
2233
2583
|
*/
|
|
2234
2584
|
fetchEntityWithAssociations(rtId: string, ckTypeId: string): Observable<RuntimeEntityData | null>;
|
|
2585
|
+
/**
|
|
2586
|
+
* Loads one entity with all NON-secret attributes of its type (record sub-attributes included;
|
|
2587
|
+
* SECRET-safe, AB#5542 — credentials never reach the dashboard).
|
|
2588
|
+
*/
|
|
2589
|
+
private fetchDashboardEntity;
|
|
2235
2590
|
/**
|
|
2236
2591
|
* Maps GraphQL entity response to RuntimeEntityData
|
|
2237
2592
|
*/
|
|
@@ -2736,8 +3091,10 @@ interface SeriesResolutionResult {
|
|
|
2736
3091
|
* Set only on `CoverageLimited`, null otherwise. Passed through as the wire delivers it —
|
|
2737
3092
|
* a `DateTime` scalar arrives as an ISO string unless a scalar parser turns it into a `Date` —
|
|
2738
3093
|
* so read it through `toInstant` / `formatInstant` rather than assuming either shape.
|
|
3094
|
+
* Optional so that code constructing a result (mocks, adapters) written before AB#5157 keeps
|
|
3095
|
+
* compiling; a missing value means the same as `null`.
|
|
2739
3096
|
*/
|
|
2740
|
-
finerRungAvailableFrom
|
|
3097
|
+
finerRungAvailableFrom?: Date | string | null;
|
|
2741
3098
|
}
|
|
2742
3099
|
/**
|
|
2743
3100
|
* Time-range and downsampling arguments for stream-data persistent queries.
|
|
@@ -2845,6 +3202,7 @@ declare class QueryExecutorService {
|
|
|
2845
3202
|
private readonly queryArchiveGql;
|
|
2846
3203
|
private readonly downsampleGql;
|
|
2847
3204
|
private readonly entitiesGql;
|
|
3205
|
+
private readonly secretSafeNames;
|
|
2848
3206
|
/**
|
|
2849
3207
|
* Cache of resolved query families, keyed by query rtId. Filled lazily for
|
|
2850
3208
|
* legacy widget configs that pre-date the `queryFamily` field — saves a
|
|
@@ -2908,6 +3266,12 @@ declare class QueryExecutorService {
|
|
|
2908
3266
|
* simply omitted; the caller falls back to the rtId. Returns a `rtId → label` map.
|
|
2909
3267
|
*/
|
|
2910
3268
|
fetchSeriesLabels(ckTypeId: string, rtIds: string[], labelField: string): Promise<Map<string, string>>;
|
|
3269
|
+
/**
|
|
3270
|
+
* The non-secret attribute names of `ckTypeId` whose canonical form matches `wanted`
|
|
3271
|
+
* (SECRET-safe explicit list, AB#5542). Empty when nothing matches — the caller then falls back
|
|
3272
|
+
* as for a missing attribute.
|
|
3273
|
+
*/
|
|
3274
|
+
private matchingAttributeNames;
|
|
2911
3275
|
/** Cap on the source-entity population read for group-aggregation (AB#4714). A truncated read is
|
|
2912
3276
|
* logged, never silent. */
|
|
2913
3277
|
private static readonly ENTITY_GROUP_FETCH_CAP;
|
|
@@ -3540,6 +3904,7 @@ declare class AssociationsConfigDialogComponent implements OnInit {
|
|
|
3540
3904
|
*/
|
|
3541
3905
|
declare class EntityDetailDialogComponent implements OnInit {
|
|
3542
3906
|
private readonly getDashboardEntityGQL;
|
|
3907
|
+
private readonly secretSafeNames;
|
|
3543
3908
|
rtId: string;
|
|
3544
3909
|
ckTypeId: string;
|
|
3545
3910
|
closed: EventEmitter<void>;
|
|
@@ -3573,6 +3938,7 @@ interface QueryColumn {
|
|
|
3573
3938
|
*/
|
|
3574
3939
|
declare class TableWidgetDataSourceDirective extends OctoGraphQlDataSource<Record<string, unknown>> {
|
|
3575
3940
|
private readonly getEntitiesByCkTypeGQL;
|
|
3941
|
+
private readonly secretSafeNames;
|
|
3576
3942
|
private readonly queryExecutor;
|
|
3577
3943
|
private readonly stateService;
|
|
3578
3944
|
private readonly variableService;
|
|
@@ -3650,6 +4016,12 @@ declare class TableWidgetComponent implements DashboardWidget<TableWidgetConfig,
|
|
|
3650
4016
|
config: TableWidgetConfig;
|
|
3651
4017
|
dataSource?: TableWidgetDataSourceDirective;
|
|
3652
4018
|
private readonly stateService;
|
|
4019
|
+
/** Host texts (`MESHBOARD_MESSAGES`, AB#5622): list texts (empty state, pager, toolbar) and the placeholder. */
|
|
4020
|
+
protected readonly texts: _angular_core.Signal<_meshmakers_octo_meshboard.MeshBoardMessages & Required<Omit<_meshmakers_octo_meshboard.MeshBoardMessages, "tableList">>>;
|
|
4021
|
+
/** Host translation of enum cell values (`MESHBOARD_LABEL_RESOLVER`, AB#5622); absent = raw text. */
|
|
4022
|
+
private readonly labelResolver;
|
|
4023
|
+
/** CK value type per derived column field (persistent queries), for the label resolver. */
|
|
4024
|
+
private readonly _queryColumnValueTypes;
|
|
3653
4025
|
private readonly _isLoading;
|
|
3654
4026
|
private readonly _data;
|
|
3655
4027
|
private readonly _error;
|
|
@@ -3872,6 +4244,7 @@ interface GaugeTypeOption {
|
|
|
3872
4244
|
* Allows selecting data source, gauge type, value attribute, and display options.
|
|
3873
4245
|
*/
|
|
3874
4246
|
declare class GaugeConfigDialogComponent implements OnInit {
|
|
4247
|
+
protected readonly deleteIcon: _progress_kendo_svg_icons.SVGIcon;
|
|
3875
4248
|
private readonly getEntitiesByCkTypeGQL;
|
|
3876
4249
|
private readonly ckTypeSelectorService;
|
|
3877
4250
|
private readonly attributeSelectorService;
|
|
@@ -3994,18 +4367,47 @@ declare class GaugeConfigDialogComponent implements OnInit {
|
|
|
3994
4367
|
interface ChartDataItem {
|
|
3995
4368
|
category: string;
|
|
3996
4369
|
value: number;
|
|
4370
|
+
/**
|
|
4371
|
+
* Slice colour: the configured category colour, else the status colour of a well-known state
|
|
4372
|
+
* category (`RESOLVE_FAILED` → error), else the theme palette colour of its position (AB#5622).
|
|
4373
|
+
*/
|
|
4374
|
+
color?: string;
|
|
3997
4375
|
}
|
|
3998
|
-
|
|
4376
|
+
/** Plot area options of the pie / donut (stable references, AB#5568). */
|
|
4377
|
+
interface PieChartPlotArea {
|
|
4378
|
+
background: string;
|
|
4379
|
+
margin: {
|
|
4380
|
+
top: number;
|
|
4381
|
+
right: number;
|
|
4382
|
+
bottom: number;
|
|
4383
|
+
left: number;
|
|
4384
|
+
};
|
|
4385
|
+
}
|
|
4386
|
+
declare class PieChartWidgetComponent implements DashboardWidget<PieChartWidgetConfig, ChartDataItem[]>, OnInit, OnChanges, AfterViewInit, OnDestroy {
|
|
3999
4387
|
private readonly queryExecutor;
|
|
4388
|
+
private readonly elementRef;
|
|
4389
|
+
private readonly ngZone;
|
|
4390
|
+
private resizeObserver?;
|
|
4391
|
+
/** Measured widget width (0 until measured). */
|
|
4392
|
+
private readonly width;
|
|
4000
4393
|
private static readonly SUPPORTED_ROW_TYPES;
|
|
4001
4394
|
private readonly dataService;
|
|
4002
4395
|
private readonly stateService;
|
|
4003
4396
|
private readonly variableService;
|
|
4397
|
+
/** Host translation of category names (`MESHBOARD_LABEL_RESOLVER`, AB#5622): slices, legend and tooltips. */
|
|
4398
|
+
private readonly labelResolver;
|
|
4004
4399
|
config: PieChartWidgetConfig;
|
|
4005
4400
|
private readonly _isLoading;
|
|
4006
|
-
|
|
4401
|
+
/** Raw categories and values as loaded; labels and status colours are derived in `chartData`. */
|
|
4402
|
+
private readonly _rawData;
|
|
4403
|
+
/**
|
|
4404
|
+
* Text colours of the current theme; changes only on a real theme switch, so status colours,
|
|
4405
|
+
* legend and labels are resolved again then (Kendo keeps the load-time theme otherwise).
|
|
4406
|
+
*/
|
|
4407
|
+
protected readonly chartTheme: _angular_core.Signal<ChartThemeColors>;
|
|
4007
4408
|
private readonly _error;
|
|
4008
4409
|
readonly isLoading: _angular_core.Signal<boolean>;
|
|
4410
|
+
/** Keeps its reference while categories, values and colours are unchanged (AB#5568). */
|
|
4009
4411
|
readonly chartData: _angular_core.Signal<ChartDataItem[]>;
|
|
4010
4412
|
readonly error: _angular_core.Signal<string | null>;
|
|
4011
4413
|
readonly data: _angular_core.Signal<ChartDataItem[]>;
|
|
@@ -4014,21 +4416,50 @@ declare class PieChartWidgetComponent implements DashboardWidget<PieChartWidgetC
|
|
|
4014
4416
|
* This is a method (not computed) to ensure it re-evaluates when config changes via @Input.
|
|
4015
4417
|
*/
|
|
4016
4418
|
isNotConfigured(): boolean;
|
|
4017
|
-
/**
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4419
|
+
/**
|
|
4420
|
+
* Plot area: extra margin so outsideEnd labels are not clipped by the SVG boundary — only while
|
|
4421
|
+
* labels are shown; without labels it would shrink the pie for nothing. Returns one of two
|
|
4422
|
+
* constant objects: a new object per change detection made Kendo redraw (and re-animate) the
|
|
4423
|
+
* chart on every hover (AB#5568).
|
|
4424
|
+
*/
|
|
4425
|
+
plotArea(): PieChartPlotArea;
|
|
4426
|
+
/** Margin of the plot area (see `plotArea`). */
|
|
4427
|
+
plotAreaMargin(): PieChartPlotArea['margin'];
|
|
4428
|
+
/**
|
|
4429
|
+
* A legend beside a narrow widget (cockpit tiles are ~300 px wide) leaves the pie a dot; it moves
|
|
4430
|
+
* below the chart there. Method, not computed: `config` is a plain @Input.
|
|
4431
|
+
*/
|
|
4432
|
+
legendPosition(): 'top' | 'bottom' | 'left' | 'right';
|
|
4433
|
+
ngAfterViewInit(): void;
|
|
4434
|
+
ngOnDestroy(): void;
|
|
4435
|
+
/**
|
|
4436
|
+
* Human label and status colour for a raw category value (exposed for tests). The label is the
|
|
4437
|
+
* host resolver's text (AB#5622), else the humanized category; the colour still follows the raw value.
|
|
4438
|
+
*/
|
|
4439
|
+
toItem(rawCategory: string, value: number, index?: number, palette?: readonly string[]): ChartDataItem;
|
|
4440
|
+
/** The `categoryColors` entry of a category (raw value, case-insensitive, then the label), resolved. */
|
|
4441
|
+
private configuredColor;
|
|
4442
|
+
/** Display name of a raw category: the host label resolver, else `humanizeCategory`. */
|
|
4443
|
+
private categoryLabel;
|
|
4024
4444
|
private readonly _labelSettings;
|
|
4445
|
+
/** Series label options incl. the theme text colour (new object only when either changes). */
|
|
4025
4446
|
readonly labelSettings: _angular_core.Signal<{
|
|
4447
|
+
color: string;
|
|
4026
4448
|
visible: boolean;
|
|
4027
4449
|
content: (e: {
|
|
4028
4450
|
category: string;
|
|
4029
4451
|
value: number;
|
|
4452
|
+
percentage?: number;
|
|
4030
4453
|
}) => string;
|
|
4454
|
+
position?: "insideEnd" | "outsideEnd";
|
|
4031
4455
|
}>;
|
|
4456
|
+
/** Connector lines of outside labels: theme coloured when `labelPosition: 'outside'` is set, else the chart default (AB#5622). */
|
|
4457
|
+
private readonly _explicitOutsideLabels;
|
|
4458
|
+
readonly connectors: _angular_core.Signal<{
|
|
4459
|
+
color: string;
|
|
4460
|
+
width: number;
|
|
4461
|
+
padding: number;
|
|
4462
|
+
} | undefined>;
|
|
4032
4463
|
private updateLabelSettings;
|
|
4033
4464
|
ngOnInit(): void;
|
|
4034
4465
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -4074,6 +4505,12 @@ interface PieChartConfigResult extends WidgetConfigResult {
|
|
|
4074
4505
|
showLabels: boolean;
|
|
4075
4506
|
showLegend: boolean;
|
|
4076
4507
|
legendPosition: 'top' | 'bottom' | 'left' | 'right';
|
|
4508
|
+
/** Colour per category (AB#5622); absent = default colours. */
|
|
4509
|
+
categoryColors?: Record<string, string>;
|
|
4510
|
+
/** Slice label position (AB#5622); absent = chart default. */
|
|
4511
|
+
labelPosition?: PieChartLabelPosition;
|
|
4512
|
+
/** Hide labels of slices below this share in percent (AB#5622); absent = all labelled. */
|
|
4513
|
+
hideLabelsBelowPercent?: number;
|
|
4077
4514
|
filters?: FieldFilterDto[];
|
|
4078
4515
|
}
|
|
4079
4516
|
/**
|
|
@@ -4100,6 +4537,22 @@ declare class PieChartConfigDialogComponent implements OnInit, AfterViewInit {
|
|
|
4100
4537
|
initialCkQueryTarget?: CkQueryTarget;
|
|
4101
4538
|
initialCkGroupBy?: string;
|
|
4102
4539
|
initialFilters?: WidgetFilterConfig[];
|
|
4540
|
+
initialCategoryColors?: Record<string, string>;
|
|
4541
|
+
initialLabelPosition?: PieChartLabelPosition;
|
|
4542
|
+
initialHideLabelsBelowPercent?: number;
|
|
4543
|
+
protected readonly addIcon: _progress_kendo_svg_icons.SVGIcon;
|
|
4544
|
+
protected readonly removeIcon: _progress_kendo_svg_icons.SVGIcon;
|
|
4545
|
+
/** Rows of the category colour editor (AB#5622). */
|
|
4546
|
+
categoryColorRows: {
|
|
4547
|
+
id: number;
|
|
4548
|
+
category: string;
|
|
4549
|
+
color: string;
|
|
4550
|
+
}[];
|
|
4551
|
+
private nextCategoryColorId;
|
|
4552
|
+
labelPositions: {
|
|
4553
|
+
value: PieChartLabelPosition | undefined;
|
|
4554
|
+
label: string;
|
|
4555
|
+
}[];
|
|
4103
4556
|
protected readonly searchIcon: _progress_kendo_svg_icons.SVGIcon;
|
|
4104
4557
|
protected readonly chartPieIcon: _progress_kendo_svg_icons.SVGIcon;
|
|
4105
4558
|
isLoadingInitial: boolean;
|
|
@@ -4136,6 +4589,8 @@ declare class PieChartConfigDialogComponent implements OnInit, AfterViewInit {
|
|
|
4136
4589
|
legendPosition: "top" | "bottom" | "left" | "right";
|
|
4137
4590
|
ckQueryTarget: CkQueryTarget;
|
|
4138
4591
|
ckGroupBy: string;
|
|
4592
|
+
labelPosition: PieChartLabelPosition | undefined;
|
|
4593
|
+
hideLabelsBelowPercent: number | null;
|
|
4139
4594
|
};
|
|
4140
4595
|
get isValid(): boolean;
|
|
4141
4596
|
/** Family of the currently selected query; drives the time-filter toggle's visibility. */
|
|
@@ -4155,11 +4610,17 @@ declare class PieChartConfigDialogComponent implements OnInit, AfterViewInit {
|
|
|
4155
4610
|
* because the SD path has no dedicated column-introspection endpoint today.
|
|
4156
4611
|
*/
|
|
4157
4612
|
private fetchColumnsForFamily;
|
|
4613
|
+
addCategoryColor(): void;
|
|
4614
|
+
removeCategoryColor(id: number): void;
|
|
4615
|
+
/** Value of the native colour picker: the row's hex colour, else black (the picker needs a #rrggbb value). */
|
|
4616
|
+
swatchValue(color: string): string;
|
|
4617
|
+
/** The edited category colours; rows without category or colour are dropped; none = undefined. */
|
|
4618
|
+
private categoryColorsResult;
|
|
4158
4619
|
onFiltersChange(updatedFilters: FieldFilterItem[]): void;
|
|
4159
4620
|
onSave(): void;
|
|
4160
4621
|
onCancel(): void;
|
|
4161
4622
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PieChartConfigDialogComponent, never>;
|
|
4162
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PieChartConfigDialogComponent, "mm-pie-chart-config-dialog", never, { "initialDataSourceType": { "alias": "initialDataSourceType"; "required": false; }; "initialQueryRtId": { "alias": "initialQueryRtId"; "required": false; }; "initialQueryName": { "alias": "initialQueryName"; "required": false; }; "initialQueryFamily": { "alias": "initialQueryFamily"; "required": false; }; "initialIgnoreTimeFilter": { "alias": "initialIgnoreTimeFilter"; "required": false; }; "initialEntitySelectorId": { "alias": "initialEntitySelectorId"; "required": false; }; "initialChartType": { "alias": "initialChartType"; "required": false; }; "initialCategoryField": { "alias": "initialCategoryField"; "required": false; }; "initialValueField": { "alias": "initialValueField"; "required": false; }; "initialShowLabels": { "alias": "initialShowLabels"; "required": false; }; "initialShowLegend": { "alias": "initialShowLegend"; "required": false; }; "initialLegendPosition": { "alias": "initialLegendPosition"; "required": false; }; "initialCkQueryTarget": { "alias": "initialCkQueryTarget"; "required": false; }; "initialCkGroupBy": { "alias": "initialCkGroupBy"; "required": false; }; "initialFilters": { "alias": "initialFilters"; "required": false; }; }, {}, never, never, true, never>;
|
|
4623
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PieChartConfigDialogComponent, "mm-pie-chart-config-dialog", never, { "initialDataSourceType": { "alias": "initialDataSourceType"; "required": false; }; "initialQueryRtId": { "alias": "initialQueryRtId"; "required": false; }; "initialQueryName": { "alias": "initialQueryName"; "required": false; }; "initialQueryFamily": { "alias": "initialQueryFamily"; "required": false; }; "initialIgnoreTimeFilter": { "alias": "initialIgnoreTimeFilter"; "required": false; }; "initialEntitySelectorId": { "alias": "initialEntitySelectorId"; "required": false; }; "initialChartType": { "alias": "initialChartType"; "required": false; }; "initialCategoryField": { "alias": "initialCategoryField"; "required": false; }; "initialValueField": { "alias": "initialValueField"; "required": false; }; "initialShowLabels": { "alias": "initialShowLabels"; "required": false; }; "initialShowLegend": { "alias": "initialShowLegend"; "required": false; }; "initialLegendPosition": { "alias": "initialLegendPosition"; "required": false; }; "initialCkQueryTarget": { "alias": "initialCkQueryTarget"; "required": false; }; "initialCkGroupBy": { "alias": "initialCkGroupBy"; "required": false; }; "initialFilters": { "alias": "initialFilters"; "required": false; }; "initialCategoryColors": { "alias": "initialCategoryColors"; "required": false; }; "initialLabelPosition": { "alias": "initialLabelPosition"; "required": false; }; "initialHideLabelsBelowPercent": { "alias": "initialHideLabelsBelowPercent"; "required": false; }; }, {}, never, never, true, never>;
|
|
4163
4624
|
}
|
|
4164
4625
|
|
|
4165
4626
|
/**
|
|
@@ -4172,6 +4633,8 @@ interface SeriesData {
|
|
|
4172
4633
|
}
|
|
4173
4634
|
declare class BarChartWidgetComponent implements DashboardWidget<BarChartWidgetConfig, SeriesData[]>, OnInit, OnChanges {
|
|
4174
4635
|
private readonly queryExecutor;
|
|
4636
|
+
/** Text / grid colours of the current theme, re-resolved on a live theme switch (AB#5568). */
|
|
4637
|
+
protected readonly chartTheme: _angular_core.Signal<ChartThemeColors>;
|
|
4175
4638
|
private static readonly SUPPORTED_ROW_TYPES;
|
|
4176
4639
|
private readonly stateService;
|
|
4177
4640
|
private readonly variableService;
|
|
@@ -4390,6 +4853,8 @@ interface ValueAxisConfig {
|
|
|
4390
4853
|
}
|
|
4391
4854
|
declare class LineChartWidgetComponent implements DashboardWidget<LineChartWidgetConfig, LineSeriesData[]>, AfterViewInit, OnChanges, OnDestroy {
|
|
4392
4855
|
private readonly queryExecutor;
|
|
4856
|
+
/** Text / grid colours of the current theme, re-resolved on a live theme switch (AB#5568). */
|
|
4857
|
+
protected readonly chartTheme: _angular_core.Signal<ChartThemeColors>;
|
|
4393
4858
|
private readonly elementRef;
|
|
4394
4859
|
private readonly ngZone;
|
|
4395
4860
|
private resizeObserver?;
|
|
@@ -4684,6 +5149,8 @@ interface HeatmapDataItem {
|
|
|
4684
5149
|
}
|
|
4685
5150
|
declare class HeatmapWidgetComponent implements DashboardWidget<HeatmapWidgetConfig, HeatmapDataItem[]>, OnInit, OnChanges {
|
|
4686
5151
|
private readonly queryExecutor;
|
|
5152
|
+
/** Text / grid colours of the current theme, re-resolved on a live theme switch (AB#5568). */
|
|
5153
|
+
protected readonly chartTheme: _angular_core.Signal<ChartThemeColors>;
|
|
4687
5154
|
private static readonly SUPPORTED_ROW_TYPES;
|
|
4688
5155
|
private readonly stateService;
|
|
4689
5156
|
private readonly variableService;
|
|
@@ -4954,6 +5421,7 @@ interface EditableStat {
|
|
|
4954
5421
|
suffix?: string;
|
|
4955
5422
|
}
|
|
4956
5423
|
declare class StatsGridConfigDialogComponent implements OnInit {
|
|
5424
|
+
protected readonly deleteIcon: _progress_kendo_svg_icons.SVGIcon;
|
|
4957
5425
|
private readonly windowRef;
|
|
4958
5426
|
private readonly stateService;
|
|
4959
5427
|
initialStats?: StatItem[];
|
|
@@ -5372,6 +5840,44 @@ declare class MarkdownConfigDialogComponent implements OnInit {
|
|
|
5372
5840
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MarkdownConfigDialogComponent, "mm-markdown-config-dialog", never, { "initialContent": { "alias": "initialContent"; "required": false; }; "initialResolveVariables": { "alias": "initialResolveVariables"; "required": false; }; "initialPadding": { "alias": "initialPadding"; "required": false; }; "initialTextAlign": { "alias": "initialTextAlign"; "required": false; }; }, {}, never, never, true, never>;
|
|
5373
5841
|
}
|
|
5374
5842
|
|
|
5843
|
+
type NgxMarkdownModule = typeof ngx_markdown;
|
|
5844
|
+
/**
|
|
5845
|
+
* Loads `ngx-markdown` (and with it `marked`) on first use. The bare-specifier dynamic import stays
|
|
5846
|
+
* a real `import()` in the published bundle, so the application bundler puts both libraries into a
|
|
5847
|
+
* lazy chunk that is only fetched once a markdown block is actually rendered.
|
|
5848
|
+
*/
|
|
5849
|
+
declare function loadNgxMarkdown(): Promise<NgxMarkdownModule>;
|
|
5850
|
+
/**
|
|
5851
|
+
* Renders markdown with `ngx-markdown`'s `<markdown>` component, loading `ngx-markdown`/`marked`
|
|
5852
|
+
* lazily (AB#5621) so they stay out of the initial bundle of hosts that show MeshBoards eagerly.
|
|
5853
|
+
*
|
|
5854
|
+
* If the host already provides `MarkdownService` (e.g. `provideMarkdown({...})` at root or on a
|
|
5855
|
+
* route), that configuration is used; otherwise the component provides a default
|
|
5856
|
+
* `provideMarkdown()` itself, so no host setup is required.
|
|
5857
|
+
*
|
|
5858
|
+
* While the library loads nothing is shown; if loading fails, the raw text is shown instead.
|
|
5859
|
+
*/
|
|
5860
|
+
declare class LazyMarkdownComponent implements OnInit {
|
|
5861
|
+
private readonly injector;
|
|
5862
|
+
private readonly environmentInjector;
|
|
5863
|
+
private readonly destroyRef;
|
|
5864
|
+
/** Markdown source to render. */
|
|
5865
|
+
readonly data: _angular_core.InputSignal<string | null | undefined>;
|
|
5866
|
+
/** True once the `<markdown>` component is attached. */
|
|
5867
|
+
readonly rendered: _angular_core.WritableSignal<boolean>;
|
|
5868
|
+
/** True if `ngx-markdown` could not be loaded; the raw text is shown then. */
|
|
5869
|
+
readonly loadFailed: _angular_core.WritableSignal<boolean>;
|
|
5870
|
+
private outlet;
|
|
5871
|
+
private readonly markdownRef;
|
|
5872
|
+
private ownedInjector;
|
|
5873
|
+
private destroyed;
|
|
5874
|
+
constructor();
|
|
5875
|
+
ngOnInit(): void;
|
|
5876
|
+
private attach;
|
|
5877
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LazyMarkdownComponent, never>;
|
|
5878
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<LazyMarkdownComponent, "mm-lazy-markdown", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
5879
|
+
}
|
|
5880
|
+
|
|
5375
5881
|
interface StatusListItem {
|
|
5376
5882
|
label: string;
|
|
5377
5883
|
status: string;
|
|
@@ -5380,6 +5886,7 @@ interface StatusListItem {
|
|
|
5380
5886
|
}
|
|
5381
5887
|
declare class StatusListWidgetComponent implements DashboardWidget<StatusListWidgetConfig, StatusListItem[]>, OnInit, OnChanges {
|
|
5382
5888
|
private readonly getEntitiesByCkTypeGQL;
|
|
5889
|
+
private readonly secretSafeNames;
|
|
5383
5890
|
config: StatusListWidgetConfig;
|
|
5384
5891
|
private readonly _isLoading;
|
|
5385
5892
|
private readonly _error;
|
|
@@ -5447,6 +5954,7 @@ interface TileValue {
|
|
|
5447
5954
|
}
|
|
5448
5955
|
declare class SummaryCardWidgetComponent implements DashboardWidget<SummaryCardWidgetConfig, TileValue[]>, OnInit, OnChanges {
|
|
5449
5956
|
private readonly entityGQL;
|
|
5957
|
+
private readonly secretSafeNames;
|
|
5450
5958
|
private readonly dataService;
|
|
5451
5959
|
private readonly queryExecutor;
|
|
5452
5960
|
private readonly stateService;
|
|
@@ -5746,6 +6254,40 @@ declare function registerProcessWidget(registry: WidgetRegistryService): void;
|
|
|
5746
6254
|
*/
|
|
5747
6255
|
declare function provideProcessWidget(): EnvironmentProviders;
|
|
5748
6256
|
|
|
6257
|
+
/**
|
|
6258
|
+
* Host translations of the MeshBoard widget texts (AB#5622). Every member is optional; a missing
|
|
6259
|
+
* member keeps the English default, so an app sets only what it translates.
|
|
6260
|
+
*/
|
|
6261
|
+
interface MeshBoardMessages {
|
|
6262
|
+
/**
|
|
6263
|
+
* Texts of the list inside the table widget (`mm-list-view`): "No records available.", the
|
|
6264
|
+
* pager texts, the toolbar labels and the row action names. Merged over the list's English
|
|
6265
|
+
* defaults (`DEFAULT_LIST_VIEW_MESSAGES`).
|
|
6266
|
+
*/
|
|
6267
|
+
tableList?: Partial<ListViewMessages>;
|
|
6268
|
+
/** Placeholder of a table widget without data source / columns. Default: "Table not configured" */
|
|
6269
|
+
tableNotConfigured?: string;
|
|
6270
|
+
}
|
|
6271
|
+
/** Default texts of {@link MeshBoardMessages} (the list texts default inside `mm-list-view`). */
|
|
6272
|
+
declare const DEFAULT_MESHBOARD_MESSAGES: Required<Omit<MeshBoardMessages, 'tableList'>>;
|
|
6273
|
+
/**
|
|
6274
|
+
* What a host provides on {@link MESHBOARD_MESSAGES}: a fixed object, or a signal for apps that
|
|
6275
|
+
* switch the language at runtime (the widgets follow it).
|
|
6276
|
+
*/
|
|
6277
|
+
type MeshBoardMessagesSource = MeshBoardMessages | Signal<MeshBoardMessages | null | undefined>;
|
|
6278
|
+
/**
|
|
6279
|
+
* Optional: the host's translations of the MeshBoard widget texts (English without it). Set it
|
|
6280
|
+
* once app-wide, either directly or via `provideMeshBoard({ messages })` /
|
|
6281
|
+
* `provideMeshBoardMessages(messages)`.
|
|
6282
|
+
*
|
|
6283
|
+
* ```ts
|
|
6284
|
+
* providers: [provideMeshBoardMessages({ tableList: { noRecords: 'Keine Einträge vorhanden.', pagerItemsPerPage: 'Einträge pro Seite' } })]
|
|
6285
|
+
* ```
|
|
6286
|
+
*/
|
|
6287
|
+
declare const MESHBOARD_MESSAGES: InjectionToken<MeshBoardMessagesSource>;
|
|
6288
|
+
/** The resolved MeshBoard texts: defaults with the host layer on top (missing / null members keep the default). */
|
|
6289
|
+
declare function resolveMeshBoardMessages(messages: MeshBoardMessages | null | undefined): MeshBoardMessages & typeof DEFAULT_MESHBOARD_MESSAGES;
|
|
6290
|
+
|
|
5749
6291
|
/**
|
|
5750
6292
|
* Registers all built-in widget types with the registry.
|
|
5751
6293
|
* Called during app initialization.
|
|
@@ -5778,6 +6320,11 @@ interface MeshBoardOptions {
|
|
|
5778
6320
|
defaultRowHeight?: number;
|
|
5779
6321
|
/** Default gap between widgets in pixels (default: 16) */
|
|
5780
6322
|
defaultGap?: number;
|
|
6323
|
+
/**
|
|
6324
|
+
* Host translations of the widget texts (AB#5622), provided as `MESHBOARD_MESSAGES` — e.g. the
|
|
6325
|
+
* table widget's list texts. Fixed object or signal. Absent = English.
|
|
6326
|
+
*/
|
|
6327
|
+
messages?: MeshBoardMessagesSource;
|
|
5781
6328
|
}
|
|
5782
6329
|
/**
|
|
5783
6330
|
* Injection token for MeshBoard options
|
|
@@ -5807,6 +6354,11 @@ declare const MESHBOARD_TENANT_ID_PROVIDER: InjectionToken<Types.TenantIdProvide
|
|
|
5807
6354
|
* ```
|
|
5808
6355
|
*/
|
|
5809
6356
|
declare function provideMeshBoard(options?: MeshBoardOptions): EnvironmentProviders;
|
|
6357
|
+
/**
|
|
6358
|
+
* Provides the host translations of the MeshBoard widget texts (`MESHBOARD_MESSAGES`, AB#5622)
|
|
6359
|
+
* without `provideMeshBoard()` — for apps that register the widgets lazily.
|
|
6360
|
+
*/
|
|
6361
|
+
declare function provideMeshBoardMessages(messages: MeshBoardMessagesSource): EnvironmentProviders;
|
|
5810
6362
|
/**
|
|
5811
6363
|
* Provider function for registering custom widgets.
|
|
5812
6364
|
* Use this to add your own widget types to MeshBoard.
|
|
@@ -5839,6 +6391,44 @@ declare function provideMeshBoard(options?: MeshBoardOptions): EnvironmentProvid
|
|
|
5839
6391
|
*/
|
|
5840
6392
|
declare function provideWidgetRegistrations(registrations: WidgetRegistration<AnyWidgetConfig, WidgetConfigResult>[]): EnvironmentProviders;
|
|
5841
6393
|
|
|
6394
|
+
/**
|
|
6395
|
+
* What a MeshBoard label belongs to (AB#5622):
|
|
6396
|
+
* - `tableCell` — the text of a table widget cell (enum values such as `PAID`);
|
|
6397
|
+
* - `chartCategory` — a category of a pie / donut chart. The resolved text is the slice's name
|
|
6398
|
+
* everywhere: data labels, legend items and tooltips.
|
|
6399
|
+
*/
|
|
6400
|
+
type MeshBoardLabelKind = 'tableCell' | 'chartCategory';
|
|
6401
|
+
/** One label lookup of {@link MeshBoardLabelResolver}. */
|
|
6402
|
+
interface MeshBoardLabelRequest {
|
|
6403
|
+
kind: MeshBoardLabelKind;
|
|
6404
|
+
/** Runtime CK type of the widget's data, when known (table over a runtime entity type); else undefined. */
|
|
6405
|
+
ckTypeId?: string;
|
|
6406
|
+
/** The attribute (column field / category field) the value belongs to, as configured on the widget. */
|
|
6407
|
+
attribute: string;
|
|
6408
|
+
/** The raw value as delivered by the query (e.g. the enum value name `PAID`). */
|
|
6409
|
+
value: string;
|
|
6410
|
+
/** CK value type of the column when the query reports it (`ENUM`, `STRING`, ...). */
|
|
6411
|
+
valueType?: string;
|
|
6412
|
+
/** The text shown without a resolver (e.g. "Paid" for `PAID` in charts, the raw value in tables). */
|
|
6413
|
+
defaultText: string;
|
|
6414
|
+
}
|
|
6415
|
+
/**
|
|
6416
|
+
* Host hook that translates enum values in MeshBoard tables and chart categories (AB#5622). Same
|
|
6417
|
+
* pattern as the entity forms' `ENTITY_FORM_LABEL_RESOLVER`: return `null`, `undefined` or `''`
|
|
6418
|
+
* to keep {@link MeshBoardLabelRequest.defaultText}. A resolver that throws is logged once and
|
|
6419
|
+
* ignored. Charts call it inside a `computed`, so a resolver that reads a signal (the current
|
|
6420
|
+
* language) re-labels the chart when the signal changes.
|
|
6421
|
+
*
|
|
6422
|
+
* ```ts
|
|
6423
|
+
* { provide: MESHBOARD_LABEL_RESOLVER, useValue: (r) => r.attribute === 'paymentState' ? i18n.enumLabel('PaymentState', r.value) : null }
|
|
6424
|
+
* ```
|
|
6425
|
+
*/
|
|
6426
|
+
type MeshBoardLabelResolver = (request: MeshBoardLabelRequest) => string | null | undefined;
|
|
6427
|
+
/** App-wide {@link MeshBoardLabelResolver}. Not provided = today's texts. */
|
|
6428
|
+
declare const MESHBOARD_LABEL_RESOLVER: InjectionToken<MeshBoardLabelResolver>;
|
|
6429
|
+
/** Resolves one label; the default text when there is no resolver, no translation, or the resolver throws. */
|
|
6430
|
+
declare function resolveMeshBoardLabel(resolver: MeshBoardLabelResolver | null | undefined, request: MeshBoardLabelRequest): string;
|
|
6431
|
+
|
|
5842
6432
|
/**
|
|
5843
6433
|
* Component for editing entity selector configurations in MeshBoard settings.
|
|
5844
6434
|
* Allows adding, editing, and removing entity selectors.
|
|
@@ -6094,6 +6684,7 @@ declare class MeshBoardViewComponent implements OnInit, OnDestroy, HasUnsavedCha
|
|
|
6094
6684
|
protected readonly trashIcon: _progress_kendo_svg_icons.SVGIcon;
|
|
6095
6685
|
protected readonly gridLayoutIcon: _progress_kendo_svg_icons.SVGIcon;
|
|
6096
6686
|
protected readonly undoIcon: _progress_kendo_svg_icons.SVGIcon;
|
|
6687
|
+
/** Duplicate widget (canonical duplicate icon, AB#5580). */
|
|
6097
6688
|
protected readonly copyIcon: _progress_kendo_svg_icons.SVGIcon;
|
|
6098
6689
|
protected readonly infoCircleIcon: _progress_kendo_svg_icons.SVGIcon;
|
|
6099
6690
|
protected readonly arrowUpIcon: _progress_kendo_svg_icons.SVGIcon;
|
|
@@ -6118,8 +6709,28 @@ declare class MeshBoardViewComponent implements OnInit, OnDestroy, HasUnsavedCha
|
|
|
6118
6709
|
private readonly _hideEntitySelectors;
|
|
6119
6710
|
protected readonly hideEntitySelectors: _angular_core.Signal<boolean>;
|
|
6120
6711
|
protected readonly timeRangeLabels: _angular_core.WritableSignal<TimeRangePickerLabels>;
|
|
6712
|
+
/**
|
|
6713
|
+
* How much of the header the host shows: `full` (default) with name and description,
|
|
6714
|
+
* `compact` (controls only, aligned right) or `none` (no header row). A host page that
|
|
6715
|
+
* already names the board (e.g. a tab under a greeting) embeds it compact. Overrides the
|
|
6716
|
+
* route data `meshBoardHeaderMode`, which routes loading the view directly use.
|
|
6717
|
+
*/
|
|
6718
|
+
readonly headerMode: _angular_core.InputSignal<MeshBoardHeaderMode | undefined>;
|
|
6719
|
+
private readonly routeHeaderMode;
|
|
6720
|
+
protected readonly effectiveHeaderMode: _angular_core.Signal<MeshBoardHeaderMode>;
|
|
6721
|
+
/**
|
|
6722
|
+
* Whether the view draws its own outer frame: `framed` (default) paints the view background,
|
|
6723
|
+
* the header bar and the grid padding; `plain` leaves all three to the host page, so the
|
|
6724
|
+
* widgets sit on the host surface and align with its gutter (widget frames and the gap between
|
|
6725
|
+
* widgets unchanged). Overrides the route data `meshBoardChrome`.
|
|
6726
|
+
*/
|
|
6727
|
+
readonly chrome: _angular_core.InputSignal<MeshBoardChrome | undefined>;
|
|
6728
|
+
private readonly routeChrome;
|
|
6729
|
+
protected readonly effectiveChrome: _angular_core.Signal<MeshBoardChrome>;
|
|
6121
6730
|
protected readonly meshBoardPageLink: _angular_core.Signal<string>;
|
|
6122
6731
|
protected readonly hasWidgets: _angular_core.Signal<boolean>;
|
|
6732
|
+
/** Widgets shown: outside edit mode those that reported "nothing for this viewer" are collapsed (AB#5558). */
|
|
6733
|
+
private readonly visibleWidgets;
|
|
6123
6734
|
protected readonly bannerWidgets: _angular_core.Signal<AnyWidgetConfig[]>;
|
|
6124
6735
|
protected readonly gridWidgets: _angular_core.Signal<AnyWidgetConfig[]>;
|
|
6125
6736
|
protected readonly hasGridWidgets: _angular_core.Signal<boolean>;
|
|
@@ -6408,7 +7019,7 @@ declare class MeshBoardViewComponent implements OnInit, OnDestroy, HasUnsavedCha
|
|
|
6408
7019
|
*/
|
|
6409
7020
|
saveChanges(): Promise<boolean>;
|
|
6410
7021
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MeshBoardViewComponent, never>;
|
|
6411
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MeshBoardViewComponent, "mm-meshboard-view", never, {}, {}, never, never, true, [{ directive: typeof i1.UnsavedChangesDirective; inputs: {}; outputs: {}; }]>;
|
|
7022
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MeshBoardViewComponent, "mm-meshboard-view", never, { "headerMode": { "alias": "headerMode"; "required": false; "isSignal": true; }; "chrome": { "alias": "chrome"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.UnsavedChangesDirective; inputs: {}; outputs: {}; }]>;
|
|
6412
7023
|
}
|
|
6413
7024
|
|
|
6414
7025
|
/**
|
|
@@ -6555,12 +7166,14 @@ declare class AddWidgetDialogComponent implements OnInit {
|
|
|
6555
7166
|
|
|
6556
7167
|
/**
|
|
6557
7168
|
* Dialog for managing multiple MeshBoards.
|
|
6558
|
-
* Provides actions to switch, create, rename, and
|
|
7169
|
+
* Provides actions to switch, create, rename, delete, and pin MeshBoards
|
|
7170
|
+
* (pinned boards appear in the host app's end-user navigation).
|
|
6559
7171
|
*/
|
|
6560
7172
|
declare class MeshBoardManagerDialogComponent implements OnInit {
|
|
6561
7173
|
private readonly dialogRef;
|
|
6562
7174
|
private readonly stateService;
|
|
6563
7175
|
private readonly dialogService;
|
|
7176
|
+
private readonly confirmationService;
|
|
6564
7177
|
private readonly assetRepoService;
|
|
6565
7178
|
private readonly jobManagementService;
|
|
6566
7179
|
private readonly importStrategyDialogService;
|
|
@@ -6578,12 +7191,17 @@ declare class MeshBoardManagerDialogComponent implements OnInit {
|
|
|
6578
7191
|
protected readonly checkIcon: _progress_kendo_svg_icons.SVGIcon;
|
|
6579
7192
|
protected readonly xIcon: _progress_kendo_svg_icons.SVGIcon;
|
|
6580
7193
|
protected readonly gridLayoutIcon: _progress_kendo_svg_icons.SVGIcon;
|
|
7194
|
+
/** Export (canonical export icon, AB#5580). */
|
|
6581
7195
|
protected readonly downloadIcon: _progress_kendo_svg_icons.SVGIcon;
|
|
6582
7196
|
protected readonly uploadIcon: _progress_kendo_svg_icons.SVGIcon;
|
|
7197
|
+
/** Duplicate (canonical duplicate icon, AB#5580). */
|
|
6583
7198
|
protected readonly copyIcon: _progress_kendo_svg_icons.SVGIcon;
|
|
7199
|
+
protected readonly pinIcon: _progress_kendo_svg_icons.SVGIcon;
|
|
7200
|
+
protected readonly unpinIcon: _progress_kendo_svg_icons.SVGIcon;
|
|
6584
7201
|
protected readonly isExporting: _angular_core.WritableSignal<boolean>;
|
|
6585
7202
|
protected readonly isImporting: _angular_core.WritableSignal<boolean>;
|
|
6586
7203
|
protected readonly isDuplicating: _angular_core.WritableSignal<boolean>;
|
|
7204
|
+
protected readonly isPinning: _angular_core.WritableSignal<boolean>;
|
|
6587
7205
|
protected readonly meshBoards: _angular_core.Signal<PersistedMeshBoard[]>;
|
|
6588
7206
|
protected readonly currentMeshBoardId: _angular_core.Signal<string | null>;
|
|
6589
7207
|
protected readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
@@ -6615,6 +7233,14 @@ declare class MeshBoardManagerDialogComponent implements OnInit {
|
|
|
6615
7233
|
* Returns the suffix including the marker and JSON, or empty string if none.
|
|
6616
7234
|
*/
|
|
6617
7235
|
private getEncodedSuffix;
|
|
7236
|
+
/**
|
|
7237
|
+
* Whether a MeshBoard is pinned to the host app's end-user navigation.
|
|
7238
|
+
*/
|
|
7239
|
+
isPinned(meshBoard: PersistedMeshBoard): boolean;
|
|
7240
|
+
/**
|
|
7241
|
+
* Pins or unpins a MeshBoard for the host app's end-user navigation.
|
|
7242
|
+
*/
|
|
7243
|
+
togglePinned(meshBoard: PersistedMeshBoard): Promise<void>;
|
|
6618
7244
|
/**
|
|
6619
7245
|
* Checks if a MeshBoard is being edited.
|
|
6620
7246
|
*/
|
|
@@ -6685,5 +7311,1575 @@ declare class MeshBoardManagerDialogComponent implements OnInit {
|
|
|
6685
7311
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MeshBoardManagerDialogComponent, "mm-meshboard-manager-dialog", never, {}, {}, never, never, true, never>;
|
|
6686
7312
|
}
|
|
6687
7313
|
|
|
6688
|
-
|
|
6689
|
-
|
|
7314
|
+
/**
|
|
7315
|
+
* Translatable texts of the cockpit widgets (AB#5622): "Attention list", the KPI tiles
|
|
7316
|
+
* ("Adapter status", "CK model state", "Pipeline executions 24 h", and for the system cockpit
|
|
7317
|
+
* "Tenants", "Blueprint updates", "Services healthy", "Version") and "Recent items".
|
|
7318
|
+
*
|
|
7319
|
+
* The widgets are created by the MeshBoard, so a host translates them through
|
|
7320
|
+
* {@link COCKPIT_WIDGET_MESSAGES} (or `provideCockpitWidgetHost({ messages })`); a widget used on
|
|
7321
|
+
* its own also takes a `messages` input, which wins over the token. Both accept a
|
|
7322
|
+
* `Partial<CockpitWidgetMessages>`; members that are missing, `undefined` or `null` keep the
|
|
7323
|
+
* English default from {@link DEFAULT_COCKPIT_WIDGET_MESSAGES}. Members added later will be
|
|
7324
|
+
* optional, so a complete object written for this version keeps compiling.
|
|
7325
|
+
*
|
|
7326
|
+
* Placeholders in braces (`{count}`) are filled with {@link formatCockpitMessage}. Not covered:
|
|
7327
|
+
* the config dialogs (board editors) and the findings of the built-in OctoMesh attention
|
|
7328
|
+
* providers, except "Failed pipeline executions" (`attentionFailedExecutions*`), the service
|
|
7329
|
+
* health (`attentionService*`) and blueprint update (`attentionBlueprintUpdates*`) checks — a host's own
|
|
7330
|
+
* providers bring their own (translated) titles and texts.
|
|
7331
|
+
*/
|
|
7332
|
+
interface CockpitWidgetMessages {
|
|
7333
|
+
/** BCP 47 locale for numbers on the tiles and the finding count badge. Default: "en-US" */
|
|
7334
|
+
numberLocale: string;
|
|
7335
|
+
/** Viewers without builder roles, instead of role requirements. Default: "Not available" */
|
|
7336
|
+
notAvailable: string;
|
|
7337
|
+
/** Default: "Loading…" */
|
|
7338
|
+
loading: string;
|
|
7339
|
+
/** Default: "No tenant selected." */
|
|
7340
|
+
noTenant: string;
|
|
7341
|
+
/** Severity chip. Default: "Error" */
|
|
7342
|
+
severityError: string;
|
|
7343
|
+
/** Severity chip. Default: "Warning" */
|
|
7344
|
+
severityWarning: string;
|
|
7345
|
+
/** Severity chip. Default: "Info" */
|
|
7346
|
+
severityInfo: string;
|
|
7347
|
+
/** Default: "Checking…" */
|
|
7348
|
+
attentionChecking: string;
|
|
7349
|
+
/** Builders when no check is visible for them. Default: "No health checks are available for your role." */
|
|
7350
|
+
attentionNoChecksForRole: string;
|
|
7351
|
+
/** Chip of the empty state. Default: "All clear" */
|
|
7352
|
+
attentionAllClear: string;
|
|
7353
|
+
/** Text of the empty state. Default: "Nothing needs attention." */
|
|
7354
|
+
attentionNothingNeedsAttention: string;
|
|
7355
|
+
/** Accessible name of the finding list. Default: "Needs attention" */
|
|
7356
|
+
attentionListLabel: string;
|
|
7357
|
+
/** Explain button. Default: "✦ Explain" */
|
|
7358
|
+
attentionExplain: string;
|
|
7359
|
+
/** `{count}` = findings not shown. Default: "and {count} more" */
|
|
7360
|
+
attentionMore: string;
|
|
7361
|
+
/** Accessible name of a finding's count badge; `{count}` = formatted count. Default: "Count: {count}" */
|
|
7362
|
+
attentionCountLabel: string;
|
|
7363
|
+
/** Default: "The health checks could not be loaded." */
|
|
7364
|
+
attentionLoadFailed: string;
|
|
7365
|
+
/** Title; the count is the finding's badge. Default: "Failed pipeline executions in the last 24 h" */
|
|
7366
|
+
attentionFailedExecutionsTitle?: string;
|
|
7367
|
+
/** `{failed}`, `{total}` formatted counts, `{ratio}` formatted percentage. Default: "{failed} of {total} executions failed ({ratio}). The Data Flows list shows which pipelines fail, their execution history the errors." */
|
|
7368
|
+
attentionFailedExecutionsText?: string;
|
|
7369
|
+
/** Appended to the text after a capped read. Default: "Counted over the first {read} of {total} data flows." */
|
|
7370
|
+
attentionFailedExecutionsTruncated?: string;
|
|
7371
|
+
/** Link chip. Default: "Open data flows" */
|
|
7372
|
+
attentionFailedExecutionsLink?: string;
|
|
7373
|
+
/** "✦ Explain" prefill; `{count}` = formatted failed count. Default: "Why did {count} pipeline executions fail in the last 24 hours?" */
|
|
7374
|
+
attentionFailedExecutionsExplain?: string;
|
|
7375
|
+
/** A tile whose query failed. Default: "The figure could not be loaded." */
|
|
7376
|
+
kpiLoadFailed: string;
|
|
7377
|
+
/** Builders without the role / model of the adapter and execution tiles. */
|
|
7378
|
+
kpiNeedsCommunication: string;
|
|
7379
|
+
/** Builders without the role of the CK model tile. Default: "Needs the AdminPanelManagement role." */
|
|
7380
|
+
kpiNeedsAdminPanel: string;
|
|
7381
|
+
/** Default: "Adapters online" */
|
|
7382
|
+
kpiAdaptersLabel: string;
|
|
7383
|
+
/** Default: "{count} hibernated" */
|
|
7384
|
+
kpiAdaptersHibernated: string;
|
|
7385
|
+
/** Default: "{count} edge / local" */
|
|
7386
|
+
kpiAdaptersEdgeLocal: string;
|
|
7387
|
+
/** Default: "{count} not deployed" */
|
|
7388
|
+
kpiAdaptersNotDeployed: string;
|
|
7389
|
+
/** Capped read. Default: "based on the first {read} of {total} adapters" */
|
|
7390
|
+
kpiAdaptersTruncated: string;
|
|
7391
|
+
/** Default: "No adapters" */
|
|
7392
|
+
kpiAdaptersNone: string;
|
|
7393
|
+
/** Default: "None deployed" */
|
|
7394
|
+
kpiAdaptersNoneDeployed: string;
|
|
7395
|
+
/** `{count}` may carry a "≥ " prefix. Default: "{count} offline" */
|
|
7396
|
+
kpiAdaptersOffline: string;
|
|
7397
|
+
/** Default: "All online" */
|
|
7398
|
+
kpiAdaptersAllOnline: string;
|
|
7399
|
+
/** Default: "Pipeline executions 24 h" */
|
|
7400
|
+
kpiExecutionsLabel: string;
|
|
7401
|
+
/** Default: "No executions in the last 24 hours" */
|
|
7402
|
+
kpiExecutionsNone: string;
|
|
7403
|
+
/** Default: "{count} succeeded" */
|
|
7404
|
+
kpiExecutionsSucceeded: string;
|
|
7405
|
+
/** Capped read. Default: "based on the first {read} of {total} data flows" */
|
|
7406
|
+
kpiExecutionsTruncated: string;
|
|
7407
|
+
/** Default: "Idle" */
|
|
7408
|
+
kpiExecutionsIdle: string;
|
|
7409
|
+
/** `{count}` may carry a "≥ " prefix. Default: "{count} failed" */
|
|
7410
|
+
kpiExecutionsFailed: string;
|
|
7411
|
+
/** Default: "No failures" */
|
|
7412
|
+
kpiExecutionsNoFailures: string;
|
|
7413
|
+
/** Accessible sparkline summary. Default: "Executions per hour over the last 24 hours, peak {peak}; {total} executions, {failed} failed" */
|
|
7414
|
+
kpiExecutionsSparkline: string;
|
|
7415
|
+
/** Default: "CK models available" */
|
|
7416
|
+
kpiCkModelsLabel: string;
|
|
7417
|
+
/** Default: "{count} importing" */
|
|
7418
|
+
kpiCkModelsImporting: string;
|
|
7419
|
+
/** Names of failed models with a rest. Default: "{names} and {count} more" */
|
|
7420
|
+
kpiCkModelsMoreNames: string;
|
|
7421
|
+
/** Default: "No models" */
|
|
7422
|
+
kpiCkModelsNone: string;
|
|
7423
|
+
/** Default: "{count} ResolveFailed" */
|
|
7424
|
+
kpiCkModelsResolveFailed: string;
|
|
7425
|
+
/** Default: "Importing" */
|
|
7426
|
+
kpiCkModelsImportingStatus: string;
|
|
7427
|
+
/** Default: "All available" */
|
|
7428
|
+
kpiCkModelsAllAvailable: string;
|
|
7429
|
+
/** Builders without the role of the tenant tile. Default: "Needs the TenantManagement role." */
|
|
7430
|
+
kpiNeedsTenantManagement?: string;
|
|
7431
|
+
/** Default: "Tenants" */
|
|
7432
|
+
kpiTenantsLabel?: string;
|
|
7433
|
+
/** Status chip with child tenants. Default: "Registered" */
|
|
7434
|
+
kpiTenantsRegistered?: string;
|
|
7435
|
+
/** Status chip without child tenants. Default: "No child tenants" */
|
|
7436
|
+
kpiTenantsNone?: string;
|
|
7437
|
+
/** Default: "Blueprint updates" */
|
|
7438
|
+
kpiBlueprintsLabel?: string;
|
|
7439
|
+
/** Default: "Up to date" */
|
|
7440
|
+
kpiBlueprintsUpToDate?: string;
|
|
7441
|
+
/** Default: "{count} available" */
|
|
7442
|
+
kpiBlueprintsAvailable?: string;
|
|
7443
|
+
/** Default: "No blueprints installed" */
|
|
7444
|
+
kpiBlueprintsNone?: string;
|
|
7445
|
+
/** Default: "{count} installed" */
|
|
7446
|
+
kpiBlueprintsInstalled?: string;
|
|
7447
|
+
/** Service-managed blueprints whose newer version their service has not applied yet. Default: "{count} service-managed pending" */
|
|
7448
|
+
kpiBlueprintsServiceManaged?: string;
|
|
7449
|
+
/** Capped catalog read. Default: "based on the first {read} of {total} catalog entries" */
|
|
7450
|
+
kpiBlueprintsTruncated?: string;
|
|
7451
|
+
/**
|
|
7452
|
+
* Shown instead of `loading` once the catalog scan of the "Blueprint updates" tile takes longer
|
|
7453
|
+
* than {@link COCKPIT_KPI_SLOW_LOADING_MS}. Default: "Scanning catalogs…"
|
|
7454
|
+
*/
|
|
7455
|
+
kpiBlueprintsScanning?: string;
|
|
7456
|
+
/** Default: "Services healthy" */
|
|
7457
|
+
kpiServicesLabel?: string;
|
|
7458
|
+
/** Default: "All healthy" */
|
|
7459
|
+
kpiServicesAllHealthy?: string;
|
|
7460
|
+
/** Default: "{count} unhealthy" */
|
|
7461
|
+
kpiServicesUnhealthy?: string;
|
|
7462
|
+
/** Default: "{count} degraded" */
|
|
7463
|
+
kpiServicesDegraded?: string;
|
|
7464
|
+
/** Default: "degraded" */
|
|
7465
|
+
serviceStateDegraded?: string;
|
|
7466
|
+
/** Default: "unhealthy" */
|
|
7467
|
+
serviceStateUnhealthy?: string;
|
|
7468
|
+
/** Health endpoint without answer. Default: "not reachable" */
|
|
7469
|
+
serviceStateUnknown?: string;
|
|
7470
|
+
/** Default: "Version" */
|
|
7471
|
+
kpiVersionLabel?: string;
|
|
7472
|
+
/** Default: "No version information" */
|
|
7473
|
+
kpiVersionNone?: string;
|
|
7474
|
+
/** Finding title; `{name}` service, `{state}` one of the serviceState* texts. Default: "{name} service is {state}" */
|
|
7475
|
+
attentionServiceTitle?: string;
|
|
7476
|
+
/** Default: "Its health check reports a problem. The health details list the failing checks." */
|
|
7477
|
+
attentionServiceText?: string;
|
|
7478
|
+
/** Default: "Its health endpoint does not answer. Features that use the service may fail." */
|
|
7479
|
+
attentionServiceUnreachableText?: string;
|
|
7480
|
+
/** Default: "Open health details" */
|
|
7481
|
+
attentionServiceLink?: string;
|
|
7482
|
+
/** Default: "Why is the {name} service {state}?" */
|
|
7483
|
+
attentionServiceExplain?: string;
|
|
7484
|
+
/** Title; the count is the finding's badge. Default: "Blueprint updates available" */
|
|
7485
|
+
attentionBlueprintUpdatesTitle?: string;
|
|
7486
|
+
/** `{list}` = "Name 1.0.0 → 1.1.0, …". Default: "{list}. Updates are applied on the Blueprints page." */
|
|
7487
|
+
attentionBlueprintUpdatesText?: string;
|
|
7488
|
+
/** Default: "Service-managed: {list} — applied by the owning service when it starts." */
|
|
7489
|
+
attentionBlueprintUpdatesServiceManaged?: string;
|
|
7490
|
+
/** Default: "Open blueprints" */
|
|
7491
|
+
attentionBlueprintUpdatesLink?: string;
|
|
7492
|
+
/** Default: "Recently opened items could not be read." */
|
|
7493
|
+
recentLoadFailed: string;
|
|
7494
|
+
/** Accessible name of the list when the widget has no title. Default: "Recently opened" */
|
|
7495
|
+
recentListLabel: string;
|
|
7496
|
+
/** Default: "Nothing opened yet. Pages, entities and boards you open appear here." */
|
|
7497
|
+
recentEmpty: string;
|
|
7498
|
+
/** After the shortcut key. Default: "shows the same list" */
|
|
7499
|
+
recentPaletteHint: string;
|
|
7500
|
+
/** Tooltip of the palette hint. Default: "Open the command palette" */
|
|
7501
|
+
recentPaletteTitle: string;
|
|
7502
|
+
/** Shortcut label when the source names none. Default: "Ctrl K" */
|
|
7503
|
+
recentPaletteShortcut: string;
|
|
7504
|
+
/** Default: "just now" */
|
|
7505
|
+
recentJustNow: string;
|
|
7506
|
+
/** Default: "{count} min ago" */
|
|
7507
|
+
recentMinutesAgo: string;
|
|
7508
|
+
/** Default: "{count} h ago" */
|
|
7509
|
+
recentHoursAgo: string;
|
|
7510
|
+
/** Default: "yesterday" */
|
|
7511
|
+
recentYesterday: string;
|
|
7512
|
+
/** Default: "{count} days ago" */
|
|
7513
|
+
recentDaysAgo: string;
|
|
7514
|
+
}
|
|
7515
|
+
/** English defaults — today's texts. Complete: every member (optional ones too) has a value. */
|
|
7516
|
+
declare const DEFAULT_COCKPIT_WIDGET_MESSAGES: Readonly<Required<CockpitWidgetMessages>>;
|
|
7517
|
+
/**
|
|
7518
|
+
* What a host provides on {@link COCKPIT_WIDGET_MESSAGES}: a fixed object, or a signal for apps
|
|
7519
|
+
* that switch the language at runtime (the widgets follow it).
|
|
7520
|
+
*/
|
|
7521
|
+
type CockpitWidgetMessagesSource = Partial<CockpitWidgetMessages> | Signal<Partial<CockpitWidgetMessages> | null | undefined>;
|
|
7522
|
+
/** Optional: the host's translations of the cockpit widget texts (English without it). */
|
|
7523
|
+
declare const COCKPIT_WIDGET_MESSAGES: InjectionToken<CockpitWidgetMessagesSource>;
|
|
7524
|
+
/**
|
|
7525
|
+
* Merges messages over {@link DEFAULT_COCKPIT_WIDGET_MESSAGES}; missing, `undefined` and `null`
|
|
7526
|
+
* members keep their default, so a widget never renders an empty label.
|
|
7527
|
+
*/
|
|
7528
|
+
declare function resolveCockpitWidgetMessages(...layers: (Partial<CockpitWidgetMessages> | null | undefined)[]): Required<CockpitWidgetMessages>;
|
|
7529
|
+
/** Fills `{name}` placeholders; unknown placeholders stay as they are. */
|
|
7530
|
+
declare function formatCockpitMessage(template: string, params?: Record<string, string | number>): string;
|
|
7531
|
+
|
|
7532
|
+
/**
|
|
7533
|
+
* Host services of the cockpit widgets (AB#5558). The widgets live in this library and know
|
|
7534
|
+
* nothing about the application that embeds the MeshBoard; the host provides who the viewer is,
|
|
7535
|
+
* where a finding links to and whether "✦ Explain" exists, through these tokens
|
|
7536
|
+
* (`provideCockpitWidgetHost`). Every token is optional: without a host the widgets still render,
|
|
7537
|
+
* but role-gated content stays hidden and findings carry no links.
|
|
7538
|
+
*/
|
|
7539
|
+
/** Role names the cockpit widgets check (the OctoMesh identity roles). */
|
|
7540
|
+
declare const COCKPIT_ROLES: {
|
|
7541
|
+
readonly AdminPanelManagement: "AdminPanelManagement";
|
|
7542
|
+
readonly CommunicationManagement: "CommunicationManagement";
|
|
7543
|
+
readonly TenantManagement: "TenantManagement";
|
|
7544
|
+
};
|
|
7545
|
+
/** Who is looking at the board. */
|
|
7546
|
+
interface CockpitViewerAccess {
|
|
7547
|
+
/** True when the signed-in user has the role (e.g. `CommunicationManagement`). */
|
|
7548
|
+
isInRole(role: string): boolean | Promise<boolean>;
|
|
7549
|
+
/**
|
|
7550
|
+
* True when the viewer works with the platform (the host's "builder" roles). Viewers who are not
|
|
7551
|
+
* get a quiet "Not available" instead of role requirements, and the board collapses cockpit
|
|
7552
|
+
* widgets that have nothing for them. Omitted = not a builder.
|
|
7553
|
+
*/
|
|
7554
|
+
isBuilder?(): boolean | Promise<boolean>;
|
|
7555
|
+
}
|
|
7556
|
+
/**
|
|
7557
|
+
* The viewer's roles. Without it every role check fails — a provider or KPI that needs a role is
|
|
7558
|
+
* never run, so a board embedded in an app without this token shows no builder findings.
|
|
7559
|
+
*/
|
|
7560
|
+
declare const COCKPIT_VIEWER_ACCESS: InjectionToken<CockpitViewerAccess>;
|
|
7561
|
+
/** Query parameters of a {@link CockpitRouteLinkTarget}. */
|
|
7562
|
+
type CockpitLinkQueryParams = Readonly<Record<string, string | number | boolean>>;
|
|
7563
|
+
/**
|
|
7564
|
+
* A link straight to an application route (AB#5622), for host providers whose findings point at
|
|
7565
|
+
* their own pages, e.g. a pre-filtered list: `{ kind: 'route', path: 'documents', queryParams: {
|
|
7566
|
+
* checkTier: '2' } }`. Navigates through the Angular Router (`routerLink` + `queryParams`).
|
|
7567
|
+
*
|
|
7568
|
+
* `path` is an in-app URL path or router commands (`['/', tenantId, 'documents']`); a scheme
|
|
7569
|
+
* (`https:`) or a protocol-relative start (`//host`) drops the link. Absolute paths are
|
|
7570
|
+
* used as they are; relative ones resolve against the route that renders the board. The host's
|
|
7571
|
+
* `CockpitLinkResolver` sees route targets too and may return a rewritten path (e.g. prefixed
|
|
7572
|
+
* with the tenant root); `null` there keeps `path` — the query parameters always come from the
|
|
7573
|
+
* target.
|
|
7574
|
+
*/
|
|
7575
|
+
interface CockpitRouteLinkTarget {
|
|
7576
|
+
kind: 'route';
|
|
7577
|
+
path: string | readonly string[];
|
|
7578
|
+
queryParams?: CockpitLinkQueryParams;
|
|
7579
|
+
}
|
|
7580
|
+
/**
|
|
7581
|
+
* What a finding or KPI links to — semantic targets, so the library holds no application routes.
|
|
7582
|
+
* The host maps them to its own URLs (`CockpitLinkResolver`); `route` targets carry the route
|
|
7583
|
+
* themselves.
|
|
7584
|
+
*
|
|
7585
|
+
* Deployment sites (System.Communication 4.x, AB#5842): the library emits `deployment-site` /
|
|
7586
|
+
* `deployment-sites`. `pool` / `pools` are their deprecated pre-4.x aliases, kept so existing
|
|
7587
|
+
* resolvers still compile; a resolver that answers `null` for a deployment-site kind is asked once
|
|
7588
|
+
* more with the legacy alias (`legacyCockpitLinkTarget`), so hosts keep their links until they map
|
|
7589
|
+
* the new kinds.
|
|
7590
|
+
*/
|
|
7591
|
+
type CockpitLinkTarget = {
|
|
7592
|
+
kind: 'adapter';
|
|
7593
|
+
rtId: string;
|
|
7594
|
+
} | {
|
|
7595
|
+
kind: 'adapters';
|
|
7596
|
+
} | {
|
|
7597
|
+
kind: 'deployment-site';
|
|
7598
|
+
rtId: string;
|
|
7599
|
+
} | {
|
|
7600
|
+
kind: 'deployment-sites';
|
|
7601
|
+
}
|
|
7602
|
+
/** @deprecated Since System.Communication 4.x (AB#5842): use `deployment-site`. */
|
|
7603
|
+
| {
|
|
7604
|
+
kind: 'pool';
|
|
7605
|
+
rtId: string;
|
|
7606
|
+
}
|
|
7607
|
+
/** @deprecated Since System.Communication 4.x (AB#5842): use `deployment-sites`. */
|
|
7608
|
+
| {
|
|
7609
|
+
kind: 'pools';
|
|
7610
|
+
} | {
|
|
7611
|
+
kind: 'dataFlows';
|
|
7612
|
+
} | {
|
|
7613
|
+
kind: 'ckModels';
|
|
7614
|
+
} | {
|
|
7615
|
+
kind: 'tenantSettings';
|
|
7616
|
+
} | {
|
|
7617
|
+
kind: 'secretsReEntry';
|
|
7618
|
+
}
|
|
7619
|
+
/** The tenant's child tenants (system cockpit, AB#5558). */
|
|
7620
|
+
| {
|
|
7621
|
+
kind: 'tenants';
|
|
7622
|
+
}
|
|
7623
|
+
/** Blueprints installed on the tenant (system cockpit, AB#5558). */
|
|
7624
|
+
| {
|
|
7625
|
+
kind: 'blueprints';
|
|
7626
|
+
}
|
|
7627
|
+
/** Health detail of one platform service (`identity`, `asset-repository`, `bot`, `communication-controller`). */
|
|
7628
|
+
| {
|
|
7629
|
+
kind: 'serviceHealth';
|
|
7630
|
+
service: string;
|
|
7631
|
+
} | CockpitRouteLinkTarget;
|
|
7632
|
+
/**
|
|
7633
|
+
* The deprecated pre-4.x alias of a deployment-site target (`deployment-site` → `pool`,
|
|
7634
|
+
* `deployment-sites` → `pools`), or `null` for every other target. Used as the fallback when a
|
|
7635
|
+
* host's resolver has no page for the new kind yet (AB#5842).
|
|
7636
|
+
*/
|
|
7637
|
+
declare function legacyCockpitLinkTarget(target: CockpitLinkTarget): CockpitLinkTarget | null;
|
|
7638
|
+
/** A link target resolved for `routerLink` (path or commands) and `queryParams`. */
|
|
7639
|
+
interface CockpitResolvedLink {
|
|
7640
|
+
path: string | string[];
|
|
7641
|
+
queryParams?: CockpitLinkQueryParams;
|
|
7642
|
+
}
|
|
7643
|
+
/** Maps a link target to an application URL. */
|
|
7644
|
+
interface CockpitLinkResolver {
|
|
7645
|
+
/**
|
|
7646
|
+
* Router URL of the target for the tenant (e.g. `/acme/communication/adapters`), or `null` when
|
|
7647
|
+
* the host has no page for it — the link chip is then left out. For `route` targets `null`
|
|
7648
|
+
* means "use the target's path as it is".
|
|
7649
|
+
*/
|
|
7650
|
+
resolve(target: CockpitLinkTarget, tenantId: string): string | null;
|
|
7651
|
+
}
|
|
7652
|
+
/** The host's link resolver; without it findings and KPI tiles carry no links. */
|
|
7653
|
+
declare const COCKPIT_LINK_RESOLVER: InjectionToken<CockpitLinkResolver>;
|
|
7654
|
+
/** What "✦ Explain" hands to the host's assistant. */
|
|
7655
|
+
interface CockpitExplainTarget {
|
|
7656
|
+
/** Human readable name of the object or finding. */
|
|
7657
|
+
label: string;
|
|
7658
|
+
/** Runtime id, when the finding is about one entity. */
|
|
7659
|
+
rtId?: string;
|
|
7660
|
+
/** CK type id of that entity. */
|
|
7661
|
+
ckTypeId?: string;
|
|
7662
|
+
/** Composer prefill, e.g. "Why is the adapter "plc-07" offline?". */
|
|
7663
|
+
prompt?: string;
|
|
7664
|
+
}
|
|
7665
|
+
/** The host's assistant entry point. */
|
|
7666
|
+
interface CockpitExplainHandler {
|
|
7667
|
+
/** False hides every "✦ Explain" button (the assistant is disabled). */
|
|
7668
|
+
readonly enabled: boolean;
|
|
7669
|
+
explain(target: CockpitExplainTarget): void;
|
|
7670
|
+
}
|
|
7671
|
+
/** Optional: without it the attention list shows no "✦ Explain" buttons. */
|
|
7672
|
+
declare const COCKPIT_EXPLAIN_HANDLER: InjectionToken<CockpitExplainHandler>;
|
|
7673
|
+
/** What a recent item points at (drives the row glyph). */
|
|
7674
|
+
type CockpitRecentItemKind = 'page' | 'entity' | 'board';
|
|
7675
|
+
/** One row of the "Recent items" widget, already checked by the host for the viewer. */
|
|
7676
|
+
interface CockpitRecentItem {
|
|
7677
|
+
/** Stable key (e.g. the router URL without query). */
|
|
7678
|
+
key: string;
|
|
7679
|
+
kind: CockpitRecentItemKind;
|
|
7680
|
+
/** What the viewer opened, e.g. "Mesh Adapter". */
|
|
7681
|
+
label: string;
|
|
7682
|
+
/** What it is, e.g. "MeshBoard" or "Integration › Adapters". */
|
|
7683
|
+
kindLabel: string;
|
|
7684
|
+
/** Epoch milliseconds of the last visit (shown as relative time). */
|
|
7685
|
+
lastVisitedAt: number;
|
|
7686
|
+
/** Real href of the link, so middle-click, Cmd/Ctrl-click and the context menu work. */
|
|
7687
|
+
href: string;
|
|
7688
|
+
}
|
|
7689
|
+
/**
|
|
7690
|
+
* The viewer's recently opened places — a per-user history the board does not store. The host
|
|
7691
|
+
* owns it (the Refinery Studio: the same history as the empty Cmd+K palette), re-checks every
|
|
7692
|
+
* entry against what the viewer may still open and decides how an entry opens.
|
|
7693
|
+
*/
|
|
7694
|
+
interface CockpitRecentItemsSource {
|
|
7695
|
+
/** Changes whenever the history changes; the widget then re-reads {@link items}. */
|
|
7696
|
+
readonly revision?: Signal<unknown>;
|
|
7697
|
+
/** Most recently opened first, at most `limit`, only entries the viewer may still open. */
|
|
7698
|
+
items(limit: number): Promise<CockpitRecentItem[]>;
|
|
7699
|
+
/** Opens an entry on a plain left click (modified clicks are left to the browser). */
|
|
7700
|
+
open(item: CockpitRecentItem): void | Promise<void>;
|
|
7701
|
+
/** Optional: opens the host's command palette, offered as "⌘K shows the same list". */
|
|
7702
|
+
openPalette?(): void;
|
|
7703
|
+
/** Label of the palette shortcut, e.g. "⌘K" or "Ctrl K" (default "Ctrl K"). */
|
|
7704
|
+
readonly paletteShortcut?: string;
|
|
7705
|
+
}
|
|
7706
|
+
/** The host's recent items; without it the "Recent items" widget says "Not available" and collapses. */
|
|
7707
|
+
declare const COCKPIT_RECENT_ITEMS: InjectionToken<CockpitRecentItemsSource>;
|
|
7708
|
+
/** One entry of the "Version" tile, e.g. `{ label: 'Refinery Studio', version: '3.4.120' }`. */
|
|
7709
|
+
interface CockpitVersionEntry {
|
|
7710
|
+
label: string;
|
|
7711
|
+
version: string;
|
|
7712
|
+
}
|
|
7713
|
+
/**
|
|
7714
|
+
* Versions the host knows (AB#5558, system cockpit): its own build and whatever else it can tell.
|
|
7715
|
+
* The backend services expose no version endpoint, so the library has nothing of its own to add.
|
|
7716
|
+
*/
|
|
7717
|
+
interface CockpitVersionSource {
|
|
7718
|
+
/** Most important first: the first entry is the tile's value. */
|
|
7719
|
+
entries(): CockpitVersionEntry[] | Promise<CockpitVersionEntry[]>;
|
|
7720
|
+
}
|
|
7721
|
+
/** The host's versions; without it the "Version" tile says "Not available" and collapses. */
|
|
7722
|
+
declare const COCKPIT_VERSION_SOURCE: InjectionToken<CockpitVersionSource>;
|
|
7723
|
+
/** The host services in one call (`providers: [...provideCockpitWidgetHost({...})]`). */
|
|
7724
|
+
interface CockpitWidgetHost {
|
|
7725
|
+
access?: () => CockpitViewerAccess;
|
|
7726
|
+
links?: () => CockpitLinkResolver;
|
|
7727
|
+
explain?: () => CockpitExplainHandler;
|
|
7728
|
+
recents?: () => CockpitRecentItemsSource;
|
|
7729
|
+
/** Versions for the "Version" tile (AB#5558). */
|
|
7730
|
+
versions?: () => CockpitVersionSource;
|
|
7731
|
+
/** Translated widget texts (AB#5622), fixed or as a signal that follows the language. */
|
|
7732
|
+
messages?: () => CockpitWidgetMessagesSource;
|
|
7733
|
+
}
|
|
7734
|
+
/**
|
|
7735
|
+
* Provides the host services of the cockpit widgets. The factories run in an injection context,
|
|
7736
|
+
* so they may `inject()` the application's services:
|
|
7737
|
+
*
|
|
7738
|
+
* ```ts
|
|
7739
|
+
* provideCockpitWidgetHost({
|
|
7740
|
+
* access: () => { const auth = inject(AuthorizeService); return { isInRole: r => auth.isInRole(r) }; },
|
|
7741
|
+
* links: () => new StudioCockpitLinks()
|
|
7742
|
+
* })
|
|
7743
|
+
* ```
|
|
7744
|
+
*/
|
|
7745
|
+
declare function provideCockpitWidgetHost(host: CockpitWidgetHost): Provider[];
|
|
7746
|
+
|
|
7747
|
+
/**
|
|
7748
|
+
* The cockpit widgets' view of their host (AB#5558): tenant, roles, CK models, links and the
|
|
7749
|
+
* assistant. Every check fails closed — a missing host token, a failing role or model lookup
|
|
7750
|
+
* means "not allowed", so a provider is skipped rather than shown to the wrong viewer.
|
|
7751
|
+
*/
|
|
7752
|
+
declare class CockpitContextService {
|
|
7753
|
+
private readonly tenantIdProvider;
|
|
7754
|
+
private readonly access;
|
|
7755
|
+
private readonly links;
|
|
7756
|
+
private readonly explainHandler;
|
|
7757
|
+
private readonly ckModelService;
|
|
7758
|
+
private readonly configuration;
|
|
7759
|
+
/** The current tenant, or `null` when the host provides none. */
|
|
7760
|
+
tenantId(): Promise<string | null>;
|
|
7761
|
+
/** True when the viewer has every role and the tenant has every CK model. */
|
|
7762
|
+
allows(roles: readonly string[], models?: readonly string[]): Promise<boolean>;
|
|
7763
|
+
/**
|
|
7764
|
+
* Whether `tenantId` is the installation's system tenant (`systemTenantId` of the platform
|
|
7765
|
+
* configuration, `octosystem` when the host has none). Checks about the whole installation
|
|
7766
|
+
* (service health, AB#5558) run only there.
|
|
7767
|
+
*/
|
|
7768
|
+
isSystemTenant(tenantId: string): boolean;
|
|
7769
|
+
/** Whether the viewer is a builder (`CockpitViewerAccess.isBuilder`); fails closed. */
|
|
7770
|
+
isBuilder(): Promise<boolean>;
|
|
7771
|
+
/**
|
|
7772
|
+
* Router URL of a link target, or `null` (no resolver, or the host has no such page). A `route`
|
|
7773
|
+
* target always resolves: the host's rewrite or its own path, with the query parameters
|
|
7774
|
+
* appended (`/acme/documents?checkTier=2`) — for `routerLink` prefer {@link resolveLinkTarget},
|
|
7775
|
+
* which keeps them apart.
|
|
7776
|
+
*/
|
|
7777
|
+
resolveLink(target: CockpitLinkTarget, tenantId: string): string | null;
|
|
7778
|
+
/**
|
|
7779
|
+
* A link target resolved for `routerLink` + `queryParams` (AB#5622), or `null` when there is no
|
|
7780
|
+
* page for it. Semantic targets go through the host's `CockpitLinkResolver`; `route` targets
|
|
7781
|
+
* keep their path unless the resolver rewrites it, and always keep their query parameters.
|
|
7782
|
+
*/
|
|
7783
|
+
resolveLinkTarget(target: CockpitLinkTarget, tenantId: string): CockpitResolvedLink | null;
|
|
7784
|
+
private resolveWithHost;
|
|
7785
|
+
/** Whether "✦ Explain" buttons are shown. */
|
|
7786
|
+
get explainEnabled(): boolean;
|
|
7787
|
+
explain(target: CockpitExplainTarget): void;
|
|
7788
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CockpitContextService, never>;
|
|
7789
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CockpitContextService>;
|
|
7790
|
+
}
|
|
7791
|
+
|
|
7792
|
+
/** Severity of a finding; drives the colour bar and the status chip. */
|
|
7793
|
+
type AttentionSeverity = 'error' | 'warning' | 'info';
|
|
7794
|
+
/** Order of the findings: errors first. */
|
|
7795
|
+
declare const ATTENTION_SEVERITY_ORDER: Record<AttentionSeverity, number>;
|
|
7796
|
+
/** A link chip on a finding: label plus a semantic target the host resolves (`CockpitLinkResolver`). */
|
|
7797
|
+
interface AttentionLink {
|
|
7798
|
+
label: string;
|
|
7799
|
+
target: CockpitLinkTarget;
|
|
7800
|
+
}
|
|
7801
|
+
/**
|
|
7802
|
+
* One rule-based health finding (ui-concept §5.5 phase 1): severity, one line, an explanation and
|
|
7803
|
+
* links to the affected objects. A finding never claims more than its provider's single query
|
|
7804
|
+
* showed.
|
|
7805
|
+
*/
|
|
7806
|
+
interface AttentionFinding {
|
|
7807
|
+
/** Stable id, `<provider id>` or `<provider id>:<sub-key>`. */
|
|
7808
|
+
id: string;
|
|
7809
|
+
severity: AttentionSeverity;
|
|
7810
|
+
title: string;
|
|
7811
|
+
text: string;
|
|
7812
|
+
/**
|
|
7813
|
+
* How many objects the finding is about (AB#5622), shown as a badge next to the title — e.g. the
|
|
7814
|
+
* open items of a work queue. Omitted = no badge (the built-in providers name the count in the
|
|
7815
|
+
* title instead).
|
|
7816
|
+
*/
|
|
7817
|
+
count?: number;
|
|
7818
|
+
links: AttentionLink[];
|
|
7819
|
+
/** What "✦ Explain" hands to the host's assistant (only shown when the host enables it). */
|
|
7820
|
+
explain?: CockpitExplainTarget;
|
|
7821
|
+
}
|
|
7822
|
+
/** What every provider receives. */
|
|
7823
|
+
interface AttentionContext {
|
|
7824
|
+
tenantId: string;
|
|
7825
|
+
}
|
|
7826
|
+
/**
|
|
7827
|
+
* A source of findings for the "Attention list" widget. Contract:
|
|
7828
|
+
*
|
|
7829
|
+
* - `isVisible` checks what the viewer needs to **open** what the finding links to (roles, CK
|
|
7830
|
+
* models) via `CockpitContextService.allows`; a provider that is not visible is never loaded,
|
|
7831
|
+
* so viewers only see findings about objects they may see.
|
|
7832
|
+
* - `load` runs exactly **one** query (GraphQL or REST) and emits the findings once; an empty
|
|
7833
|
+
* array means "nothing to report" (no placeholder findings).
|
|
7834
|
+
* - Errors are swallowed by `CockpitAttentionService` (logged, provider skipped).
|
|
7835
|
+
*
|
|
7836
|
+
* Library providers cover the generic platform checks; a host adds its own with
|
|
7837
|
+
* `{ provide: COCKPIT_ATTENTION_PROVIDERS, useClass: MyProvider, multi: true }`.
|
|
7838
|
+
*/
|
|
7839
|
+
interface AttentionProvider {
|
|
7840
|
+
/** Stable id, persisted in the widget config (`providerIds`). Never rename. */
|
|
7841
|
+
readonly id: string;
|
|
7842
|
+
/** Name in the widget's config dialog. */
|
|
7843
|
+
readonly label: string;
|
|
7844
|
+
/** One line in the config dialog: what is checked and who sees it. */
|
|
7845
|
+
readonly description: string;
|
|
7846
|
+
isVisible(context: AttentionContext): Promise<boolean>;
|
|
7847
|
+
load(context: AttentionContext): Observable<AttentionFinding[]>;
|
|
7848
|
+
}
|
|
7849
|
+
/** Multi provider token of the attention sources (built-in ones come with `provideCockpitWidgets()`). */
|
|
7850
|
+
declare const COCKPIT_ATTENTION_PROVIDERS: InjectionToken<AttentionProvider[]>;
|
|
7851
|
+
/** Sorts findings by severity, keeping the provider order within one severity. */
|
|
7852
|
+
declare function sortAttentionFindings(findings: AttentionFinding[]): AttentionFinding[];
|
|
7853
|
+
/**
|
|
7854
|
+
* "pool-a, pool-b and 3 more" — names of the affected objects, capped at `max`; `total` counts
|
|
7855
|
+
* objects whose names were not fetched.
|
|
7856
|
+
*/
|
|
7857
|
+
declare function nameList(names: string[], max?: number, total?: number): string;
|
|
7858
|
+
/** "1 pool" / "3 pools". */
|
|
7859
|
+
declare function plural(count: number, singular: string, pluralForm?: string): string;
|
|
7860
|
+
/** "3 adapters", or "≥ 3 adapters" when the count comes from a capped read. */
|
|
7861
|
+
declare function countLabel(count: number, singular: string, atLeast?: boolean, pluralForm?: string): string;
|
|
7862
|
+
|
|
7863
|
+
/** Name and description of a registered provider (for the config dialog). */
|
|
7864
|
+
interface AttentionProviderInfo {
|
|
7865
|
+
id: string;
|
|
7866
|
+
label: string;
|
|
7867
|
+
description: string;
|
|
7868
|
+
}
|
|
7869
|
+
/** What the attention list shows while and after its providers run. */
|
|
7870
|
+
interface AttentionState {
|
|
7871
|
+
/** Findings so far, sorted error → warning → info. */
|
|
7872
|
+
findings: AttentionFinding[];
|
|
7873
|
+
/** True while a visible provider has not answered yet. */
|
|
7874
|
+
loading: boolean;
|
|
7875
|
+
/** Providers the viewer may see (0: nothing can be checked for this viewer). */
|
|
7876
|
+
visibleProviders: number;
|
|
7877
|
+
}
|
|
7878
|
+
/**
|
|
7879
|
+
* Runs the attention providers (AB#5558, from the Home cockpit of AB#5545). Each provider is
|
|
7880
|
+
* checked for visibility first (roles / CK models), then loaded once; providers run in parallel
|
|
7881
|
+
* and their findings stream in, sorted by severity. A failing provider only removes its own
|
|
7882
|
+
* findings.
|
|
7883
|
+
*/
|
|
7884
|
+
declare class CockpitAttentionService {
|
|
7885
|
+
private readonly providers;
|
|
7886
|
+
/** Every registered provider, in registration order. */
|
|
7887
|
+
availableProviders(): AttentionProviderInfo[];
|
|
7888
|
+
/**
|
|
7889
|
+
* Runs the providers named in `providerIds` (all when empty / undefined; unknown ids are
|
|
7890
|
+
* ignored, so a board saved with a provider the host no longer has still loads).
|
|
7891
|
+
*/
|
|
7892
|
+
state(context: AttentionContext, providerIds?: readonly string[] | null): Observable<AttentionState>;
|
|
7893
|
+
/** Findings only (the Home fallback strip). */
|
|
7894
|
+
findings(context: AttentionContext, providerIds?: readonly string[] | null): Observable<AttentionFinding[]>;
|
|
7895
|
+
private run;
|
|
7896
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CockpitAttentionService, never>;
|
|
7897
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CockpitAttentionService>;
|
|
7898
|
+
}
|
|
7899
|
+
/** The providers a widget runs: all when `ids` is empty, else the named ones in registration order. */
|
|
7900
|
+
declare function selectProviders(providers: readonly AttentionProvider[], ids?: readonly string[] | null): AttentionProvider[];
|
|
7901
|
+
|
|
7902
|
+
/**
|
|
7903
|
+
* CK models in `ResolveFailed`: their data is intact, but their types are not served (typically
|
|
7904
|
+
* after a dependency such as System was bumped). Links to the model libraries, so it needs the
|
|
7905
|
+
* same role as that page (AdminPanelManagement). Shares its query with the "CK model state" KPI.
|
|
7906
|
+
*/
|
|
7907
|
+
declare class CkModelsResolveFailedAttentionProvider implements AttentionProvider {
|
|
7908
|
+
private readonly context;
|
|
7909
|
+
private readonly ckModelStates;
|
|
7910
|
+
readonly id = "ck-models-resolve-failed";
|
|
7911
|
+
readonly label = "CK models in ResolveFailed";
|
|
7912
|
+
readonly description = "Construction Kit models whose types are not served. Viewers with AdminPanelManagement.";
|
|
7913
|
+
isVisible(): Promise<boolean>;
|
|
7914
|
+
load(context: AttentionContext): Observable<AttentionFinding[]>;
|
|
7915
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CkModelsResolveFailedAttentionProvider, never>;
|
|
7916
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CkModelsResolveFailedAttentionProvider>;
|
|
7917
|
+
}
|
|
7918
|
+
|
|
7919
|
+
/**
|
|
7920
|
+
* Adapters in error (deployment or configuration failed) and adapters expected to run that stayed
|
|
7921
|
+
* offline (Helm-deployed and edge/local alike). One query (shared with the "Adapter status" KPI),
|
|
7922
|
+
* up to two findings; capped reads say "≥". Needs what the adapters page needs.
|
|
7923
|
+
*/
|
|
7924
|
+
declare class AdaptersAttentionProvider implements AttentionProvider {
|
|
7925
|
+
private readonly context;
|
|
7926
|
+
private readonly adapterStates;
|
|
7927
|
+
readonly id = "adapters";
|
|
7928
|
+
readonly label = "Adapters in error or offline";
|
|
7929
|
+
readonly description = "Failed deployments or configurations, and adapters offline for more than 10 minutes. Viewers with CommunicationManagement.";
|
|
7930
|
+
isVisible(): Promise<boolean>;
|
|
7931
|
+
load(context: AttentionContext): Observable<AttentionFinding[]>;
|
|
7932
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AdaptersAttentionProvider, never>;
|
|
7933
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AdaptersAttentionProvider>;
|
|
7934
|
+
}
|
|
7935
|
+
|
|
7936
|
+
/**
|
|
7937
|
+
* Deployment sites (`System.Communication/DeploymentSite`, called "pools" before
|
|
7938
|
+
* System.Communication 4.x) no Communication Operator has registered for: the adapters and
|
|
7939
|
+
* applications they host are not rolled out. Needs what the deployment sites page needs
|
|
7940
|
+
* (CommunicationManagement + System.Communication).
|
|
7941
|
+
*
|
|
7942
|
+
* The class name and the provider id `pools-unregistered` keep the pre-4.x wording on purpose:
|
|
7943
|
+
* the id is persisted in attention-list widget configs (`providerIds`) and must never change
|
|
7944
|
+
* (AB#5842).
|
|
7945
|
+
*/
|
|
7946
|
+
declare class UnregisteredPoolsAttentionProvider implements AttentionProvider {
|
|
7947
|
+
private readonly context;
|
|
7948
|
+
private readonly sitesGql;
|
|
7949
|
+
/** Persisted in widget configs — stable since AB#5558, deliberately not renamed in AB#5842. */
|
|
7950
|
+
readonly id = "pools-unregistered";
|
|
7951
|
+
readonly label = "Deployment sites not registered";
|
|
7952
|
+
readonly description = "Deployment sites without a connected Communication Operator. Viewers with CommunicationManagement.";
|
|
7953
|
+
isVisible(): Promise<boolean>;
|
|
7954
|
+
load(): Observable<AttentionFinding[]>;
|
|
7955
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UnregisteredPoolsAttentionProvider, never>;
|
|
7956
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<UnregisteredPoolsAttentionProvider>;
|
|
7957
|
+
}
|
|
7958
|
+
|
|
7959
|
+
/** Thresholds of the "Failed pipeline executions" check (AB#5622). */
|
|
7960
|
+
interface FailedExecutionsAttentionOptions {
|
|
7961
|
+
/** Failed executions in the last 24 h from which a finding is shown (warning). Default: 10 */
|
|
7962
|
+
minFailed: number;
|
|
7963
|
+
/** Failed executions from which the finding is an error. `null` = never by count. Default: 1000 */
|
|
7964
|
+
errorFailed: number | null;
|
|
7965
|
+
/**
|
|
7966
|
+
* Share of failed executions (0–1, of all executions in 24 h) from which the finding is an error,
|
|
7967
|
+
* once `minFailed` is reached. `null` = never by ratio. Default: 0.2 (20 %)
|
|
7968
|
+
*/
|
|
7969
|
+
errorRatio: number | null;
|
|
7970
|
+
}
|
|
7971
|
+
/** Defaults: a warning from 10 failures, an error from 1,000 failures or a failure share of 20 %. */
|
|
7972
|
+
declare const DEFAULT_FAILED_EXECUTIONS_OPTIONS: Readonly<FailedExecutionsAttentionOptions>;
|
|
7973
|
+
/**
|
|
7974
|
+
* Optional: the host's thresholds of the "Failed pipeline executions" check; missing members keep
|
|
7975
|
+
* {@link DEFAULT_FAILED_EXECUTIONS_OPTIONS}.
|
|
7976
|
+
*/
|
|
7977
|
+
declare const COCKPIT_FAILED_EXECUTIONS_OPTIONS: InjectionToken<Partial<FailedExecutionsAttentionOptions>>;
|
|
7978
|
+
/** The finding's severity for the counts, or `null` when the counts stay below the thresholds. */
|
|
7979
|
+
declare function failedExecutionsSeverity(failed: number, total: number, options: FailedExecutionsAttentionOptions): 'error' | 'warning' | null;
|
|
7980
|
+
/**
|
|
7981
|
+
* Failed pipeline executions in the last 24 hours above a threshold (AB#5622): the same data and
|
|
7982
|
+
* counting as the "Pipeline executions 24 h" KPI, whose request it shares
|
|
7983
|
+
* (`CockpitDataFlowExecutionsService`). Texts from `COCKPIT_WIDGET_MESSAGES`, thresholds from
|
|
7984
|
+
* `COCKPIT_FAILED_EXECUTIONS_OPTIONS`. Needs what the Data Flows page needs.
|
|
7985
|
+
*/
|
|
7986
|
+
declare class FailedExecutionsAttentionProvider implements AttentionProvider {
|
|
7987
|
+
private readonly context;
|
|
7988
|
+
private readonly executions;
|
|
7989
|
+
private readonly messagesSource;
|
|
7990
|
+
private readonly options;
|
|
7991
|
+
readonly id = "pipeline-executions-failed";
|
|
7992
|
+
readonly label = "Failed pipeline executions";
|
|
7993
|
+
readonly description = "Pipeline executions that failed in the last 24 hours, above a threshold. Viewers with CommunicationManagement.";
|
|
7994
|
+
isVisible(): Promise<boolean>;
|
|
7995
|
+
load(context: AttentionContext): Observable<AttentionFinding[]>;
|
|
7996
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FailedExecutionsAttentionProvider, never>;
|
|
7997
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<FailedExecutionsAttentionProvider>;
|
|
7998
|
+
}
|
|
7999
|
+
|
|
8000
|
+
/**
|
|
8001
|
+
* An unconfigured optional service is an empty URL; older platform-services answered `/` (same
|
|
8002
|
+
* rule as the Studio's Tenant Features panel).
|
|
8003
|
+
*/
|
|
8004
|
+
declare function isServiceConfigured(url: string | undefined | null): boolean;
|
|
8005
|
+
/** Capabilities switched on for the tenant whose service is not part of this installation. */
|
|
8006
|
+
declare function enabledButNotInstalled(status: TenantFeaturesStatus | null, config: {
|
|
8007
|
+
reportingServices?: string | null;
|
|
8008
|
+
aiServices?: string | null;
|
|
8009
|
+
} | undefined): string[];
|
|
8010
|
+
/**
|
|
8011
|
+
* A capability enabled for the tenant whose service is not installed: the tenant delete/detach
|
|
8012
|
+
* guard keeps refusing (AB#4255). One REST call — the aggregate feature status (AB#4884). Links
|
|
8013
|
+
* to the tenant settings, so it needs TenantManagement.
|
|
8014
|
+
*/
|
|
8015
|
+
declare class FeaturesNotInstalledAttentionProvider implements AttentionProvider {
|
|
8016
|
+
private readonly context;
|
|
8017
|
+
private readonly assetRepoService;
|
|
8018
|
+
private readonly configurationService;
|
|
8019
|
+
readonly id = "features-not-installed";
|
|
8020
|
+
readonly label = "Features enabled but not installed";
|
|
8021
|
+
readonly description = "Reporting, AI Services or Stream Data enabled for the tenant without the service. Viewers with TenantManagement.";
|
|
8022
|
+
isVisible(): Promise<boolean>;
|
|
8023
|
+
load(context: AttentionContext): Observable<AttentionFinding[]>;
|
|
8024
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FeaturesNotInstalledAttentionProvider, never>;
|
|
8025
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<FeaturesNotInstalledAttentionProvider>;
|
|
8026
|
+
}
|
|
8027
|
+
|
|
8028
|
+
/**
|
|
8029
|
+
* Platform services whose health check is not Healthy (system cockpit, AB#5558): one finding per
|
|
8030
|
+
* service — unhealthy or not answering is an error, degraded a warning — linking to the service's
|
|
8031
|
+
* health details. The services serve the whole installation, so the check runs on the system
|
|
8032
|
+
* tenant only (tenant cockpits are unchanged). Shares its requests with the "Services healthy" KPI.
|
|
8033
|
+
*/
|
|
8034
|
+
declare class ServicesHealthAttentionProvider implements AttentionProvider {
|
|
8035
|
+
private readonly context;
|
|
8036
|
+
/** Resolved on first load: hosts and tests that never run the check need no data providers. */
|
|
8037
|
+
private readonly injector;
|
|
8038
|
+
private readonly messagesSource;
|
|
8039
|
+
readonly id = "services-unhealthy";
|
|
8040
|
+
readonly label = "Platform services with problems";
|
|
8041
|
+
readonly description = "Identity, Asset Repository, Bot or Communication Controller not healthy. System tenant only.";
|
|
8042
|
+
isVisible(context: AttentionContext): Promise<boolean>;
|
|
8043
|
+
load(): Observable<AttentionFinding[]>;
|
|
8044
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ServicesHealthAttentionProvider, never>;
|
|
8045
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ServicesHealthAttentionProvider>;
|
|
8046
|
+
}
|
|
8047
|
+
|
|
8048
|
+
/**
|
|
8049
|
+
* Installed blueprints with a newer catalog version (system cockpit, AB#5558): one info finding
|
|
8050
|
+
* with the count as badge, linking to the installed blueprints. Service-managed blueprints
|
|
8051
|
+
* (`System.*`) are named separately — their service applies them. Runs on the system tenant only
|
|
8052
|
+
* for now (it reads the catalogs, so tenant cockpits do not pay for it); same role as the
|
|
8053
|
+
* Blueprints pages. Shares its request with the "Blueprint updates" KPI.
|
|
8054
|
+
*/
|
|
8055
|
+
declare class BlueprintUpdatesAttentionProvider implements AttentionProvider {
|
|
8056
|
+
private readonly context;
|
|
8057
|
+
/** Resolved on first load: hosts and tests that never run the check need no data providers. */
|
|
8058
|
+
private readonly injector;
|
|
8059
|
+
private readonly messagesSource;
|
|
8060
|
+
readonly id = "blueprint-updates";
|
|
8061
|
+
readonly label = "Blueprint updates available";
|
|
8062
|
+
readonly description = "Installed blueprints with a newer version in the catalogs. System tenant, viewers with AdminPanelManagement.";
|
|
8063
|
+
isVisible(context: AttentionContext): Promise<boolean>;
|
|
8064
|
+
load(context: AttentionContext): Observable<AttentionFinding[]>;
|
|
8065
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BlueprintUpdatesAttentionProvider, never>;
|
|
8066
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<BlueprintUpdatesAttentionProvider>;
|
|
8067
|
+
}
|
|
8068
|
+
|
|
8069
|
+
type CockpitBlueprintStatusQueryDto = {
|
|
8070
|
+
__typename?: 'OctoQuery';
|
|
8071
|
+
blueprints?: {
|
|
8072
|
+
__typename?: 'BlueprintsQuery';
|
|
8073
|
+
installations: Array<{
|
|
8074
|
+
__typename?: 'BlueprintInstallation';
|
|
8075
|
+
blueprintId: string;
|
|
8076
|
+
isDependency: boolean;
|
|
8077
|
+
}>;
|
|
8078
|
+
list: {
|
|
8079
|
+
__typename?: 'BlueprintListResponse';
|
|
8080
|
+
totalCount: number;
|
|
8081
|
+
items: Array<{
|
|
8082
|
+
__typename?: 'Blueprint';
|
|
8083
|
+
name: string;
|
|
8084
|
+
version: string;
|
|
8085
|
+
}>;
|
|
8086
|
+
};
|
|
8087
|
+
} | null;
|
|
8088
|
+
};
|
|
8089
|
+
|
|
8090
|
+
/** Catalog entries read with the installations (one page; the catalog lists one entry per name and version). */
|
|
8091
|
+
declare const COCKPIT_BLUEPRINT_CATALOG_LIMIT = 500;
|
|
8092
|
+
/**
|
|
8093
|
+
* Blueprints whose name starts with `System.` are service-managed: the owning service applies and
|
|
8094
|
+
* rolls them forward per tenant (mirrors `BlueprintIdExtensions.IsServiceManaged`).
|
|
8095
|
+
*/
|
|
8096
|
+
declare const SERVICE_MANAGED_BLUEPRINT_PREFIX = "System.";
|
|
8097
|
+
/** One installed blueprint with the highest version the catalogs offer for its name. */
|
|
8098
|
+
interface CockpitBlueprintUpdate {
|
|
8099
|
+
name: string;
|
|
8100
|
+
installedVersion: string;
|
|
8101
|
+
availableVersion: string;
|
|
8102
|
+
isServiceManaged: boolean;
|
|
8103
|
+
}
|
|
8104
|
+
/** Installed blueprints of the tenant compared with the catalogs (AB#5558, system cockpit). */
|
|
8105
|
+
interface CockpitBlueprintStatus {
|
|
8106
|
+
/** Installed root blueprints (dependencies pulled in by another blueprint are not counted). */
|
|
8107
|
+
installed: number;
|
|
8108
|
+
/** Installed blueprints with a strictly higher catalog version; installed by the tenant first, then service-managed. */
|
|
8109
|
+
updates: CockpitBlueprintUpdate[];
|
|
8110
|
+
/** Catalog entries read and available; more available than read = updates may be missing. */
|
|
8111
|
+
catalogRead: number;
|
|
8112
|
+
catalogTotal: number;
|
|
8113
|
+
}
|
|
8114
|
+
/**
|
|
8115
|
+
* `Name-Version` → parts. Splits at the last dash, like the Studio's blueprint pages (a `CkVersion`
|
|
8116
|
+
* never contains a dash).
|
|
8117
|
+
*/
|
|
8118
|
+
declare function splitBlueprintId(blueprintId: string): {
|
|
8119
|
+
name: string;
|
|
8120
|
+
version: string;
|
|
8121
|
+
};
|
|
8122
|
+
/**
|
|
8123
|
+
* Compares two blueprint versions like the backend's `CkVersion` (`Major.Minor.Revision`,
|
|
8124
|
+
* numeric, missing components 0): negative when `a` is older, positive when newer. A string
|
|
8125
|
+
* comparison would rate `2.10.0` below `2.9.0` (AB#4837).
|
|
8126
|
+
*/
|
|
8127
|
+
declare function compareBlueprintVersions(a: string, b: string): number;
|
|
8128
|
+
/** The status from one `cockpitBlueprintStatus` answer. */
|
|
8129
|
+
declare function toBlueprintStatus(data: CockpitBlueprintStatusQueryDto | null | undefined): CockpitBlueprintStatus;
|
|
8130
|
+
/**
|
|
8131
|
+
* The tenant's blueprint status, shared for a few seconds per tenant between the "Blueprint
|
|
8132
|
+
* updates" KPI and the attention check.
|
|
8133
|
+
*/
|
|
8134
|
+
declare class CockpitBlueprintStatusService {
|
|
8135
|
+
private readonly gql;
|
|
8136
|
+
private readonly shared;
|
|
8137
|
+
status(tenantId: string, now?: number): Observable<CockpitBlueprintStatus>;
|
|
8138
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CockpitBlueprintStatusService, never>;
|
|
8139
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CockpitBlueprintStatusService>;
|
|
8140
|
+
}
|
|
8141
|
+
|
|
8142
|
+
/** Child tenants of the current tenant (the system tenant: every tenant of the installation). */
|
|
8143
|
+
interface CockpitChildTenants {
|
|
8144
|
+
total: number;
|
|
8145
|
+
/** Ids of the first tenants (for the detail line). */
|
|
8146
|
+
firstIds: string[];
|
|
8147
|
+
}
|
|
8148
|
+
/** Tenant ids read with the count. */
|
|
8149
|
+
declare const COCKPIT_CHILD_TENANT_IDS = 3;
|
|
8150
|
+
/**
|
|
8151
|
+
* Child tenant count (AB#5558, system cockpit) from the asset repository's tenant list
|
|
8152
|
+
* (`GET {tenantId}/v1/tenants`, the Child Tenants page). The list only knows id and database —
|
|
8153
|
+
* there is no per-tenant state (enabled, mode, health) to group by.
|
|
8154
|
+
*/
|
|
8155
|
+
declare class CockpitChildTenantsService {
|
|
8156
|
+
private readonly assetRepo;
|
|
8157
|
+
childTenants(): Observable<CockpitChildTenants>;
|
|
8158
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CockpitChildTenantsService, never>;
|
|
8159
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CockpitChildTenantsService>;
|
|
8160
|
+
}
|
|
8161
|
+
|
|
8162
|
+
/** Platform services the cockpit checks (the keys of the Studio's `health/:serviceType` page). */
|
|
8163
|
+
type CockpitServiceKey = 'identity' | 'asset-repository' | 'bot' | 'communication-controller';
|
|
8164
|
+
/** Health of one platform service. `unknown`: the health endpoint did not answer. */
|
|
8165
|
+
type CockpitServiceHealthStatus = 'healthy' | 'degraded' | 'unhealthy' | 'unknown';
|
|
8166
|
+
interface CockpitServiceHealth {
|
|
8167
|
+
service: CockpitServiceKey;
|
|
8168
|
+
/** English display name ("Identity"). */
|
|
8169
|
+
name: string;
|
|
8170
|
+
status: CockpitServiceHealthStatus;
|
|
8171
|
+
}
|
|
8172
|
+
/** Display names, in check order. */
|
|
8173
|
+
declare const COCKPIT_SERVICE_NAMES: Readonly<Record<CockpitServiceKey, string>>;
|
|
8174
|
+
/** `HealthCheck` → status (`null` = no answer). */
|
|
8175
|
+
declare function toServiceHealthStatus(check: HealthCheck | null | undefined): CockpitServiceHealthStatus;
|
|
8176
|
+
/**
|
|
8177
|
+
* Health of the platform services (AB#5558, system cockpit): the same `/health` endpoints as the
|
|
8178
|
+
* MeshBoard's service health tiles, all at once, shared for a few seconds between the "Services"
|
|
8179
|
+
* KPI and the attention check. Optional services that are not part of the installation (empty
|
|
8180
|
+
* URL, or `/` from older platform-services) are left out.
|
|
8181
|
+
*/
|
|
8182
|
+
declare class CockpitServiceHealthService {
|
|
8183
|
+
private readonly health;
|
|
8184
|
+
private readonly configuration;
|
|
8185
|
+
private shared;
|
|
8186
|
+
services(now?: number): Observable<CockpitServiceHealth[]>;
|
|
8187
|
+
private check;
|
|
8188
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CockpitServiceHealthService, never>;
|
|
8189
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CockpitServiceHealthService>;
|
|
8190
|
+
}
|
|
8191
|
+
|
|
8192
|
+
type CockpitAdapterStatesQueryDto = {
|
|
8193
|
+
__typename?: 'OctoQuery';
|
|
8194
|
+
runtime?: {
|
|
8195
|
+
__typename?: 'RuntimeModelQuery';
|
|
8196
|
+
systemCommunicationAdapter?: {
|
|
8197
|
+
__typename?: 'SystemCommunicationAdapterConnection';
|
|
8198
|
+
totalCount?: number | null;
|
|
8199
|
+
items?: Array<{
|
|
8200
|
+
__typename?: 'SystemCommunicationAdapter';
|
|
8201
|
+
rtId: any;
|
|
8202
|
+
name?: string | null;
|
|
8203
|
+
communicationState: Types.SystemCommunicationCommunicationStateDto;
|
|
8204
|
+
communicationStateTimestamp?: any | null;
|
|
8205
|
+
deploymentState: Types.SystemCommunicationDeploymentStateDto;
|
|
8206
|
+
configurationState: Types.SystemCommunicationConfigurationStateDto;
|
|
8207
|
+
lifecycleState: Types.SystemCommunicationLifecycleStateDto;
|
|
8208
|
+
} | null> | null;
|
|
8209
|
+
} | null;
|
|
8210
|
+
} | null;
|
|
8211
|
+
};
|
|
8212
|
+
|
|
8213
|
+
/** One adapter row of `cockpitAdapterStates`. */
|
|
8214
|
+
type CockpitAdapterState = NonNullable<NonNullable<NonNullable<NonNullable<CockpitAdapterStatesQueryDto['runtime']>['systemCommunicationAdapter']>['items']>[number]>;
|
|
8215
|
+
/** The adapters read for the cockpit and how many the tenant has in total. */
|
|
8216
|
+
interface CockpitAdapterStates {
|
|
8217
|
+
states: CockpitAdapterState[];
|
|
8218
|
+
/** `totalCount` of the connection; larger than `states.length` when the read was capped. */
|
|
8219
|
+
totalCount: number;
|
|
8220
|
+
}
|
|
8221
|
+
/** Upper bound of adapters read; beyond it the KPI and findings say "≥" / "first N". */
|
|
8222
|
+
declare const COCKPIT_ADAPTER_LIMIT = 500;
|
|
8223
|
+
/** A running adapter offline for longer than this is reported (ui-concept §5.5). */
|
|
8224
|
+
declare const ADAPTER_OFFLINE_GRACE_MS: number;
|
|
8225
|
+
/**
|
|
8226
|
+
* The adapter states behind the "Adapter status" KPI and the adapters provider of the attention
|
|
8227
|
+
* list. Both ask within the same board load, so one request per tenant is shared for a few
|
|
8228
|
+
* seconds. Keyed by tenant: the service is a root singleton and a tenant switch must never show
|
|
8229
|
+
* the previous tenant's adapters.
|
|
8230
|
+
*/
|
|
8231
|
+
declare class CockpitAdapterStatesService {
|
|
8232
|
+
private readonly gql;
|
|
8233
|
+
private readonly shared;
|
|
8234
|
+
states(tenantId: string, now?: number): Observable<CockpitAdapterStates>;
|
|
8235
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CockpitAdapterStatesService, never>;
|
|
8236
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CockpitAdapterStatesService>;
|
|
8237
|
+
}
|
|
8238
|
+
/** Adapters whose deployment or configuration failed. */
|
|
8239
|
+
declare function adaptersInError<T extends Pick<CockpitAdapterState, 'deploymentState' | 'configurationState'>>(states: T[]): T[];
|
|
8240
|
+
/**
|
|
8241
|
+
* Adapters expected to run that have not been online for the grace period (Helm-deployed and
|
|
8242
|
+
* edge/local alike, see `utils/adapter-online.ts`); on-demand adapters at rest are not reported.
|
|
8243
|
+
*/
|
|
8244
|
+
declare function adaptersOffline<T extends Pick<CockpitAdapterState, 'communicationState' | 'deploymentState' | 'lifecycleState' | 'communicationStateTimestamp'>>(states: T[], now: number): T[];
|
|
8245
|
+
|
|
8246
|
+
/** A data flow of `cockpitDataFlowExecutions`: its child pipelines with statistics and latest execution. */
|
|
8247
|
+
interface CockpitDataFlowRow {
|
|
8248
|
+
children?: {
|
|
8249
|
+
items?: (unknown | null)[] | null;
|
|
8250
|
+
} | null;
|
|
8251
|
+
}
|
|
8252
|
+
/** The data flows read for the cockpit and how many the tenant has in total. */
|
|
8253
|
+
interface CockpitDataFlowExecutions {
|
|
8254
|
+
flows: CockpitDataFlowRow[];
|
|
8255
|
+
/** `totalCount` of the connection; larger than `flows.length` when the read was capped. */
|
|
8256
|
+
totalCount: number;
|
|
8257
|
+
}
|
|
8258
|
+
/** Executions of the last 24 hours, summed over the data flows read. */
|
|
8259
|
+
interface CockpitExecutionCounts {
|
|
8260
|
+
succeeded: number;
|
|
8261
|
+
failed: number;
|
|
8262
|
+
}
|
|
8263
|
+
/** Upper bound of data flows read for the executions KPI; beyond it the tile says "≥". */
|
|
8264
|
+
declare const COCKPIT_DATA_FLOW_LIMIT = 500;
|
|
8265
|
+
/**
|
|
8266
|
+
* The data flows behind the "Pipeline executions 24 h" KPI and the failed-executions provider of
|
|
8267
|
+
* the attention list (AB#5622). Both ask within the same board load, so one request per tenant
|
|
8268
|
+
* is shared for a few seconds. Keyed by tenant; a failed request is not kept, so the next board
|
|
8269
|
+
* load asks again.
|
|
8270
|
+
*/
|
|
8271
|
+
declare class CockpitDataFlowExecutionsService {
|
|
8272
|
+
private readonly gql;
|
|
8273
|
+
private readonly shared;
|
|
8274
|
+
executions(tenantId: string, now?: number): Observable<CockpitDataFlowExecutions>;
|
|
8275
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CockpitDataFlowExecutionsService, never>;
|
|
8276
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CockpitDataFlowExecutionsService>;
|
|
8277
|
+
}
|
|
8278
|
+
/**
|
|
8279
|
+
* Executions of the last 24 hours over all flows, counted exactly like the Studio's Data Flows
|
|
8280
|
+
* list (`countPipelineExecutions` per data flow), so the KPI, the attention list and the list agree.
|
|
8281
|
+
*/
|
|
8282
|
+
declare function countFlowExecutions(flows: CockpitDataFlowRow[]): CockpitExecutionCounts;
|
|
8283
|
+
|
|
8284
|
+
/** Status of a KPI tile, rendered as a chip (dot + label, never colour alone). */
|
|
8285
|
+
type CockpitKpiStatus = 'success' | 'warning' | 'error' | 'neutral';
|
|
8286
|
+
/** One cockpit KPI (a widget tile, or a tile of the Studio's Home fallback strip). */
|
|
8287
|
+
interface CockpitKpi {
|
|
8288
|
+
id: string;
|
|
8289
|
+
label: string;
|
|
8290
|
+
/** Display value, already formatted (tabular numerals). */
|
|
8291
|
+
value: string;
|
|
8292
|
+
/** Secondary line under the value. */
|
|
8293
|
+
detail?: string;
|
|
8294
|
+
status: CockpitKpiStatus;
|
|
8295
|
+
statusLabel: string;
|
|
8296
|
+
/** Page the tile opens (resolved by the host). */
|
|
8297
|
+
link?: CockpitLinkTarget;
|
|
8298
|
+
/** Hourly values (oldest first) for the sparkline. */
|
|
8299
|
+
sparkline?: number[];
|
|
8300
|
+
/** Accessible summary of the sparkline, including failures. */
|
|
8301
|
+
sparklineLabel?: string;
|
|
8302
|
+
}
|
|
8303
|
+
/** Counts of `cockpitCkModelStates`. */
|
|
8304
|
+
interface CockpitCkModelCounts {
|
|
8305
|
+
total: number;
|
|
8306
|
+
available: number;
|
|
8307
|
+
importing: number;
|
|
8308
|
+
resolveFailed: number;
|
|
8309
|
+
/** Full names of (the first) models in ResolveFailed. */
|
|
8310
|
+
resolveFailedNames: string[];
|
|
8311
|
+
}
|
|
8312
|
+
/** "1,284" (en-US), or in the given BCP 47 locale ("1.284" for de-DE). */
|
|
8313
|
+
declare function formatCount(value: number, locale?: string): string;
|
|
8314
|
+
/** "based on the first 500 of 620 adapters" when a read was capped, else undefined. */
|
|
8315
|
+
declare function truncationNote(read: number, total: number, noun: string): string | undefined;
|
|
8316
|
+
/**
|
|
8317
|
+
* "Adapter status x / y" with the one adapter online rule (`utils/adapter-online.ts`): y counts
|
|
8318
|
+
* the adapters expected to run — Helm-deployed, online edge/local ones and registered adapters
|
|
8319
|
+
* without a Helm chart — x those online. On-demand adapters at rest are offline on purpose and do
|
|
8320
|
+
* not warn. Texts from `messages` (English by default, AB#5622).
|
|
8321
|
+
*/
|
|
8322
|
+
declare function adapterKpi({ states, totalCount }: CockpitAdapterStates, messages?: CockpitWidgetMessages): CockpitKpi;
|
|
8323
|
+
/**
|
|
8324
|
+
* "Pipeline executions 24 h", computed exactly like the Studio's Data Flows list
|
|
8325
|
+
* (`countPipelineExecutions` per data flow, the hourly histogram per flow anchored on the newest
|
|
8326
|
+
* statistics update, AB#5583), then summed over the flows — so the cockpit and the list agree.
|
|
8327
|
+
* Texts from `messages` (English by default, AB#5622).
|
|
8328
|
+
*/
|
|
8329
|
+
declare function executionKpi(flows: CockpitDataFlowRow[], totalCount?: number, messages?: CockpitWidgetMessages): CockpitKpi;
|
|
8330
|
+
/**
|
|
8331
|
+
* "CK model state": models available of all installed models. ResolveFailed is an error (the
|
|
8332
|
+
* data is intact, but the types are not served), importing is shown as progress. Texts from
|
|
8333
|
+
* `messages` (English by default, AB#5622).
|
|
8334
|
+
*/
|
|
8335
|
+
declare function ckModelKpi(counts: CockpitCkModelCounts, messages?: CockpitWidgetMessages): CockpitKpi;
|
|
8336
|
+
/**
|
|
8337
|
+
* "Tenants" (system cockpit, AB#5558): child tenants of the current tenant — on the system tenant
|
|
8338
|
+
* every tenant of the installation. The tenant list has no state, so the tile counts only.
|
|
8339
|
+
*/
|
|
8340
|
+
declare function tenantCountKpi(tenants: CockpitChildTenants, messages?: CockpitWidgetMessages): CockpitKpi;
|
|
8341
|
+
/**
|
|
8342
|
+
* "Blueprint updates" (system cockpit, AB#5558): installed blueprints with a newer catalog
|
|
8343
|
+
* version. Only blueprints the tenant installed count as updates to act on (warning);
|
|
8344
|
+
* service-managed ones (`System.*`) are applied by their service and only named in the detail.
|
|
8345
|
+
*/
|
|
8346
|
+
declare function blueprintUpdatesKpi(status: CockpitBlueprintStatus, messages?: CockpitWidgetMessages): CockpitKpi;
|
|
8347
|
+
/** The display word of a service health state (`degraded`, `unhealthy`, `not reachable`). */
|
|
8348
|
+
declare function serviceStateText(state: CockpitServiceHealthStatus, messages?: CockpitWidgetMessages): string;
|
|
8349
|
+
/**
|
|
8350
|
+
* "Services healthy" (system cockpit, AB#5558): platform services whose health check reports
|
|
8351
|
+
* Healthy, of all checked. Unhealthy and not answering are errors, degraded a warning; the tile
|
|
8352
|
+
* opens the health details of the first service with a problem (else Identity).
|
|
8353
|
+
*/
|
|
8354
|
+
declare function servicesHealthKpi(services: CockpitServiceHealth[], messages?: CockpitWidgetMessages): CockpitKpi;
|
|
8355
|
+
/** "Version" (system cockpit, AB#5558): the host's versions; the first is the value. No page behind it. */
|
|
8356
|
+
declare function versionKpi(entries: CockpitVersionEntry[], messages?: CockpitWidgetMessages): CockpitKpi;
|
|
8357
|
+
/** SVG paths of a sparkline in a `width` × `height` box (line, filled area, last point). */
|
|
8358
|
+
interface SparklineGeometry {
|
|
8359
|
+
line: string;
|
|
8360
|
+
area: string;
|
|
8361
|
+
lastX: number;
|
|
8362
|
+
lastY: number;
|
|
8363
|
+
}
|
|
8364
|
+
/** Scales the values to the box; the tallest value touches the top padding. */
|
|
8365
|
+
declare function sparklineGeometry(values: number[], width?: number, height?: number, padding?: number): SparklineGeometry | null;
|
|
8366
|
+
|
|
8367
|
+
/**
|
|
8368
|
+
* CK model counts per state (`cockpitCkModelStates`, one request with aliased counts), shared for
|
|
8369
|
+
* a few seconds per tenant between the "CK model state" KPI and the ResolveFailed provider of the
|
|
8370
|
+
* attention list.
|
|
8371
|
+
*/
|
|
8372
|
+
declare class CockpitCkModelStatesService {
|
|
8373
|
+
private readonly gql;
|
|
8374
|
+
private readonly shared;
|
|
8375
|
+
counts(tenantId: string, now?: number): Observable<CockpitCkModelCounts>;
|
|
8376
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CockpitCkModelStatesService, never>;
|
|
8377
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CockpitCkModelStatesService>;
|
|
8378
|
+
}
|
|
8379
|
+
|
|
8380
|
+
/** What a tile shows when its query failed (details are logged, never shown). */
|
|
8381
|
+
declare const KPI_ERROR_TEXT = "The figure could not be loaded.";
|
|
8382
|
+
/**
|
|
8383
|
+
* The cockpit KPIs. The last four are the system cockpit's (AB#5558): child tenants, blueprint
|
|
8384
|
+
* updates, platform service health and the host's version.
|
|
8385
|
+
*/
|
|
8386
|
+
type CockpitKpiKind = 'adapterStatus' | 'ckModelState' | 'pipelineExecutions' | 'tenantCount' | 'blueprintUpdates' | 'servicesHealth' | 'versionInfo';
|
|
8387
|
+
/** State of one KPI widget. */
|
|
8388
|
+
type CockpitKpiResult = {
|
|
8389
|
+
state: 'loading';
|
|
8390
|
+
}
|
|
8391
|
+
/**
|
|
8392
|
+
* The viewer lacks a role or the tenant a CK model. `reason` says which — meant for builders
|
|
8393
|
+
* only; `forBuilder: false` means the viewer is no builder and must see a neutral state.
|
|
8394
|
+
*/
|
|
8395
|
+
| {
|
|
8396
|
+
state: 'unavailable';
|
|
8397
|
+
reason: string;
|
|
8398
|
+
forBuilder: boolean;
|
|
8399
|
+
} | {
|
|
8400
|
+
state: 'error';
|
|
8401
|
+
message: string;
|
|
8402
|
+
} | {
|
|
8403
|
+
state: 'ready';
|
|
8404
|
+
kpi: CockpitKpi;
|
|
8405
|
+
};
|
|
8406
|
+
interface KpiGate {
|
|
8407
|
+
roles: string[];
|
|
8408
|
+
models: string[];
|
|
8409
|
+
/** English reason (the default of {@link reasonMessage}). */
|
|
8410
|
+
reason: string;
|
|
8411
|
+
/** Message member of the reason (AB#5622). */
|
|
8412
|
+
reasonMessage: 'kpiNeedsCommunication' | 'kpiNeedsAdminPanel' | 'kpiNeedsTenantManagement' | 'notAvailable';
|
|
8413
|
+
}
|
|
8414
|
+
/** What each KPI needs — the same as the page its tile opens. */
|
|
8415
|
+
declare const COCKPIT_KPI_GATES: Record<CockpitKpiKind, KpiGate>;
|
|
8416
|
+
/**
|
|
8417
|
+
* The cockpit KPIs (AB#5558, from the Home KPI strip of AB#5545): each KPI has its own gate and
|
|
8418
|
+
* query; a viewer without the gate gets `unavailable` and no request is sent.
|
|
8419
|
+
*/
|
|
8420
|
+
declare class CockpitKpiService {
|
|
8421
|
+
private readonly context;
|
|
8422
|
+
private readonly adapterStates;
|
|
8423
|
+
private readonly ckModelStates;
|
|
8424
|
+
private readonly dataFlowExecutions;
|
|
8425
|
+
/** The system cockpit's data services are resolved on first use, so hosts without them need no providers. */
|
|
8426
|
+
private readonly injector;
|
|
8427
|
+
private readonly versions;
|
|
8428
|
+
private readonly messagesSource;
|
|
8429
|
+
/**
|
|
8430
|
+
* The KPI's state. Texts (label, status, detail, reasons) come from `messages`, else from the
|
|
8431
|
+
* host's `COCKPIT_WIDGET_MESSAGES`, else English (AB#5622).
|
|
8432
|
+
*/
|
|
8433
|
+
kpi(kind: CockpitKpiKind, messages?: CockpitWidgetMessages): Observable<CockpitKpiResult>;
|
|
8434
|
+
private resolve;
|
|
8435
|
+
private load;
|
|
8436
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CockpitKpiService, never>;
|
|
8437
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CockpitKpiService>;
|
|
8438
|
+
}
|
|
8439
|
+
|
|
8440
|
+
/** Findings shown before "and N more" when the config sets none. */
|
|
8441
|
+
declare const DEFAULT_ATTENTION_MAX_ITEMS = 6;
|
|
8442
|
+
/** A finding link resolved for `routerLink` + `queryParams`. */
|
|
8443
|
+
interface AttentionLinkView {
|
|
8444
|
+
label: string;
|
|
8445
|
+
path: string | string[];
|
|
8446
|
+
queryParams: CockpitLinkQueryParams | null;
|
|
8447
|
+
}
|
|
8448
|
+
/** A finding with its links resolved to host URLs (unresolvable links are left out). */
|
|
8449
|
+
interface AttentionFindingView {
|
|
8450
|
+
finding: AttentionFinding;
|
|
8451
|
+
severityLabel: string;
|
|
8452
|
+
/** Formatted `finding.count`, or null when the finding has none. */
|
|
8453
|
+
count: string | null;
|
|
8454
|
+
countLabel: string | null;
|
|
8455
|
+
links: AttentionLinkView[];
|
|
8456
|
+
explain: CockpitExplainTarget | null;
|
|
8457
|
+
}
|
|
8458
|
+
/**
|
|
8459
|
+
* "Attention list" cockpit widget (AB#5558): rule-based health findings from the configured
|
|
8460
|
+
* providers, errors first. Each provider runs only when the viewer may open what it links to, so
|
|
8461
|
+
* a viewer never sees findings about objects outside their roles; with no visible provider the
|
|
8462
|
+
* widget says so instead of claiming "all clear".
|
|
8463
|
+
*/
|
|
8464
|
+
declare class AttentionListWidgetComponent implements DashboardWidget<AttentionListWidgetConfig, AttentionFinding[]>, OnInit, OnChanges, OnDestroy {
|
|
8465
|
+
private readonly attention;
|
|
8466
|
+
private readonly context;
|
|
8467
|
+
private readonly boardState;
|
|
8468
|
+
config: AttentionListWidgetConfig;
|
|
8469
|
+
/**
|
|
8470
|
+
* Translated texts for a widget used on its own (AB#5622); wins over `COCKPIT_WIDGET_MESSAGES`.
|
|
8471
|
+
* Missing members keep the English default.
|
|
8472
|
+
*/
|
|
8473
|
+
readonly messages: _angular_core.InputSignal<Partial<CockpitWidgetMessages> | null | undefined>;
|
|
8474
|
+
/** Resolved texts: defaults < host token < `messages` input. */
|
|
8475
|
+
protected readonly texts: _angular_core.Signal<CockpitWidgetMessages>;
|
|
8476
|
+
/**
|
|
8477
|
+
* Unconstrained wrapper of the content: its height is reported so the phone tier grows the
|
|
8478
|
+
* tile to fit the stacked cards instead of clipping them (AB#5558).
|
|
8479
|
+
*/
|
|
8480
|
+
private readonly content;
|
|
8481
|
+
/** Builders see why no check runs; other viewers a neutral text and the widget collapses. */
|
|
8482
|
+
protected readonly isBuilder: _angular_core.WritableSignal<boolean>;
|
|
8483
|
+
private readonly _state;
|
|
8484
|
+
/** Message member of the current error, so the text follows a language switch (AB#5622). */
|
|
8485
|
+
private readonly _error;
|
|
8486
|
+
private readonly tenantId;
|
|
8487
|
+
private subscription;
|
|
8488
|
+
private loadToken;
|
|
8489
|
+
readonly state: _angular_core.Signal<AttentionState | null>;
|
|
8490
|
+
readonly error: _angular_core.Signal<string | null>;
|
|
8491
|
+
readonly isLoading: _angular_core.Signal<boolean>;
|
|
8492
|
+
readonly data: _angular_core.Signal<AttentionFinding[] | null>;
|
|
8493
|
+
/** Findings with resolved links. */
|
|
8494
|
+
readonly views: _angular_core.Signal<AttentionFindingView[]>;
|
|
8495
|
+
private readonly maxItems;
|
|
8496
|
+
readonly shown: _angular_core.Signal<AttentionFindingView[]>;
|
|
8497
|
+
readonly hiddenCount: _angular_core.Signal<number>;
|
|
8498
|
+
/**
|
|
8499
|
+
* True while the widget shows a single status message instead of findings (loading, error,
|
|
8500
|
+
* no visible check, all clear); the message is then centred in the tile (AB#5622).
|
|
8501
|
+
*/
|
|
8502
|
+
protected readonly messageOnly: _angular_core.Signal<boolean>;
|
|
8503
|
+
protected readonly moreText: _angular_core.Signal<string>;
|
|
8504
|
+
constructor();
|
|
8505
|
+
ngOnInit(): void;
|
|
8506
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
8507
|
+
ngOnDestroy(): void;
|
|
8508
|
+
refresh(): void;
|
|
8509
|
+
protected explain(target: CockpitExplainTarget): void;
|
|
8510
|
+
private resolveLinks;
|
|
8511
|
+
private load;
|
|
8512
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AttentionListWidgetComponent, never>;
|
|
8513
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AttentionListWidgetComponent, "mm-attention-list-widget", never, { "config": { "alias": "config"; "required": false; }; "messages": { "alias": "messages"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
8514
|
+
}
|
|
8515
|
+
|
|
8516
|
+
/** Result of the attention list config dialog. */
|
|
8517
|
+
interface AttentionListConfigResult extends WidgetConfigResult {
|
|
8518
|
+
/** Empty = every registered check, including checks added later. */
|
|
8519
|
+
providerIds: string[];
|
|
8520
|
+
maxItems: number;
|
|
8521
|
+
showExplain: boolean;
|
|
8522
|
+
}
|
|
8523
|
+
/**
|
|
8524
|
+
* Config dialog of the "Attention list" widget (AB#5558): which health checks run (all, or a
|
|
8525
|
+
* selection of the registered providers), how many findings are shown and whether "✦ Explain"
|
|
8526
|
+
* appears. Each check still runs only for viewers with its roles.
|
|
8527
|
+
*/
|
|
8528
|
+
declare class AttentionListConfigDialogComponent implements OnInit {
|
|
8529
|
+
private readonly windowRef;
|
|
8530
|
+
private readonly attention;
|
|
8531
|
+
initialProviderIds?: string[];
|
|
8532
|
+
initialMaxItems?: number;
|
|
8533
|
+
initialShowExplain?: boolean;
|
|
8534
|
+
providers: AttentionProviderInfo[];
|
|
8535
|
+
mode: 'all' | 'selected';
|
|
8536
|
+
selection: Set<string>;
|
|
8537
|
+
maxItems: number;
|
|
8538
|
+
showExplain: boolean;
|
|
8539
|
+
ngOnInit(): void;
|
|
8540
|
+
get canSave(): boolean;
|
|
8541
|
+
isSelected(id: string): boolean;
|
|
8542
|
+
toggle(id: string): void;
|
|
8543
|
+
onSave(): void;
|
|
8544
|
+
onCancel(): void;
|
|
8545
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AttentionListConfigDialogComponent, never>;
|
|
8546
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AttentionListConfigDialogComponent, "mm-attention-list-config-dialog", never, { "initialProviderIds": { "alias": "initialProviderIds"; "required": false; }; "initialMaxItems": { "alias": "initialMaxItems"; "required": false; }; "initialShowExplain": { "alias": "initialShowExplain"; "required": false; }; }, {}, never, never, true, never>;
|
|
8547
|
+
}
|
|
8548
|
+
|
|
8549
|
+
/**
|
|
8550
|
+
* The cockpit KPI widgets (AB#5558): "Adapter status", "CK model state" and "Pipeline executions
|
|
8551
|
+
* 24 h" — one component, the KPI follows the widget type. Value, status chip (dot + label), an
|
|
8552
|
+
* optional detail line and, for executions, an hourly sparkline whose `aria-label` names peak,
|
|
8553
|
+
* total and failures. The tile links to the page behind the figure when the host resolves one.
|
|
8554
|
+
* A viewer without the KPI's role / CK model sees why instead of an empty tile.
|
|
8555
|
+
*/
|
|
8556
|
+
declare class CockpitKpiWidgetComponent implements DashboardWidget<CockpitKpiWidgetConfig, CockpitKpi>, OnInit, OnChanges, OnDestroy {
|
|
8557
|
+
private readonly kpiService;
|
|
8558
|
+
private readonly context;
|
|
8559
|
+
private readonly boardState;
|
|
8560
|
+
config: CockpitKpiWidgetConfig;
|
|
8561
|
+
/**
|
|
8562
|
+
* Translated texts for a widget used on its own (AB#5622); wins over `COCKPIT_WIDGET_MESSAGES`.
|
|
8563
|
+
* Missing members keep the English default.
|
|
8564
|
+
*/
|
|
8565
|
+
readonly messages: _angular_core.InputSignal<Partial<CockpitWidgetMessages> | null | undefined>;
|
|
8566
|
+
/** Resolved texts: defaults < host token < `messages` input. */
|
|
8567
|
+
protected readonly texts: _angular_core.Signal<CockpitWidgetMessages>;
|
|
8568
|
+
private initialised;
|
|
8569
|
+
/** Texts of the last load, so the first effect run does not load twice. */
|
|
8570
|
+
private loadedTexts;
|
|
8571
|
+
private readonly _result;
|
|
8572
|
+
private readonly tenantId;
|
|
8573
|
+
private readonly options;
|
|
8574
|
+
private subscription;
|
|
8575
|
+
/** Set once a load has been running for {@link COCKPIT_KPI_SLOW_LOADING_MS}. */
|
|
8576
|
+
private readonly slowLoading;
|
|
8577
|
+
private slowTimer;
|
|
8578
|
+
private readonly kind;
|
|
8579
|
+
readonly result: _angular_core.Signal<CockpitKpiResult>;
|
|
8580
|
+
readonly isLoading: _angular_core.Signal<boolean>;
|
|
8581
|
+
readonly data: _angular_core.Signal<CockpitKpi | null>;
|
|
8582
|
+
readonly error: _angular_core.Signal<string | null>;
|
|
8583
|
+
protected readonly kpi: _angular_core.Signal<CockpitKpi | null>;
|
|
8584
|
+
/** "Loading…", or what a slow KPI is doing (blueprint catalog scan) after a second. */
|
|
8585
|
+
protected readonly loadingText: _angular_core.Signal<string>;
|
|
8586
|
+
protected readonly showDetail: _angular_core.Signal<boolean>;
|
|
8587
|
+
/** Role requirements only for builders; other viewers get a neutral "Not available" (AB#5558 review). */
|
|
8588
|
+
protected readonly reason: _angular_core.Signal<string>;
|
|
8589
|
+
protected readonly spark: _angular_core.Signal<_meshmakers_octo_meshboard.SparklineGeometry | null>;
|
|
8590
|
+
protected readonly url: _angular_core.Signal<_meshmakers_octo_meshboard.CockpitResolvedLink | null>;
|
|
8591
|
+
constructor();
|
|
8592
|
+
ngOnInit(): void;
|
|
8593
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
8594
|
+
ngOnDestroy(): void;
|
|
8595
|
+
refresh(): void;
|
|
8596
|
+
private load;
|
|
8597
|
+
private clearSlowTimer;
|
|
8598
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CockpitKpiWidgetComponent, never>;
|
|
8599
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CockpitKpiWidgetComponent, "mm-cockpit-kpi-widget", never, { "config": { "alias": "config"; "required": false; }; "messages": { "alias": "messages"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
8600
|
+
}
|
|
8601
|
+
/**
|
|
8602
|
+
* After this long still loading, a slow KPI says what it is doing instead of "Loading…"
|
|
8603
|
+
* (AB#5622: the "Blueprint updates" tile scans every catalog, which can take several seconds).
|
|
8604
|
+
*/
|
|
8605
|
+
declare const COCKPIT_KPI_SLOW_LOADING_MS = 1000;
|
|
8606
|
+
/** What viewers without builder roles see instead of role requirements. */
|
|
8607
|
+
declare const NOT_AVAILABLE_TEXT = "Not available";
|
|
8608
|
+
/** The KPI a cockpit KPI widget shows. */
|
|
8609
|
+
declare function kpiKindOf(config: CockpitKpiWidgetConfig | undefined): CockpitKpiKind;
|
|
8610
|
+
|
|
8611
|
+
/** Result of the cockpit KPI config dialog. */
|
|
8612
|
+
interface CockpitKpiConfigResult extends WidgetConfigResult {
|
|
8613
|
+
showDetail: boolean;
|
|
8614
|
+
/** Only meaningful for "Pipeline executions 24 h". */
|
|
8615
|
+
showSparkline: boolean;
|
|
8616
|
+
}
|
|
8617
|
+
/**
|
|
8618
|
+
* Config dialog of the cockpit KPI widgets (AB#5558). The figures themselves are fixed (they use
|
|
8619
|
+
* the same rules as the pages they link to); the dialog only chooses what the tile shows. The
|
|
8620
|
+
* title is edited in the widget's general settings like for every widget.
|
|
8621
|
+
*/
|
|
8622
|
+
declare class CockpitKpiConfigDialogComponent implements OnInit {
|
|
8623
|
+
private readonly windowRef;
|
|
8624
|
+
initialShowDetail?: boolean;
|
|
8625
|
+
initialShowSparkline?: boolean;
|
|
8626
|
+
supportsSparkline: boolean;
|
|
8627
|
+
description?: string;
|
|
8628
|
+
showDetail: boolean;
|
|
8629
|
+
showSparkline: boolean;
|
|
8630
|
+
ngOnInit(): void;
|
|
8631
|
+
onSave(): void;
|
|
8632
|
+
onCancel(): void;
|
|
8633
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CockpitKpiConfigDialogComponent, never>;
|
|
8634
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CockpitKpiConfigDialogComponent, "mm-cockpit-kpi-config-dialog", never, { "initialShowDetail": { "alias": "initialShowDetail"; "required": false; }; "initialShowSparkline": { "alias": "initialShowSparkline"; "required": false; }; "supportsSparkline": { "alias": "supportsSparkline"; "required": false; }; "description": { "alias": "description"; "required": false; }; }, {}, never, never, true, never>;
|
|
8635
|
+
}
|
|
8636
|
+
|
|
8637
|
+
/** Rows shown when the config sets none (the former Home panel showed eight). */
|
|
8638
|
+
declare const DEFAULT_RECENT_ITEMS_MAX = 8;
|
|
8639
|
+
/** Upper bound of the config dialog. */
|
|
8640
|
+
declare const MAX_RECENT_ITEMS = 20;
|
|
8641
|
+
/**
|
|
8642
|
+
* "just now", "12 min ago", "3 h ago", "yesterday", "4 days ago" (the Cmd+K palette's wording);
|
|
8643
|
+
* translated through `messages` (AB#5622).
|
|
8644
|
+
*/
|
|
8645
|
+
declare function recentRelativeTime(timestamp: number, now: number, messages?: Pick<CockpitWidgetMessages, 'recentJustNow' | 'recentMinutesAgo' | 'recentHoursAgo' | 'recentYesterday' | 'recentDaysAgo'>): string;
|
|
8646
|
+
/** A row with its glyph and time texts. */
|
|
8647
|
+
interface RecentItemView {
|
|
8648
|
+
item: CockpitRecentItem;
|
|
8649
|
+
glyph: string;
|
|
8650
|
+
when: string;
|
|
8651
|
+
datetime: string;
|
|
8652
|
+
absolute: string;
|
|
8653
|
+
}
|
|
8654
|
+
/**
|
|
8655
|
+
* "Recent items" cockpit widget (AB#5558): the viewer's recently opened pages, entities and
|
|
8656
|
+
* boards as a list of real links, most recent first. The data is per user and comes from the
|
|
8657
|
+
* host (`COCKPIT_RECENT_ITEMS`), which also re-checks visibility and decides how an entry opens
|
|
8658
|
+
* (the Refinery Studio switches the mode first when needed). Without a host source the widget
|
|
8659
|
+
* says "Not available" and collapses outside edit mode.
|
|
8660
|
+
*/
|
|
8661
|
+
declare class RecentItemsWidgetComponent implements DashboardWidget<RecentItemsWidgetConfig, CockpitRecentItem[]>, OnInit, OnChanges {
|
|
8662
|
+
protected readonly source: _meshmakers_octo_meshboard.CockpitRecentItemsSource | null;
|
|
8663
|
+
private readonly boardState;
|
|
8664
|
+
config: RecentItemsWidgetConfig;
|
|
8665
|
+
/**
|
|
8666
|
+
* Translated texts for a widget used on its own (AB#5622); wins over `COCKPIT_WIDGET_MESSAGES`.
|
|
8667
|
+
* Missing members keep the English default.
|
|
8668
|
+
*/
|
|
8669
|
+
readonly messages: _angular_core.InputSignal<Partial<CockpitWidgetMessages> | null | undefined>;
|
|
8670
|
+
/** Resolved texts: defaults < host token < `messages` input. */
|
|
8671
|
+
protected readonly texts: _angular_core.Signal<CockpitWidgetMessages>;
|
|
8672
|
+
/** Unconstrained content wrapper; its height lets the phone tier grow the tile (AB#5558). */
|
|
8673
|
+
private readonly content;
|
|
8674
|
+
private readonly _items;
|
|
8675
|
+
private readonly _error;
|
|
8676
|
+
/** Ticks every minute so "12 min ago" stays true while the board is open. */
|
|
8677
|
+
private readonly now;
|
|
8678
|
+
private loadToken;
|
|
8679
|
+
private initialised;
|
|
8680
|
+
/** History revision of the last load, so the first effect run does not load twice. */
|
|
8681
|
+
private loadedRevision;
|
|
8682
|
+
readonly data: _angular_core.Signal<CockpitRecentItem[] | null>;
|
|
8683
|
+
readonly isLoading: _angular_core.Signal<boolean>;
|
|
8684
|
+
readonly error: _angular_core.Signal<string | null>;
|
|
8685
|
+
protected readonly views: _angular_core.Signal<RecentItemView[] | null>;
|
|
8686
|
+
constructor();
|
|
8687
|
+
ngOnInit(): void;
|
|
8688
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
8689
|
+
refresh(): void;
|
|
8690
|
+
/** Rows shown: the configured count within 1…20. */
|
|
8691
|
+
protected maxItems(): number;
|
|
8692
|
+
/** A plain left click opens in the app through the host; modified clicks are left to the browser. */
|
|
8693
|
+
protected open(item: CockpitRecentItem, event: MouseEvent): void;
|
|
8694
|
+
protected openPalette(): void;
|
|
8695
|
+
private load;
|
|
8696
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RecentItemsWidgetComponent, never>;
|
|
8697
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<RecentItemsWidgetComponent, "mm-recent-items-widget", never, { "config": { "alias": "config"; "required": false; }; "messages": { "alias": "messages"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
8698
|
+
}
|
|
8699
|
+
|
|
8700
|
+
/** Result of the "Recent items" config dialog. */
|
|
8701
|
+
interface RecentItemsConfigResult extends WidgetConfigResult {
|
|
8702
|
+
maxItems: number;
|
|
8703
|
+
}
|
|
8704
|
+
/**
|
|
8705
|
+
* Config dialog of the "Recent items" widget (AB#5558). The entries are personal (every viewer
|
|
8706
|
+
* sees their own history), so the board only stores how many rows are shown.
|
|
8707
|
+
*/
|
|
8708
|
+
declare class RecentItemsConfigDialogComponent implements OnInit {
|
|
8709
|
+
private readonly windowRef;
|
|
8710
|
+
initialMaxItems?: number;
|
|
8711
|
+
readonly maxLimit = 20;
|
|
8712
|
+
maxItems: number;
|
|
8713
|
+
ngOnInit(): void;
|
|
8714
|
+
onSave(): void;
|
|
8715
|
+
onCancel(): void;
|
|
8716
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RecentItemsConfigDialogComponent, never>;
|
|
8717
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<RecentItemsConfigDialogComponent, "mm-recent-items-config-dialog", never, { "initialMaxItems": { "alias": "initialMaxItems"; "required": false; }; }, {}, never, never, true, never>;
|
|
8718
|
+
}
|
|
8719
|
+
|
|
8720
|
+
/** The library's attention providers, in display order (errors of the platform first). */
|
|
8721
|
+
declare const BUILT_IN_ATTENTION_PROVIDERS: readonly Type<AttentionProvider>[];
|
|
8722
|
+
/**
|
|
8723
|
+
* Registers the cockpit widgets (AB#5558): "Attention list", "Adapter status", "CK model state",
|
|
8724
|
+
* "Pipeline executions 24 h", the system cockpit's "Tenants", "Blueprint updates", "Services
|
|
8725
|
+
* healthy" and "Version", and "Recent items". Persisted with `dataSourceType: 'static'` and a small JSON
|
|
8726
|
+
* config (see the README widget catalogue for the exact keys).
|
|
8727
|
+
*/
|
|
8728
|
+
declare function registerCockpitWidgets(registry: WidgetRegistryService): void;
|
|
8729
|
+
/**
|
|
8730
|
+
* Registers the cockpit widgets and the library's attention providers. Call it next to
|
|
8731
|
+
* `provideMeshBoard()`; provide the host services with `provideCockpitWidgetHost()` and add host
|
|
8732
|
+
* checks as `{ provide: COCKPIT_ATTENTION_PROVIDERS, useClass: …, multi: true }`.
|
|
8733
|
+
*/
|
|
8734
|
+
declare function provideCockpitWidgets(): EnvironmentProviders;
|
|
8735
|
+
|
|
8736
|
+
/**
|
|
8737
|
+
* THE adapter online rule (AB#5545, moved here with the cockpit widgets in AB#5558). One definition
|
|
8738
|
+
* for the "Adapter status" cockpit widget and the adapters provider of the "Attention list", and —
|
|
8739
|
+
* re-exported by the Refinery Studio — for Integration › Overview, the pool detail page and the
|
|
8740
|
+
* adapter detail header:
|
|
8741
|
+
*
|
|
8742
|
+
* - **Online** — the adapter is connected right now: `communicationState === ONLINE`. Errors do not
|
|
8743
|
+
* change this (a connected adapter with a configuration error is online *and* in error).
|
|
8744
|
+
* - **Expected to run** — the denominator of every "x / y online" counter: adapters the operator
|
|
8745
|
+
* was asked to run (`deploymentState` `DEPLOYED`, `PENDING` or `ERROR` — a failed deployment is
|
|
8746
|
+
* still supposed to run, it is counted as offline *and* reported as an error), every adapter
|
|
8747
|
+
* online right now (edge / locally run adapters have no Helm deployment), and registered adapters without a Helm chart (`DISABLED` and not
|
|
8748
|
+
* `UNREGISTERED` — run outside the operator, e.g. on an edge device). Undeployed Helm adapters
|
|
8749
|
+
* and adapters that never connected are not expected to run, so they never count as "offline".
|
|
8750
|
+
*
|
|
8751
|
+
* Every online adapter is expected to run, so `online ≤ expected` always holds. On-demand adapters
|
|
8752
|
+
* at rest (hibernated, draining, waking) are expected to run but offline on purpose; counters show
|
|
8753
|
+
* them separately (`resting`) and do not warn about them.
|
|
8754
|
+
*
|
|
8755
|
+
* States are compared as GraphQL enum values, case-insensitively, so both the generated `*Dto`
|
|
8756
|
+
* enums (`'ONLINE'`) and plain strings work.
|
|
8757
|
+
*/
|
|
8758
|
+
interface AdapterOnlineFields {
|
|
8759
|
+
communicationState?: string | null;
|
|
8760
|
+
deploymentState?: string | null;
|
|
8761
|
+
lifecycleState?: string | null;
|
|
8762
|
+
}
|
|
8763
|
+
declare function isAdapterOnline(adapter: AdapterOnlineFields): boolean;
|
|
8764
|
+
declare function isAdapterExpectedToRun(adapter: AdapterOnlineFields): boolean;
|
|
8765
|
+
/**
|
|
8766
|
+
* Hibernated, draining or waking on-demand adapters are offline on purpose (AB#4919). Only a
|
|
8767
|
+
* known non-running lifecycle state counts; a missing lifecycle state is not "at rest".
|
|
8768
|
+
*/
|
|
8769
|
+
declare function isAdapterAtRest(adapter: AdapterOnlineFields): boolean;
|
|
8770
|
+
interface AdapterOnlineSummary {
|
|
8771
|
+
/** Adapters connected right now. */
|
|
8772
|
+
online: number;
|
|
8773
|
+
/** Adapters expected to run (the denominator). */
|
|
8774
|
+
expected: number;
|
|
8775
|
+
/** All adapters given. */
|
|
8776
|
+
total: number;
|
|
8777
|
+
/** Expected to run, offline, and at rest on purpose (on-demand). */
|
|
8778
|
+
resting: number;
|
|
8779
|
+
/** Expected to run, offline, and not at rest — these need attention. */
|
|
8780
|
+
offline: number;
|
|
8781
|
+
}
|
|
8782
|
+
declare function summarizeAdapterOnline(adapters: readonly AdapterOnlineFields[]): AdapterOnlineSummary;
|
|
8783
|
+
|
|
8784
|
+
/**
|
|
8785
|
+
* Pipeline execution counting shared by the cockpit widgets (AB#5558) and the
|
|
8786
|
+
* Refinery Studio (Data Flows list, data flow editor, adapter / data flow
|
|
8787
|
+
* detail pages): the 24 h hourly histogram behind every execution sparkline
|
|
8788
|
+
* and the execution counts over a set of pipelines. One implementation, so the
|
|
8789
|
+
* cockpit's "Pipeline executions 24 h" and the Data Flows list agree.
|
|
8790
|
+
*/
|
|
8791
|
+
/** One hour slot of the 24h execution histogram rendered by the sparkline. */
|
|
8792
|
+
interface HourlyExecutionBucket {
|
|
8793
|
+
/** UTC epoch ms of the hour start (aligned to the clock hour). */
|
|
8794
|
+
hourStart: number;
|
|
8795
|
+
ok: number;
|
|
8796
|
+
fail: number;
|
|
8797
|
+
}
|
|
8798
|
+
/** Raw server-side folded hour bucket (PipelineStatistics.HourlyBuckets, AB#4370). */
|
|
8799
|
+
interface RawHourBucket {
|
|
8800
|
+
hourStartAt?: string | Date | null;
|
|
8801
|
+
successCount?: number | null;
|
|
8802
|
+
failureCount?: number | null;
|
|
8803
|
+
}
|
|
8804
|
+
/** Number of hourly slots the sparkline renders. */
|
|
8805
|
+
declare const HISTOGRAM_HOURS = 24;
|
|
8806
|
+
declare const HOUR_MS: number;
|
|
8807
|
+
declare const DAY_MS: number;
|
|
8808
|
+
/** Options of {@link buildHourlyHistogram}. */
|
|
8809
|
+
interface HourlyHistogramOptions {
|
|
8810
|
+
/**
|
|
8811
|
+
* The statistics' `lastUpdatedAt` (for several pipelines the newest, see
|
|
8812
|
+
* {@link latestStatisticsUpdate}). The backend's windows are the clock hours ending with the
|
|
8813
|
+
* hour of its last sweep (AB#5583); when the browser clock is already in the next hour (or,
|
|
8814
|
+
* with clock skew, still in the previous one) the bars follow the statistics, so the 24 bars
|
|
8815
|
+
* sum to `last24Hours*`. Ignored when missing, invalid or more than an hour away from now
|
|
8816
|
+
* (stale statistics: the browser clock keeps the time axis honest).
|
|
8817
|
+
*/
|
|
8818
|
+
anchor?: string | Date | number | null;
|
|
8819
|
+
/** "Now" in epoch ms (tests). */
|
|
8820
|
+
now?: number;
|
|
8821
|
+
}
|
|
8822
|
+
/**
|
|
8823
|
+
* Builds 24 contiguous hourly slots ending at the current clock hour from a flat
|
|
8824
|
+
* list of raw server buckets. Sparse backend buckets (only hours with executions
|
|
8825
|
+
* are stored) are gap-filled with zeros so the sparkline renders a continuous
|
|
8826
|
+
* time axis. Buckets outside the visible 24h window are ignored.
|
|
8827
|
+
*
|
|
8828
|
+
* Since AB#5583 the buckets hold every counted execution (folded and still
|
|
8829
|
+
* retained), so nothing is added to the current bar any more: seeding it with the
|
|
8830
|
+
* rolling last-hour counts double-counted the previous hour's tail. The legacy
|
|
8831
|
+
* numeric seed arguments are accepted for compatibility and ignored.
|
|
8832
|
+
*/
|
|
8833
|
+
declare function buildHourlyHistogram(rawBuckets: (RawHourBucket | null)[] | null | undefined, options?: HourlyHistogramOptions | number, _legacySeedFail?: number): HourlyExecutionBucket[];
|
|
8834
|
+
/** The newest `lastUpdatedAt` of several statistics (the anchor of a summed histogram), or null. */
|
|
8835
|
+
declare function latestStatisticsUpdate(statistics: ({
|
|
8836
|
+
lastUpdatedAt?: string | Date | null;
|
|
8837
|
+
} | null | undefined)[]): Date | null;
|
|
8838
|
+
/** Folded `PipelineStatistics` of one pipeline (AB#4370), as selected by the queries. */
|
|
8839
|
+
interface PipelineStatisticsInput {
|
|
8840
|
+
lastExecutionAt?: string | Date | null;
|
|
8841
|
+
/** When the backend last recomputed the statistics (its windows end with this hour, AB#5583). */
|
|
8842
|
+
lastUpdatedAt?: string | Date | null;
|
|
8843
|
+
lastHourSuccessCount?: number | null;
|
|
8844
|
+
lastHourFailureCount?: number | null;
|
|
8845
|
+
last24HoursSuccessCount?: number | null;
|
|
8846
|
+
last24HoursFailureCount?: number | null;
|
|
8847
|
+
lastHourAvgDurationMs?: number | null;
|
|
8848
|
+
last24HoursAvgDurationMs?: number | null;
|
|
8849
|
+
hourlyBuckets?: (RawHourBucket | null)[] | null;
|
|
8850
|
+
}
|
|
8851
|
+
/** The latest execution of one pipeline. */
|
|
8852
|
+
interface LatestExecutionInput {
|
|
8853
|
+
startedAt?: string | Date | null;
|
|
8854
|
+
status?: string | null;
|
|
8855
|
+
}
|
|
8856
|
+
/** One pipeline: its statistics and latest execution, both optional. */
|
|
8857
|
+
interface PipelineExecutionInput {
|
|
8858
|
+
statistics?: PipelineStatisticsInput | null;
|
|
8859
|
+
latestExecution?: LatestExecutionInput | null;
|
|
8860
|
+
}
|
|
8861
|
+
/** Execution counts summed over pipelines. */
|
|
8862
|
+
interface PipelineExecutionCounts {
|
|
8863
|
+
success24h: number;
|
|
8864
|
+
failure24h: number;
|
|
8865
|
+
success1h: number;
|
|
8866
|
+
failure1h: number;
|
|
8867
|
+
/** Most recent execution start over all pipelines. */
|
|
8868
|
+
latestExecution: Date | null;
|
|
8869
|
+
/** False when no pipeline had statistics or an execution. */
|
|
8870
|
+
hasData: boolean;
|
|
8871
|
+
}
|
|
8872
|
+
/** Reads statistics and latest execution from data-flow child pipelines (non-pipelines yield empty inputs). */
|
|
8873
|
+
declare function pipelineExecutionInputs(children: (unknown | null)[] | null | undefined): PipelineExecutionInput[];
|
|
8874
|
+
/**
|
|
8875
|
+
* The Data Flows list's execution counting, shared with the cockpit (AB#5545 / AB#5558) so both
|
|
8876
|
+
* show the same numbers: the statistics are the baseline, and a latest execution the statistics
|
|
8877
|
+
* cannot contain yet is counted in for immediate feedback (COMPLETED → success, FAILED → failure).
|
|
8878
|
+
* "Cannot contain yet" = started after the statistics' `lastUpdatedAt` (the backend's totals
|
|
8879
|
+
* include every execution it saw at that sweep, AB#5583) and after `lastExecutionAt`; without
|
|
8880
|
+
* `lastUpdatedAt` (older backends / queries) only `lastExecutionAt` is compared, as before.
|
|
8881
|
+
*/
|
|
8882
|
+
declare function countPipelineExecutions(pipelines: PipelineExecutionInput[], now?: number): PipelineExecutionCounts;
|
|
8883
|
+
|
|
8884
|
+
export { ADAPTER_OFFLINE_GRACE_MS, ATTENTION_SEVERITY_ORDER, AdaptersAttentionProvider, AddWidgetDialogComponent, AiInsightsConfigDialogComponent, AiInsightsService, AiInsightsWidgetComponent, AlertBannerConfigDialogComponent, AlertBannerWidgetComponent, AlertListConfigDialogComponent, AlertListWidgetComponent, AssociationsConfigDialogComponent, AttentionListConfigDialogComponent, AttentionListWidgetComponent, AutoRefreshTimerService, BUILT_IN_ATTENTION_PROVIDERS, BarChartConfigDialogComponent, BarChartWidgetComponent, BlueprintUpdatesAttentionProvider, COCKPIT_ADAPTER_LIMIT, COCKPIT_ATTENTION_PROVIDERS, COCKPIT_BLUEPRINT_CATALOG_LIMIT, COCKPIT_CHILD_TENANT_IDS, COCKPIT_DATA_FLOW_LIMIT, COCKPIT_EXPLAIN_HANDLER, COCKPIT_FAILED_EXECUTIONS_OPTIONS, COCKPIT_KPI_GATES, COCKPIT_KPI_SLOW_LOADING_MS, COCKPIT_LINK_RESOLVER, COCKPIT_RECENT_ITEMS, COCKPIT_ROLES, COCKPIT_SERVICE_NAMES, COCKPIT_VERSION_SOURCE, COCKPIT_VIEWER_ACCESS, COCKPIT_WIDGET_MESSAGES, COCKPIT_WIDGET_TYPES, CkModelsResolveFailedAttentionProvider, CockpitAdapterStatesService, CockpitAttentionService, CockpitBlueprintStatusService, CockpitChildTenantsService, CockpitCkModelStatesService, CockpitContextService, CockpitDataFlowExecutionsService, CockpitKpiConfigDialogComponent, CockpitKpiService, CockpitKpiWidgetComponent, CockpitServiceHealthService, DAY_MS, DEFAULT_ATTENTION_MAX_ITEMS, DEFAULT_COCKPIT_WIDGET_MESSAGES, DEFAULT_FAILED_EXECUTIONS_OPTIONS, DEFAULT_MESHBOARD_MESSAGES, DEFAULT_RECENT_ITEMS_MAX, DEFAULT_TIME_ZONE_MODE, DashboardDataService, DashboardGridService, EditModeStateService, EditWidgetDialogComponent, EntityAssociationsWidgetComponent, EntityCardConfigDialogComponent, EntityCardWidgetComponent, EntityDetailDialogComponent, EntitySelectorEditorComponent, EntitySelectorToolbarComponent, FALLBACK_SERIES_COLORS, FailedExecutionsAttentionProvider, FeaturesNotInstalledAttentionProvider, GaugeConfigDialogComponent, GaugeWidgetComponent, HISTOGRAM_HOURS, HOUR_MS, HeatmapConfigDialogComponent, HeatmapWidgetComponent, KPI_ERROR_TEXT, KpiConfigDialogComponent, KpiWidgetComponent, LazyMarkdownComponent, LineChartConfigDialogComponent, LineChartWidgetComponent, MAX_RECENT_ITEMS, MESHBOARD_CHROME_ROUTE_DATA, MESHBOARD_DESCRIPTION_MARKER, MESHBOARD_EDIT_QUERY_PARAM, MESHBOARD_HEADER_MODE_ROUTE_DATA, MESHBOARD_LABEL_RESOLVER, MESHBOARD_MESSAGES, MESHBOARD_OPTIONS, MESHBOARD_TENANT_ID_PROVIDER, MarkdownConfigDialogComponent, MarkdownWidgetComponent, MeshBoardDataService, MeshBoardGridService, MeshBoardManagerDialogComponent, MeshBoardPersistenceService, MeshBoardSettingsDialogComponent, MeshBoardSettingsResult, MeshBoardStateService, MeshBoardViewComponent, NOT_AVAILABLE_TEXT, PieChartConfigDialogComponent, PieChartWidgetComponent, QueryExecutorService, QuerySelectorComponent, RecentItemsConfigDialogComponent, RecentItemsWidgetComponent, RuntimeEntitySelectorComponent, SERVICE_MANAGED_BLUEPRINT_PREFIX, STATE_STATUS_BY_KEY, ServiceHealthConfigDialogComponent, ServiceHealthWidgetComponent, ServicesHealthAttentionProvider, StatsGridConfigDialogComponent, StatsGridWidgetComponent, StatusIndicatorConfigDialogComponent, StatusIndicatorWidgetComponent, StatusListConfigDialogComponent, StatusListWidgetComponent, SummaryCardConfigDialogComponent, SummaryCardWidgetComponent, TableConfigDialogComponent, TableWidgetComponent, TableWidgetDataSourceDirective, UnregisteredPoolsAttentionProvider, WidgetFactoryService, WidgetGroupComponent, WidgetGroupConfigDialogComponent, WidgetNotConfiguredComponent, WidgetRegistryService, adapterKpi, adaptersInError, adaptersOffline, blueprintUpdatesKpi, buildHourlyHistogram, categoryStatus, chartSeriesColors, ckModelKpi, classifyQuery, compareBlueprintVersions, compareMeshBoardNavigation, countFlowExecutions, countLabel, countPipelineExecutions, enabledButNotInstalled, executionKpi, failedExecutionsSeverity, formatCockpitMessage, formatCount, humanizeCategory, isAdapterAtRest, isAdapterExpectedToRun, isAdapterOnline, isCockpitWidgetType, isMeshBoardChrome, isMeshBoardHeaderMode, isServiceConfigured, joinEncodedDescription, kpiKindOf, latestStatisticsUpdate, legacyCockpitLinkTarget, loadNgxMarkdown, nameList, newMeshBoardConfig, normalizeNavigation, observeThemeChanges, pipelineExecutionInputs, plural, provideCockpitWidgetHost, provideCockpitWidgets, provideDefaultWidgets, provideMeshBoard, provideMeshBoardMessages, provideProcessWidget, provideWidgetRegistrations, queryFamily, readMeshBoardNavigation, recentRelativeTime, registerCockpitWidgets, registerDefaultWidgets, registerProcessWidget, resolveChartColor, resolveCockpitWidgetMessages, resolveMeshBoardChrome, resolveMeshBoardHeaderMode, resolveMeshBoardLabel, resolveMeshBoardMessages, selectProviders, serviceStateText, servicesHealthKpi, sortAttentionFindings, sparklineGeometry, splitBlueprintId, splitEncodedDescription, statusColor, summarizeAdapterOnline, tenantCountKpi, toBlueprintStatus, toServiceHealthStatus, truncationNote, versionKpi, withMeshBoardNavigation };
|
|
8885
|
+
export type { AdapterOnlineFields, AdapterOnlineSummary, AdapterStatusWidgetConfig, AggregationDataSource, AggregationQuery, AggregationType, AiInsightsConfigResult, AiInsightsWidgetConfig, AlertBannerConfigResult, AlertBannerWidgetConfig, AlertListConfigResult, AlertListWidgetConfig, AnyWidgetConfig, AssociationsConfigResult, AttentionContext, AttentionFinding, AttentionLink, AttentionListConfigResult, AttentionListWidgetConfig, AttentionProvider, AttentionProviderInfo, AttentionSeverity, AttentionState, BarChartColorThreshold, BarChartConfigResult, BarChartSeries, BarChartType, BarChartWidgetConfig, BaseWidgetConfig, BlueprintUpdatesWidgetConfig, CategoryStatus, CategoryValueItem, ChartReferenceLine, CkModelStateWidgetConfig, CkQueryResult, CkQueryTarget, CkTypeAttributeInfo, CockpitAdapterState, CockpitAdapterStates, CockpitBlueprintStatus, CockpitBlueprintUpdate, CockpitChildTenants, CockpitCkModelCounts, CockpitDataFlowExecutions, CockpitDataFlowRow, CockpitExecutionCounts, CockpitExplainHandler, CockpitExplainTarget, CockpitKpi, CockpitKpiConfigResult, CockpitKpiKind, CockpitKpiResult, CockpitKpiStatus, CockpitKpiWidgetConfig, CockpitKpiWidgetOptions, CockpitLinkQueryParams, CockpitLinkResolver, CockpitLinkTarget, CockpitRecentItem, CockpitRecentItemKind, CockpitRecentItemsSource, CockpitResolvedLink, CockpitRouteLinkTarget, CockpitServiceHealth, CockpitServiceHealthStatus, CockpitServiceKey, CockpitVersionEntry, CockpitVersionSource, CockpitViewerAccess, CockpitWidgetHost, CockpitWidgetMessages, CockpitWidgetMessagesSource, CockpitWidgetType, ConfigDialogResult, ConfigResultApplier, ConstructionKitQueryDataSource, DashboardConfig, DashboardWidget, DataSource, DataSourceType, DiagramPropertyMapping, EncodedDescription, EntityAssociation, EntityAttribute, EntityCardConfigResult, EntityCardWidgetConfig, EntityListWidget, EntitySelectorAttributeMapping, EntitySelectorChildScope, EntitySelectorClearEvent, EntitySelectorConfig, EntitySelectorEvent, EntityWidget, EntityWithAssociationsWidgetConfig, FailedExecutionsAttentionOptions, GaugeConfigResult, GaugeRange, GaugeType, GaugeWidgetConfig, GridCell, GridPosition, GroupChildWidgetType, GroupedDataItem, HeatmapAggregation, HeatmapColorMode, HeatmapColorScheme, HeatmapConfigResult, HeatmapWidgetConfig, HourlyExecutionBucket, HourlyHistogramOptions, KpiConfigResult, KpiDataSourceType, KpiQueryMode, KpiValueMode, KpiWidgetConfig, LatestExecutionInput, LineChartConfigResult, LineChartType, LineChartWidgetConfig, MarkdownConfigResult, MarkdownTextAlign, MarkdownWidgetConfig, MeshBoardChrome, MeshBoardConfig, MeshBoardHeaderMode, MeshBoardLabelKind, MeshBoardLabelRequest, MeshBoardLabelResolver, MeshBoardMessages, MeshBoardMessagesSource, MeshBoardNavigationConfig, MeshBoardOptions, MeshBoardTimeFilterConfig, MeshBoardTimeZoneMode, MeshBoardVariable, MeshBoardVariableSource, MeshBoardVariableType, ParentAssociationMode, PersistedDashboard, PersistedMeshBoard, PersistedWidget, PersistedWidgetData, PersistentQueryCellMode, PersistentQueryCellSource, PersistentQueryDataSource, PersistentQueryItem, PieChartConfigResult, PieChartLabelPosition, PieChartType, PieChartWidgetConfig, PipelineExecutionCounts, PipelineExecutionInput, PipelineExecutionsWidgetConfig, PipelineStatisticsInput, ProcessWidgetConfig, Quarter, QueryCell, QueryClassification, QueryColumn, QueryColumnInfo, QueryColumnItem, QueryExecutionOptions, QueryExecutionResult, QueryFamily, QueryKind, QueryResultRow, RawHourBucket, RecentItemsConfigResult, RecentItemsWidgetConfig, RelativeTimeUnit, RepeaterDataItem, RepeaterQueryDataSource, RuntimeEntityData, RuntimeEntityDataSource, RuntimeEntitySelectorValue, SeriesAggregationFunction, SeriesResolutionResult, ServiceCallDataSource, ServiceCallType, ServiceHealthConfigResult, ServiceHealthWidgetConfig, ServicesHealthWidgetConfig, SparklineGeometry, StatColor, StatItem, StaticDataSource, StatsGridConfigResult, StatsGridWidgetConfig, StatusIndicatorConfigResult, StatusIndicatorWidgetConfig, StatusListConfigResult, StatusListWidgetConfig, StreamDataExecutionArgs, SummaryCardConfigResult, SummaryCardTile, SummaryCardWidgetConfig, TableColumn, TableColumnStatusIconMapping, TableConfigResult, TableFilterConfig, TableSortConfig, TableWidgetConfig, TargetEntityWithAttributes, TenantCountWidgetConfig, TimeRangePickerConfig, TimeRangeSelection, TimeRangeType, UpdateDashboardResult, VariableResolutionError, VersionInfoWidgetConfig, WidgetConfig, WidgetConfigDialog, WidgetConfigDialogSize, WidgetConfigResult, WidgetCreationOptions, WidgetDataSource, WidgetFilterConfig, WidgetGroupAttributeMappings, WidgetGroupChildTemplate, WidgetGroupConfig, WidgetGroupConfigResult, WidgetGroupLayout, WidgetPersistenceData, WidgetPositionUpdate, WidgetRegistration, WidgetType, WidgetZone };
|