Commit bad9641
authored
Implement treegrid to display parent-child-relationship in project list (#328)
* Implement treegrid for parent-child-relationship
Removed the hierarchical view with subtables in favor of the default
table with an added treegrid to display the hierarchy.
Also includes lazy-loading sub-levels.
Signed-off-by: RBickert <[email protected]>
* Implement dummy children for better lazy-loading
Dummy children are now used instead of loading a level ahead to reduce
API calls and optimize the loading times of a projects next level.
Pagination not working correctly because dummy children need to be
removed and removing from a bootstrap-table decrements the total row
count.
Signed-off-by: RBickert <[email protected]>
* Remove dummy children for lazy-loading
Removes dummy children for lazy-loading to avoid the need of removing
data from the table, which caused problems with the pagination.
Now renders the expander button for a project, if it has children which
meet the current filter criteria (e.g. inactive, only applications)
Signed-off-by: RBickert <[email protected]>
* Retrieve available parents only when needed
Only fetches the available parents for the `ProjectDetailsModal` and the
`ProjectCreateProjectModal` when the modals are opened, instead of at
the startup of the page, to reduce unnecessary loading of data.
Signed-off-by: RBickert <[email protected]>
* Fix checking visibility of wrong column
Signed-off-by: RBickert <[email protected]>
* Implement flat view and search
Project list is a hierarchical view per default, can now be switched to
flat view.
Automatically switches to flat view while searching. Disables switching
views while searching.
Signed-off-by: RBickert <[email protected]>
* Toggle `FlatView` switch to `on` when searching
Toggles the state of the `showFlatView` switch to `on` when searching
and saves the state before searching to switch back to it after
searching.
Signed-off-by: RBickert <[email protected]>
* Switch to `uuid` and `parentUuid` for hierarchy
Instead of using a projects `id` and `pid` to map the relationship
between children and parents, a projects `uuid` and `parentUuid` are now
hashed with `MurmurHash2` and then used to create the treegrid.
(A treegrid's `idField` and `parentIdField` must be numbers and
not strings to correctly work)
Signed-off-by: RBickert <[email protected]>
* Remove unused parameter of `onClickRow`
Signed-off-by: RBickert <[email protected]>
* Change parent input form
Change parent input form to `vue-multiselect` and the API
endpoint to
`/api/v1/project?searchText=<fieldInput>&excludeInactive=false`
Signed-off-by: RBickert <[email protected]>
* Fix API endpoint including inactive projects
Signed-off-by: RBickert <[email protected]>
Signed-off-by: RBickert <[email protected]>1 parent 35dd6e4 commit bad9641
File tree
10 files changed
+407
-29
lines changed- src
- assets/scss
- i18n/locales
- plugins
- views/portfolio/projects
10 files changed
+407
-29
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| 53 | + | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
112 | 114 | | |
113 | 115 | | |
114 | 116 | | |
| |||
267 | 269 | | |
268 | 270 | | |
269 | 271 | | |
| 272 | + | |
| 273 | + | |
270 | 274 | | |
271 | 275 | | |
272 | 276 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
243 | 246 | | |
244 | 247 | | |
245 | 248 | | |
246 | 249 | | |
247 | | - | |
248 | | - | |
249 | 250 | | |
250 | 251 | | |
251 | 252 | | |
| |||
0 commit comments