Bug 1449696 - Error message displayed when adding playbook service catalog item to global region
Summary: Error message displayed when adding playbook service catalog item to global r...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.9.0
Assignee: Harpreet Kataria
QA Contact: luke couzens
URL:
Whiteboard: ansible_embed:distributed:playbook:se...
Depends On:
Blocks: 1459986
TreeView+ depends on / blocked
 
Reported: 2017-05-10 13:12 UTC by luke couzens
Modified: 2018-03-06 15:12 UTC (History)
6 users (show)

Fixed In Version: 5.9.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1459986 (view as bug list)
Environment:
Last Closed: 2018-03-06 15:12:06 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
screen showing error (113.39 KB, image/png)
2017-05-10 13:12 UTC, luke couzens
no flags Details

Description luke couzens 2017-05-10 13:12:19 UTC
Created attachment 1277616 [details]
screen showing error

Description of problem:Error message displayed when adding playbook service catalog item to global region


Version-Release number of selected component (if applicable):5.8.0.14


How reproducible:100%


Steps to Reproduce:
1.provision 2 appliances
2.setup replication
3.enable embedded role on remote region
4.add playbook repo to remote region
5.try to add service catalog item to global region using playbook

Actual results:Unexpected token < in JSON at position 0


Expected results:playbook adds or error saying 'cannot add playbook specific item to global region'


Additional info:
embedded ansible role is not enabled in global region

Comment 2 luke couzens 2017-05-10 14:14:55 UTC
Looking at this in more detail, I would suggest changing the way playbook catalog items are added and only show repos/playbooks from the _current_ region, so we only see region specific items to add. 

That way we shouldnt be able to add playbook items from other regions and thus not see this error message.

Comment 3 Greg McCullough 2017-05-10 17:27:32 UTC
Discussed with API team and it seems like the right solution here is to have the UI filter to the current region during the API call to retrieve the Ansible repos.

region_number is available as a virtual_column and therefore should allow filtering.  This can be discussed more with Jillian.

Let me know if we need to discuss more.

Comment 5 CFME Bot 2017-05-17 19:58:23 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:
https://github.com/ManageIQ/manageiq-ui-classic/commit/8b78486b7e77f2a6694d65af08d93a0d8362a614

commit 8b78486b7e77f2a6694d65af08d93a0d8362a614
Author:     Harpreet Kataria <hkataria>
AuthorDate: Mon May 15 16:59:11 2017 -0400
Commit:     Harpreet Kataria <hkataria>
CommitDate: Wed May 17 15:01:48 2017 -0400

    Changed API call to pass in region number get list of repos/playbooks
    
    Changed API call to get list of repos/playbooks to pass in current region number so only repos/playbooks in current region are displayed in drop down.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1449696

 .../controllers/catalog/catalog_item_form_controller.js          | 9 +++++----
 app/controllers/catalog_controller.rb                            | 4 +++-
 app/views/catalog/_st_angular_form.html.haml                     | 1 +
 .../controllers/catalog/catalog_item_form_controller_spec.js     | 3 ++-
 4 files changed, 11 insertions(+), 6 deletions(-)

Comment 7 luke couzens 2017-10-12 15:11:31 UTC
Verified in 5.9.0.2


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