parent
8c60aaaf5f
commit
072680f9b3
30 changed files with 512 additions and 588 deletions
@ -1,15 +1,11 @@ |
||||
import { BodyText } from '../Text'; |
||||
import anvilState from '../../lib/consts/ANVILS'; |
||||
|
||||
const Anvil = ({ anvil }: { anvil: AnvilListItem }): JSX.Element => { |
||||
return ( |
||||
const Anvil = ({ anvil }: { anvil: AnvilListItem }): JSX.Element => ( |
||||
<> |
||||
<BodyText text={anvil.anvil_name} /> |
||||
<BodyText |
||||
text={anvilState.get(anvil.anvil_state) || 'State unavailable'} |
||||
/> |
||||
<BodyText text={anvilState.get(anvil.anvil_state) || 'State unavailable'} /> |
||||
</> |
||||
); |
||||
}; |
||||
); |
||||
|
||||
export default Anvil; |
||||
|
@ -1,12 +1,10 @@ |
||||
import { Panel } from './Panels'; |
||||
import { HeaderText } from './Text'; |
||||
|
||||
const Domain = (): JSX.Element => { |
||||
return ( |
||||
const Domain = (): JSX.Element => ( |
||||
<Panel> |
||||
<HeaderText text="Domain Settings" /> |
||||
</Panel> |
||||
); |
||||
}; |
||||
); |
||||
|
||||
export default Domain; |
||||
|
@ -1,8 +1,6 @@ |
||||
import { EmotionCache } from '@emotion/react'; |
||||
import createCache from '@emotion/cache'; |
||||
|
||||
const createEmotionCache = (): EmotionCache => { |
||||
return createCache({ key: 'css' }); |
||||
}; |
||||
const createEmotionCache = (): EmotionCache => createCache({ key: 'css' }); |
||||
|
||||
export default createEmotionCache; |
||||
|
@ -1,5 +1,4 @@ |
||||
const fetchJSON = <T>(...args: [RequestInfo, RequestInit?]): Promise<T> => { |
||||
return fetch(...args).then((response: Response) => response.json()); |
||||
}; |
||||
const fetchJSON = <T>(...args: [RequestInfo, RequestInit?]): Promise<T> => |
||||
fetch(...args).then((response: Response) => response.json()); |
||||
|
||||
export default fetchJSON; |
||||
|
@ -1,12 +1,11 @@ |
||||
/* eslint-disable @typescript-eslint/no-explicit-any */ |
||||
const putFetch = <T>(uri: string, data: T): Promise<any> => { |
||||
return fetch(uri, { |
||||
const putFetch = <T>(uri: string, data: T): Promise<any> => |
||||
fetch(uri, { |
||||
method: 'PUT', |
||||
headers: { |
||||
'Content-Type': 'application/json', |
||||
}, |
||||
body: JSON.stringify(data), |
||||
}); |
||||
}; |
||||
|
||||
export default putFetch; |
||||
|
@ -1,7 +1,4 @@ |
||||
const hostsSanitizer = ( |
||||
data: Array<AnvilStatusHost>, |
||||
): Array<AnvilStatusHost> => { |
||||
return data?.filter((host) => host.host_uuid); |
||||
}; |
||||
const hostsSanitizer = (data: Array<AnvilStatusHost>): Array<AnvilStatusHost> => |
||||
data?.filter((host) => host.host_uuid); |
||||
|
||||
export default hostsSanitizer; |
||||
|
Loading…
Reference in new issue