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,
|
loadLogs: false,
|
||||||
}),
|
}),
|
||||||
actions: {
|
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[]) {
|
hideColumns(columnsLabel: string[]) {
|
||||||
// TODO: add a parameter column type too
|
// TODO: add a parameter column type too
|
||||||
this.serviceLogColumn.forEach((col: any) => {
|
this.serviceLogColumn.forEach((col: any) => {
|
||||||
|
@ -42,7 +42,7 @@ limitations under the License. -->
|
|||||||
content="Add selected columns"
|
content="Add selected columns"
|
||||||
placement="bottom-start"
|
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" />
|
<Icon iconSize="sm" iconName="save" />
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
@ -53,7 +53,7 @@ limitations under the License. -->
|
|||||||
content="Remove selected columns"
|
content="Remove selected columns"
|
||||||
placement="bottom-start"
|
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" />
|
<Icon iconSize="sm" iconName="cancel" />
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
@ -341,10 +341,14 @@ function setVisbleColumn() {
|
|||||||
});
|
});
|
||||||
console.log(cols, [...logStore.serviceLogColumn]);
|
console.log(cols, [...logStore.serviceLogColumn]);
|
||||||
}
|
}
|
||||||
function hideColumn() {
|
function hideColumns() {
|
||||||
logStore.hideColumns(selectedColumns.value)
|
logStore.hideColumns(selectedColumns.value)
|
||||||
selectedColumns.value = []
|
selectedColumns.value = []
|
||||||
}
|
}
|
||||||
|
function showColumns() {
|
||||||
|
logStore.showColumns(selectedColumns.value)
|
||||||
|
selectedColumns.value = []
|
||||||
|
}
|
||||||
async function init() {
|
async function init() {
|
||||||
const resp = await logStore.getLogsByKeywords();
|
const resp = await logStore.getLogsByKeywords();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user