-
Notifications
You must be signed in to change notification settings - Fork 17
Add support for advisor and reporter plugin options in the UI #3251
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
base: main
Are you sure you want to change the base?
Conversation
Add a function to get the hierarchy for a repository. Signed-off-by: Martin Nonnenmacher <[email protected]>
Add a function that returns all secrets that are available in the context of a hierarchy. Signed-off-by: Martin Nonnenmacher <[email protected]>
Add a route that returns all secrets that are available in the context of a repository, including those defined for the product and organization the repository belongs to. This route will be used to populate dropdowns to select secrets when triggering an ORT run via the UI. The new dependency of on the `RepositoryService` which depends on the `AuthorizationService` also requires to configure a mock `AuthenticationService` for integration tests that do not require authentication. Signed-off-by: Martin Nonnenmacher <[email protected]>
Prepare for partly generating the form schema by converting the `createRunFormSchema` constant to a function. Signed-off-by: Martin Nonnenmacher <[email protected]>
Dynamically generate the schema and form inputs for advisor plugin options. The handling of default values from templates and secret options will be added in follow-up commits. Signed-off-by: Martin Nonnenmacher <[email protected]>
Use the default values from the `PreconfiguredPluginDescriptor` for the advisor plugin options. Signed-off-by: Martin Nonnenmacher <[email protected]>
If a plugin config template sets an option to a fixed value, disable the form input. Also show an explanatory text. Signed-off-by: Martin Nonnenmacher <[email protected]>
For plugin options of the type 'SECRET', show a dropdown with all secrets available in the context of the repository. If no secrets are available, or if the selected secret does not exist, show an error message. Signed-off-by: Martin Nonnenmacher <[email protected]>
The function will be reused for other plugin types. Signed-off-by: Martin Nonnenmacher <[email protected]>
Extract the function that was used for the advisor plugins to make it reusable for other plugin types. Signed-off-by: Martin Nonnenmacher <[email protected]>
Add form inputs to configure all reporter plugin options when triggering an ORT run, similar to how it was previously implemented for advisor plugins. This change makes the `deduplicateDependencyTree` option obsolete because it can now be configured directly in the plugins supporting it. It also makes the default values for the report output formats obsolete because they can now be configured with plugin config templates. Signed-off-by: Martin Nonnenmacher <[email protected]>
300d04f to
89db3e2
Compare
|
create-run-utils is quite long and would probably be best to refactor into separate files now. |
|
@mnonnenmacher I'm planning on continuing the query client refactoring down the |
@Etsija Just go for it and let me know when you are done, I already have to redo large parts of this PR due to merge conflicts I introduced myself. |
Add support for configuration plugin options for advisor and reporter plugins in the UI.
The forms are generated from the plugin descriptors and take default values and plugin config templates into account.
Example for advisor plugins:
Example for reporter plugins:
This is a first version that will help to identify required improvements and missing functionality.
@lamppu @Etsija This is still a draft but a review would already be welcome, just ignore the first few Kotlin commits which I will also commit separately.