Skip to content
This repository was archived by the owner on Nov 28, 2022. It is now read-only.

Commit 9c3018e

Browse files
Tim Etchellsjopit
authored andcommitted
Fix pipeline command enablement in cmd palette (#402)
Previously would not be selectable in theia Signed-off-by: Tim Etchells <timetchells@ibm.com>
1 parent fdef5d6 commit 9c3018e

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

dev/src/command/CommandUtil.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2018, 2019 IBM Corporation and others.
2+
* Copyright (c) 2018, 2020 IBM Corporation and others.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v2.0
55
* which accompanies this distribution, and is available at
@@ -79,7 +79,7 @@ export function createCommands(): vscode.Disposable[] {
7979
registerConnectionCommand(Commands.CONNECTION_OVERVIEW, connectionOverviewCmd, undefined, false, true),
8080
registerConnectionCommand(Commands.MANAGE_TEMPLATE_SOURCES, manageSourcesCmd, undefined, true, false),
8181
registerConnectionCommand(Commands.MANAGE_REGISTRIES, manageRegistriesCmd, undefined, true, false),
82-
registerConnectionCommand(Commands.OPEN_TEKTON, openTektonDashboard, undefined, true, true),
82+
registerConnectionCommand(Commands.OPEN_TEKTON, openTektonDashboard, undefined, true, false),
8383

8484
registerProjectCommand(Commands.PROJECT_OVERVIEW, projectOverviewCmd, undefined, ProjectState.getAllAppStates()),
8585
registerProjectCommand(Commands.OPEN_APP, openAppCmd, undefined, ProjectState.getStartedOrStartingStates()),

dev/src/command/connection/OpenTektonCmd.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2019 IBM Corporation and others.
2+
* Copyright (c) 2019, 2020 IBM Corporation and others.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v2.0
55
* which accompanies this distribution, and is available at
@@ -18,6 +18,11 @@ import Commands from "../../constants/Commands";
1818
import CWEnvironment from "../../codewind/connection/CWEnvironment";
1919

2020
export async function openTektonDashboard(connection: Connection): Promise<void> {
21+
if (!connection.isKubeConnection) {
22+
vscode.window.showWarningMessage(`Pipelines are only available on Kubernetes.`);
23+
return;
24+
}
25+
2126
try {
2227
const tektonStatus = (await CWEnvironment.getEnvData(connection)).tektonStatus;
2328

0 commit comments

Comments
 (0)