Skip to content

Commit

Permalink
Merge pull request #1447 from kubeshop/olelensmar/fix/compile-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
olensmar authored Mar 9, 2022
2 parents f067531 + fcdf9ac commit 7a97411
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 32 deletions.
54 changes: 27 additions & 27 deletions src/components/organisms/ActionsPane/ActionsPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ const ActionsPane: React.FC<IProps> = props => {
});
setIsApplyModalVisible(false);
},
[dispatch, fileMap, kubeConfigContext, kubeConfigPath, projectConfig, previewType, resourceMap, selectedResource]
[dispatch, fileMap, kubeConfigContext, projectConfig, previewType, resourceMap, selectedResource]
);

const onClickApplyHelmChart = useCallback(
Expand Down Expand Up @@ -548,32 +548,32 @@ const ActionsPane: React.FC<IProps> = props => {
) : null}
</TabPane>

{schemaForSelectedPath ||
(selectedResource && (isKustomization || resourceKindHandler?.formEditorOptions?.editorSchema)) ? (
<TabPane key="form" tab={<TabHeader icon={<ContainerOutlined />}>Form</TabHeader>}>
{isFolderLoading || previewLoader.isLoading ? (
<S.Skeleton active />
) : activeTabKey === 'form' ? (
selectedPath && schemaForSelectedPath && !selectedResource ? (
<FormEditor
formSchema={extractFormSchema(schemaForSelectedPath)}
formUiSchema={getUiSchemaForPath(selectedPath)}
/>
) : isKustomization && selectedResource ? (
<FormEditor
formSchema={extractFormSchema(
getResourceSchema(selectedResource, String(k8sVersion), String(userDataDir))
)}
/>
) : resourceKindHandler?.formEditorOptions ? (
<FormEditor
formSchema={resourceKindHandler.formEditorOptions.editorSchema}
formUiSchema={resourceKindHandler.formEditorOptions.editorUiSchema}
/>
) : null
) : null}
</TabPane>
) : null}
{schemaForSelectedPath ||
(selectedResource && (isKustomization || resourceKindHandler?.formEditorOptions?.editorSchema)) ? (
<TabPane key="form" tab={<TabHeader icon={<ContainerOutlined />}>Form</TabHeader>}>
{isFolderLoading || previewLoader.isLoading ? (
<S.Skeleton active />
) : activeTabKey === 'form' ? (
selectedPath && schemaForSelectedPath && !selectedResource ? (
<FormEditor
formSchema={extractFormSchema(schemaForSelectedPath)}
formUiSchema={getUiSchemaForPath(selectedPath)}
/>
) : isKustomization && selectedResource ? (
<FormEditor
formSchema={extractFormSchema(
getResourceSchema(selectedResource, String(k8sVersion), String(userDataDir))
)}
/>
) : resourceKindHandler?.formEditorOptions ? (
<FormEditor
formSchema={resourceKindHandler.formEditorOptions.editorSchema}
formUiSchema={resourceKindHandler.formEditorOptions.editorUiSchema}
/>
) : null
) : null}
</TabPane>
) : null}

{selectedResource && resourceKindHandler && !isKustomization && (
<TabPane key="metadataForm" tab={<TabHeader icon={<ContainerOutlined />}>Metadata</TabHeader>}>
Expand Down
5 changes: 2 additions & 3 deletions src/redux/thunks/applyMultipleResources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ import {AppDispatch} from '@models/appdispatch';
import {K8sResource} from '@models/k8sresource';

import {setAlert} from '@redux/reducers/alert';
import {doesTextStartWithYamlDocumentDelimiter} from '@redux/services/resource';
import {applyYamlToCluster} from '@redux/thunks/applyYaml';
import {removeNamespaceFromCluster} from '@redux/thunks/utils';

import {doesTextStartWithYamlDocumentDelimiter} from './resource';

const applyMultipleResources = (
const applyMultipleResources = async (
config: AppConfig,
resourcesToApply: K8sResource[],
dispatch: AppDispatch,
Expand Down
2 changes: 0 additions & 2 deletions src/redux/thunks/previewHelmValuesFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ export const previewHelmValuesFile = createAsyncThunk<
const state = thunkAPI.getState().main;
const projectConfig = currentConfigSelector(thunkAPI.getState());
const kubeconfig = projectConfig.kubeConfig?.path;
const k8sVersion = projectConfig.k8sVersion;
const userDataDir = configState.userDataDir;
const currentContext = projectConfig.kubeConfig?.currentContext;
const valuesFile = state.helmValuesMap[valuesFileId];

Expand Down

0 comments on commit 7a97411

Please sign in to comment.