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