diff --git a/lms/nladmin-ui/src/views/loki/api/loki.js b/lms/nladmin-ui/src/views/loki/api/loki.js
index a1da580e3..b5a309420 100644
--- a/lms/nladmin-ui/src/views/loki/api/loki.js
+++ b/lms/nladmin-ui/src/views/loki/api/loki.js
@@ -8,9 +8,9 @@ export function getLogData(param) {
})
}
-export function labelsValues() {
+export function labelsValues(type) {
return request({
- url: '/api/esLog/labels',
+ url: '/api/esLog/labels/' + type,
method: 'get'
})
}
diff --git a/lms/nladmin-ui/src/views/loki/view/index.vue b/lms/nladmin-ui/src/views/loki/view/index.vue
index 2a7111615..65b239c40 100644
--- a/lms/nladmin-ui/src/views/loki/view/index.vue
+++ b/lms/nladmin-ui/src/views/loki/view/index.vue
@@ -3,12 +3,27 @@
-
+
+
+
+
+
+
@@ -135,16 +150,15 @@
- {{ log.system }}
+ {{ log.system }}
{{ log.thread }}
{{ log.logLevel }}
{{ log.requestIp }}
- {{ log.requestTime }}
+ {{ log.requestTime }}
{{ log.traceId }}
{{ log.requestMethod }}
-----{{ log.message }}
-
@@ -158,6 +172,7 @@ import logOperation from '@/views/loki/api/loki'
let queryParam = {
logLevel: null,
+ system: null,
startTime: null,
endTime: null,
traceId: null,
@@ -172,7 +187,9 @@ export default {
data() {
return {
labelsOptions: [], // 所有标签和对应所有值数据
+ systemOptions: [], // 所有标签和对应所有值数据
logLevelValue: '',
+ system: '',
timeRange: [],
message: '',
traceId: '',
@@ -243,7 +260,8 @@ export default {
}
},
created() {
- this.initLabelsValues()
+ this.initLabelsValues('logLevel')
+ this.initLabelsValues('system')
},
methods: {
fontType(level) {
@@ -258,9 +276,14 @@ export default {
}
return { 'color': '#a74dc6' }
},
- initLabelsValues() {
- logOperation.labelsValues().then(res => {
- this.labelsOptions = res
+ initLabelsValues(type) {
+ logOperation.labelsValues(type).then(res => {
+ if (type === 'logLevel') {
+ this.labelsOptions = res
+ }
+ if (type === 'system') {
+ this.systemOptions = res
+ }
})
},
queryData() {
@@ -281,6 +304,7 @@ export default {
queryParam.traceId = this.traceId
queryParam.size = this.size
queryParam.page = this.page
+ queryParam.system = this.system
logOperation.getLogData(queryParam).then(res => {
this.showEmpty = false