Skip to content
This repository was archived by the owner on Jun 1, 2022. It is now read-only.

Commit b49e657

Browse files
authored
fix: search content of logs (#424)
1 parent 7430504 commit b49e657

File tree

4 files changed

+26
-8
lines changed

4 files changed

+26
-8
lines changed

src/assets/lang/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ const m = {
198198
viewLogs: 'View Logs',
199199
logsTagsTip: `Only tags defined in the core/default/searchableLogsTags are searchable.
200200
Check more details on the Configuration Vocabulary page`,
201+
keywordsOfContentLogTips: 'Current storage of SkyWalking OAP server does not support this.',
201202
};
202203

203204
export default m;

src/assets/lang/zh.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ const m = {
196196
content: '内容',
197197
viewLogs: '查看日志',
198198
logsTagsTip: '只有core/default/searchableLogsTags中定义的标记才可搜索。查看配置词汇表页面上的更多详细信息。',
199+
keywordsOfContentLogTips: 'SkyWalking OAP服务器的当前存储不支持此操作',
199200
};
200201

201202
export default m;

src/views/components/log/log-bar.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,9 @@ limitations under the License. -->
188188
serviceId: currentService.key || undefined,
189189
serviceInstanceId: currentInstance.key || undefined,
190190
endpointId: currentEndpoint.key || undefined,
191-
excludingKeywordsOfContent:
192-
supportQueryLogsByKeywords && conditions.keywordsOfContent ? conditions.keywordsOfContent : undefined,
193191
keywordsOfContent:
192+
supportQueryLogsByKeywords && conditions.keywordsOfContent ? conditions.keywordsOfContent : undefined,
193+
excludingKeywordsOfContent:
194194
supportQueryLogsByKeywords && conditions.excludingKeywordsOfContent
195195
? conditions.excludingKeywordsOfContent
196196
: undefined,

src/views/components/log/log-conditions.vue

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ limitations under the License. -->
2424
</div>
2525
<div class="mr-15">
2626
<span class="sm b grey mr-10">{{ this.$t('keywordsOfContent') }}:</span>
27-
<span class="rk-trace-tags">
27+
<span class="rk-trace-tags" v-show="rocketLog.supportQueryLogsByKeywords">
2828
<span
2929
class="selected"
3030
v-for="(item, index) in rocketLog.conditions.keywordsOfContent"
@@ -36,14 +36,22 @@ limitations under the License. -->
3636
</span>
3737
<input
3838
type="text"
39-
class="rk-trace-search-input dib"
39+
:disabled="!rocketLog.supportQueryLogsByKeywords"
40+
class="rk-trace-search-input dib mr-5"
4041
v-model="keywordsOfContent"
4142
@keyup="addLabels($event, LogConditionsOpt.KeywordsOfContent)"
4243
/>
44+
<span
45+
class="log-tips"
46+
v-show="!rocketLog.supportQueryLogsByKeywords"
47+
v-tooltip:bottom="{ content: this.$t('keywordsOfContentLogTips') }"
48+
>
49+
<rk-icon icon="help" class="mr-5" />
50+
</span>
4351
</div>
4452
<div class="mr-15">
4553
<span class="sm b grey mr-10">{{ this.$t('excludingKeywordsOfContent') }}:</span>
46-
<span class="rk-trace-tags">
54+
<span class="rk-trace-tags" v-show="rocketLog.supportQueryLogsByKeywords">
4755
<span
4856
class="selected"
4957
v-for="(item, index) in rocketLog.conditions.excludingKeywordsOfContent"
@@ -55,10 +63,18 @@ limitations under the License. -->
5563
</span>
5664
<input
5765
type="text"
58-
class="rk-trace-search-input dib"
66+
:disabled="!rocketLog.supportQueryLogsByKeywords"
67+
class="rk-trace-search-input dib mr-5"
5968
v-model="excludingKeywordsOfContent"
6069
@keyup="addLabels($event, LogConditionsOpt.ExcludingKeywordsOfContent)"
6170
/>
71+
<span
72+
class="log-tips"
73+
v-show="!rocketLog.supportQueryLogsByKeywords"
74+
v-tooltip:bottom="{ content: this.$t('keywordsOfContentLogTips') }"
75+
>
76+
<rk-icon icon="help" class="mr-5" />
77+
</span>
6278
</div>
6379
</div>
6480
<div class="mr-10" style="padding-top: 10px">
@@ -76,7 +92,7 @@ limitations under the License. -->
7692
class="rk-trace-new-tag"
7793
@keyup="addLabels($event, LogConditionsOpt.Tags)"
7894
/>
79-
<span class="trace-tips" v-tooltip:bottom="{ content: this.$t('logsTagsTip') }">
95+
<span class="log-tips" v-tooltip:bottom="{ content: this.$t('logsTagsTip') }">
8096
<a
8197
target="blank"
8298
href="https://github.com/apache/skywalking/blob/master/docs/en/setup/backend/configuration-vocabulary.md"
@@ -272,7 +288,7 @@ limitations under the License. -->
272288
font-size: 12px;
273289
margin: 0 2px;
274290
}
275-
.trace-tips {
291+
.log-tips {
276292
color: #eee;
277293
}
278294
}

0 commit comments

Comments
 (0)