Global settings in deploy.json

Global application configuration settings include the following sections:

  • Application namespace "namespace"
  • Parameterization "parametrised"
  • Path to templates "theme"
  • Caching time and other parameters for static files https://expressjs.com/en/4x/api.html#express.static "staticOptions" (works with NODE_ENV=production)
  • Browser tab name"pageTitle"
  • Application modules "moduleTitles"- details
  • Configure the display of a common system menu for all project modules "explicitTopMenu" - details
  • Overriding session storage settings "SessionHandler"
  • "actualAclProvider"
  • "aclProvider"
  • Configure HTML attributes for displaying and saving images in an attribute``”fileStorage”`` - details
  • Settings for displaying the user name and avatar in all modules of the project "customProfile" - details
  • Setting the eager loading depth``”dataRepo”`` - details
  • "accounts"
  • "securedDataRepo"
  • "ldap"
  • "auth"
  • "sendmail"
  • "nodemailer"
  • "emailNotifier"
  • "notifier"
  • "eventNotifier"
  • Configure integration with calendar "icsMailer" - details
  • "recache"
  • "fact-creator"
  • "report-builder"
  • "projectReportCreator"

The structure of which is constructed as follows:

{
  "namespace": "...",
  "parametrised": true,
  "globals": {
    "theme": "...",
    "staticOptions": {...},
    "pageTitle": "...",
    "moduleTitles": {...},
    "explicitTopMenu": [...],
    "plugins": {
      "sessionHandler": {...},
      "actualAclProvider": {...},
      "aclProvider": {...},
      "fileStorage": {...},
      "customProfile": {...},
      "dataRepo": {...},
      "accounts": {...},
      "securedDataRepo": {...},
      "ldap": {...},
      "auth": {...},
      "sendmail": {...},
      "nodemailer": {...},
      "emailNotifier": {...},
      "notifier": {...},
      "eventNotifier": {...},
      "icsMailer": {...}
    },
    "jobs": {
      "recache": {...},
      "fact-creator": {...},
      "report-builder": {...},
      "projectReportCreator": {...}
    }
  }
}

Modules of application

In the “moduleTitles” field specify the modules that will be used in the application. Also, the same modules will be displayed in the system menu.

{
  "namespace": "crm",
  "globals": {
    "moduleTitles": {
      "registry": "Тех. поддержка",
      "report": "Отчеты"
    }
  }
}

Settings of hiding module in system menu

Set the nullvalue in the module (in the deploy.jsonfile) that you would like to hide in the system menu of the project, for example "ionadmin": null.

{
  "namespace": "project-management",
  "parametrised": true,
  "globals": {
    "moduleTitles": {
      "registry": {
        "description": "Проектное управление",
        "order": 10,
        "skipModules": true
      },
      "ionadmin": null
    }
  }
}

Configuring the display of a common system menu for all project modules

In order for the system menu to display the same set of items, regardless of which module page you are on, set "explicitTopMenu" in the deploy.json project file at the global level, while retaining the ability to override "explicitTopMenu" in the registry.

Example

"globals": {
    "explicitTopMenu": [
      {
        "id":"mytasks",
        "url": "/registry/project-management@indicatorValue.all",
        "caption":"Мои задачи"
      },
      {
        "id":"projectmanagement",
        "url": "/registry/project-management@project",
        "caption":"Проектное управление"
      },
      {
        "type": "system",
        "name": "gantt-chart"
      },
      {
        "type": "system",
        "name": "portal"
      },
      {
        "type": "system",
        "name": "geomap"
      },
      {
        "type": "system",
        "name": "report"
      },
      {
        "id":"distionary",
        "url": "/registry/project-management@classification.okogu",
        "caption":"Справочники"
      },
      {
        "id":"mark",
        "url": "/registry/project-management@person",
        "caption":"Прогресс-индикатор"
      }
    ],

Field description

  • "id" - identifier of the navigation section
  • "url" - url of the navigation section
  • "caption" - name of the navigation section
  • "name" - system name of the module

Field “plugins”

This field contains settings that allow you to expand the capabilities of the application.

Setting the HTML attributes to display and save images in attributes

"plugins":{

"fileStorage": {
    "module": "core/impl/resource/OwnCloudStorage",
    "options": {
      "url": "https://owncloud.iondv.ru/",
      "login": "api",
      "password": "apiapi"
    }
}
"htmlFiles": {
    "module": "core/impl/resource/FsStorage",
    "initMethod":"init",
    "initLevel": 3,
    "options": {
      "storageBase": "./htmlFiles",
      "urlBase": "/htmlFiles",
      "dataSource": "ion://Db",
      "log": "ion://sysLog",
      "app": "ion://application",
      "auth": "ion://auth"
    },
    "htmlImages": {
        "module": "core/impl/resource/ImageStorage",
        "initMethod": "init",
        "initLevel": 3,
        "options": {
          "fileStorage": "ion://htmlFiles",
          "app": "ion://application",
          "auth": "ion://auth",
          "log": "ion://sysLog",
          "urlBase": "/htmlFiles",
          "thumbnails": {
            "small": {
              "width": 100,
              "height": 100
            }
          }
        }
    }
}

"modules": { "registry": { "globals":

{
    "refShortViewDelay": 1000, // количество миллисекунд до появления окна с инфо. Если не указан или 0, или нет shortView представления, то окно не выводится
    "defaultImageDir": "images",
    "contentImageStorage": "htmlImages"
}

Setting to display username and user icon (avatar) in all modules of the project

Set the connection with the icon in the “avatar” field to set the user icon. The system will choose the user avatar from the corresponding class attribute whose object is bound to the current system user.

Example

"customProfile": {
  "module": "lib/plugins/customProfile",
  "initMethod": "inject",
  "options": {
    "auth": "ion://auth",
    "metaRepo": "ion://metaRepo",
    "dataRepo": "ion://dataRepo",
    "propertyMap": {
      "person@project-management": {
        "filter": "user",
        "properties": {
          "avatar": "foto"
        }
      }
    }
  }
}

Setting the depth of the eager loading

"dataRepo": {
  "options": {
    "maxEagerDepth": 4
  }
}

Setting the integration with calendar

Integration is performed as follows: the module sends an email with an attached ics file, which specifies the iCalendar event. Outlook treats such a letter as an invitation to a meeting. * Yandex * also adds the meeting to the calendar.

Module configuration:

"icsMailer": {
  "module": "applications/extensions/lib/icsMailer",
  "initMethod": "init",
  "initLevel": 2,
  "options": {
    "dataRepo": "ion://dataRepo",
    "transport": {...}, //Настройки smtp-сервера
    "defaults": {...}, //Общий настройки всех писем
    "listeners": [
      {
        "component": //Ссылка на слушаемый компонент
        "events": {
          "...": {// Идентификатор события
            "calendar": {...}, //Настройки календаря, несущего событие и передаваемого в ics-вложении
            "event": {...}, //Настройки VEVENT, передаваемого в ics-вложении
            "filename": "...", //Имя вложенного ics-файла
            "letter": {...} //Настройки письма, отправляемого по событию.
          }
        }
      }
    ]
  }
}

For the letter, event, filename and calendar settings, you can use data from the event object by specifying property names with the point refAttr.stringAttr, or wrapping this construction in ${refAttr.stringAttr} when you need to use a template.

Full file example deploy.json