+
Unsupported Java Version
This server is currently running an unsupported version of Java and cannot be started.
@@ -86,13 +86,16 @@ const JavaVersionModalFeature = () => {
- setSelectedVersion(e.target.value)}>
- {!data
- ?
- : Object.keys((data.dockerImages)).map((key) => (
- {key}
+ setSelectedVersion(e.target.value)}>
+ {!data ? (
+
+ ) : (
+ Object.keys(data.dockerImages).map((key) => (
+
+ {key}
+
))
- }
+ )}
diff --git a/resources/scripts/components/server/features/PIDLimitModalFeature.tsx b/resources/scripts/components/server/features/PIDLimitModalFeature.tsx
index 9d0a57eb6..f4061bc6d 100644
--- a/resources/scripts/components/server/features/PIDLimitModalFeature.tsx
+++ b/resources/scripts/components/server/features/PIDLimitModalFeature.tsx
@@ -11,13 +11,13 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons';
const PIDLimitModalFeature = () => {
- const [ visible, setVisible ] = useState(false);
- const [ loading ] = useState(false);
+ const [visible, setVisible] = useState(false);
+ const [loading] = useState(false);
- const status = ServerContext.useStoreState(state => state.status.value);
+ const status = ServerContext.useStoreState((state) => state.status.value);
const { clearFlashes } = useFlash();
- const { connected, instance } = ServerContext.useStoreState(state => state.socket);
- const isAdmin = useStoreState(state => state.user.data!.rootAdmin);
+ const { connected, instance } = ServerContext.useStoreState((state) => state.socket);
+ const isAdmin = useStoreState((state) => state.user.data!.rootAdmin);
useEffect(() => {
if (!connected || !instance || status === 'running') return;
@@ -32,7 +32,7 @@ const PIDLimitModalFeature = () => {
];
const listener = (line: string) => {
- if (errors.some(p => line.toLowerCase().includes(p))) {
+ if (errors.some((p) => line.toLowerCase().includes(p))) {
setVisible(true);
}
};
@@ -42,45 +42,63 @@ const PIDLimitModalFeature = () => {
return () => {
instance.removeListener(SocketEvent.CONSOLE_OUTPUT, listener);
};
- }, [ connected, instance, status ]);
+ }, [connected, instance, status]);
useEffect(() => {
clearFlashes('feature:pidLimit');
}, []);
return (
- setVisible(false)} closeOnBackground={false} showSpinnerOverlay={loading}>
+ setVisible(false)}
+ closeOnBackground={false}
+ showSpinnerOverlay={loading}
+ >
- {isAdmin ?
+ {isAdmin ? (
<>
-
+
Memory or process limit reached...
This server has reached the maximum process or memory limit.
- Increasing container_pid_limit
in the wings configuration, config.yml
, might help resolve this issue.
- Note: Wings must be restarted for the configuration file changes to take effect
+
+ Increasing container_pid_limit
in the wings
+ configuration, config.yml
, might help resolve
+ this issue.
+
+
+ Note: Wings must be restarted for the configuration file changes to take effect
+
setVisible(false)} css={tw`w-full sm:w-auto border-transparent`}>
Close
>
- :
+ ) : (
<>
-
+
Possible resource limit reached...
- This server is attempting to use more resources than allocated. Please contact the administrator and give them the error below.
- pthread_create failed, Possibly out of memory or process/resource limits reached
+
+ This server is attempting to use more resources than allocated. Please contact the administrator
+ and give them the error below.
+
+
+
+ pthread_create failed, Possibly out of memory or process/resource limits reached
+
+
setVisible(false)} css={tw`w-full sm:w-auto border-transparent`}>
Close
>
- }
+ )}
);
};
diff --git a/resources/scripts/components/server/features/SteamDiskSpaceFeature.tsx b/resources/scripts/components/server/features/SteamDiskSpaceFeature.tsx
index 2694c9815..81acba579 100644
--- a/resources/scripts/components/server/features/SteamDiskSpaceFeature.tsx
+++ b/resources/scripts/components/server/features/SteamDiskSpaceFeature.tsx
@@ -9,24 +9,21 @@ import { SocketEvent } from '@/components/server/events';
import { useStoreState } from 'easy-peasy';
const SteamDiskSpaceFeature = () => {
- const [ visible, setVisible ] = useState(false);
- const [ loading ] = useState(false);
+ const [visible, setVisible] = useState(false);
+ const [loading] = useState(false);
- const status = ServerContext.useStoreState(state => state.status.value);
+ const status = ServerContext.useStoreState((state) => state.status.value);
const { clearFlashes } = useFlash();
- const { connected, instance } = ServerContext.useStoreState(state => state.socket);
- const isAdmin = useStoreState(state => state.user.data!.rootAdmin);
+ const { connected, instance } = ServerContext.useStoreState((state) => state.socket);
+ const isAdmin = useStoreState((state) => state.user.data!.rootAdmin);
useEffect(() => {
if (!connected || !instance || status === 'running') return;
- const errors = [
- 'steamcmd needs 250mb of free disk space to update',
- '0x202 after update job',
- ];
+ const errors = ['steamcmd needs 250mb of free disk space to update', '0x202 after update job'];
const listener = (line: string) => {
- if (errors.some(p => line.toLowerCase().includes(p))) {
+ if (errors.some((p) => line.toLowerCase().includes(p))) {
setVisible(true);
}
};
@@ -36,41 +33,56 @@ const SteamDiskSpaceFeature = () => {
return () => {
instance.removeListener(SocketEvent.CONSOLE_OUTPUT, listener);
};
- }, [ connected, instance, status ]);
+ }, [connected, instance, status]);
useEffect(() => {
clearFlashes('feature:steamDiskSpace');
}, []);
return (
- setVisible(false)} closeOnBackground={false} showSpinnerOverlay={loading}>
+ setVisible(false)}
+ closeOnBackground={false}
+ showSpinnerOverlay={loading}
+ >
- {isAdmin ?
+ {isAdmin ? (
<>
Out of available disk space...
- This server has run out of available disk space and cannot complete the install or update process.
- Ensure the machine has enough disk space by typing df -h
on the machine hosting this server. Delete files or increase the available disk space to resolve the issue.
+
+ This server has run out of available disk space and cannot complete the install or update
+ process.
+
+
+ Ensure the machine has enough disk space by typing{' '}
+ df -h
on the machine hosting
+ this server. Delete files or increase the available disk space to resolve the issue.
+
setVisible(false)} css={tw`w-full sm:w-auto border-transparent`}>
Close
>
- :
+ ) : (
<>
Out of available disk space...
- This server has run out of available disk space and cannot complete the install or update process. Please get in touch with the administrator(s) and inform them of disk space issues.
+
+ This server has run out of available disk space and cannot complete the install or update
+ process. Please get in touch with the administrator(s) and inform them of disk space issues.
+
setVisible(false)} css={tw`w-full sm:w-auto border-transparent`}>
Close
>
- }
+ )}
);
};
diff --git a/resources/scripts/components/server/features/eula/EulaModalFeature.tsx b/resources/scripts/components/server/features/eula/EulaModalFeature.tsx
index b1f26f22e..fd7afe1d4 100644
--- a/resources/scripts/components/server/features/eula/EulaModalFeature.tsx
+++ b/resources/scripts/components/server/features/eula/EulaModalFeature.tsx
@@ -9,13 +9,13 @@ import useFlash from '@/plugins/useFlash';
import { SocketEvent, SocketRequest } from '@/components/server/events';
const EulaModalFeature = () => {
- const [ visible, setVisible ] = useState(false);
- const [ loading, setLoading ] = useState(false);
+ const [visible, setVisible] = useState(false);
+ const [loading, setLoading] = useState(false);
- const uuid = ServerContext.useStoreState(state => state.server.data!.uuid);
- const status = ServerContext.useStoreState(state => state.status.value);
+ const uuid = ServerContext.useStoreState((state) => state.server.data!.uuid);
+ const status = ServerContext.useStoreState((state) => state.status.value);
const { clearFlashes, clearAndAddHttpError } = useFlash();
- const { connected, instance } = ServerContext.useStoreState(state => state.socket);
+ const { connected, instance } = ServerContext.useStoreState((state) => state.socket);
useEffect(() => {
if (!connected || !instance || status === 'running') return;
@@ -31,7 +31,7 @@ const EulaModalFeature = () => {
return () => {
instance.removeListener(SocketEvent.CONSOLE_OUTPUT, listener);
};
- }, [ connected, instance, status ]);
+ }, [connected, instance, status]);
const onAcceptEULA = () => {
setLoading(true);
@@ -46,7 +46,7 @@ const EulaModalFeature = () => {
setLoading(false);
setVisible(false);
})
- .catch(error => {
+ .catch((error) => {
console.error(error);
clearAndAddHttpError({ key: 'feature:eula', error });
})
@@ -58,26 +58,32 @@ const EulaModalFeature = () => {
}, []);
return (
- setVisible(false)} closeOnBackground={false} showSpinnerOverlay={loading}>
-
+ setVisible(false)}
+ closeOnBackground={false}
+ showSpinnerOverlay={loading}
+ >
+
Accept Minecraft® EULA
- By pressing {'"I Accept"'} below you are indicating your agreement to the
+ By pressing {'"I Accept"'} below you are indicating your agreement to the
- Minecraft® EULA
- .
+ Minecraft® EULA
+
+ .
setVisible(false)} css={tw`w-full sm:w-auto border-transparent`}>
- Cancel
+ Cancel
- I Accept
+ I Accept
diff --git a/resources/scripts/components/server/files/ChmodFileModal.tsx b/resources/scripts/components/server/files/ChmodFileModal.tsx
index a7997469b..27a474d93 100644
--- a/resources/scripts/components/server/files/ChmodFileModal.tsx
+++ b/resources/scripts/components/server/files/ChmodFileModal.tsx
@@ -15,30 +15,36 @@ interface FormikValues {
}
interface File {
- file: string,
- mode: string,
+ file: string;
+ mode: string;
}
type OwnProps = RequiredModalProps & { files: File[] };
const ChmodFileModal = ({ files, ...props }: OwnProps) => {
- const uuid = ServerContext.useStoreState(state => state.server.data!.uuid);
+ const uuid = ServerContext.useStoreState((state) => state.server.data!.uuid);
const { mutate } = useFileManagerSwr();
const { clearFlashes, clearAndAddHttpError } = useFlash();
- const directory = ServerContext.useStoreState(state => state.files.directory);
- const setSelectedFiles = ServerContext.useStoreActions(actions => actions.files.setSelectedFiles);
+ const directory = ServerContext.useStoreState((state) => state.files.directory);
+ const setSelectedFiles = ServerContext.useStoreActions((actions) => actions.files.setSelectedFiles);
const submit = ({ mode }: FormikValues, { setSubmitting }: FormikHelpers) => {
clearFlashes('files');
- mutate(data => data.map(f => f.name === files[0].file ? { ...f, mode: fileBitsToString(mode, !f.isFile), modeBits: mode } : f), false);
+ mutate(
+ (data) =>
+ data.map((f) =>
+ f.name === files[0].file ? { ...f, mode: fileBitsToString(mode, !f.isFile), modeBits: mode } : f
+ ),
+ false
+ );
- const data = files.map(f => ({ file: f.file, mode: mode }));
+ const data = files.map((f) => ({ file: f.file, mode: mode }));
chmodFiles(uuid, directory, data)
- .then((): Promise => files.length > 0 ? mutate() : Promise.resolve())
+ .then((): Promise => (files.length > 0 ? mutate() : Promise.resolve()))
.then(() => setSelectedFiles([]))
- .catch(error => {
+ .catch((error) => {
mutate();
setSubmitting(false);
clearAndAddHttpError({ key: 'files', error });
@@ -47,19 +53,13 @@ const ChmodFileModal = ({ files, ...props }: OwnProps) => {
};
return (
- 1 ? '' : (files[0].mode || '') }}>
+ 1 ? '' : files[0].mode || '' }}>
{({ isSubmitting }) => (