Install UI of GuardServerSession Library

../_images/preview-install-main-ui-for-specialists.png

It contains a set of instructions to create the user interface, with above preview, for specialists working with the GuardServerSession library.

After adding the library to your project, you can start building a user interface to that library in WebUI.

The rest of this article details the WebUI page GSS Session History Management in this project and how you can replicate this functionality in your application.

Sidepanel

In this section, we create a sidepanel page first. This sidepanel will be used in the actual UI for specialists.

Create a side panel page with name sp_controls. Check the MainProject/WebUI/webui.json file; the page sp_controls should have “slug”: sp_controls_1. If not, the slug needs to be renamed at two places in the webui.json file (with AIMMS closed).

The status bar of your app should be set to gss::sp_messageStatusBar, or to a string parameter that contains this information.

Widgets on sidepanel

We start adding widget to the side panel as follows:

  1. Scalar widget shownSession, titled: Selection Session & Type

    Contents:

    1. gss::ep_shownSession

    2. gss::sp_shownSessionDescription

    Miscellaneous property “Enable multi line”: 1.

  2. Upload widget UploadErrorWarningData, titled “Upload Error Warning data”:

    procedure: gss::pr_uploadErrorData

  3. Download widget DownloadModelLog, titled gss::sp_titleDownloadActionLog:

    procedure: gss::pr_downloadActionLog

  4. Download widget DownloadErrorReport, titled “Download error report for current session”:

    procedure: gss::pr_downloadErrorReport

  5. Download widget DownloadErrorWarningData, titled “Download error data for current session”:

    procedure: gss::pr_downloadErrorData

Main UI for specialists

The page GSS Session History Management has Action Upon Load set to gss::pr_openPageErrorWarningProfiler.

Tip

If you have a multi-page application, you might want to add this page to the group of “developer” or “control” pages in your application.

Make the page a grid page and give it standard layout 5, see Grid Layout for beautiful and consistent looking applications

The page extensions > side panels property should be set to `gss::sp_sidePanel.

Add the following Widgets

Below are the widgets recommended to build a user interface for the GuardServerSession library.

  1. Table ErrorWarningMessageTable, titled: gss::sp_titleErrorWarningMessagesTable

    1. Contents:

      1. gss::ep_shownJobErrorSeverity

      2. gss::sp_shownJobErrorMoments

      3. gss::sp_shownJobErrorMessages

    2. Pivoting:

      1. Rows: gss::i_jobErrorMessageNumber

      2. Cols: <Identifiers>

    3. Store focus:

      gss::i_jobErrorMessageNumber to gss::ep_errorWarningSelectedNessage

    4. Widget Extensions:

      1. Widget actions: gss::sp_widgetActionMessageList

      2. Item actions: gss::sp_itemActionMessageList

    Move this widget to Area A of the grid page

  2. Table JobProfilerData, titled: sp_titleProfilerOverview

    1. Contents:

      1. gss::p_shownJobProfilerHits

      2. gss::p_shownJobProfilerGross

      3. gss::p_shownJobProfilerNetto

    2. Store Focus:

      IndexIdentifiers –> gss::ep_profilerDataSelectedIdentifier

    3. Identifier Settings > Set slicing per index

      gss::i_lineNumber –> fixed element '0'

    4. Widget Extensions:

      1. Widget actions: gss::sp_widgetActionIdentifierProfiler

      2. Item actions: gss::sp_itemActionIdentifierProfiler

    Move this widget to Area B of the grid page

  3. Table ErrorWarningStack, titled: gss::sp_titleStackMessage

    1. Contents:

      1. gss::ep_shownJobErrorNodes

      2. gss::ep_shownJobErrorAttributes

      3. gss::p_shownJobErrorLines

    2. Identifier settings:

      For all three, slice type index gss::i_jobErrorMessageNumber to element parameter gss::ep_errorWarningSelectedMessage

    3. no decimals: 0

    4. Store Focus:

      gss::i_stackPosition –> gss::ep_stackPos

    5. Widget Extensions:

      1. Widget actions: gss::sp_widgetActionMessageStack

      2. Item actions: gss::sp_itemActionMessageStack

    Move this widget to Area C of the grid page

  4. Table LineBasedProfilerData, titled: gss::sp_titleProfilerDetail

    1. Contents:

      1. gss::p_shownJobProfilerHits

      2. gss::p_shownJobProfilerGross

      3. gss::p_shownJobProfilerNetto

    2. Identifier Settings - Set slicing per index

      index IndexIdentifiers –> element parameter gss::ep_profilerDataSelectedIdentifier

    Move this widget to Area D of the grid page

Testing

To visually guide the adaption of the width of the columns of the tables, please run:

  1. gss::pr_artificialDataGSSPage to have an artificial warning message and

  2. gss::pr_openPageErrorWarningProfiler to ensure the GSS Session History Management tables are filled properly.

And then start manually adapting the column widths such that the contents fit neatly.