From 60184b1b48661aafc544e88b43cdcf6cdecbaf4b Mon Sep 17 00:00:00 2001 From: Antonin Stefanutti Date: Wed, 16 Oct 2019 14:39:52 +0200 Subject: [PATCH] Rely on the container selection to open exec terminal into it --- lib/ui/dashboard.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ui/dashboard.js b/lib/ui/dashboard.js index 9dc5285..bff3a19 100644 --- a/lib/ui/dashboard.js +++ b/lib/ui/dashboard.js @@ -161,8 +161,9 @@ class Dashboard { if (!k8s.isPodRunning(pod)) return; const name = pod.metadata.name; const namespace = pod.metadata.namespace; - // FIXME: select which container in pod - const container = pod.spec.containers[0].name; + const container = pod.metadata.uid === pod_selected && container_selected + ? container_selected + : pod.spec.containers[0].name; const id = `${namespace}-${name}-${container}`; const byId = page => page.id === id; // check if connection already exists