-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Create a file tailer plugin #3071
base: develop
Are you sure you want to change the base?
Conversation
Copy from demo plugin template.
first commit of basic functionality
added disabling of tailer plugin
Add tailer
update from tail to tailer
Change to update to be my name in the author section
Fix reference to GlancesPluginTailer
Hi @benjimons thanks for the pull request. if i understand, this plugin aims at providing a log viewer (~ to the tail command line) in the Glances UI and WebUI. Debug TUIWhen i test your branch, i have the following issue when Glances is ran:
So i replace bytes2human by self.auto_unit and restart Glances. Now Glances starts but nothing is displayed nether on TUI and WEBUI. Adding the [tailer] section in th Glanes conf file do not solve the issue... After running Glances in debug mode (-d), i have the following messages:
So the plugin is not displayed because:
So i remove the max_width reference and the previous debug message disappear, but nothing was displayed in the TUI. By adding a debug message at the end of the msg_curse method, i check that the plugin works correctly (in the plugin part):
So the msg_curse message is built correctly but nothing is displayed in the TUI. When i move the tailer on top of:
The begin of the plugin is displayed (the title but not the rest of the message: Ok, after removing "NORMAL" in the curse_add_line calls, the line are displayed (on top): A last (dirty) hack in the __display_right method (in glances_curses.py) and the plugin is displayed on the bottom of the screen: Debug WebUII add the plugin in the App.vue template:
Better but not ok: For this part, the code in plugin-trailer.vue should be refactor based on what it is done in other plugin. CSS should be in the CSS file, UI should be responsive using bootstrap feature (no ..). Others...
PS: all my changed pushed on the https://github.com/nicolargo/glances/tree/benjimons-develop branch. |
Description
This pull request is to integrate a simple file tailer into to read a file and print it to screen - useful for log files.
This is my first plugin try so please be kind.
For any questions concerning installation or use, please open a discussion (https://github.com/nicolargo/glances/discussions), not an issue.
Resume