qBittorrent icon indicating copy to clipboard operation
qBittorrent copied to clipboard

WebUI: Add log viewer

Open ttys3 opened this issue 2 years ago • 2 comments

  1. show / hide the Logs tab:

image

  1. show logs

image

  1. filter logs by level

image

image

  1. filter logs by keywords

image

ttys3 avatar Dec 09 '22 14:12 ttys3

Works great 👍

thalieht avatar Dec 09 '22 17:12 thalieht

the CI complains about the style.

I ran npm run format and pushed the change

PTAL

ttys3 avatar Dec 10 '22 16:12 ttys3

@brvphoenix thank you for the detailed review I will push the changes late in this week, mostly in the weekend.

ttys3 avatar Dec 13 '22 17:12 ttys3

right click context menu has been added according @brvphoenix 's suggestion:

image

ttys3 avatar Dec 18 '22 14:12 ttys3

@ttys3 I have improved your implementation by adding some extra features, fixing some found bugs and cleanup the code. After some testing, I will squash all the commits and push it to my forks. The commit will author with you and co-author with me.

Because there are so many revisions, I can't add all the comments here. I don't know whether you mind I make another pull request to replace this one. Or you can modify your pr based on my commit.

brvphoenix avatar Dec 20 '22 07:12 brvphoenix

@brvphoenix as long as it is good for the project, I am OK with that. you can make another PR.

ttys3 avatar Dec 20 '22 14:12 ttys3

@brvphoenix as long as it is good for the project, I am OK with that. you can make another PR.

Thank you. You can test it with my fork. I add the baned ip log and add selectlist implementation from 3rd-part (MIT LICENSE). It works as I expect now. https://github.com/brvphoenix/qBittorrent/commits/new_log_view

brvphoenix avatar Dec 20 '22 15:12 brvphoenix

LGTM

one NIT:

my bad, the var name should refined: urls => messages

in

        new ClipboardJS('.copyLogDataToClipboard', {
            text: function() {
                let urls = [];
                currentTable.selectedRowsIds().each(function(rowId) {
                    urls.push(currentTable.rows.get(rowId).full_data[(currentSelectedTab === "main") ? 'message' : 'ip']);
                });

                return urls.join('\n');
            }
        });

@brvphoenix

ttys3 avatar Dec 20 '22 19:12 ttys3

as discussed https://github.com/qbittorrent/qBittorrent/pull/18189#issuecomment-1359452845

a new PR will replace this one, see : https://github.com/qbittorrent/qBittorrent/pull/18290

ttys3 avatar Dec 26 '22 02:12 ttys3