From 7128ad221b5bef44ca63159519ff27ccc6fb4b85 Mon Sep 17 00:00:00 2001 From: Ole Lensmar Date: Thu, 26 Oct 2023 14:11:23 +0200 Subject: [PATCH 1/3] fix: updated description and synopsis --- package.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 5ff9846f4..721209802 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "monokle", "version": "2.4.2", "author": "Kubeshop", - "description": "UI for managing k8s manifests", + "description": "Desktop IDE for working with Kubernetes Clusters and YAML configurations", "homepage": "./", "main": "build/electron/main.js", "contributors": [ @@ -283,8 +283,7 @@ "maintainer": "Kubeshop", "vendor": "Kubeshop", "executableName": "Monokle", - "synopsis": "Your kubernetes best friend!", - "description": "A free, open-source tool, to help you navigate kubernetes development. By Kubeshop." + "synopsis": "Desktop IDE for Kubernetes" }, "appImage": { "artifactName": "${productName}-${os}-${version}-${arch}.${ext}" From 64e690336ca2cf52031d45406a97809f2e544e07 Mon Sep 17 00:00:00 2001 From: Dev Catalin <20538711+devcatalin@users.noreply.github.com> Date: Mon, 30 Oct 2023 12:54:32 +0200 Subject: [PATCH 2/3] feat: setting for disabling cluster validation --- .../GlobalSettings/GlobalSettings.tsx | 15 +++++++++++++++ src/redux/validation/validation.listeners.tsx | 19 +++++++++++++++++++ src/shared/constants/electronStore.ts | 4 ++++ 3 files changed, 38 insertions(+) diff --git a/src/components/organisms/SettingsPane/GlobalSettings/GlobalSettings.tsx b/src/components/organisms/SettingsPane/GlobalSettings/GlobalSettings.tsx index cc8d66db9..b4d0bb001 100644 --- a/src/components/organisms/SettingsPane/GlobalSettings/GlobalSettings.tsx +++ b/src/components/organisms/SettingsPane/GlobalSettings/GlobalSettings.tsx @@ -48,6 +48,18 @@ export const GlobalSettings = () => { [_setShouldAppendServerPath] ); + const [disableClusterValidation, _setDisableClusterValidation] = useState( + electronStore.get('appConfig.settings.disableClusterValidation') ?? false + ); + + const setDisableClusterValidation = useCallback( + (value: boolean) => { + _setDisableClusterValidation(value); + electronStore.set('appConfig.settings.disableClusterValidation', value); + }, + [_setDisableClusterValidation] + ); + const [isOverridingBinaryPaths, _setIsOverridingBinaryPaths] = useState( Boolean(electronStore.get('appConfig.binaryPaths')) ?? false ); @@ -192,6 +204,9 @@ export const GlobalSettings = () => { setShouldAppendServerPath(e.target.checked)}> Append Server Path to Kubectl Proxy + setDisableClusterValidation(e.target.checked)}> + Disable validation of cluster resources + diff --git a/src/redux/validation/validation.listeners.tsx b/src/redux/validation/validation.listeners.tsx index bb56d12c7..40bdbf8c3 100644 --- a/src/redux/validation/validation.listeners.tsx +++ b/src/redux/validation/validation.listeners.tsx @@ -46,6 +46,7 @@ import {startExecutionTimer} from '@utils/executionTime'; import {doesSchemaExist} from '@utils/index'; import {ResourceIdentifier, ResourceStorage} from '@shared/models/k8sResource'; +import {electronStore} from '@shared/utils'; import {isDefined} from '@shared/utils/filter'; import {isEqual} from '@shared/utils/isEqual'; import {trackEvent} from '@shared/utils/telemetry'; @@ -88,6 +89,10 @@ const loadListener: AppListenerFn = listen => { async effect(_action, {dispatch, delay, signal, cancelActiveListeners}) { trackEvent('validation/load_config', {actionType: _action.type}); if (isAnyOf(setIsInQuickClusterMode)(_action)) { + const disableClusterValidation = electronStore.get('appConfig.settings.disableClusterValidation') ?? false; + if (disableClusterValidation) { + return; + } if (!_action.payload) { return; } @@ -127,6 +132,20 @@ const validateListener: AppListenerFn = listen => { restartPreview.rejected ), async effect(_action, {dispatch, getState, cancelActiveListeners, signal, delay}) { + const disableClusterValidation = electronStore.get('appConfig.settings.disableClusterValidation') ?? false; + + if (disableClusterValidation) { + if ( + isAnyOf( + loadClusterResources.fulfilled, + reloadClusterResources.fulfilled, + deleteMultipleClusterResources + )(_action) + ) { + return; + } + } + const stopExecutionTimer = startExecutionTimer(); cancelActiveListeners(); diff --git a/src/shared/constants/electronStore.ts b/src/shared/constants/electronStore.ts index 787d23468..4011101af 100644 --- a/src/shared/constants/electronStore.ts +++ b/src/shared/constants/electronStore.ts @@ -117,6 +117,9 @@ export const electronStoreSchema = { allowEditInClusterMode: { type: 'boolean', }, + disableClusterValidation: { + type: 'boolean', + }, }, }, recentFolders: { @@ -325,6 +328,7 @@ export const electronStoreDefaults = { createDefaultObjects: false, setDefaultPrimitiveValues: true, allowEditInClusterMode: true, + disableClusterValidation: false, enableHelmWithKustomize: true, }, recentFolders: [], From 12e5ff6c1f531fa43dc9473b266401856a07a95a Mon Sep 17 00:00:00 2001 From: Dev Catalin <20538711+devcatalin@users.noreply.github.com> Date: Mon, 30 Oct 2023 13:17:25 +0200 Subject: [PATCH 3/3] refactor: add pagination to cluster resource table --- src/components/organisms/Dashboard/TableView/TableView.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/organisms/Dashboard/TableView/TableView.tsx b/src/components/organisms/Dashboard/TableView/TableView.tsx index 7fb1cec90..9e19e1587 100644 --- a/src/components/organisms/Dashboard/TableView/TableView.tsx +++ b/src/components/organisms/Dashboard/TableView/TableView.tsx @@ -56,10 +56,9 @@ const TableView = ({ columns={columns} rowKey="id" scroll={{ - y: tableScrollHeight || height - 212 - (bottomSelection === 'terminal' ? terminalHeight : 0), + y: tableScrollHeight || height - 270 - (bottomSelection === 'terminal' ? terminalHeight : 0), }} rowClassName={(record: ResourceMeta | any) => (record.id === selectedResourceId ? 'selected' : '')} - pagination={false} sticky onRow={(record: ResourceMeta | any) => { return {