Bug 1006464 - Gadget Services Management doesn't work in a custom portal container
Summary: Gadget Services Management doesn't work in a custom portal container
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Enterprise Portal Platform 6
Classification: JBoss
Component: Portal
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: DR01
: 6.1.1
Assignee: Peter Palaga
QA Contact: Tomas Kyjovsky
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-10 16:19 UTC by William Antônio
Modified: 2019-01-01 03:40 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
An issue with the Service Management portlet caused a Javascript alert with the text "No services available or you do not have enough permission". This issue was not reproducible in this release, therefore the underlying issue has been addressed in another related code fix.
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description William Antônio 2013-09-10 16:19:27 UTC
Description of problem:

Services Management portlet won't work in a custom portal container. It will show the error "No service's available or you don't have enough permission" in a Javascript alert.


How reproducible:
Easy to reproduce using quickstarts

Steps to Reproduce:
1. Deploy the sample-portal container in JPP 6.0
2. Access the new container and log in as root
3. Access the Service Management gadget in URI /g/:platform:administrators/administration/servicesManagement

Actual results:

An alert with message "No service's available or you don't have enough permission" is shown.

Expected results:

List the services.

Additional info:

Notice that the AJAX call is done to the portal URL. See that the services management script [1] only uses the portal URL. If I modify it to the correct container name, it will work.

It is defined in file [2], but it's packaged in eXoGadgets. So, how can we override it?

I tried by making a copy of eXoGadgets to the extension and registering it in clienta-config.jar/conf/configuration.xml, no success...

For ServicesManagement the questions is: how can we override the gadget preferences?

[1] eXoGadgets/src/main/webapp/gadgets/ServicesManagement/script/script.js

ServicesManagement.prototype.init = function() {
        var monitor = eXo.gadget.ServicesManagement;
        var prefs = new _IG_Prefs();
        var servicesURL = prefs.getString("servicesURL");
        if (servicesURL && $.trim(servicesURL) != "") {
                monitor.SERVICES_URL = $.trim(servicesURL);
        } else {
                monitor.SERVICES_URL = monitor.DEFAULT_SERVICES_URL;
        }

        ...
        monitor.makeRequest(monitor.SERVICES_URL, monitor.renderServiceSelector);
};

[2] eXoGadgets.war/gadgets/ServicesManagement/ServicesManagement.xml

<UserPref name="servicesURL" display_name="__MSG_services_url__" default_value="/portal/rest/management"
            required="true"/>
  <Content type="html" view="home">

Comment 2 Peter Palaga 2013-11-26 19:02:33 UTC
Cannot reproduce with the upcoming JPP 6.1.1 DR1

Comment 3 Peter Palaga 2013-11-27 10:11:01 UTC
The issue is reproducible on JPP 6.1.0 GA.

Comment 4 Filip Kiss 2013-12-17 11:33:47 UTC
Reproducible on 6.1.0.GA, cannot reproduce on 6.1.1.DR1 and DR2 - changing to verified.


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