The chat responses are generated using Generative AI technology for intuitive search and may not be entirely accurate. They are not intended as professional advice. For full details, including our use rights, privacy practices and potential export control restrictions, please refer to our Generative AI Service Terms of Use and Generative AI Service Privacy Information. As this is a test version, please let us know if something irritating comes up. Like you get recommended a chocolate fudge ice cream instead of an energy managing application. If that occurs, please use the feedback button in our contact form!
Skip to content
Insights Hub and Industrial IoT

Insights Hub drives smart manufacturing through the industrial Internet of Things. Gain actionable insights with asset and operational data and improve your processes.

Insights Hub Monitor Plugin SDK – Demo Plugin¶

The distribution files provide a fully working sample for the Insights Hub Monitor Plugin in the demo folder.

The sample demonstrates the basic functionality of the plugin interface and can be enhanced with custom functionality for your own application. This section describes how to get the sample plugin running.

Prerequisites¶

  • Source code editor, e.g., Visual Studio Code.
  • Developer plan.
  • Node.js and npm are installed and configured.
  • You have at least the role mdsp:core:Developer in your tenant.
  • You have installed and configured the Cloud Foundry CLI
  • You have at least SpaceDeveloper rights in your Cloud Foundry space.

Building the Plugin¶

  1. Unzip the SDK and open the demo directory in your IDE.
  2. Install the SDK using the following command (use the version provided with the sources):

    npm install ../src/ihm-plugin-sdk-3.0.1.tgz
    
  3. Install all other public dependencies:

    npm install
    
  4. Open the manifest.yml file and customize the plugin name.

  5. Build the demo plugin using:

    npm run build
    

Deploying the Plugin to Cloud Foundry¶

  1. Open a command line interface (CLI) inside the folder with the plugin binary.
  2. Select your Cloud Foundry org and space using the following command:

    cf target -o {org_name} -s {space_name}
    

    No Cloud Foundry Orgs displayed

    If you do not see any Cloud Foundry orgs, you need to be added to your org. For more information, refer to the How Tos for Cloud Foundry.

  3. Push the plugin to your Cloud Foundry space using:

    cf push
    

Configuring the Plugin via the Developer Cockpit¶

Plugin configuration in the Developer Cockpit is very similar to application configuration. For a more detailed description of the following steps, refer to the instructions for Register the Application in the Developer Cockpit.

  1. Open the Developer Cockpit from the Launchpad and select the Dashboard tab.
  2. Click on Create new application.
  3. Select the type Insights Hub Monitor and infrastructure Cloud Foundry. Developer Cockpit with Insights Hub Monitor
  4. Enter a display name, an internal name and a version number.
  5. Upload an icon for your plugin
    (Support in Operations Insight will come later.)
  6. In Components tab:

    • Enter the component name as in the manifest file
    • Enter the Cloud Foundry URL of your plugin.
      Use cf app {pluginName} to get the URL for your deployed plugin.
    • Add one endpoint for the component using /** to match all paths.
  7. In Configuration tab:

    • Adapt the content security policy if required:
    default-src 'self' static.eu1.mindsphere.io; style-src * 'unsafe-inline'; script-src 'self' 'unsafe-inline' static.eu1.mindsphere.io; img-src * data:;
    
    • Configure the plugin settings as you want. Please note, that the json must be valid.

      • For a sidebar plugin you can use as example:
      {"views":[{"container":"appBar.explore","displayName":{"default":"Sidebar Plugin","en":"Sidebar Plugin"},"icon":"demo","id":"demo.home","navigationMode":"default","type":"default","url":"/"}]}
      
      • For an asset plugin you can use as example:
      {"views":[{"container":"appBar.explore.assets","displayName":{"default":"Asset Plugin","en":"Asset Plugin"},"icon":"demo","id":"demo.home","navigationMode":"default","type":"default","url":"/"}]}
      
  8. Click on Save.

If your plugin requires additional scopes, you can configure that in the Role Configuration. Developer Cockpit with Insights Hub Monitor Plugin

For this demo plugin you can directly proceed with step 9.

  1. Register the plugin.
    Accept the dialog to assign the roles to your user.

Developer Cockpit with Insights Hub Monitor Plugin

If you configured specific scopes, you have to logout and login again, to get them active.
  1. Open Operations Insight
    Depending on you plugin settings, it will be visible

    • in the assets view Insights Hub Monitor Plugin in Assets

    • or in the sidebar Insights Hub Monitor Plugin in Sidebar

Congratulations!

You have deployed and configured your first Insights Hub Monitor Plugin. You can now prepare your plugin for productive use in the same way as an application.