Disabled Servers & drives fields in edit pool (#2068)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
This commit is contained in:
@@ -1016,7 +1016,6 @@ const ListObjects = ({ match, history }: IListObjectsProps) => {
|
||||
[bucketName, dispatch, simplePath]
|
||||
);
|
||||
|
||||
|
||||
const onDrop = useCallback(
|
||||
(acceptedFiles: any[]) => {
|
||||
if (acceptedFiles && acceptedFiles.length > 0) {
|
||||
|
||||
@@ -71,7 +71,7 @@ const ObjectActionButton = ({
|
||||
className={clsx(classes.root, "noDefaultHeight")}
|
||||
startIcon={icon}
|
||||
sx={{
|
||||
height: "initial"
|
||||
height: "initial",
|
||||
}}
|
||||
>
|
||||
<span className={"buttonItem"}>{label}</span>
|
||||
|
||||
@@ -599,7 +599,7 @@ const VersionsNavigator = ({
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.versionsVirtualPanel}>
|
||||
{actualInfo.version_id && actualInfo.version_id !== "null" && (
|
||||
// @ts-ignore
|
||||
// @ts-ignore
|
||||
<List
|
||||
style={{
|
||||
width: "100%",
|
||||
|
||||
@@ -44,7 +44,7 @@ const styles = (theme: Theme) =>
|
||||
},
|
||||
"& > span:not(.BaseBadge-root)": {
|
||||
paddingRight: 8,
|
||||
}
|
||||
},
|
||||
},
|
||||
contained: {
|
||||
borderColor: theme.palette.primary.main,
|
||||
|
||||
@@ -23,7 +23,7 @@ function withSuspense<P extends string | number | object>(
|
||||
function ComponentWithSuspense(props: P) {
|
||||
return (
|
||||
<Suspense fallback={fallback}>
|
||||
<WrappedComponent {...props as any} />
|
||||
<WrappedComponent {...(props as any)} />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ const VirtualizedList = ({
|
||||
itemCount={totalItems}
|
||||
>
|
||||
{({ onItemsRendered, ref }) => (
|
||||
// @ts-ignore
|
||||
// @ts-ignore
|
||||
<AutoSizer>
|
||||
{({ width, height }) => {
|
||||
return (
|
||||
|
||||
@@ -206,19 +206,22 @@ const PoolResources = ({ classes }: IPoolResourcesProps) => {
|
||||
<InputBoxWrapper
|
||||
id="number_of_nodes"
|
||||
name="number_of_nodes"
|
||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
const intValue = parseInt(e.target.value);
|
||||
|
||||
if (e.target.validity.valid && !isNaN(intValue)) {
|
||||
setFieldInfo("numberOfNodes", intValue);
|
||||
} else if (isNaN(intValue)) {
|
||||
setFieldInfo("numberOfNodes", 0);
|
||||
}
|
||||
}}
|
||||
onChange={() => {}}
|
||||
label="Number of Servers"
|
||||
value={numberOfNodes}
|
||||
error={validationErrors["number_of_nodes"] || ""}
|
||||
pattern={"[0-9]*"}
|
||||
disabled
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.formFieldRow}>
|
||||
<InputBoxWrapper
|
||||
id="volumes_per_sever"
|
||||
name="volumes_per_sever"
|
||||
onChange={() => {}}
|
||||
label="Volumes per Server"
|
||||
value={volumesPerServer}
|
||||
error={validationErrors["volumes_per_server"] || ""}
|
||||
disabled
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.formFieldRow}>
|
||||
@@ -249,25 +252,7 @@ const PoolResources = ({ classes }: IPoolResourcesProps) => {
|
||||
}
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.formFieldRow}>
|
||||
<InputBoxWrapper
|
||||
id="volumes_per_sever"
|
||||
name="volumes_per_sever"
|
||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
const intValue = parseInt(e.target.value);
|
||||
|
||||
if (e.target.validity.valid && !isNaN(intValue)) {
|
||||
setFieldInfo("volumesPerServer", intValue);
|
||||
} else if (isNaN(intValue)) {
|
||||
setFieldInfo("volumesPerServer", 0);
|
||||
}
|
||||
}}
|
||||
label="Volumes per Server"
|
||||
value={volumesPerServer}
|
||||
error={validationErrors["volumes_per_server"] || ""}
|
||||
pattern={"[0-9]*"}
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={12} className={classes.formFieldRow}>
|
||||
<SelectWrapper
|
||||
id="storage_class"
|
||||
|
||||
@@ -104,7 +104,7 @@ const DeleteUser = ({
|
||||
} else {
|
||||
invokeDeleteApi("DELETE", `/api/v1/user/${encodeURLString(user)}`);
|
||||
closeDeleteModalAndRefresh(true);
|
||||
history.push(`${IAM_PAGES.USERS}`)
|
||||
history.push(`${IAM_PAGES.USERS}`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user