fixed log enpoint refesh on cancel

This commit is contained in:
Peter Olu 2022-05-12 12:18:55 +01:00
parent 08ecb7b491
commit ce77ba655e
2 changed files with 9 additions and 5 deletions

View File

@ -110,6 +110,7 @@ limitations under the License. -->
</div>
<keep-alive>
<ConditionTags
ref="logTagsComponent"
v-if="currentSearchTerm === 'tags'"
:type="'LOG'"
@update="updateTags"
@ -231,6 +232,7 @@ const state = reactive<any>({
endpoint: { value: "0", label: "All" },
service: { value: "", label: "" },
});
const logTagsComponent = ref<InstanceType<typeof ConditionTags> | null>(null);
interface filtersObject {
name: string;
iconName: string;
@ -373,7 +375,7 @@ function handleActiveSearchTerms() {
case "service":
addToActiveTerms();
break;
case "endpoint":
case "endpoints":
addToActiveTerms();
break;
}
@ -474,6 +476,7 @@ function cancelSearchTerm() {
case "tags":
tagsList.value = [];
tagsMap.value = [];
logTagsComponent.value?.emptyTags();
break;
case "keywords":
keywordsOfContent.value = [];
@ -485,7 +488,8 @@ function cancelSearchTerm() {
state.instance.value = "0";
break;
case "endpoints":
state.endpoints.value = "0";
state.endpoint.value = "0";
getEndpoints();
break;
case "service":
state.service.value = "";

View File

@ -103,7 +103,7 @@ limitations under the License. -->
<keep-alive>
<ConditionTags
v-if="activeFilter === 'tags'"
ref="tagComponent"
ref="traceTagsComponent"
:type="'TRACE'"
@update="updateTags"
/>
@ -209,7 +209,7 @@ const state = reactive<any>({
service: { value: "", label: "" },
});
const tagComponent = ref<InstanceType<typeof ConditionTags> | null>(null);
const traceTagsComponent = ref<InstanceType<typeof ConditionTags> | null>(null);
// const dateTime = computed(() => [
// appStore.durationRow.start,
@ -282,7 +282,7 @@ function cancelSearch() {
tagsList.value = [];
tagsMap.value = [];
updateTags({ tagsMap: [], tagsList: [] });
tagComponent.value?.emptyTags();
traceTagsComponent.value?.emptyTags();
break;
case "traceId":
traceId.value = "";