Skip to content

Commit

Permalink
Rely on the container selection to open exec terminal into it
Browse files Browse the repository at this point in the history
  • Loading branch information
astefanutti committed Oct 16, 2019
1 parent d460356 commit 60184b1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/ui/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 60184b1

Please sign in to comment.