Extensions
Extensions provide additional functionality or custom UI to your SAYMON installation.
Extension installation
The list of installed extensions is available to all users via the current user menu (), but the data inside is limited to their permissions and object access.
To add a new extension just click the
or
button. You can also visit market.saymon.tech page directly.
In the opened folder, go to the page of the extension you are interested in and follow the steps described in the installation manual.
Custom extensions
SAYMON users can develop their own web applications, expanding or using SAYMON possibilities.
In order to include such applications in SAYMON server it is necessary to:
-
Add the extensions section to the server configuration file and specify the path to the folder with extensions in the
pathparameter. For example,"/opt/saymon-extensions":"extensions": { "path": "/opt/saymon-extensions" } -
Place the content of each application in a separate folder inside the root one. For example,
/opt/saymon-extensions/my-extension. This folder will be the entry point into the client part of the application, available by the following URL:<SAYMON_server_address>/extensions/my-extension. -
Add the section
location ^~ /extensionsto the/etc/nginx/sites-enabled/saymonfile and specify the folder fromextensions.pathin thealiasparameter:# SAYMON Extensions folder. location ^~ /extensions { alias /opt/saymon-extensions/; try_files $uri $uri$args $uri$args/ @extension; autoindex on; }
To be available in the list of all extensions, displayed in the SAYMON web interface, an extension must contain the file package.json or meta.json (data from meta.json has higher priority).
Format and fields of the meta.json file:
| Parameter | Description | ||
|---|---|---|---|
author |
Author of the extension. |
||
date |
Release date of the installed extension. |
||
description |
Short description of the extension. |
||
homepage |
Link to the homepage of the extension. |
||
icon |
Direct link to the icon of the extension. By default the file |
||
name |
Name of the extension.
|
||
nameInUrl |
Part of the link to the page with the extension. It matches the name of the folder containing the file |
||
permissions |
A set of custom user permissions added by an extensions. |
||
permissions.<permission-name>.description |
UI description of the permission in the Permissions configuration window. You can specify separate description for each supported locale. |
||
urlToMeta |
Direct link to the latest version of the |
||
version |
Version of the installed extension. |
Example of the meta.json file:
{
"author": "SAYMON User",
"date": "2020/12/31",
"description": "Very useful custom extension",
"homepage": "https://saymon.tech/extensions/my-extension/",
"icon": "https://saas.saymon.info/extensions/my-extension/favicon.ico",
"name": "My Extension",
"nameInUrl": "my-extension",
"urlToMeta": "https://saymon.tech/extensions_meta/my-extension/meta.json",
"version": "1.0.1",
"permissions": {
"custom_permission": {
"description": {
"en": "Permission name"
}
}
}
}