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

Added cluster validation to projects.show page to disable script actions #3257

Merged

Conversation

abujeda
Copy link
Contributor

@abujeda abujeda commented Dec 15, 2023

Added clusters validation to projects.show page.
If there are no options defined for the auto_batch_clusters Smart Attribute, the system will show a flash message and disable all the script actions in the projects.show page.

Fixes #2690


def clusters?
cluster_attribute = SmartAttributes::AttributeFactory.build('auto_batch_clusters', {})
!cluster_attribute.select_choices(hide_excludable: false).empty?
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use any? instead of !empty??

@johrstrom
Copy link
Contributor

I'm working on the CI in another pull request.

@abujeda abujeda force-pushed the 2690_added_script_cluster_validation_to_projects branch from be72e5f to 3fc0155 Compare December 19, 2023 18:11
@johrstrom johrstrom merged commit ef3dd02 into OSC:master Dec 20, 2023
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

scripts#new errors if there are no clusters
3 participants