Skip to content

Commit 1b577e3

Browse files
authored
fix(core): resolve operation data by agent for non-local nodes (#12136)
1 parent eda9641 commit 1b577e3

2 files changed

Lines changed: 23 additions & 12 deletions

File tree

core/middleware/operation.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,8 @@ func OperationLog() gin.HandlerFunc {
8686
}
8787
}
8888
}
89-
needAgentResolve := len(operationDic.BeforeFunctions) != 0 &&
90-
(len(currentNode) == 0 || currentNode == "local") &&
91-
!strings.HasPrefix(record.Path, "/core")
92-
allowCoreFallback := strings.HasPrefix(record.Path, "/core/xpack") || !willProxy(c.Request.URL.Path, currentNode)
89+
needAgentResolve := len(operationDic.BeforeFunctions) != 0 && len(currentNode) != 0 && currentNode != "local" && !strings.HasPrefix(record.Path, "/core")
90+
allowCoreFallback := strings.HasPrefix(record.Path, "/core/xpack") || !willProxy(c.Request.URL.Path, currentNode) || len(currentNode) == 0 || currentNode == "local"
9391
if needAgentResolve {
9492
c.Request.Header.Set(headerNeedOperationResolve, "1")
9593
defer func() {

frontend/src/views/database/postgresql/check/index.vue

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,22 @@
1010
:closable="false"
1111
/>
1212
<br />
13-
<el-descriptions border :column="1" class="mt-5">
14-
<el-descriptions-item label-class-name="check-label" class-name="check-content" min-width="60px">
13+
<el-descriptions border :column="1">
14+
<el-descriptions-item
15+
v-for="(item, key) in installData"
16+
:key="key"
17+
label-class-name="check-label"
18+
class-name="check-content"
19+
min-width="60px"
20+
>
1521
<template #label>
16-
<a href="javascript:void(0);" class="check-label-a" @click="toApp()">
17-
{{ $t('app.app') }}
22+
<a href="javascript:void(0);" class="check-label-a" @click="toPage(item.type)">
23+
{{ $t('menu.' + item.type) }}
1824
</a>
1925
</template>
20-
<pre>{{ installData.join('\n') }}</pre>
26+
<span class="resources">
27+
{{ item.name }}
28+
</span>
2129
</el-descriptions-item>
2230
</el-descriptions>
2331
</el-col>
@@ -29,7 +37,7 @@ import { routerToName } from '@/utils/router';
2937
import { ref } from 'vue';
3038
3139
interface InstallProps {
32-
items: Array<string>;
40+
items: Array<{ type: string; name: string }>;
3341
}
3442
const installData = ref();
3543
let open = ref(false);
@@ -39,8 +47,13 @@ const acceptParams = (props: InstallProps) => {
3947
open.value = true;
4048
};
4149
42-
const toApp = () => {
43-
routerToName('AppInstalled');
50+
const toPage = (key: string) => {
51+
if (key === 'app') {
52+
routerToName('App');
53+
}
54+
if (key === 'website') {
55+
routerToName('Website');
56+
}
4457
};
4558
4659
defineExpose({

0 commit comments

Comments
 (0)