Git Product home page Git Product logo

softwareag / cumulocity-tenant-option-management-plugin Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 1.0 1.26 MB

Easily create, edit and delete tenant options. You can configure an option as encrypted and can decided between text or JSON input.

License: Apache License 2.0

TypeScript 74.17% CSS 0.09% JavaScript 0.48% HTML 14.22% Less 11.04%
cumulocity-iot cumulocity-package cumulocity-plugin cumulocity-profserv-package iot-analytics widget

cumulocity-tenant-option-management-plugin's Introduction

Cumulocity IoT Tenant Option Management plugin

Easily create, edit and delete tenant options. You can configure an option as encrypted and can decided between text or JSON input.

Sample images

List all tenant options that were created on the tenant. You can search through, sort and filter all columns. alt Tenant options grid example

Easily create text or JSON options. You can also encrypt the content of an option. alt Create tenant option example

JSON editor example alt Update of a tenant option with JSOn value example

Limitations

You can only see, edit and delete options you created using the plugin. (You can add existing tenant options using the import button.)

Features to come

  • (Bulk) Import and export of all options/ specific categories
  • Import by Template o dynamically show creation forms for c8y specific tenant options using formly o will ship with example template for Analytics Builder options

Versions

1.0.x - compatible with UI v. 1017 In the future: 2.0.x - compatible with UI v. 1018

How to start Change the target tenant and application you want to run this plugin on in the package.json.

c8ycli server -u https://{{your-tenant}}.cumulocity.com/ --shell {{administration}}

Keep in mind that this plugin needs to have an app (e.g. cockpit) running with at least the same version as this plugin. if your tenant contains an older version, use the c8ycli to create a cockpit clone running with at least v 1017! Upload this clone to the target tenant and reference this name in the --shell command.

The widget plugin can be locally tested via the start script:

npm start

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.

Note that the --shell flag creates a proxy to the cockpit application and provides WidgetPluginModule as an remote via URL options.

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.

Useful links

๐Ÿ“˜ Explore the Knowledge Base
Dive into a wealth of Cumulocity IoT tutorials and articles in our Tech Community Knowledge Base.

๐Ÿ’ก Get Expert Answers
Stuck or just curious? Ask the Cumulocity IoT experts directly on our Forum.

๐Ÿš€ Try Cumulocity IoT
See Cumulocity IoT in action with a Free Trial.

โœ๏ธ Share Your Feedback
Your input drives our innovation. If you find a bug, please create an issue in the repository. If youโ€™d like to share your ideas or feedback, please post them here.

More to discover


These tools are 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.

cumulocity-tenant-option-management-plugin's People

Contributors

cguether avatar hnaether-sag avatar techcommunity avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

cumulocity-tenant-option-management-plugin's Issues

Create scheme based input masks

Right now json needs to be inputted in a free manner. Users can add configurations to show input masks for creation/ update of tenant options.

Load all available tenant options

Right now the plugin only loads the first page with a page size of 2000 for the tenant options.

tenant-option-management\tenant-option-management.service.ts

  getAllOptions() {
    return this.tenantOption
      .list({
        pageSize: 2000,
      })
      .then((res) => res.data.map((o) => ({ id: `${o.category}-${o.key}`, value: o.value })));
  }

It's unusual, but there could be use cases, which have more than 2000 tenant options. In this case, it might happen that not all options are displayed correctly, because they can't be found on the page loaded.

Proposed Solution

Update the query to include query parameter withTotalPages and load all available pages for tenant options.

Tenant options with a value of type Boolean are displayed in JSON editor

I have created a tenant option with a single value of type boolean. Once I want to edit the tenant option, the JSON editor will be opened to update the value. I would expect the text editor to be opened to update the value instead of the JSON editor

tenant-options-plugin

this.jsonEditorData = JSON.parse(this.option.value) as object; doesn't throw an error if the value is of type boolean for whatever reason.

Are existing tenant options not shown?

First of all: Nice plugin!

When I open the tenant-options view for the first time it is kind of empty:
image

Even if I have some tenant options already created via API. However, when I add a tenant option, it is shown correctly.

So my question:

  • Should this plugin show existing tenant options or is there some logic to hide certain existing options? If there is some logic, what is it?
  • The view looks broken if existing tenant options should be hidden. Maybe add an empty state to the list view would help. I thought the view is broken in the first place :/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.