tree: a9b68b710336c292bcbd78af4afd0883dd1c380d [path history] [tgz]
  1. src/
  2. pom.xml
  3. README.md
modularity-server/external-modules/README.md

External UI Modules

UI modules leverage OSGi to register themselves to the module-registry. One can use the same mechanism to register external UI modules.

Register External UI Module

By default, external UI modules are not displayed in the home page to keep it de-cluttered. You can override this behaviour by adding a type home-ui-module as configuration (see how-to based on the method you are using)

Via an enricher

An entity can publish an external UI module though the org.apache.brooklyn.ui.modularity.enricher.BrooklynExternalUiModuleEnricher like so:

brooklyn.enricher:
- type: org.apache.brooklyn.ui.modularity.enricher.BrooklynExternalUiModuleEnricher
  brooklyn.config:
    # The fontawesome icon class to use
    external.ui.module.icon: fa-cog
    external.ui.module.name: My External UI Module
    # ID, hyphen-separated string
    external.ui.module.slug: my-external-module 
    # Sensor on this entity where the URL for this UI module should be published, default as `main.uri`
    external.ui.module.url.sensor: $brooklyn.sensor('...') 

Here is a table of the available configuration keys

Configuration keyTypeRequiredDefault
external.ui.module.iconStringNofa-external-link
external.ui.module.nameStringNo
external.ui.module.slugStringYes
external.ui.module.url.sensorSensorYesuse the main.uri sensor
external.ui.module.typeListNoCustom type to apply. Note that if you wish to display the external UI module to the home page, you need to add home-ui-module as a type

Via configuration files

Simple create a file named org.apache.brooklyn.ui.external.module-<slug>.cfg with the following content:

name=My external module
icon=fa-tasks
url=http://my.site/
types=my-module-type,other-module-type

Each file will generate a new external UI module.

Note that if you wish to display the external UI module to the home page, you need to add home-ui-module as a type