Skip to content

Commit

Permalink
wip2
Browse files Browse the repository at this point in the history
  • Loading branch information
yosefmih committed Apr 24, 2024
1 parent cbe15c9 commit 729f1cb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
13 changes: 13 additions & 0 deletions dashboard/src/main/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import VerifyEmail from "./auth/VerifyEmail";
import CurrentError from "./CurrentError";
import Home from "./home/Home";

import StatusPage from "./status/StatusPage";

type PropsType = {};

type StateType = {
Expand Down Expand Up @@ -233,6 +235,17 @@ export default class Main extends Component<PropsType, StateType> {
return <Redirect to="/login" />;
}
}}
/>
<Route
path={`/:status/:projectId?/:clusterId?`}
render={() => {
if (!this.state.isLoggedIn) {
return <Redirect to="/login" />;
} else if (!this.context.user?.email?.includes("@porter.run")) {
return <Redirect to="/dashboard" />;
}
return <StatusPage />;
}}
/>
<Route
path={`/:baseRoute/:cluster?/:namespace?`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,22 @@ import logo from "assets/logo.png";
type Props = RouteComponentProps;

const StatusPage: React.FC<Props> = ({ match }) => {
const projects = [{id: 0, name: "project-1" }, {id: 1, name: "project-2" }];
return (
<ThemeProvider theme={midnight}>
<StyledStatusPage>
<StatusSection>
<Image src={logo} size={30} />
<Spacer y={1.5} />
<>
{Array.from({ length: 100 }).map((_, j) => (
{projects.map((project, _) => (
<>
<Expandable
key={j}
key={project.id}
alt
header={
<Container row>
<Text size={16}>project-{j}</Text>
<Text size={16}> { project.name } </Text>
<Spacer x={1} inline />
<Text color="#01a05d">Operational</Text>
</Container>
Expand Down

0 comments on commit 729f1cb

Please sign in to comment.