Code Monkey home page Code Monkey logo

rule-node-examples-ui-ngx's Introduction

rule-node-examples-ui-ngx

Configuration UI for Custom Rule Nodes from rule-node-examples ThingsBoard repository

Build steps

  1. Install dependencies

    yarn install 
    
  2. Production build

    yarn run build 
    

    Resulting JavaScript should be here:

    ./target/generated-resources/public/static/custom-nodes-config.js
    
  3. Deploy Rule Nodes UI JavaScript code to to rule-node-examples

    Resulting custom-nodes-config.js should be copied to rule-node-examples/src/main/resources/public/static/rulenode/ directory of rule-node-examples repository.

  4. Run Rule Nodes UI in hot redeploy mode

    yarn start
    

    By default, Rule Nodes UI will be available on port 5000 (http://localhost:5000)

rule-node-examples-ui-ngx's People

Contributors

blackstar-baba avatar ikulikov avatar kalutkaz avatar vvlladd28 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rule-node-examples-ui-ngx's Issues

npm run build command failed!

Hi
after run this command "npm run build" i got the following error

ng build && node install.js

Building Angular Package


Building entry point 'custom-nodes-config'

Compiling TypeScript sources through ngc
ERROR: node_modules/thingsboard/src/app/modules/home/components/widget/widget-component.service.ts:288:53 - error TS2339: Property 'flat' does not exist on type 'Type[][]'.

288 let resModules = (res as Type[][]).flat();
~~~~

An unhandled exception occurred: node_modules/thingsboard/src/app/modules/home/components/widget/widget-component.service.ts:288:53 - error TS2339: Property 'flat' does not exist on type 'Type[][]'.

288 let resModules = (res as Type[][]).flat();
~~~~




npm version:

{ 'thingsboard-rule-config-ui-ngx': '3.0.0',
npm: '6.14.4',
ares: '1.15.0',
brotli: '1.0.7',
cldr: '36.1',
http_parser: '2.9.3',
icu: '66.1',
modules: '64',
napi: '5',
nghttp2: '1.40.0',
node: '10.19.0',
openssl: '1.1.1d',
tz: '2019c',
unicode: '13.0',
uv: '1.34.2',
v8: '6.8.275.32-node.55',
zlib: '1.2.11' }



linux distro:
Distributor ID: Ubuntu
Description: Ubuntu 19.10
Release: 19.10
Codename: eoan

yarn run build failed

Hello,
I have followed the instruction of this, but after I typed the 'yarn run build', i got this:
yarn run v1.22.5
$ ng build && node install.js
Building Angular Package


Building entry point 'custom-nodes-config'

Compiling TypeScript sources through ngc
ERROR: node_modules/thingsboard/src/app/core/services/time.service.ts:59:7 - error TS2345: Argument of type 'import("/home/linux/thingsboard-ui-ngx/rule-node-examples-ui-ngx/node_modules/thingsboard/node_modules/rxjs/internal/types").OperatorFunction<number, number>' is not assignable to parameter of type 'import("/home/linux/thingsboard-ui-ngx/rule-node-examples-ui-ngx/node_modules/rxjs/internal/types").OperatorFunction<number, number>'.
Types of parameters 'source' and 'source' are incompatible.
Type 'import("/home/linux/thingsboard-ui-ngx/rule-node-examples-ui-ngx/node_modules/rxjs/internal/Observable").Observable' is not assignable to type 'import("/home/linux/thingsboard-ui-ngx/rule-node-examples-ui-ngx/node_modules/thingsboard/node_modules/rxjs/internal/Observable").Observable'.
The types of 'source.operator.call' are incompatible between these types.
Type '(subscriber: import("/home/linux/thingsboard-ui-ngx/rule-node-examples-ui-ngx/node_modules/rxjs/internal/Subscriber").Subscriber, source: any) => import("/home/linux/thingsboard-ui-ngx/rule-node-examples-ui-ngx/node_modules/rxjs/internal/types").TeardownLogic' is not assignable to type '(subscriber: import("/home/linux/thingsboard-ui-ngx/rule-node-examples-ui-ngx/node_modules/thingsboard/node_modules/rxjs/internal/Subscriber").Subscriber, source: any) => import("/home/linux/thingsboard-ui-ngx/rule-node-examples-ui-ngx/node_modules/thingsboard/node_modules/rxjs/internal/types").TeardownLogic'.
Types of parameters 'subscriber' and 'subscriber' are incompatible.
Type 'import("/home/linux/thingsboard-ui-ngx/rule-node-examples-ui-ngx/node_modules/thingsboard/node_modules/rxjs/internal/Subscriber").Subscriber' is not assignable to type 'import("/home/linux/thingsboard-ui-ngx/rule-node-examples-ui-ngx/node_modules/rxjs/internal/Subscriber").Subscriber'.
Property 'isStopped' is protected but type 'Subscriber' is not a class derived from 'Subscriber'.

My ubuntu is 18.04.
Please tell me what I have missed.
Thanks in advance.

Can not build project

Hi, I am getting following error during npm run build phase

ng build && node install.js

Building Angular Package
(node:32186) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:32186) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:32186) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:32186) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:32186) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:32186) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency

------------------------------------------------------------------------------
Building entry point 'custom-nodes-config'
------------------------------------------------------------------------------
Compiling TypeScript sources through ngc
ERROR: Cannot read property 'type' of null
An unhandled exception occurred: Cannot read property 'type' of null
See "/private/var/folders/dy/61h5f89s0hg1sdpr_6w5_3cc0000gn/T/ng-F7vpy9/angular-errors.log" for further details.
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! [email protected] build: `ng build && node install.js`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

my env:

Angular CLI: 9.1.6
Node: 14.15.3
OS: darwin x64

A question about build

I used the steps introduced in the Readme to build, but there were too many errors. Is this project still under maintenance?

Custom RuleNode:Failed to load configuration ui resources (new)

Ran into the same issue as #26, and I do not think the solution proposed should be considered enough to close the issue.

If you want to keep your own set of custom rule nodes with custom ui components and templates, it does not make sense to keep around the entire rule-config-ui-ngx repo.

Custom RuleNode:Failed to load configuration ui resources.

Hello, Sir!
I follow Create a custom rule node,

I used two projects: https://github.com/thingsboard/rule-node-examples and https://github.com/blackstar-baba/rule-node-examples-ui-ngx

  1. I followed: node examples UI-NGX step5: deploy rule nodes UI JavaScript code to rule node examples
    Resulting custom-nodes-config. js should be copied to rule-node-examples/src/main/resources/public/static/rulenode/ directory of rule-node-examples repository.

  2. In rule node examples: MVN clean install

3 sudo cp rule-engine-1.0. 0-custom-nodes. jar /usr/share/thingsboard/extensions/

4 sudo service thingsboard restart

5 when I add the newly created rule node, it prompts: failed to load configuration UI resources

Can you remind me of any mistakes? Thanks

yarn run build error

Hi, thank your great work, I follow the instruction but get the erros, Any tips for me? Thank you.

yarn run build --registry=https://registry.npm.taobao.org
yarn run v1.22.17
$ ng build && node install.js --registry=https://registry.npm.taobao.org
Building Angular Package


Building entry point 'custom-nodes-config'

Compiling TypeScript sources through ngc
ERROR: Undefined function.

56 │ $x1: $x0 - math.div($x0 * $x0 - abs($r), 2 * $x0);
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

node_modules/thingsboard/src/scss/mixins.scss 56:16 sqrt()
node_modules/thingsboard/src/app/shared/components/popover.component.scss 123:12 root stylesheet
An unhandled exception occurred: Undefined function.

56 │ $x1: $x0 - math.div($x0 * $x0 - abs($r), 2 * $x0);
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

node_modules/thingsboard/src/scss/mixins.scss 56:16 sqrt()
node_modules/thingsboard/src/app/shared/components/popover.component.scss 123:12 root stylesheet
See "/private/var/folders/0h/f6rx0q794js8q_0rtffvs8l80000gn/T/ng-X3MZ8X/angular-errors.log" for further details.
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

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.