mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-23 22:50:09 +03:00
parent
bb715f162e
commit
4092379f0f
@ -63,6 +63,10 @@ const CreateVmTemplate = loadable(
|
||||
() => import('client/containers/VmTemplates/Create'),
|
||||
{ ssr: false }
|
||||
)
|
||||
const VMTemplateDetail = loadable(
|
||||
() => import('client/containers/VmTemplates/Detail'),
|
||||
{ ssr: false }
|
||||
)
|
||||
// const VrTemplates = loadable(() => import('client/containers/VrTemplates'), { ssr: false })
|
||||
// const VmGroups = loadable(() => import('client/containers/VmGroups'), { ssr: false })
|
||||
|
||||
@ -137,9 +141,9 @@ export const PATH = {
|
||||
TEMPLATE: {
|
||||
VMS: {
|
||||
LIST: `/${RESOURCE_NAMES.VM_TEMPLATE}`,
|
||||
DETAIL: `/${RESOURCE_NAMES.VM_TEMPLATE}/:id`,
|
||||
INSTANTIATE: `/${RESOURCE_NAMES.VM_TEMPLATE}/instantiate`,
|
||||
CREATE: `/${RESOURCE_NAMES.VM_TEMPLATE}/create`,
|
||||
DETAIL: `/${RESOURCE_NAMES.VM_TEMPLATE}/:id`,
|
||||
},
|
||||
},
|
||||
STORAGE: {
|
||||
@ -255,6 +259,12 @@ const ENDPOINTS = [
|
||||
path: PATH.TEMPLATE.VMS.CREATE,
|
||||
Component: CreateVmTemplate,
|
||||
},
|
||||
{
|
||||
title: T.VMTemplate,
|
||||
description: (params) => `#${params?.id}`,
|
||||
path: PATH.TEMPLATE.VMS.DETAIL,
|
||||
Component: VMTemplateDetail,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
41
src/fireedge/src/client/containers/VmTemplates/Detail.js
Normal file
41
src/fireedge/src/client/containers/VmTemplates/Detail.js
Normal file
@ -0,0 +1,41 @@
|
||||
/* ------------------------------------------------------------------------- *
|
||||
* Copyright 2002-2022, OpenNebula Project, OpenNebula Systems *
|
||||
* *
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may *
|
||||
* not use this file except in compliance with the License. You may obtain *
|
||||
* a copy of the License at *
|
||||
* *
|
||||
* http://www.apache.org/licenses/LICENSE-2.0 *
|
||||
* *
|
||||
* Unless required by applicable law or agreed to in writing, software *
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, *
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
|
||||
* See the License for the specific language governing permissions and *
|
||||
* limitations under the License. *
|
||||
* ------------------------------------------------------------------------- */
|
||||
import { ReactElement } from 'react'
|
||||
import { Stack } from '@mui/material'
|
||||
import { useParams, Redirect } from 'react-router-dom'
|
||||
|
||||
import VmTemplateTabs from 'client/components/Tabs/VmTemplate'
|
||||
|
||||
/**
|
||||
* Displays the detail information about a VM Template.
|
||||
*
|
||||
* @returns {ReactElement} VM Template detail component.
|
||||
*/
|
||||
function VMTemplateDetail() {
|
||||
const { id } = useParams()
|
||||
|
||||
if (Number.isNaN(+id)) {
|
||||
return <Redirect to="/" />
|
||||
}
|
||||
|
||||
return (
|
||||
<Stack height={1} overflow="auto">
|
||||
<VmTemplateTabs id={id} />
|
||||
</Stack>
|
||||
)
|
||||
}
|
||||
|
||||
export default VMTemplateDetail
|
Loading…
x
Reference in New Issue
Block a user