github.com/replicatedhq/ship@v0.55.0/web/init/src/containers/KustomizeOverlay.js (about)

     1  import { connect } from "react-redux";
     2  import realKustomizeOverlay from "../components/kustomize/kustomize_overlay/KustomizeOverlay";
     3  
     4  import { loadingData } from "../redux/ui/main/actions";
     5  import { getContentForStep } from "../redux/data/appRoutes/actions";
     6  import { getMetadata } from "../redux/data/kustomizeSettings/actions";
     7  import {
     8    getFileContent,
     9    saveKustomizeOverlay,
    10    deleteOverlay,
    11    includeBase,
    12    finalizeKustomizeOverlay,
    13    generatePatch,
    14    applyPatch,
    15  } from "../redux/data/kustomizeOverlay/actions";
    16  
    17  const KustomizeOverlay = connect(
    18    state => ({
    19      currentStep: state.data.determineSteps.stepsData.step,
    20      phase: state.data.determineSteps.stepsData.phase,
    21      actions: state.data.determineSteps.stepsData.actions,
    22      progress: state.data.determineSteps.stepsData.progress,
    23      fileContents: state.data.kustomizeOverlay.kustomizeData.fileContents,
    24      dataLoading: state.ui.main.loading,
    25      patch: state.data.kustomizeOverlay.kustomizeData.patch,
    26      modified: state.data.kustomizeOverlay.kustomizeData.modified,
    27    }),
    28    dispatch => ({
    29      getFileContent(payload) { return dispatch(getFileContent(payload)); },
    30      getContentForStep(stepId) { return dispatch(getContentForStep(stepId)); },
    31      getMetadata() { return dispatch(getMetadata()) },
    32      saveKustomizeOverlay(payload) { return dispatch(saveKustomizeOverlay(payload)); },
    33      deleteOverlay(path, type) { return dispatch(deleteOverlay(path, type)); },
    34      includeBase(path) { return dispatch(includeBase(path)); },
    35      finalizeKustomizeOverlay() { return dispatch(finalizeKustomizeOverlay()); },
    36      loadingData(key, isLoading) { return dispatch(loadingData(key, isLoading)); },
    37      generatePatch(payload) { return dispatch(generatePatch(payload)); },
    38      applyPatch(payload) { return dispatch(applyPatch(payload)); },
    39    }),
    40  )(realKustomizeOverlay);
    41  
    42  export default KustomizeOverlay;