Previous Next JavaScript must be enabled to correctly display this content

## 6 Configuring User Interface

All the UI configurations are available in config.js while which is present under the `<CHANNEL_PATH>\framework\js\configurations` directory. JavaScript object for the configuration is declare by the name “configuration”. Application freeze this object so its value cannot be change in running memory.

Category of the configuration:

i18n: All the internalization specific configuration mentioned in this. Currently this category have list of rtl locales
Description of the illustration uiinterface6.png

Sharding: Domain sharding is a technique used to increase the amount of simultaneously downloaded resources for a particular website by using multiple domains. This allows websites to be delivered faster to users as they do not have to wait for the previous set of resources to be downloaded before beginning the next set. Implementer can introduce 3 additional domains for the UI

1. apiBaseURL: If the HTTP server and the application server are on same host, the property is set as “” otherwise set to host name and port of the application server. imageResourcePath: The base path from which the image resources are to be fetched. It can also be a relative path pointing to the same domain the page is running on or a fully qualified path to different server on which images are hosted

    sharding:
    {
    apiBaseURL: ""
    }

Authentication: OBAPI product ships with two type of authentication methods:

1. OAM Authentication
2. Non OAM Authentication (OBAPIAuthenticator)
3. JWT Authenticator (JWTAuthenticator)

Configuring OAM Authentication set type as OAM and also provide the provider URL of OAM in providerURL property.

For Non OAM set type as OBAPIAuthenticator or JWTAuthenticator based on requirement.

In the application, setting secure and public page is required. For this two properties are exposed as pages.securePage and pages.publicPage. As name suggest pages.securePage have the pathname of secure page and pages.publicPage have the pathname of public/unsecure page.

Description of the illustration uiinterface9.png

Third Party API’s: Some of the application module required integration with third party provider like facebook, linkedin, google etc. So in this category we maintained all the sdk url, api keys and provider url of third party api’s

Description of the illustration uiinterface10.png

API Catalogue: This category used for several context root available in OBDX API’s and their default versions. This is maintained at <CHANNEL_PATH>/ framework/js/api-catalogue

Description of the illustration uiinterface12.png

System Configuration: This category of configuration is used for system level properties. Brief description of properties are below:

componentAccessControlEnabled: Component access check(through role transaction mapping) is enabled or not. Depending of this property menu or link will filtered.

requestThrottleSeconds: OBAPI UI can cached service responses and it also distribute one API response to several caller. For example if 3 widgets calling same API, in this case application fire only one API and distribute its response to all the callers. requestThrottleSeconds property used for caching time of the response. Unit is in second. It means if you set requestThrottleSeconds as 5(second) it means if application fire same API within 5 second application return the same response which it fire earlier.

defaultEntity: Default entity if entity cannot be derived.

sslEnabled: SSL is enabled or not.

loggingLevel: Logging level of OBAPI UI.

    system:
    {
    componentAccessControlEnabled: true,
    requestThrottleSeconds: 5,
    defaultEntity: "",
    sslEnabled: true,
    loggingLevel: "LEVEL_ERROR",
    }

Development Configuration: This category of configuration is used during development phase. In this category we also have property for enabling accessibility checks during run time.

    development:
    {
    checkAccessibility: false,
    axeUrl: "https://cdnjs.cloudflare.com/ajax/libs/axe-core/3.3.2/axe.min.js"
     }

Domain Deployment:This flag is set enable true or false based on services deployment strategy.

Overriding Configurations:

If User wants to override any configuration available in config.js. They can do by putting all the modified properties in scripts/webpack/.obapi-config-override.json.

Please make sure any properties maintained here will be add and updated in original config.js