Static Content¶
With staticContent
static files like HTML pages and sounds can be integrated into insight-explorer and insight-mobile. The HTML pages can be integrated into a navigation module or displayed via a menu. In addition, pages can be shown on the login screen. The staticContent
can be configured in the ClientConfiguration. The URL to the page can be relative or absolute. Absolute URL's can only be used online. In insight-mobile, relative URL's can be used online and offline if a download package is available. Sound files can be played in validation functions.
Where to place the files?
- Absolute URLs can be provided on every server.
- Relative URLs must follow the following conventions:
- They must be stored parallel to the config.json
- Example:
config.json
static-content
-legal.html
-help.html
-style.css
-my-sound.mp3
If you would like to have offline support for the staticContent in insight-mobile, use the following structure:
config.json
static-content
-legal.html
-help.html
-style.css
-my-sound.mp3
static-content-1.0.zip
-static-content
-legal.html
-help.html
-style.css
-my-sound.mp3
static-content.json -> {"version": "1.0"}
For updates of the static-content
zip, the version in the static-content.json
and the file name of the static-content-1.0.zip
must be increased. The mobile client downloads the new version on the next logout/login or refresh of the app.
Example: Page in navigation module with order
{
"staticContent": [
{
"name": "legal",
"title": "Legal",
"icon": "icon-fire",
"url": "static-content/legal.html",
"module": "Infos",
"order": 5
}
]
}
Example: Hidden page with menu:
{
"staticContent": [
{
"name": "legal",
"title": "Legal",
"icon": "icon-fire",
"url": "static-content/legal.html",
"hidden": true
}
]
}
Example Menu:
"menus": [
{
"label": "Legal",
"icon": "icon-fire",
"action": "staticContent",
"actionValues": [
{
"name": "legal"
}
]
}
]
Example: Show page on the login screen
{
"staticContent": [
{
"name": "legal",
"title": "Legal",
"icon": "icon-fire",
"url": "static-content/legal.html",
"loginPage": true
}
]
}
Static-Content, customize.css and Logo¶
The new Insight Mobile Client can be set to the customer's CI. It is possible to change the color and display a logo. Two files are required for this: logo.png
and customize.css
. For dark mode, it is possible to add a different logo with the name logo-dark-mode.png
. The files are stored in the static-content directory and zip. In addition, settings must be made in config.json
. Examples follow below. Folder structure:
insight/mobile
ui.html
static-content
logo.png
logo-dark-mode.png
customize.css
static-content-1.0.zip
static-content
logo.png
customize.css
config.json
:
- Add css: true
if you have a customize.css.
- Add logo: true
if you have your own logo.
- Add logoDarkMode: true
if you have an other logo for dark mode.
Example:
"staticContent": {
"version": "1.0",
"logo": true,
"logoDarkMode": true,
"css": true
}