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

[NCL-8947] Disable restore button for last revision #613

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DnsZhou
Copy link
Contributor

@DnsZhou DnsZhou commented Dec 5, 2024

No description provided.

@DnsZhou DnsZhou requested a review from matedo1 December 5, 2024 14:02
if (!serviceContainerBuildConfig.data || !serviceContainerBuildConfigRevision.data) {
return false;
}
return serviceContainerBuildConfig.data?.modificationTime === serviceContainerBuildConfigRevision.data?.modificationTime;
Copy link
Contributor

@matedo1 matedo1 Dec 5, 2024

Choose a reason for hiding this comment

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

I have two points:

  1. Would it be possible to use ID based comparison instead of modificationTime based? We have list of all revisions available and we know the last one is the current one.

  2. We should try to load the last revision somewhere on the BuildConfigRevisionPages and share via useOutletContext ? So that no other http request is performed. Your current solution is loading new Build Config for each revision.

Using the list of revisions which is already loaded on the BuildConfigRevisionPages may not be possible because there are multiple pages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants