Commit Graph

5823 Commits (issue2914)

Author SHA1 Message Date
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
ey-jo be83a0f735 changing path in docs for docker 2024-07-11 15:13:25 +01:00
RazCrimson 166e6df373
Merge pull request #2867 from Neved4/medium-line
Replace `U+23AF` with `U+2500` for splitlines
2024-07-11 11:29:50 +05:30
Neveda c86f01b7a1 Replace `U+23AF` with `U+2500` 2024-07-11 00:01:42 +02:00
Nicolas Hennion 363a66c263 UodateSnapcraft 2024-07-08 08:54:40 +00:00
nicolargo f603e8412c Add another connector to snap 2024-07-07 18:47:46 +02:00
nicolargo 6f7a09686c Check if server name is not null in the Glances browser - Related to #2861 2024-07-06 08:30:02 +02:00