Skip to content

Commit 5a87fe7

Browse files
authored
feat(console): 新建vm新增blockMultiQueue和cache参数 (#2268)
* feat(console): 新建vm新增blockMultiQueue和cache参数 * feat(console): change writethrough to writeback
1 parent 064b70f commit 5a87fe7

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

web/console/src/modules/cluster/components/resource/virtual-machine/pages/detail/event/index.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import React, { useState } from 'react';
2-
import { Table, TableColumn, Switch, Alert, Justify, Button, Bubble, Text } from 'tea-component';
31
import { useFetch } from '@src/modules/common/hooks/useFetch';
42
import { virtualMachineAPI } from '@src/webApi';
53
import dayjs from 'dayjs';
4+
import React, { useState } from 'react';
5+
import { Alert, Bubble, Button, Justify, Switch, Table, TableColumn, Text } from 'tea-component';
66
import { v4 as uuidv4 } from 'uuid';
77

88
const { autotip } = Table.addons;
@@ -14,12 +14,13 @@ export const VMEventPanel = ({ clusterId, namespace, name }) => {
1414
async () => {
1515
const { items } = await virtualMachineAPI.fetchEventList({ clusterId, namespace, name });
1616

17-
return { data: items.map(_ => ({ ..._, id: uuidv4() })) };
17+
return { data: items.map(_ => ({ ..._, id: uuidv4() })).reverse() };
1818
},
1919
[clusterId, namespace, name],
2020
{
2121
fetchAble: !!(clusterId && namespace && name),
22-
polling
22+
polling,
23+
needClearData: false
2324
}
2425
);
2526

web/console/src/webApi/virtual-machine.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,14 @@ export function createVM({
156156
},
157157

158158
devices: {
159+
blockMultiQueue: true,
159160
disks: diskList.map((item, index) => ({
160161
disk: {
161162
bus: 'virtio'
162163
},
163164
bootOrder: index + 1,
164-
name: item.name
165+
name: item.name,
166+
cache: 'writeback'
165167
})),
166168

167169
interfaces: [

web/console/webpack/webpack.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module.exports = ({ version }) =>
4242
},
4343

4444
'/websocket': {
45-
target: `ws://${Host.split('//')[1]}`,
45+
target: Host.replace(/^http/, 'ws'),
4646
ws: true,
4747
logLevel: 'debug',
4848
secure: false,

0 commit comments

Comments
 (0)