Altair® Panopticon

 

Using Global Parameters to Switch Among Environments

You can use global parameters on your data source or connector for different staging of the Panopticon Visualization Servers. For this section, we will use kdb+ instances as sample data sources.

Using Global Parameters

  1. In Panopticon Designer (Desktop), open your data source. For example, any kdb+ instance (e.g., SPARROW).

  1. In the Edit Data Table view, add the parameter ConfigurableKdbHost and the name of the kdb+ instance as the value:

  1. Click the Settings  button of your data source and replace the name of the kdb+ instance (e.g., SPARROW) in the Host field with {ConfigurableKdbHost}.

This fetches the parameter expression into the Host setting for the connection. The datatable should now return the same data of the kdb+ instance in step 1.

  1. Click the OK button in the Edit Data Table window. The Workbook is displayed in Design Mode.

  2. Select Tools > Options. The Altair Panopticon Options dialog displays.

  3. Select the Parameters tab.

  4. Click Add Parameter. The Parameter dialog displays.

  5. Enter the parameter settings you added in the Edit Data Table window.

For example:

Name: ConfigurableKdbHost

Value: SPARROW

This creates an application-wide parameter that overrides the datatable’s parameter value.

NOTE:

    • The datatable parameter added in step 2 is still needed since gives signals to the Panopticon Designer (Desktop) that it needs to pass ConfigurableKdbHost each time it queries this datatable.

    • The actual (global) parameter is stored in the Panopticon Designer (Desktop)’s user-specific config file (e.g., C:\Users\<User Name>\AppData\Local\Datawatch_Corporation\<Exe_StrongName>\<version number>\user.config. The workbook only stores the parameter you added in step 2. The values in user.config will always override the value in the workbook as long as the parameter names are the same.

  1. Publish the workbook in your Panopticon Visualization Server. Only the workbook gets copied and nothing from the user.config settings. Therefore, the kdb+ connection will now revert to whatever host you set in step 2.

  2. In Panopticon Designer (Desktop), select View > Server in Browser then log on to the Panopticon Visualization Server.

  3. Select the Parameters tab and click Add Parameter.

  4. Add the new parameter ConfigurableKdbHost and the corresponding host for this server instance (e.g., SPARROW-DEV).

NOTE: This is the same with what was done in step 8. The Parameter tab controls the global parameters for the server and saved in App_Data\Patameters.json in the web application folder.

  1. To switch to another environment, copy the workbook to another Panopticon Visualization Server setup.

  2. Also, copy the Parameters.json to the App_Data folder of this server.

  3. Using Notepad, open Parameters.json in this server and change the value of the ConfigurableKdbHost parameter to the server’s kdb+ instance (e.g., SPARROW_UAT).

NOTE: Steps 14 and 15 are done once. When you want to update the workbook(s), leave the Parameters.json as is in this other server.

These steps can be used with almost any setting for almost any data plugin. They help to keep user names and passwords out of the workbook files, and to update a password across multiple workbooks when it’s changed. Parameters can also be encrypted so there is no need to store passwords in clear text in the user.config or Parameters.json  files.