feat: refreshTask when open task log (#8489)

This commit is contained in:
ChengPlay 2025-04-27 18:52:50 +08:00 committed by GitHub
parent cad4ee824a
commit 3fc4d9557d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 0 deletions

View file

@ -154,6 +154,7 @@ var WebUrlMap = map[string]struct{}{
"/xpack/setting": {},
"/xpack/node": {},
"/xpack/waf/stat": {},
"/xpack/exchange/file": {},
}
var DynamicRoutes = []string{

View file

@ -49,6 +49,7 @@ import { searchTasks } from '@/api/modules/log';
import { reactive, ref } from '@vue/runtime-core';
import { Log } from '@/api/interface/log';
import TaskLog from '@/components/log/task/index.vue';
import bus from '@/global/bus';
const open = ref(false);
const handleClose = () => {
@ -72,6 +73,7 @@ const req = reactive({
});
const search = async () => {
bus.emit('refreshTask', true);
req.page = paginationConfig.currentPage;
req.pageSize = paginationConfig.pageSize;
loading.value = true;

View file

@ -51,6 +51,7 @@ import { searchTasks } from '@/api/modules/log';
import { onMounted, reactive, ref } from '@vue/runtime-core';
import { Log } from '@/api/interface/log';
import TaskLog from '@/components/log/task/index.vue';
import bus from '@/global/bus';
const loading = ref();
const data = ref();
@ -79,6 +80,7 @@ const search = async () => {
paginationConfig.total = res.data.total;
} catch (error) {
} finally {
bus.emit('refreshTask', true);
loading.value = false;
}
};