This commit is contained in:
cracklesparkle
2024-07-18 11:48:56 +09:00
parent 4283bd20bb
commit cf3fda43e4
20 changed files with 259 additions and 340 deletions

View File

@ -3,8 +3,9 @@ import { IServer } from '../interfaces/servers'
import { useServerIps } from '../hooks/swrHooks'
import FullFeaturedCrudGrid from './TableEditable'
import { GridColDef } from '@mui/x-data-grid'
import { AxiosResponse } from 'axios'
function ServerData({ id, name, region_id }: IServer) {
function ServerData({ id }: IServer) {
const { serverIps } = useServerIps(id, 0, 10)
const serverIpsColumns: GridColDef[] = [
@ -24,9 +25,16 @@ function ServerData({ id, name, region_id }: IServer) {
columns={serverIpsColumns}
actions
onRowClick={(params, event, details) => {
console.log(params.id, event, details)
//setCurrentServerData(params.row)
//setServerDataOpen(true)
}}
onSave={undefined}
onDelete={function (data: any): Promise<AxiosResponse<any, any>> {
console.log(data)
throw new Error('Function not implemented.')
}}
loading={false}
/>
}
</Box>