Skip to content

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 (in Apps or Electron) and config.js (in Browser)
    • 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

    • Example:

      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

    Client Configuration:
    {
     ...
     "staticContent": [
      {
       "name": "legal",
       "title": "Legal",
       "icon": "icon-fire",
       "url": "static-content/legal.html",
       "hidden": true
      },
      {...}
     ]
    }
    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
      },
      {...}
     ]
    }

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. The files are stored in the static-content directory and zip. In addition, settings must be made in config.js and config.json. Examples follow below.

  • Folder structure:
insight/mobile
    ui.html
    static-content
        logo.png
        customize.css
        help.html
        imprint.html
    static-content-1.0.zip
        static-content
            logo.png
            customize.css
            help.html
            imprint.html

config.js and config.json example:

"staticContent": {
    "version": "1.0",
    "logo": true,
    "css": true,
    "pages": [
        {
            "name": "help",
            "title": "Help",
            "icon": "icon-question-circle",
            "url": "static-content/help.html",
            "module": "Info",
            "loginPage": true,
            "order": 1
        },
        {
            "name": "imprint",
            "title": "Imprint",
            "icon": "icon-notification-circle",
            "url": "static-content/imprint.html",
            "module": "Info",
            "loginPage": true,
            "order": 2
        }
    ]
}