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

Create a file tailer plugin #3071

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
Open

Conversation

benjimons
Copy link

@benjimons benjimons commented Dec 31, 2024

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

  • Bug fix: no
  • New feature: yes
  • Fixed tickets: comma-separated list of tickets fixed by the PR, if any

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
@nicolargo
Copy link
Owner

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 TUI

When i test your branch, i have the following issue when Glances is ran:

2025-01-04 13:30:49,937 -- CRITICAL -- Error while initializing the tailer plugin (cannot import name 'bytes2human' from 'glances.globals' (/home/nicolargo/dev/glances/glances/globals.py))
2025-01-04 13:30:49,939 -- ERROR -- Traceback (most recent call last):
  File "/home/nicolargo/dev/glances/glances/stats.py", line 100, in _load_plugin
    plugin = import_module('glances.plugins.' + plugin_path)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/home/nicolargo/dev/glances/glances/plugins/tailer/__init__.py", line 24, in <module>
    from glances.globals import bytes2human
ImportError: cannot import name 'bytes2human' from 'glances.globals' (/home/nicolargo/dev/glances/glances/globals.py)

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:

2025-01-04 13:50:24,368 -- DEBUG -- Init tailer plugin
2025-01-04 13:50:24,368 -- DEBUG -- Stats history activated for plugin tailer (items: [])
2025-01-04 13:50:24,368 -- DEBUG -- Load section tailer in Glances configuration file
2025-01-04 13:50:24,368 -- DEBUG -- Load limit: tailer_disable = ['False']
2025-01-04 13:50:24,368 -- DEBUG -- Load limit: tailer_filename = ['/var/log/syslog']
2025-01-04 13:50:24,368 -- DEBUG -- Load limit: tailer_lines = 10.0
2025-01-04 13:50:24,371 -- DEBUG -- PluginModel glances.plugins.tailer update return [{'key': 'filename', 'filename': '/var/log/syslog', 'file_size': 913775, 'last_modified': '2025-01-04 13:50:13', 'line_count': 4608, 'last_lines': ['2025-01-04T13:49:12.945931+01:00 nicolargo-xps15 firefox[3448604]: Not loading module "atk-bridge": The functionality is provided by GTK natively. Please try to not load it.', '2025-01-04T13:49:14.383548+01:00 nicolargo-xps15 rtkit-daemon[3164]: Supervising 1 threads of 1 processes of 1 users.', '2025-01-04T13:49:29.790341+01:00 nicolargo-xps15 kernel: audit: type=1107 audit(1735994969.789:84043): pid=2109 uid=101 auid=4294967295 ses=4294967295 subj=unconfined msg=\'apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/NetworkManager" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.274" pid=5518 label="snap.firefox.firefox" peer_pid=40177 peer_label="unconfined"', '2025-01-04T13:49:29.790368+01:00 nicolargo-xps15 kernel:  exe="/usr/bin/dbus-daemon" sauid=101 hostname=? addr=? terminal=?\'', '2025-01-04T13:49:14.383801+01:00 nicolargo-xps15 rtkit-daemon[3164]: Supervising 1 threads of 1 processes of 1 users.', '2025-01-04T13:50:07.718784+01:00 nicolargo-xps15 systemd[1]: Starting sysstat-collect.service - system activity accounting tool...', '2025-01-04T13:50:07.729841+01:00 nicolargo-xps15 systemd[1]: sysstat-collect.service: Deactivated successfully.', '2025-01-04T13:50:07.730041+01:00 nicolargo-xps15 systemd[1]: Finished sysstat-collect.service - system activity accounting tool.', '2025-01-04T13:50:08.453131+01:00 nicolargo-xps15 snmpd[3035]: systemstats_linux: unexpected header length in /proc/net/snmp. 237 != 224', '2025-01-04T13:50:13.782466+01:00 nicolargo-xps15 rtkit-daemon[3164]: Supervising 1 threads of 1 processes of 1 users.']}] in 0.002187 seconds
2025-01-04 13:50:24,371 -- DEBUG -- Plugin tailer started in 0.002955 seconds
2025-01-04 13:50:24,386 -- DEBUG -- Active plugins list: ['alert', 'ports', 'diskio', 'containers', 'processcount', 'programlist', 'gpu', 'percpu', 'system', 'network', 'cpu', 'amps', 'processlist', 'load', 'sensors', 'uptime', 'now', 'fs', 'wifi', 'ip', 'tailer', 'help', 'version', 'psutilversion', 'core', 'mem', 'folders', 'quicklook', 'memswap']
2025-01-04 13:50:24,734 -- DEBUG -- No max_width defined for the tailer plugin, it will not be displayed.
2025-01-04 13:50:26,856 -- DEBUG -- PluginModel glances.plugins.tailer update return [{'key': 'filename', 'filename': '/var/log/syslog', 'file_size': 913775, 'last_modified': '2025-01-04 13:50:13', 'line_count': 4608, 'last_lines': ['2025-01-04T13:49:12.945931+01:00 nicolargo-xps15 firefox[3448604]: Not loading module "atk-bridge": The functionality is provided by GTK natively. Please try to not load it.', '2025-01-04T13:49:14.383548+01:00 nicolargo-xps15 rtkit-daemon[3164]: Supervising 1 threads of 1 processes of 1 users.', '2025-01-04T13:49:29.790341+01:00 nicolargo-xps15 kernel: audit: type=1107 audit(1735994969.789:84043): pid=2109 uid=101 auid=4294967295 ses=4294967295 subj=unconfined msg=\'apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/NetworkManager" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.274" pid=5518 label="snap.firefox.firefox" peer_pid=40177 peer_label="unconfined"', '2025-01-04T13:49:29.790368+01:00 nicolargo-xps15 kernel:  exe="/usr/bin/dbus-daemon" sauid=101 hostname=? addr=? terminal=?\'', '2025-01-04T13:49:14.383801+01:00 nicolargo-xps15 rtkit-daemon[3164]: Supervising 1 threads of 1 processes of 1 users.', '2025-01-04T13:50:07.718784+01:00 nicolargo-xps15 systemd[1]: Starting sysstat-collect.service - system activity accounting tool...', '2025-01-04T13:50:07.729841+01:00 nicolargo-xps15 systemd[1]: sysstat-collect.service: Deactivated successfully.', '2025-01-04T13:50:07.730041+01:00 nicolargo-xps15 systemd[1]: Finished sysstat-collect.service - system activity accounting tool.', '2025-01-04T13:50:08.453131+01:00 nicolargo-xps15 snmpd[3035]: systemstats_linux: unexpected header length in /proc/net/snmp. 237 != 224', '2025-01-04T13:50:13.782466+01:00 nicolargo-xps15 rtkit-daemon[3164]: Supervising 1 threads of 1 processes of 1 users.']}] in 0.002209 seconds
2025-01-04 13:50:26,914 -- DEBUG -- No max_width defined for the tailer plugin, it will not be displayed.
2025-01-04 13:50:28,890 -- DEBUG -- No max_width defined for the tailer plugin, it will not be displayed.
2025-01-04 13:50:31,285 -- DEBUG -- PluginModel glances.plugins.tailer update return [{'key': 'filename', 'filename': '/var/log/syslog', 'file_size': 914335, 'last_modified': '2025-01-04 13:50:30', 'line_count': 4610, 'last_lines': ['2025-01-04T13:49:29.790341+01:00 nicolargo-xps15 kernel: audit: type=1107 audit(1735994969.789:84043): pid=2109 uid=101 auid=4294967295 ses=4294967295 subj=unconfined msg=\'apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/NetworkManager" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.274" pid=5518 label="snap.firefox.firefox" peer_pid=40177 peer_label="unconfined"', '2025-01-04T13:49:29.790368+01:00 nicolargo-xps15 kernel:  exe="/usr/bin/dbus-daemon" sauid=101 hostname=? addr=? terminal=?\'', '2025-01-04T13:49:14.383801+01:00 nicolargo-xps15 rtkit-daemon[3164]: Supervising 1 threads of 1 processes of 1 users.', '2025-01-04T13:50:07.718784+01:00 nicolargo-xps15 systemd[1]: Starting sysstat-collect.service - system activity accounting tool...', '2025-01-04T13:50:07.729841+01:00 nicolargo-xps15 systemd[1]: sysstat-collect.service: Deactivated successfully.', '2025-01-04T13:50:07.730041+01:00 nicolargo-xps15 systemd[1]: Finished sysstat-collect.service - system activity accounting tool.', '2025-01-04T13:50:08.453131+01:00 nicolargo-xps15 snmpd[3035]: systemstats_linux: unexpected header length in /proc/net/snmp. 237 != 224', '2025-01-04T13:50:13.782466+01:00 nicolargo-xps15 rtkit-daemon[3164]: Supervising 1 threads of 1 processes of 1 users.', '2025-01-04T13:50:30.196359+01:00 nicolargo-xps15 kernel: audit: type=1107 audit(1735995030.195:84044): pid=2109 uid=101 auid=4294967295 ses=4294967295 subj=unconfined msg=\'apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/NetworkManager" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.274" pid=5518 label="snap.firefox.firefox" peer_pid=40177 peer_label="unconfined"', '2025-01-04T13:50:30.196380+01:00 nicolargo-xps15 kernel:  exe="/usr/bin/dbus-daemon" sauid=101 hostname=? addr=? terminal=?\'']}] in 0.002203 seconds
2025-01-04 13:50:31,324 -- DEBUG -- No max_width defined for the tailer plugin, it will not be displayed.
2025-01-04 13:50:33,181 -- DEBUG -- No max_width defined for the tailer plugin, it will not be displayed.
2025-01-04 13:50:33,185 -- DEBUG -- Stop the tailer plugin

So the plugin is not displayed because:

2025-01-04 13:50:24,734 -- DEBUG -- No max_width defined for the tailer plugin, it will not be displayed.

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):

2025-01-04 14:17:59,121 -- INFO -- [{'msg': 'FILE TAILER PLUGIN', 'decoration': 'TITLE', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '\n', 'decoration': 'DEFAULT', 'optional': False, 'additional': False, 'splittable': False}, {'msg': 'File: /var/log/syslog', 'decoration': 'NORMAL', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '\n', 'decoration': 'DEFAULT', 'optional': False, 'additional': False, 'splittable': False}, {'msg': 'Size: 975K, Last Modified: 2025-01-04 14:17:55, Total Lines: 5124', 'decoration': 'NORMAL', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '\n', 'decoration': 'DEFAULT', 'optional': False, 'additional': False, 'splittable': False}, {'msg': 'Last lines:', 'decoration': 'NORMAL', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '\n', 'decoration': 'DEFAULT', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '  2025-01-04T14:17:27.352122+01:00 nicolargo-xps15 gnome-shell[4343]: DING: DesktopGrid/<@/usr/share/gnome-shell/extensions/[email protected]/app/desktopGrid.js:138:34', 'decoration': 'NORMAL', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '\n', 'decoration': 'DEFAULT', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '  2025-01-04T14:17:27.352166+01:00 nicolargo-xps15 gnome-shell[4343]: DING: @/usr/share/gnome-shell/extensions/[email protected]/app/ding.js:206:13', 'decoration': 'NORMAL', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '\n', 'decoration': 'DEFAULT', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '  2025-01-04T14:17:33.508640+01:00 nicolargo-xps15 rtkit-daemon[3164]: Supervising 1 threads of 1 processes of 1 users.', 'decoration': 'NORMAL', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '\n', 'decoration': 'DEFAULT', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '  2025-01-04T14:17:37.411421+01:00 nicolargo-xps15 kernel: audit: type=1107 audit(1735996657.409:84076): pid=2109 uid=101 auid=4294967295 ses=4294967295 subj=unconfined msg=\'apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/NetworkManager" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.274" pid=5518 label="snap.firefox.firefox" peer_pid=40177 peer_label="unconfined"', 'decoration': 'NORMAL', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '\n', 'decoration': 'DEFAULT', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '  2025-01-04T14:17:37.411451+01:00 nicolargo-xps15 kernel:  exe="/usr/bin/dbus-daemon" sauid=101 hostname=? addr=? terminal=?\'', 'decoration': 'NORMAL', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '\n', 'decoration': 'DEFAULT', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '  2025-01-04T14:17:33.508977+01:00 nicolargo-xps15 rtkit-daemon[3164]: Supervising 1 threads of 1 processes of 1 users.', 'decoration': 'NORMAL', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '\n', 'decoration': 'DEFAULT', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '  2025-01-04T14:17:55.973410+01:00 nicolargo-xps15 gnome-shell[4343]: DING: (gjs:3457745): Gjs-CRITICAL **: 14:17:55.971: JS ERROR: TypeError: selected is undefined', 'decoration': 'NORMAL', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '\n', 'decoration': 'DEFAULT', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '  2025-01-04T14:17:55.973612+01:00 nicolargo-xps15 gnome-shell[4343]: DING: onKeyRelease@/usr/share/gnome-shell/extensions/[email protected]/app/desktopManager.js:794:39', 'decoration': 'NORMAL', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '\n', 'decoration': 'DEFAULT', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '  2025-01-04T14:17:55.973653+01:00 nicolargo-xps15 gnome-shell[4343]: DING: DesktopGrid/<@/usr/share/gnome-shell/extensions/[email protected]/app/desktopGrid.js:138:34', 'decoration': 'NORMAL', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '\n', 'decoration': 'DEFAULT', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '  2025-01-04T14:17:55.973716+01:00 nicolargo-xps15 gnome-shell[4343]: DING: @/usr/share/gnome-shell/extensions/[email protected]/app/ding.js:206:13', 'decoration': 'NORMAL', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '\n', 'decoration': 'DEFAULT', 'optional': False, 'additional': False, 'splittable': False}]
2025-01-04 14:18:01,298 -- INFO -- [{'msg': 'FILE TAILER PLUGIN', 'decoration': 'TITLE', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '\n', 'decoration': 'DEFAULT', 'optional': False, 'additional': False, 'splittable': False}, {'msg': 'File: /var/log/syslog', 'decoration': 'NORMAL', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '\n', 'decoration': 'DEFAULT', 'optional': False, 'additional': False, 'splittable': False}, {'msg': 'Size: 975K, Last Modified: 2025-01-04 14:17:55, Total Lines: 5124', 'decoration': 'NORMAL', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '\n', 'decoration': 'DEFAULT', 'optional': False, 'additional': False, 'splittable': False}, {'msg': 'Last lines:', 'decoration': 'NORMAL', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '\n', 'decoration': 'DEFAULT', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '  2025-01-04T14:17:27.352122+01:00 nicolargo-xps15 gnome-shell[4343]: DING: DesktopGrid/<@/usr/share/gnome-shell/extensions/[email protected]/app/desktopGrid.js:138:34', 'decoration': 'NORMAL', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '\n', 'decoration': 'DEFAULT', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '  2025-01-04T14:17:27.352166+01:00 nicolargo-xps15 gnome-shell[4343]: DING: @/usr/share/gnome-shell/extensions/[email protected]/app/ding.js:206:13', 'decoration': 'NORMAL', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '\n', 'decoration': 'DEFAULT', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '  2025-01-04T14:17:33.508640+01:00 nicolargo-xps15 rtkit-daemon[3164]: Supervising 1 threads of 1 processes of 1 users.', 'decoration': 'NORMAL', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '\n', 'decoration': 'DEFAULT', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '  2025-01-04T14:17:37.411421+01:00 nicolargo-xps15 kernel: audit: type=1107 audit(1735996657.409:84076): pid=2109 uid=101 auid=4294967295 ses=4294967295 subj=unconfined msg=\'apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/NetworkManager" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.274" pid=5518 label="snap.firefox.firefox" peer_pid=40177 peer_label="unconfined"', 'decoration': 'NORMAL', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '\n', 'decoration': 'DEFAULT', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '  2025-01-04T14:17:37.411451+01:00 nicolargo-xps15 kernel:  exe="/usr/bin/dbus-daemon" sauid=101 hostname=? addr=? terminal=?\'', 'decoration': 'NORMAL', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '\n', 'decoration': 'DEFAULT', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '  2025-01-04T14:17:33.508977+01:00 nicolargo-xps15 rtkit-daemon[3164]: Supervising 1 threads of 1 processes of 1 users.', 'decoration': 'NORMAL', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '\n', 'decoration': 'DEFAULT', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '  2025-01-04T14:17:55.973410+01:00 nicolargo-xps15 gnome-shell[4343]: DING: (gjs:3457745): Gjs-CRITICAL **: 14:17:55.971: JS ERROR: TypeError: selected is undefined', 'decoration': 'NORMAL', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '\n', 'decoration': 'DEFAULT', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '  2025-01-04T14:17:55.973612+01:00 nicolargo-xps15 gnome-shell[4343]: DING: onKeyRelease@/usr/share/gnome-shell/extensions/[email protected]/app/desktopManager.js:794:39', 'decoration': 'NORMAL', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '\n', 'decoration': 'DEFAULT', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '  2025-01-04T14:17:55.973653+01:00 nicolargo-xps15 gnome-shell[4343]: DING: DesktopGrid/<@/usr/share/gnome-shell/extensions/[email protected]/app/desktopGrid.js:138:34', 'decoration': 'NORMAL', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '\n', 'decoration': 'DEFAULT', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '  2025-01-04T14:17:55.973716+01:00 nicolargo-xps15 gnome-shell[4343]: DING: @/usr/share/gnome-shell/extensions/[email protected]/app/ding.js:206:13', 'decoration': 'NORMAL', 'optional': False, 'additional': False, 'splittable': False}, {'msg': '\n', 'decoration': 'DEFAULT', 'optional': False, 'additional': False, 'splittable': False}]

So the msg_curse message is built correctly but nothing is displayed in the TUI.

When i move the tailer on top of:

    def _right_sidebar(self):
        return [
            'tailer',
            'vms',
            'containers',
            'processcount',
            'amps',
            'programlist' if self.args.programs else 'processlist',
            'alert',
        ]

The begin of the plugin is displayed (the title but not the rest of the message:

image

Ok, after removing "NORMAL" in the curse_add_line calls, the line are displayed (on top):

image

A last (dirty) hack in the __display_right method (in glances_curses.py) and the plugin is displayed on the bottom of the screen:

image

Debug WebUI

I add the plugin in the App.vue template:

                <div class="col" :class="{ 'sidebar-min': !args.percpu, 'sidebar-max': args.percpu }">
                    <glances-plugin-vms v-if="!args.disable_vms" :data="data"></glances-plugin-vms>
                    <glances-plugin-containers v-if="!args.disable_containers" :data="data"></glances-plugin-containers>
                    <glances-plugin-process :data="data"></glances-plugin-process>
                    <glances-plugin-alert v-if="!args.disable_alert" :data="data"></glances-plugin-alert>
                    <glances-plugin-tailer v-if="!args.disable_tailer" :data="data"></glances-plugin-tailer>
                </div>

Better but not ok:

image

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...

  • The plugin code should be optimize to be usable with huge log file without any impact on the Glances performance.
  • The plugin code should be compliant with Windows OS.
  • Configuration of the file size threshold should be done through the configuration file (not statically define to 1GB)
  • In the TUI, space is precious... PLease optimize the first 4 lines (TITLE, File name, File size, Last line header) to two or one line
  • In the WebUI refactor plugin-trailer.vue to work and be responsive
  • The plugin should be disable by default in the glances.conf file (for the moment, on the dev branch, il let it enable by default)

PS: all my changed pushed on the https://github.com/nicolargo/glances/tree/benjimons-develop branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants