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