Skip to content

Commit 46d3d9b

Browse files
datho7561rgrunber
authored andcommitted
Hide commands that require selecting a component
The commands are still accessible in the relevant right-click menus, but are no longer available in the command palette, since they don't work when invoked from the command palette. This is a work around until we can get the commands to work from the command palette when working with OpenShift Dev Sandbox. Fixes #2792 Signed-off-by: David Thompson <[email protected]>
1 parent 9daef3e commit 46d3d9b

File tree

2 files changed

+69
-37
lines changed

2 files changed

+69
-37
lines changed

.editorconfig

+4
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@ insert_final_newline = true
1818

1919
[*.md]
2020
trim_trailing_whitespace = false
21+
22+
[./package.json]
23+
indent_style = tab
24+
indent_size = 4

package.json

+65-37
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@
5959
"dev:compile:devfile-registry-view": "webpack --mode development --config src/webview/devfile-registry/webpack.config.js",
6060
"dev:compile:welcome-view": "webpack --mode development --config src/webview/welcome/webpack.config.js",
6161
"dev:compile:git-import-view": "webpack --mode development --config src/webview/git-import/webpack.config.js",
62-
"dev:compile:helm-chart-view": "webpack --mode development --config src/webview/helm-chart/webpack.config.js",
62+
"dev:compile:helm-chart-view": "webpack --mode development --config src/webview/helm-chart/webpack.config.js",
6363
"dev:run:log-view": "webpack-dev-server --mode development --config src/webview/log/webpack.config.js",
6464
"dev:run:describe-view": "webpack-dev-server --mode development --config src/webview/describe/webpack.config.js",
6565
"dev:run:cluster-view": "webpack-dev-server --port 9222 --mode development --config src/webview/cluster/webpack.config.js",
6666
"dev:run:devfile-registry-view": "webpack-dev-server --port 9222 --mode development --config src/webview/devfile-registry/webpack.config.js",
6767
"dev:run:welcome-view": "webpack-dev-server --port 9222 --mode development --config src/webview/welcome/webpack.config.js",
6868
"dev:run:git-import-view": "webpack-dev-server --port 9222 --mode development --config src/webview/git-import/webpack.config.js",
69-
"dev:run:helm-chart-view": "webpack-dev-server --port 9222 --mode development --config src/webview/helm-chart/webpack.config.js",
69+
"dev:run:helm-chart-view": "webpack-dev-server --port 9222 --mode development --config src/webview/helm-chart/webpack.config.js",
7070
"dev:run:create-service-view": "webpack-dev-server --mode development --config src/webview/create-service/webpack.config.js",
7171
"watch": "tsc -watch -p ./",
7272
"clean": "shx rm -rf out/build out/coverage out/src out/test out/tools out/test-resources out/logViewer",
@@ -83,7 +83,7 @@
8383
"coverage:upload": "codecov -f coverage/coverage-final.json",
8484
"build": "npm run clean && npm run lint && npm run compile && npm run bundle-tools",
8585
"smoke-test": "npm run compile:ext && extest setup-and-run out/test/ui/smoke-test.js -o test/ui/settings.json -m test/ui/.mocharc.js -c max",
86-
"public-ui-test": "npm run compile:ext && extest setup-and-run out/test/ui/public-ui-test.js -o test/ui/settings.json -m test/ui/.mocharc.js -c max"
86+
"public-ui-test": "npm run compile:ext && extest setup-and-run out/test/ui/public-ui-test.js -o test/ui/settings.json -m test/ui/.mocharc.js -c max"
8787
},
8888
"dependencies": {
8989
"@kubernetes/client-node": "^0.16.1",
@@ -263,7 +263,7 @@
263263
"onCommand:openshift.component.debug",
264264
"onCommand:openshift.component.debug.palette",
265265
"onCommand:openshift.resource.load",
266-
"onCommand:openshift.resource.unInstall",
266+
"onCommand:openshift.resource.unInstall",
267267
"onCommand:openshift.service.create",
268268
"onCommand:openshift.service.delete",
269269
"onCommand:openshift.component.folder.create",
@@ -289,7 +289,7 @@
289289
"onCommand:clusters.openshift.deployment.openConsole",
290290
"onCommand:clusters.openshift.imagestream.openConsole",
291291
"onCommand:openshift.componentTypesView.registry.openInView",
292-
"onCommand:openshift.componentTypesView.registry.openHelmChartsInView",
292+
"onCommand:openshift.componentTypesView.registry.openHelmChartsInView",
293293
"onWalkthrough:openshiftWalkthrough"
294294
],
295295
"contributes": {
@@ -399,7 +399,7 @@
399399
"title": "New Project",
400400
"category": "OpenShift"
401401
},
402-
{
402+
{
403403
"command": "openshift.componentTypesView.registry.openHelmChartsInView",
404404
"title": "Open Helm Charts",
405405
"category": "OpenShift"
@@ -787,7 +787,7 @@
787787
"title": "Load",
788788
"category": "OpenShift"
789789
},
790-
{
790+
{
791791
"command": "openshift.resource.unInstall",
792792
"title": "Uninstall",
793793
"category": "OpenShift"
@@ -806,21 +806,21 @@
806806
"title": "Import Component from git repository",
807807
"category": "OpenShift"
808808
},
809-
{
810-
"command": "openshift.experimental.mode.enable",
811-
"title": "Experimental Features",
812-
"category": "OpenShift"
813-
},
814-
{
815-
"command": "openshift.experimental.mode.disable",
816-
"title": "✓ Experimental Features",
817-
"category": "OpenShift"
818-
},
819-
{
820-
"command": "openshift.component.dev.onPodman",
821-
"title": "Start Dev on Podman",
822-
"category": "OpenShift"
823-
}
809+
{
810+
"command": "openshift.experimental.mode.enable",
811+
"title": "Experimental Features",
812+
"category": "OpenShift"
813+
},
814+
{
815+
"command": "openshift.experimental.mode.disable",
816+
"title": "✓ Experimental Features",
817+
"category": "OpenShift"
818+
},
819+
{
820+
"command": "openshift.component.dev.onPodman",
821+
"title": "Start Dev on Podman",
822+
"category": "OpenShift"
823+
}
824824
],
825825
"keybindings": [
826826
{
@@ -1011,6 +1011,34 @@
10111011
"command": "openshift.component.revealInExplorer",
10121012
"when": "false"
10131013
},
1014+
{
1015+
"command": "openshift.component.dev",
1016+
"when": "false"
1017+
},
1018+
{
1019+
"command": "openshift.component.dev.onPodman",
1020+
"when": "false"
1021+
},
1022+
{
1023+
"command": "openshift.component.deploy",
1024+
"when": "false"
1025+
},
1026+
{
1027+
"command": "openshift.component.undeploy",
1028+
"when": "false"
1029+
},
1030+
{
1031+
"command": "openshift.component.describe.palette",
1032+
"when": "false"
1033+
},
1034+
{
1035+
"command": "openshift.component.followLog.palette",
1036+
"when": "false"
1037+
},
1038+
{
1039+
"command": "openshift.component.log.palette",
1040+
"when": "false"
1041+
},
10141042
{
10151043
"command": "openshift.componentType.newComponent",
10161044
"when": "false"
@@ -1035,10 +1063,10 @@
10351063
"command": "openshift.componentTypesView.registry.openInView",
10361064
"when": "false"
10371065
},
1038-
{
1039-
"command": "openshift.componentTypesView.registry.openHelmChartsInView",
1040-
"when": "false"
1041-
},
1066+
{
1067+
"command": "openshift.componentTypesView.registry.openHelmChartsInView",
1068+
"when": "false"
1069+
},
10421070
{
10431071
"command": "openshift.componentTypesView.registry.openInBrowser",
10441072
"when": "false"
@@ -1051,7 +1079,7 @@
10511079
"command": "openshift.resource.load",
10521080
"when": "false"
10531081
},
1054-
{
1082+
{
10551083
"command": "openshift.resource.unInstall",
10561084
"when": "false"
10571085
},
@@ -1124,14 +1152,14 @@
11241152
"when": "view == openshiftComponentsView",
11251153
"group": "navigation"
11261154
},
1127-
{
1128-
"command": "openshift.experimental.mode.enable",
1129-
"when": "view == openshiftComponentsView && !config.openshiftToolkit.experimentalFeatures"
1130-
},
1131-
{
1132-
"command": "openshift.experimental.mode.disable",
1133-
"when": "view == openshiftComponentsView && config.openshiftToolkit.experimentalFeatures"
1134-
}
1155+
{
1156+
"command": "openshift.experimental.mode.enable",
1157+
"when": "view == openshiftComponentsView && !config.openshiftToolkit.experimentalFeatures"
1158+
},
1159+
{
1160+
"command": "openshift.experimental.mode.disable",
1161+
"when": "view == openshiftComponentsView && config.openshiftToolkit.experimentalFeatures"
1162+
}
11351163
],
11361164
"view/item/context": [
11371165
{
@@ -1209,7 +1237,7 @@
12091237
"when": "view == openshiftProjectExplorer && viewItem == openshift.k8sContext && isLoggedIn",
12101238
"group": "c1"
12111239
},
1212-
{
1240+
{
12131241
"command": "openshift.componentTypesView.registry.openHelmChartsInView",
12141242
"when": "view == openshiftProjectExplorer && viewItem == openshift.k8sContext && isLoggedIn",
12151243
"group": "c2"
@@ -1369,7 +1397,7 @@
13691397
"command": "openshift.resource.load",
13701398
"when": "view == openshiftProjectExplorer && viewItem == openshift.k8sObject || viewItem == openshift.k8sObject.helm"
13711399
},
1372-
{
1400+
{
13731401
"command": "openshift.resource.unInstall",
13741402
"when": "view == openshiftProjectExplorer && viewItem == openshift.k8sObject.helm"
13751403
},

0 commit comments

Comments
 (0)