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

feat: LENSOSS-35 - Ability to import yaml files

Signed-off-by: gitstart <bot@gitstart.com>
This commit is contained in:
gitstart 2023-10-11 09:22:47 +00:00
parent f1a960fd78
commit b968a6c59a
No known key found for this signature in database
GPG Key ID: 1029536458B930CC
7 changed files with 21 additions and 3 deletions

3
package-lock.json generated
View File

@ -34356,6 +34356,7 @@
"@k8slens/resource-templates": "^1.0.0-alpha.1", "@k8slens/resource-templates": "^1.0.0-alpha.1",
"@k8slens/routing": "^1.0.0-alpha.5", "@k8slens/routing": "^1.0.0-alpha.5",
"@k8slens/run-many": "^1.0.0-alpha.1", "@k8slens/run-many": "^1.0.0-alpha.1",
"@k8slens/spinner": "^1.0.0",
"@k8slens/startable-stoppable": "^1.0.0-alpha.1", "@k8slens/startable-stoppable": "^1.0.0-alpha.1",
"@k8slens/tooltip": "^1.0.0-alpha.5", "@k8slens/tooltip": "^1.0.0-alpha.5",
"@k8slens/utilities": "^1.0.0-alpha.1", "@k8slens/utilities": "^1.0.0-alpha.1",
@ -35782,7 +35783,7 @@
}, },
"packages/ui-components/spinner": { "packages/ui-components/spinner": {
"name": "@k8slens/spinner", "name": "@k8slens/spinner",
"version": "1.0.0-alpha.0", "version": "1.0.0",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@k8slens/eslint-config": "^6.5.0", "@k8slens/eslint-config": "^6.5.0",

View File

@ -290,6 +290,7 @@ exports[`workloads / pods when navigating to workloads / pods view given a names
Pods Pods
</div> </div>
</div> </div>
</div> </div>
<main <main
class="" class=""

View File

@ -11,6 +11,7 @@ import openPathPickingDialogInjectable from "../../../features/path-picking-dial
import addSyncEntriesInjectable from "../../initializers/add-sync-entries.injectable"; import addSyncEntriesInjectable from "../../initializers/add-sync-entries.injectable";
import { beforeFrameStartsSecondInjectionToken } from "../tokens"; import { beforeFrameStartsSecondInjectionToken } from "../tokens";
const setupKubernetesClusterCatalogAddMenuListenerInjectable = getInjectable({ const setupKubernetesClusterCatalogAddMenuListenerInjectable = getInjectable({
id: "setup-kubernetes-cluster-catalog-add-menu-listener", id: "setup-kubernetes-cluster-catalog-add-menu-listener",
instantiate: (di) => ({ instantiate: (di) => ({
@ -51,9 +52,14 @@ const setupKubernetesClusterCatalogAddMenuListenerInjectable = getInjectable({
message: "Sync file(s)", message: "Sync file(s)",
buttonLabel: "Sync", buttonLabel: "Sync",
properties: ["showHiddenFiles", "multiSelections", "openFile"], properties: ["showHiddenFiles", "multiSelections", "openFile"],
filters: [
{ name: 'Kubeconfig and YAML Files', extensions: ['conf', 'yaml', 'yml'] },
{ name: 'All Files', extensions: ['*'] }
],
onPick: addSyncEntries, onPick: addSyncEntries,
}), }),
}, },
); );
} else { } else {
ctx.menuItems.push( ctx.menuItems.push(

View File

@ -27,4 +27,5 @@ export function jsonValidator(value: string) {
export const monacoValidators = { export const monacoValidators = {
yaml: yamlValidator, yaml: yamlValidator,
json: jsonValidator, json: jsonValidator,
}; };

View File

@ -37,6 +37,9 @@
&.namespace { &.namespace {
flex-grow: 1.2; flex-grow: 1.2;
//Auto Width: Allow the dropdown to expand horizontally to accommodate the text.
white-space: nowrap;
min-width: min-content;
} }
&.cpu { &.cpu {

View File

@ -9,7 +9,9 @@ import { runInAction } from "mobx";
import { showSuccessNotificationInjectable } from "@k8slens/notifications"; import { showSuccessNotificationInjectable } from "@k8slens/notifications";
import userPreferencesStateInjectable from "../../features/user-preferences/common/state.injectable"; import userPreferencesStateInjectable from "../../features/user-preferences/common/state.injectable";
const addSyncEntriesInjectable = getInjectable({ const
addSyncEntriesInjectable = getInjectable({
id: "add-sync-entries", id: "add-sync-entries",
instantiate: (di) => { instantiate: (di) => {

View File

@ -109,6 +109,10 @@
], ],
[ [
"1.27", "1.27",
"1.27.2" "1.27.6"
],
[
"1.28",
"1.28.2"
] ]
] ]