From 712d3870ebcbd470351d121cf21c6e51edb72180 Mon Sep 17 00:00:00 2001 From: Alex <33497058+bexsoft@users.noreply.github.com> Date: Wed, 20 Jul 2022 10:11:56 -0500 Subject: [PATCH] Fixed storage class selectors for add & edit pool wizards (#2183) Signed-off-by: Benjamin Perez --- .../Tenants/TenantDetails/Pools/AddPool/PoolResources.tsx | 2 +- .../TenantDetails/Pools/EditPool/EditPoolResources.tsx | 2 +- .../TenantDetails/Pools/EditPool/thunks/editPoolAsync.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/portal-ui/src/screens/Console/Tenants/TenantDetails/Pools/AddPool/PoolResources.tsx b/portal-ui/src/screens/Console/Tenants/TenantDetails/Pools/AddPool/PoolResources.tsx index 70766a567..56a5cd124 100644 --- a/portal-ui/src/screens/Console/Tenants/TenantDetails/Pools/AddPool/PoolResources.tsx +++ b/portal-ui/src/screens/Console/Tenants/TenantDetails/Pools/AddPool/PoolResources.tsx @@ -274,7 +274,7 @@ const PoolResources = ({ classes }: IPoolResourcesProps) => { id="storage_class" name="storage_class" onChange={(e: SelectChangeEvent) => { - setFieldInfo("storageClasses", e.target.value as string); + setFieldInfo("storageClass", e.target.value as string); }} label="Storage Class" value={storageClass} diff --git a/portal-ui/src/screens/Console/Tenants/TenantDetails/Pools/EditPool/EditPoolResources.tsx b/portal-ui/src/screens/Console/Tenants/TenantDetails/Pools/EditPool/EditPoolResources.tsx index b92550326..85e082e6a 100644 --- a/portal-ui/src/screens/Console/Tenants/TenantDetails/Pools/EditPool/EditPoolResources.tsx +++ b/portal-ui/src/screens/Console/Tenants/TenantDetails/Pools/EditPool/EditPoolResources.tsx @@ -256,7 +256,7 @@ const PoolResources = ({ classes }: IPoolResourcesProps) => { id="storage_class" name="storage_class" onChange={(e: SelectChangeEvent) => { - setFieldInfo("storageClasses", e.target.value as string); + setFieldInfo("storageClass", e.target.value as string); }} label="Storage Class" value={storageClass} diff --git a/portal-ui/src/screens/Console/Tenants/TenantDetails/Pools/EditPool/thunks/editPoolAsync.ts b/portal-ui/src/screens/Console/Tenants/TenantDetails/Pools/EditPool/thunks/editPoolAsync.ts index 1ac593c64..79d245f8f 100644 --- a/portal-ui/src/screens/Console/Tenants/TenantDetails/Pools/EditPool/thunks/editPoolAsync.ts +++ b/portal-ui/src/screens/Console/Tenants/TenantDetails/Pools/EditPool/thunks/editPoolAsync.ts @@ -23,7 +23,7 @@ import { generatePoolName } from "../../../../../../../common/utils"; import { getDefaultAffinity, getNodeSelector } from "../../../utils"; import { IEditPoolItem, IEditPoolRequest } from "../../../../ListTenants/types"; import { resetEditPoolForm } from "../editPoolSlice"; -import { setTenantDetailsLoad } from "../../../../tenantsSlice"; +import { getTenantAsync } from "../../../../thunks/tenantDetailsAsync"; export const editPoolAsync = createAsyncThunk( "editPool/editPoolAsync", @@ -128,7 +128,7 @@ export const editPoolAsync = createAsyncThunk( ) .then(() => { dispatch(resetEditPoolForm()); - dispatch(setTenantDetailsLoad(true)); + dispatch(getTenantAsync()); return poolsURL; }) .catch((err: ErrorResponseHandler) => {