Chapter 16. Configuring the Application

The application configuration is stored in the app-config.json file and describes:

[Note]

Note that the application configuration can be processed along with other elements in a backup and restore process. For more details, refer to Section Backing Up and Restoring the Application.

1. Managing the Application Configuration

Application Configuration can be exported to a JSON file to replicate the application on a new instance, as a backup, or as a way to automatically deploy changes on a running instance.

Here are some of the use cases allowed by this feature:

"I have configured the application with dashboards showing strategical-level KPIs for management and, for a demo, I need to configure operational-level views without losing the previous setup."

"I have configured my application on the integration environment with views, dashboards, workspaces, and permissions, and I want to back up this configuration to deploy other instances of the application with the same configuration without requiring any other operation."

"I have worked on dashboards, but I'm not happy with the modifications I did. I want to restore their previous states by using the reset feature."

"As a business analyst, I updated the widgets of a project that was already deployed and I need to make sure the next release will update the configuration on the production deployment."

1.1. Importing an Application Configuration File

This section describes importing application configuration parts using the web client.

[Note]

Note that the selected application elements of the current application will be replaced by those coming from the file. Therefore, it is recommended to back up the current application configuration before importing an application configuration file. That way the current configuration is easier to restore if any issues should arise from importing an external application configuration file. For more details, refer to Section Exporting an Application Configuration File

The app-config.json file can be used in a deployment to load application configuration automatically. For more details, refer to Section Deploying the Application.

After the import elements were selected, if the application has no workspaces or permission rules, the Application Initialization Bean is called. For more details, refer to Section Setting Advanced Initialization.

Procedure 16.1. To Import an Application Configuration File
  1. Connect to the web client as a user with sufficient permissions to proceed. For more details, refer to Section Accessing the Web Client and Part Securing.

  2. In the Topbar Menu Settings, click on Settings > Application Configuration > Reset from File. A dialog opens.

    Figure 16.1. Importing an Application Configuration File
    Importing an Application Configuration File
  3. Select the JSON configuration file to import and click on NEXT. The next page opens.

    Figure 16.2. Selecting the Application Elements to Reconfigure
    Selecting the Application Elements to Reconfigure
  4. By default, all the options are checked. Untick the elements for which you do not want to reset the configuration. At least one should be selected.

    [Note]

    Note that:

    • If the corresponding workspaces and folders are not defined in the import file, resetting the application configuration moves the "orphan" scenarios to workspace Lost and found. To prevent this, untick the option Workspaces and Folders. For more details, refer to Section Addressing Orphan Scenarios.

    • The version of the selected configuration file is displayed. If it says legacy, it means that the file was created with a DOC version prior to 4.0.1-fp2. In this case, the Permission Rules checkbox is unticked.

  5. Tick the confirmation checkbox.

  6. Click on RESET to replace the current element configuration with the one from the imported file. The dialog closes.

  7. The web client reloads to reflect updated settings, workspaces, and permissions. In some cases, you may need to refresh the web page.

1.2. Exporting an Application Configuration File

The current application configuration can be exported in a .json file that can be analyzed, edited, and reimported. For more details, refer to Section Importing an Application Configuration File. The file structure defines all application elements and their internal structure, such as the settings, views, dashboards, workspaces, and folders.

The Permission Rules, Rulesets, and Groups are also stored in the exported structure. For more details, refer to Section Defining Permission Rules and Rulesets.

Procedure 16.2. To Export an Application Configuration File
  1. Connect to the web client as a user with sufficient permissions to proceed. For more details, refer to Section Accessing the Web Client and Part Securing.

  2. In the Topbar Menu Settings, click on Settings > Application Configuration > Export to File. The application configuration is exported in a .json file on the user machine.

1.3. Resetting the Application Configuration to Default

DOC allows discarding changes made on the application to come back to the application default configuration.

Procedure 16.3. To Reset the Application Configuration to Default
  1. Connect to the web client as a user with sufficient permissions to proceed. For more details, refer to Section Accessing the Web Client and Part Securing.

  2. In the Topbar Menu Settings, click on Settings > Application Configuration > Reset Default Configuration. A dialog opens.

    Figure 16.3. Confirming the Application Reconfiguration
    Confirming the Application Reconfiguration
  3. Tick the confirmation box and click on RESET. The dialog closes. If an app-config.json file is deployed with the application, it is used and the effect is the same as if the file was imported using the Reset from file functionality. Otherwise, all elements are deleted and the application initialization code is called. For more details, refer to Section Setting Advanced Initialization.

  4. The web client reloads to reflect updated settings, workspaces, and permissions. In some cases, you may need to refresh the web page.

1.4. Addressing Orphan Scenarios

Scenario data is never affected when you reset the application configuration, i.e. existing scenarios are always preserved in the application.

[Note]

Note that "Existing" scenarios refer to scenarios that have not been deleted, for instance, using the options Move to Trash and Empty Trash. For more details, refer to Section Using the Scenario List Widget.

However, in some cases, users can no longer see existing scenarios in the web client after resetting the application configuration, as described in Sections Importing an Application Configuration File or Resetting the Application Configuration to Default. This happens when workspaces are deleted by the reset and the scenarios in them become "orphans".

Orphan scenarios are moved to a workspace called Lost and found. It is automatically created, if necessary, with the scenario-service user as the owner and default permission rules.

For example, importing a configuration file can lead to this situation as follows:

  • Initially, the application has workspace W1 with scenario S1 in it.

  • The user exports app-config.json.

  • The user creates workspace W2 and scenario S2 in it.

  • The user reimports app-config.json and leaves the option Workspaces and Folders ticked (default).

The result is that:

  • Since workspace W1 was exported in app-config.json, it continues to exist with its scenario S1 as scenarios are always preserved in the application database.

  • Scenario S2 is placed in workspace Lost and found as an orphan.

When this happens, the user performing the reset needs to use the Permissions view to change the permissions on workspace Lost and found.

For more details, refer to Section Understanding the "Application Elements Override" Tab.

[Note]

Note that , to prevent moving all scenarios to workspace Lost & Found, users can untick the option Workspaces and Folders when Importing an Application Configuration File.

Procedure 16.4. To Edit the Permissions over the "Lost and Found" Workspace
  1. Connect to the web client as a user with sufficient permissions to proceed. For more details, refer to Section Accessing the Web Client and Part Securing.

  2. In the Topbar Menu Settings, click on Settings > Application Configuration > Permissions. The Permissions management view opens.

    Figure 16.4. Editing the Lost and Found Workspace Permissions
    Editing the Lost and Found Workspace Permissions
  3. Click on the tab Application Elements Overrides. The page refreshes.

  4. In the left panel Application Elements, click on Lost and found. The page refreshes.

  5. In the middle panel, click on Everybody or only the users impacted. The page refreshes.

  6. In the right panel, tick the Access and Modify checkboxes for the Workspaces and Scenarios.

  7. In the toolbar, click on the button Save. The configuration is updated. This way, the selected users can move the orphan scenarios from the Lost and found workspace to the desired one(s). For more details, refer to Chapter Managing the Application Data.

2. Setting Application Preferences

Application preferences allow defining the default settings of the web client and various customization parameters.

They come in addition to dedicated views, which allow managing custom views and dashboards, permissions, workspaces, or entity color hints. For more details, refer to Section Understanding the Management Views.

Application Preferences can be accessed from the Topbar Settings Menu in Settings > Application Configuration > Preferences. For more details, refer to Section Understanding the Topbar Settings Menu.

[Note]

Visibility of the application elements depends on:

Application controllers can be implemented to manage the application custom behavior, look and feel. For more details, refer to Section Using a Web Application Controller.

Figure 16.5. Customizing Application Preferences with an Application Controller
Customizing Application Preferences with an Application Controller

The following table lists all the default settings that can be modified.

Settings NameComponentDescriptionDefault Value
APPLICATION_TITLENAVIGATION_BARThe title of the application displayed in the Navigation BarDOC sample project
COMPARISON_DATA_ROWS_LIMITDATAThe maximum number of rows allowed in the selected and reference scenario to fetch comparison data50000
DATA_ROWS_LIMITDATAThe maximum number of rows the web client fetches in any query10000
DEFAULT_DBRF_EXPORT_TASK_IDTASKId of the DBRF Export Task to use when clicking Export DBRFDbrfExportTask
DEFAULT_EXCEL_EXPORT_TASK_IDTASKId of the Excel Export Task to use when clicking Export ExcelSimpleExcelExportTask
DEFAULT_EXCEL_IMPORT_TASK_IDTASKId of the Excel Import Task to use when clicking Import ExcelScenarioImportTask
DEFAULT_SCENARIO_IMPORT_TASK_IDTASKId of the DBRF Import Task to use when clicking Import DBRFDbrfImportTask
FILTER_BUTTON_SHOWVIEW_TOOLBARShow or hide the filter Buttontrue
FILTER_SCOPEFILTERDefines the filters scope in views and dashboards. When scope is set to "GLOBAL" (default) filters are shared between views and dashboards, when set to "VIEW", filters scope is limited to the view from which they have been set.GLOBAL
GENE_COLOR_PALETTE_INTERPOLATECOLORColor Palette Interpolation (use more colors when true)true
GENE_COLOR_PALETTE_INTERPOLATION_BOOSTCOLORBoost the color over the pivot color. Must be > 0, 1 is neutral4
GENE_COLOR_PALETTE_INTERPOLATION_PIVOT_COLORCOLORPivot color used for interpolation. Impacts darkness/lightness of the colors#E0E0E0
GENE_CONFLICTS_DETECTIONTABLEWhen set to true, the Table Widget uses conflict detection when saving changestrue
GENE_DASHBOARD_COLUMNSDASHBOARDThe Dashboard Component Layout Columns20
GENE_DASHBOARD_MARGINDASHBOARDThe Dashboard Component margins in pixels (EXPERIMENTAL)20
GENE_DASHBOARD_ROWSDASHBOARDThe Dashboard Component Layout Rows20
GENE_DAY_COLORS_SETTING_NAMECOLORBackground colors based on week day used for the time axis option. Must be a seven string array, the first value is Monday.["#FAFAFA", "#FAFAFA", "#FAFAFA", "#FAFAFA", "#FAFAFA", "#EAEAEA", "#EAEAEA"]
GENE_DEFAULT_COLOR_PALETTECOLORDefault Color Palette (material or default)default
GENE_DEFAULT_PALETTE_LIGHTNESS_LEVELCOLORLightness range for colors generated with the default palette (one of low, medium and high)medium
GENE_DEFAULT_PALETTE_SATURATION_LEVELCOLORSaturation range for colors generated with the default palette (one of low, medium and high)medium
GENE_DISABLE_COLOR_HINTSCOLORRemove all color hints from table and instance pickers if truefalse
GENE_THEMEDASHBOARDThe CSS classname of DOC Theme, default is unset, use 'gene-theme-compact' for compact themeAPPLICATION
ISSUES_LIST_LIMITISSUES_LIST_WIDGETThe maximum number issues of each Type (i.e. data and schema) displayed in the Issues List Widget5000
HOME_VIEW_IDHOMEID of the View used as Home49ea8f74-6e9e-4dcc-9878-df8c164ed593
JOBS_FILE_RESULTS_AUTO_DOWNLOADTASKWhen a current user Job Completes and has File Result, the download starts automaticallytrue
JOBS_FILE_RESULTS_AUTO_DOWNLOAD_IGNORED_TASKSTASKComma-separated list of Task Identifiers, ignored by JOBS_FILE_RESULTS_AUTO_DOWNLOAD settingScenarioImportTask
JOBS_VIEW_SHOW_NEW_JOB_BUTTONJOBS_VIEWShow the "Run New Job" (magic wand) button in the Job Listtrue
MAP_MAPBOX_API_KEYMAP_WIDGETMapbox direction API token necessary for the Map Widget, available at mapbox.com 
MAP_MAPBOX_DIRECTION_API_URLMAP_WIDGETMapbox direction API url necessary for the Map Widget, available at mapbox.com 
MAP_MAPTILER_API_KEYMAP_WIDGETMaptiler API token necessary for the Map Widget, available at maptiler.com 
NAVIGATION_BAR_SHOW_APPLICATION_NAMENAVIGATION_BARShow the application name in the top navigation bartrue
NOTIFICATIONS_SHOW_JOB_PROGRESSNOTIFICATIONSNotify the progress of a jobfalse
NOTIFICATIONS_SHOW_JOB_RESULTNOTIFICATIONSNotify the completion of a jobtrue
NOTIFICATIONS_SHOW_JOB_STATUS_CHANGENOTIFICATIONSNotify status changes (before completion) of a jobfalse
PIVOT_SHOW_CUSTOM_TYPESPIVOTWhen set to true, the Pivot Table Widget can be used with Custom Types (EXPERIMENTAL)false
RUN_SCHEMA_CHECKERS_ON_MODIFICATIONSTABLEWhen set to true, the Table Widget automatically runs checkers upon data modificationtrue
SCENARIO_COMPARISON_TOGGLE_SHOWSCENARIO_COMPARISONShow or hide the Scenario comparison toggle Buttontrue
SCENARIO_IMPORT_DIALOG_PRESERVE_FILE_NAMEIMPORT_SCENARIO_MODALControls the behavior of scenario import dialog, if true the title is the file name without extension, humanized version otherwisetrue
SCENARIO_PICKER_SHOWSCENARIO_PICKERShow or hide the Scenario Pickertrue
SCENARIO_PICKER_SHOW_CLEAR_BTNSCENARIO_PICKERShow or hide the Scenario Picker "Clear" Buttontrue
SCENARIO_PICKER_SHOW_CREATE_BTNSCENARIO_PICKERShow or hide the Scenario Picker "Create" Buttontrue
SCENARIO_PICKER_SHOW_VIEW_ALL_BTNSCENARIO_PICKERShow or hide the Scenario Picker "View All" Buttontrue
SETTINGS_MENU_SHOW_APPLICATION_CONFIGURATIONSETTINGS_MENUShow or hide Application Configuration entry in the top right Settings Menutrue
SETTINGS_MENU_SHOW_GLOBAL_PREFERENCESSETTINGS_MENUShow or hide Global Preferences entry in the top right Settings Menutrue
SETTINGS_MENU_SHOW_NEW_DASHBOARDSETTINGS_MENUShow the "Create New Dashboard" entry in the top-right Settings menutrue
SETTINGS_MENU_SHOW_NEW_VIEWSETTINGS_MENUShow the "Create New View" entry in the top-right Settings menutrue
SETTINGS_MENU_SHOW_WORKSPACESSETTINGS_MENUShow the Workspace menu in the top-right Settings menutrue
SETTINGS_MENU_VIEW_DASHBOARD_MANAGESETTINGS_MENUShow the "Configure" entry in the Views and Dashboards sub menutrue
SETTINGS_MENU_WORKSPACES_CREATE_NEWSETTINGS_MENUShow the "Create New Workspace" entry in the top-right Settings menutrue
SETTINGS_MENU_WORKSPACES_MANAGESETTINGS_MENUShow the "Manage Workspaces" entry in the top-right Settings menutrue
SIDEBAR_SHOW_HOMESIDEBARShow the Home entry in the sidebartrue
SYSTEM_MENU_SHOW_CUSTOM_COLORSCOLORShow the color configuration link in the system menutrue
TABLE_SHOW_CUSTOM_TYPESTABLEWhen set to true, the Table Widget can be used with Custom Typesfalse
TASK_MENU_SHOW_EXPORT_DBRFTASK_MENUShow the "Export Data To DBRF File" entry in the top-right Jobs menutrue
TASK_MENU_SHOW_EXPORT_EXCELTASK_MENUShow the "Export Data To Excel File" entry in the top-right Jobs menutrue
TASK_MENU_SHOW_IMPORT_FILETASK_MENUShow the "Import Data from DBRF File" entry in the top-right Jobs menutrue
TASK_MENU_SHOW_MENUTASK_MENUShow the top-right Jobs menutrue
TASK_MENU_SHOW_NEW_TASKTASK_MENUShow the "Run New Job" entry in the top-right Jobs menutrue
TASK_MENU_SHOW_RUNNING_JOBSTASK_MENUShow a badge and the number of running Jobstrue
TASK_MENU_SHOW_JUPYTERLABTASK_MENUShow the "JupyterLab" entry in the top-right Jobs menufalse
TASK_MENU_SHOW_TASK_MONITORTASK_MENUShow the "Job List" entry in the top-right Jobs menutrue
WORKSPACE_PICKER_SHOWWORKSPACE_PICKERShow or hide the Workspace Pickertrue
WORKSPACE_PICKER_SHOW_CREATE_BTNWORKSPACE_PICKERShow or hide the Workspace Picker "Create" Buttontrue
WORKSPACE_PICKER_SHOW_VIEW_ALL_BTNWORKSPACE_PICKERShow or hide the Workspace Picker "View All" Buttontrue

In addition to the list above, users can add any of the following parameters to precisely configure the look and feel of the web client by customizing the page title, colors, logo, font and other CSS variables.

Settings NameDescriptionDefault Value
GENE_DISABLE_COLOR_HINTSFlag to disable color hints in Data Grids, Data Explorer and instance picker. For more details, refer to Sections Using the Data Grid Widget and Using the Data Explorer Widget.false
GENE_COLOR_PALETTEThe default color palette used in widgets (charts, tables,...), must be an array of css colors, e.g. ["#54011", "#fa8489", "#ff0000"]. For more details, refer to Section Understanding the Custom Colors View.-
--gene-logo-backgroundThe top left corner logo in Base64 format as follows: url(“data:image/XX;base64,XX=”). For more details, refer to Section Understanding the Application Logo.-
--gene-font-familyThe default application font-
--gene-text-colorCSS Variable-
--gene-selected-row-background-colorCSS Variable-
--gene-hover-row-background-colorCSS Variable-
--gene-error-colorCSS Variable-
--gene-warning-colorCSS Variable-
--gene-error-text-colorCSS Variable-
--main-color-lightestCSS Variable-
--main-color-lighterCSS Variable-
--main-color-lightCSS Variable-
--main-colorCSS Variable-
--main-color-darkCSS Variable-
--main-color-darkerCSS Variable-
--main-color-darkestCSS Variable-
--secondary-color-lightCSS Variable-
--secondary-colorCSS Variable-
--secondary-color-darkCSS Variable-
--secondary-color-darkerCSS Variable-
--cool-grey-lightestCSS Variable-
--cool-grey-lighterCSS Variable-
--cool-grey-lightCSS Variable-
--cool-greyCSS Variable-
--cool-grey-darkCSS Variable-
--cool-grey-darkerCSS Variable-
--cool-grey-darkestCSS Variable-
--alert-infoCSS Variable-
--alert-info-lighten-10CSS Variable-
--alert-errorCSS Variable-
--alert-error-lighten-10CSS Variable-
--alert-warningCSS Variable-
--alert-warning-lighten-10CSS Variable-
--alert-successCSS Variable-
--alert-success-lighten-10CSS Variable-
--default-view-paddingCSS Variable-
--default-widget-border-radiusCSS Variable-
Figure 16.6. Using a Customized Web Client
Using a Customized Web Client

3. Setting Advanced Initialization

At the very first Scenario Service startup, when the MongoDB database is empty, a check is made on the existence of a configuration file which name is defined by the scenario-management.app-config.file property (default value is app-config.json).

If this file is found, the application configuration elements it contains are loaded in the application.

This behavior reflects the default values scenario-service-base that the Spring Boot application uses by default.

 scenario-management:
  app-config:
    file: /app-config.json         # Configuration file to use for reset
    # Following parameters configure the application reset on startup.
    # If a scenario-management.app-config.file is defined and exists it will be
    # used to reset the application, otherwise reset will erase existing elements
    # and reinitialize through the application initializers.
    #
    reset:
      mode: always                  # init (default) | always | never
      views-dashboards: true      # reset views and dashboard (default true)
      workspaces: true            # reset workspaces (default true)
      permissions: true           # reset permissions (default true)
      app-preferences: true       # reset Application Preferences (default true)

It is possible to override scenario-management properties by adding them in application.yml of the scenario-service-extension module.

The possible values for the scenario-management.app-config.reset.mode property are :

  • init: if present, the file is loaded at the first startup of Scenario Service, when application database is empty.

  • always: if present, the file is reloaded at every Scenario Service startup.

  • never: the is never loaded.

[Note]

Note that,when a user calls the interactive "Reset Default Configuration" feature, all the elements of the scenario-management.app-config.file are loaded, if present, regardless of the scenario-management.app-config.reset.mode and the individual reset flags.

In addition, an initialization bean is looked for and invoked if found. This gives you the opportunity to define some global initialization of the application, such as creating global workspaces or installing general permission rules. You can consider the code in this bean to be responsible for creating workspaces, and permissions always needed in your application.

To do so, define a class that implements WorkspaceAndPermissionRulesInitializer (Javadoc) in the scenario-service-extension, and annotate it with @Component to make it a bean class. In this class, you will override three methods:

  • initWorkspaces(String applicationId, InitWorkspaceApi initWorkspaceApi)

  • initPermissionRules(String applicationId, PermissionRulesApi permissionRulesApi)

  • initUser(String applicationId, GeneUser user, InitUserApi initUserApi)

The first two methods are called when the application starts or after a reset from a configuration file. The first one receives an InitWorkspaceApi (Javadoc) instance as argument, which contains the necessary API to create a workspace, etc. The second one receives a PermissionRulesApi (Javadoc) instance as argument, which contains the necessary API to add permission rules. For more details, refer to Section Defining Permissions.

Finally, the third method is called when a user cannot access any workspace, typically when they log in for the first time. This is where a private workspace for the user can be created, for example.

Note that a freshly generated application contains an implementation of this bean, provided as an example, that duplicates the default behavior. You are free to modify it at will, or even remove it if you want to keep the default behavior and save some code.

The user initialization attaches a gene_user_initialized flag to each Keycloak user once the initialization is completed. The user initialization can be disabled by setting the property scenario-management.users.initialize to false in the default.yml configuration file of the scenario-service-extention module. This can be useful, for example, if your keycloak is configured with users in read-only mode.

4. Setting Permissions Upon Element Creation

If you provide a bean class that implements ApplicationElementCreationHandler (Javadoc), its methods are called whenever a workspace, a scenario, or a view/dashboard is created. This interface defines three methods, named onWorkspaceCreation, onScenarioCreation, and onViewDashboardCreation.

These three methods take as argument:

  • the user who created the application element;

  • the application element (workspace, scenario, view/dashboard) just created;

  • an ApplicationElementPropertiesApi and a PermissionRulesApi instance that provide methods to set properties on the application element and to add permission rules. For more details, refer to Section Defining Permissions.

You could, for example, use one of these methods to set specific properties on a just-created scenario.

Here also, a freshly generated application contains an implementation of this bean, provided as an example, that duplicates the default behavior, that is, do nothing. You are free to modify it at will, or even remove it if you want to keep the default behavior and save some code.

5. Using an Application Controller

Developers can create custom application controllers to use in the Application Preferences. For more details, refer to Section Setting Application Preferences.

This feature lets the user configure the visibility of all the existing elements according to contextual information and introduce further customizations.

This means that each time one of these elements changes, for instance when the user selects a different scenario, or navigate to another view, the web client is updated according to the new context.

[Note]

All of these customizations and extensions are linked to the application context. For more details, refer to Section Understanding Widget Context.

Note that there are several parts of the application that can be customized through a custom application controller.

The typical use cases the application controller addresses are the following:

  • Hide some existing default elements (e.g. " Hide the Tasks menu for some users")

  • Extend the Existing elements with custom ones (e.g. " Add a new menu" or " Customize the toolbar")

Here is an exhaustive list of all configurable and extensible elements through the Web Application Controller mechanism.

  • Configuring the View and Dashboard Title allows to override the current view or dashboard title.

  • Configuring the Header Bar Menus allows to set the:

    • Header Bar visibility

    • Task Menu and items visibility

    • System Menu and items visibility

    • Custom Application Menus

  • Configuring the Side Navigation Items allows to set the:

    • Sidebar visibility

    • Workspace Selector visibility

    • Home page link visibility

    • Views and Dashboards List visibility

  • Configuring the Views and Dashboards Toolbar allows to set the:

    • Toolbar visibility

    • Scenario picker visibility

    • Default buttons visibility

    • Custom Toolbar Elements (Buttons, Labels, Progress, Searchbar)

5.1. Implementing an Application Controller

To implement a custom web application controller, you first need to create a class that implements the interface GeneApplicationController.

/**
 * Implementing a GeneApplicationController allows to override some common patterns of the default DOC Web Application
 * such as the header, menus, sidebar, toolbars and titles.
 *
 * Note that GeneApplicationController does not provide extension APIs to override widget behavior. To do so
 * you have to use GeneWidgetController API.
 */
export interface GeneApplicationController {

    /**
    * When provided, the component will replace the default Gene component for the header bar
    */
    header?: {
        component?: Type<any>;
     },

    /**
    * When provided, the component will replace the default Gene component for the sidebar
    */
    sidenav?: {
        component?: Type<any>;
    }

    /**
     * This method allows to override and add additional Menus in the top bar.
     * This method is being called by GeneFramework each time current ViewDashboard or GeneContext
     * change.
     *
     * @param view current displayed view
     * @param context current context
     */
    customizeMenus?: (context: GeneContext, view: ViewDashboard) => Observable<GeneApplicationMenu[]>;

    /**
     * This method allows to override and add additional GeneToolbarElement in the current ViewDashboard
     * toolbar.
     * This method is being called by GeneFramework each time current ViewDashboard or GeneContext
     * change.
     *
     * @param view current displayed view
     * @param context current context
     */
    customizeViewDashboardToolbar?: (context: GeneContext, view: ViewDashboard) => Observable<GeneToolbarElement[]>;

    /**
     * This method allows to override the View and Dashboard titles.
     * This method is being called by GeneFramework each time current ViewDashboard or GeneContext
     * change.
     *
     * @param view current displayed view
     * @param context current context
     */
    customizeViewDashboardTitle?: (context: GeneContext, view: ViewDashboard) => Observable<string>;

    /**
     * This method allows to override DOC default configuration.
     * This method is being called by GeneFramework each time current ViewDashboard or GeneContext
     * change.
     *
     * Note that it is safe to modify the configuration received as a parameter and return it.
     *
     * @param view current displayed view
     * @param context current context
     * @param configuration default application configuration
     * @return Observable of the partial configuration to override
     */
    customizeDefaultConfiguration?: (context: GeneContext, view: ViewDashboard) => Observable<GeneApplicationConfiguration>;

}

Here is an example of a custom controller that adds a new Menu in the Header Bar and hides the default Task Menu. Note that this controller is available as a sample:

export class SampleApplicationController implements GeneApplicationController {

    // Customize Header menu by adding a 'Factory Menu'
    // With two Menu Items
    customizeMenus(context: GeneContext, view: ViewDashboard): Observable<GeneApplicationMenu[]> {
        return of([
            {
                icon: 'factory',
                id: 'factory-menu',
                title: 'Factory Menu',
                menuGroups: [
                    {
                        title: 'Menu Group 1',
                        menuItems: [
                            {
                                label: 'Menu Element 1',
                                icon: 'employee',
                                clickHandler: () => alert('Menu Element 1 Clicked !')
                            },
                            {
                                label: 'Menu Element 2',
                                icon: 'employee',
                                clickHandler: () => alert('Menu Element 2 Clicked !')
                            }
                        ]
                    }
                ]
            }
        ]);
    }

    // Customize default Application Configuration
    // - Hide the Task menu (always)
    customizeDefaultConfiguration(context: GeneContext, view: ViewDashboard,  configuration: GeneApplicationConfiguration): Observable<Partial<GeneApplicationConfiguration>> {
        return of({
            header: {
                taskMenu: {
                    hide: true
                }
            }
        });
    }
}

5.2. Registering an Application Controller

In the first component that is started, which is the app.component.ts, DOC can register multiple application controllers through GeneApplicationService.

export class AppComponent {

    constructor(translate: TranslateService, settingsService: GeneSettingsService, applicationService: GeneApplicationService) {

        // ...
        // Register a custom app controller sample
        applicationService.registerApplicationController('Sample Custom Menu', () => new SampleCustomMenusApplicationController());
        // ...
    }
}