ub-server #
Added #
5.18.12 2020-08-31 #
-
new command line option
-env env/file/path
: adds all environment variables from env file intoprocess.env
. Such variable values are NOT visible to the child processes and OS, but available in JS (for example during config parsing) -
new command line option
-T
: parse, validate and output parsed config to the stdout. Also, output environment variables (and it values) wanted by the config. If config contains errors - output line number for a first error and exit with code 1.Use
ub -T | nl
to get line numbers in console -
trailing commas now supported in config and meta files (actually trailing commas are replaced by ' ' in removeCommentsFromJSON function), so JSONs like
"someArray": [
"val",
// "val2"
]
now VALID. It's very conveniently in config files, for example to comment a last array element etc.
%ENVVAR||default%
- if environment variableENVVAR
ton found or empty default will be used. Example:
"mailerConfig": {
"targetHost": "%UB_SMTP_HOST%",
"targetPort": "%UB_SMTP_PORT||25%",
"fromAddr": "%UB_SMTP_FROMADDR||no-reply@fake.com%",
"user": "%UB_SMTP_USER%",
"password": "%UB_SMTP_PWD%",
"autoTLS": %UB_SMTP_TLS||false%,
"auth": %UB_SMTP_AUTH||false%
-
//#ifdef and //#ifndef
ubConfig directives parser added:- remove part of JSON content between
//#ifdef(%VAR_NAME%) ... //#endif
if environment variable VAR_NAME is not defined or empty - remove part of JSON content between
//#ifndef(%VAR_NAME%) ... //#endif
if environment variable VAR_NAME is defined and not empty - case-sensitive equal comparison can be used as
//#ifdef(%VAR_NAME%=VarValue)
or//#ifdef(%VAR1_NAME%=%VAR2_NAME%)
- nested conditions IS NOT SUPPORTED
- content replaced by empty strings to keep the same line numbers as in original file
In example below section
mailerConfig
is removed from config in caseUB_SKIP_MAILER
environment variable is defined and not empty, andiGov
model is added in caseDOCFLOW_IGOV
environment variable defined and not empty: - remove part of JSON content between
"customSettings": {
//#ifndef(%UB_SKIP_MAILER%)
"mailerConfig": {
},
//#endif
},
"domain": {
"models": [
{
"path": "./node_modules/@unitybase/ub"
},
//#ifdef("%DOCFLOW_IGOV%)
{
"path": "./node_modules/@docflow/iGov"
}
//#endif
]
}
use
ub -T
to view and validate parsed config
- partial configs: in case
ubConfog-partial.json
exists in the model folder it will be merged into application ubConfig during server startup This allows moving a model configuration parameters into model folder and uses environment variables to define a parameters values. For exampleubConfig-partial.json
in@unitybase/ubq
model is:
{
"application": {
"customSettings": {
"mailerConfig": {
"targetHost": "%UB_SMTP_HOST%",
"targetPort": "%UB_SMTP_PORT||25%",
"fromAddr": "%UB_SMTP_FROMADDR||no-reply@fake.com%",
"user": "%UB_SMTP_USER%",
"password": "%UB_SMTP_PWD%",
"autoTLS": %UB_SMTP_TLS||false%,
"auth": %UB_SMTP_AUTH||false%
}
}
}
}
Do not forget to document environment variables in model README.md. See
@unitybase/ubq/README.md
for template.
ub-server
package installation changes:- folder changed to
/opt/unitybase
- deb/rmp package creates a
unitybase
user/group; products/apps folder structure andunitybas@
systemd service See production enviromnent tutorial for details.
- folder changed to
- new properties in
application.models
ubConfig sectionvendorModels
andcustomerModels
- a colon separated string of folders inside%UB_APPDATA%/models
to be added into domain models collection during config parsing (before the domain is loaded). - BREAKING - if NODE_PATH environment variable is not defined then server sets NODE_PATH to
${process.configPath}/node_modules:${process.configPath}
. This allows specifying model location to be outside the application root folder, and it js files still can require modules from an application root. For example consider ub starts with-cfg /opt/unitybase/products/docflow/appConfig.json
and our model entry point is located in/opt/unitybase/apps/customer1/vendor-model/index.js
and:
require('models/myModel/someScript') // resolves to /opt/unitybase/products/docflow/models/myModel/someScript.js
require('@unitybase/ub') // resolves to /opt/unitybase/products/docflow/node_modules/@unitybase/ub/index.js`
As a side effect any js file can require a top-level module starting from a configPath instead of moving up using '../../../..'.
- JS engine's for all worker threads now inherits from a main engine instance. This allows SpiderMonkey storing there
some shared information and reduce overall program memory consummation up to 20% (depends on
threadPoolSize
)
5.18.11 2020-08-09 #
aclRls
mixin:exprMethod
accept 3-d parameter - mParams of original request (optional). Can be used to generate a aclRls expression what depends on UBQL context.- experimental cmd line switch
-cj
- force logging to journald
Changed #
5.18.12 2020-08-31 #
- CentOS docker container now builds from CentOS8 (instead of CentOS7)
- BREAKING
javascript
key in ubConfig is obsolete. Use cmd line switches or env variables to override default engine settings. Seeub --help
for additional info. Available switches are:- --engine-max-mem (or UB_ENGINE_MAX_MEM env var)
- --engine-lifetime (or UB_ENGINE_LIFETIME env var)
- --engine-full-gc (or UB_ENGINE_FULL_GC env var)
- --debug-port
- SQL query parameters logging:
- all parameters logged in one line as a JSON object (instead of log line per parameter)
Custom1
log level is used to log parameters (instead ofDebug
) - this allows removingDebug
log level on production and still got an SQL tracing- string parameters truncated to 50 character on production (instead of 100) (without
-dev
switch) - parameters of type
Date
logged withoutT00:00:00
part:9999-12-31
instead of9999-12-31T00:00:00
- parameter type added into key part of parameters JSON just after parameter index
- for
Boolean
andInt64
parameters type is omitted:P1: true
,P2: 12121
- parameter #1 isBoolean
, parameter #2 isInt64
- for
String
type added ass || string length
:"P6s9":"127.0.0.1"
- value of parameter #6 is a string of length 9 - for
BLOB
type added asb
and value is a BLOB length:"P4b": 2048
- value of parameter #6 is a blob of 2048 bytes length - for
Date
type added asd
:"P5d":"2020-08-12T10:51:35"
Log before changes:
- for
" debug P1: Str(8) uba_user
" debug P2: Int64 10
" debug P4: Str(5) admin
" debug P5: DateTime 2020-08-12T09:58:33
" debug P6: Str(9) 127.0.0.1
" debug P7: Str(5) admin
" debug P8: Str(0)
" debug P9: Int64 333812888535052
" debug P10: Str(203..) Host: localhost:8881 User-Agent: Mozilla/5.0 (Linux; mORMot 1.18 TCurlHTTP) Accept: */* Accept-En...
" SQL r=1 t=32 c=0 q=INSERT INTO uba_audit (entity,entityinfo_id,actionType,actionUser,actionTime,remoteIP,targetUser,targetRole,ID,fromValue) VALUES (?,?,?,?,?,?,?,?,?,?)
Log after changes:
" cust1 {"P1s8":"uba_user", "P2":10, "P3s5":"LOGIN", "P4s5":"admin", "P5d":"2020-08-12T10:51:35", "P6s9":"127.0.0.1", "P7s5":"admin", "P8s0":"", "P9":333812992802828, "P10s203":"Host: localhost: 8881\r\nUser-Agent: Mozilla/5.0 (Lin..."}
" SQL r=1 t=33 c=0 q=INSERT INTO uba_audit (entity,entityinfo_id,actionType,actionUser,actionTime,remoteIP,targetUser,targetRole,ID,fromValue) VALUES (?,?,?,?,?,?,?,?,?,?)
As a result log size is decreased on ~10% and log lines count is decreased on ~20%.
5.18.11 2020-08-09 #
- on Linux default server setup path changed to
/opt/unitybase/ub-server
for both rpm and deb packages. Prior to these changes, rpm install ub into/usr/lib64/ub-server
and deb - into/usr/lib/ub-server
- in case application config (passed as -cfg) is a symlink then server resolve it to a realpath and start with a resolved config.
This allows to symlink configs for all available applications into a single folder (for example
/etc/unitybase/apps-enabled
) - mORMot updated to revision #6105
- logging:
- endpoint name logging level (
call endpoint ubql
) replaced to Debug ->dedug endpoint ubql
. Endpoint name is the first path of the URI, so discoverable from the HTTP log level output in production logs without debug log level enabled. - Enter/Leave for
DataStore.BuildAndExecInsertSQL
shows only in case Debug log level enabled
- endpoint name logging level (
Deprecated #
5.18.12 2020-08-31 #
Removed #
5.18.12 2020-08-31 #
Fixed #
5.18.12 2020-08-31 #
- JS Debugger: gracefully disconnect debugger if counterpart closes connection
5.18.11 2020-08-09 #
- Windows only: prevent "pausing" of a server when user clicks inside server console by enabling console extended mode and disabling "quick edit" mode. We strongly recommend to use ConEmu there such problems does not exist (or better linux + bash 😃 )
journald
logging: message with%
inside does not stop log process (for example, thread 4 = % in text representation)
@unitybase/adminui-vue #
Added #
1.13.0 2020-08-31 #
UDropdown
: propchildPlacement
- popper placement relative to opened dropdownUTable
: paramformatHead
in column config. Render function for header cellUButtonGroup
: added border for childUButton
'sUFormRow
: proppreventLabelEvents
- disable label click, hover etc.UTableEntity
: view mode option in user settings, also added slotviewMode
to overlap it.UTableEntity
: propcardColumns
. Array of column configs for card viewUTableEntity
: propbeforeInitialLoad
. Hook which called after store created, but data didn't start to load.UNavbar
:Close all
andClose inactive
actions added to tabs menu (as in tab popup)USelectEntity
,USelectEnum
,USelectMultiple
,USelectMany
: propsearchStrategy
which sets search request conditionUSelectEntity
,USelectEnum
,USelectMultiple
,USelectMany
: user input debounce timeout increased from 120 to 600
1.12.5 2020-08-19 #
- Tajik locale translation
Form/mount
: added paramopenInBackgroundTab
tomountTab
. Iftrue
- the tab with a newly opened form does not become active. Default isfalse
and new tab is activated.
1.12.4 2020-08-03 #
SignatureVerificationResult
view: in case signature is invalid and library provide some reason this reason will be shown in()
For example:Signature invalid (Неверный сертификат OSCP сервера)
Changed #
1.13.0 2020-08-31 #
UButton
: changed sizes according design in figmaUTableEntity
: display of filter and sort. It is displayed as a button with a popupUTableEntity
: color of filter tags. Value has "black" color, condition - "grey"
1.12.5 2020-08-19 #
UNavbar
: tabs now displayed inside scroll box and prepended by "All tabs" button for tab managementUTableEntity
in casewindow.outerHeight < 500px
then table header hides while user scroll down (as with address bar in mobile browsers)UNavbar
in casewindow.outerHeight < 500px
then navbar visibility can be toggled on/off (new toggle button added)
Deprecated #
1.12.5 2020-08-19 #
styleguidist
package replaced as external application inubjs/styleguide
Removed #
1.13.0 2020-08-31 #
UTable
: eventsort
1.12.5 2020-08-19 #
cross-env
dependency removed
Fixed #
1.13.0 2020-08-31 #
UNavbar
: fixClose all
behaviorlookups.js
: onEntityChange fordelete
event - in case response resultData do not contains ID, get it from response object not from resultData of response object
1.12.5 2020-08-19 #
UDropdown
: in case dropdown is placed into HTML attribute withposition: sticky/absolute/fixed
then it it shown in full size (not cropped to the outer elements bounds as before)ub-icons
iconic font uses fixed character code for each icon, so adding new icons do not broke unicode codes for old icons.
1.12.4 2020-08-03 #
- ensure adminui-vue exports
magicLink
(SystemJS.set freeze object, so should be exported before call to SystemJS) Vue package
if existwindow.Vue
use it as package entry point else useVue
fromnode_modules
UTableEntity.pageSize
set default value50
in casestoreDefaultPageSize
didn't present inubConfig.json
@unitybase/adminui-pub #
Added #
5.13.32 2020-08-19 #
- Tajik locale translation
Removed #
5.13.32 2020-08-19 #
cross-env
dependency removed
Fixed #
5.13.34 2020-08-20 #
- in case
title
property is defined in nav shortcut JSON - use it, otherwise - use aubm_navshortcut.caption
for title. Before this fixubm_navshortcut.caption
always overrides title.
5.13.32 2020-08-19 #
- typo in Ukrainian translation for key
doYouWantFillOtherAttr
, removed quotes for unnecessarily quoted properties
@unitybase/base #
Added #
5.3.0 2020-08-31 #
- config parser enhancements - see server 5.18.12 changelog for details
//#ifdef(%VAR_NAME%)..//#endif
&//#ifndef(%VAR_NAME%)..//#endif
//#ifdef(%VAR_NAME%=someValue)
%VARNAME||default%
- support for
vendorModels
andcustomerModels
- trailing commas now supported in config and meta files
- partial configs for models
argv.setServerConfiguration
method - allows to set a config for native part
5.2.15 2020-08-19 #
- support for
#ifdef..#endif
&#ifndef..#endif
in ubConfig
Changed #
5.3.0 2020-08-31 #
- ubConfig parser implementation is moved into UB.js (compiled as resource into ub server)
@unitybase/cdn #
Added #
5.4.28 2020-08-19 #
- Tajik locale translation
5.4.27 2020-08-03 #
cdn_orgaccount
: added complex unique index on(code, currencyID, bankID)
Fixed #
5.4.27 2020-08-03 #
cdn_orgaccount
: change cache type to "None" since row count can be hugecdn_orgaccount
: fix error during updating of account with currencyID===null
@unitybase/only-office #
Changed #
1.1.0 2020-08-31 #
application.customSettings.mailerConfig
section now defined in model partial config and automatically merged into main config (starting from ub@5.18.12). See README.md for environment variables list.
@unitybase/org #
Added #
5.3.28 2020-08-19 #
- Tajik locale translation
Changed #
5.4.0 2020-08-31 #
- BREAKING login for user who not assigned to employee allowed only for superusers
(users
admin
androot
= uba_common.isSuperuser()). Before these changes' logon without an employee is allowed for members ofAdmin
group.
@unitybase/ub-pub #
Added #
5.5.20 2020-08-19 #
- Tajik locale translation
Changed #
5.5.22 2020-08-31 #
EventEmitter.defaultMaxListeners
increased from 10 to 20. This removes warning then event emitter are used for by JS mixins (EAV etc) to adds:after
and:before
events - in this case listeners count can exceed 10
5.5.19 2020-08-03 #
- nodeJS usage example (in a README.md) rewritten using
async function
Fixed #
5.5.20 2020-08-19 #
- default login page top logo URL changed from
/models/ub-pub/img/ub-login-logo.png
tomodels/ub-pub/img/login-logo.svg
. For any app we recommend to changeuiSettings.loginWindowTopLogoURL
to a logo for your app and not to use default logo.
@unitybase/ub #
Deprecated #
5.6.0 2020-08-31 #
javascript
section in ubConfig is deprecated. Starting from UB 5.18.12 use command line switches or env. vars Useub --help
for details.
Removed #
5.5.12 2020-08-19 #
- nodeJS compatibility test suite is moved from
@unitybase/ub
toapps/autotest/models/TST
. This reduced the@unitybase/ub
module size by 900Kb.
@unitybase/ubcli #
Changed #
5.7.0 2020-08-31 #
ubcli initDb
command execute all SQL statements from a command line script. This allows not to start a server and prevents fake config creation.
Deprecated #
5.6.4 2020-08-19 #
ubcli prepareGZIP
command is removed (obsolete). For a production environmentgenerateNgingCfg & linkStatic
should be used instead.
Fixed #
5.7.0 2020-08-31 #
ubcli createStore
creates atempPath
even in case path is empty (for example for mdb store)
@unitybase/ubm #
Added #
5.4.10 2020-08-19 #
- Tajik locale translation
@unitybase/ubq #
Added #
5.3.26 2020-08-19 #
- Tajik locale translation
Changed #
5.4.0 2020-08-31 #
application.customSettings.mailerConfig
section now defined in model partial config and automatically merged into main config (starting from ub@5.18.12). See README.md for environment variables list.
@unitybase/ubs #
Added #
5.4.17 2020-08-19 #
- Tajik locale translation
Changed #
5.4.17 2020-08-19 #
ubs_message_edit-fm.vue
: refactored, fixed layouts and loading mask
Removed #
5.4.17 2020-08-19 #
cross-env
dependency removed
@unitybase/udisk #
Added #
5.0.138 2020-08-19 #
- Tajik locale translation