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

Disable buttons for adding new cloud items when no provider available 🐛 #2849

Merged
merged 1 commit into from Nov 29, 2017

Conversation

skateman
Copy link
Member

There were some cloud-related item buttons that were enabled even when there was no available provider for them:

  • Creating a new Flavor
  • Creating a new Cloud Tenant
  • Creating a new Host Aggregate

These now will be disabled when there is no related provider available. Tests included to make @martinpovolny happy.

https://bugzilla.redhat.com/show_bug.cgi?id=1516877

@miq-bot
Copy link
Member

miq-bot commented Nov 28, 2017

Checked commit skateman@f270948 with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0
9 files checked, 4 offenses detected

app/helpers/application_helper/button/new_cloud_tenant.rb

  • ❗ - Line 3, Col 14 - Style/NumericPredicate - Use ManageIQ::Providers::Openstack::CloudManager.count.zero? instead of ManageIQ::Providers::Openstack::CloudManager.count == 0.

app/helpers/application_helper/toolbar/cloud_tenants_center.rb

app/helpers/application_helper/toolbar/host_aggregates_center.rb

spec/helpers/application_helper/buttons/new_host_aggregate_spec.rb

@chessbyte chessbyte added the bug label Nov 28, 2017
@mzazrivec mzazrivec self-assigned this Nov 29, 2017
@mzazrivec mzazrivec added this to the Sprint 75 Ending Dec 11, 2017 milestone Nov 29, 2017
@mzazrivec mzazrivec merged commit fd1d033 into ManageIQ:master Nov 29, 2017
@skateman skateman deleted the cloud-new branch November 29, 2017 09:24
simaishi pushed a commit that referenced this pull request Nov 29, 2017
Disable buttons for adding new cloud items when no provider available 🐛
(cherry picked from commit fd1d033)

https://bugzilla.redhat.com/show_bug.cgi?id=1518745
@simaishi
Copy link
Contributor

Gaprindashvili backport details:

$ git log -1
commit d300e1194e2b5c2650a698f58b2d74621dcf7ee0
Author: Milan Zázrivec <mzazrivec@redhat.com>
Date:   Wed Nov 29 10:20:36 2017 +0100

    Merge pull request #2849 from skateman/cloud-new
    
    Disable buttons for adding new cloud items when no provider available <U+1F41B>
    (cherry picked from commit fd1d03331bb6e1b987b8adbab3e17e9c7b32a985)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1518745

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.

None yet

6 participants