Customizing the optiSLang Web Service

Various functionalities within the optiSLang Web Service can be customized, including:

AppWizards and Custom Monitoring Pages

AppWizards are fully customizable using Javascript and Python scripting. You can customize the icons, logos. labels, and documentation of built-in AppWizards or or complete user interface for placeholder wizards. You can also create user-defined AppWizards.

AppWizards can also provide their own project result monitoring pages.

For more details on AppWizards, see Using and Creating Wizards in the optiSLang Web Service User's Guide.

User Interface

The user interface fonts, styles, and images are available in the optiSLang installation/web_service/docroot directory. These files can be updated as required.

Login Page

The built-in login page can be overridden by a customized login page if required.

To register a custom login page:

  1. Create an .html file (for example, custom_login_page.html) and place it in:

    • Combined installer:

      optiSLang installation/web_service/scripting/login/

    • Separate installer:

      optiSLang installation/scripting/login/

  2. In the config.ini file, change the custom_login setting to the HTML file name without the extension. For example:

    custom_login=custom_login_page

See scripting/login/template.html for a starting point.

When additional files have to be referenced from within the custom login page .html file (for example, images and css), they need to be placed in the <install path>[/web_service]/docroot/customization/login/files folder (you can create the folder if it does not exist) and referenced in the custom login page .html file (for example, /customization/login/files/my_image.png).

Custom login pages provide the support for a set of template parameters. These need to be enclosed in {} brackets and are provided by optiSLang Web Service when embedding the login page. The supported template parameters are:

  • {redirect_uri}: URL to redirect after login

  • {username}: Last used user name

  • {error_message}: Authentication failure error message

  • {if link_to_register}/{end link_to_register}: Contained block is controlled by a special configuration setting (allow user to self register). Use this to optionally integrate a Register link.

Project Actions

You can register and execute custom actions on projects. For more details, see Creating Custom Actions in the optiSLang Web Service User's Guide.

Repository Management for AppWizards

The optiSLang Web Service manages the registered AppWizards in an arbitrary repository. Any repository that can be accessed using Python scripting can be used.

To register a custom repository management method:

  1. Create a Python script (for example, custom_repo_management.py) and place it in:

    • Combined installer:

      optiSLang installation/web_service/scripting/repository/

    • Separate installer:

      optiSLang installation/scripting/repository/

  2. In the config.ini file, change the [repository_management] method setting to the Python file name without the extension. For example:

    [repository_management]
    method=custom_idm

The Python script must implement a send_wizard_to_repository, a receive_wizard_from_repository, and optionally a remove_wizard_from_repository function.

The arguments for these functions (server addresses, ports, arbitrary settings, and so on) can be provided in the config.ini file using the method_argn settings.

See scripting/repository/template.py for a starting point.

Announcements

The optiSLang Web Service supports displaying announcements to users that are logged in. You can use this to inform users about upcoming maintenance or AppWizard updates.

To create an announcement, adapt the Markdown files located in:

  • Combined installer:

    optiSLang installation/web_service/scripting/announcements/

  • Separate installer:

    optiSLang installation/scripting/announcements/

Announcements defined in dropdown.md are displayed in the toolbar. Announcements defined in panel.md are displayed in the the About page.