mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-01 21:39:45 +00:00
fixed add column function adding two columns when all columns are hidden
This commit is contained in:
parent
5f08e56246
commit
d064cf1c7b
@ -61,18 +61,16 @@ export const logStore = defineStore({
|
||||
loadLogs: false,
|
||||
}),
|
||||
actions: {
|
||||
showColumns(columnsLabel: string[]) {
|
||||
// TODO: add a parameter column type too
|
||||
showColumns(columnsLabel: string) {
|
||||
this.serviceLogColumn.forEach((col: any) => {
|
||||
if (columnsLabel.includes(col.value)) {
|
||||
if (columnsLabel === col.value) {
|
||||
col.isVisible = true
|
||||
}
|
||||
})
|
||||
},
|
||||
hideColumns(columnsLabel: string[]) {
|
||||
// TODO: add a parameter column type too
|
||||
hideColumns(columnsLabel: string) {
|
||||
this.serviceLogColumn.forEach((col: any) => {
|
||||
if (columnsLabel.includes(col.value)) {
|
||||
if (columnsLabel === col.value) {
|
||||
col.isVisible = false
|
||||
}
|
||||
})
|
||||
|
@ -378,21 +378,17 @@ function toggleColumSelector() {
|
||||
showColumList.value = !showColumList.value;
|
||||
setSearchTerm("column");
|
||||
}
|
||||
function hideColumns(column: any) {
|
||||
selectedColumns.value.push(column.value);
|
||||
logStore.hideColumns(selectedColumns.value);
|
||||
selectedColumns.value = [];
|
||||
function hideColumns(column: string) {
|
||||
logStore.hideColumns(column.value);
|
||||
}
|
||||
function showColumns(column: string) {
|
||||
logStore.showColumns(column.value);
|
||||
}
|
||||
function hideTags() {
|
||||
let tagsWrap = document.querySelector(".el-select__tags");
|
||||
if (!tagsWrap) return;
|
||||
tagsWrap.style.display = "none";
|
||||
}
|
||||
function showColumns(column: any) {
|
||||
selectedColumns.value.push(column.value);
|
||||
logStore.showColumns(selectedColumns.value);
|
||||
selectedColumns.value = [];
|
||||
}
|
||||
async function init() {
|
||||
const resp = await logStore.getLogsByKeywords();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user