Property Reference for Battery Test System Web UI Web Page Host Plugins

To fully implement web page host plugins for the Battery Test System Web UI, you need to customize the page or component plugin settings.

  • For Blazor plugins, customize these settings in the PageItem class (for example, HomePageItem class).
  • For HTML pages, create or modify either the page plugin (PagePlugin.json) or the component plugin (ComponentPlugin.json) file. The respective JSON file can be created or found next to the plugin DLL.

Refer to the following tables for the properties you can define to customize web page host plugins.

Table 44. Page Plugin Elements
Name Used in JSON File Name Used in PageItem Class Description
Label PageLabelKey Text that appears in the tab for the page within the left-side navigation bar and for breadcrumbs
Tooltip PageTooltipKey Hover help that appears when the cursor is hovering over the tab for the page in the navigation bar
Source N/A Filepath to the source file for the plugin. Takes the following form by plugin type:
  • uiplugins/Plugin Folder Name/Plugin Name.html
ComponentTypeIdentifier ComponentTypeIdentifier Type of component. The default for web page host page plugins is IFrameComponent.
IconClass IconClass Class for the icon that identifies the page in the left-side navigation bar. You can use icons from Font Awesome.
PageKey PageKey Unique ID for the page; to replace a default page, use the name of the page without spaces, such as Home, Alarms, TestStations, TestPlans, and so on.
ShowInNavigation ShowInNavigation Controls whether the page appears in the left-side navigation bar; may be true or false
PageName PageUrlName Portion of the URL that is unique to the plugin. May include only basic Latin alphabet characters; spaces are not allowed.
Priority Priority Numerical value (double) that resolves conflicts if there are multiple plugins with the same PageKey.

In case of conflict, only the Web UI plugin with the highest priority is displayed (higher numbers are higher priority). Negative numbers are allowed.

Any default page within the Web UI has a priority of 0.5. User Priority to replace default pages with your own implementation.

Parameters Parameters Forms part of the query string that the Web UI application uses to communicate with the plugin.

Valid values are determined by the IFrameComponent you are using.

Actions Actions Additional part of the query string the Web UI application uses to communicate with the plugin.

Valid values are determined by the IFrameComponent you are using.

Table 45. Web Page Host Component Plugin Elements
Name Used in JSON File Applicable in C# Description
Source No Filepath to the source file for the plugin. Takes the following form: uiplugins/Plugin Folder Name/Plugin Name.html
WebPageHostComponentTypeIdentifier No Type of component. The default for web page host page plugins is IFrameComponent.
ComponentTypeIdentifier Yes Defines the target page for the component.
Priority Yes Numerical value that resolves conflicts if there are multiple plugins with the same ComponentTypeIdentifier; in case of conflict, the Web UI plugin with only the highest priority is displayed (higher numbers are higher priority)

To set the ComponentTypeIdentifier and Priority component plugin properties in the C# plugin, add or edit the plugin injection in the AddCustomComponentPlugins function in your PluginServiceRegistrar class that inherits from IDynamicServiceRegistrar.

The following adds the MyPlugin plugin with the default ComponentTypeIdentifier and Priority:

services.AddSingleton<ICustomComponentPlugin,
CustomComponentPlugin<MyPlugin, FlagComponentState();

If you want to change these properties, you can change the code as follows:

services.AddSingleton<ICustomComponentPlugin>(_ => new
CustomComponentPlugin<MyPlugin, FlagComponentState>("CustomName", priority:
100));