mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-02 02:38:29 +00:00
refactored logs header search terms logic and the handling of active buttons
This commit is contained in:
parent
aa7485391b
commit
59a9bc15ea
@ -108,12 +108,13 @@ limitations under the License. -->
|
||||
<el-input v-model="traceId" class="inputs-max" size="small" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ConditionTags
|
||||
v-if="currentSearchTerm === 'tags'"
|
||||
:type="'LOG'"
|
||||
@update="updateTags"
|
||||
/>
|
||||
<keep-alive>
|
||||
<ConditionTags
|
||||
v-if="currentSearchTerm === 'tags'"
|
||||
:type="'LOG'"
|
||||
@update="updateTags"
|
||||
/>
|
||||
</keep-alive>
|
||||
</div>
|
||||
|
||||
<div class="flex-h items-center" v-show="!isBrowser">
|
||||
@ -348,8 +349,37 @@ function removeFromActiveTerms() {
|
||||
(term) => term !== currentSearchTerm.value
|
||||
);
|
||||
}
|
||||
function handleActiveSearchTerms() {
|
||||
switch (currentSearchTerm.value) {
|
||||
case "traceId":
|
||||
if (!traceId.value.length) return;
|
||||
addToActiveTerms();
|
||||
break;
|
||||
case "tags":
|
||||
if (!tagsList.value.length) return;
|
||||
addToActiveTerms();
|
||||
break;
|
||||
case "keywords":
|
||||
if (!keywordsOfContent.value.length) return;
|
||||
addToActiveTerms();
|
||||
break;
|
||||
case "exclude":
|
||||
if (!excludingKeywordsOfContent.value.length) return;
|
||||
addToActiveTerms();
|
||||
break;
|
||||
case "instance":
|
||||
addToActiveTerms();
|
||||
break;
|
||||
case "service":
|
||||
addToActiveTerms();
|
||||
break;
|
||||
case "endpoint":
|
||||
addToActiveTerms();
|
||||
break;
|
||||
}
|
||||
}
|
||||
function searchLogs() {
|
||||
addToActiveTerms();
|
||||
handleActiveSearchTerms();
|
||||
currentSearchTerm.value = "";
|
||||
let endpoint = "",
|
||||
instance = "";
|
||||
@ -434,9 +464,7 @@ function removeExcludeContent(index: number) {
|
||||
excludingContentStr.value = "";
|
||||
}
|
||||
function setSearchTerm(term: string) {
|
||||
// if (!term) return;
|
||||
currentSearchTerm.value = term;
|
||||
console.log(currentSearchTerm.value);
|
||||
}
|
||||
function cancelSearchTerm() {
|
||||
switch (currentSearchTerm.value) {
|
||||
@ -465,7 +493,7 @@ function cancelSearchTerm() {
|
||||
}
|
||||
removeFromActiveTerms();
|
||||
currentSearchTerm.value = "";
|
||||
init()
|
||||
init();
|
||||
}
|
||||
watch(
|
||||
() => selectorStore.currentService,
|
||||
|
@ -292,13 +292,13 @@ function handleActiveFilterState() {
|
||||
traceStore.setActiveFilter(activeFilter.value);
|
||||
break;
|
||||
case "service":
|
||||
traceStore.setActiveFilter(activeFilter.value);
|
||||
traceStore.setActiveFilter(activeFilter.value);
|
||||
break;
|
||||
case "instance":
|
||||
traceStore.setActiveFilter(activeFilter.value);
|
||||
traceStore.setActiveFilter(activeFilter.value);
|
||||
break;
|
||||
case "status":
|
||||
traceStore.setActiveFilter(activeFilter.value);
|
||||
traceStore.setActiveFilter(activeFilter.value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user