mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-14 17:05:10 +00:00
can show columns from selected input
This commit is contained in:
parent
9d3c417a49
commit
8a15b9882d
@ -61,6 +61,14 @@ export const logStore = defineStore({
|
||||
loadLogs: false,
|
||||
}),
|
||||
actions: {
|
||||
showColumns(columnsLabel: string[]) {
|
||||
// TODO: add a parameter column type too
|
||||
this.serviceLogColumn.forEach((col: any) => {
|
||||
if (columnsLabel.includes(col.value)) {
|
||||
col.isVisible = true
|
||||
}
|
||||
})
|
||||
},
|
||||
hideColumns(columnsLabel: string[]) {
|
||||
// TODO: add a parameter column type too
|
||||
this.serviceLogColumn.forEach((col: any) => {
|
||||
|
@ -42,7 +42,7 @@ limitations under the License. -->
|
||||
content="Add selected columns"
|
||||
placement="bottom-start"
|
||||
>
|
||||
<el-button class="toggle-btn mx-3" @click="setVisbleColumn">
|
||||
<el-button class="toggle-btn mx-3" @click="showColumns">
|
||||
<Icon iconSize="sm" iconName="save" />
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
@ -53,7 +53,7 @@ limitations under the License. -->
|
||||
content="Remove selected columns"
|
||||
placement="bottom-start"
|
||||
>
|
||||
<el-button class="toggle-btn mx-3" @click="hideColumn">
|
||||
<el-button class="toggle-btn mx-3" @click="hideColumns">
|
||||
<Icon iconSize="sm" iconName="cancel" />
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
@ -341,10 +341,14 @@ function setVisbleColumn() {
|
||||
});
|
||||
console.log(cols, [...logStore.serviceLogColumn]);
|
||||
}
|
||||
function hideColumn() {
|
||||
function hideColumns() {
|
||||
logStore.hideColumns(selectedColumns.value)
|
||||
selectedColumns.value = []
|
||||
}
|
||||
function showColumns() {
|
||||
logStore.showColumns(selectedColumns.value)
|
||||
selectedColumns.value = []
|
||||
}
|
||||
async function init() {
|
||||
const resp = await logStore.getLogsByKeywords();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user