fix: remove subdirectory from URIs

main
Josue 4 years ago committed by Tsu-ba-me
parent f79b9e3f04
commit c3f0a948a6
  1. 2
      striker-ui/components/Anvils/SelectedAnvil.tsx
  2. 2
      striker-ui/components/Anvils/index.tsx
  3. 2
      striker-ui/components/CPU.tsx
  4. 4
      striker-ui/components/Hosts/AnvilHost.tsx
  5. 2
      striker-ui/components/Hosts/index.tsx
  6. 2
      striker-ui/components/Memory.tsx
  7. 2
      striker-ui/components/Network/Network.tsx
  8. 2
      striker-ui/components/Servers.tsx
  9. 2
      striker-ui/components/SharedStorage/SharedStorage.tsx
  10. 2
      striker-ui/components/Storage.tsx
  11. 2
      striker-ui/pages/index.tsx

@ -66,7 +66,7 @@ const SelectedAnvil = ({ list }: { list: AnvilListItem[] }): JSX.Element => {
<Switch <Switch
checked={isAnvilOn(list[index])} checked={isAnvilOn(list[index])}
onChange={() => onChange={() =>
putJSON('/anvils/set_power', { putJSON('/set_power', {
anvil_uuid: list[index].anvil_uuid, anvil_uuid: list[index].anvil_uuid,
is_on: !isAnvilOn(list[index]), is_on: !isAnvilOn(list[index]),
}) })

@ -10,7 +10,7 @@ const Anvils = ({ list }: { list: AnvilList | undefined }): JSX.Element => {
list?.anvils.forEach((anvil: AnvilListItem) => { list?.anvils.forEach((anvil: AnvilListItem) => {
const { data } = PeriodicFetch<AnvilStatus>( const { data } = PeriodicFetch<AnvilStatus>(
`${process.env.NEXT_PUBLIC_API_URL}/anvils/get_status?anvil_uuid=${anvil.anvil_uuid}`, `${process.env.NEXT_PUBLIC_API_URL}/get_status?anvil_uuid=${anvil.anvil_uuid}`,
); );
anvils.push({ anvils.push({
...anvil, ...anvil,

@ -10,7 +10,7 @@ const CPU = (): JSX.Element => {
const { uuid } = useContext(AnvilContext); const { uuid } = useContext(AnvilContext);
const { data, isLoading } = PeriodicFetch<AnvilCPU>( const { data, isLoading } = PeriodicFetch<AnvilCPU>(
`${process.env.NEXT_PUBLIC_API_URL}/anvils/get_cpu?anvil_uuid=${uuid}`, `${process.env.NEXT_PUBLIC_API_URL}/get_cpu?anvil_uuid=${uuid}`,
); );
const cpuData = const cpuData =

@ -105,7 +105,7 @@ const AnvilHost = ({
<Switch <Switch
checked={host.state === 'ready'} checked={host.state === 'ready'}
onChange={() => onChange={() =>
putJSON('/anvils/set_power', { putJSON('/set_power', {
host_uuid: host.host_uuid, host_uuid: host.host_uuid,
is_on: !(host.state === 'ready'), is_on: !(host.state === 'ready'),
}) })
@ -120,7 +120,7 @@ const AnvilHost = ({
checked={host.state === 'ready'} checked={host.state === 'ready'}
disabled={!host.removable} disabled={!host.removable}
onChange={() => onChange={() =>
putJSON('/anvils/set_membership', { putJSON('/set_membership', {
host_uuid: host.host_uuid, host_uuid: host.host_uuid,
is_member: !(host.state === 'ready'), is_member: !(host.state === 'ready'),
}) })

@ -9,7 +9,7 @@ const Hosts = ({ anvil }: { anvil: AnvilListItem[] }): JSX.Element => {
const { uuid } = useContext(AnvilContext); const { uuid } = useContext(AnvilContext);
const { data } = PeriodicFetch<AnvilStatus>( const { data } = PeriodicFetch<AnvilStatus>(
`${process.env.NEXT_PUBLIC_API_URL}/anvils/get_status?anvil_uuid=${uuid}`, `${process.env.NEXT_PUBLIC_API_URL}/get_status?anvil_uuid=${uuid}`,
); );
return ( return (

@ -10,7 +10,7 @@ import { AnvilContext } from './AnvilContext';
const Memory = (): JSX.Element => { const Memory = (): JSX.Element => {
const { uuid } = useContext(AnvilContext); const { uuid } = useContext(AnvilContext);
const { data, isLoading } = PeriodicFetch<AnvilMemory>( const { data, isLoading } = PeriodicFetch<AnvilMemory>(
`${process.env.NEXT_PUBLIC_API_URL}/anvils/get_memory?anvil_uuid=${uuid}`, `${process.env.NEXT_PUBLIC_API_URL}/get_memory?anvil_uuid=${uuid}`,
); );
const memoryData = isLoading || !data ? { total: 0, free: 0 } : data; const memoryData = isLoading || !data ? { total: 0, free: 0 } : data;

@ -47,7 +47,7 @@ const Network = (): JSX.Element => {
const classes = useStyles(); const classes = useStyles();
const { data } = PeriodicFetch<AnvilNetwork>( const { data } = PeriodicFetch<AnvilNetwork>(
`${process.env.NEXT_PUBLIC_API_URL}/anvils/get_network?anvil_uuid=${uuid}`, `${process.env.NEXT_PUBLIC_API_URL}/get_network?anvil_uuid=${uuid}`,
); );
const processed = processNetworkData(data); const processed = processNetworkData(data);

@ -50,7 +50,7 @@ const Servers = ({ anvil }: { anvil: AnvilListItem[] }): JSX.Element => {
const classes = useStyles(); const classes = useStyles();
const { data } = PeriodicFetch<AnvilServers>( const { data } = PeriodicFetch<AnvilServers>(
`${process.env.NEXT_PUBLIC_API_URL}/anvils/get_servers?anvil_uuid=${uuid}`, `${process.env.NEXT_PUBLIC_API_URL}/get_servers?anvil_uuid=${uuid}`,
); );
return ( return (
<Panel> <Panel>

@ -27,7 +27,7 @@ const SharedStorage = ({ anvil }: { anvil: AnvilListItem[] }): JSX.Element => {
const classes = useStyles(); const classes = useStyles();
const { uuid } = useContext(AnvilContext); const { uuid } = useContext(AnvilContext);
const { data } = PeriodicFetch<AnvilSharedStorage>( const { data } = PeriodicFetch<AnvilSharedStorage>(
`${process.env.NEXT_PUBLIC_API_URL}/anvils/get_shared_storage?anvil_uuid=${uuid}`, `${process.env.NEXT_PUBLIC_API_URL}/get_shared_storage?anvil_uuid=${uuid}`,
); );
return ( return (
<Panel> <Panel>

@ -7,7 +7,7 @@ import PeriodicFetch from '../lib/fetchers/periodicFetch';
const Storage = ({ uuid }: { uuid: string }): JSX.Element => { const Storage = ({ uuid }: { uuid: string }): JSX.Element => {
const { data, isLoading } = PeriodicFetch<AnvilMemory>( const { data, isLoading } = PeriodicFetch<AnvilMemory>(
`${process.env.NEXT_PUBLIC_API_URL}/anvils/get_memory?anvil_uuid=${uuid}`, `${process.env.NEXT_PUBLIC_API_URL}/get_memory?anvil_uuid=${uuid}`,
); );
const memoryData = isLoading || !data ? { total: 0, free: 0 } : data; const memoryData = isLoading || !data ? { total: 0, free: 0 } : data;

@ -48,7 +48,7 @@ const Home = (): JSX.Element => {
const classes = useStyles(); const classes = useStyles();
const { data } = PeriodicFetch<AnvilList>( const { data } = PeriodicFetch<AnvilList>(
`${process.env.NEXT_PUBLIC_API_URL}/anvils/get_anvils`, `${process.env.NEXT_PUBLIC_API_URL}/get_anvils`,
); );
return ( return (

Loading…
Cancel
Save