This repository has been archived by the owner on Jan 10, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes has been added for the css issues.
- Loading branch information
Showing
6 changed files
with
157 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,72 @@ | ||
# Cumulocity widget plugin | ||
|
||
This is the Cumulocity module federation plugin. Plugins can be developed like any Cumulocity application, but can be used at runtime by other applications. Therefore, they export an Angular module which can then be imported by any other application. The exports are defined in `package.json`: | ||
# Route Tracker Widget for Cumulocity [<img width="35" src="https://user-images.githubusercontent.com/32765455/211497905-561e9197-18b9-43d5-a023-071d3635f4eb.png"/>](https://github.com/SoftwareAG/cumulocity-route-tracker-plugin/releases/download/1.0.0-beta/route-tracker-runtime-widget-1.0.0-beta.zip) | ||
|
||
``` | ||
"exports": [ | ||
{ | ||
"name": "Example widget plugin", | ||
"module": "WidgetPluginModule", | ||
"path": "./widget/widget-plugin.module.ts", | ||
"description": "Adds custom widget" | ||
} | ||
] | ||
``` | ||
|
||
This Route Tracker widget is the Cumulocity module federation plugin created using c8ycli. This plugin can be used in Application Builder or Cockpit. | ||
The Route Tracker widget help you to display route, geofence along with realtime device status and also one can enable the smart rule which gets trigged when smart rule violation happens. | ||
|
||
**How to start** | ||
Run the command below to scaffold a `widget` plugin. | ||
### Please note that this plugin is in currently under BETA mode. | ||
|
||
``` | ||
c8ycli new <yourPluginName> widget-plugin | ||
``` | ||
### Please choose Route Tracker release based on Cumulocity/Application builder version: | ||
|
||
As the app.module is a typical Cumuloctiy application, any new plugin can be tested via the CLI: | ||
|APPLICATION BUILDER | CUMULOCITY | ROUTE TRACKER WIDGET | | ||
|--------------------|------------|----------------------| | ||
| 2.x.x(coming soon) | >= 1016.x.x| 1.x.x | | ||
|
||
``` | ||
npm start -- --shell cockpit | ||
``` | ||
|
||
## Representation | ||
|
||
In the Module Federation terminology, `widget` plugin is called `remote` and the `cokpit` is called `shell`. Modules provided by this `widget` will be loaded by the `cockpit` application at the runtime. This plugin provides a basic custom widget that can be accessed through the `Add widget` menu. | ||
![RouteTrackermain](https://user-images.githubusercontent.com/24636020/186117425-55a2c67b-1dbf-47ba-b50f-5331e07c580a.PNG) | ||
|
||
|
||
> Note that the `--shell` flag creates a proxy to the cockpit application and provides` WidgetPluginModule` as an `remote` via URL options. | ||
## Prerequisite | ||
Cumulocity c8ycli >=1016.x.x | ||
|
||
|
||
## Installation | ||
|
||
Also deploying needs no special handling and can be simply done via `npm run deploy`. As soon as the application has exports it will be uploaded as a plugin. | ||
### Runtime Widget Deployment? | ||
|
||
* This widget support runtime deployment. Download [Runtime Binary](https://github.com/SoftwareAG/cumulocity-route-tracker-plugin/releases/download/1.0.0-beta/route-tracker-runtime-widget-1.0.0-beta.zip) and install via Administrations(Beta mode) --> Ecosystems --> Applications --> Packages. | ||
|
||
|
||
|
||
## QuickStart | ||
This guide will teach you how to add widget in your existing or new dashboard. | ||
|
||
1. Open you application from App Switcher | ||
|
||
2. Add new dashboard or navigate to existing dashboard | ||
|
||
3. Click `Add Widget` | ||
|
||
4. Search for `Route Tracker` | ||
|
||
5. Select `Target Assets or Devices` | ||
|
||
7. Click `Save` | ||
|
||
Congratulations! Smart Map is configured. | ||
|
||
|
||
## User Guide | ||
|
||
![RouteTrackerConfiguration](https://user-images.githubusercontent.com/24636020/186117674-10d25550-ad94-4551-867a-12abd50bd847.PNG) | ||
|
||
1. Takes device name, geofence radius, start and end address/latitude and longitude, icon name color, marker color and smart rule configuration as input. | ||
|
||
2. If configured Smart rule with provided name doesnt exist then a new rule get created and if the rule with provided name exists then it updates the existing rule. | ||
**Note** Make sure for different devices and for differnt configuration a uinique smart rule name need to be provided else it overrides if the rule with name exists. | ||
|
||
To check the smart rules please navigate to Application Switcher -> Cockpit -> Configuration -> Global smart rule | ||
|
||
|
||
------------------------------ | ||
|
||
This widget is provided as-is and without warranty or support. They do not constitute part of the Software AG product suite. Users are free to use, fork and modify them, subject to the license agreement. While Software AG welcomes contributions, we cannot guarantee to include every contribution in the master project. | ||
|
||
_____________________ | ||
|
||
For more information you can Ask a Question in the [TECHcommunity Forums](https://tech.forums.softwareag.com/tags/c/forum/1/Cumulocity-IoT). | ||
|
||
You can find additional information in the [Software AG TECHcommunity](https://tech.forums.softwareag.com/tag/Cumulocity-IoT). |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.