This documentation is for WSO2 Business Activity Monitor 2.2.0. View documentation for the latest release.

Unknown macro: {next_previous_link3}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

You can create the toolbox similar as standalone BAM described here. In this section we shall we how to modify the default toolbox and get the toolbox functionality for tenant.

Here we see how to edit the KPI sample toolbox. In this section the following topics are included,

  1. Modifying Stream Definition

  2. Modifying Analytics script

  3. Modifying portal dashboard gadgets

Extract the $BAM_HOME/samples/toolbox/KPI_Phone_Retail_Store.tbox follow the below steps.

Modifying Stream Definition

  1. Go to stream definition directory within the extracted directory.

  2. Include the tenant credentials in the streams.properties in the following properties.

streams.definitions.defn1.username=tenantadmin@tenanatadmin.com
streams.definitions.defn1.password=tenantadmin

Modifying Analytics script

Modify the script as mentioned as mentioned in writing the tenant based hive script  . That is you should modify the Cassandra credentials when accessing the data.

  1. Go to analytics directory within the toolbox extracted directory.

  2. Open the phone_retail_store_script and edit it by changing the cassandra credentials.

    Eg:

    "cassandra.ks.username" = "tenantadmin@tenantadmin.com" ,
    "cassandra.ks.password" = "tenantadmin "

Further analytic script of the toolbox can be modified as mentioned here.

Modifying portal dashboard gadgets 

You have to modify the URL mentioned in accessing the jaggery applications in the gadget xmls.

  1. Go to dashboard/gadgets directory within the extracted toolbox directory.

  2. Open all .xml files (gadget xmls) and edit url following if exists. If it's not existing you can skip this section of steps.
    Eg: phone_brand_quantity_bar.xml

 

.........................

function update() {
var respJson = null;
$.ajax({
  url: "https://localhost:9443/t/tenantadmin/jaggeryapps/gadgetgen/phone_brand_quantity.jag",
dataType: 'json',

 //GET method is used

type: "POST",
async: false,

//pass the data
data: "",

//Do not cache the page
cache: false,

//success
success: function (html) {
respJson = html;
}
})

........................

Simlarly update all gadget xmls within the gadgets folder.

After updating all toolbox artifacts, zip the root extracted toolbox directory (KPI_Phone_Retail_Store) and rename to .tbox extension. This concludes all modifications for the tenant based toolbox. Now you can install the toolbox as mentioned here.



  • No labels