Job Analytics panel charts dynamically configurable. #1517
Merged
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.
Motivation and Context
The job analytics panel had a hardcoded number of analytics plots. This change
makes it (slightly) more flexible in that it wil only show the number of
analytics that are actually returned by the rest call (up to a hard-coded
maximum which is now 6).
This change now allows different jobs to have a different number of analytics.
However, the main motivation for the change is to make it easier to
configure the charts that are displayed because now they are managed in one
place rather than having hardcoded values in multiple places.
One of the reasons why a hardcoded maximum is still present is due to
the original design of the panel. The plots are all instantiated in the
constructor, but the number of charts with data is only known once the
rest call has returned. The ideal design would wait until the rest
call has returned before construting the object, but that would require
a substantial rewrite of the software. Instead we slice off the extra
charts that are not needed.
Tests performed
Manually tested on metrics-dev. See also the pull request in supremm ubccr/xdmod-supremm#273