Skip to content

Commit

Permalink
Renaming vsamstage to caching service
Browse files Browse the repository at this point in the history
  • Loading branch information
sakshibobade21 committed Oct 14, 2024
1 parent 753e218 commit f189728
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion src/renderer/components/common/Utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const NETWORKING_STAGE_LABEL = "Networking";
export const APF_AUTH_STAGE_LABEL = "APF Auth";
export const SECURITY_STAGE_LABEL = "Security";
export const CERTIFICATES_STAGE_LABEL = "Certificates";
export const VSAM_STAGE_LABEL = "Vsam";
export const CACHING_SERVICE_LABEL = "Caching Service";
export const STC_STAGE_LABEL = "Stcs";
export const LAUNCH_CONFIG_STAGE_LABEL = "Launch Config";
export const REVIEW_INSTALL_STAGE_LABEL = "Review Installation";
Expand Down
8 changes: 4 additions & 4 deletions src/renderer/components/configuration-wizard/Wizard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ import { selectLoading } from './wizardSlice';
import { useAppSelector } from '../../hooks';
import InitApfAuth from '../stages/InitApfAuth';
import Networking from '../stages/Networking';
import Vsam from '../stages/Vsam';
import CachingService from '../stages/CachingService';
import LaunchConfig from '../stages/LaunchConfig';
import { getProgress } from '../stages/progress/StageProgressStatus';
import Unpax from '../stages/Unpax';
import { APF_AUTH_STAGE_LABEL, CERTIFICATES_STAGE_LABEL, CONNECTION_STAGE_LABEL, FINISH_INSTALL_STAGE_LABEL, INIT_STAGE_LABEL, INSTALLATION_TYPE_STAGE_LABEL, INSTALL_STAGE_LABEL, LAUNCH_CONFIG_STAGE_LABEL, NETWORKING_STAGE_LABEL, PLANNING_STAGE_LABEL, REVIEW_INSTALL_STAGE_LABEL, SECURITY_STAGE_LABEL, UNPAX_STAGE_LABEL, VSAM_STAGE_LABEL } from '../common/Utils';
import { APF_AUTH_STAGE_LABEL, CERTIFICATES_STAGE_LABEL, CONNECTION_STAGE_LABEL, FINISH_INSTALL_STAGE_LABEL, INIT_STAGE_LABEL, INSTALLATION_TYPE_STAGE_LABEL, INSTALL_STAGE_LABEL, LAUNCH_CONFIG_STAGE_LABEL, NETWORKING_STAGE_LABEL, PLANNING_STAGE_LABEL, REVIEW_INSTALL_STAGE_LABEL, SECURITY_STAGE_LABEL, UNPAX_STAGE_LABEL, CACHING_SERVICE_LABEL } from '../common/Utils';

const mvsDatasetInitProgress = getProgress('datasetInstallationStatus');

Expand All @@ -42,8 +42,8 @@ export const stages = [
{id: 2, label: APF_AUTH_STAGE_LABEL, component: <InitApfAuth/>, hasJCL: true, isSkippable: true, isSkipped: false, hasYaml: true, hasOutput: true, steps: 1, nextButton: 'Continue to Security Setup', statusKey: 'apfAuthStatus'},
{id: 3, label: SECURITY_STAGE_LABEL, component: <Security/>, hasJCL: true, isSkippable: true, isSkipped: false, hasYaml: true, hasOutput: true, steps: 1, nextButton: 'Continue to STC Setup', statusKey: 'securityStatus'},
{id: 4, label: 'Stcs', component: <Stcs/>, hasJCL: true, isSkippable: true, isSkipped: false, hasYaml: true, hasOutput: true, steps: 1, nextButton: 'Continue to Certificates Setup', statusKey: 'stcsStatus'},
{id: 5, label: CERTIFICATES_STAGE_LABEL, component: <Certificates/>, hasJCL: true, isSkippable: true, isSkipped: false, hasYaml: true, hasOutput: true, steps: 1, nextButton: 'Continue to Vsam Setup', statusKey: 'certificateStatus'},
{id: 6, label: VSAM_STAGE_LABEL, component: <Vsam/>, hasJCL: true, isSkippable: true, isSkipped: false, hasYaml: true, hasOutput: true, steps: 1, nextButton: 'Continue to Launch Setup', statusKey: 'vsamStatus'},
{id: 5, label: CERTIFICATES_STAGE_LABEL, component: <Certificates/>, hasJCL: true, isSkippable: true, isSkipped: false, hasYaml: true, hasOutput: true, steps: 1, nextButton: 'Continue to Caching Service Setup', statusKey: 'certificateStatus'},
{id: 6, label: CACHING_SERVICE_LABEL, component: <CachingService/>, hasJCL: true, isSkippable: true, isSkipped: false, hasYaml: true, hasOutput: true, steps: 1, nextButton: 'Continue to Launch Setup', statusKey: 'cachingServiceStatus'},
{id: 7, label: LAUNCH_CONFIG_STAGE_LABEL, component: <LaunchConfig/>, hasJCL: true, isSkippable: true, isSkipped: false, hasYaml: true, hasOutput: true, steps: 1, nextButton: 'Continue to Instance Setup', statusKey: 'launchConfigStatus'},
], nextButton: 'Review', statusKey: 'initializationStatus'},
{id: 5, label: REVIEW_INSTALL_STAGE_LABEL, component: <ReviewInstallation/>, hasJCL: false, isSkippable: false, hasOutput: false, steps: 1, nextButton: 'Finish Installation', statusKey: 'reviewStatus'},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { useState, useEffect, useRef } from "react";
import { Box, Button, FormControl, InputLabel, Select, TextField, MenuItem } from '@mui/material';
import { useAppSelector, useAppDispatch } from '../../hooks';
import { selectYaml, selectSchema, setNextStepEnabled, setYaml } from '../configuration-wizard/wizardSlice';
import { setInitializationStatus, setVsamStatus } from './progress/progressSlice';
import { setInitializationStatus, setCachingServiceStatus } from './progress/progressSlice';
import ContainerCard from '../common/ContainerCard';
import JsonForm from '../common/JsonForms';
import EditorDialog from "../common/EditorDialog";
Expand All @@ -29,11 +29,11 @@ import { InitSubStepsState } from "../../../types/stateInterfaces";
import { alertEmitter } from "../Header";
import { INIT_STAGE_LABEL, ajv } from "../common/Utils";

const Vsam = () => {
const CachingService = () => {

// TODO: Display granular details of installation - downloading - unpacking - running zwe command

const subStageLabel = 'Vsam';
const subStageLabel = 'Caching Service';

const [STAGE_ID] = useState(getStageDetails(INIT_STAGE_LABEL).id);
const [SUB_STAGES] = useState(!!getStageDetails(INIT_STAGE_LABEL).subStages);
Expand All @@ -46,7 +46,7 @@ const Vsam = () => {
const yaml = useAppSelector(selectYaml);
const [setupSchema] = useState(schema?.properties?.zowe?.properties?.setup?.properties?.vsam);
const setupYaml = yaml?.zowe?.setup?.vsam;
const [showProgress, setShowProgress] = useState(getProgress('vsamStatus'));
const [showProgress, setShowProgress] = useState(getProgress('cachingServiceStatus'));
const [init, setInit] = useState(false);
const [editorVisible, setEditorVisible] = useState(false);
const [isFormValid, setIsFormValid] = useState(false);
Expand Down Expand Up @@ -87,7 +87,7 @@ const Vsam = () => {
}

let nextPosition;
const stepProgress = getProgress('vsamStatus');
const stepProgress = getProgress('cachingServiceStatus');

dispatch(setInitializationStatus(isInitializationStageComplete()));
setShowProgress(initClicked || stepProgress);
Expand Down Expand Up @@ -121,7 +121,7 @@ const Vsam = () => {
}, []);

useEffect(() => {
setShowProgress(initClicked || getProgress('vsamStatus'));
setShowProgress(initClicked || getProgress('cachingServiceStatus'));

if(initClicked) {
let nextPosition = document.getElementById('start-vsam-progress');
Expand All @@ -132,7 +132,7 @@ const Vsam = () => {
}, [initClicked]);

useEffect(() => {
if(!getProgress('vsamStatus') && initClicked) {
if(!getProgress('cachingServiceStatus') && initClicked) {
timer = setInterval(() => {
window.electron.ipcRenderer.getInitVsamProgress().then((res: any) => {
setVsamInitializationProgress(res);
Expand Down Expand Up @@ -166,7 +166,7 @@ const Vsam = () => {
const allAttributesTrue = Object.values(vsamInitState).every(value => value === true);
if(allAttributesTrue) {
dispatchActions(true);
setShowProgress(initClicked || getProgress('vsamStatus'));
setShowProgress(initClicked || getProgress('cachingServiceStatus'));
} else if (selectedStorageMode && selectedStorageMode.toUpperCase() == 'VSAM') {
dispatchActions(false);
setShowProgress(false);
Expand Down Expand Up @@ -194,7 +194,7 @@ const Vsam = () => {
}

const dispatchActions = (status: boolean) => {
dispatch(setVsamStatus(status));
dispatch(setCachingServiceStatus(status));
dispatch(setInitializationStatus(isInitializationStageComplete()));
dispatch(setNextStepEnabled(status));
setStageSkipStatus(!status);
Expand Down Expand Up @@ -347,7 +347,7 @@ const Vsam = () => {
<Button variant="outlined" sx={{ textTransform: 'none', mr: 1 }} onClick={() => toggleEditorVisibility("output")}>View Job Output</Button>
</Box>

<ContainerCard title="Vsam" description="Configure Zowe Vsam.">
<ContainerCard title="CachingService" description="Configure Zowe CachingService.">

{ editorVisible &&
<EditorDialog
Expand Down Expand Up @@ -434,4 +434,4 @@ const Vsam = () => {
);
};

export default Vsam;
export default CachingService;
2 changes: 1 addition & 1 deletion src/renderer/components/stages/ReviewInstallation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const ReviewInstallation = () => {
completeProgress.securityStatus,
completeProgress.stcsStatus,
completeProgress.certificateStatus,
completeProgress.vsamStatus,
completeProgress.cachingServiceStatus,
completeProgress.launchConfigStatus
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const progressStatus: ProgressState = {
securityStatus: false,
stcsStatus: false,
certificateStatus: false,
vsamStatus: false,
cachingServiceStatus: false,
launchConfigStatus: false,
reviewStatus: false,
}
Expand Down Expand Up @@ -549,7 +549,7 @@ export const isInitializationStageComplete = (): boolean => {
const progress = localStorage.getItem(progressStateKey);
if(progress) {
const data:any = unflatten(JSON.parse(progress));
return data.datasetInstallationStatus && data.networkingStatus && data.apfAuthStatus && data.securityStatus && data.stcsStatus && data.certificateStatus && data.vsamStatus && data.launchConfigStatus;
return data.datasetInstallationStatus && data.networkingStatus && data.apfAuthStatus && data.securityStatus && data.stcsStatus && data.certificateStatus && data.cachingServiceStatus && data.launchConfigStatus;
} else {
return false;
}
Expand Down
12 changes: 6 additions & 6 deletions src/renderer/components/stages/progress/progressSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const initialState: ProgressState = {
securityStatus: getProgress('securityStatus') || false,
stcsStatus: getProgress('stcsStatus') || false,
certificateStatus: getProgress('certificateStatus') || false,
vsamStatus: getProgress('vsamStatus') || false,
cachingServiceStatus: getProgress('cachingServiceStatus') || false,
launchConfigStatus: getProgress('launchConfigStatus') || false,
reviewStatus: getProgress('reviewStatus') || false
}
Expand Down Expand Up @@ -78,9 +78,9 @@ export const progressSlice = createSlice({
state.certificateStatus = action.payload;
setProgress('certificateStatus', action.payload);
},
setVsamStatus: (state, action: PayloadAction<boolean>) => {
state.vsamStatus = action.payload;
setProgress('vsamStatus', action.payload);
setCachingServiceStatus: (state, action: PayloadAction<boolean>) => {
state.cachingServiceStatus = action.payload;
setProgress('cachingServiceStatus', action.payload);
},
setLaunchConfigStatus: (state, action: PayloadAction<boolean>) => {
state.launchConfigStatus = action.payload;
Expand All @@ -93,7 +93,7 @@ export const progressSlice = createSlice({
}
});

export const { setConnectionStatus, setPlanningStatus, setInstallationTypeStatus, setInitializationStatus, setDatasetInstallationStatus, setDownloadUnpaxStatus, setNetworkingStatus, setApfAuthStatus, setSecurityStatus, setStcsStatus, setCertificateStatus, setVsamStatus, setLaunchConfigStatus, setReviewStatus } = progressSlice.actions;
export const { setConnectionStatus, setPlanningStatus, setInstallationTypeStatus, setInitializationStatus, setDatasetInstallationStatus, setDownloadUnpaxStatus, setNetworkingStatus, setApfAuthStatus, setSecurityStatus, setStcsStatus, setCertificateStatus, setCachingServiceStatus, setLaunchConfigStatus, setReviewStatus } = progressSlice.actions;

export const selectConnectionStatus = (state: RootState) => state.progress.connectionStatus;
export const selectPlanningStatus = (state: RootState) => state.progress.planningStatus;
Expand All @@ -106,7 +106,7 @@ export const selectApfAuthStatus = (state: RootState) => state.progress.apfAuthS
export const selectSecurityStatus = (state: RootState) => state.progress.securityStatus;
export const selectStcsStatus = (state: RootState) => state.progress.stcsStatus;
export const selectCertificateStatus = (state: RootState) => state.progress.certificateStatus;
export const selectVsamStatus = (state: RootState) => state.progress.vsamStatus;
export const selectCachingServiceStatus = (state: RootState) => state.progress.cachingServiceStatus;
export const selectLaunchConfigStatus = (state: RootState) => state.progress.launchConfigStatus;
export const selectReviewStatus = (state: RootState) => state.progress.reviewStatus;

Expand Down
2 changes: 1 addition & 1 deletion src/services/StageDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const initSubStageSkipStatus = (): void => {
skipStatus.security,
skipStatus.stcs,
skipStatus.certificate,
skipStatus.vsam,
skipStatus.cachingService,
skipStatus.launchConfig
];

Expand Down
4 changes: 2 additions & 2 deletions src/types/stateInterfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface ProgressState {
securityStatus: boolean;
stcsStatus: boolean;
certificateStatus: boolean;
vsamStatus: boolean;
cachingServiceStatus: boolean;
launchConfigStatus: boolean;
reviewStatus: boolean;
}
Expand Down Expand Up @@ -95,7 +95,7 @@ export interface subStepState {
security: boolean,
stcs: boolean,
certificate: boolean,
vsam: boolean,
cachingService: boolean,
launchConfig: boolean
}

Expand Down

0 comments on commit f189728

Please sign in to comment.