This is an automated email from the ASF dual-hosted git repository.
qiuxiafan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-rocketbot-ui.git
The following commit(s) were added to refs/heads/master by this push:
new fdc29d5 fix: update query conditions for logs (#422)
fdc29d5 is described below
commit fdc29d52a44cf88eafef837e3dc4f5e8fcf9c06b
Author: Qiuxia Fan <[email protected]>
AuthorDate: Fri Jan 29 14:02:56 2021 +0800
fix: update query conditions for logs (#422)
* feat: add tags
* fix: update tips
* fix: update query conditiona
* fix: remove error catalog for service logs
* fix: remove error catalog for service logs
* fix: log query
* fix: log query
* fix: remove statuscode
---
src/assets/lang/en.ts | 6 ++++--
src/assets/lang/zh.ts | 3 ++-
src/graph/fragments/log.ts | 2 --
src/views/components/log/log-bar.vue | 2 +-
src/views/components/log/log-conditions.vue | 2 +-
src/views/components/log/log-table/log-constant.ts | 8 ++------
src/views/components/log/log-table/log-service-item.vue | 12 ++++++++++--
src/views/components/log/log-table/log-table.vue | 3 ++-
src/views/components/trace/trace-search.vue | 2 +-
9 files changed, 23 insertions(+), 17 deletions(-)
diff --git a/src/assets/lang/en.ts b/src/assets/lang/en.ts
index 1318f78..47177dc 100644
--- a/src/assets/lang/en.ts
+++ b/src/assets/lang/en.ts
@@ -171,8 +171,8 @@ const m = {
defaultOrder: 'Default Order',
chartType: 'Chart Type',
currentDepth: 'Current Depth',
- tagsTip: `'Only tags defined in the core/default/searchableTagKeys are
searchable.
- Check more details on the Configuration Vocabulary page'`,
+ traceTagsTip: `Only tags defined in the core/default/searchableTracesTags
are searchable.
+ Check more details on the Configuration Vocabulary page`,
tagsLink: 'Configuration Vocabulary page',
addTag: 'Please add a tag',
log: 'Log',
@@ -196,6 +196,8 @@ const m = {
contentType: 'Content Type',
content: 'Content',
viewLogs: 'View Logs',
+ logsTagsTip: `Only tags defined in the core/default/searchableLogsTags are
searchable.
+ Check more details on the Configuration Vocabulary page`,
};
export default m;
diff --git a/src/assets/lang/zh.ts b/src/assets/lang/zh.ts
index b0b74bd..f23649c 100644
--- a/src/assets/lang/zh.ts
+++ b/src/assets/lang/zh.ts
@@ -171,7 +171,7 @@ const m = {
defaultOrder: '默认顺序',
chartType: '图表类型',
currentDepth: '当前深度',
- tagsTip: '只有core/default/searchableTagKeys中定义的标记才可搜索。查看配置词汇表页面上的更多详细信息。',
+ traceTagsTip:
'只有core/default/searchableTracesTags中定义的标记才可搜索。查看配置词汇表页面上的更多详细信息。',
tagsLink: '配置词汇页',
addTag: '请添加标签',
log: '日志',
@@ -195,6 +195,7 @@ const m = {
contentType: '内容类型',
content: '内容',
viewLogs: '查看日志',
+ logsTagsTip:
'只有core/default/searchableLogsTags中定义的标记才可搜索。查看配置词汇表页面上的更多详细信息。',
};
export default m;
diff --git a/src/graph/fragments/log.ts b/src/graph/fragments/log.ts
index 163c708..21ecfbb 100644
--- a/src/graph/fragments/log.ts
+++ b/src/graph/fragments/log.ts
@@ -47,8 +47,6 @@ export const QueryServiceLogs = {
endpointId
traceId
timestamp
- isError
- statusCode
contentType
content
tags {
diff --git a/src/views/components/log/log-bar.vue
b/src/views/components/log/log-bar.vue
index 1a4d14c..b33c58b 100644
--- a/src/views/components/log/log-bar.vue
+++ b/src/views/components/log/log-bar.vue
@@ -44,6 +44,7 @@ limitations under the License. -->
icon="code"
/>
<ToolBarSelect
+ v-if="logState.type.key === cateGoryBrowser"
@onChoose="SELECT_ERROR_CATALOG"
:title="this.$t('errorCatalog')"
:current="logState.category"
@@ -190,7 +191,6 @@ limitations under the License. -->
serviceId: currentService.key || undefined,
serviceInstanceId: currentInstance.key || undefined,
endpointId: currentEndpoint.key || undefined,
- state: category.key,
excludingKeywordsOfContent:
this.logState.supportQueryLogsByKeywords &&
conditions.excludingKeywordsOfContent
? conditions.excludingKeywordsOfContent.split(',')
diff --git a/src/views/components/log/log-conditions.vue
b/src/views/components/log/log-conditions.vue
index 4e584f1..32a14f8 100644
--- a/src/views/components/log/log-conditions.vue
+++ b/src/views/components/log/log-conditions.vue
@@ -48,7 +48,7 @@ limitations under the License. -->
</span>
</span>
<input type="text" :placeholder="this.$t('addTag')" v-model="tags"
class="rk-trace-new-tag" @keyup="addLabels" />
- <span class="trace-tips" v-tooltip:bottom="{ content: this.$t('tagsTip')
}">
+ <span class="trace-tips" v-tooltip:bottom="{ content:
this.$t('logsTagsTip') }">
<a
target="blank"
href="https://github.com/apache/skywalking/blob/master/docs/en/setup/backend/configuration-vocabulary.md"
diff --git a/src/views/components/log/log-table/log-constant.ts
b/src/views/components/log/log-table/log-constant.ts
index c191b77..157f082 100644
--- a/src/views/components/log/log-table/log-constant.ts
+++ b/src/views/components/log/log-table/log-constant.ts
@@ -33,8 +33,8 @@ export const ServiceLogConstants = [
value: 'contentType',
},
{
- label: 'isError',
- value: 'isError',
+ label: 'tags',
+ value: 'tags',
},
{
label: 'content',
@@ -63,10 +63,6 @@ export const ServiceLogDetail = [
value: 'contentType',
},
{
- label: 'isError',
- value: 'isError',
- },
- {
label: 'traceId',
value: 'traceID',
},
diff --git a/src/views/components/log/log-table/log-service-item.vue
b/src/views/components/log/log-table/log-service-item.vue
index 278d00d..87600fa 100644
--- a/src/views/components/log/log-table/log-service-item.vue
+++ b/src/views/components/log/log-table/log-service-item.vue
@@ -19,8 +19,11 @@ limitations under the License. -->
<span v-if="item.label === 'timestamp'">
{{ data.time | dateformat }}
</span>
+ <span v-else-if="item.label === 'tags'">
+ {{ tags }}
+ </span>
<router-link
- v-if="item.label === 'traceId' && !noLink"
+ v-else-if="item.label === 'traceId' && !noLink"
:to="{ name: 'trace', query: { traceid: data[item.label] } }"
>
<span>{{ data[item.label] }}</span>
@@ -38,6 +41,10 @@ limitations under the License. -->
@Prop() private data: any;
@Prop() private noLink!: any;
private columns = ServiceLogConstants;
+ private tags: string = '';
+ private created() {
+ this.tags = String(this.data.tags.map((d: any) =>
`${d.key}=${d.value}`));
+ }
private showSelectSpan() {
this.$eventBus.$emit('HANDLE-SELECT-LOG', this.data);
}
@@ -58,7 +65,8 @@ limitations under the License. -->
line-height: 30px;
}
}
- .content {
+ .content,
+ .tags {
width: 300px;
}
.serviceInstanceName,
diff --git a/src/views/components/log/log-table/log-table.vue
b/src/views/components/log/log-table/log-table.vue
index 9708650..fc5e973 100644
--- a/src/views/components/log/log-table/log-table.vue
+++ b/src/views/components/log/log-table/log-table.vue
@@ -108,7 +108,8 @@ limitations under the License. -->
.traceId {
width: 390px;
}
- .content {
+ .content,
+ .tags {
width: 300px;
}
.serviceInstanceName,
diff --git a/src/views/components/trace/trace-search.vue
b/src/views/components/trace/trace-search.vue
index de5c6d4..cb00f22 100644
--- a/src/views/components/trace/trace-search.vue
+++ b/src/views/components/trace/trace-search.vue
@@ -94,7 +94,7 @@ limitations under the License. -->
class="rk-trace-new-tag"
@keyup="addLabels"
/>
- <span class="trace-tips" v-tooltip:bottom="{ content:
this.$t('tagsTip') }">
+ <span class="trace-tips" v-tooltip:bottom="{ content:
this.$t('traceTagsTip') }">
<a
target="blank"
href="https://github.com/apache/skywalking/blob/master/docs/en/setup/backend/configuration-vocabulary.md"