mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-07 17:17:41 +03:00
B OpenNebula/One#6451: Fix refresh table (#3122)
when create an OpenNebula resource
This commit is contained in:
parent
3a691b7a98
commit
384ee3c103
@ -135,6 +135,7 @@ const VNetworksTable = (props) => {
|
|||||||
updateSelectedRows()
|
updateSelectedRows()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
useEffect(() => refetch(), [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<EnhancedTable
|
<EnhancedTable
|
||||||
|
@ -13,31 +13,32 @@
|
|||||||
* See the License for the specific language governing permissions and *
|
* See the License for the specific language governing permissions and *
|
||||||
* limitations under the License. *
|
* limitations under the License. *
|
||||||
* ------------------------------------------------------------------------- */
|
* ------------------------------------------------------------------------- */
|
||||||
import { Component, useMemo, useState, useEffect } from 'react'
|
import { Box, Button, Grid } from '@mui/material'
|
||||||
|
import { Component, useEffect, useMemo, useState } from 'react'
|
||||||
import { DatastoreDialog } from './DatastoreSelectionDialog'
|
import { DatastoreDialog } from './DatastoreSelectionDialog'
|
||||||
import { Grid, Box, Button } from '@mui/material'
|
|
||||||
import { Tr, Translate } from 'client/components/HOC'
|
import { RESOURCE_NAMES, T } from 'client/constants'
|
||||||
import { T, RESOURCE_NAMES } from 'client/constants'
|
|
||||||
import { BoxIso as DownloadIcon } from 'iconoir-react'
|
|
||||||
import { useViews } from 'client/features/Auth'
|
import { useViews } from 'client/features/Auth'
|
||||||
import { useGeneralApi } from 'client/features/General'
|
import { useGeneralApi } from 'client/features/General'
|
||||||
import { useGetVRouterTemplatesQuery } from 'client/features/OneApi/vrouterTemplate'
|
|
||||||
import {
|
import {
|
||||||
useLazyGetMarketplacesQuery,
|
|
||||||
useEnableMarketplaceMutation,
|
useEnableMarketplaceMutation,
|
||||||
|
useLazyGetMarketplacesQuery,
|
||||||
} from 'client/features/OneApi/marketplace'
|
} from 'client/features/OneApi/marketplace'
|
||||||
|
import { useGetVRouterTemplatesQuery } from 'client/features/OneApi/vrouterTemplate'
|
||||||
|
import { BoxIso as DownloadIcon } from 'iconoir-react'
|
||||||
|
|
||||||
import {
|
import { Tr, Translate } from 'client/components/HOC'
|
||||||
useLazyGetMarketplaceAppsQuery,
|
|
||||||
useExportAppMutation,
|
|
||||||
} from 'client/features/OneApi/marketplaceApp'
|
|
||||||
import { useLazyGetDatastoresQuery } from 'client/features/OneApi/datastore'
|
|
||||||
import { debounce } from 'lodash'
|
|
||||||
import EnhancedTable, { createColumns } from 'client/components/Tables/Enhanced'
|
import EnhancedTable, { createColumns } from 'client/components/Tables/Enhanced'
|
||||||
import VRouterTemplateColumns from 'client/components/Tables/VRouterTemplates/columns'
|
import VRouterTemplateColumns from 'client/components/Tables/VRouterTemplates/columns'
|
||||||
import VRouterTemplateRow from 'client/components/Tables/VRouterTemplates/row'
|
import VRouterTemplateRow from 'client/components/Tables/VRouterTemplates/row'
|
||||||
import InfoEmpty from 'iconoir-react/dist/InfoEmpty'
|
|
||||||
import { useStyles } from 'client/components/Tabs/EmptyTab/styles'
|
import { useStyles } from 'client/components/Tabs/EmptyTab/styles'
|
||||||
|
import { useLazyGetDatastoresQuery } from 'client/features/OneApi/datastore'
|
||||||
|
import {
|
||||||
|
useExportAppMutation,
|
||||||
|
useLazyGetMarketplaceAppsQuery,
|
||||||
|
} from 'client/features/OneApi/marketplaceApp'
|
||||||
|
import InfoEmpty from 'iconoir-react/dist/InfoEmpty'
|
||||||
|
import { debounce } from 'lodash'
|
||||||
|
|
||||||
const DEFAULT_DATA_CY = 'vrouter-templates'
|
const DEFAULT_DATA_CY = 'vrouter-templates'
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and *
|
* See the License for the specific language governing permissions and *
|
||||||
* limitations under the License. *
|
* limitations under the License. *
|
||||||
* ------------------------------------------------------------------------- */
|
* ------------------------------------------------------------------------- */
|
||||||
import { useMemo, ReactElement } from 'react'
|
import { ReactElement, useEffect, useMemo } from 'react'
|
||||||
|
|
||||||
import { useViews } from 'client/features/Auth'
|
import { useViews } from 'client/features/Auth'
|
||||||
import { useGetVMGroupsQuery } from 'client/features/OneApi/vmGroup'
|
import { useGetVMGroupsQuery } from 'client/features/OneApi/vmGroup'
|
||||||
@ -46,6 +46,8 @@ const VmGroupsTable = (props) => {
|
|||||||
[view]
|
[view]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
useEffect(() => refetch(), [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<EnhancedTable
|
<EnhancedTable
|
||||||
columns={columns}
|
columns={columns}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and *
|
* See the License for the specific language governing permissions and *
|
||||||
* limitations under the License. *
|
* limitations under the License. *
|
||||||
* ------------------------------------------------------------------------- */
|
* ------------------------------------------------------------------------- */
|
||||||
import { useMemo, ReactElement } from 'react'
|
import { ReactElement, useEffect, useMemo } from 'react'
|
||||||
|
|
||||||
import { useViews } from 'client/features/Auth'
|
import { useViews } from 'client/features/Auth'
|
||||||
import { useGetTemplatesQuery } from 'client/features/OneApi/vmTemplate'
|
import { useGetTemplatesQuery } from 'client/features/OneApi/vmTemplate'
|
||||||
@ -45,6 +45,7 @@ const VmTemplatesTable = (props) => {
|
|||||||
}),
|
}),
|
||||||
[view]
|
[view]
|
||||||
)
|
)
|
||||||
|
useEffect(() => refetch(), [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<EnhancedTable
|
<EnhancedTable
|
||||||
|
Loading…
Reference in New Issue
Block a user