DBA.config.json

The DBA.config.json file stores the settings that affect business application web version performance. The file has the following structure by default:

{
  "targetRepo": "ID_REPO",
  "targetApp": "ID_APP",
  "ppServiceUrl": "",
  "locale": ["ru"],
  "refreshMetabaseOnLogon": "true",
  "repositories": {
    "ID_REPO": {
      "repoIdent": "ID_REPO",
      "apps": {
        "ID_APP": {
          "appIdent": "ID_APP",
          "breadcrumbRootTitle": "FORESIGHT. Business application",
          "mainMenuLogo": "assets/design/img/PPlogo_menuheader.png",
          "pageMetadataLogo": "assets/design/img/PPlogo_login.png"
        }
      }
    }
  }
}

Description of Fields

Below is the list of default fields contained in the JSON structure:

Field Description
targetRepo The identifier of the repository, to which default connection is established. As a value, specify identifier of one of the repositories, which settings are contained in the "repositories" group.
targetApp The identifier of the business application that will be opened. As a value, specify identifier of one of the business applications, which settings are contained in the "apps" group of the repository specified in targetRepo.
ppServiceUrl URL of the BI server, with which a business application will interact to get data.

locale

The array containing two-letter language codes to which the interface can be switched. By default, only one element corresponding to Russian is included into array. If any other additional languages are added to the array, then the start page used to log in to repository will contain hyperlinks to switch the interface language.
refreshMetabaseOnLogon Indicates whether repository contents is updated after the user is connected. Available values:
  • true. Repository contents is updated. When a repository is updated, descriptions of repository objects in use are requested and cached.

  • false. Default value. Repository contents is not updated. Cached descriptions of repository objects are used, or only those are loaded, which are required for building a business application start page.

repositories The data of the repository, to which connection is established. Several subsections ID_REPO can be created in this section.
ID_REPO The section with repository information. Field name must match the value specified in the repoIdent field.
repoIdent Repository identifier. Field value must match the name of the ID_REPO section.
apps Business application data. Several subsections ID_APP can be created in this section.
ID_APP The section with business application information. Field name must match the value specified in the appIdent field.
appIdent The identifier of business application in repository. Field value must match the name of the ID_APP section.
breadcrumbRootTitle The title that is displayed in the breadcrumb's root element.
mainMenuLogo The path to the image displayed at the top left corner above the objects list when the side menu is expanded.
mainMenuLogoMini The path to the image displayed at the top left corner above the objects list when the side menu is collapsed.
pageMetadataLogo The path to the image displayed above the login and password boxes.

It is also available to include additional fields into the root level of JSON structure that will be processed and will affect web application work. These fields have default values that are applied if the field is absent in the structure:

{
    ...
    "ping": 10000,
    "ppLibUrl": "assets/platform_modules",
    "ribbonAutoHiding": true,
    "externalJs": [],
    "externalCss": [],
    "onCloseQuery": "",
    "isSendLogToBI": "false",
    "showNavGroupFirstElement": "false",
    "clearMetabaseObjectsCacheOnOpen": "true",
    "logToConsole": "true",
    "showMessageForUnhandledError": "true",
    "authentication": "OAuth",
    "allowOauthProviders": ["FCC", "Google"],
    "autoStartOauthProvider": "FCC",
    "useDefaultUserOauth": "true",
    "plugins": [
        {
            "Type": "PP.Ui.Prx.MyLabel",
            "Path": "../plugins/MyLabel.js",
            "Css": "../plugins/MyLabel.css",
            "Name": "MyLabel",
            "Loaded": true
        },
        {
            ...
        }
    ],
    "modules" : {
        "CLASS":{
            "url": "http://project/app/olap.html",
            "urlSettings":
                {
                  "isRepo": true,
                  "isClass": true,
                  "mode": "edit",
                  "isConnectionId": true
                }
           }
        ...
    }
    ...
 }

Description of fields:

Field Description
ping The time spent on BI server connection check in milliseconds. If a field value is not set or the value that is less than 0 is set, the default value will be used - 120000 milliseconds (2 minutes). If the 0 value is set, a single request is sent to check BI server connection after opening the repository.
ppLibUrl Path to libraries of Foresight Analytics Platform used in business application work. By default, the relative path "assets/platform_modules" is used that is searched in the folder with installed extensions back end.

ribbonAutoHiding

Indicates whether the ribbon is hidden automatically on working with business application tools. Available values:

  • true. Hide the ribbon, show only tab names.

  • false. Do not hide the ribbon.

When a business application is opened for the first time, the field value is loaded to a user computer. The user can change the ribbon work mode, the selected mode will be used in all tools within the current user session.
externalJs The array of URLs to external JS files that must be loaded before business application startup. No external JS files are loaded by default.
externalCss The array of URLs to external CSS files that will be loaded before business application startup. No external CSS files are loaded by default.
onCloseQuery

External event handler that occurs on closing the object included in business application. A function in the JavaScript language is used as a event handler.

Specify URL of the external JS file with the function using one of the methods:

  • Use externalJs field.

  • Load the file on the  Layout and Formatting page in the Business Application <object name> dialog box.

In the onCloseQuery box specify name of the function in use as follows:

javascript:<function name(args)>

For example:

javascript:<onCloseQuery(args)>

The example of external JS file with the onCloseQuery function:

function onCloseQuery(args)
{
  console.log('onCloseQuery');
  console.log(args);
  console.log(args.instance.getReport());
  // Hide the action confirmation dialog box for saving changed data on object closing
  args.instance.isDirty = false;
}

After executing the example, the settings of the current regular report, data entry form, or express report are obtained using the getReport method. When the object is closed, the action confirmation dialog box for saving changed data s hidden using the isDirty property. All changes are saved by default.

To get settings of the Data Entry/Output Form specific class of objects, use the class property with the 2103041 value instead of the getReport method, for example:

function onCloseQuery(args)
{
  console.log('onCloseQuery');
  console.log(args);
  if (args.instance.class === 2103041)
    // Hide action confirmation dialog box for saving changed data on object closing
    args.instance.isDirty = false;
}

NOTE. The 2103041 identifier of the object class may change depending on the repository.

isSendLogToBI

Indicates whether operations that are sent by business application to BI server are logged. Logging is disabled by default. When the value is True, the operations log is recorded on BI server.

showNavGroupFirstElement

Indicates whether the first child element is displayed when navigating menu groups. Available values:

  • true. If the element containing child elements is selected, the first child element is opened. The parent element cannot be selected.

  • false. Default value. If the parent element is selected, the list of its child elements is displayed; if the child element is selected, it contents is opened.

clearMetabaseObjectsCacheOnOpen

Indicates whether object cache is cleared on opening. Available values:

  • true. Default value. If a repository object opens, its version is cleared in cache, and actual version is loaded to cache.

  • false. If an object opens, its cached version is used.

clientPDFExport

Indicates whether the principle of export of dashboard to PDF (*.pdf) is determined. Available values:

  • true. In the output file, dashboard blocks are located on one page and are displayed in the same way, as in the designer of business applications during export.

  • false. Default value. In the output file, dashboard blocks are located on separate pages and are displayed according to page settings.

logToConsole

Indicates whether errors are displayed in the browser console. Available values:

  • true. Default value. Errors are displayed in the browser console.

  • false. Errors are not displayed in the browser console.

showMessageForUnhandledError

Indicates whether error messages are displayed, for which there are not special handlers in business application scripts. Available values:

  • true. Default value. Error messages are displayed.

  • false. Error messages are not displayed.

authentication

Authentication type:

  • IntegratedDomain. Integrated domain. The user is authenticated by means of specifying domain, user name and password explicitly.

If this authentication type is used, the login dialog box does not display user name and password boxes. One should also add a domain user in the security manager, the Integrated Domain authentication type is selected in repository connection settings, and domain authentication on ASP.NET web server is set up.

  • OAuth. The user is authenticated by means of specifying an account of the services that support the OAuth 2.0 or OpenID Connect protocol.

To use this authentication type, see the Setting Up Login via External Services section.

If this authentication type is used, set also the allowOauthProviders mandatory attribute and the autoStartOauthProvider and useDefaultUserOauth optional attributes if required.

If the field is empty or it is not set, password authentication type is used. The user is authenticated by specifying use name and password explicitly.

allowOauthProviders

The array of authorization service names, which accounts can be used to log in to the web application. The field is mandatory if the authentication field is set to OAuth.

Available values are determined by the services specified on setting up OAuth/OpenID Connect protocol parameters in square brackets followed by a comma. For example:

"allowOauthProviders" : ["FCC","Google"]

autoStartOauthProvider

The number of the authorization service specified in the array of the allowOauthProviders field. For example:

"autoStartOauthProvider": "FCC"

On an attempt to log in to the web application using the OAuth or OpenID Connect protocol, the system automatically redirects to the selected service . If the service that is not contained in the allowOauthProviders field is used as a field value, automatic redirection is not executed.

The field is optional. If it is used, make sure that the authentication field is set to OAuth.

useDefaultUserOauth

Indicates which user is used to log in to the repository during authorization via the OAuth or OpenID Connect protocol:

  • true. Default value. Repository connection is executed under the default user, whose credentials were saved using the PP.Util utility.

  • false. Repository connection is executed under a specific user corresponding to the user who executed authorization on the external server. If this value is used, each user credentials for each repository should be saved using the PP.Util utility. For details about saving user credentials see the Setting Up Login via External Services section.

The field is optional. If it is used, make sure that the authentication field is set to OAuth.

plugins

It connects additional plugins. For details about creating a plugin, see the Creating a Plugin section.

The field contains plugin connection settings:

  • Type. Plugin identifier or map service type.

When you connect a plugin to platform tools, make sure that its identifier corresponds with the object instance type:

When you connect external map services to a map specify a map service type:

    • PP.Yandex. For Yandex maps.

    • PP.Bing. For Bing maps.

    • PP.ArcGis. For ArcGis maps.

    • PP.OpenStreetMap. For OpenStreetMap maps.

    • PP.Google. For Google maps.

  • Path. The path to JS file of the plugin relative to the folder with installed designer of business applications.

  • Css. The path to CSS file with plugin styles relative to the folder with installed designer of business applications.

  • Name. Plugin name.

  • Loaded. Plugin loading method:

    • true. Plugin is loaded on startup.

    • false. Plugin is loaded on demand.

NOTE. The False value is used only on connecting a plugin to a dashboard enumeration.

  • Params. Additional parameters. The field should contain the Param field with parameters:

    • On connecting an external map service to a map:

      • Name. The APIKey value.

      • Value. The API key value.

NOTE. Section attributes are set if an API key should be used for plugins of external map services.

modules

Parameters for opening objects in the web interface of business application. This section allows for creating several CLASS subsections.

CLASS

The section with information about opening the specified class object. The field name should correspond with the numeric value of the object class, for which opening parameters are to be specified. The numeric value of the object class can be obtained in the MetabaseObjectClass.

url

The URL of the web application page for object opening.

urlSettings

Parameters that will also be passed to the page opened via the URL.

isRepo

Send the repo parameter with name of the currently opened repository.

isClass

Send the class parameter with object class value.

mode

Send the mode parameter that determines an object opening mode. It may take the edit value (object opens for edit) and the view value (object opens for view). If the field is not specified, the object will be opened for view.

isConnectionId

Send the ConnectionId parameter with opened session moniker.

See also:

Installing and Setting Up Extensions Back End