-
-
Notifications
You must be signed in to change notification settings - Fork 719
Introduce "collection" projects for better usage of hierarchical view #2041 #3258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
nscuro
merged 28 commits into
DependencyTrack:master
from
rkg-mm:2041-introduce-collection-projects
Dec 10, 2024
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
0e73c0c
Allow projects to be configured as collections with different Project…
rkg-mm 5b559ea
Fix missing default.
rkg-mm 61849be
Add upgrade class to set default project collection logic to NONE for…
rkg-mm 1a5af6f
Fix unit test
rkg-mm b5fd40b
Exclude collection projects from portfolio metrics calculation to not…
rkg-mm e4f2a64
Updated copyright
rkg-mm f3b74c3
Add new Property to unit test data
rkg-mm 5f5c7ab
* Fix failing unit test by enforcing parent loading
rkg-mm 84698c0
Only dispatch parent metrics update event when metrics of current pro…
rkg-mm aed9e55
Fix unit tests
rkg-mm dfada3e
Remove HighestSemverChild logic, replace by preparation for "isLatest…
rkg-mm 8bd3e1a
Move upgrade logic to v4.13.0 as this is the new target version for t…
rkg-mm 1d81af0
Add collection logic changes to project metrics for further improveme…
rkg-mm 5fc4375
Improve handling of old Metrics DB entries to avoid showing a metric …
rkg-mm 5ad555c
Fix merge issue
rkg-mm 8bf4556
Enable logic for collection projects using isLatest flag
rkg-mm cd07dcc
Add usage example in docs for collection projects.
rkg-mm 2bf56f0
* Rename LATEST_VERSION_CHILDREN collection logic to AGGREGATE_LATEST…
rkg-mm f14fc9a
Allow setting NONE as classifier (useful for parents)
rkg-mm 380107d
Merge branch 'master' of github.com:DependencyTrack/dependency-track …
nscuro f9769d5
Merge pull request #1 from nscuro/issue-2041-resolve-merge-conflicts
rkg-mm 1ddb937
Add ProjectResource tests for collection logic updates
nscuro 0c0d247
Remove workaround for unloading of project parent
nscuro ce3afdb
Remove outdated warning log and TODO
nscuro 8e2015c
Update `since` in JavaDoc
nscuro f55d48c
Adjust `null` handling of `collectionLogic` and `collectionLogicChanged`
nscuro 111900a
Update fetchGroup to include `parent` and `collectionLogic`
nscuro b840f33
Merge pull request #2 from nscuro/issue-2041-resolve-merge-conflicts
rkg-mm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| --- | ||
| title: Collection Projects | ||
| category: Usage | ||
| chapter: 2 | ||
| order: 8 | ||
| --- | ||
|
|
||
| Dependency-Track does support organizing projects in a tree structure | ||
| via parent-child relationships. This can be used to organize projects | ||
| for example by department or team, but also to structure a project itself | ||
| into different sub-projects and to organize their versions. | ||
|
|
||
| Since v4.13 it also supports configuring parents as "Collection Projects", | ||
| which allows to define that a parent itself does not host any components, | ||
| but instead aggregates metrics of vulnerabilities and policy violations of | ||
| its children with one of three possible calculation methods: | ||
| * Aggregate all direct children | ||
| * Aggregate all direct children which have a tag of your choice | ||
| * Aggregate all direct children which are marked as latest version | ||
|
|
||
| This allows a wide range use cases to be displayed. See following screenshot | ||
| which demonstrates a combination of all 3 possibilities within one product, | ||
| which consists of a Web Frontend (tracking DEV, QA, PROD environment), a Backend | ||
| with multiple MicroServices (tracked separated by DEV, QA, PROD environment), | ||
| and a mobile app (tracking each released version of the app). | ||
|
|
||
|  | ||
|
|
||
| This is just one example how you could structure your projects and make use of | ||
| collection projects to better visualize the projects state without going down into | ||
| each single level. There are many other possibilities how you can organize the portfolio. | ||
|
|
||
| Collection projects do not show the usual tabs for components, vulnerabilities etc. | ||
| Instead they show a list of projects contained in this collection and their metrics: | ||
|
|
||
|  | ||
|
|
||
| Collection projects can be easily identified via the "culculator" icon, and hovering it | ||
| displays the applied collection logic. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,7 @@ | |
| * @since 3.0.0 | ||
| */ | ||
| public enum Classifier { | ||
| NONE, | ||
| APPLICATION, | ||
| FRAMEWORK, | ||
| LIBRARY, | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
src/main/java/org/dependencytrack/model/ProjectCollectionLogic.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| /* | ||
| * This file is part of Dependency-Track. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| * Copyright (c) OWASP Foundation. All Rights Reserved. | ||
| */ | ||
| package org.dependencytrack.model; | ||
|
|
||
| /** | ||
| * Defines various types of logics to be applied to collection projects. | ||
| * Collection projects don't contain own components, instead collect their metrics and | ||
| * data from their children. The logic to apply when calculating this data is defined | ||
| * by this type. | ||
| * | ||
| * @author Ralf King | ||
| * @since 4.13.0 | ||
| */ | ||
| public enum ProjectCollectionLogic { | ||
| /** | ||
| * Project is not a collection project | ||
| */ | ||
| NONE, | ||
| /** | ||
| * Aggregate data from all direct children. Respects collection logic of | ||
| * direct children collections. | ||
| */ | ||
| AGGREGATE_DIRECT_CHILDREN, | ||
| /** | ||
| * Aggregate all direct children which have a specific tag | ||
| */ | ||
| AGGREGATE_DIRECT_CHILDREN_WITH_TAG, | ||
| /** | ||
| * Aggregate all direct children marked with isLatest flag. | ||
| */ | ||
| AGGREGATE_LATEST_VERSION_CHILDREN | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.