Salesforce

Panels in the aiWARE SDK

« Go Back
Information
Panels in the aiWARE SDK
000004004
Public
Product Selection
aiWare - aiWare
Article Details

A panel is a UI element that exposes a core function of the system. Unlike widgets, panels are often mounted and unmounted as needed, whereas widgets usually remain on the screen permanently. Panels are typically used with the App bar widget.

Available panels

Each panel in the SDK contains a standard interface, a set of features, and configurations you can use to customize the panel.
The available panels are:

Help panels

  • Documentation panel
  • Knowledgebase panel

Utility panels

  • Local machine importer panel

OS Center panels

  • Admin Center panel
  • Data Center panel
  • Processing Center panel
  • Resource Center panel

Mount a panel

To display any of the OS Center panels or the Local machine importer panel in the app, use the mountPanel() method.

[Tip] To see a list of all mounted panels in the console, run aiware.store.getState().panels.
  • Call aiware.mountPanel().

Parameters

The parameters of mountPanel() are an object with these properties:

DescriptionRequiredTypeDescription
panelIDTrueString

The panel ID. Specified as one of the following:

  • DATA_CENTER_IMPORTER
  • ADMIN_CENTER
  • DATA_CENTER
  • PROCESSING_CENTER
  • RESOURCE_CENTER
microFrontendTrueObjectThe panel properties that handle or interact with data.
panelConfigTrueObjectThe appearance options for the panel. These are unique to each panel.

microFrontend

NameRequiredTypeDescription
nameTrueString

The name of the component. Must correspond to the panelID. Specified as one of the following:

  • DATA_CENTER_IMPORTER
  • ADMIN_CENTER
  • DATA_CENTER
  • PROCESSING_CENTER
  • RESOURCE_CENTER

panelConfig

NameRequiredTypeDescription
typeTrueStringThe panel type must be 'APP_BAR_PANEL_TEMPLATE'.
marginTopFalseNumberThe top margin of the panel.
marginStartFalseNumberThe right margin of the panel.
sizeFalseStringThe width of the panel in pixels. Can be small, medium, large, xlarge, or xxlarge. Each value is defined in getWidth().
zIndexFalseNumberThe z-index of the panel.
dimmedFalseNumberThe number of panels that slide over this panel in the UI. The number affects how much this panel is dimmed.

 

This example defines microFrontend and panelConfig, then it mounts the Local machine importer panel.

    const microFrontend = {
      name: 'DATA_CENTER_IMPORTER',
      config: {
        name: 'Local Importer',
      },
    };
    const panelConfig = {
      type: 'APP_BAR_PANEL_TEMPLATE',
      marginTop: 55,
      marginStart: 80,
      size: 'large',
      zIndex: 1000,
      dimmed: 0,
    };
    aiware.mountPanel({
      panelId: 'DATA_CENTER_IMPORTER',
      microFrontend: microFrontend,
      panelConfig: panelConfig,
    });

Unmount a panel

To stop a panel from displaying in the app, use the hidePanel() method.

  • Call aiware.hidePanel().

Parameters

The parameters of hidePanel() are:

NameRequiredTypeDescription
panelIdTrueString

The ID of the panel to unmount.

Additional Technical Documentation Information
Properties
2/13/2024 8:04 PM
2/13/2024 8:04 PM
2/13/2024 8:04 PM
Documentation
Documentation
000004004
Translation Information
English

Powered by