Skip to content

Commit

Permalink
add back /applications route to v2 (#4679)
Browse files Browse the repository at this point in the history
  • Loading branch information
d-g-town authored May 22, 2024
1 parent b2d0647 commit a9b13a6
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions dashboard/src/main/home/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React, { useContext, useEffect, useRef, useState } from "react";
import dayjs from "dayjs";
import relativeTime from "dayjs/plugin/relativeTime";
import NoClusterPlaceHolder from "legacy/components/NoClusterPlaceHolder";
import DashboardRouter from "legacy/main/home/cluster-dashboard/DashboardRouter";
import { createPortal } from "react-dom";
import {
Route,
Expand All @@ -12,6 +14,7 @@ import { Redirect } from "react-router-dom";
import styled, { ThemeProvider } from "styled-components";

import ConfirmOverlay from "components/ConfirmOverlay";
import Loading from "components/Loading";
import Button from "components/porter/Button";
import Link from "components/porter/Link";
import Modal from "components/porter/Modal";
Expand Down Expand Up @@ -524,6 +527,29 @@ const Home: React.FC<Props> = (props) => {
<Route path="/datastores">
<DatabaseDashboard />
</Route>
<Route
path={["/applications"]}
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="/compliance">
<ComplianceDashboard />
Expand Down

0 comments on commit a9b13a6

Please sign in to comment.