diff --git a/striker-ui/pages/anvils/[uuid].tsx b/striker-ui/pages/anvils/[uuid].tsx deleted file mode 100644 index d88cfb8b..00000000 --- a/striker-ui/pages/anvils/[uuid].tsx +++ /dev/null @@ -1,108 +0,0 @@ -import { NextPage } from 'next'; -import styled from 'styled-components'; -import { useRouter } from 'next/dist/client/router'; - -import DEFAULT_THEME from '../../lib/consts/DEFAULT_THEME'; - -import ExtendedDate from '../../lib/extended_date/ExtendedDate'; -import Header from '../../components/organisms/Header'; -import Label from '../../components/atoms/Label'; -import List from '../../components/molecules/List'; -import PageCenterContainer from '../../components/organisms/PageCenterContainer'; -import PageContainer from '../../components/organisms/PageContainer'; -import ToggleSwitch from '../../components/atoms/ToggleSwitch'; - -import useOneAnvil from '../../lib/anvil/useOneAnvil'; - -const StyledAnvilNodeStatus = styled.div` - display: flex; - - flex-direction: column; - - width: 100%; - height: 100%; -`; - -const StyledAnvilNodePower = styled.div` - display: flex; - - flex-direction: row; - - justify-content: space-around; - - width: 100%; - - margin-top: 1em; -`; - -StyledAnvilNodeStatus.defaultProps = { - theme: DEFAULT_THEME, -}; - -StyledAnvilNodePower.defaultProps = { - theme: DEFAULT_THEME, -}; - -const DemoAnvilStatus: NextPage = (): JSX.Element => { - const router = useRouter(); - const { uuid } = router.query; - const anvilUUID: string = uuid instanceof Array ? uuid[0] : uuid ?? ''; - const { - anvilStatus: { nodes, timestamp }, - error, - isLoading, - } = useOneAnvil(anvilUUID); - - const lastUpdatedDatetime: string = new ExtendedDate( - timestamp * 1000, - ).toLocaleISOString(); - - return ( - -
- - - {(() => { - let resultElement: JSX.Element[]; - - if (isLoading) { - resultElement = [ - - - - - - ); -}; - -export default DemoAnvilStatus; diff --git a/striker-ui/pages/anvils/index.tsx b/striker-ui/pages/anvils/index.tsx deleted file mode 100644 index ebe9b388..00000000 --- a/striker-ui/pages/anvils/index.tsx +++ /dev/null @@ -1,75 +0,0 @@ -import { GetServerSidePropsResult, InferGetServerSidePropsType } from 'next'; -import { createMuiTheme, ThemeProvider } from '@material-ui/core/styles'; - -import API_BASE_URL from '../../lib/consts/API_BASE_URL'; - -import Button from '../../components/atoms/Button'; -import Header from '../../components/organisms/Header'; -import List from '../../components/molecules/List'; -import PageCenterContainer from '../../components/organisms/PageCenterContainer'; - -import fetchJSON from '../../lib/fetchers/fetchJSON'; - -import 'typeface-muli'; - -const theme = createMuiTheme({ - palette: { - primary: { - main: '#343434', - light: '#3E78B2', - }, - secondary: { - main: '#343434', - }, - }, - typography: { - fontFamily: 'Muli', - fontSize: 14, - }, - overrides: { - MuiRadio: { - root: { - color: '#222222', - }, - colorSecondary: { - '&$checked': { - color: '#555555', - }, - }, - }, - }, -}); - -export async function getServerSideProps(): Promise< - GetServerSidePropsResult -> { - return { - props: await fetchJSON(`${API_BASE_URL}/api/anvils`), - }; -} - -function DemoAnvilList({ - anvils, -}: InferGetServerSidePropsType): JSX.Element { - return ( - -
- - - {anvils.map( - (anvil: AnvilListItem): JSX.Element => ( -