1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Whitelist kind param to 'show-details' event

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2023-04-03 13:07:45 +03:00
parent e2ced3bbb2
commit d8b62a10cb

View File

@ -4,6 +4,9 @@
*/
import { getInjectable } from "@ogre-tools/injectable";
import type { AppEvent } from "../../../common/app-event-bus/event-bus";
import {
getWorkloadKindFromUrl,
} from "../../../renderer/components/kube-detail-params/get-workload-kind-from-url";
const navigateTo = [
"navigate-to-preference-tab-id",
@ -91,7 +94,12 @@ const extensions = [
const externalActions = ["open-link-in-browser"];
const uiInteraction = ["show-details"];
const uiInteraction = [{
id: "show-details",
getParams: (selfLink: unknown) => ({
kind: getWorkloadKindFromUrl(selfLink as string),
}),
}];
const terminal = ["create-terminal-tab"];