Validate SSH when saving machines
This commit is contained in:
@@ -129,7 +129,7 @@ export function useSaveMonitoringMachine() {
|
||||
return useMutation({
|
||||
mutationFn: (machine: MonitoringMachineInput) =>
|
||||
saveMonitoringMachine(machine),
|
||||
onSuccess: () => {
|
||||
onSettled: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ["settings"] });
|
||||
queryClient.invalidateQueries({ queryKey: ["monitoring"] });
|
||||
},
|
||||
|
||||
@@ -147,6 +147,23 @@ function MachineEditor({
|
||||
</Stack>
|
||||
</Stack>
|
||||
<Grid container spacing={1.25}>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<Box sx={{ pt: 0.25 }}>
|
||||
<Typography
|
||||
variant="overline"
|
||||
sx={{
|
||||
display: "block",
|
||||
lineHeight: 1.1,
|
||||
color: "text.secondary",
|
||||
}}
|
||||
>
|
||||
General
|
||||
</Typography>
|
||||
<Typography variant="body2" color="text.secondary">
|
||||
Name, mode, enabled state, and service roles.
|
||||
</Typography>
|
||||
</Box>
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<TextField
|
||||
fullWidth
|
||||
@@ -202,6 +219,23 @@ function MachineEditor({
|
||||
</Grid>
|
||||
{!isLocal && (
|
||||
<>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<Box sx={{ pt: 0.5 }}>
|
||||
<Typography
|
||||
variant="overline"
|
||||
sx={{
|
||||
display: "block",
|
||||
lineHeight: 1.1,
|
||||
color: "text.secondary",
|
||||
}}
|
||||
>
|
||||
Connection
|
||||
</Typography>
|
||||
<Typography variant="body2" color="text.secondary">
|
||||
SSH host, port, username, and credentials.
|
||||
</Typography>
|
||||
</Box>
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 4 }}>
|
||||
<TextField
|
||||
fullWidth
|
||||
@@ -289,6 +323,23 @@ function MachineEditor({
|
||||
</Grid>
|
||||
</>
|
||||
)}
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<Box sx={{ pt: 0.5 }}>
|
||||
<Typography
|
||||
variant="overline"
|
||||
sx={{
|
||||
display: "block",
|
||||
lineHeight: 1.1,
|
||||
color: "text.secondary",
|
||||
}}
|
||||
>
|
||||
Monitoring / Files
|
||||
</Typography>
|
||||
<Typography variant="body2" color="text.secondary">
|
||||
Media root and path mapping used by monitoring and browsing.
|
||||
</Typography>
|
||||
</Box>
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<TextField
|
||||
fullWidth
|
||||
@@ -305,6 +356,23 @@ function MachineEditor({
|
||||
</Grid>
|
||||
{hasJellyfin && (
|
||||
<>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<Box sx={{ pt: 0.5 }}>
|
||||
<Typography
|
||||
variant="overline"
|
||||
sx={{
|
||||
display: "block",
|
||||
lineHeight: 1.1,
|
||||
color: "text.secondary",
|
||||
}}
|
||||
>
|
||||
Jellyfin
|
||||
</Typography>
|
||||
<Typography variant="body2" color="text.secondary">
|
||||
Library host and user selection for media browsing.
|
||||
</Typography>
|
||||
</Box>
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<TextField
|
||||
fullWidth
|
||||
@@ -352,6 +420,24 @@ function MachineEditor({
|
||||
)}
|
||||
{hasJellyseerr && (
|
||||
<>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<Box sx={{ pt: 0.5 }}>
|
||||
<Typography
|
||||
variant="overline"
|
||||
sx={{
|
||||
display: "block",
|
||||
lineHeight: 1.1,
|
||||
color: "text.secondary",
|
||||
}}
|
||||
>
|
||||
Jellyseerr
|
||||
</Typography>
|
||||
<Typography variant="body2" color="text.secondary">
|
||||
Optional request-manager enrichment for users and
|
||||
requests.
|
||||
</Typography>
|
||||
</Box>
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12, md: 6 }}>
|
||||
<TextField
|
||||
fullWidth
|
||||
@@ -394,6 +480,23 @@ function MachineEditor({
|
||||
/>
|
||||
</Grid>
|
||||
)}
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<Box sx={{ pt: 0.5 }}>
|
||||
<Typography
|
||||
variant="overline"
|
||||
sx={{
|
||||
display: "block",
|
||||
lineHeight: 1.1,
|
||||
color: "text.secondary",
|
||||
}}
|
||||
>
|
||||
Notes
|
||||
</Typography>
|
||||
<Typography variant="body2" color="text.secondary">
|
||||
Free-form administrator notes for this machine.
|
||||
</Typography>
|
||||
</Box>
|
||||
</Grid>
|
||||
<Grid size={{ xs: 12 }}>
|
||||
<TextField
|
||||
fullWidth
|
||||
|
||||
Reference in New Issue
Block a user