-
Notifications
You must be signed in to change notification settings - Fork 667
Add capacity card #1723
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
Add capacity card #1723
Conversation
|
Hi @rawagner. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@pcbailey you should reuse these functions for and in your TopConsumers PR too #1722 |
154f69e to
b41ae3a
Compare
|
fyi @TheRealJon is looking at transitioning our existing gauge charts to pf4/victory |
|
/assign @TheRealJon Jon, can you help review? |
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.
@cloudbehl @spadgett This can be used in ceph-storage-plugin to customize storage related queries.
@jelkosz We must have the ability to gate extensions by feature flags, i.e. use Ceph storage capacity queries only if CEPH feature flag is enabled.
frontend/public/components/dashboards-page/overview-dashboard/capacity-query-types.ts
Outdated
Show resolved
Hide resolved
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.
@rawagner In relation to extension validation (#1708), are there any constraints to replacing the base Prometheus queries?
For example, if plugin A defines custom CAPACITY_QUERY.STORAGE_TOTAL, can plugin B redefine that query again?
@christianvogt Plugins are currently treated as completely independent of each other, including the order in which their extensions are applied, with one exception being that console-app's extensions always come first.
Therefore, I think we should have an extension check which fails if multiple plugins attempt to replace the same query.
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.
@vojtechszocs I think it makes sense to add such test once #1708 is merged.
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.
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.
@rawagner We should ensure that given queryKey is replaced at most once.
const pluginQueries = {};
plugins.registry.getDashboardsOverviewCapacityQueries().forEach(cq => {
const queryKey = cq.properties.queryKey;
if (!pluginQueries[queryKey]) {
pluginQueries[queryKey] = cq.properties.query;
}
});
return _.defaults(pluginQueries, defaultQueries);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.
changed to using _.defaults . I've also added warn log message when such case happens
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.
I've also added
warnlog message when such case happens
Please don't, extension tests introduced in #1708 should catch and report on these issues at test/build time.
Code I've posted above enforces the "query can be replaced at most once" behavior (guarding against e.g. when you disable some tests), but it doesn't log anything on purpose. This keeps the code simple(r) and browser console log clean(er).
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.
Ok, I removed the log message
frontend/public/components/dashboards-page/overview-dashboard/capacity-card.tsx
Outdated
Show resolved
Hide resolved
b41ae3a to
84bfdbf
Compare
6ca429d to
7684e94
Compare
frontend/public/components/dashboard/capacity-card/capacity-item.tsx
Outdated
Show resolved
Hide resolved
7684e94 to
9317f23
Compare
9317f23 to
02afd73
Compare
02afd73 to
5eb4d40
Compare
|
@openshift/team-ux-review |
|
@vojtechszocs all review comments addressed and rebased on master (which already has #1742) |
|
since it is assigned to @TheRealJon he is the one who should give us LGTM :) |
TheRealJon
left a comment
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.
/lgtm
|
@TheRealJon thanks! Still missing approve. Should that be given by you or @spadgett ? |
|
/approve But needs rebase :/ |
7dc99ea to
65a8709
Compare
d5cc71b to
c2a59b3
Compare
c2a59b3 to
a724ff9
Compare
|
since #1783 is merged and it has migrated gauge to PF4 I've reused it here too. |
|
/test e2e-aws-console-olm |
|
@rawagner I found a bug where some of the Area and Bar chart labels are objects instead of strings. I think this comes from the change to the
|
|
@TheRealJon thank you again for the commit. I've added one more and it should all be fine now. Please take a look. |
update image-stream-tag.tsx humanize function usage
f925182 to
9995763
Compare
|
/retest |
|
/test e2e-aws-console |
|
/test e2e-aws-console |
TheRealJon
left a comment
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.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rawagner, spadgett, TheRealJon, vojtechszocs The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |



This PR adds Capacity card to Dashboard Overview page. The card can be extended by replacing the default queries (ie ceph plugin will want to replace the default storage query for their own)
Loaded Capacity card

Capacity card in loading state

Capacity card when prometheus is not available
