From a377411a56c30de0e80f731bfa65e63e544790ea Mon Sep 17 00:00:00 2001 From: Mohamad Choupan Date: Sat, 21 Dec 2024 06:18:10 +0330 Subject: [PATCH 1/2] fix: sample data status --- .../src/pages/Settings/Entitlement/index.tsx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/services/web-ui/src/pages/Settings/Entitlement/index.tsx b/services/web-ui/src/pages/Settings/Entitlement/index.tsx index 97e86dda7..d5dd34984 100644 --- a/services/web-ui/src/pages/Settings/Entitlement/index.tsx +++ b/services/web-ui/src/pages/Settings/Entitlement/index.tsx @@ -371,18 +371,17 @@ export default function SettingsEntitlement() { axios .get(`${url}/main/metadata/api/v3/sample/sync/status `, config) .then((res) => { - if(res?.data?.progress !==1){ - // @ts-ignore + if (res?.data?.progress !== 1 || res?.data?.progress !== 0) { + // @ts-ignore setLoaded('True') localStorage.setItem('sample', 'true') setSample('true') + } else { + // @ts-ignore + setLoaded('False') + localStorage.setItem('sample', 'false') + setSample('false') } - else{ - // @ts-ignore - setLoaded('False') - localStorage.setItem('sample', 'false') - setSample('false') - } // const temp = [] // if (!res.data.items) { // setLoading(false) From 770927922aae575718a1fb98142b98b37f40752e Mon Sep 17 00:00:00 2001 From: Mohamad Choupan Date: Sat, 21 Dec 2024 07:05:32 +0330 Subject: [PATCH 2/2] fix: other stuffs --- .../Integrations/TypeDetailNew/Integration/index.tsx | 12 ++++++++++-- .../web-ui/src/pages/Settings/Entitlement/index.tsx | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/services/web-ui/src/pages/Integrations/TypeDetailNew/Integration/index.tsx b/services/web-ui/src/pages/Integrations/TypeDetailNew/Integration/index.tsx index aecca9c2a..6376b3a1b 100644 --- a/services/web-ui/src/pages/Integrations/TypeDetailNew/Integration/index.tsx +++ b/services/web-ui/src/pages/Integrations/TypeDetailNew/Integration/index.tsx @@ -365,8 +365,16 @@ export default function IntegrationList({ ) .then((res) => { const data = res.data - console.log(data?.integration_types) setResourceTypes(data?.integration_types) + const temp : any = [] + data?.integration_types?.map((item: any) => { + temp.push({ + label: item?.name, + value: item?.name, + params: item?.params, + }) + }) + setSelectedResourceType(temp) }) .catch((err) => { console.log(err) @@ -747,7 +755,7 @@ export default function IntegrationList({ onChange={({ detail }) => { setSelectedResourceType(detail.selectedOptions) }} - tokenLimit={2} + tokenLimit={0} placeholder="Select resource type" /> diff --git a/services/web-ui/src/pages/Settings/Entitlement/index.tsx b/services/web-ui/src/pages/Settings/Entitlement/index.tsx index d5dd34984..5a6ee3572 100644 --- a/services/web-ui/src/pages/Settings/Entitlement/index.tsx +++ b/services/web-ui/src/pages/Settings/Entitlement/index.tsx @@ -371,7 +371,7 @@ export default function SettingsEntitlement() { axios .get(`${url}/main/metadata/api/v3/sample/sync/status `, config) .then((res) => { - if (res?.data?.progress !== 1 || res?.data?.progress !== 0) { + if (res?.data?.progress !== 1 && res?.data?.progress !== 0) { // @ts-ignore setLoaded('True') localStorage.setItem('sample', 'true')