Skip to content

Commit

Permalink
Merge pull request #9 from SoftwareAG/feat/1020-release
Browse files Browse the repository at this point in the history
Feat/1020 release
  • Loading branch information
hnaether-c8y authored Jul 10, 2024
2 parents 4ed902a + 5fb14c7 commit 12455cd
Show file tree
Hide file tree
Showing 48 changed files with 12,004 additions and 14,606 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
./dist/
.angular
dist
.idea
coverage
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,20 @@ Easily create text or JSON options. You can also encrypt the content of an optio
JSON editor example
![alt Update of a tenant option with JSOn value example](/docs/update-json-option.png)

(Bulk) Import and export of all options/ specific categories
![alt Import previously downloaded Tenant Option JSON file](/docs/import-json-options.png)

## 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
2.0.x - compatible with UI v. 1020

**How to start**
Change the target tenant and application you want to run this plugin on in the `package.json`.
Expand Down
128 changes: 128 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"sag-ps-iot-pkg-tenant-option-management-plugin": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "less",
"standalone": false
},
"@schematics/angular:directive": {
"standalone": false
},
"@schematics/angular:pipe": {
"standalone": false
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@c8y/devkit:build",
"options": {
"outputPath": "dist/sag-ps-iot-pkg-tenant-option-management-plugin",
"polyfills": [
"zone.js"
],
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "less",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.less"
],
"scripts": [],
"aot": false,
"main": "src/main.ts",
"buildOptimizer": false,
"allowedCommonJsDependencies": [
"regenerator-runtime/runtime",
"@cordobo/qrcode",
"zone.js/dist/zone",
"chroma-js"
]
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"outputHashing": "all",
"buildOptimizer": false
},
"development": {
"optimization": false,
"extractLicenses": false,
"sourceMap": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@c8y/devkit:dev-server",
"configurations": {
"production": {
"buildTarget": "sag-ps-iot-pkg-tenant-option-management-plugin:build:production"
},
"development": {
"buildTarget": "sag-ps-iot-pkg-tenant-option-management-plugin:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@c8y/devkit:extract-i18n"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"polyfills": [
"zone.js",
"zone.js/testing"
],
"tsConfig": "tsconfig.spec.json",
"inlineStyleLanguage": "less",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.less"
],
"scripts": []
}
},
"deploy": {
"builder": "@c8y/devkit:deploy",
"configurations": {
"production": {
"buildTarget": "sag-ps-iot-pkg-tenant-option-management-plugin:build:production"
},
"development": {
"buildTarget": "sag-ps-iot-pkg-tenant-option-management-plugin:build:development"
}
},
"defaultConfiguration": "production"
},
"compile-i18n": {
"builder": "@c8y/devkit:compile-i18n"
}
}
}
}
}
3 changes: 0 additions & 3 deletions assets/example.css

This file was deleted.

54 changes: 54 additions & 0 deletions cumulocity.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import type { ConfigurationOptions } from '@c8y/devkit';
import { author, description, version } from './package.json';

export default {
runTime: {
author,
description,
version,
name: 'Tenant Option Management Plugin',
contentSecurityPolicy:
"base-uri 'none'; default-src 'self' 'unsafe-inline' http: https: ws: wss:; connect-src 'self' http: https: ws: wss:; script-src 'self' *.bugherd.com *.twitter.com *.twimg.com *.aptrinsic.com 'unsafe-inline' 'unsafe-eval' data:; style-src * 'unsafe-inline' blob:; img-src * data: blob:; font-src * data:; frame-src *; worker-src 'self' blob:;",
dynamicOptionsUrl: true,
remotes: {
'widget-plugin': ['TenantOptionManagementModule']
},
package: 'plugin',
isPackage: true,
noAppSwitcher: true,
webSdkVersion: "1020.0.19",
exports: [
{
name: "Tenant option plugin",
module: "TenantOptionManagementModule",
path: "./src/app/tenant-option-management/tenant-option-management.module.ts",
description: "Easily create, edit and delete tenant options. You can configure an option as encrypted and can decided between text or JSON input."
}
]
},
buildTime: {
federation: [
'@angular/animations',
'@angular/cdk',
'@angular/common',
'@angular/compiler',
'@angular/core',
'@angular/forms',
'@angular/platform-browser',
'@angular/platform-browser-dynamic',
'@angular/router',
'@angular/upgrade',
'@c8y/client',
'@c8y/ngx-components',
'ngx-bootstrap',
'@ngx-translate/core',
'@ngx-formly/core'
],
copy: [
{
from: "docs",
to: "docs"
}
]
}
} as const satisfies ConfigurationOptions;
Binary file added docs/import-json-options.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 12455cd

Please sign in to comment.