Skip to Content
DocsDeveloping appsConfiguring application

Configuring application

Open Settings in the app tree menu.

Metadata cache

Metadata can be cached in the main memory of the server to speed up application page loading and scenario execution. By default, the cache is enabled when a new application is created.

App page customization

Application page can be customized using Javascript. The customization can depend on the user (e.g. the group of the current user). The main use case we had in mind is to facilitate creation of custom business UIs: the UI itself is created using the UI Applications mechanism where you implement the business logic; then app page customization mechanism is used to customize the analyst view’s menu to easily open UI applications and/or open UI applications on page load.

To customize app page, enter your Javascript code into the App page customization editor. The following example:

  1. Redefines the menu in the analyst view (see switchToAnalystView function) to open UI application called UIAccountOrganizerApp.
  2. Switches to the analyst view for users from a group with groupId = 1.
  3. The commented out part of the code, allows further to hide the menu and open the UI application on page load.
var appSpecName = "UIAccountOrganizerApp"; window.switchToAnalystView = function() { var leftMenuView = webixFindSubview($$("pageLayout"), "leftMenu") var appPageSidebarView = { ilId: "leftMenu", view: "sidebar", width: leftMenuWidth, scroll: "auto", on: { onItemClick: function (id) { var name = this.getItem(id).value; var type = this.getItem(id).ilType; if (type === "TasksNode") { showUIApp(appSpecName); } else if (type === "ActivityLogNode") { mwOpenWindow("activity_log", "Activity Log", function(container) { showActivityLogWindow(container); }, {reloadIfOpened: true}); } console.log("Left menu clicked: name: " + name); } }, data: [ { value: "Accounts Organizer", ilType: "TasksNode", icon: "mdi mdi-widgets" }, { value: "Activity Log", ilType: "ActivityLogNode", icon: "mdi mdi-chart-line" } ] }; webixReplaceView(leftMenuView, appPageSidebarView) } $.ajax({ type: 'GET', url: '../api/v1/getUser.jsp', dataType: 'json', data: {userId: config.userProfile.userId, withGroups: "true"}, success: function (res) { console.log("getUser withGroups:"); console.log(res); if (res.status === "success") { var user = res.result; userGroups = user.groups; var stewardAdminsGroup = _.findWhere(userGroups, {groupId: 1}) var stewardsGroup = _.findWhere(userGroups, {groupId: 2}) if(user.email !== "admin" && (stewardAdminsGroup || stewardsGroup)) { switchToAnalystView(); analystMode = true; // var leftMenuView = webixFindSubview($$("pageLayout"), "leftMenu") // leftMenuView.hide(); // menuHidden = true; // showUIApp(appSpecName); } } else { showSystemAlertModal(res.message); } }, async: true });
Last updated on