|
|
@ -1,4 +1,5 @@ |
|
|
|
import { Box, Grid } from '@mui/material'; |
|
|
|
import { Grid } from '@mui/material'; |
|
|
|
|
|
|
|
import Head from 'next/head'; |
|
|
|
import { FC, useState } from 'react'; |
|
|
|
import { FC, useState } from 'react'; |
|
|
|
|
|
|
|
|
|
|
|
import API_BASE_URL from '../../lib/consts/API_BASE_URL'; |
|
|
|
import API_BASE_URL from '../../lib/consts/API_BASE_URL'; |
|
|
@ -42,6 +43,7 @@ const Config: FC<{ refreshInterval?: number }> = ({ |
|
|
|
const [simpleOpsPanelHeader, setSimpleOpsPanelHeader] = |
|
|
|
const [simpleOpsPanelHeader, setSimpleOpsPanelHeader] = |
|
|
|
useProtectedState<string>('', protect); |
|
|
|
useProtectedState<string>('', protect); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { data: hostDetail, isLoading: loadingHostDetail } = |
|
|
|
periodicFetch<APIHostDetail>(`${API_BASE_URL}/host/local`, { |
|
|
|
periodicFetch<APIHostDetail>(`${API_BASE_URL}/host/local`, { |
|
|
|
onError: () => { |
|
|
|
onError: () => { |
|
|
|
setSimpleOpsPanelHeader('Unknown'); |
|
|
|
setSimpleOpsPanelHeader('Unknown'); |
|
|
@ -55,7 +57,13 @@ const Config: FC<{ refreshInterval?: number }> = ({ |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<> |
|
|
|
<> |
|
|
|
<Box sx={{ display: 'flex', flexDirection: 'column' }}> |
|
|
|
<Head> |
|
|
|
|
|
|
|
<title> |
|
|
|
|
|
|
|
{loadingHostDetail |
|
|
|
|
|
|
|
? 'Loading...' |
|
|
|
|
|
|
|
: `${hostDetail?.shortHostName} Config`} |
|
|
|
|
|
|
|
</title> |
|
|
|
|
|
|
|
</Head> |
|
|
|
<Header /> |
|
|
|
<Header /> |
|
|
|
<Grid container columns={{ xs: 1, md: 3, lg: 4 }}> |
|
|
|
<Grid container columns={{ xs: 1, md: 3, lg: 4 }}> |
|
|
|
<Grid item xs={1}> |
|
|
|
<Grid item xs={1}> |
|
|
@ -80,7 +88,6 @@ const Config: FC<{ refreshInterval?: number }> = ({ |
|
|
|
<ComplexOperationsPanel /> |
|
|
|
<ComplexOperationsPanel /> |
|
|
|
</Grid> |
|
|
|
</Grid> |
|
|
|
</Grid> |
|
|
|
</Grid> |
|
|
|
</Box> |
|
|
|
|
|
|
|
<ConfirmDialog |
|
|
|
<ConfirmDialog |
|
|
|
{...confirmDialogProps} |
|
|
|
{...confirmDialogProps} |
|
|
|
dialogProps={{ open: isOpenConfirmDialog }} |
|
|
|
dialogProps={{ open: isOpenConfirmDialog }} |
|
|
|