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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 2090037: Adding template link in single VM overview details card #529

Merged
merged 2 commits into from Jun 14, 2022

Conversation

DanaOrr
Copy link
Contributor

@DanaOrr DanaOrr commented Jun 1, 2022

Signed-off-by: Dana Orr dorr@redhat.com

馃摑 Description

Adding link to vm template in vm overview page.

馃帴 Demo

Before:
image

After:
image

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 1, 2022

@DanaOrr: This pull request references Bugzilla bug 2090037, 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.11.0) matches configured target release for branch (4.11.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:

Bug 2090037: Adding template link in single VM overview details 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 requested a review from gouyang June 1, 2022 07:30
@@ -115,7 +125,18 @@ const VirtualMachinesOverviewTabDetails: React.FC<VirtualMachinesOverviewTabDeta
<DescriptionListGroup>
<DescriptionListTerm>{t('Template')}</DescriptionListTerm>
<DescriptionListDescription data-test-id="virtual-machine-overview-details-template">
{vm?.metadata?.labels?.['vm.kubevirt.io/template'] || '-'}
{templateName ? (
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
{templateName ? (
{templateName && templateNamespace ? (

Copy link
Member

Choose a reason for hiding this comment

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

you should also take care of the option of name without namespace, then just show the name without a link

@DanaOrr DanaOrr force-pushed the add-template-link-in-overview branch from dfab3bd to 4964699 Compare June 13, 2022 08:40
@DanaOrr DanaOrr force-pushed the add-template-link-in-overview branch from 4964699 to f8c29be Compare June 13, 2022 09:20
groupVersionKind={modelToGroupVersionKind(TemplateModel)}
name={templateName}
namespace={templateNamespace}
onClick={() =>
Copy link
Member

Choose a reason for hiding this comment

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

why do you need to cusomize the onClick ?

Comment on lines 130 to 135
groupVersionKind={modelToGroupVersionKind(TemplateModel)}
name={templateName}
namespace={templateNamespace}
onClick={() =>
history.push(`/k8s/ns/${templateNamespace}/templates/${templateName}`)
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
groupVersionKind={modelToGroupVersionKind(TemplateModel)}
name={templateName}
namespace={templateNamespace}
onClick={() =>
history.push(`/k8s/ns/${templateNamespace}/templates/${templateName}`)
}
groupVersionKind={modelToGroupVersionKind(TemplateModel)}
name={templateName}
namespace={templateNamespace}

Signed-off-by: Dana Orr <dorr@redhat.com>
@DanaOrr DanaOrr force-pushed the add-template-link-in-overview branch from f8c29be to b03cec9 Compare June 14, 2022 09:03
Signed-off-by: Dana Orr <dorr@redhat.com>
@yaacov
Copy link
Member

yaacov commented Jun 14, 2022

/lgtm

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

openshift-ci bot commented Jun 14, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: DanaOrr, yaacov

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 added the approved This issue is something we want to fix label Jun 14, 2022
@openshift-ci openshift-ci bot merged commit ca48a65 into kubevirt-ui:main Jun 14, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 14, 2022

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

Bugzilla bug 2090037 has been moved to the MODIFIED state.

In response to this:

Bug 2090037: Adding template link in single VM overview details 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.

None yet

2 participants