Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ck-c8y committed Nov 23, 2023
1 parent e272fed commit c361883
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 60 deletions.
81 changes: 22 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,49 @@

## Content
- [Overview](#overview)
- [Installation](#installation)
- [Content](#content)
- [Installation](#installation-of-plugin-as-community-plugin)
- [Build Instructions](#build-instructions)
- [User Guide](#user-guide)
- [Analytics Builder Block SDK](#analytics-builder-block-sdk)

## Overview

Extends the standard Cumulocity web application with a plugin to manage and add Analytics Builder extensions. Currently the standard UI does not allow the upload of custom blocks via .zip files. This extension of the standard Streaming-Analytics UI adds an plugin to add and a list of all loaded custom blocks.
Extends the standard Cumulocity web application with a plugin to manage and add Analytics Builder extensions. Currently the standard UI does not offer the upload of custom blocks via .zip files. This extension enhances the standard Streaming-Analytics UI with these capabilities.

You can upload blocks that were generated via the [Apama Analytics Builder Block SDK](https://github.com/SoftwareAG/apama-analytics-builder-block-sdk) via the "Add extension" button. Drop the .zip file to the modal dialog and the extension will be loaded. In order to use them you have to restart the streaming analytics engine. Click on the "Deploy Extensions (Restart)" button and wait for the notification that the engine was restarted.

![Extension installation](resources/images/extension-installation.png)

In addition a table lists all installed blocks, with information if it is a custom block.
In addition a table lists all installed analytics blocks with the following information: name, category, custom block, extension package name.

![Block list](resources/images/block-list.png)

## Installation
After the delployment (restart of streaming analytics) the Block will be available within the Steaming Analytics Application. Deleting a block will remove the block again. Keep in mind that no checking of any usage of that particular custom block is done an thus straming flows might not work anymore.

![Use Extension](resources/images/analytics-builder.png)

## Installation of plugin as community plugin

The plugin is available as a community plugin and can be installed from the Administratio -> Extensions UI:
The plugin is available as a community plugin and can be installed from the Administration -> Extensions UI:

![Plugin installation](resources/images/plugin-installation.png)

## Build Instructions

This guide will teach you how to add the modified administration application to your tenant.
To upload the latest application release into your tenant, just go to the [Releases](https://github.com/SoftwareAG/cumulocity-analytics-management/releases) and download the analytics-extension.zip package.

Afterwards, login to your Cumulocity IoT Tenant and go to Administration--Applications--Own applications. To add the modified administration webb application click on Add application. After that, select Upload web application and drop the pre-downloaded zip-folder into the field.
This guide will teach you how to add the modified Cumulocity standard application, e.g. DeviceManagement, Cockpit, ... to your tenant.
* to upload the latest plugin release into your tenant, just go to the [Releases](https://github.com/SoftwareAG/cumulocity-analytics-management/releases) and download the analytics-extension.zip package.
* login to your Cumulocity IoT Tenant, open Administration--Ecosystem--Extensions -> Add extension package
* upload analytics-extension.zip
* login to your Cumulocity IoT Tenant and clone Cumulocity standard application in Administration--Applications--CHOOSE_STANARD_APPLICATION_TO_CONE -> Clone.
* to add the modified Cumulocity standard application click on Clone application. After that, select Upload web application and drop the pre-downloaded zip-folder into the field.
* install plugin in cloned application

Finally, you should see the new application in your App-Switcher.

![Upload Analytics Extension](resources/images/animated-installation-plugin.gif)
<!-- <br/>
<p align="center" style="text-indent:70px;">
<a>
<img width="70%" src="http://g.recordit.co/F4P3AQmC11.gif">
</a>
</p>
<br/> -->


**Prerequisites:**

* Git
**Prerequisites to build plugin:**

* Git
* NodeJS (release builds are currently built with `v16.20.0`)

* NPM (Included with NodeJS)

**Instructions**
Expand All @@ -60,55 +56,22 @@ Make sure you set the environments url, username, password before starting.
git clone https://github.com/SoftwareAG/cumulocity-analytics-management.git
```
2. Change directory:

```cd cumulocity-analytics-management```

3. run npm i command to install all library files specified in source code

```npm i ```

4. (Optional) Local development server:

```npm start```

6. Build the app:

```npm run build```

7. Deploy the app:
```npm run deploy```
## User Guide

You can upload blocks that were generated via the [Apama Analytics Builder Block SDK](https://github.com/SoftwareAG/apama-analytics-builder-block-sdk) via the "Add extension" button. Drop the .zip file there and the extension will be loaded. In order to use them you have to restart the streaming analytics engine. Click on the "Restart Streaming Analytics" button and wait for the notification that the engine was restarted.

![Using Analytics Extension](resources/images/animated-using-plugin.gif)
<!-- <br/>
<p align="center" style="text-indent:70px;">
<a>
<img width="70%" src="http://g.recordit.co/rVfxvThOmc.gif">
</a>
</p>
<br/> -->


After the restart the Block will be available within the Steaming Analytics Application. Deleting a block will remove the block again. Keep in mind that no checking of any usage of that particular custom block is done an thus straming flows might not work anymore.

![Use Extension](resources/images/analytics-builder.png)

<!-- <br/>
<p align="center" style="text-indent:70px;">
<a>
<img width="70%" src="resources/images/analytics-builder.png">
</a>
</p>
<br/> -->

## Analytics Builder Block SDK

Custom blocks can be generated via the [Apama Analytics Builder block sdk](https://github.com/SoftwareAG/apama-analytics-builder-block-sdk).
Custom blocks can be generated via the [Apama nalytics Builder block sdk](https://github.com/SoftwareAG/apama-analytics-builder-block-sdk).
Find addtional information on how blocks can be developed. However in the release section is one example block included that can be used for test purposes.

The provided block is an example of the machine learning block that also allows ONNX models.
The provided block is an example of the adding the two inputs.

![Use Extension](resources/images/block-detail.png)
<!-- <br/>
Expand Down
Binary file removed resources/images/animated-using-plugin.gif
Binary file not shown.
Binary file modified resources/images/block-detail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/extension-installation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/shared/analytics.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export class AnalyticsService {
let payload = p["data"]["data"];

if (payload.text == "Recording apama-ctrl safe mode state") {
this.alertService.warning("Deplyoment successful");
this.alertService.warning("Deployment successful");
}
console.log("New status for cep:", payload);
}
Expand Down

0 comments on commit c361883

Please sign in to comment.