1

So I've been trying to make a customised application in Cumulocity. However, I want to maintain the consistency for cockpit and my customised application, so I'm just wondering is there any way to apply the "out of the box" widgets to our own application?

Thanks

1 Answers1

2

You can achieve that through the manifest file in your application (cumulocity.json). Just list the plugins you want to include into your custom application.

{
  "availability": "MARKET",
  "contextPath": "charts",
  "key": "charts-app-key",
  "name": "Charts",
  "resourcesUrl": "/",
  "type": "HOSTED",
  "imports": [
    "core/c8yBranding",
    "charts/dygraphsHour",
    "charts/dygraphsTenMin",
    "administration/alarmMapping"
  ]
}

You can list all the imports of a default application using the CLI tool.

c8y util:showimports cockpit

If you want to have the full cockpit application and just add you plugins it might be easier to use the target files:

{
    "name": "Training",
    "comment": "Release with additional example plugins",
    "applications": [
        {
            "contextPath": "cockpit",
            "addImports": [ "charts/dygraphsHour", "core/c8yBranding"]
        }
    ]
}

This will use the full cockpit and just adds the wo plugins listed. It will replace your default cockpit with your extended one.

TyrManuZ
  • 2,039
  • 1
  • 14
  • 23