mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-14 09:00:50 +00:00
Added feature to show all and hide all
This commit is contained in:
parent
615ba79185
commit
53019058bc
@ -64,16 +64,21 @@ export const logStore = defineStore({
|
|||||||
showColumns(columnsLabel: string) {
|
showColumns(columnsLabel: string) {
|
||||||
this.serviceLogColumn.forEach((col: any) => {
|
this.serviceLogColumn.forEach((col: any) => {
|
||||||
if (columnsLabel === col.value) {
|
if (columnsLabel === col.value) {
|
||||||
col.isVisible = true
|
col.isVisible = true;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
hideColumns(columnsLabel: string) {
|
hideColumns(columnsLabel: string) {
|
||||||
this.serviceLogColumn.forEach((col: any) => {
|
this.serviceLogColumn.forEach((col: any) => {
|
||||||
if (columnsLabel === col.value) {
|
if (columnsLabel === col.value) {
|
||||||
col.isVisible = false
|
col.isVisible = false;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
},
|
||||||
|
toggleAllColumns(status: boolean) {
|
||||||
|
this.serviceLogColumn.forEach((col: any) => {
|
||||||
|
col.isVisible = status;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
setLogCondition(data: any) {
|
setLogCondition(data: any) {
|
||||||
this.conditions = { ...this.conditions, ...data };
|
this.conditions = { ...this.conditions, ...data };
|
||||||
|
@ -29,8 +29,9 @@ limitations under the License. -->
|
|||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
class="flex-h items-center justify-between"
|
class="flex-h items-center justify-between"
|
||||||
>
|
>
|
||||||
<el-checkbox :checked="showAllColumns" size="large" />
|
<!-- <el-checkbox v-model="showAllColumns" size="large"> -->
|
||||||
<span style="margin-right: 10px">Show All</span>
|
<span style="margin-right: 10px">Show All</span>
|
||||||
|
<!-- </el-checkbox> -->
|
||||||
</div>
|
</div>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
@ -623,6 +624,12 @@ watch(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
watch(
|
||||||
|
() => showAllColumns.value,
|
||||||
|
(newVal, oldVal) => {
|
||||||
|
console.log("New:", newVal, "Old:", oldVal)
|
||||||
|
logStore.toggleAllColumns(newVal)
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.dropdownSelector {
|
.dropdownSelector {
|
||||||
|
Loading…
Reference in New Issue
Block a user