Commit 3bbab32
authored
feat: Packet Queue Usage Progress Bar (#185)
This pull request introduces a new progress bar feature to the
`DeviceInfo` class and updates related files to support this
functionality. The most important changes include the addition of the
`ProgressBar` component, modifications to the `DeviceInfo` class to
include the progress bar, and the necessary CSS styles.
### New Progress Bar Feature:
* **Progress Bar Component**:
- Added a new `ProgressBar` class in
`src/graphics/renderables/progress_bar.ts` to create and manage the
progress bar element.
- Introduced `ProgressBarProps` interface to define the properties of
the progress bar.
* **DeviceInfo Class Updates**:
- Updated `DeviceInfo` class in
`src/graphics/renderables/device_info.ts` to include a method
`addProgressBar` for adding a progress bar with a label.
- Imported `ProgressBar` and `TooltipManager` in
`src/graphics/renderables/device_info.ts`.
### CSS Styles for Progress Bar:
* **Progress Bar Styles**:
- Added new CSS styles in `src/styles/progress-bar.css` to style the
progress bar container, bar, and text.
- Included the new CSS file in `src/styles/index.ts`.
### ViewRouter Class Updates:
* **Queue Size and Progress Bar Integration**:
- Modified `ViewRouter` class in `src/types/view-devices/vRouter.ts` to
add a progress bar showing packet queue usage.
- Implemented observer pattern in `PacketQueue` class to notify changes
in queue size and update the progress bar accordingly.
[[1]](diffhunk://#diff-221c2585585eef7ff9eafd84467d1c0bcef658af348a8673d2d00f752d06e35aR273-R299)
[[2]](diffhunk://#diff-221c2585585eef7ff9eafd84467d1c0bcef658af348a8673d2d00f752d06e35aR311)
[[3]](diffhunk://#diff-221c2585585eef7ff9eafd84467d1c0bcef658af348a8673d2d00f752d06e35aR321)
### Tooltip Updates:
* **Tooltip Constants**:
- Added new tooltip keys and content for the packet queue usage in
`src/utils/constants/tooltips_constants.ts`.
[[1]](diffhunk://#diff-d23a6aa67e252dd864d40b8b3b4cc29db716b0e742da79d7ef8da9b9dc956ce1R48)
[[2]](diffhunk://#diff-d23a6aa67e252dd864d40b8b3b4cc29db716b0e742da79d7ef8da9b9dc956ce1R132-R133)
related #1731 parent add0b04 commit 3bbab32
File tree
7 files changed
+188
-2
lines changed- src
- graphics/renderables
- styles
- types
- data-devices
- view-devices
- utils/constants
7 files changed
+188
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
104 | 106 | | |
105 | 107 | | |
106 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
107 | 146 | | |
108 | 147 | | |
109 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
| 180 | + | |
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
60 | 75 | | |
61 | 76 | | |
62 | 77 | | |
| |||
254 | 269 | | |
255 | 270 | | |
256 | 271 | | |
| 272 | + | |
| 273 | + | |
257 | 274 | | |
258 | 275 | | |
259 | 276 | | |
260 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
261 | 292 | | |
262 | 293 | | |
263 | 294 | | |
264 | 295 | | |
265 | 296 | | |
266 | 297 | | |
| 298 | + | |
267 | 299 | | |
268 | 300 | | |
269 | 301 | | |
270 | 302 | | |
271 | 303 | | |
272 | 304 | | |
273 | | - | |
| 305 | + | |
274 | 306 | | |
275 | 307 | | |
276 | 308 | | |
277 | 309 | | |
| 310 | + | |
278 | 311 | | |
279 | 312 | | |
280 | 313 | | |
| |||
284 | 317 | | |
285 | 318 | | |
286 | 319 | | |
| 320 | + | |
287 | 321 | | |
288 | 322 | | |
289 | 323 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
| 132 | + | |
| 133 | + | |
131 | 134 | | |
0 commit comments