From fc1eefa5951ffdc46a69e43f054152003b4ad50c Mon Sep 17 00:00:00 2001 From: codefly67 Date: Wed, 3 Jan 2024 16:07:09 +0800 Subject: [PATCH 1/4] Fix the issue of real-time page skipping in Inspector Pro --- frontend/src/store/event.js | 6 +++++- frontend/src/views/event/EventList.vue | 3 ++- lyrebird/version.py | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/frontend/src/store/event.js b/frontend/src/store/event.js index e81bf817a..8a2637d4f 100644 --- a/frontend/src/store/event.js +++ b/frontend/src/store/event.js @@ -15,7 +15,8 @@ export default { eventFilePath: '', eventFileSizeThreshold: '', eventFileSize: '', - eventFileOversized: false + eventFileOversized: false, + paginationIndex: 0 }, mutations: { setChannelNames (state, channelNames) { @@ -53,6 +54,9 @@ export default { }, setEventFileOversized (state, val) { state.eventFileOversized = val + }, + setPaginationIndex (state, val) { + state.paginationIndex = val } }, actions: { diff --git a/frontend/src/views/event/EventList.vue b/frontend/src/views/event/EventList.vue index 982008fea..bce4c78a5 100644 --- a/frontend/src/views/event/EventList.vue +++ b/frontend/src/views/event/EventList.vue @@ -161,7 +161,7 @@ export default { }, methods: { reload () { - this.$store.dispatch('loadEvents') + this.$store.dispatch('loadEvents', { page: this.$store.state.event.paginationIndex }) }, content2Obj (content) { return JSON.parse(content) @@ -195,6 +195,7 @@ export default { this.$store.commit('setSelectedEventId', null) this.$store.commit('setEventDetail', '') this.$store.dispatch('loadEvents', { page: page - 1 }) + this.$store.commit('setPaginationIndex', page - 1) }, onAddEvent (row) { const eventObj = JSON.parse(row.content) diff --git a/lyrebird/version.py b/lyrebird/version.py index 51c9a428d..979136f0b 100644 --- a/lyrebird/version.py +++ b/lyrebird/version.py @@ -1,3 +1,3 @@ -IVERSION = (2, 23, 3) +IVERSION = (2, 23, 4) VERSION = ".".join(str(i) for i in IVERSION) LYREBIRD = "Lyrebird " + VERSION From f92fedc2e6354a3e6bf7490183ab2cbcc74447c5 Mon Sep 17 00:00:00 2001 From: codefly67 Date: Fri, 5 Jan 2024 19:42:41 +0800 Subject: [PATCH 2/4] Optimize the use of Inspector Pro channel filter boxes --- frontend/src/views/event/EventList.vue | 96 ++++++++++++++++++++++++-- 1 file changed, 92 insertions(+), 4 deletions(-) diff --git a/frontend/src/views/event/EventList.vue b/frontend/src/views/event/EventList.vue index bce4c78a5..34cce951a 100644 --- a/frontend/src/views/event/EventList.vue +++ b/frontend/src/views/event/EventList.vue @@ -90,6 +90,7 @@ export default { contextMenuLeft: 0, contextMenuTop: 0, refreshEventListTimer: null, + showPoptip: false, } }, computed: { @@ -124,10 +125,88 @@ 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, params) => { + return h('div', [ + 'Channel', + h('Poptip', { + props: { + placement: 'bottom', + value: this.showPoptip + }, + on: { + 'on-popper-show': () => { + }, + input: (value) => { + this.showPoptip = value; + } + }, + }, [ + h('Button', { + props: { + shape: 'circle', + type: 'text', + size: 'small', + icon: 'ios-funnel', + }, + style: { + width: '12px', + height: '12px', + 'font-size': '10px', + 'margin-bottom': '5px', + 'margin-left': '2px' + } + }), + 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' + }, + style: { + marginRight: '10px' + }, + on: { + click: () => { + this.showPoptip = false; + this.$store.dispatch('updateChannelFilters', this.$store.state.event.channelFilters) + } + } + }, 'Confirm'), + h('Button', { + props: { + type: 'text', + size: 'small' + }, + on: { + click: () => { + this.$store.dispatch('updateChannelFilters', []) + } + } + }, 'Reset') + ]) + ]) + ]) + ]) } }, { @@ -293,4 +372,13 @@ export default { .row-contextmenu { position: absolute; } +.ivu-btn:focus { + outline: none !important; + border-color: transparent !important; +} +/* .ivu-btn-circle.ivu-btn-icon-onlys.ivu-btn-small { + width: 20px !important; + height: 20px; + font-size: 12px +} */ From ce2fd2262619a23d9af17952d2f4356e2f18c6b4 Mon Sep 17 00:00:00 2001 From: codefly67 Date: Mon, 8 Jan 2024 16:04:00 +0800 Subject: [PATCH 3/4] fine adjustment of channel filter box --- frontend/src/views/event/EventList.vue | 50 ++++++++++---------------- 1 file changed, 18 insertions(+), 32 deletions(-) diff --git a/frontend/src/views/event/EventList.vue b/frontend/src/views/event/EventList.vue index 34cce951a..5e63fa2ca 100644 --- a/frontend/src/views/event/EventList.vue +++ b/frontend/src/views/event/EventList.vue @@ -134,12 +134,8 @@ export default { value: this.showPoptip }, on: { - 'on-popper-show': () => { - }, - input: (value) => { - this.showPoptip = value; + input: (value) => { this.showPoptip = value } } - }, }, [ h('Button', { props: { @@ -148,20 +144,18 @@ export default { size: 'small', icon: 'ios-funnel', }, + class: 'no-shadow', style: { - width: '12px', - height: '12px', - 'font-size': '10px', - 'margin-bottom': '5px', - 'margin-left': '2px' + 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 - }, + props: { value: this.$store.state.event.channelFilters }, on: { 'on-change': (value) => { this.$store.commit('setChannelFilters', value) @@ -170,9 +164,7 @@ export default { }, this.channelNames.map(channelName => { return h('div', [ h('Checkbox', { - props: { - label: channelName - } + props: { label: channelName } }, channelName) ]) })), @@ -182,15 +174,13 @@ export default { type: 'text', size: 'small' }, - style: { - marginRight: '10px' - }, on: { click: () => { this.showPoptip = false; this.$store.dispatch('updateChannelFilters', this.$store.state.event.channelFilters) } - } + }, + style: { margin: '0px 9px 2px 2px' } }, 'Confirm'), h('Button', { props: { @@ -198,10 +188,9 @@ export default { size: 'small' }, on: { - click: () => { - this.$store.dispatch('updateChannelFilters', []) - } - } + click: () => { this.$store.dispatch('updateChannelFilters', []) } + }, + style: { marginBottom: '2px' } }, 'Reset') ]) ]) @@ -372,13 +361,10 @@ export default { .row-contextmenu { position: absolute; } -.ivu-btn:focus { - outline: none !important; - border-color: transparent !important; +.no-shadow:focus { + box-shadow: none !important; +} +.ivu-poptip-body { + padding: 5px 16px; } -/* .ivu-btn-circle.ivu-btn-icon-onlys.ivu-btn-small { - width: 20px !important; - height: 20px; - font-size: 12px -} */ From cf075eb52b03010ee6f8d6b9201680f28aec93cb Mon Sep 17 00:00:00 2001 From: codefly67 Date: Mon, 8 Jan 2024 16:15:24 +0800 Subject: [PATCH 4/4] remove-useless-parameter --- frontend/src/views/event/EventList.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/views/event/EventList.vue b/frontend/src/views/event/EventList.vue index 5e63fa2ca..13dcd1a7c 100644 --- a/frontend/src/views/event/EventList.vue +++ b/frontend/src/views/event/EventList.vue @@ -125,7 +125,7 @@ export default { key: 'channel', slot: 'channel', width: 80, - renderHeader: (h, params) => { + renderHeader: (h) => { return h('div', [ 'Channel', h('Poptip', {