1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-20 10:50:08 +03:00

B-6081: fix other tables (#2448)

(cherry picked from commit 8b041fd06f352f1199a0e4b986e5052f6da3f117)
This commit is contained in:
Jorge Miguel Lobo Escalona 2023-01-16 17:52:11 +01:00 committed by Tino Vázquez
parent 9fe170d61c
commit b79beea1df
16 changed files with 20 additions and 17 deletions

View File

@ -43,7 +43,7 @@ const BackupTabs = memo(({ id }) => {
const infoTabs = getResourceView(resource)?.['info-tabs'] ?? {}
return getAvailableInfoTabs(infoTabs, getTabComponent, id)
}, [view])
}, [view, id])
if (isError) {
return (

View File

@ -39,7 +39,7 @@ const ClusterTabs = memo(({ id }) => {
const infoTabs = getResourceView(resource)?.['info-tabs'] ?? {}
return getAvailableInfoTabs(infoTabs, getTabComponent, id)
}, [view])
}, [view, id])
if (isError) {
return (

View File

@ -39,7 +39,7 @@ const DatastoreTabs = memo(({ id }) => {
const infoTabs = getResourceView(resource)?.['info-tabs'] ?? {}
return getAvailableInfoTabs(infoTabs, getTabComponent, id)
}, [view])
}, [view, id])
if (isError) {
return (

View File

@ -39,7 +39,7 @@ const FileTabs = memo(({ id }) => {
const infoTabs = getResourceView(resource)?.['info-tabs'] ?? {}
return getAvailableInfoTabs(infoTabs, getTabComponent, id)
}, [view])
}, [view, id])
if (isError) {
return (

View File

@ -39,7 +39,7 @@ const GroupTabs = memo(({ id }) => {
const infoTabs = getResourceView(resource)?.['info-tabs'] ?? {}
return getAvailableInfoTabs(infoTabs, getTabComponent, id)
}, [view])
}, [view, id])
if (isError) {
return (

View File

@ -50,7 +50,7 @@ const HostTabs = memo(({ id }) => {
const infoTabs = getResourceView(resource)?.['info-tabs'] ?? {}
return getAvailableInfoTabs(infoTabs, getTabComponent, id)
}, [view])
}, [view, id])
if (isError) {
return (

View File

@ -43,7 +43,7 @@ const ImageTabs = memo(({ id }) => {
const infoTabs = getResourceView(resource)?.['info-tabs'] ?? {}
return getAvailableInfoTabs(infoTabs, getTabComponent, id)
}, [view])
}, [view, id])
if (isError) {
return (

View File

@ -39,7 +39,7 @@ const MarketplaceTabs = memo(({ id }) => {
const infoTabs = getResourceView(resource)?.['info-tabs'] ?? {}
return getAvailableInfoTabs(infoTabs, getTabComponent, id)
}, [view])
}, [view, id])
if (isError) {
return (

View File

@ -44,7 +44,7 @@ const MarketplaceAppTabs = memo(({ id }) => {
const infoTabs = getResourceView(resource)?.['info-tabs'] ?? {}
return getAvailableInfoTabs(infoTabs, getTabComponent, id)
}, [view])
}, [view, id])
if (isError) {
return (

View File

@ -40,7 +40,7 @@ const SecurityGroupTabs = memo(({ id }) => {
const infoTabs = getResourceView(resource)?.['info-tabs'] ?? {}
return getAvailableInfoTabs(infoTabs, getTabComponent, id)
}, [view])
}, [view, id])
if (isError) {
return (

View File

@ -45,7 +45,7 @@ const ServiceTabs = memo(({ id }) => {
const infoTabs = getResourceView(resource)?.['info-tabs'] ?? {}
return getAvailableInfoTabs(infoTabs, getTabComponent, id)
}, [view])
}, [view, id])
if (isError) {
return (

View File

@ -45,7 +45,7 @@ const ServiceTemplateTabs = memo(({ id }) => {
const infoTabs = getResourceView(resource)?.['info-tabs'] ?? {}
return getAvailableInfoTabs(infoTabs, getTabComponent, id)
}, [view])
}, [view, id])
if (isError) {
return (

View File

@ -39,7 +39,7 @@ const UserTabs = memo(({ id }) => {
const infoTabs = getResourceView(resource)?.['info-tabs'] ?? {}
return getAvailableInfoTabs(infoTabs, getTabComponent, id)
}, [view])
}, [view, id])
if (isError) {
return (

View File

@ -42,14 +42,16 @@ const getTabComponent = (tabName) =>
const VNetworkTabs = memo(({ id }) => {
const { view, getResourceView } = useViews()
const { isLoading, isError, error, status } = useGetVNetworkQuery({ id })
const { isLoading, isError, error, status } = useGetVNetworkQuery({
id,
})
const tabsAvailable = useMemo(() => {
const resource = RESOURCE_NAMES.VNET
const infoTabs = getResourceView(resource)?.['info-tabs'] ?? {}
return getAvailableInfoTabs(infoTabs, getTabComponent, id)
}, [view])
}, [view, id])
if (isError) {
return (
@ -62,6 +64,7 @@ const VNetworkTabs = memo(({ id }) => {
if (isLoading || status === 'pending') {
return <LinearProgress color="secondary" sx={{ width: '100%' }} />
}
if (status === 'fulfilled') {
return <Tabs addBorder tabs={tabsAvailable ?? []} />
}

View File

@ -39,7 +39,7 @@ const VNetTemplateTabs = memo(({ id }) => {
const infoTabs = getResourceView(resource)?.['info-tabs'] ?? {}
return getAvailableInfoTabs(infoTabs, getTabComponent, id)
}, [view])
}, [view, id])
if (isError) {
return (

View File

@ -41,7 +41,7 @@ const VmTemplateTabs = memo(({ id }) => {
const infoTabs = getResourceView(resource)?.['info-tabs'] ?? {}
return getAvailableInfoTabs(infoTabs, getTabComponent, id)
}, [view])
}, [view, id])
if (isError) {
return (