From bcf15a62749bb57b9333ae4b816bfcd39e350e41 Mon Sep 17 00:00:00 2001 From: Peter Olu Date: Sat, 21 May 2022 14:31:32 +0100 Subject: [PATCH] added a function to set visibility to false --- src/store/modules/log.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/store/modules/log.ts b/src/store/modules/log.ts index c63a5445..ef7aca80 100644 --- a/src/store/modules/log.ts +++ b/src/store/modules/log.ts @@ -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 }; },