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

View File

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