Ran
|
Jobs
2
|
Files
405
|
Run time
1min
|
Badge
Embed ▾
README BADGES
|
push
github
Track and display the current network configuration (#1158) Trello: https://trello.com/c/KYDDRo30/3630-8-display-the-running-network-configuration This PR adds support for tracking the status of the network devices and displaying that information through the web UI. ## Extending the networking model Now the `Device` struct includes information about [its current state](https://github.com/openSUSE/agama/blob/<a class=hub.com/openSUSE/agama/commit/<a class="double-link" href="https://git"><a class=hub.com/openSUSE/agama/commit/d5f7da8d4b9f673f08348af6c7582cd65b414019">d5f7da8d4/rust/agama-server/src/network/model.rs#L465-L468), including its IP configuration, MAC address, device state, etc. To keep this information up-to-date, we introduced the concept of [network watchers](https://github.com/openSUSE/agama/blob/d5f7da8d4b9f673f08348af6c7582cd65b414019/rust/agama-server/src/network/adapter.rs#L38) which listens for events in the corresponding backend and update the network model accordingly. We implemented a [NetworkManager Watcher](https://github.com/openSUSE/agama/blob/d5f7da8d4b9f673f08348af6c7582cd65b414019/rust/agama-server/src/network/nm/watcher.rs). ``` +----------+ actions +---------------+ actions +---------------+ | Watcher |----------> | Network Model | <---------->| HTTP/JSON API | +----------+ +---------------+ events +---------------+ | | listens +----------------+ | NetworkManager + +----------------+ ``` ## Adapting the UI When it comes to the web UI, we decided to make it work with the new updates mechanism, but nothing else. We plan to invest some time in rethinking that part of the UI (as we did for storge), but not now. ## Screenshots <details> <summary>Overview with a single device</summary> ![Overview 1 device](https://github.com/openSUSE/agama/assets/7056681/d538202c-e7e8-4629-b22a-9faa71761bf4) </details> <details> <summary>Overview with two devices</summary> ![Overview 2 devices](https://github.com/openSUSE/agama/assets/7056681/8e41fd1e-41d3-4977-937e-7cf20f... (continued)
22 of 368 new or added lines in 13 files covered. (5.98%)
1 existing line in 1 file now uncovered.11049 of 16072 relevant lines covered (68.75%)
11.82 hits per line
Lines | Coverage | ∆ | File |
---|---|---|---|
1 |
0.0 |
0.0% | rust/agama-server/src/web.rs |
3 |
78.92 |
-0.86% | rust/agama-lib/src/network/client.rs |
4 |
0.0 |
0.0% | rust/agama-server/src/network/nm/client.rs |
5 |
0.0 |
0.0% | rust/agama-server/src/network/nm/adapter.rs |
6 |
42.27 |
0.22% | rust/agama-server/src/network/web.rs |
15 |
55.72 |
-2.56% | rust/agama-server/src/network/model.rs |
18 |
57.28 |
-3.25% | rust/agama-server/src/network/system.rs |
32 |
24.47 |
-12.63% | rust/agama-lib/src/network/types.rs |
99 |
0.0 |
rust/agama-server/src/network/nm/builder.rs | |
163 |
0.0 |
rust/agama-server/src/network/nm/watcher.rs |
Lines | Coverage | ∆ | File |
---|---|---|---|
1 |
42.27 |
0.22% | rust/agama-server/src/network/web.rs |
ID | Flag name | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|---|
2 | rust | 8891891693.2 | 89 |
33.57 |
GitHub Action Run | |
1 | service | 8169459432.1 | 316 |
85.22 |
GitHub Action Run |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|