Bug 1393711

Summary: openshift-jvm OSGi: TypeError: t.bundles.sortBy is not a function
Product: OpenShift Container Platform Reporter: Libor Fuka <lfuka>
Component: Management ConsoleAssignee: Alexandre Kieling <abrianik>
Status: CLOSED ERRATA QA Contact: Peng Li <penli>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.3.1CC: aos-bugs, jforrest, jokerman, lfuka, maschmid, mmccomas, penli, tdawson
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Reference to function 'sortBy' of Sugar JavaScript library, which is not included in the application. Consequence: OSGi Bundles tab doesn't show expected content Fix: Change reference to Sugar library with reference to an equivalent function in Lodash library. Result: OSGi Bundles tab shows expected content
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-18 12:54:27 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:
Attachments:
Description Flags
screenshot none

Description Libor Fuka 2016-11-10 08:23:01 UTC
Description of problem:
openshift-jvm OSGi: Bundles tab shows 'TypeError: t.bundles.sortBy is not a function' in JavaScript console (Webconsole in Firefox)

Version-Release number of selected component (if applicable):
openshift-jvm version: 1.0.50

How reproducible:
always

Steps to Reproduce:
1. Deploy some camel route to OCP (for example https://github.com/jboss-fuse/application-templates/blob/application-templates-2.0.fuse-000008/quickstarts/karaf2-camel-amq-template.json)
2. Open Java console from s2i-karaf2-camel-amq-xxx pod page
3. OSGi tab -> Bundles
4. See JavaScript console in browser

Actual results:
'TypeError: t.bundles.sortBy is not a function' in JavaScript console (Webconsole in Firefox)

Comment 1 Alexandre Kieling 2016-11-10 21:32:59 UTC
Fix ready for testing. Please use openshift-jvm v1.0.52

Comment 2 Jessica Forrester 2016-11-11 11:56:08 UTC
in web console in https://github.com/openshift/origin-web-console/pull/858

Comment 3 Troy Dawson 2016-11-11 19:46:14 UTC
This has been merged into ocp and is in OCP v3.4.0.25 or newer.

Comment 5 Peng Li 2016-11-17 06:54:31 UTC
@Libor
Is OSGi tab only available when test karaf2?I tried karaf-camel-amq and karaf-camel-rest-sql archetype, haven't seen such a tab.

If so, can you give the steps to deploy karaf2-camel-amq? 

I use below steps to deploy karaf-camel-rest-sql

1. instantiate a FIS maven archetype,
mvn archetype:generate \
  -DarchetypeCatalog=https://repo.fusesource.com/nexus/content/groups/public/io/fabric8/archetypes/archetypes-catalog/2.2.0.redhat-079/archetypes-catalog-2.2.0.redhat-079-archetype-catalog.xml \
  -DarchetypeGroupId=io.fabric8.archetypes \
  -DarchetypeVersion=2.2.0.redhat-079 \
  -DarchetypeArtifactId=karaf-camel-rest-sql-archetype

2. process and apply the template (from the file in the archetype)

oc process -f quickstart-template.json -v GIT_REPO=. | oc create -f -  # start a binary build
oc start-build s2i-quickstart-karaf-camel-rest-sql --from-dir=.

Comment 6 Libor Fuka 2016-11-21 07:35:54 UTC
You need to use https://github.com/jboss-fuse/application-templates/blob/application-templates-2.0.redhat-000026/quickstarts/karaf2-camel-amq-template.json.

This should be enough for building and deploying amq karaf2 quickstart. Other steps like mvn should not be needed.

Comment 8 Peng Li 2016-11-22 09:01:02 UTC
verified OpenShift v3.4.0.26+f7e109e

Comment 9 Peng Li 2016-11-22 09:05:21 UTC
Created attachment 1222624 [details]
screenshot

Comment 11 errata-xmlrpc 2017-01-18 12:54:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:0066