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> <script lang="ts" setup>
import { ref, computed } from "vue"; import { ref, computed } from "vue";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
// import { ServiceLogConstants, BrowserLogConstants } from "./data";
import LogBrowser from "./LogBrowser.vue"; import LogBrowser from "./LogBrowser.vue";
import LogService from "./LogService.vue"; import LogService from "./LogService.vue";
import LogDetail from "./LogDetail.vue"; import LogDetail from "./LogDetail.vue";

View File

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

View File

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