Skip to content

Commit

Permalink
Dashboard: hide kubeconfig buttons
Browse files Browse the repository at this point in the history
They generate kubeconfig files that have no port, which does not work as we
require port forwarding to reach the server.  To avoid confusing users,
hide the buttons.
  • Loading branch information
mook-as committed Aug 21, 2024
1 parent 39fd2bf commit 39fabbd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/rancher-desktop/preload/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ export default async function initDashboard(): Promise<void> {
display: none;
}
`);
// Hide the download kubeconfig button; the config has the wrong port.
stylesheet.insertRule(`
.header-buttons button[data-testid="btn-download-kubeconfig"],
.header-buttons button[data-testid="btn-copy-kubeconfig"]{
display: none;
}
`);
document.adoptedStyleSheets.push(stylesheet);
});
}

0 comments on commit 39fabbd

Please sign in to comment.