Bug 753132 - "Synchronize Now" button should be disabled if no repo is selected for sync.
Summary: "Synchronize Now" button should be disabled if no repo is selected for sync.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: WebUI
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified vote
Target Milestone: Unspecified
Assignee: Pradeep Kilambi
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks: katello-blockers
TreeView+ depends on / blocked
 
Reported: 2011-11-11 12:19 UTC by Sachin Ghai
Modified: 2019-09-26 13:23 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-22 18:05:48 UTC
Target Upstream Version:


Attachments (Terms of Use)
Synchronize Now button is enbaled when no repo is selected and clicking on it UI raised an error. (40.71 KB, image/png)
2011-11-11 12:22 UTC, Sachin Ghai
no flags Details
No error on UI, when you click on 'Synchronize Now' button ithout selecting any repo. (42.57 KB, image/png)
2011-12-28 10:20 UTC, Sachin Ghai
no flags Details

Description Sachin Ghai 2011-11-11 12:19:50 UTC
Description of problem:
If you check the sync status under content management tab, you will find the "Synchronize Now" button active even if no repo is selected for sync.


When you click on this button without selecting any repo, UI throws :
undefined method `each' for nil:NilClass


Version-Release number of selected component (if applicable):
[root@dhcp201-198 ~]# rpm -qa | grep pulp
mod_wsgi-3.2-6.pulp.fc15.x86_64
pulp-0.0.244-5.fc15.noarch
m2crypto-0.21.1.pulp-5.fc15.x86_64
katello-glue-pulp-0.1.98-1.git.33.a663155.fc15.x86_64
pulp-common-0.0.244-5.fc15.noarch
[root@dhcp201-198 ~]# rpm -qa | grep katello
katello-common-0.1.98-1.git.33.a663155.fc15.noarch
katello-all-0.1.98-1.git.33.a663155.fc15.x86_64
katello-cli-0.1.11-1.git.0.facb3bb.fc15.noarch
katello-cli-common-0.1.10-1.git.1133.ea1fcc6.fc15.noarch
katello-glue-foreman-0.1.98-1.git.33.a663155.fc15.x86_64
katello-configure-0.1.10-1.git.0.78fbe70.fc15.noarch
katello-glue-pulp-0.1.98-1.git.33.a663155.fc15.x86_64
katello-0.1.101-1.git.6.83ea7cf.fc15.x86_64
katello-glue-candlepin-0.1.98-1.git.33.a663155.fc15.x86_64
katello-repos-0.1.3-1.git.0.db2bd1d.fc15.noarch
[root@dhcp201-198 ~]# 


How reproducible:
always

Steps to Reproduce:
1. Add a repo
2. open sync status page under content management
3. without selecting any repo, click "Synchronize Now"
  
Actual results:
undefined method `each' for nil:NilClass


Expected results:
"Synchronize Now" button should be disabled if user id not selecting any repo for sync. 

Additional info:

Comment 1 Sachin Ghai 2011-11-11 12:22:20 UTC
Created attachment 533049 [details]
Synchronize Now button is enbaled when no repo is selected and clicking on it UI raised an error.

Comment 2 Mike McCune 2011-11-15 19:30:31 UTC
assigning to prad

Comment 3 Pradeep Kilambi 2011-12-06 20:29:28 UTC
The error message seems to be working or already fixed. If you click on 'synchronize Now' you should not be seeing the undefined method error. Regarding the the click action graying the button, seems to be an issue with version of the browser, newer versions of firefox dont give the same behaviour. 

Talking to shughes, we decided to remove the logic to disable button and keep it enabled.

commit b386ffe283254c249afd6d8c62b420028364bc01

Comment 4 Sachin Ghai 2011-12-28 10:19:33 UTC
Verified with following katello build:

[root@dhcp201-197 ~]# rpm -qa | grep katello
katello-glue-pulp-0.1.155-1.el6.noarch
katello-configure-0.1.48-1.el6.noarch
katello-trusted-ssl-cert-1.0-1.noarch
katello-cli-common-0.1.31-1.el6.noarch
katello-glue-foreman-0.1.155-1.el6.noarch
katello-common-0.1.155-1.el6.noarch
katello-httpd-ssl-key-pair-1.0-1.noarch
katello-0.1.155-1.el6.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-repos-0.1.4-1.el6.noarch
katello-cli-0.1.31-1.el6.noarch
katello-glue-candlepin-0.1.155-1.el6.noarch
katello-all-0.1.155-1.el6.noarch
katello-certs-tools-1.0.1-1.el6.noarch
[root@dhcp201-197 ~]# 

The reported error "undefined method `each' for nil:NilClass" is not reproducible while clicking on 'Sysncronize Now' button and withoiut selecting any repo.

However a long traceback is generated in production.log. I'll log a separate defect for that. Moving this to verified.

Comment 5 Sachin Ghai 2011-12-28 10:20:42 UTC
Created attachment 549803 [details]
No error on UI, when you click on 'Synchronize Now' button ithout selecting any repo.


Note You need to log in before you can comment on or make changes to this bug.