added a function to set visibility to false

This commit is contained in:
Peter Olu 2022-05-21 14:31:32 +01:00
parent f9d7dd61c4
commit bcf15a6274

View File

@ -1,3 +1,4 @@
import { serviceLogColumn } from '@/types/log-column';
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -61,6 +62,15 @@ export const logStore = defineStore({
loadLogs: false,
}),
actions: {
hideColumns(columnsLabel: string[]) {
console.log(columnsLabel, this.serviceLogColumn)
// TODO: add a parameter column type too
this.serviceLogColumn.map((col: any) => {
if (columnsLabel.includes(col.label)) {
col.isVisible = false
}
})
},
setLogCondition(data: any) {
this.conditions = { ...this.conditions, ...data };
},