react-aiops 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ComponentDialog.d.ts.map +1 -1
- package/dist/components/NodeCallout.d.ts.map +1 -1
- package/dist/components/Server3D.d.ts +3 -1
- package/dist/components/Server3D.d.ts.map +1 -1
- package/dist/components/ServiceNode.d.ts.map +1 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index.js +613 -545
- package/dist/types.d.ts +40 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -9,6 +9,35 @@ export type { ComponentStatus, StatusCfg, FaceName, Base3DProps } from './theme'
|
|
|
9
9
|
* - `"database"` – Database instance (primary or standby)
|
|
10
10
|
*/
|
|
11
11
|
export type ComponentType = "server" | "dispatcher" | "messageServer" | "database";
|
|
12
|
+
/**
|
|
13
|
+
* Custom metric definition for the ComponentDialog gauges.
|
|
14
|
+
* Provide via `componentInfo.dialogMetrics` on a {@link ServiceNode}
|
|
15
|
+
* to override the default CPU / Memory / Storage gauges for that component.
|
|
16
|
+
*
|
|
17
|
+
* Each component in a service gets its own `componentInfo`, so a service
|
|
18
|
+
* with a server and a database can define completely different metrics
|
|
19
|
+
* for each.
|
|
20
|
+
*/
|
|
21
|
+
export interface ComponentDialogMetric {
|
|
22
|
+
/** Unique key (e.g. "cpu", "threads"). */
|
|
23
|
+
id: string;
|
|
24
|
+
/** Upper label (e.g. "CPU", "THREADS"). */
|
|
25
|
+
label: string;
|
|
26
|
+
/** Smaller sub-label (e.g. "PROCESSOR", "ACTIVE CONNECTIONS"). */
|
|
27
|
+
sublabel: string;
|
|
28
|
+
/** Numeric value (0–100). */
|
|
29
|
+
value: number;
|
|
30
|
+
/** Unit suffix shown next to the value (e.g. "%", "ms"). */
|
|
31
|
+
unit?: string;
|
|
32
|
+
/** Metric icon type. Defaults to "cpu". */
|
|
33
|
+
icon?: "cpu" | "mem" | "disk";
|
|
34
|
+
/** Value at which the bar turns orange. Defaults to 70. */
|
|
35
|
+
warnAt?: number;
|
|
36
|
+
/** Value at which the bar turns red. Defaults to 85. */
|
|
37
|
+
critAt?: number;
|
|
38
|
+
/** Override bar/value color. When set, bypasses threshold-based coloring. */
|
|
39
|
+
color?: string;
|
|
40
|
+
}
|
|
12
41
|
/**
|
|
13
42
|
* Contextual health metrics attached to a component.
|
|
14
43
|
* Passed when a component is selected for drill-down, and used
|
|
@@ -25,6 +54,11 @@ export interface ComponentContext {
|
|
|
25
54
|
queueDepth?: number;
|
|
26
55
|
/** Storage capacity utilisation percentage (0–100). Relevant for databases. */
|
|
27
56
|
capacity?: number;
|
|
57
|
+
/**
|
|
58
|
+
* Custom metrics for the ComponentDialog. When provided, replaces
|
|
59
|
+
* the default CPU / Memory / Storage gauges entirely.
|
|
60
|
+
*/
|
|
61
|
+
dialogMetrics?: ComponentDialogMetric[];
|
|
28
62
|
}
|
|
29
63
|
/**
|
|
30
64
|
* Describes a single sub-component rendered inside a drilled-down
|
|
@@ -100,6 +134,12 @@ export interface SelectedComponent {
|
|
|
100
134
|
ey: number;
|
|
101
135
|
/** Optional health metrics for the drill-down view. */
|
|
102
136
|
context?: ComponentContext;
|
|
137
|
+
/**
|
|
138
|
+
* Custom metrics for the ComponentDialog gauges.
|
|
139
|
+
* When provided, replaces the default CPU / Memory / Storage gauges
|
|
140
|
+
* for this specific component. Takes priority over `context.dialogMetrics`.
|
|
141
|
+
*/
|
|
142
|
+
dialogMetrics?: ComponentDialogMetric[];
|
|
103
143
|
/**
|
|
104
144
|
* Internal sub-components to render inside the drill-down view.
|
|
105
145
|
* When provided, the drill-down renders these instead of using
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK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