diff --git a/src/components/organisms/Dashboard/TableView/TableView.tsx b/src/components/organisms/Dashboard/TableView/TableView.tsx index 7fb1cec901..9e19e15878 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 { diff --git a/src/components/organisms/SettingsPane/GlobalSettings/GlobalSettings.tsx b/src/components/organisms/SettingsPane/GlobalSettings/GlobalSettings.tsx index cc8d66db9f..b4d0bb0019 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 bb56d12c7e..40bdbf8c32 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 787d234688..4011101af8 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: [],