Skip to content
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

Bug 2072797: Add duration to top consumers card #683

Merged

Conversation

pcbailey
Copy link
Member

This PR adds the option to select a duration to the top consumers card.

Screenshots

Selection_114

Selection_115

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 29, 2022

@pcbailey: This pull request references Bugzilla bug 2072797, which is invalid:

  • expected the bug to target the "4.12.0" release, but it targets "4.11.0" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 2072797: Add duration to top consumers card

Instructions 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.

@openshift-ci openshift-ci bot added the approved This issue is something we want to fix label Jun 29, 2022
@pcbailey
Copy link
Member Author

/bugzilla refresh

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 29, 2022

@pcbailey: This pull request references Bugzilla bug 2072797, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.12.0) matches configured target release for branch (4.12.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @gouyang

In response to this:

/bugzilla refresh

Instructions 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.

@openshift-ci openshift-ci bot requested a review from gouyang June 29, 2022 12:08
@pcbailey
Copy link
Member Author

Copy link
Member

@avivtur avivtur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Phillip, nice work 😄
I left you some comments


class DurationOption extends DropdownEnum<string> {
static readonly FIVE_MIN = new DurationOption('5m', {
// t('5 minutes')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be // t('plugin__kubevirt-plugin~5 minutes') and should be moved to src/utils/i18n.ts as well as the other similar comments in this file

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? yarn i18n picked them up. Is there something I'm missing?

Copy link
Member

@avivtur avivtur Jul 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK src/utils/i18n.ts is to make some file that contains all these kind of comments to the translation parser, not as a strict rule but more of a convention to us :)
and Im almost sure when you put it in a comment like you did, we need to prefix plugin__kubevirt-plugin~ to the string we want to translate.
adding @glekner to this since he has more knowledge on this than I :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went ahead and changed it, but further explanation would be helpful so I'll understand the difference. =)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for prefix

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@glekner Thanks! Can you explain what the difference is between adding the comment in src/utils/i18n.ts vs any other file?

@pcbailey pcbailey force-pushed the add-duration-to-top-consumers-card branch 2 times, most recently from 1f0be5d to dbbaa55 Compare July 6, 2022 00:28
@pcbailey pcbailey force-pushed the add-duration-to-top-consumers-card branch from dbbaa55 to ed37e9b Compare July 6, 2022 11:04
@@ -0,0 +1,18 @@
import { ObjectEnum } from '@kubevirt-utils/utils/ObjectEnum';
Copy link
Contributor

@glekner glekner Jul 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pcbailey I feel like using ObjectEnum is a pain from the past that we should try to avoid at all cost.
I do understand that you have portions of your feature relying on it, so IMO its ok to use it for porting features like the Virtualization dashboard. But I strongly recommend to move over to plain objects and hooks when implementing new features from now on.

@avivtur
Copy link
Member

avivtur commented Jul 6, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm Passed code review, ready for merge label Jul 6, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 6, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: avivtur, pcbailey

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot merged commit 06dcfdb into kubevirt-ui:main Jul 6, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 6, 2022

@pcbailey: All pull requests linked via external trackers have merged:

Bugzilla bug 2072797 has been moved to the MODIFIED state.

In response to this:

Bug 2072797: Add duration to top consumers card

Instructions 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved This issue is something we want to fix bugzilla/severity-medium bugzilla/valid-bug lgtm Passed code review, ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants