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

F #5422: Remove duplicated action (#1935)

This commit is contained in:
Sergio Betanzos 2022-04-12 16:17:36 +02:00 committed by GitHub
parent 5aaecc6c98
commit 26d3dee4bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,12 +39,7 @@ import { CloneForm } from 'client/components/Forms/VmTemplate'
import { createActions } from 'client/components/Tables/Enhanced/Utils'
import { PATH } from 'client/apps/sunstone/routesOne'
import {
T,
VM_TEMPLATE_ACTIONS,
MARKETPLACE_APP_ACTIONS,
RESOURCE_NAMES,
} from 'client/constants'
import { T, VM_TEMPLATE_ACTIONS, RESOURCE_NAMES } from 'client/constants'
const MessageToConfirmAction = (rows) => {
const names = rows?.map?.(({ original }) => original?.NAME)
@ -72,7 +67,7 @@ const Actions = () => {
const [clone] = useCloneTemplateMutation()
const [remove] = useRemoveTemplateMutation()
const vmTemplateActions = useMemo(
return useMemo(
() =>
createActions({
filters: getResourceView(RESOURCE_NAMES.VM_TEMPLATE)?.actions,
@ -273,28 +268,6 @@ const Actions = () => {
}),
[view]
)
const marketplaceAppActions = useMemo(
() =>
createActions({
filters: getResourceView(RESOURCE_NAMES.APP)?.actions,
actions: [
{
accessor: MARKETPLACE_APP_ACTIONS.CREATE_DIALOG,
tooltip: T.CreateMarketApp,
icon: Cart,
selected: { max: 1 },
disabled: true,
action: (rows) => {
// TODO: go to Marketplace App CREATE form
},
},
],
}),
[view]
)
return [...vmTemplateActions, ...marketplaceAppActions]
}
export default Actions