diff --git a/web/console/src/modules/cluster/components/resource/virtual-machine/pages/detail/event/index.tsx b/web/console/src/modules/cluster/components/resource/virtual-machine/pages/detail/event/index.tsx index 4a2586bf5d..b734f25b10 100644 --- a/web/console/src/modules/cluster/components/resource/virtual-machine/pages/detail/event/index.tsx +++ b/web/console/src/modules/cluster/components/resource/virtual-machine/pages/detail/event/index.tsx @@ -1,8 +1,8 @@ -import React, { useState } from 'react'; -import { Table, TableColumn, Switch, Alert, Justify, Button, Bubble, Text } from 'tea-component'; import { useFetch } from '@src/modules/common/hooks/useFetch'; import { virtualMachineAPI } from '@src/webApi'; import dayjs from 'dayjs'; +import React, { useState } from 'react'; +import { Alert, Bubble, Button, Justify, Switch, Table, TableColumn, Text } from 'tea-component'; import { v4 as uuidv4 } from 'uuid'; const { autotip } = Table.addons; @@ -14,12 +14,13 @@ export const VMEventPanel = ({ clusterId, namespace, name }) => { async () => { const { items } = await virtualMachineAPI.fetchEventList({ clusterId, namespace, name }); - return { data: items.map(_ => ({ ..._, id: uuidv4() })) }; + return { data: items.map(_ => ({ ..._, id: uuidv4() })).reverse() }; }, [clusterId, namespace, name], { fetchAble: !!(clusterId && namespace && name), - polling + polling, + needClearData: false } ); diff --git a/web/console/src/webApi/virtual-machine.ts b/web/console/src/webApi/virtual-machine.ts index edb19fa71c..2ad527c47c 100644 --- a/web/console/src/webApi/virtual-machine.ts +++ b/web/console/src/webApi/virtual-machine.ts @@ -156,12 +156,14 @@ export function createVM({ }, devices: { + blockMultiQueue: true, disks: diskList.map((item, index) => ({ disk: { bus: 'virtio' }, bootOrder: index + 1, - name: item.name + name: item.name, + cache: 'writeback' })), interfaces: [ diff --git a/web/console/webpack/webpack.dev.js b/web/console/webpack/webpack.dev.js index aa3ecfc007..183bd281ff 100644 --- a/web/console/webpack/webpack.dev.js +++ b/web/console/webpack/webpack.dev.js @@ -42,7 +42,7 @@ module.exports = ({ version }) => }, '/websocket': { - target: `ws://${Host.split('//')[1]}`, + target: Host.replace(/^http/, 'ws'), ws: true, logLevel: 'debug', secure: false,