fixed tags issues and number of columns for portal viewn

This commit is contained in:
Peter Olu 2022-06-03 10:06:52 +01:00
parent d064cf1c7b
commit 048a574bfa
3 changed files with 12 additions and 9 deletions

View File

@ -67,7 +67,6 @@ limitations under the License. -->
<script lang="ts" setup>
import { ref, computed } from "vue";
import { useI18n } from "vue-i18n";
// import { ServiceLogConstants, BrowserLogConstants } from "./data";
import LogBrowser from "./LogBrowser.vue";
import LogService from "./LogService.vue";
import LogDetail from "./LogDetail.vue";

View File

@ -69,6 +69,7 @@ function showSelectSpan() {
emit("select", props.data);
}
</script>
<style lang="scss" scoped>
.log-item {
white-space: nowrap;

View File

@ -364,13 +364,9 @@ const arrayOfFilters = ref<filtersObject[]>([
]);
onMounted(() => {
if (portal) {
logStore.hideColumns([
"endpoint",
"time",
"contentType",
"tags",
"traceID",
]);
["endpoint", "time", "contentType", "tags", "traceID"].forEach((col) =>
logStore.hideColumns(col)
);
}
});
init();
@ -380,9 +376,11 @@ function toggleColumSelector() {
}
function hideColumns(column: string) {
logStore.hideColumns(column.value);
selectedColumns.value = [];
}
function showColumns(column: string) {
logStore.showColumns(column.value);
selectedColumns.value = [];
}
function hideTags() {
let tagsWrap = document.querySelector(".el-select__tags");
@ -572,6 +570,11 @@ function removeExcludeContent(index: number) {
}
function setSearchTerm(term: string) {
currentSearchTerm.value = term;
if (term === "column") {
setTimeout(() => {
hideTags();
}, 200);
}
}
function cancelSearchTerm() {
switch (currentSearchTerm.value) {
@ -730,7 +733,7 @@ watch(
width: 100%;
padding: 0 32px 0 20px;
}
.el-select-dropdown.is-multiple .el-select-dropdown__item.selected::after{
.el-select-dropdown.is-multiple .el-select-dropdown__item.selected::after {
display: none;
}
</style>