-
Notifications
You must be signed in to change notification settings - Fork 163
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
DW: Implement "Requested resources" bullet charts on Project Metrics page (formerly "Resource usage" charts) #2673
DW: Implement "Requested resources" bullet charts on Project Metrics page (formerly "Resource usage" charts) #2673
Conversation
26d5501
to
9fe0586
Compare
dd9f6da
to
5b13eec
Compare
/retest |
5b13eec
to
2ed655f
Compare
…age (formerly "Resource usage" charts) Signed-off-by: Mike Turley <[email protected]>
isAdmin | ||
? undefined | ||
: 'In this section, all projects refers to all of the projects that share the specified resource. You might not have access to all of these projects.' | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Being an admin does not mean you get access to all projects -- the two are separate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah... I apologize, I did learn that the hard way once already and forgot when I wrote this originally 😕 I imagine we should just show this icon/message for all users. Even if a cluster admin sees it that seems fine to me
2ed655f
to
2f17163
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andrewballantyne The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Closes RHOAIENG-2844.
Description
Tech debt items we need to revisit after feature freeze are marked by⚠️ below.
getQueueRequestedResources
for calculating the sum of requested resources fromlocalQueues
(for "requested by this project" metrics) andclusterQueues
(for "requested by all projects") metric.getTotalSharedQuota
for calculating the sum of available resources from theclusterQueue
.'cpu'
and'memory'
strings in the ClusterQueueKind and LocalQueueKind'sflavorsReservation
andresourceGroups
with the existingContainerResourceAttributes
enum to simplify the new utilities.helpTooltip
prop inDWSectionCard
)ResourceUsage
component with newRequestedResources
, which implements the new bullet charts.CappedBulletChartDataItem
type that keeps track of the truepreciseValue
,roundedValue
andcappedValue
for each data point. This simplifies the rendering of the chart, where we need to be a little repetitive with where we pass in different forms of this data in thelabels
,primarySegmentedMeasureData
,qualitativeRangeData
,comparativeWarningMeasureData
andcolorScale
props.RequestedResourcesBulletChart
component.mockClusterQueueK8sResource
andmockLocalQueueK8sResource
with paramsisCpuOverQuota
andisMemoryOverQuota
for testing purposes. Not currently in use because it doesn't affect the behavior of utils being unit tested and we don't yet have Cypress tests that assert anything about the rendered charts, but was useful for mocking things out during development. These mocks now return requested resource data by default.Known gaps between implementation and design mockups:
cc @xianli123 @cfullam1 @yannnz
How Has This Been Tested?
Tested the new charts by running dummy jobs provided by @Fiona-Waters. Tested that changes impacting other areas of the code have no effect on existing behavior.
Test Impact
getQueueRequestedResources
andgetTotalSharedQuota
Request review criteria:
Self checklist (all need to be checked):
If you have UI changes:
After the PR is posted & before it merges:
main