@skyhook-io/k8s-ui 1.8.2 → 1.8.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/package.json
CHANGED
|
@@ -93,6 +93,13 @@ export type ApplicationDetailProps = {
|
|
|
93
93
|
/** Env tokens the cluster proved (the list derives the same set) — keeps a
|
|
94
94
|
* ungrouped app's Environment fact consistent between list and detail. */
|
|
95
95
|
discoveredEnvs?: ReadonlySet<string>
|
|
96
|
+
/** Which instance in `identityInstances` is active, by its `appKey`. Defaults
|
|
97
|
+
* to `app.key` — correct for the OSS case, where each instance IS a distinct
|
|
98
|
+
* app row keyed the same way. A host that keys instances on something other
|
|
99
|
+
* than the app key (e.g. the Cloud fleet keys per cluster, while `app.key`
|
|
100
|
+
* must stay the logical app key for provenance) passes the active instance's
|
|
101
|
+
* key here so the switcher marks it. */
|
|
102
|
+
activeInstanceKey?: string
|
|
96
103
|
} & SelectionProps
|
|
97
104
|
|
|
98
105
|
function ContextFact({ label, children }: { label: string; children: ReactNode }) {
|
|
@@ -132,7 +139,7 @@ function compareDefinedVersions(a: string | undefined, b: string | undefined): n
|
|
|
132
139
|
return compareVersions(a, b) ?? 0
|
|
133
140
|
}
|
|
134
141
|
|
|
135
|
-
export function ApplicationDetail({ app, onBack, renderWorkload, topology, topologyLoading, onNavigateToResource, identityInstances, onSwitchInstance, discoveredEnvs, selectedWorkloadKey, onSelectWorkload }: ApplicationDetailProps) {
|
|
142
|
+
export function ApplicationDetail({ app, onBack, renderWorkload, topology, topologyLoading, onNavigateToResource, identityInstances, onSwitchInstance, discoveredEnvs, activeInstanceKey, selectedWorkloadKey, onSelectWorkload }: ApplicationDetailProps) {
|
|
136
143
|
// Stable order regardless of API ordering: rail rows and the per-workload
|
|
137
144
|
// color assignment both follow this array, so an order flap between
|
|
138
145
|
// refetches must not reshuffle rows or reassign a workload's hue.
|
|
@@ -286,7 +293,7 @@ export function ApplicationDetail({ app, onBack, renderWorkload, topology, topol
|
|
|
286
293
|
// pills for a handful; a picker beyond that (scales to ~any count).
|
|
287
294
|
<div className="flex min-w-0 items-center gap-1.5">
|
|
288
295
|
<span className="text-[10px] uppercase tracking-wide text-theme-text-tertiary">Environment</span>
|
|
289
|
-
<EnvSwitcher identityKey={app.identity?.key ?? ''} instances={identityInstances} activeKey={app.key} onSwitch={onSwitchInstance} />
|
|
296
|
+
<EnvSwitcher identityKey={app.identity?.key ?? ''} instances={identityInstances} activeKey={activeInstanceKey ?? app.key} onSwitch={onSwitchInstance} />
|
|
290
297
|
</div>
|
|
291
298
|
) : env ? (
|
|
292
299
|
<ContextFact label="Environment">
|