Bug 1286627

Summary: Web-UI: External menu plugin does not get displayed in the menu options
Product: Red Hat CloudForms Management Engine Reporter: Ramesh A <rananda>
Component: UI - OPSAssignee: Martin Povolny <mpovolny>
Status: CLOSED NOTABUG QA Contact: Ramesh A <rananda>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.5.0CC: cpelland, dclarizi, hkataria, jhardy, mpovolny, obarenbo, simaishi
Target Milestone: GAKeywords: ZStream
Target Release: 5.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ui
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1348629 (view as bug list) Environment:
Last Closed: 2016-07-11 12:09:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1348629    
Attachments:
Description Flags
no menu plugin
none
menu plugin working none

Description Ramesh A 2015-11-30 11:23:57 UTC
Created attachment 1100478 [details]
no menu plugin

Description of problem:
External menu plugin does not get displayed in the menu options

Version-Release number of selected component (if applicable):
5.5.0.12-rc2.20151124135609_653c0d4

How reproducible:
Very

Steps to Reproduce:
1. SSH into appliance and navigate to "/var/www/miq/vmdb" using the vmdb command
2. Add the below mentioned files in their following locations.
a) product/menubar/custom_redhat_section.yml:
type: section
name: Red Hat
id: redhat
before: svc
section_type: big_iframe
href: https://www.redhat.com

b) product/menubar/custom_redhat.yml:
type: item
name: Homepage
id: rht3
feature: redhat
rbac:
  feature: redhat
parent: redhat
href: https://www.redhat.com
item_type: big_iframe

c) product/menubar/custom_redhat_courses.yml
type: item
name: Courses
id: rht2
feature: redhat
rbac:
  feature: redhat
parent: redhat
href: https://www.redhat.com/en/services/training/all-courses-exams
item_type: big_iframe

d) db/fixtures/miq_product_features/redhat-miq_product_features.yml:
---
:name: Red Hat
:description: Access to Red Hat sectioin
:feature_type: node
:identifier: redhat
:children:

- :name: Red Hat Forums
  :description: Access to Red Hat forums
  :feature_type: node
  :identifier: redhat_forum
- :name: Red Hat Whatever
  :description: Access to Red Hat whatever...
  :feature_type: node
  :identifier: redhat_whatever

2. Restart the evmserverd service "service evmserverd restart"
3. Login to the appliance and check for the "Red Hat" link in the menu

Actual results:
Does not display the menu link to the external site. Refer the screenshot "no menu plugin" for further information

Expected results:
Should display the menu link.  This was working fine in 5.5.0.7-beta1.3.20151021133253_ed40d96 build. Refer the screenshot "menu plugin working" for further information.


Additional info:
PS:
==
Also tried executed the following command after editing the files and before restarting the evmserverd service, but with no success

RAILS_ENV=production rake assets:clean
RAILS_ENV=production rake assets:precompile

Comment 2 Ramesh A 2015-11-30 11:24:37 UTC
Created attachment 1100479 [details]
menu plugin working

Comment 3 Harpreet Kataria 2015-11-30 14:24:06 UTC
Martin,

Can you take a look at this one.

Thanks,
~Harpreet

Comment 5 Ramesh A 2016-06-16 18:54:40 UTC
Verification failed. Tested in 5.6.0.9-rc2.20160531154046_b4e2f6d.

After adding the necessary file, making changes in db/fixtures/miq_product_roles/redhat_access_user_roles.yml and restarting the evmserverd service, I am still not able to see external menu links in the top navigation.  However, I am to access the page if I give the url directly pointing to these links

Comment 9 Martin Povolny 2016-07-11 12:09:37 UTC
In upstream appliance there's one more mechanism that can turn off and on menu sections -- PermissionStore.

An an appliance, it is configured via config/permissions.yml

To get a menu section from a plugin displayed, the section feature needs to be added to this file similarly as the Access Insights (see line: - :accessInsights                                                                                        |module Vmdb).