Skip to content

Commit

Permalink
remove files only used in v1 (#4601)
Browse files Browse the repository at this point in the history
  • Loading branch information
Feroze Mohideen authored May 3, 2024
1 parent 7475757 commit 4dfa55d
Show file tree
Hide file tree
Showing 72 changed files with 249 additions and 17,024 deletions.
6 changes: 0 additions & 6 deletions dashboard/src/components/porter/InputSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import styled from 'styled-components';
import { withStyles } from '@material-ui/core/styles';
import Text from './Text';
import Spacer from './Spacer';
import SmartOptModal from 'main/home/app-dashboard/new-app-flow/tabs/SmartOptModal';
import NodeInfoModal from 'main/home/app-dashboard/new-app-flow/tabs/NodeInfoModal';

type InputSliderProps = {
label?: string;
Expand Down Expand Up @@ -127,10 +125,6 @@ const InputSlider: React.FC<InputSliderProps> = ({
>
help_outline
</StyledIcon></>}
{showNeedHelpModal &&
<NodeInfoModal
setModalVisible={setShowNeedHelpModal}
/>}
{isExceedingLimit &&
<><Spacer inline x={1} /><Label color="#FFBF00"> Value is not optimal for cost</Label></>}
</>
Expand Down
84 changes: 29 additions & 55 deletions dashboard/src/main/home/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ const Home: React.FC<Props> = (props) => {
} else {
setHasFinishedOnboarding(true);
}
} catch (error) { }
} catch (error) {}
};

useEffect(() => {
Expand Down Expand Up @@ -460,37 +460,21 @@ const Home: React.FC<Props> = (props) => {

<Switch>
<Route path="/apps/new/app">
{currentProject?.validate_apply_v2 ? (
<ClusterContextProvider
clusterId={currentCluster?.id}
refetchInterval={0}
>
<CreateApp />
</ClusterContextProvider>
) : (
<NewAppFlow />
)}
<ClusterContextProvider
clusterId={currentCluster?.id}
refetchInterval={0}
>
<CreateApp />
</ClusterContextProvider>
</Route>
<Route path="/apps/:appName/:tab">
{currentProject?.validate_apply_v2 ? (
<AppView />
) : (
<ExpandedApp />
)}
<AppView />
</Route>
<Route path="/apps/:appName">
{currentProject?.validate_apply_v2 ? (
<AppView />
) : (
<ExpandedApp />
)}
<AppView />
</Route>
<Route path="/apps">
{currentProject?.validate_apply_v2 ? (
<Apps />
) : (
<AppDashboard />
)}
<Apps />
</Route>

<Route path="/environment-groups/new">
Expand Down Expand Up @@ -524,8 +508,8 @@ const Home: React.FC<Props> = (props) => {

<Route path="/addons/new">
{currentProject?.capi_provisioner_enabled &&
currentProject?.simplified_view_enabled &&
currentProject?.beta_features_enabled ? (
currentProject?.simplified_view_enabled &&
currentProject?.beta_features_enabled ? (
<AddonTemplates />
) : (
<LegacyNewAddOnFlow />
Expand All @@ -539,8 +523,8 @@ const Home: React.FC<Props> = (props) => {
</Route>
<Route path="/addons">
{currentProject?.capi_provisioner_enabled &&
currentProject?.simplified_view_enabled &&
currentProject?.beta_features_enabled ? (
currentProject?.simplified_view_enabled &&
currentProject?.beta_features_enabled ? (
<AddonDashboard />
) : (
<LegacyAddOnDashboard />
Expand Down Expand Up @@ -590,9 +574,6 @@ const Home: React.FC<Props> = (props) => {
"/jobs",
"/env-groups",
"/datastores",
...(!currentProject?.validate_apply_v2
? ["/preview-environments"]
: []),
"/stacks",
]}
render={() => {
Expand Down Expand Up @@ -625,28 +606,21 @@ const Home: React.FC<Props> = (props) => {
path={"/project-settings"}
render={() => <GuardedProjectSettings />}
/>
{currentProject?.validate_apply_v2 && (
<>
<Route exact path="/preview-environments/configure">
<SetupApp />
</Route>
<Route
exact
path={`/preview-environments/apps/:appName/:tab`}
>
<AppView preview />
</Route>
<Route exact path="/preview-environments/apps/:appName">
<AppView preview />
</Route>
<Route exact path={`/preview-environments/apps`}>
<Apps />
</Route>
<Route exact path={`/preview-environments`}>
<PreviewEnvs />
</Route>
</>
)}
<Route exact path="/preview-environments/configure">
<SetupApp />
</Route>
<Route exact path={`/preview-environments/apps/:appName/:tab`}>
<AppView preview />
</Route>
<Route exact path="/preview-environments/apps/:appName">
<AppView preview />
</Route>
<Route exact path={`/preview-environments/apps`}>
<Apps />
</Route>
<Route exact path={`/preview-environments`}>
<PreviewEnvs />
</Route>
<Route path={"*"} render={() => <LaunchWrapper />} />
</Switch>
</ViewWrapper>
Expand Down
Loading

0 comments on commit 4dfa55d

Please sign in to comment.