|
|
@@ -12,8 +12,6 @@ import { Redirect } from "react-router-dom";
|
|
|
import styled, { ThemeProvider } from "styled-components";
|
|
|
|
|
|
import ConfirmOverlay from "components/ConfirmOverlay";
|
|
|
-import Loading from "components/Loading";
|
|
|
-import NoClusterPlaceHolder from "components/NoClusterPlaceHolder";
|
|
|
import Button from "components/porter/Button";
|
|
|
import Link from "components/porter/Link";
|
|
|
import Modal from "components/porter/Modal";
|
|
|
@@ -47,7 +45,6 @@ import LegacyNewAddOnFlow from "./add-on-dashboard/legacy_NewAddOnFlow";
|
|
|
import AppView from "./app-dashboard/app-view/AppView";
|
|
|
import Apps from "./app-dashboard/apps/Apps";
|
|
|
import CreateApp from "./app-dashboard/create-app/CreateApp";
|
|
|
-import DashboardRouter from "./cluster-dashboard/DashboardRouter";
|
|
|
import PreviewEnvs from "./cluster-dashboard/preview-environments/v2/PreviewEnvs";
|
|
|
import SetupApp from "./cluster-dashboard/preview-environments/v2/setup-app/SetupApp";
|
|
|
import ComplianceDashboard from "./compliance-dashboard/ComplianceDashboard";
|
|
|
@@ -399,9 +396,7 @@ const Home: React.FC<Props> = (props) => {
|
|
|
}
|
|
|
|
|
|
return (
|
|
|
- <ThemeProvider
|
|
|
- theme={currentProject?.simplified_view_enabled ? midnight : standard}
|
|
|
- >
|
|
|
+ <ThemeProvider theme={midnight}>
|
|
|
<DeploymentTargetProvider>
|
|
|
<StyledHome
|
|
|
padTop={
|
|
|
@@ -536,7 +531,6 @@ const Home: React.FC<Props> = (props) => {
|
|
|
|
|
|
<Route path="/addons/new">
|
|
|
{currentProject?.capi_provisioner_enabled &&
|
|
|
- currentProject?.simplified_view_enabled &&
|
|
|
currentProject?.beta_features_enabled ? (
|
|
|
<AddonTemplates />
|
|
|
) : (
|
|
|
@@ -551,7 +545,6 @@ const Home: React.FC<Props> = (props) => {
|
|
|
</Route>
|
|
|
<Route path="/addons">
|
|
|
{currentProject?.capi_provisioner_enabled &&
|
|
|
- currentProject?.simplified_view_enabled &&
|
|
|
currentProject?.beta_features_enabled ? (
|
|
|
<AddonDashboard />
|
|
|
) : (
|
|
|
@@ -605,39 +598,6 @@ const Home: React.FC<Props> = (props) => {
|
|
|
);
|
|
|
}}
|
|
|
/>
|
|
|
- <Route
|
|
|
- path={[
|
|
|
- "/cluster-dashboard",
|
|
|
- "/applications",
|
|
|
- "/jobs",
|
|
|
- "/env-groups",
|
|
|
- "/datastores",
|
|
|
- "/stacks",
|
|
|
- ...(!currentProject?.simplified_view_enabled
|
|
|
- ? ["/preview-environments"]
|
|
|
- : []),
|
|
|
- ]}
|
|
|
- render={() => {
|
|
|
- if (currentCluster?.id === -1) {
|
|
|
- return <Loading />;
|
|
|
- } else if (!currentCluster?.name) {
|
|
|
- return (
|
|
|
- <DashboardWrapper>
|
|
|
- <NoClusterPlaceHolder></NoClusterPlaceHolder>
|
|
|
- </DashboardWrapper>
|
|
|
- );
|
|
|
- }
|
|
|
- return (
|
|
|
- <DashboardWrapper>
|
|
|
- <DashboardRouter
|
|
|
- currentCluster={currentCluster}
|
|
|
- setSidebar={setForceSidebar}
|
|
|
- currentView={props.currentRoute}
|
|
|
- />
|
|
|
- </DashboardWrapper>
|
|
|
- );
|
|
|
- }}
|
|
|
- />
|
|
|
<Route
|
|
|
path={"/integrations"}
|
|
|
render={() => <GuardedIntegrations />}
|
|
|
@@ -647,28 +607,21 @@ const Home: React.FC<Props> = (props) => {
|
|
|
path={"/project-settings"}
|
|
|
render={() => <GuardedProjectSettings />}
|
|
|
/>
|
|
|
- {currentProject?.simplified_view_enabled && (
|
|
|
- <>
|
|
|
- <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>
|