Ariel Otilibili
916aabcfd9
Reduced complexity of `PluginModel.__msg_curse_extended_process_thread()`
...
Part of #2801 . `ret` goes through these steps:
* `add_title_line`
* `add_cpu_line`
* `maybe_add_cpu_affinity_line`
* `maybe_add_ionice_line`
* `add_memory_line`
* `add_io_and_network_lines`
* `append_newlines`
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-11 12:23:41 +02:00
nicolargo
0003768bb8
url_prefix do not work in Glances < 4.2.0 #2912
2024-08-10 10:18:49 +02:00
Nicolas Hennion
69290ee405
Merge pull request #2910 from ariel-anieli/makefile
...
Refactorized `Makefile` by using pattern rules
2024-08-09 17:21:50 +02:00
Nicolas Hennion
e40aa05e8a
Merge pull request #2900 from ariel-anieli/issue-2801-catch-key
...
Reduced complexity of `_GlancesCurses.__catch_key()`
2024-08-09 17:15:53 +02:00
Ariel Otilibili
f5c2d8ce36
Used pattern for rules targetting `run-docker-*`
...
`make help` & `make run-docker-*` are unchanged:
```
$ make | grep run-docker
make run-docker-alpine-dev Start Glances Alpine Docker dev in console mode
make run-docker-alpine-full Start Glances Alpine Docker full in console mode
make run-docker-alpine-minimal Start Glances Alpine Docker minimal in console mode
make run-docker-ubuntu-dev Start Glances Ubuntu Docker dev in console mode
make run-docker-ubuntu-full Start Glances Ubuntu Docker full in console mode
make run-docker-ubuntu-minimal Start Glances Ubuntu Docker minimal in console mode
$ make run-docker-alpine-minimal -n
docker run --rm -e TZ="" -e GLANCES_OPT="" --pid host --network host -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro -v /var/run/docker.sock:/var/run/docker.sock:ro -it glances:local-alpine-minimal
$ make run-docker-alpine-full -n
docker run --rm -e TZ="" -e GLANCES_OPT="" --pid host --network host -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro -v /var/run/docker.sock:/var/run/docker.sock:ro -it glances:local-alpine-full
$ make run-docker-alpine-dev -n
docker run --rm -e TZ="" -e GLANCES_OPT="" --pid host --network host -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro -v /var/run/docker.sock:/var/run/docker.sock:ro -it glances:local-alpine-dev
$ make run-docker-ubuntu-dev -n
docker run --rm -e TZ="" -e GLANCES_OPT="" --pid host --network host -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro -v /var/run/docker.sock:/var/run/docker.sock:ro -it glances:local-ubuntu-dev
$ make run-docker-ubuntu-full -n
docker run --rm -e TZ="" -e GLANCES_OPT="" --pid host --network host -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro -v /var/run/docker.sock:/var/run/docker.sock:ro -it glances:local-ubuntu-full
$ make run-docker-ubuntu-minimal -n
docker run --rm -e TZ="" -e GLANCES_OPT="" --pid host --network host -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro -v /var/run/docker.sock:/var/run/docker.sock:ro -it glances:local-ubuntu-minimal
```
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-08 12:28:58 +02:00
Ariel Otilibili
516c99e496
Used pattern for rules targetting `docker-*`
...
`make help` & `make docker-*` are unchanged:
```
$ make | grep -P '\sdocker-'
make docker-alpine Generate local docker images (Alpine)
make docker-alpine-dev Generate local docker image (Alpine dev)
make docker-alpine-full Generate local docker image (Alpine full)
make docker-alpine-minimal Generate local docker image (Alpine minimal)
make docker-ubuntu Generate local docker images (Ubuntu)
make docker-ubuntu-dev Generate local docker image (Ubuntu dev)
make docker-ubuntu-full Generate local docker image (Ubuntu full)
make docker-ubuntu-minimal Generate local docker image (Ubuntu minimal)
$ make docker-alpine -n
docker buildx build --target full -f docker-files/alpine.Dockerfile -t glances:local-alpine-full .
docker buildx build --target minimal -f docker-files/alpine.Dockerfile -t glances:local-alpine-minimal .
docker buildx build --target dev -f docker-files/alpine.Dockerfile -t glances:local-alpine-dev .
$ make docker-ubuntu -n
docker buildx build --target full -f docker-files/ubuntu.Dockerfile -t glances:local-ubuntu-full .
docker buildx build --target minimal -f docker-files/ubuntu.Dockerfile -t glances:local-ubuntu-minimal .
docker buildx build --target dev -f docker-files/ubuntu.Dockerfile -t glances:local-ubuntu-dev .
```
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-08 12:28:58 +02:00
Ariel Otilibili
1fef2594d2
Used pattern for rules targetting `test-*`
...
`make help` & `make test-*` are unchanged:
```
$ make | grep test
make test Run unit tests
make test-core Run core unit tests
make test-min Run core unit tests in minimal environment
make test-min-with-upgrade Upgrade deps and run unit tests in minimal environment
make test-restful Run Restful unit tests
make test-with-upgrade Upgrade deps and run unit tests
make test-xmlrpc Run XMLRPC unit tests
$ make test -n
venv/bin/python unittest-core.py
venv/bin/python unittest-restful.py
venv/bin/python unittest-xmlrpc.py
```
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-08 12:28:51 +02:00
RazCrimson
c5f06b3847
Merge pull request #2911 from nicolargo/2908-raid-plugin-breaks-with-inactive-raid0-arrays
...
fix: plugin (raid) - Show degradation only when stats are available
2024-08-08 07:58:57 +05:30
Bharath Vignesh J K
16e5bb2023
fix: plugin (raid) - Show degradation only when stats are available
...
fixes #2908
2024-08-08 07:58:17 +05:30
RazCrimson
69f4a5fe24
Merge pull request #2907 from ariel-anieli/refactorize-makefile
...
Refactorize `Makefile`
2024-08-07 18:40:39 +05:30
Ariel Otilibili
0804d06c0b
Refactorized `make flatpak`
...
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-07 07:37:48 +02:00
Ariel Otilibili
b03ea17a5f
Refactorized the rules targetting `docker-*`
...
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-07 07:37:48 +02:00
Ariel Otilibili
6910e61bde
Refactorized `make semgrep`
...
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-07 07:37:48 +02:00
Ariel Otilibili
a6fdc098b9
Refactorized the rules targetting `docs-*`
...
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-07 07:37:48 +02:00
Ariel Otilibili
313612333c
Refactorized `trace-malloc` and the rules targetting `memory-*`
...
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-07 07:37:48 +02:00
Ariel Otilibili
cad29145f1
Refactorized the rules targetting `profiling-*`
...
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-07 07:37:48 +02:00
Ariel Otilibili
4dba2f13ad
Refactorized `format`, `lint`, & `codespell` rules
...
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-07 07:37:48 +02:00
Ariel Otilibili
c171d7604e
Refactorized the rules targetting `test*`
...
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-07 07:37:48 +02:00
Ariel Otilibili
658e318fd7
Refactorized the rules targetting `venv-*`
...
Addressed `venv-full-*`, `venv-min-*`, & `venv-dev-*`.
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-07 07:37:48 +02:00
Ariel Otilibili
76cd7e63e2
Refactorized `make help`
...
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-07 07:37:48 +02:00
Ariel Otilibili
020fe7a0b2
Placed phony targets under the same rule
...
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-07 07:37:48 +02:00
Ariel Otilibili
c96c778883
Refactorized the rules targetting `run*`
...
* refactorized the rules targetting `run*`
* set up variables for subsequent refactorizations.
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-07 07:37:48 +02:00
Bharath Vignesh J K
4dd732b4d1
chg: deps - cap pysnmp-lextudio ro 6.1.* until migration to async API
...
Issue tracked at #2874
2024-08-07 07:42:44 +05:30
Bharath Vignesh J K
a7402b1e94
Revert "chg: curses - change colors for some LOG styles"
...
This reverts commit 5ef7238298
.
2024-08-07 07:33:58 +05:30
Ariel Otilibili
7c45563991
Fixed typo in API documentation
...
Found with `make codespell`.
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-06 20:47:32 +02:00
RazCrimson
99ba0d0a84
Merge pull request #2903 from nicolargo/2882-make-fields-labelled-in-green-easier-to-see
...
chg: curses - change colors for some LOG styles
2024-07-30 23:51:56 +05:30
Bharath Vignesh J K
5ef7238298
chg: curses - change colors for some LOG styles
...
fix #2882
2024-07-30 23:50:27 +05:30
Ariel Otilibili
1b199ada75
Reduced complexity of `_GlancesCurses.__catch_key()`
...
Part of #2801 . Broken down `__catch_key` in two parts:
* `catch_actions_from_hotkey`
* `catch_other_actions_maybe_return_to_browser`.
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-07-27 16:49:31 +02:00
nicolargo
e03632459b
Add VMs to unittest
2024-07-27 08:21:43 +02:00
Ariel Otilibili
98e8e32457
Reduced complexity of `unittest-core.TestGlances._common_plugin_tests()`
...
Part of #2801 . Common tests follows the flow:
* `reset_stats_history_and_views`
* `do_checks_before_update`
* add first element with `update_stats`
* `check_stats`
* `filter_stats`
* add second element `update_stats`
* `chk_hist_maybe_add_third_elem`
* `check_views`.
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-07-27 02:09:49 +02:00
nicolargo
81a529dbad
Crash when terminal is resized #2872
2024-07-26 11:30:53 +02:00
nicolargo
52a129a3e8
Migration to Alpine 3.20 and Python 3.12 for Alpine Docker
2024-07-26 11:03:38 +02:00
nicolargo
aacc12df45
Correct linter issue https://github.com/nicolargo/glances/actions/runs/10108117146/job/27953472522 - Related to PR #2891
2024-07-26 10:46:04 +02:00
nicolargo
2b30c9986f
Add VMs section (disabled by default) in the Docker glances.conf file
2024-07-26 10:20:47 +02:00
Nicolas Hennion
fbd0eee5c4
Merge pull request #2891 from ariel-anieli/issue-2801-plugin-msg-curse
...
Reduced complexity of `glances.plugins.percpu.PluginModel.msg_curse()`
2024-07-26 10:18:24 +02:00
Ariel Otilibili
6059b9ab42
Reduced complexity of `glances.plugins.percpu.PluginModel.msg_curse()`
...
Part of #2801 . Broken `msg_curse`: if no stats returns empty list, else:
1. `define_headers_from_os`
2. `maybe_build_string_msg`
3. `display_cpu_stats_per_line`
4. `manage_max_cpu_to_display`
5. Then, for CPU:
* `display_cpu_header_in_columns`
* `display_cpu_stats_in_columns`
6. Hence, `summarize_all_cpus_not_displayed`
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-07-25 00:14:48 +02:00
nicolargo
e38e2ce831
beta04
2024-07-24 15:53:30 +02:00
nicolargo
d10b4bdc71
Reformat file with Ruff
2024-07-24 15:52:04 +02:00
nicolargo
80d07615f4
Merge branch 'issue2252' into develop
2024-07-24 15:47:36 +02:00
nicolargo
81f6ec03b4
Merge branch 'develop' into issue2252
2024-07-24 15:47:12 +02:00
Nicolas Hennion
1153d18a37
Merge pull request #2884 from ariel-anieli/issue-2801-plugin-update
...
Reduced complexity of `glances.plugins.system.PluginModel.update()`
2024-07-24 15:45:31 +02:00
nicolargo
0950e407a7
Catch error when Glances stop
2024-07-24 15:31:55 +02:00
nicolargo
5ed876423f
WebUI is OK, had to manage the error when Glances stop, see Github issue #2252 for detail
2024-07-24 11:32:57 +02:00
nicolargo
9d76bfeb3e
First version of the Curses UI, miss engine name
2024-07-23 19:34:12 +02:00
Ariel Otilibili
881017e63b
Reduced complexity of `glances.plugins.system.PluginModel.update()`
...
Part of #2801 . Broke `update` in two parts:
* if `local`, stats taken from `get_stats_from_std_sys_lib`
* and readability achieved by `add_human_readable_name`
* else if `snmp`, taken from `update_stats_with_snmp`.
`get_stats_from_std_sys_lib` has two helpers:
1. `get_win_version_and_platform`.
2. `get_linux_version_and_distro`.
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-07-22 22:22:48 +02:00
nicolargo
6b036ec0ac
Refactor colors Class for Curses UI
2024-07-21 19:16:33 +02:00
RazCrimson
e086625f1a
Merge pull request #2877 from Neved4/medium-line
...
fix: Use `ncurses` dedicated functions for the separator line
2024-07-16 01:06:38 +05:30
Neveda
bfdf899615
refactor: Simplify `separator_line()` logic
2024-07-15 13:43:23 +02:00
Neveda
e1e3ca9c8a
fix: Use `self.term_window.hline()` and `curses.ACS_HLINE` for the separator line
2024-07-15 12:36:03 +02:00
Nicolas Hennion
413df02728
Merge pull request #2873 from ey-jo/fix-docs-path
...
Corrected path in docs for docker
2024-07-11 16:31:15 +02:00