Absolute imports
This commit is contained in:
2
Makefile
2
Makefile
@ -3,4 +3,6 @@ run:
|
||||
|
||||
.PHONY:build
|
||||
build:
|
||||
- @rm -rf build
|
||||
@npm run build
|
||||
@rm build/static/js/*.map
|
||||
|
||||
@ -7,7 +7,7 @@ import TextField from "@mui/material/TextField";
|
||||
import InputAdornment from "@mui/material/InputAdornment";
|
||||
import IconButton from "@mui/material/IconButton";
|
||||
import CancelIcon from "@mui/icons-material/Cancel";
|
||||
import { useGlobalState } from "../GlobalStateProvider";
|
||||
import { useGlobalState } from "GlobalStateProvider";
|
||||
|
||||
export default function AppHeader() {
|
||||
const [searchValue, setSearchValue] = React.useState("");
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
import React from "react";
|
||||
import EnvTabsSwitcher from "./EnvTabsSwitcher";
|
||||
import LoadingIndicator from "./LoadingIndicator";
|
||||
import { DashboardLoadError, DashboardResponseContent, EnvTab, Environment } from "../types";
|
||||
import { ENVIRONMENT_TABS } from "../const";
|
||||
import { dashboardApi } from "../api";
|
||||
import { DashboardLoadError, DashboardResponseContent, EnvTab, Environment } from "types";
|
||||
import { ENVIRONMENT_TABS } from "const";
|
||||
import { dashboardApi } from "api";
|
||||
import { AxiosError } from "axios";
|
||||
import LoadingError from "./LoadingError";
|
||||
import EnvironmentList from "./dashboard/EnvironmentList";
|
||||
import LoadingError from "components/LoadingError";
|
||||
import EnvironmentList from "components/dashboard/EnvironmentList";
|
||||
|
||||
export default function Dashboard() {
|
||||
const defaultEnv = ENVIRONMENT_TABS[0];
|
||||
@ -30,7 +30,7 @@ export default function Dashboard() {
|
||||
setLoadingEnv(true);
|
||||
|
||||
dashboardApi
|
||||
.get(envTab.dashboardEndpoint)
|
||||
.getFake(envTab.dashboardEndpoint)
|
||||
.then((response) => {
|
||||
return response.data.content;
|
||||
})
|
||||
|
||||
@ -2,8 +2,8 @@ import React from "react";
|
||||
import Tabs from "@mui/material/Tabs";
|
||||
import Tab from "@mui/material/Tab";
|
||||
import Box from "@mui/material/Box";
|
||||
import { ENVIRONMENT_TABS } from "../const";
|
||||
import { EnvTab } from "../types";
|
||||
import { ENVIRONMENT_TABS } from "const";
|
||||
import { EnvTab } from "types";
|
||||
|
||||
interface OnSelectTab {
|
||||
(tab: EnvTab): void;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { DashboardLoadError } from "../types";
|
||||
import { DashboardLoadError } from "types";
|
||||
import Alert from "@mui/material/Alert";
|
||||
import AlertTitle from "@mui/material/AlertTitle";
|
||||
import Paper from "@mui/material/Paper";
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
import React from "react";
|
||||
import { Environment } from "../../types";
|
||||
import TenantList from "./TenantList";
|
||||
import { Environment } from "types";
|
||||
import TenantList from "components/dashboard/TenantList";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import Box from "@mui/material/Box";
|
||||
import Container from "@mui/material/Container";
|
||||
import { useGlobalState } from "GlobalStateProvider";
|
||||
|
||||
interface EnvironmentListProps {
|
||||
environments: Environment[];
|
||||
@ -15,9 +16,6 @@ export default function EnvironmentList({ environments }: EnvironmentListProps)
|
||||
<Box className="environment" key={env.name} sx={{ marginBottom: "2rem" }}>
|
||||
<Container maxWidth={false} className="main-container">
|
||||
<Typography variant={"h2"} key={env.name} className="environment-name">
|
||||
{/* <Typography component="span" variant={"h5"} key={env.name} sx={{ marginRight: "1rem" }}>
|
||||
environment:
|
||||
</Typography> */}
|
||||
{env.name}
|
||||
</Typography>
|
||||
<TenantList tenants={env.tenants} />
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import React, { ReactElement } from "react";
|
||||
import { Service, Node, StatusPerTenant } from "../../types";
|
||||
import { Service, Node, StatusPerTenant } from "types";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import Card from "@mui/material/Card";
|
||||
import CardContent from "@mui/material/CardContent";
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import React from "react";
|
||||
import { Service } from "../../types";
|
||||
import { Service } from "types";
|
||||
import Grid from "@mui/material/Unstable_Grid2";
|
||||
import ServiceCard from "./ServiceCard";
|
||||
import { useGlobalState } from "../../GlobalStateProvider";
|
||||
import { useGlobalState } from "GlobalStateProvider";
|
||||
|
||||
interface ServiceListProps {
|
||||
services: Service[];
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { Tenant } from "../../types";
|
||||
import { Tenant } from "types";
|
||||
import Box from "@mui/material/Box";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import ServiceList from "./ServiceList";
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import Dashboard from "../components/Dashboard";
|
||||
import Dashboard from "components/Dashboard";
|
||||
|
||||
export default function Home() {
|
||||
return <Dashboard />;
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": "src",
|
||||
"target": "es5",
|
||||
"lib": [
|
||||
"dom",
|
||||
|
||||
Reference in New Issue
Block a user