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:
parent
9fe170d61c
commit
b79beea1df
@ -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 (
|
||||
|
@ -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 (
|
||||
|
@ -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 (
|
||||
|
@ -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 (
|
||||
|
@ -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 (
|
||||
|
@ -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 (
|
||||
|
@ -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 (
|
||||
|
@ -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 (
|
||||
|
@ -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 (
|
||||
|
@ -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 (
|
||||
|
@ -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 (
|
||||
|
@ -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 (
|
||||
|
@ -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 (
|
||||
|
@ -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 ?? []} />
|
||||
}
|
||||
|
@ -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 (
|
||||
|
@ -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 (
|
||||
|
Loading…
x
Reference in New Issue
Block a user