Customize the Web UI with Environment Settings
- 更新时间2024-10-31
- 阅读时长3分钟
Customize the Web UI with Environment Settings
The following configuration tokens can be used to customize the BTS environment. In BTS Server (Windows), these can be set in the appsettings.json file, which is installed by default at %PROGRAMFILES%\National Instruments\Battery Test System\WebApplication\appsettings.json, or as Windows environment variables. When set as Windows environment variables, prefix the tokens with BTS_ and replace any colons (:) with double underscores (__). In BTS Server (Enterprise), these can be set in the helm chart bts-values.yaml file in the envVariables section. Preface the variable names with BTS_.
| Environment Settings String | Default Values | Description |
|---|---|---|
|
ExcludedPages:PackageLoader
ExcludedPages:Admin ExcludedPages:PackageLoader,Admin |
N/A | Indicates which pages should be excluded in
the BTS Web UI. In BTS Server (Enterprise), to exclude Package Loader and Admin pages, format this string as follows: "[\"PackageLoader\", \"Admin\"]". In BTS Server (Windows), to exclude Package Loader and Admin pages, format this string as follows: “ExcludedPages”: [“PackageLoader”,“Admin”]. |
| StoragePlugin | For BTS
(Windows): FileSystem For BTS (Enterprise): Mongo |
Identifies the storage plugin to use. Allows you to pick different storage implementations, such as a folder on your system or network, or a MongoDB database. Options are FileSystem and Mongo . |
| MongoDBUrl | mongodb://127.0.0.1:27017 |
Specifies the MongoDB URL. This attribute is only supported in BTS (Windows). If you have configured the MongoDB to have a username and password, the syntax is as follows: mongodb://[username]:[password]@[server ip/name]:[port] |
| MongoDBDatabaseName | bts | Specifies the name to use for the MongoDB. This attribute is only supported in BTS (Windows). |
| WebUINameExtension | " " | Specifies a keyword to append as an extension to the NI Battery Test System label in the BTS Web UI. This name should be limited to fewer than 16 characters. |
| IsTestMode | false | Specifies if the server is used for developer test purposes rather than production purposes. Some BTS UI features, like the Save & Run and Save & Deploy on the Test Plan Editor page, are only available when this setting is set to true. |
| AdminPage: MaxUncompressedZipFileSize | 262144000 bytes (250 MB) | Specifies the maximum uncompressed total size of files that can be added to each generated zip file with Download Log Files on the Administrator page. |
| AdminPage: MaxStorageZipFileSizeInMegaBytes | 1024 MB (1 GB) | Specifies the maximum uncompressed total size of files that can be added to the generated zip file with Export Storage and Import Storage on the Administrator page. |
| Kestrel:Endpoints:http:grpc | https://0.0.0:60003 | Specifies the port used for gRPC communication between this instance of the BTS Server and the Lab PCs. |
|
Urls Kestrel:Endpoints:http:Url |
https://0.0.0:60002 | Specifies the URL and port setting for accessing this instance of the BTS Server. This attribute is only supported in BTS (Windows). |
| SystemLink:Url | http://localhost | Specifies the SystemLink server URL. This attribute is only supported in BTS (Windows). |
| StorageRoot | %ProgramData%\National Instruments\Battery Test System\FileStorage | Sets the custom storage root when the StoragePlugin is FileSystem. This attribute is only supported in BTS (Windows). |
| WebHostPlugin DefaultLocation | For Windows: %CommonDocuments%\National Instruments\Battery Test System\WebApplication\Web UI Plugins | Specifies the root path for the web application plugins. This is the value that the pseudocode "uiplugins" is interpreted as when used in a plugin path. This attribute is only supported in BTS (Windows). |
| TestStationConnectivityHeartBeatPeriod | 5 seconds | Specifies the heart beat period in seconds for checking connectivity to Lab PC. |
| TestDeployPath | C:\ProgramData\National Instruments\Battery Test System\TestPackages | Specifies the path of the deployed test packages on the Lab PC. |
| HttpRequest:ActivityTimeoutinSeconds | 300 seconds | Specifies the timeout in seconds to wait for a response from the TestStand gRPC client. Consider increasing this time if the typical test plan takes very long to deploy to the LabPC due to its size and/or a slow network. |
| MemoryCacheManger_ SlidingExpirationMinutes | 60 minutes | Specifies how long to retain an object in memory for use in the Web UI since it was last accessed. Longer cache times provide better performance but require more memory to retain the larger number of objects. |
| HubOptions: MaximumMessageSizeInBytes | 1,048,576 bytes | Specifies the maximum message size to allow from a SignalR hub. This technology is used when package files are uploaded using the BTS Web UI. Use a value that allows for a maximum size computed as follows: s ≈ 80 + 3*(n-1) + c, where s is the message size in bytes, n is the number of files being uploaded, and c is the total number of characters in all of the relative paths of files selected to upload. |
| KeepSystem DefinitionDeployed | false | If true, the system definition file remains deployed on the Lab PC after a test finishes executing until a new test execution is started. |
There is an order of precedence for configuration tokens as follows:
- Environment variables. Remember to prefix these with BTS_.
- Settings passed through command line arguments.
- appsettings.[environment name].json files.
- appsettings.json files.