endpoint btn not showing

This commit is contained in:
Peter Olu 2022-05-12 09:22:40 +01:00
parent 59a9bc15ea
commit 4645d000d4
2 changed files with 11 additions and 3 deletions

View File

@ -79,7 +79,7 @@ limitations under the License. -->
class="mr-5 flex-h items-center" class="mr-5 flex-h items-center"
v-if=" v-if="
dashboardStore.entity !== EntityType[2].value && dashboardStore.entity !== EntityType[2].value &&
currentSearchTerm === 'endpoint' currentSearchTerm === 'endpoints'
" "
> >
<span class="grey mr-5" <span class="grey mr-5"

View File

@ -61,7 +61,7 @@ limitations under the License. -->
@change="changeField('instance', $event)" @change="changeField('instance', $event)"
/> />
</div> </div>
<div class="filter" v-if="dashboardStore.entity !== EntityType[2].value"> <div class="filter" v-if="dashboardStore.entity !== EntityType[2].value && activeFilter === 'endpoints'">
<span class="grey mr-5">{{ t("endpoint") }}:</span> <span class="grey mr-5">{{ t("endpoint") }}:</span>
<Selector <Selector
size="small" size="small"
@ -178,6 +178,11 @@ const arrayOfFilters = ref<filtersObject[]>([
iconName: "epic", iconName: "epic",
description: "Tags", description: "Tags",
}, },
{
name: "endpoints",
iconName: "device_hub",
description: "Endpoints",
},
]); ]);
const activeFilter = ref<string>(""); const activeFilter = ref<string>("");
const queriedFilter = computed(() => traceStore.activeFilter); const queriedFilter = computed(() => traceStore.activeFilter);
@ -254,7 +259,7 @@ function cancelSearch() {
case "instance": case "instance":
state.instance.value = "0"; state.instance.value = "0";
break; break;
case "endpont": case "endpoints":
state.endpoint.value = "0"; state.endpoint.value = "0";
break; break;
case "service": case "service":
@ -300,6 +305,9 @@ function handleActiveFilterState() {
case "status": case "status":
traceStore.setActiveFilter(activeFilter.value); traceStore.setActiveFilter(activeFilter.value);
break; break;
case "endpoints":
traceStore.setActiveFilter(activeFilter.value);
break;
} }
} }
function searchTraces() { function searchTraces() {