From 1ee261a265ce0a30dc4f56c1083504983637585e Mon Sep 17 00:00:00 2001 From: bronya0 Date: Mon, 4 Nov 2024 00:40:14 +0800 Subject: [PATCH] =?UTF-8?q?add=EF=BC=9A=E5=A2=9E=E5=8A=A015=E7=A7=8D?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/frontend/src/components/Index.vue | 2 +- app/frontend/src/components/Nodes.vue | 15 ++ app/frontend/src/components/Rest.vue | 250 ++++++++++++++++++++++- app/frontend/src/components/Snapshot.vue | 3 - 4 files changed, 263 insertions(+), 7 deletions(-) diff --git a/app/frontend/src/components/Index.vue b/app/frontend/src/components/Index.vue index 1ae202d..9f39415 100644 --- a/app/frontend/src/components/Index.vue +++ b/app/frontend/src/components/Index.vue @@ -24,7 +24,6 @@ :pagination="pagination" size="small" :bordered="false" - :max-height="600" striped :row-key="rowKey" v-model:checked-row-keys="selectedRowKeys" @@ -353,6 +352,7 @@ const mergeSegments = async (row) => { json_data.value = formattedJson(res.result) drawer_title.value = row.index drawerVisible.value = true + message.success("已提交段合并请求,段合并是重IO任务,请注意集群负载") await search() } } diff --git a/app/frontend/src/components/Nodes.vue b/app/frontend/src/components/Nodes.vue index e3566ba..d75d425 100644 --- a/app/frontend/src/components/Nodes.vue +++ b/app/frontend/src/components/Nodes.vue @@ -15,6 +15,7 @@ size="small" :bordered="false" striped + :pagination="pagination" /> @@ -79,6 +80,20 @@ const renderProgress = (row, key) => { }) } +const pagination = ref({ + page: 1, + pageSize: 10, + showSizePicker: true, + pageSizes: [5, 10, 20, 30, 40], + onChange: (page) => { + pagination.value.page = page + }, + onUpdatePageSize: (pageSize) => { + pagination.value.pageSize = pageSize + pagination.value.page = 1 + }, +}) + const columns = [ { title: 'IP', key: 'ip', sorter: 'default',width: 100,resizable: true }, { title: '名称', key: 'name', sorter: 'default',width: 100,resizable: true }, diff --git a/app/frontend/src/components/Rest.vue b/app/frontend/src/components/Rest.vue index 60cf4de..ad7b022 100644 --- a/app/frontend/src/components/Rest.vue +++ b/app/frontend/src/components/Rest.vue @@ -1,7 +1,8 @@