1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-19 06:50:07 +03:00

M #~: Minor fix to containers (#2140)

This commit is contained in:
Sergio Betanzos 2022-06-10 13:05:22 +02:00 committed by GitHub
parent 04aed032cd
commit fa6917fe06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 27 additions and 23 deletions

View File

@ -40,7 +40,7 @@ function Clusters() {
return (
<SplitPane gridTemplateRows="1fr auto 1fr">
{({ getGridProps, GutterComponent }) => (
<Box {...(hasSelectedRows && getGridProps())}>
<Box height={1} {...(hasSelectedRows && getGridProps())}>
<ClustersTable onSelectedRowsChange={onSelectedRowsChange} />
{hasSelectedRows && (

View File

@ -40,7 +40,7 @@ function Datastores() {
return (
<SplitPane gridTemplateRows="1fr auto 1fr">
{({ getGridProps, GutterComponent }) => (
<Box {...(hasSelectedRows && getGridProps())}>
<Box height={1} {...(hasSelectedRows && getGridProps())}>
<DatastoresTable onSelectedRowsChange={onSelectedRowsChange} />
{hasSelectedRows && (

View File

@ -40,7 +40,7 @@ function Groups() {
return (
<SplitPane gridTemplateRows="1fr auto 1fr">
{({ getGridProps, GutterComponent }) => (
<Box {...(hasSelectedRows && getGridProps())}>
<Box height={1} {...(hasSelectedRows && getGridProps())}>
<GroupsTable onSelectedRowsChange={onSelectedRowsChange} />
{hasSelectedRows && (

View File

@ -43,7 +43,7 @@ function Hosts() {
return (
<SplitPane gridTemplateRows="1fr auto 1fr">
{({ getGridProps, GutterComponent }) => (
<Box {...(hasSelectedRows && getGridProps())}>
<Box height={1} {...(hasSelectedRows && getGridProps())}>
<HostsTable
onSelectedRowsChange={onSelectedRowsChange}
globalActions={actions}

View File

@ -40,7 +40,7 @@ function Images() {
return (
<SplitPane gridTemplateRows="1fr auto 1fr">
{({ getGridProps, GutterComponent }) => (
<Box {...(hasSelectedRows && getGridProps())}>
<Box height={1} {...(hasSelectedRows && getGridProps())}>
<ImagesTable onSelectedRowsChange={onSelectedRowsChange} />
{hasSelectedRows && (

View File

@ -43,7 +43,7 @@ function MarketplaceApps() {
return (
<SplitPane gridTemplateRows="1fr auto 1fr">
{({ getGridProps, GutterComponent }) => (
<Box {...(hasSelectedRows && getGridProps())}>
<Box height={1} {...(hasSelectedRows && getGridProps())}>
<MarketplaceAppsTable
onSelectedRowsChange={onSelectedRowsChange}
globalActions={actions}

View File

@ -40,7 +40,7 @@ function Marketplaces() {
return (
<SplitPane gridTemplateRows="1fr auto 1fr">
{({ getGridProps, GutterComponent }) => (
<Box {...(hasSelectedRows && getGridProps())}>
<Box height={1} {...(hasSelectedRows && getGridProps())}>
<MarketplacesTable onSelectedRowsChange={onSelectedRowsChange} />
{hasSelectedRows && (

View File

@ -42,7 +42,7 @@ function ServiceTemplates() {
return (
<SplitPane gridTemplateRows="1fr auto 1fr">
{({ getGridProps, GutterComponent }) => (
<Box {...(hasSelectedRows && getGridProps())}>
<Box height={1} {...(hasSelectedRows && getGridProps())}>
<ServiceTemplatesTable onSelectedRowsChange={onSelectedRowsChange} />
{hasSelectedRows && (

View File

@ -42,7 +42,7 @@ function Services() {
return (
<SplitPane gridTemplateRows="1fr auto 1fr">
{({ getGridProps, GutterComponent }) => (
<Box {...(hasSelectedRows && getGridProps())}>
<Box height={1} {...(hasSelectedRows && getGridProps())}>
<ServicesTable onSelectedRowsChange={onSelectedRowsChange} />
{hasSelectedRows && (

View File

@ -40,7 +40,7 @@ function Users() {
return (
<SplitPane gridTemplateRows="1fr auto 1fr">
{({ getGridProps, GutterComponent }) => (
<Box {...(hasSelectedRows && getGridProps())}>
<Box height={1} {...(hasSelectedRows && getGridProps())}>
<UsersTable onSelectedRowsChange={onSelectedRowsChange} />
{hasSelectedRows && (

View File

@ -40,7 +40,7 @@ function VNetworkTemplates() {
return (
<SplitPane gridTemplateRows="1fr auto 1fr">
{({ getGridProps, GutterComponent }) => (
<Box {...(hasSelectedRows && getGridProps())}>
<Box height={1} {...(hasSelectedRows && getGridProps())}>
<VNetworkTemplatesTable onSelectedRowsChange={onSelectedRowsChange} />
{hasSelectedRows && (

View File

@ -44,7 +44,7 @@ function VirtualMachines() {
return (
<SplitPane gridTemplateRows="1fr auto 1fr">
{({ getGridProps, GutterComponent }) => (
<Box {...(hasSelectedRows && getGridProps())}>
<Box height={1} {...(hasSelectedRows && getGridProps())}>
<VmsTable
onSelectedRowsChange={onSelectedRowsChange}
globalActions={actions}
@ -79,7 +79,9 @@ function VirtualMachines() {
* @returns {ReactElement} VM details
*/
const InfoTabs = memo(({ vm, gotoPage, unselect }) => {
const [getVm, { isFetching }] = useLazyGetVmQuery()
const [getVm, { data: lazyData, isFetching }] = useLazyGetVmQuery()
const id = lazyData?.ID ?? vm.ID
const name = lazyData?.NAME ?? vm.NAME
return (
<Stack overflow="auto">
@ -89,7 +91,7 @@ const InfoTabs = memo(({ vm, gotoPage, unselect }) => {
icon={<RefreshDouble />}
tooltip={Tr(T.Refresh)}
isSubmitting={isFetching}
onClick={() => getVm({ id: vm?.ID })}
onClick={() => getVm({ id })}
/>
{typeof gotoPage === 'function' && (
<SubmitButton
@ -108,10 +110,10 @@ const InfoTabs = memo(({ vm, gotoPage, unselect }) => {
/>
)}
<Typography color="text.primary" noWrap>
{`#${vm?.ID} | ${vm?.NAME}`}
{`#${id} | ${name}`}
</Typography>
</Stack>
<VmTabs id={vm?.ID} />
<VmTabs id={id} />
</Stack>
)
})

View File

@ -40,7 +40,7 @@ function VirtualNetworks() {
return (
<SplitPane gridTemplateRows="1fr auto 1fr">
{({ getGridProps, GutterComponent }) => (
<Box {...(hasSelectedRows && getGridProps())}>
<Box height={1} {...(hasSelectedRows && getGridProps())}>
<VNetworksTable onSelectedRowsChange={onSelectedRowsChange} />
{hasSelectedRows && (

View File

@ -44,7 +44,7 @@ function VmTemplates() {
return (
<SplitPane gridTemplateRows="1fr auto 1fr">
{({ getGridProps, GutterComponent }) => (
<Box {...(hasSelectedRows && getGridProps())}>
<Box height={1} {...(hasSelectedRows && getGridProps())}>
<VmTemplatesTable
onSelectedRowsChange={onSelectedRowsChange}
globalActions={actions}
@ -79,7 +79,9 @@ function VmTemplates() {
* @returns {ReactElement} VM Template details
*/
const InfoTabs = memo(({ template, gotoPage, unselect }) => {
const [getTemplate, { isFetching }] = useLazyGetTemplateQuery()
const [getTemplate, { data, isFetching }] = useLazyGetTemplateQuery()
const id = data?.ID ?? template.ID
const name = data?.NAME ?? template.NAME
return (
<Stack overflow="auto">
@ -89,7 +91,7 @@ const InfoTabs = memo(({ template, gotoPage, unselect }) => {
icon={<RefreshDouble />}
tooltip={Tr(T.Refresh)}
isSubmitting={isFetching}
onClick={() => getTemplate({ id: template?.ID })}
onClick={() => getTemplate({ id })}
/>
{typeof gotoPage === 'function' && (
<SubmitButton
@ -108,10 +110,10 @@ const InfoTabs = memo(({ template, gotoPage, unselect }) => {
/>
)}
<Typography color="text.primary" noWrap>
{`#${template?.ID || ''} | ${template?.NAME || ''}`}
{`#${id} | ${name}`}
</Typography>
</Stack>
<VmTemplateTabs id={template?.ID} />
<VmTemplateTabs id={id} />
</Stack>
)
})

View File

@ -40,7 +40,7 @@ function Zones() {
return (
<SplitPane gridTemplateRows="1fr auto 1fr">
{({ getGridProps, GutterComponent }) => (
<Box {...(hasSelectedRows && getGridProps())}>
<Box height={1} {...(hasSelectedRows && getGridProps())}>
<ZonesTable onSelectedRowsChange={onSelectedRowsChange} />
{hasSelectedRows && (