@64mb/freelens-power 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/out/main/common/store/monitoring-preferences-store.js +5 -0
- package/out/main/common/store/monitoring-preferences-store.js.map +1 -1
- package/out/renderer/details/resource-health-details.js +8 -4
- package/out/renderer/details/resource-health-details.js.map +1 -1
- package/out/renderer/diagnostics-state.js +7 -5
- package/out/renderer/diagnostics-state.js.map +1 -1
- package/out/renderer/diagnostics.css.js +2 -2
- package/out/renderer/diagnostics.css.js.map +1 -1
- package/out/renderer/diagnostics.js +127 -51
- package/out/renderer/diagnostics.js.map +1 -1
- package/out/renderer/index.js +2 -2
- package/out/renderer/index.js.map +1 -1
- package/out/renderer/monitoring.js +15 -0
- package/out/renderer/monitoring.js.map +1 -1
- package/out/renderer/preferences/monitoring-preferences.js +1 -1
- package/out/renderer/preferences/monitoring-preferences.js.map +1 -1
- package/out/renderer/preferences/preferences.js +13 -3
- package/out/renderer/preferences/preferences.js.map +1 -1
- package/out/renderer/resource-relationships.css.js +1 -1
- package/out/renderer/resource-relationships.css.js.map +1 -1
- package/out/renderer/resource-relationships.js +25 -10
- package/out/renderer/resource-relationships.js.map +1 -1
- package/out/renderer/src/common/store/monitoring-preferences-store.js +5 -0
- package/out/renderer/src/common/store/monitoring-preferences-store.js.map +1 -1
- package/package.json +1 -1
|
@@ -16,6 +16,7 @@ const require_incident_copy_button = require("./incident-copy-button.js");
|
|
|
16
16
|
var viewDescriptions = {
|
|
17
17
|
Consumers: ["What is using cluster resources?", "Compare workload usage and requests, then expand a workload to inspect its pods."],
|
|
18
18
|
Timeline: ["What changed in this workload?", "Follow related Kubernetes events and changes observed while this view is open."],
|
|
19
|
+
"Not ready": ["Why is this pod not ready?", "Inspect running pod readiness, conditions and retained events."],
|
|
19
20
|
Pending: ["Why is this pod waiting?", "Inspect scheduling evidence and resource requests before opening the pod for investigation."]
|
|
20
21
|
};
|
|
21
22
|
function DiagnosticsSelect({ label, value, onChange, options }) {
|
|
@@ -167,7 +168,12 @@ var plurals = {
|
|
|
167
168
|
function openResource(object, clusterId, event) {
|
|
168
169
|
event.stopPropagation();
|
|
169
170
|
const kind = object.kind ?? "Pod";
|
|
170
|
-
if (activeId() !== clusterId || !object.metadata.name
|
|
171
|
+
if (activeId() !== clusterId || !object.metadata.name) return;
|
|
172
|
+
if (kind === "Namespace") {
|
|
173
|
+
Promise.resolve(require_extensions.Renderer.Navigation.showDetails(`/api/v1/namespaces/${encodeURIComponent(object.metadata.name)}`)).catch(() => {});
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
if (!object.metadata.namespace || !resources[kind]) return;
|
|
171
177
|
const path = `${resources[kind]}/namespaces/${encodeURIComponent(object.metadata.namespace)}/${plurals[kind]}/${encodeURIComponent(object.metadata.name)}`;
|
|
172
178
|
Promise.resolve(require_extensions.Renderer.Navigation.showDetails(path)).catch(() => {});
|
|
173
179
|
}
|
|
@@ -227,6 +233,7 @@ function DiagnosticsPage() {
|
|
|
227
233
|
const [error, setError] = require__global_external_react.useState("");
|
|
228
234
|
const [filter, setFilter] = require__global_external_react.useState(initial.filter);
|
|
229
235
|
const [namespaceScope, setNamespaceScope] = require__global_external_react.useState(initial.namespaceScope);
|
|
236
|
+
const [resourceScope, setResourceScope] = require__global_external_react.useState(initial.resourceScope);
|
|
230
237
|
const pendingScroll = require__global_external_react.useRef({
|
|
231
238
|
clusterId: stateCluster.current,
|
|
232
239
|
top: initial.scrollTop
|
|
@@ -239,6 +246,7 @@ function DiagnosticsPage() {
|
|
|
239
246
|
const [expanded, setExpanded] = require__global_external_react.useState(initial.expanded);
|
|
240
247
|
const [selected, setSelected] = require__global_external_react.useState(initial.selected);
|
|
241
248
|
const [pendingUid, setPendingUid] = require__global_external_react.useState(initial.pendingUid);
|
|
249
|
+
const [notReadyUid, setNotReadyUid] = require__global_external_react.useState(initial.notReadyUid ?? "");
|
|
242
250
|
const [reason, setReason] = require__global_external_react.useState(initial.reason);
|
|
243
251
|
const [warningOnly, setWarningOnly] = require__global_external_react.useState(initial.warningOnly);
|
|
244
252
|
const [groupedTimeline, setGroupedTimeline] = require__global_external_react.useState(initial.groupedTimeline);
|
|
@@ -248,6 +256,7 @@ function DiagnosticsPage() {
|
|
|
248
256
|
tab,
|
|
249
257
|
filter,
|
|
250
258
|
namespaceScope,
|
|
259
|
+
resourceScope,
|
|
251
260
|
needsAttention,
|
|
252
261
|
groupMode,
|
|
253
262
|
namespacesOpen,
|
|
@@ -255,6 +264,7 @@ function DiagnosticsPage() {
|
|
|
255
264
|
expanded,
|
|
256
265
|
selected,
|
|
257
266
|
pendingUid,
|
|
267
|
+
notReadyUid,
|
|
258
268
|
reason,
|
|
259
269
|
warningOnly,
|
|
260
270
|
groupedTimeline,
|
|
@@ -267,13 +277,14 @@ function DiagnosticsPage() {
|
|
|
267
277
|
require__global_external_react.useEffect(() => {
|
|
268
278
|
const focusNamespace = (event) => {
|
|
269
279
|
const detail = event.detail;
|
|
270
|
-
if (!detail || detail.clusterId !== stateCluster.current || detail.clusterId !== activeId() ||
|
|
280
|
+
if (!detail || detail.clusterId !== stateCluster.current || detail.clusterId !== activeId() || !detail.namespace && !detail.resourceScope) return;
|
|
271
281
|
setTab("Consumers");
|
|
272
282
|
setNamespaceScope(detail.namespace);
|
|
283
|
+
setResourceScope(detail.resourceScope);
|
|
273
284
|
setFilter("");
|
|
274
285
|
setNeedsAttention(false);
|
|
275
|
-
setGroupMode("namespace");
|
|
276
|
-
setNamespacesOpen([detail.namespace]);
|
|
286
|
+
setGroupMode(detail.namespace ? "namespace" : "workload");
|
|
287
|
+
setNamespacesOpen(detail.namespace ? [detail.namespace] : []);
|
|
277
288
|
viewState.current.scrollTop = 0;
|
|
278
289
|
pendingScroll.current = void 0;
|
|
279
290
|
if (scrollContainer.current) scrollContainer.current.scrollTop = 0;
|
|
@@ -300,6 +311,7 @@ function DiagnosticsPage() {
|
|
|
300
311
|
setTab(restored.tab);
|
|
301
312
|
setFilter(restored.filter);
|
|
302
313
|
setNamespaceScope(restored.namespaceScope);
|
|
314
|
+
setResourceScope(restored.resourceScope);
|
|
303
315
|
setNeedsAttention(restored.needsAttention);
|
|
304
316
|
setGroupMode(restored.groupMode);
|
|
305
317
|
setNamespacesOpen(restored.namespacesOpen);
|
|
@@ -307,6 +319,7 @@ function DiagnosticsPage() {
|
|
|
307
319
|
setExpanded(restored.expanded);
|
|
308
320
|
setSelected(restored.selected);
|
|
309
321
|
setPendingUid(restored.pendingUid);
|
|
322
|
+
setNotReadyUid(restored.notReadyUid ?? "");
|
|
310
323
|
setReason(restored.reason);
|
|
311
324
|
setWarningOnly(restored.warningOnly);
|
|
312
325
|
setGroupedTimeline(restored.groupedTimeline);
|
|
@@ -391,7 +404,37 @@ function DiagnosticsPage() {
|
|
|
391
404
|
return () => cancelAnimationFrame(frame);
|
|
392
405
|
}, [data]);
|
|
393
406
|
const projected = require__global_external_react.useMemo(() => data ? projection(data) : void 0, [data]);
|
|
394
|
-
const groups =
|
|
407
|
+
const groups = require__global_external_react.useMemo(() => {
|
|
408
|
+
if (!data || !projected) return [];
|
|
409
|
+
if (!resourceScope) return projected.groups;
|
|
410
|
+
if (resourceScope.kind === "Pod" || resourceScope.kind === "Node") {
|
|
411
|
+
const pods = (data.pods ?? []).filter((pod) => resourceScope.kind === "Pod" ? (resourceScope.uid ? pod.metadata.uid === resourceScope.uid : pod.metadata.name === resourceScope.name) && (!namespaceScope || pod.metadata.namespace === namespaceScope) : pod.spec?.nodeName === resourceScope.name);
|
|
412
|
+
if (resourceScope.kind === "Pod") {
|
|
413
|
+
const originalPods = /* @__PURE__ */ new Map();
|
|
414
|
+
return require_resource_diagnostics.buildConsumerGroups(pods.map((pod) => {
|
|
415
|
+
const focused = {
|
|
416
|
+
...pod,
|
|
417
|
+
status: {
|
|
418
|
+
...pod.status,
|
|
419
|
+
phase: void 0
|
|
420
|
+
}
|
|
421
|
+
};
|
|
422
|
+
originalPods.set(focused, pod);
|
|
423
|
+
return focused;
|
|
424
|
+
}), data.owners ?? [], projected.usage).map((group) => ({
|
|
425
|
+
...group,
|
|
426
|
+
pods: group.pods.map((pod) => originalPods.get(pod))
|
|
427
|
+
}));
|
|
428
|
+
}
|
|
429
|
+
return require_resource_diagnostics.buildConsumerGroups(pods, data.owners ?? [], projected.usage);
|
|
430
|
+
}
|
|
431
|
+
return projected.groups.filter((group) => resourceScope.uid ? group.identity === resourceScope.uid : group.kind === resourceScope.kind && group.name === resourceScope.name);
|
|
432
|
+
}, [
|
|
433
|
+
data,
|
|
434
|
+
projected,
|
|
435
|
+
resourceScope,
|
|
436
|
+
namespaceScope
|
|
437
|
+
]);
|
|
395
438
|
const filtered = require__global_external_react.useMemo(() => groups.filter((group) => !namespaceScope || group.namespace === namespaceScope).filter((group) => `${group.namespace} ${group.name} ${group.kind}`.toLowerCase().includes(filter.toLowerCase())).filter((group) => !needsAttention || ["error", "warning"].includes(consumerStatus(group.pods).tone)).sort((a, b) => sort === "name" ? a.namespace.localeCompare(b.namespace) || a.name.localeCompare(b.name) || a.kind.localeCompare(b.kind) || a.identity.localeCompare(b.identity) : sort === "requests" || sort === "memoryRequests" ? b[sort === "requests" ? "cpu" : "memory"].requests - a[sort === "requests" ? "cpu" : "memory"].requests : (b[sort === "memory" ? "memory" : "cpu"].usage ?? -1) - (a[sort === "memory" ? "memory" : "cpu"].usage ?? -1)), [
|
|
396
439
|
groups,
|
|
397
440
|
filter,
|
|
@@ -423,8 +466,14 @@ function DiagnosticsPage() {
|
|
|
423
466
|
}, timelineResource);
|
|
424
467
|
const displayedTimeline = groupedTimeline ? timelineGroups.map((group) => group.latest) : timeline;
|
|
425
468
|
const pending = (data?.pods ?? []).filter((pod) => pod.status?.phase === "Pending");
|
|
426
|
-
const
|
|
427
|
-
const
|
|
469
|
+
const attentionPods = new Set(groups.filter((group) => !namespaceScope || group.namespace === namespaceScope).flatMap((group) => group.pods).filter((pod) => ["warning", "error"].includes(consumerStatus([pod]).tone)).map((pod) => pod.metadata.uid ?? pod)).size;
|
|
470
|
+
const AttentionCard = data?.pods ? "button" : "div";
|
|
471
|
+
const notReady = (data?.pods ?? []).filter((pod) => pod.status?.phase === "Running" && ["warning", "error"].includes(consumerStatus([pod]).tone));
|
|
472
|
+
const readinessView = tab === "Not ready";
|
|
473
|
+
const triagePods = readinessView ? notReady : pending;
|
|
474
|
+
const triageUid = readinessView ? notReadyUid : pendingUid;
|
|
475
|
+
const triageLabel = readinessView ? "Not ready pod" : "Pending pod";
|
|
476
|
+
const selectedPod = triagePods.find((pod) => pod.metadata.uid === triageUid);
|
|
428
477
|
const diagnosis = selectedPod ? require_resource_diagnostics.diagnosePendingPod(selectedPod, data?.nodes ?? [], data?.events ?? [], data?.pvcs) : void 0;
|
|
429
478
|
return /* @__PURE__ */ require_jsx_runtime.jsxs("div", {
|
|
430
479
|
ref: scrollContainer,
|
|
@@ -452,7 +501,8 @@ function DiagnosticsPage() {
|
|
|
452
501
|
children: [
|
|
453
502
|
"Consumers",
|
|
454
503
|
"Timeline",
|
|
455
|
-
"Pending"
|
|
504
|
+
"Pending",
|
|
505
|
+
"Not ready"
|
|
456
506
|
].map((name) => /* @__PURE__ */ require_jsx_runtime.jsxs("button", {
|
|
457
507
|
type: "button",
|
|
458
508
|
title: `Show ${name.toLowerCase()}`,
|
|
@@ -461,7 +511,7 @@ function DiagnosticsPage() {
|
|
|
461
511
|
children: [
|
|
462
512
|
/* @__PURE__ */ require_jsx_runtime.jsx(require_ai_icon.AiIcon, { material: name === "Consumers" ? "account_tree" : name === "Timeline" ? "timeline" : "hourglass_empty" }),
|
|
463
513
|
name,
|
|
464
|
-
name === "Pending" && data?.pods ? ` (${pending.length})` : ""
|
|
514
|
+
name === "Pending" && data?.pods ? ` (${pending.length})` : name === "Not ready" && data?.pods ? ` (${notReady.length})` : ""
|
|
465
515
|
]
|
|
466
516
|
}, name))
|
|
467
517
|
}),
|
|
@@ -503,24 +553,24 @@ function DiagnosticsPage() {
|
|
|
503
553
|
})
|
|
504
554
|
}), /* @__PURE__ */ require_jsx_runtime.jsxs("div", { children: [/* @__PURE__ */ require_jsx_runtime.jsx("strong", { children: data.pods?.length ?? "Unavailable" }), /* @__PURE__ */ require_jsx_runtime.jsx("span", { children: "Pods in snapshot" })] })]
|
|
505
555
|
}),
|
|
506
|
-
/* @__PURE__ */ require_jsx_runtime.jsxs(
|
|
507
|
-
className: `summary-card pending${!data.pods ? " unavailable" :
|
|
508
|
-
...
|
|
556
|
+
/* @__PURE__ */ require_jsx_runtime.jsxs(AttentionCard, {
|
|
557
|
+
className: `summary-card pending${!data.pods ? " unavailable" : attentionPods ? " attention" : ""}`,
|
|
558
|
+
...data.pods ? {
|
|
509
559
|
type: "button",
|
|
510
|
-
title: "
|
|
511
|
-
"aria-label": "
|
|
560
|
+
title: "Show consumers needing attention",
|
|
561
|
+
"aria-label": "Show consumers needing attention",
|
|
512
562
|
onClick: () => {
|
|
513
|
-
|
|
514
|
-
|
|
563
|
+
setNeedsAttention(true);
|
|
564
|
+
setFilter("");
|
|
515
565
|
}
|
|
516
566
|
} : {},
|
|
517
567
|
children: [/* @__PURE__ */ require_jsx_runtime.jsx("span", {
|
|
518
568
|
className: "summary-icon",
|
|
519
569
|
children: /* @__PURE__ */ require_jsx_runtime.jsx(require_ai_icon.AiIcon, {
|
|
520
|
-
material: "
|
|
570
|
+
material: "warning_amber",
|
|
521
571
|
size: 22
|
|
522
572
|
})
|
|
523
|
-
}), /* @__PURE__ */ require_jsx_runtime.jsxs("div", { children: [/* @__PURE__ */ require_jsx_runtime.jsx("strong", { children: data.pods ?
|
|
573
|
+
}), /* @__PURE__ */ require_jsx_runtime.jsxs("div", { children: [/* @__PURE__ */ require_jsx_runtime.jsx("strong", { children: data.pods ? attentionPods : "Unavailable" }), /* @__PURE__ */ require_jsx_runtime.jsx("span", { children: "Needs attention" })] })]
|
|
524
574
|
})
|
|
525
575
|
]
|
|
526
576
|
}),
|
|
@@ -530,6 +580,26 @@ function DiagnosticsPage() {
|
|
|
530
580
|
children: "Loading resource diagnostics…"
|
|
531
581
|
}),
|
|
532
582
|
tab === "Consumers" && data && /* @__PURE__ */ require_jsx_runtime.jsxs(require_jsx_runtime.Fragment, { children: [
|
|
583
|
+
resourceScope && /* @__PURE__ */ require_jsx_runtime.jsxs("div", {
|
|
584
|
+
className: "namespace-scope",
|
|
585
|
+
role: "status",
|
|
586
|
+
children: [/* @__PURE__ */ require_jsx_runtime.jsxs("span", {
|
|
587
|
+
className: "namespace-scope-label",
|
|
588
|
+
children: [
|
|
589
|
+
resourceScope.kind,
|
|
590
|
+
": ",
|
|
591
|
+
resourceScope.name
|
|
592
|
+
]
|
|
593
|
+
}), /* @__PURE__ */ require_jsx_runtime.jsxs("button", {
|
|
594
|
+
type: "button",
|
|
595
|
+
"aria-label": "Clear resource scope",
|
|
596
|
+
onClick: () => setResourceScope(void 0),
|
|
597
|
+
children: [/* @__PURE__ */ require_jsx_runtime.jsx(require_ai_icon.AiIcon, {
|
|
598
|
+
material: "close",
|
|
599
|
+
size: 13
|
|
600
|
+
}), "Show all resources"]
|
|
601
|
+
})]
|
|
602
|
+
}),
|
|
533
603
|
namespaceScope && /* @__PURE__ */ require_jsx_runtime.jsxs("div", {
|
|
534
604
|
className: "namespace-scope",
|
|
535
605
|
role: "status",
|
|
@@ -905,17 +975,17 @@ function DiagnosticsPage() {
|
|
|
905
975
|
})]
|
|
906
976
|
})
|
|
907
977
|
] }),
|
|
908
|
-
tab === "Pending" && data && /* @__PURE__ */ require_jsx_runtime.jsxs(require_jsx_runtime.Fragment, { children: [/* @__PURE__ */ require_jsx_runtime.jsxs("label", { children: [
|
|
909
|
-
|
|
978
|
+
(tab === "Pending" || readinessView) && data && /* @__PURE__ */ require_jsx_runtime.jsxs(require_jsx_runtime.Fragment, { children: [/* @__PURE__ */ require_jsx_runtime.jsxs("label", { children: [
|
|
979
|
+
triageLabel,
|
|
910
980
|
" ",
|
|
911
981
|
/* @__PURE__ */ require_jsx_runtime.jsx(DiagnosticsSelect, {
|
|
912
|
-
label:
|
|
913
|
-
value:
|
|
914
|
-
onChange: setPendingUid,
|
|
982
|
+
label: triageLabel,
|
|
983
|
+
value: triageUid,
|
|
984
|
+
onChange: readinessView ? setNotReadyUid : setPendingUid,
|
|
915
985
|
options: [{
|
|
916
986
|
value: "",
|
|
917
987
|
label: "Select a pod"
|
|
918
|
-
}, ...
|
|
988
|
+
}, ...triagePods.map((pod) => ({
|
|
919
989
|
value: pod.metadata.uid ?? "",
|
|
920
990
|
label: `${pod.metadata.namespace} / ${pod.metadata.name}`
|
|
921
991
|
}))]
|
|
@@ -932,7 +1002,7 @@ function DiagnosticsPage() {
|
|
|
932
1002
|
selectedPod.metadata.name
|
|
933
1003
|
] }), /* @__PURE__ */ require_jsx_runtime.jsxs("div", {
|
|
934
1004
|
className: "pending-state-row",
|
|
935
|
-
children: [/* @__PURE__ */ require_jsx_runtime.jsx("h3", { children: diagnosis.state === "assigned-waiting" ? "Assigned and waiting" : "Unscheduled" }), consumerStatus([selectedPod]).tone === "error" && /* @__PURE__ */ require_jsx_runtime.jsx(ConsumerStatus, { pods: [selectedPod] })]
|
|
1005
|
+
children: [/* @__PURE__ */ require_jsx_runtime.jsx("h3", { children: readinessView ? "Not ready" : diagnosis.state === "assigned-waiting" ? "Assigned and waiting" : "Unscheduled" }), consumerStatus([selectedPod]).tone === "error" && /* @__PURE__ */ require_jsx_runtime.jsx(ConsumerStatus, { pods: [selectedPod] })]
|
|
936
1006
|
})] }), /* @__PURE__ */ require_jsx_runtime.jsxs("button", {
|
|
937
1007
|
className: "pending-open-action",
|
|
938
1008
|
type: "button",
|
|
@@ -944,7 +1014,7 @@ function DiagnosticsPage() {
|
|
|
944
1014
|
}), "Open pod"]
|
|
945
1015
|
})]
|
|
946
1016
|
}),
|
|
947
|
-
/* @__PURE__ */ require_jsx_runtime.jsx("p", { children: diagnosis.state === "assigned-waiting" ? "A node is assigned. Check pod conditions and events for startup or storage issues." : "No node is assigned. Start with scheduler events, then inspect constraints." }),
|
|
1017
|
+
/* @__PURE__ */ require_jsx_runtime.jsx("p", { children: readinessView ? "The pod is running but needs attention. Check readiness conditions, container status and events." : diagnosis.state === "assigned-waiting" ? "A node is assigned. Check pod conditions and events for startup or storage issues." : "No node is assigned. Start with scheduler events, then inspect constraints." }),
|
|
948
1018
|
/* @__PURE__ */ require_jsx_runtime.jsxs("div", {
|
|
949
1019
|
className: "pending-request-badges",
|
|
950
1020
|
children: [/* @__PURE__ */ require_jsx_runtime.jsxs("span", { children: [
|
|
@@ -990,9 +1060,9 @@ function DiagnosticsPage() {
|
|
|
990
1060
|
/* @__PURE__ */ require_jsx_runtime.jsx(require_incident_copy_button.IncidentCopyButton, {
|
|
991
1061
|
clusterId: data.clusterId,
|
|
992
1062
|
incident: {
|
|
993
|
-
problem:
|
|
1063
|
+
problem: triageLabel,
|
|
994
1064
|
facts: [
|
|
995
|
-
diagnosis.state,
|
|
1065
|
+
readinessView ? consumerStatus([selectedPod]).label : diagnosis.state,
|
|
996
1066
|
`CPU request ${podRequest(selectedPod, "cpu")}; memory request ${podRequest(selectedPod, "memory")}`,
|
|
997
1067
|
...diagnosis.evidence.slice(0, 8).map((entry) => entry.message)
|
|
998
1068
|
],
|
|
@@ -1009,8 +1079,8 @@ function DiagnosticsPage() {
|
|
|
1009
1079
|
className: "explain-finding",
|
|
1010
1080
|
onClick: () => require_ai_diagnostic_handoff.explainDiagnosticFinding({
|
|
1011
1081
|
clusterId: data.clusterId,
|
|
1012
|
-
title:
|
|
1013
|
-
summary: `${diagnosis.state}. CPU request ${podRequest(selectedPod, "cpu")}, memory request ${podRequest(selectedPod, "memory")}. ${diagnosis.evidence.slice(0, 8).map((entry) => entry.message).join("; ")}`,
|
|
1082
|
+
title: triageLabel,
|
|
1083
|
+
summary: `${readinessView ? consumerStatus([selectedPod]).label : diagnosis.state}. CPU request ${podRequest(selectedPod, "cpu")}, memory request ${podRequest(selectedPod, "memory")}. ${diagnosis.evidence.slice(0, 8).map((entry) => entry.message).join("; ")}`,
|
|
1014
1084
|
resource: {
|
|
1015
1085
|
kind: "Pod",
|
|
1016
1086
|
namespace: selectedPod.metadata.namespace,
|
|
@@ -1022,7 +1092,7 @@ function DiagnosticsPage() {
|
|
|
1022
1092
|
size: 13
|
|
1023
1093
|
}), "Explain with AI"]
|
|
1024
1094
|
}),
|
|
1025
|
-
/* @__PURE__ */ require_jsx_runtime.jsx("h3", { children: "Scheduling evidence" }),
|
|
1095
|
+
/* @__PURE__ */ require_jsx_runtime.jsx("h3", { children: readinessView ? "Readiness and retained evidence" : "Scheduling evidence" }),
|
|
1026
1096
|
/* @__PURE__ */ require_jsx_runtime.jsx("div", {
|
|
1027
1097
|
className: "diagnostics-table",
|
|
1028
1098
|
children: /* @__PURE__ */ require_jsx_runtime.jsxs("table", {
|
|
@@ -1059,7 +1129,7 @@ function DiagnosticsPage() {
|
|
|
1059
1129
|
})
|
|
1060
1130
|
] }) : /* @__PURE__ */ require_jsx_runtime.jsx("p", {
|
|
1061
1131
|
className: "diagnostics-empty",
|
|
1062
|
-
children: !data.pods ?
|
|
1132
|
+
children: !data.pods ? `Pod inventory unavailable. Check cluster access before investigating ${readinessView ? "readiness" : "pending pods"}.` : triagePods.length ? `Select a ${readinessView ? "not ready" : "pending"} pod to see evidence and requests` : `No ${readinessView ? "not ready" : "pending"} pods in this snapshot`
|
|
1063
1133
|
})] })
|
|
1064
1134
|
]
|
|
1065
1135
|
});
|
|
@@ -1075,7 +1145,7 @@ function ConsumerRows({ group, clusterId, snapshotTime, expanded, toggle, usage,
|
|
|
1075
1145
|
className: "consumer-identity-main",
|
|
1076
1146
|
children: [/* @__PURE__ */ require_jsx_runtime.jsxs("div", {
|
|
1077
1147
|
className: "consumer-title-line",
|
|
1078
|
-
children: [group.ownerResolved && resources[group.kind] && group.name !== "Unknown" ? /* @__PURE__ */ require_jsx_runtime.
|
|
1148
|
+
children: [group.ownerResolved && resources[group.kind] && group.name !== "Unknown" ? /* @__PURE__ */ require_jsx_runtime.jsx("button", {
|
|
1079
1149
|
className: "consumer-resource-link",
|
|
1080
1150
|
type: "button",
|
|
1081
1151
|
title: `Open ${group.kind} ${group.namespace} / ${group.name}`,
|
|
@@ -1087,10 +1157,10 @@ function ConsumerRows({ group, clusterId, snapshotTime, expanded, toggle, usage,
|
|
|
1087
1157
|
name: group.name
|
|
1088
1158
|
}
|
|
1089
1159
|
}, clusterId, event),
|
|
1090
|
-
children:
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
})
|
|
1160
|
+
children: /* @__PURE__ */ require_jsx_runtime.jsx("span", {
|
|
1161
|
+
className: "consumer-link-name",
|
|
1162
|
+
children: group.name
|
|
1163
|
+
})
|
|
1094
1164
|
}) : /* @__PURE__ */ require_jsx_runtime.jsx("span", {
|
|
1095
1165
|
className: "consumer-identity-label",
|
|
1096
1166
|
children: group.name
|
|
@@ -1207,17 +1277,13 @@ function ConsumerRows({ group, clusterId, snapshotTime, expanded, toggle, usage,
|
|
|
1207
1277
|
type: "button",
|
|
1208
1278
|
title: "Open pod details",
|
|
1209
1279
|
onClick: (event) => openResource(pod, clusterId, event),
|
|
1210
|
-
children: [
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
pod.metadata.name
|
|
1216
|
-
|
|
1217
|
-
material: "open_in_new",
|
|
1218
|
-
size: 12
|
|
1219
|
-
})
|
|
1220
|
-
]
|
|
1280
|
+
children: [/* @__PURE__ */ require_jsx_runtime.jsx(require_ai_icon.AiIcon, {
|
|
1281
|
+
material: "view_in_ar",
|
|
1282
|
+
size: 14
|
|
1283
|
+
}), /* @__PURE__ */ require_jsx_runtime.jsx("span", {
|
|
1284
|
+
className: "consumer-link-name",
|
|
1285
|
+
children: pod.metadata.name
|
|
1286
|
+
})]
|
|
1221
1287
|
}), /* @__PURE__ */ require_jsx_runtime.jsx(ConsumerStatus, { pods: [pod] })]
|
|
1222
1288
|
}), /* @__PURE__ */ require_jsx_runtime.jsxs("small", {
|
|
1223
1289
|
className: "consumer-subtitle",
|
|
@@ -1292,13 +1358,19 @@ function NamespaceRows({ namespace, groups, clusterId, snapshotTime, usage, open
|
|
|
1292
1358
|
children: [/* @__PURE__ */ require_jsx_runtime.jsxs("div", {
|
|
1293
1359
|
className: "consumer-title-line",
|
|
1294
1360
|
children: [
|
|
1295
|
-
/* @__PURE__ */ require_jsx_runtime.jsxs("
|
|
1296
|
-
|
|
1361
|
+
/* @__PURE__ */ require_jsx_runtime.jsxs("button", {
|
|
1362
|
+
type: "button",
|
|
1363
|
+
className: "consumer-resource-link namespace-identity",
|
|
1364
|
+
onClick: (event) => openResource({
|
|
1365
|
+
kind: "Namespace",
|
|
1366
|
+
metadata: { name: namespace }
|
|
1367
|
+
}, clusterId, event),
|
|
1368
|
+
title: "Open namespace",
|
|
1297
1369
|
children: [/* @__PURE__ */ require_jsx_runtime.jsx(require_ai_icon.AiIcon, {
|
|
1298
1370
|
material: "folder_open",
|
|
1299
1371
|
size: 17
|
|
1300
1372
|
}), /* @__PURE__ */ require_jsx_runtime.jsx("span", {
|
|
1301
|
-
className: "consumer-
|
|
1373
|
+
className: "consumer-link-name",
|
|
1302
1374
|
children: namespace
|
|
1303
1375
|
})]
|
|
1304
1376
|
}),
|
|
@@ -1378,6 +1450,10 @@ function podResourceGroup(pod, usage) {
|
|
|
1378
1450
|
metadata: {
|
|
1379
1451
|
...pod.metadata,
|
|
1380
1452
|
ownerReferences: []
|
|
1453
|
+
},
|
|
1454
|
+
status: {
|
|
1455
|
+
...pod.status,
|
|
1456
|
+
phase: void 0
|
|
1381
1457
|
}
|
|
1382
1458
|
}], [], usage)[0];
|
|
1383
1459
|
}
|