Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/optimize inspector pro filter #819

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 78 additions & 4 deletions frontend/src/views/event/EventList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export default {
contextMenuLeft: 0,
contextMenuTop: 0,
refreshEventListTimer: null,
showPoptip: false,
}
},
computed: {
Expand Down Expand Up @@ -124,10 +125,77 @@ export default {
key: 'channel',
slot: 'channel',
width: 80,
filters: filters,
filteredValue: this.$store.state.event.channelFilters,
filterRemote (value) {
this.$store.dispatch('updateChannelFilters', value)
renderHeader: (h) => {
return h('div', [
'Channel',
h('Poptip', {
props: {
placement: 'bottom',
value: this.showPoptip
},
on: {
input: (value) => { this.showPoptip = value }
}
}, [
h('Button', {
props: {
shape: 'circle',
type: 'text',
size: 'small',
icon: 'ios-funnel',
},
class: 'no-shadow',
style: {
width: '13px',
height: '13px',
'font-size': '11px',
margin: '0px 0px 5px 3px'
}
}),
h('template', { slot: 'content' }, [
h('div', [
h('CheckboxGroup', {
props: { value: this.$store.state.event.channelFilters },
on: {
'on-change': (value) => {
this.$store.commit('setChannelFilters', value)
}
}
}, this.channelNames.map(channelName => {
return h('div', [
h('Checkbox', {
props: { label: channelName }
}, channelName)
])
})),
h('div', { style: { borderTop: '1px solid #ccc', margin: '5px 0' } }),
h('Button', {
props: {
type: 'text',
size: 'small'
},
on: {
click: () => {
this.showPoptip = false;
this.$store.dispatch('updateChannelFilters', this.$store.state.event.channelFilters)
}
},
style: { margin: '0px 9px 2px 2px' }
}, 'Confirm'),
h('Button', {
props: {
type: 'text',
size: 'small'
},
on: {
click: () => { this.$store.dispatch('updateChannelFilters', []) }
},
style: { marginBottom: '2px' }
}, 'Reset')
])
])
])
])
}
},
{
Expand Down Expand Up @@ -293,4 +361,10 @@ export default {
.row-contextmenu {
position: absolute;
}
.no-shadow:focus {
box-shadow: none !important;
}
.ivu-poptip-body {
padding: 5px 16px;
}
</style>
Loading