renovate[bot]
7d751bc160
chore(deps): update dependency css-loader to v6.11.0
2024-09-14 09:04:27 +00:00
nicolargo
75fdc8f46e
Remove test
2024-09-14 09:54:10 +02:00
nicolargo
10c98f6fda
Merge branch 'issue2939' into develop
2024-09-14 09:53:09 +02:00
nicolargo
7d3904e89f
The Web interface ignores the strftime_format parameter #2939
2024-09-14 09:52:51 +02:00
Nicolas Hennion
a1cb3630b8
Merge pull request #2932 from ariel-anieli/refactorize-display-plugin
...
Refactorized `_GlancesCurses.display_plugin()`
2024-09-14 09:42:02 +02:00
Ariel Otilibili
01823df917
Refactorized `_GlancesCurses.display_plugin()`
...
Part of #2801 . The flow is the same. Used as helpers:
1. `self.set_upper_left_pos`
2. `self.goto_next_and_ret_first_col`
3. `self.check_opt_and_add`
4. `self.x_overbound`
5. `self.y_overbound`
6. `self.display_msg`
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-09-13 10:36:24 +02:00
nicolargo
b9843a1d8c
Merge branch 'issue2929' into develop
2024-09-08 19:17:30 +02:00
nicolargo
36755ba4be
Show only active Disk I/O (and network interface) #2929
2024-09-08 19:17:07 +02:00
RazCrimson
a3895e49b6
Merge pull request #2938 from nicolargo/feature/json-serialization-fallbacks
...
JSON serialization fallbacks on ujson and builtin json lib
2024-09-08 15:37:39 +05:30
RazCrimson
e9ae9ff61b
chg: globals - datetime serialization support without orjson
2024-09-08 15:26:03 +05:30
RazCrimson
1fa173edbc
chg: restful_api - avoid duplicating checks + basic typing
2024-09-08 14:44:49 +05:30
RazCrimson
6dc16e92ea
chore: restful_api - remove unused code
2024-09-08 14:44:15 +05:30
RazCrimson
2a5251ca2d
chg: restful_api - use internal serialization features
2024-09-08 14:44:15 +05:30
RazCrimson
538013d192
chg: globals - standardize json_dumps return type to bytes
2024-09-08 14:25:26 +05:30
RazCrimson
46054afd22
chg: globals - json lib preference: orjson > ujson > json
2024-09-08 14:25:26 +05:30
RazCrimson
adfa85e8ab
chore: fix typos
2024-09-08 12:31:24 +05:30
Bharath Vignesh J K
7598fbed54
chg: remove orjson from base requirements.txt
2024-08-28 00:10:23 +05:30
Bharath Vignesh J K
1e278fa2cb
chg: make orjson optional
2024-08-28 00:10:13 +05:30
nicolargo
92de3be0a1
Stick FastAPI version to 0.82.0 or higher (latest is better) - Related to #2926
2024-08-26 17:20:05 +02:00
nicolargo
9432d9361e
Improve user message when Glances WebUI/RestAPI is ran
2024-08-24 15:53:20 +02:00
nicolargo
76478959cc
Correct issue in Makefile
2024-08-24 09:32:01 +02:00
Nicolas Hennion
37457ed892
Merge pull request #2924 from ariel-anieli/makefile
...
Refactorized rules targetting `profiling-*` & `memory-profiling`
2024-08-24 09:12:47 +02:00
RazCrimson
2493a1929f
Merge pull request #2925 from nicolargo/standardize-history-display-timestamp
...
chg: alerts - standardise history display timings
2024-08-19 00:04:18 +05:30
Bharath Vignesh J K
16d56109c8
chg: alerts - standardise history display timings
2024-08-19 00:01:59 +05:30
Ariel Otilibili
962ea850ed
Refactorized rules targetting `profiling-*` & `memory-profiling`
...
Part of #2906 :
* `profiling-*` share the same start banner
* used `OUT_DIR` for static outputs
* `TIMES` controls the number of iterations.
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-18 15:26:21 +02:00
RazCrimson
74a8b0bf34
Merge pull request #2923 from nicolargo/fix-typing-issues-for-py38-compatibility
...
fix: typing - compatibility with py3.8
2024-08-18 14:27:57 +05:30
Bharath Vignesh J K
73ff388400
fix: typing - compatibility with py3.8
...
closes #2922
2024-08-18 14:25:50 +05:30
nicolargo
d9fc2ca231
Update snap configuration
2024-08-18 10:20:11 +02:00
Nicolas Hennion
504cf0613f
Merge pull request #2919 from ariel-anieli/refactor-plugin-model-msg-curse
...
Refactorized `glances.plugins.containers.PluginModel.msg_curse()`
2024-08-18 09:36:25 +02:00
Ariel Otilibili
fa6d46c0c1
Refactorized `glances.plugins.containers.PluginModel.msg_curse()`
...
Part of #2801 . Broken down in:
* `build_title`
* `build_header`
* on each container, `build_data_line` calls `build_container_data`.
`build_container_data` does for a container:
* `maybe_add_engine_name_or_pod_name`
* `build_container_name`
* `build_status_name`
* `build_uptime_line`
* `build_cpu_line`
* `build_memory_line`
* `build_io_line`
* `build_net_line`
* `build_cmd_line`.
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-17 23:53:46 +02:00
nicolargo
c9525b8a5a
Manage the all option (in the Vms plugin)
2024-08-16 09:49:11 +02:00
nicolargo
8e4b9d9215
Only display VMs with a running status (in the Vms plugin)
2024-08-16 09:43:26 +02:00
nicolargo
6fa969adf4
api/4/vms returns a dict, thus breaking make test-restful #2918
2024-08-16 09:25:37 +02:00
nicolargo
fbca700562
Disable Webui audit fix in the CI,
2024-08-11 18:45:21 +02:00
Nicolas Hennion
c0aa754ebc
Merge pull request #2917 from ariel-anieli/makefile
...
Used patterns for rules targetting `venv`, `venv-python`, `venv-upgrade`
2024-08-11 18:28:09 +02:00
Nicolas Hennion
fcbee3518c
Merge pull request #2915 from ariel-anieli/refactor-process-thread
...
Reduced complexity of `PluginModel.__msg_curse_extended_process_thread()`
2024-08-11 18:27:06 +02:00
Ariel Otilibili
13079a606b
Used patterns rules in `venv`, `venv-python`, & `venv-python`
...
* `venv-*-python` relies on the pattern `venv-%-python`
* `venv-(full|min|dev)` & `venv-*-upgrade` on `venv-%`
* macros `UPGRADE`, `PRE_COMMIT`, `VIRTUAL_ENV`, & `REQS` are rule switches
* `VIRTUAL_ENV` being evaluated at runtime from `DEFINE_VARS_FOR_TYPE`
* `make help` is unchanged.
```
$ make venv -n
virtualenv -p /usr/bin/python3 venv
virtualenv -p /usr/bin/python3 venv-min
virtualenv -p /usr/bin/python3 venv-dev
venv/bin/pip install -r requirements.txt; venv/bin/pip install -r optional-requirements.txt;
venv-min/bin/pip install -r requirements.txt;
venv-dev/bin/pip install -r dev-requirements.txt; venv-dev/bin/pip install -r doc-requirements.txt;
venv-dev/bin/pre-commit install --hook-type pre-commit
$ make venv-python -n
virtualenv -p /usr/bin/python3 venv
virtualenv -p /usr/bin/python3 venv-min
virtualenv -p /usr/bin/python3 venv-dev
$ make venv-upgrade -n
venv/bin/install install --upgrade pip
venv/bin/pip install --upgrade -r requirements.txt; venv/bin/pip install --upgrade -r optional-requirements.txt;
venv-min/bin/install install --upgrade pip
venv-min/bin/pip install --upgrade -r requirements.txt;
venv-dev/bin/install install --upgrade pip
venv-dev/bin/pip install --upgrade -r dev-requirements.txt; venv-dev/bin/pip install --upgrade -r doc-requirements.txt;
```
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-11 17:45:21 +02:00
Ariel Otilibili
feac10a84d
Renamed macros in Makefile
...
* `s/VENV/venv_full/; s/VENV_MIN/venv_min/; s/VENV_DEV/venv_dev/;`
* useful in subsequent changes
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-11 17:40:27 +02:00
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
9c09d6b4a4
url_prefix do not work in Glances < 4.2.0 - Correct issue with mount #2912
2024-08-10 14:58:59 +02:00
Nicolas Hennion
7f049669fb
Merge pull request #2913 from ariel-anieli/makefile
...
Renamed variables in `Makefile`; rules targetting `docker-*` are now built at runtime
2024-08-10 11:32:28 +02:00
nicolargo
0003768bb8
url_prefix do not work in Glances < 4.2.0 #2912
2024-08-10 10:18:49 +02:00
Ariel Otilibili
a37010929d
Rules targetting `docker-*` are now built at runtime
...
* removed the macros `DOCKERFILE`, `TARGET`, & `DOCKER_TAG`
* introduced the macro `MAKE_DOCKER_BUILD_RULES`
* at runtime, `docker-*` are built from the `DISTROS` list: done using `eval` [1]
* `make help` is unchanged:
```
$ make | grep '\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 -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 .
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 .
```
[1] https://www.gnu.org/software/make/manual/html_node/Eval-Function.html
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-10 09:23:37 +02:00
Ariel Otilibili
ddfcf46dee
Renamed variables in `Makefile`; introduced the variable `DISTROS`
...
* needed for subsequent changes in `Makefile`
* `s/ALPINE_IMAGES/alpine_images/; s/UBUNTU_IMAGES/ubuntu_images/`
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-08-10 09:17:30 +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