Browse Source

:sparkles: 项目初始化

Twelve615 1 year ago
commit
1e73a15688
100 changed files with 3643 additions and 0 deletions
  1. 60 0
      .github/ISSUE_TEMPLATE/---bug-report.md
  2. 20 0
      .github/ISSUE_TEMPLATE/feature_request.md
  3. 25 0
      .github/ISSUE_TEMPLATE/question.md
  4. 88 0
      .github/release.yml
  5. 40 0
      .github/workflows/check-configuration-files.yml
  6. 39 0
      .gitignore
  7. 201 0
      LICENSE
  8. 2 0
      README.md
  9. 2 0
      application/.gitignore
  10. 450 0
      application/pom.xml
  11. 46 0
      application/src/main/conf/logback.xml
  12. 24 0
      application/src/main/conf/thingsboard.conf
  13. 22 0
      application/src/main/data/certs/azure/DigiCertGlobalRootG2.crt.pem
  14. 207 0
      application/src/main/data/json/demo/dashboards/firmware.json
  15. 252 0
      application/src/main/data/json/demo/dashboards/gateway.json
  16. 146 0
      application/src/main/data/json/demo/dashboards/gateways.json
  17. 516 0
      application/src/main/data/json/demo/dashboards/rule_engine_statistics.json
  18. 207 0
      application/src/main/data/json/demo/dashboards/software.json
  19. 162 0
      application/src/main/data/json/demo/dashboards/thermostats.json
  20. 231 0
      application/src/main/data/json/edge/install_instructions/centos/instructions.md
  21. 105 0
      application/src/main/data/json/edge/install_instructions/docker/instructions.md
  22. 3 0
      application/src/main/data/json/edge/install_instructions/docker/localhost_warning.md
  23. 164 0
      application/src/main/data/json/edge/install_instructions/ubuntu/instructions.md
  24. 197 0
      application/src/main/data/json/edge/rule_chains/edge_root_rule_chain.json
  25. 24 0
      application/src/main/data/json/system/oauth2_config_templates/apple_config.json
  26. 23 0
      application/src/main/data/json/system/oauth2_config_templates/facebook_config.json
  27. 21 0
      application/src/main/data/json/system/oauth2_config_templates/github_config.json
  28. 24 0
      application/src/main/data/json/system/oauth2_config_templates/google_config.json
  29. 4 0
      application/src/main/data/json/system/widget_bundles/alarm_widgets.json
  30. 4 0
      application/src/main/data/json/system/widget_bundles/analogue_gauges.json
  31. 4 0
      application/src/main/data/json/system/widget_bundles/cards.json
  32. 4 0
      application/src/main/data/json/system/widget_bundles/charts.json
  33. 4 0
      application/src/main/data/json/system/widget_bundles/control_widgets.json
  34. 4 0
      application/src/main/data/json/system/widget_bundles/count_widgets.json
  35. 4 0
      application/src/main/data/json/system/widget_bundles/date.json
  36. 4 0
      application/src/main/data/json/system/widget_bundles/digital_gauges.json
  37. 4 0
      application/src/main/data/json/system/widget_bundles/edge_widgets.json
  38. 4 0
      application/src/main/data/json/system/widget_bundles/entity_admin_widgets.json
  39. 4 0
      application/src/main/data/json/system/widget_bundles/entity_widgets.json
  40. 4 0
      application/src/main/data/json/system/widget_bundles/gateway_widgets.json
  41. 4 0
      application/src/main/data/json/system/widget_bundles/gpio_widgets.json
  42. 4 0
      application/src/main/data/json/system/widget_bundles/home_page_widgets.json
  43. 4 0
      application/src/main/data/json/system/widget_bundles/html_widgets.json
  44. 4 0
      application/src/main/data/json/system/widget_bundles/input_widgets.json
  45. 4 0
      application/src/main/data/json/system/widget_bundles/maps.json
  46. 4 0
      application/src/main/data/json/system/widget_bundles/navigation_widgets.json
  47. 4 0
      application/src/main/data/json/system/widget_bundles/status_indicators.json
  48. 4 0
      application/src/main/data/json/system/widget_bundles/tables.json
  49. 13 0
      application/src/main/data/json/system/widget_bundles/weather_widgets.json
  50. 4 0
      application/src/main/data/json/system/widget_types/alarm_count.json
  51. 4 0
      application/src/main/data/json/system/widget_types/alarms_table.json
  52. 4 0
      application/src/main/data/json/system/widget_types/asset_admin_table.json
  53. 4 0
      application/src/main/data/json/system/widget_types/attributes_card.json
  54. 17 0
      application/src/main/data/json/system/widget_types/bars.json
  55. 4 0
      application/src/main/data/json/system/widget_types/basic_gpio_control.json
  56. 4 0
      application/src/main/data/json/system/widget_types/basic_gpio_panel.json
  57. 19 0
      application/src/main/data/json/system/widget_types/battery_level.json
  58. 4 0
      application/src/main/data/json/system/widget_types/compass.json
  59. 4 0
      application/src/main/data/json/system/widget_types/dashboard_state_widget.json
  60. 4 0
      application/src/main/data/json/system/widget_types/dashboards.json
  61. 4 0
      application/src/main/data/json/system/widget_types/date_range_navigator.json
  62. 4 0
      application/src/main/data/json/system/widget_types/device_admin_table.json
  63. 4 0
      application/src/main/data/json/system/widget_types/device_claiming_widget.json
  64. 4 0
      application/src/main/data/json/system/widget_types/digital_horizontal_bar.json
  65. 4 0
      application/src/main/data/json/system/widget_types/digital_speedometer.json
  66. 4 0
      application/src/main/data/json/system/widget_types/digital_thermometer.json
  67. 4 0
      application/src/main/data/json/system/widget_types/digital_vertical_bar.json
  68. 4 0
      application/src/main/data/json/system/widget_types/documentation_links.json
  69. 4 0
      application/src/main/data/json/system/widget_types/doughnut.json
  70. 4 0
      application/src/main/data/json/system/widget_types/edge_quick_overview.json
  71. 4 0
      application/src/main/data/json/system/widget_types/entities_hierarchy.json
  72. 4 0
      application/src/main/data/json/system/widget_types/entities_table.json
  73. 4 0
      application/src/main/data/json/system/widget_types/entity_count.json
  74. 4 0
      application/src/main/data/json/system/widget_types/gateway_configuration.json
  75. 4 0
      application/src/main/data/json/system/widget_types/gateway_configuration__single_device_.json
  76. 4 0
      application/src/main/data/json/system/widget_types/gateway_connectors.json
  77. 4 0
      application/src/main/data/json/system/widget_types/gateway_custom_statistics.json
  78. 4 0
      application/src/main/data/json/system/widget_types/gateway_events.json
  79. 4 0
      application/src/main/data/json/system/widget_types/gateway_general_chart_statistics.json
  80. 4 0
      application/src/main/data/json/system/widget_types/gateway_general_configuration.json
  81. 4 0
      application/src/main/data/json/system/widget_types/gateway_logs.json
  82. 4 0
      application/src/main/data/json/system/widget_types/gauge.json
  83. 4 0
      application/src/main/data/json/system/widget_types/getting_started.json
  84. 4 0
      application/src/main/data/json/system/widget_types/google_map.json
  85. 4 0
      application/src/main/data/json/system/widget_types/here_map.json
  86. 4 0
      application/src/main/data/json/system/widget_types/horizontal_bar.json
  87. 4 0
      application/src/main/data/json/system/widget_types/horizontal_value_card.json
  88. 21 0
      application/src/main/data/json/system/widget_types/html_card.json
  89. 4 0
      application/src/main/data/json/system/widget_types/html_value_card.json
  90. 4 0
      application/src/main/data/json/system/widget_types/image_map.json
  91. 4 0
      application/src/main/data/json/system/widget_types/knob_control.json
  92. 4 0
      application/src/main/data/json/system/widget_types/label_widget.json
  93. 4 0
      application/src/main/data/json/system/widget_types/lcd_bar_gauge.json
  94. 4 0
      application/src/main/data/json/system/widget_types/lcd_gauge.json
  95. 4 0
      application/src/main/data/json/system/widget_types/led_indicator.json
  96. 4 0
      application/src/main/data/json/system/widget_types/markdown_html_card.json
  97. 4 0
      application/src/main/data/json/system/widget_types/markers_placement___google_maps.json
  98. 4 0
      application/src/main/data/json/system/widget_types/markers_placement___image_map.json
  99. 4 0
      application/src/main/data/json/system/widget_types/markers_placement___openstreetmap.json
  100. 4 0
      application/src/main/data/json/system/widget_types/mini_gauge.json

+ 60 - 0
.github/ISSUE_TEMPLATE/---bug-report.md

@@ -0,0 +1,60 @@
+---
+name: "\U0001F41E Bug report"
+about: Create a report to help us improve
+title: "[Bug] "
+labels: bug
+assignees: ashvayka, vvlladd28
+
+---
+
+**Describe the bug**
+A clear and concise description of what the bug is.
+
+**Your Server Environment**
+<!-- 🔅🔅🔅🔅🔅🔅🔅 Choose one of the following or write your own 🔅🔅🔅🔅🔅🔅🔅-->
+* demo.thingsboard.io
+* cloud.thingsboard.io
+* own setup
+  * cloud or local infrastructure or docker deployment
+  * ThingsBoard Version
+  * OS Name and Version
+
+**Your Client Environment**
+<!-- 🔅🔅🔅🔅🔅🔅🔅 Choose one of the following or write your own 🔅🔅🔅🔅🔅🔅🔅-->
+**Desktop (please complete the following information):**
+
+* OS: [e.g. iOS]
+* Browser [e.g. chrome, safari]
+* Version [e.g. 22]
+
+**Smartphone (please complete the following information):**
+* Device: [e.g. iPhone6]
+* OS: [e.g. iOS8.1]
+* Browser [e.g. stock browser, safari]
+* Version [e.g. 22]
+
+**Your Device**
+
+* Connectivity
+  * MQTT
+  * HTTP
+  * CoAP
+  * Gateway
+  * Integration: (Specify name) 
+* Device vendor and model
+
+**To Reproduce**
+Steps to reproduce the behavior:
+1. Go to '...'
+2. Click on '....'
+3. Scroll down to '....'
+4. See error
+
+**Expected behavior**
+A clear and concise description of what you expected to happen.
+
+**Screenshots**
+If applicable, add screenshots to help explain your problem.
+
+**Additional context**
+Add any other context about the problem here.

+ 20 - 0
.github/ISSUE_TEMPLATE/feature_request.md

@@ -0,0 +1,20 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+title: "[Feature Request]"
+labels: feature
+assignees: ikulikov
+
+---
+
+**Is your feature request related to a problem? Please describe.**
+A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
+
+**Describe the solution you'd like**
+A clear and concise description of what you want to happen.
+
+**Describe alternatives you've considered**
+A clear and concise description of any alternative solutions or features you've considered.
+
+**Additional context**
+Add any other context or screenshots about the feature request here.

+ 25 - 0
.github/ISSUE_TEMPLATE/question.md

@@ -0,0 +1,25 @@
+---
+name: Question
+about: Describe your questions in details
+title: "[Question] your title here"
+labels: question
+assignees: ashvayka
+
+---
+
+**Component**
+
+<!-- Choose one of the following and delete all others. -->
+ * UI
+ * Rule Engine
+ * Installation
+ * Generic
+
+**Description**
+A clear and concise details.
+
+**Environment**
+<!-- Add information about your environment and ThingsBoard version if applicable -->
+ * OS:  name and version
+ * ThingsBoard: version
+ * Browser: name and version

+ 88 - 0
.github/release.yml

@@ -0,0 +1,88 @@
+#
+# Copyright © 2016-2023 The Thingsboard Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+changelog:
+  exclude:
+    labels:
+      - Ignore for release
+  categories:
+    - title: 'Major Core & Rule Engine'
+      labels:
+        - 'Major Core'
+        - 'Major Rule Engine'
+      exclude:
+        labels:
+          - 'Bug'
+    - title: 'Major UI'
+      labels:
+        - 'Major UI'
+      exclude:
+        labels:
+          - 'Bug'
+    - title: 'Major Transport'
+      labels:
+        - 'Major Transport'
+      exclude:
+        labels:
+          - 'Bug'
+    - title: 'Major Edge'
+      labels:
+        - 'Major Edge'
+      exclude:
+        labels:
+          - 'Bug'
+    - title: 'Core & Rule Engine'
+      labels:
+        - 'Core'
+        - 'Rule Engine'
+      exclude:
+        labels:
+          - 'Bug'
+    - title: 'UI'
+      labels:
+        - 'UI'
+      exclude:
+        labels:
+          - 'Bug'
+    - title: 'Transport'
+      labels:
+        - 'Transport'
+      exclude:
+        labels:
+          - 'Bug'
+    - title: 'Edge'
+      labels:
+        - 'Edge'
+      exclude:
+        labels:
+          - 'Bug'
+    - title: 'Bug: Core & Rule Engine'
+      labels:
+        - 'Core'
+        - 'Rule Engine'
+        - 'Bug'
+    - title: 'Bug: UI'
+      labels:
+        - 'UI'
+        - 'Bug'
+    - title: 'Bug: Transport'
+      labels:
+        - 'Transport'
+        - 'Bug'
+    - title: 'Bug: Edge'
+      labels:
+        - 'Edge'
+        - 'Bug'

+ 40 - 0
.github/workflows/check-configuration-files.yml

@@ -0,0 +1,40 @@
+#
+# Copyright © 2016-2023 The Thingsboard Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name: Check configuration files
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    paths:
+      - 'application/src/main/resources/thingsboard.yml'
+jobs:
+  build:
+    name: Check thingsboard.yml file
+    runs-on: ubuntu-20.04
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@v2
+      - name: Set up Python 3.10
+        uses: actions/setup-python@v3
+        with:
+          python-version: "3.10.2"
+          architecture: "x64"
+        env:
+          AGENT_TOOLSDIRECTORY: /opt/hostedtoolcache
+      - name: Run Verification Script
+        run: python3 tools/src/main/python/check_yml_file.py

+ 39 - 0
.gitignore

@@ -0,0 +1,39 @@
+*.toDelete
+output/**
+*.class
+*~
+*.iml
+*/.idea/**
+.idea/**
+.idea
+*.log
+*.log.[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]
+*/.classpath
+.classpath
+*/.project
+.project
+.cache/**
+target/
+build/
+tmp_deb_control/
+tmp_rpm_control/
+tmp_sh/
+.gwt/
+.settings/
+/bin
+bin/
+**/dependency-reduced-pom.xml
+pom.xml.versionsBackup
+.DS_Store
+**/.gradle
+**/local.properties
+**/build
+**/target
+**/Californium.properties
+**/Californium3.properties
+**/.env
+.instance_id
+rebuild-docker.sh
+*/.run/**
+.run/**
+.run

+ 201 - 0
LICENSE

@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "{}"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright 2016 The Thingsboard Authors
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

File diff suppressed because it is too large
+ 2 - 0
README.md


+ 2 - 0
application/.gitignore

@@ -0,0 +1,2 @@
+!bin/
+/bin/

+ 450 - 0
application/pom.xml

@@ -0,0 +1,450 @@
+<!--
+
+    Copyright © 2016-2023 The Thingsboard Authors
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.thingsboard</groupId>
+        <version>3.6.1-SNAPSHOT</version>
+        <artifactId>thingsboard</artifactId>
+    </parent>
+    <artifactId>application</artifactId>
+    <packaging>jar</packaging>
+
+    <name>ThingsBoard Server Application</name>
+    <url>https://thingsboard.io</url>
+    <description>Open-source IoT Platform - Device management, data collection, processing and visualization
+    </description>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <main.dir>${basedir}/..</main.dir>
+        <pkg.type>java</pkg.type>
+        <pkg.disabled>false</pkg.disabled>
+        <pkg.process-resources.phase>process-resources</pkg.process-resources.phase>
+        <pkg.package.phase>package</pkg.package.phase>
+        <pkg.name>thingsboard</pkg.name>
+        <pkg.win.dist>${project.build.directory}/windows</pkg.win.dist>
+        <pkg.copyInstallScripts>true</pkg.copyInstallScripts>
+        <pkg.implementationTitle>ThingsBoard</pkg.implementationTitle>
+        <pkg.mainClass>org.thingsboard.server.ThingsboardServerApplication</pkg.mainClass>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.netty</groupId>
+            <artifactId>netty-transport-native-epoll</artifactId>
+            <version>${netty.version}</version>
+            <!-- Explicitly bring in the linux classifier, test may fail on 32-bit linux -->
+            <classifier>linux-x86_64</classifier>
+        </dependency>
+        <dependency>
+            <groupId>org.thingsboard.common</groupId>
+            <artifactId>actor</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.thingsboard.common</groupId>
+            <artifactId>util</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.thingsboard.rule-engine</groupId>
+            <artifactId>rule-engine-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.thingsboard.common</groupId>
+            <artifactId>cluster-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.thingsboard.common</groupId>
+            <artifactId>version-control</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.thingsboard.rule-engine</groupId>
+            <artifactId>rule-engine-components</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.thingsboard.common.transport</groupId>
+            <artifactId>transport-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.thingsboard.common.transport</groupId>
+            <artifactId>mqtt</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.thingsboard.common.transport</groupId>
+            <artifactId>http</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.thingsboard.common.transport</groupId>
+            <artifactId>coap</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.thingsboard.common.transport</groupId>
+            <artifactId>lwm2m</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.thingsboard.common.transport</groupId>
+            <artifactId>snmp</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.thingsboard</groupId>
+            <artifactId>dao</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.thingsboard.common</groupId>
+            <artifactId>queue</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.thingsboard.common.script</groupId>
+            <artifactId>script-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.thingsboard.common.script</groupId>
+            <artifactId>remote-js-client</artifactId>
+        </dependency>
+        <dependency>
+        <groupId>org.thingsboard.common</groupId>
+            <artifactId>stats</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.thingsboard.common</groupId>
+            <artifactId>edge-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.thingsboard</groupId>
+            <artifactId>dao</artifactId>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.takari.junit</groupId>
+            <artifactId>takari-cpsuite</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.paho</groupId>
+            <artifactId>org.eclipse.paho.client.mqttv3</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.paho</groupId>
+            <artifactId>org.eclipse.paho.mqttv5.client</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.thingsboard</groupId>
+            <artifactId>ui-ngx</artifactId>
+            <version>${project.version}</version>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.integration</groupId>
+            <artifactId>spring-integration-redis</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-security</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-websocket</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.security</groupId>
+            <artifactId>spring-security-oauth2-client</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.security</groupId>
+            <artifactId>spring-security-oauth2-jose</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.jsonwebtoken</groupId>
+            <artifactId>jjwt</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.freemarker</groupId>
+            <artifactId>freemarker</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-csv</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context-support</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>log4j-over-slf4j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.mail</groupId>
+            <artifactId>javax.mail</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.twilio.sdk</groupId>
+            <artifactId>twilio</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.amazonaws</groupId>
+            <artifactId>aws-java-sdk-sns</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-recipes</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.google.protobuf</groupId>
+            <artifactId>protobuf-java</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.netty</groupId>
+            <artifactId>netty-all</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.netty</groupId>
+            <artifactId>netty-tcnative-boringssl-static</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.grpc</groupId>
+            <artifactId>grpc-netty-shaded</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.grpc</groupId>
+            <artifactId>grpc-protobuf</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.grpc</groupId>
+            <artifactId>grpc-stub</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opensmpp</groupId>
+            <artifactId>opensmpp-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.thingsboard</groupId>
+            <artifactId>springfox-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.winsw</groupId>
+            <artifactId>winsw</artifactId>
+            <classifier>bin</classifier>
+            <type>exe</type>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.thingsboard</groupId>
+            <artifactId>tools</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.thingsboard</groupId>
+            <artifactId>rest-client</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.security</groupId>
+            <artifactId>spring-security-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.jayway.jsonpath</groupId>
+            <artifactId>json-path</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.jayway.jsonpath</groupId>
+            <artifactId>json-path-assert</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.junit.vintage</groupId>
+            <artifactId>junit-vintage-engine</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.awaitility</groupId>
+            <artifactId>awaitility</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.dbunit</groupId>
+            <artifactId>dbunit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.github.springtestdbunit</groupId>
+            <artifactId>spring-test-dbunit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.testcontainers</groupId>
+            <artifactId>cassandra</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.testcontainers</groupId>
+            <artifactId>postgresql</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.testcontainers</groupId>
+            <artifactId>jdbc</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.javadelight</groupId>
+            <artifactId>delight-nashorn-sandbox</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.passay</groupId>
+            <artifactId>passay</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.github.ua-parser</groupId>
+            <artifactId>uap-java</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.java-websocket</groupId>
+            <artifactId>Java-WebSocket</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.aerogear</groupId>
+            <artifactId>aerogear-otp-java</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.slack.api</groupId>
+            <artifactId>slack-api-client</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.google.oauth-client</groupId>
+            <artifactId>google-oauth-client</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>${pkg.name}-${project.version}</finalName>
+        <resources>
+            <resource>
+                <directory>${project.basedir}/src/main/resources</directory>
+                <filtering>true</filtering>
+                <includes>
+                    <include>thingsboard.yml</include>
+                </includes>
+            </resource>
+            <resource>
+                <directory>${project.basedir}/src/main/resources</directory>
+                <filtering>false</filtering>
+                <excludes>
+                    <exclude>thingsboard.yml</exclude>
+                </excludes>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <systemPropertyVariables>
+                        <spring.config.name>thingsboard</spring.config.name>
+                    </systemPropertyVariables>
+                    <excludes>
+                        <exclude>**/nosql/*Test.java</exclude>
+                    </excludes>
+                    <includes>
+                        <include>**/*Test.java</include>
+                        <include>**/*TestSuite.java</include>
+                    </includes>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.thingsboard</groupId>
+                <artifactId>gradle-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-assembly-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-install-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.xolstice.maven.plugins</groupId>
+                <artifactId>protobuf-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+    <repositories>
+        <repository>
+            <id>jenkins</id>
+            <name>Jenkins Repository</name>
+            <url>https://repo.jenkins-ci.org/releases</url>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </repository>
+    </repositories>
+</project>

+ 46 - 0
application/src/main/conf/logback.xml

@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+    Copyright © 2016-2023 The Thingsboard Authors
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<!DOCTYPE configuration>
+<configuration scan="true" scanPeriod="10 seconds">
+
+    <appender name="fileLogAppender"
+              class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${pkg.logFolder}/${pkg.name}.log</file>
+        <rollingPolicy
+                class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+            <fileNamePattern>${pkg.logFolder}/${pkg.name}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <maxFileSize>100MB</maxFileSize>
+            <maxHistory>30</maxHistory>
+            <totalSizeCap>3GB</totalSizeCap>
+        </rollingPolicy>
+        <encoder>
+            <pattern>%d{ISO8601} [%thread] %-5level %logger{36} - %msg%n</pattern>
+        </encoder>
+    </appender>
+
+    <logger name="org.thingsboard.server" level="INFO" />
+    <logger name="com.microsoft.azure.servicebus.primitives.CoreMessageReceiver" level="OFF" />
+    <logger name="org.apache.kafka.common.utils.AppInfoParser" level="WARN"/>
+    <logger name="org.apache.kafka.clients" level="WARN"/>
+
+    <root level="INFO">
+        <appender-ref ref="fileLogAppender"/>
+    </root>
+
+</configuration>

+ 24 - 0
application/src/main/conf/thingsboard.conf

@@ -0,0 +1,24 @@
+#
+# Copyright © 2016-2023 The Thingsboard Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+export JAVA_OPTS="$JAVA_OPTS -Dplatform=@pkg.platform@ -Dinstall.data_dir=@pkg.installFolder@/data"
+export JAVA_OPTS="$JAVA_OPTS -Xlog:gc*,heap*,age*,safepoint=debug:file=@pkg.logFolder@/gc.log:time,uptime,level,tags:filecount=10,filesize=10M"
+export JAVA_OPTS="$JAVA_OPTS -XX:+IgnoreUnrecognizedVMOptions -XX:+HeapDumpOnOutOfMemoryError"
+export JAVA_OPTS="$JAVA_OPTS -XX:-UseBiasedLocking -XX:+UseTLAB -XX:+ResizeTLAB -XX:+PerfDisableSharedMem -XX:+UseCondCardMark"
+export JAVA_OPTS="$JAVA_OPTS -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:MaxTenuringThreshold=10"
+export LOG_FILENAME=${pkg.name}.out
+export LOADER_PATH=${pkg.installFolder}/conf,${pkg.installFolder}/extensions
+export SQL_DATA_FOLDER=${pkg.installFolder}/data/sql

+ 22 - 0
application/src/main/data/certs/azure/DigiCertGlobalRootG2.crt.pem

@@ -0,0 +1,22 @@
+-----BEGIN CERTIFICATE-----
+MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBh
+MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
+d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBH
+MjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAwMDBaMGExCzAJBgNVBAYTAlVT
+MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j
+b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkqhkiG
+9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlUyfuI
+2/Ou8jqJkTx65qsGGmvPrC3oXgkkRLpimn7Wo6h+4FR1IAWsULecYxpsMNzaHxmx
+1x7e/dfgy5SDN67sH0NO3Xss0r0upS/kqbitOtSZpLYl6ZtrAGCSYP9PIUkY92eQ
+q2EGnI/yuum06ZIya7XzV+hdG82MHauVBJVJ8zUtluNJbd134/tJS7SsVQepj5Wz
+tCO7TG1F8PapspUwtP1MVYwnSlcUfIKdzXOS0xZKBgyMUNGPHgm+F6HmIcr9g+UQ
+vIOlCsRnKPZzFBQ9RnbDhxSJITRNrw9FDKZJobq7nMWxM4MphQIDAQABo0IwQDAP
+BgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUTiJUIBiV
+5uNu5g/6+rkS7QYXjzkwDQYJKoZIhvcNAQELBQADggEBAGBnKJRvDkhj6zHd6mcY
+1Yl9PMWLSn/pvtsrF9+wX3N3KjITOYFnQoQj8kVnNeyIv/iPsGEMNKSuIEyExtv4
+NeF22d+mQrvHRAiGfzZ0JFrabA0UWTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NG
+Fdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBHQRFXGU7Aj64GxJUTFy8bJZ91
+8rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/iyK5S9kJRaTe
+pLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl
+MrY=
+-----END CERTIFICATE-----

File diff suppressed because it is too large
+ 207 - 0
application/src/main/data/json/demo/dashboards/firmware.json


File diff suppressed because it is too large
+ 252 - 0
application/src/main/data/json/demo/dashboards/gateway.json


File diff suppressed because it is too large
+ 146 - 0
application/src/main/data/json/demo/dashboards/gateways.json


+ 516 - 0
application/src/main/data/json/demo/dashboards/rule_engine_statistics.json

@@ -0,0 +1,516 @@
+{
+  "title": "Rule Engine Statistics",
+  "image": null,
+  "mobileHide": false,
+  "mobileOrder": null,
+  "configuration": {
+    "widgets": {
+      "81987f19-3eac-e4ce-b790-d96e9b54d9a0": {
+        "type": "timeseries",
+        "sizeX": 12,
+        "sizeY": 7,
+        "config": {
+          "datasources": [
+            {
+              "type": "entity",
+              "dataKeys": [
+                {
+                  "name": "successfulMsgs",
+                  "type": "timeseries",
+                  "label": "${entityName} Successful",
+                  "color": "#4caf50",
+                  "settings": {
+                    "excludeFromStacking": false,
+                    "hideDataByDefault": false,
+                    "disableDataHiding": false,
+                    "removeFromLegend": false,
+                    "showLines": true,
+                    "fillLines": false,
+                    "showPoints": false,
+                    "showPointShape": "circle",
+                    "pointShapeFormatter": "var size = radius * Math.sqrt(Math.PI) / 2;\nctx.moveTo(x - size, y - size);\nctx.lineTo(x + size, y + size);\nctx.moveTo(x - size, y + size);\nctx.lineTo(x + size, y - size);",
+                    "showPointsLineWidth": 5,
+                    "showPointsRadius": 3,
+                    "showSeparateAxis": false,
+                    "axisPosition": "left",
+                    "thresholds": [
+                      {
+                        "thresholdValueSource": "predefinedValue"
+                      }
+                    ],
+                    "comparisonSettings": {
+                      "showValuesForComparison": true
+                    }
+                  },
+                  "_hash": 0.15490750967648736
+                },
+                {
+                  "name": "failedMsgs",
+                  "type": "timeseries",
+                  "label": "${entityName} Permanent Failures",
+                  "color": "#ef5350",
+                  "settings": {
+                    "excludeFromStacking": false,
+                    "hideDataByDefault": false,
+                    "disableDataHiding": false,
+                    "removeFromLegend": false,
+                    "showLines": true,
+                    "fillLines": false,
+                    "showPoints": false,
+                    "showPointShape": "circle",
+                    "pointShapeFormatter": "var size = radius * Math.sqrt(Math.PI) / 2;\nctx.moveTo(x - size, y - size);\nctx.lineTo(x + size, y + size);\nctx.moveTo(x - size, y + size);\nctx.lineTo(x + size, y - size);",
+                    "showPointsLineWidth": 5,
+                    "showPointsRadius": 3,
+                    "showSeparateAxis": false,
+                    "axisPosition": "left",
+                    "thresholds": [
+                      {
+                        "thresholdValueSource": "predefinedValue"
+                      }
+                    ],
+                    "comparisonSettings": {
+                      "showValuesForComparison": true
+                    }
+                  },
+                  "_hash": 0.4186621166514697
+                },
+                {
+                  "name": "tmpFailed",
+                  "type": "timeseries",
+                  "label": "${entityName} Processing Failures",
+                  "color": "#ffc107",
+                  "settings": {
+                    "excludeFromStacking": false,
+                    "hideDataByDefault": false,
+                    "disableDataHiding": false,
+                    "removeFromLegend": false,
+                    "showLines": true,
+                    "fillLines": false,
+                    "showPoints": false,
+                    "showPointShape": "circle",
+                    "pointShapeFormatter": "var size = radius * Math.sqrt(Math.PI) / 2;\nctx.moveTo(x - size, y - size);\nctx.lineTo(x + size, y + size);\nctx.moveTo(x - size, y + size);\nctx.lineTo(x + size, y - size);",
+                    "showPointsLineWidth": 5,
+                    "showPointsRadius": 3,
+                    "showSeparateAxis": false,
+                    "axisPosition": "left",
+                    "thresholds": [
+                      {
+                        "thresholdValueSource": "predefinedValue"
+                      }
+                    ],
+                    "comparisonSettings": {
+                      "showValuesForComparison": true
+                    }
+                  },
+                  "_hash": 0.49891007198715376
+                }
+              ],
+              "entityAliasId": "140f23dd-e3a0-ed98-6189-03c49d2d8018"
+            }
+          ],
+          "timewindow": {
+            "realtime": {
+              "interval": 1000,
+              "timewindowMs": 300000
+            },
+            "aggregation": {
+              "type": "NONE",
+              "limit": 8640
+            },
+            "hideInterval": false,
+            "hideAggregation": false,
+            "hideAggInterval": false
+          },
+          "showTitle": true,
+          "backgroundColor": "#fff",
+          "color": "rgba(0, 0, 0, 0.87)",
+          "padding": "8px",
+          "settings": {
+            "shadowSize": 4,
+            "fontColor": "#545454",
+            "fontSize": 10,
+            "xaxis": {
+              "showLabels": true,
+              "color": "#545454"
+            },
+            "yaxis": {
+              "showLabels": true,
+              "color": "#545454"
+            },
+            "grid": {
+              "color": "#545454",
+              "tickColor": "#DDDDDD",
+              "verticalLines": true,
+              "horizontalLines": true,
+              "outlineWidth": 1
+            },
+            "stack": false,
+            "tooltipIndividual": false,
+            "timeForComparison": "months",
+            "xaxisSecond": {
+              "axisPosition": "top",
+              "showLabels": true
+            },
+            "showLegend": true,
+            "legendConfig": {
+              "direction": "column",
+              "position": "bottom",
+              "showMin": true,
+              "showMax": true,
+              "showAvg": false,
+              "showTotal": true
+            }
+          },
+          "title": "Queue Stats",
+          "dropShadow": true,
+          "enableFullscreen": true,
+          "titleStyle": {
+            "fontSize": "16px",
+            "fontWeight": 400
+          },
+          "mobileHeight": null,
+          "showTitleIcon": false,
+          "titleIcon": null,
+          "iconColor": "rgba(0, 0, 0, 0.87)",
+          "iconSize": "24px",
+          "titleTooltip": "",
+          "widgetStyle": {},
+          "useDashboardTimewindow": false,
+          "displayTimewindow": true,
+          "actions": {}
+        },
+        "id": "81987f19-3eac-e4ce-b790-d96e9b54d9a0",
+        "typeFullFqn": "system.charts.basic_timeseries"
+      },
+      "5eb79712-5c24-3060-7e4f-6af36b8f842d": {
+        "type": "timeseries",
+        "sizeX": 24,
+        "sizeY": 5,
+        "config": {
+          "datasources": [
+            {
+              "type": "entity",
+              "dataKeys": [
+                {
+                  "name": "ruleEngineException",
+                  "type": "timeseries",
+                  "label": "Rule Chain",
+                  "color": "#2196f3",
+                  "settings": {
+                    "useCellStyleFunction": false,
+                    "useCellContentFunction": true,
+                    "cellContentFunction": "return JSON.parse(value).ruleChainName;"
+                  },
+                  "_hash": 0.9954481282345906
+                },
+                {
+                  "name": "ruleEngineException",
+                  "type": "timeseries",
+                  "label": "Rule Node",
+                  "color": "#4caf50",
+                  "settings": {
+                    "useCellStyleFunction": false,
+                    "useCellContentFunction": true,
+                    "cellContentFunction": "return JSON.parse(value).ruleNodeName;"
+                  },
+                  "_hash": 0.18580357036589978
+                },
+                {
+                  "name": "ruleEngineException",
+                  "type": "timeseries",
+                  "label": "Latest Error",
+                  "color": "#f44336",
+                  "settings": {
+                    "useCellStyleFunction": false,
+                    "useCellContentFunction": true,
+                    "cellContentFunction": "return JSON.parse(value).message;"
+                  },
+                  "_hash": 0.7255162989552142
+                }
+              ],
+              "entityAliasId": "140f23dd-e3a0-ed98-6189-03c49d2d8018"
+            }
+          ],
+          "timewindow": {
+            "realtime": {
+              "interval": 1000,
+              "timewindowMs": 86400000
+            },
+            "aggregation": {
+              "type": "NONE",
+              "limit": 200
+            }
+          },
+          "showTitle": true,
+          "backgroundColor": "rgb(255, 255, 255)",
+          "color": "rgba(0, 0, 0, 0.87)",
+          "padding": "8px",
+          "settings": {
+            "showTimestamp": true,
+            "displayPagination": true,
+            "defaultPageSize": 10
+          },
+          "title": "Exceptions",
+          "dropShadow": true,
+          "enableFullscreen": true,
+          "titleStyle": {
+            "fontSize": "16px",
+            "fontWeight": 400
+          },
+          "useDashboardTimewindow": false,
+          "showLegend": false,
+          "widgetStyle": {},
+          "actions": {},
+          "showTitleIcon": false,
+          "titleIcon": null,
+          "iconColor": "rgba(0, 0, 0, 0.87)",
+          "iconSize": "24px",
+          "titleTooltip": "",
+          "displayTimewindow": true
+        },
+        "id": "5eb79712-5c24-3060-7e4f-6af36b8f842d",
+        "typeFullFqn": "system.cards.timeseries_table"
+      },
+      "ad3f1417-87a8-750e-fc67-49a2de1466d4": {
+        "type": "timeseries",
+        "sizeX": 12,
+        "sizeY": 7,
+        "config": {
+          "datasources": [
+            {
+              "type": "entity",
+              "dataKeys": [
+                {
+                  "name": "timeoutMsgs",
+                  "type": "timeseries",
+                  "label": "${entityName} Permanent Timeouts",
+                  "color": "#4caf50",
+                  "settings": {
+                    "excludeFromStacking": false,
+                    "hideDataByDefault": false,
+                    "disableDataHiding": false,
+                    "removeFromLegend": false,
+                    "showLines": true,
+                    "fillLines": false,
+                    "showPoints": false,
+                    "showPointShape": "circle",
+                    "pointShapeFormatter": "var size = radius * Math.sqrt(Math.PI) / 2;\nctx.moveTo(x - size, y - size);\nctx.lineTo(x + size, y + size);\nctx.moveTo(x - size, y + size);\nctx.lineTo(x + size, y - size);",
+                    "showPointsLineWidth": 5,
+                    "showPointsRadius": 3,
+                    "showSeparateAxis": false,
+                    "axisPosition": "left",
+                    "thresholds": [
+                      {
+                        "thresholdValueSource": "predefinedValue"
+                      }
+                    ],
+                    "comparisonSettings": {
+                      "showValuesForComparison": true
+                    }
+                  },
+                  "_hash": 0.565222981550328
+                },
+                {
+                  "name": "tmpTimeout",
+                  "type": "timeseries",
+                  "label": "${entityName} Processing Timeouts",
+                  "color": "#9c27b0",
+                  "settings": {
+                    "excludeFromStacking": false,
+                    "hideDataByDefault": false,
+                    "disableDataHiding": false,
+                    "removeFromLegend": false,
+                    "showLines": true,
+                    "fillLines": false,
+                    "showPoints": false,
+                    "showPointShape": "circle",
+                    "pointShapeFormatter": "var size = radius * Math.sqrt(Math.PI) / 2;\nctx.moveTo(x - size, y - size);\nctx.lineTo(x + size, y + size);\nctx.moveTo(x - size, y + size);\nctx.lineTo(x + size, y - size);",
+                    "showPointsLineWidth": 5,
+                    "showPointsRadius": 3,
+                    "showSeparateAxis": false,
+                    "axisPosition": "left",
+                    "thresholds": [
+                      {
+                        "thresholdValueSource": "predefinedValue"
+                      }
+                    ],
+                    "comparisonSettings": {
+                      "showValuesForComparison": true
+                    }
+                  },
+                  "_hash": 0.2679547062508352
+                }
+              ],
+              "entityAliasId": "140f23dd-e3a0-ed98-6189-03c49d2d8018"
+            }
+          ],
+          "timewindow": {
+            "realtime": {
+              "interval": 1000,
+              "timewindowMs": 300000
+            },
+            "aggregation": {
+              "type": "NONE",
+              "limit": 8640
+            },
+            "hideInterval": false,
+            "hideAggregation": false,
+            "hideAggInterval": false
+          },
+          "showTitle": true,
+          "backgroundColor": "#fff",
+          "color": "rgba(0, 0, 0, 0.87)",
+          "padding": "8px",
+          "settings": {
+            "shadowSize": 4,
+            "fontColor": "#545454",
+            "fontSize": 10,
+            "xaxis": {
+              "showLabels": true,
+              "color": "#545454"
+            },
+            "yaxis": {
+              "showLabels": true,
+              "color": "#545454"
+            },
+            "grid": {
+              "color": "#545454",
+              "tickColor": "#DDDDDD",
+              "verticalLines": true,
+              "horizontalLines": true,
+              "outlineWidth": 1
+            },
+            "stack": false,
+            "tooltipIndividual": false,
+            "timeForComparison": "months",
+            "xaxisSecond": {
+              "axisPosition": "top",
+              "showLabels": true
+            },
+            "showLegend": true,
+            "legendConfig": {
+              "direction": "column",
+              "position": "bottom",
+              "showMin": true,
+              "showMax": true,
+              "showAvg": false,
+              "showTotal": true
+            }
+          },
+          "title": "Processing Failures and Timeouts",
+          "dropShadow": true,
+          "enableFullscreen": true,
+          "titleStyle": {
+            "fontSize": "16px",
+            "fontWeight": 400
+          },
+          "mobileHeight": null,
+          "showTitleIcon": false,
+          "titleIcon": null,
+          "iconColor": "rgba(0, 0, 0, 0.87)",
+          "iconSize": "24px",
+          "titleTooltip": "",
+          "widgetStyle": {},
+          "useDashboardTimewindow": false,
+          "displayTimewindow": true,
+          "actions": {}
+        },
+        "id": "ad3f1417-87a8-750e-fc67-49a2de1466d4",
+        "typeFullFqn": "system.charts.basic_timeseries"
+      }
+    },
+    "states": {
+      "default": {
+        "name": "Rule Engine Statistics",
+        "root": true,
+        "layouts": {
+          "main": {
+            "widgets": {
+              "81987f19-3eac-e4ce-b790-d96e9b54d9a0": {
+                "sizeX": 12,
+                "sizeY": 7,
+                "mobileHeight": null,
+                "row": 0,
+                "col": 0
+              },
+              "5eb79712-5c24-3060-7e4f-6af36b8f842d": {
+                "sizeX": 24,
+                "sizeY": 5,
+                "row": 7,
+                "col": 0
+              },
+              "ad3f1417-87a8-750e-fc67-49a2de1466d4": {
+                "sizeX": 12,
+                "sizeY": 7,
+                "mobileHeight": null,
+                "row": 0,
+                "col": 12
+              }
+            },
+            "gridSettings": {
+              "backgroundColor": "#eeeeee",
+              "color": "rgba(0,0,0,0.870588)",
+              "columns": 24,
+              "backgroundSizeMode": "100%",
+              "autoFillHeight": true,
+              "mobileAutoFillHeight": false,
+              "mobileRowHeight": 70,
+              "margin": 10,
+              "outerMargin": true
+            }
+          }
+        }
+      }
+    },
+    "entityAliases": {
+      "140f23dd-e3a0-ed98-6189-03c49d2d8018": {
+        "id": "140f23dd-e3a0-ed98-6189-03c49d2d8018",
+        "alias": "TbServiceQueues",
+        "filter": {
+          "type": "assetType",
+          "resolveMultiple": true,
+          "assetNameFilter": "",
+          "assetTypes": [
+            "TbServiceQueue"
+          ]
+        }
+      }
+    },
+    "timewindow": {
+      "displayValue": "",
+      "selectedTab": 0,
+      "hideInterval": false,
+      "hideAggregation": false,
+      "hideAggInterval": false,
+      "realtime": {
+        "interval": 1000,
+        "timewindowMs": 60000
+      },
+      "history": {
+        "historyType": 0,
+        "interval": 1000,
+        "timewindowMs": 60000,
+        "fixedTimewindow": {
+          "startTimeMs": 1586176634823,
+          "endTimeMs": 1586263034823
+        }
+      },
+      "aggregation": {
+        "type": "AVG",
+        "limit": 25000
+      }
+    },
+    "settings": {
+      "stateControllerId": "entity",
+      "showTitle": false,
+      "showDashboardsSelect": true,
+      "showEntitiesSelect": true,
+      "showDashboardTimewindow": true,
+      "showDashboardExport": true,
+      "toolbarAlwaysOpen": true
+    },
+    "filters": {}
+  },
+  "externalId": null,
+  "name": "Rule Engine Statistics"
+}

File diff suppressed because it is too large
+ 207 - 0
application/src/main/data/json/demo/dashboards/software.json


File diff suppressed because it is too large
+ 162 - 0
application/src/main/data/json/demo/dashboards/thermostats.json


+ 231 - 0
application/src/main/data/json/edge/install_instructions/centos/instructions.md

@@ -0,0 +1,231 @@
+Here is the list of commands, that can be used to quickly install ThingsBoard Edge on RHEL/CentOS 7/8 and connect to the cloud.
+
+#### Prerequisites
+Before continue to installation execute the following commands in order to install necessary tools:
+
+```bash
+sudo yum install -y nano wget
+sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
+```
+
+#### Install Java 11 (OpenJDK)
+ThingsBoard service is running on Java 11. Follow these instructions to install OpenJDK 11:
+
+```bash
+sudo yum install java-11-openjdk
+{:copy-code}
+```
+
+Please don't forget to configure your operating system to use OpenJDK 11 by default.
+You can configure which version is the default using the following command:
+
+```bash
+sudo update-alternatives --config java
+{:copy-code}
+```
+
+You can check the installation using the following command:
+
+```bash
+java -version
+{:copy-code}
+```
+
+Expected command output is:
+
+```text
+openjdk version "11.0.xx"
+OpenJDK Runtime Environment (...)
+OpenJDK 64-Bit Server VM (build ...)
+```
+
+#### Configure PostgreSQL
+ThingsBoard Edge uses PostgreSQL database as a local storage.
+Instructions listed below will help you to install PostgreSQL.
+
+```bash
+# Update your system
+sudo yum update
+{:copy-code}
+```
+
+**For CentOS 7:**
+
+```bash
+# Install the repository RPM (for CentOS 7):
+sudo yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
+# Install packages
+sudo yum -y install epel-release yum-utils
+sudo yum-config-manager --enable pgdg12
+sudo yum install postgresql12-server postgresql12
+# Initialize your PostgreSQL DB
+sudo /usr/pgsql-12/bin/postgresql-12-setup initdb
+sudo systemctl start postgresql-12
+# Optional: Configure PostgreSQL to start on boot
+sudo systemctl enable --now postgresql-12
+
+{:copy-code}
+```
+
+**For CentOS 8:**
+
+```bash
+# Install the repository RPM (for CentOS 8):
+sudo yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
+# Install packages
+sudo dnf -qy module disable postgresql
+sudo dnf -y install postgresql12 postgresql12-server
+# Initialize your PostgreSQL DB
+sudo /usr/pgsql-12/bin/postgresql-12-setup initdb
+sudo systemctl start postgresql-12
+# Optional: Configure PostgreSQL to start on boot
+sudo systemctl enable --now postgresql-12
+
+{:copy-code}
+```
+
+Once PostgreSQL is installed you may want to create a new user or set the password for the main user.
+The instructions below will help to set the password for main PostgreSQL user:
+
+```text
+sudo su - postgres
+psql
+\password
+\q
+```
+
+Then, press "Ctrl+D" to return to main user console.
+
+After configuring the password, edit the pg_hba.conf to use MD5 authentication with the postgres user.
+
+Edit pg_hba.conf file:
+
+```bash
+sudo nano /var/lib/pgsql/12/data/pg_hba.conf
+{:copy-code}
+```
+
+Locate the following lines:
+
+```text
+# IPv4 local connections:
+host    all             all             127.0.0.1/32            ident
+```
+
+Replace `ident` with `md5`:
+
+```text
+host    all             all             127.0.0.1/32            md5
+```
+
+Finally, you should restart the PostgreSQL service to initialize the new configuration:
+
+```bash
+sudo systemctl restart postgresql-12.service
+{:copy-code}
+```
+
+Connect to the database to create ThingsBoard Edge DB:
+
+```bash
+psql -U postgres -d postgres -h 127.0.0.1 -W
+{:copy-code}
+```
+
+Execute create database statement:
+
+```bash
+CREATE DATABASE tb_edge;
+\q
+{:copy-code}
+```
+
+#### ThingsBoard Edge service installation
+Download installation package:
+
+```bash
+wget https://github.com/thingsboard/thingsboard-edge/releases/download/v${TB_EDGE_VERSION}/tb-edge-${TB_EDGE_VERSION}.rpm
+{:copy-code}
+```
+
+Go to the download repository and install ThingsBoard Edge service:
+
+```bash
+sudo rpm -Uvh tb-edge-${TB_EDGE_VERSION}.rpm
+{:copy-code}
+```
+
+#### Configure ThingsBoard Edge
+To configure ThingsBoard Edge, you  can use the following command to automatically update the configuration file with specific values:
+
+```bash
+sudo sh -c 'cat <<EOL >> /etc/tb-edge/conf/tb-edge.conf
+export CLOUD_ROUTING_KEY=${CLOUD_ROUTING_KEY}
+export CLOUD_ROUTING_SECRET=${CLOUD_ROUTING_SECRET}
+export CLOUD_RPC_HOST=${BASE_URL}
+export CLOUD_RPC_PORT=${CLOUD_RPC_PORT}
+export CLOUD_RPC_SSL_ENABLED=${CLOUD_RPC_SSL_ENABLED}
+EOL'
+{:copy-code}
+```
+
+##### [Optional] Database Configuration
+In case you changed default PostgreSQL datasource settings (**postgres**/**postgres**) please update the configuration file (**/etc/tb-edge/conf/tb-edge.conf**) with your actual values:
+
+```bash
+sudo nano /etc/tb-edge/conf/tb-edge.conf
+{:copy-code}
+```
+
+Please update the following lines in your configuration file. Make sure **to replace**:
+- Replace 'postgres' with your actual PostgreSQL username;
+- Replace 'PUT_YOUR_POSTGRESQL_PASSWORD_HERE' with your actual PostgreSQL password.
+
+```bash
+export SPRING_DATASOURCE_URL=jdbc:postgresql://localhost:5432/tb_edge
+export SPRING_DATASOURCE_USERNAME=postgres
+export SPRING_DATASOURCE_PASSWORD=PUT_YOUR_POSTGRESQL_PASSWORD_HERE
+{:copy-code}
+```
+
+##### [Optional] Update bind ports
+If ThingsBoard Edge is going to be running on the same machine where ThingsBoard server (cloud) is running, you'll need to update configuration parameters to avoid port collision between ThingsBoard server and ThingsBoard Edge.
+
+Please execute the following command to update ThingsBoard Edge configuration file (**/etc/tb-edge/conf/tb-edge.conf**):
+
+```bash
+sudo sh -c 'cat <<EOL >> /etc/tb-edge/conf/tb-edge.conf
+export HTTP_BIND_PORT=18080
+export MQTT_BIND_PORT=11883
+export COAP_BIND_PORT=15683
+export LWM2M_ENABLED=false
+export SNMP_ENABLED=false
+EOL'
+{:copy-code}
+```
+
+Make sure that ports above (18080, 11883, 15683) are not used by any other application.
+
+#### Run installation script
+Once ThingsBoard Edge is installed and configured please execute the following install script:
+
+```bash
+sudo /usr/share/tb-edge/bin/install/install.sh
+{:copy-code}
+```
+
+#### Restart ThingsBoard Edge service
+
+```bash
+sudo service tb-edge restart
+{:copy-code}
+```
+
+#### Open ThingsBoard Edge UI
+
+Once started, you will be able to open **ThingsBoard Edge UI** using the following link http://localhost:8080.
+
+###### NOTE: Edge HTTP bind port update
+
+Use next **ThingsBoard Edge UI** link **http://localhost:18080** if you updated HTTP 8080 bind port to **18080**.
+

+ 105 - 0
application/src/main/data/json/edge/install_instructions/docker/instructions.md

@@ -0,0 +1,105 @@
+Here is the list of commands, that can be used to quickly install ThingsBoard Edge using docker compose and connect to the cloud.
+
+#### Prerequisites
+
+Install <a href="https://docs.docker.com/engine/install/" target="_blank"> Docker CE</a> and <a href="https://docs.docker.com/compose/install/" target="_blank"> Docker Compose</a>.
+
+#### Create data and logs folders
+
+Run following commands, before starting docker container(s), to create folders for storing data and logs.
+These commands additionally will change owner of newly created folders to docker container user.
+To do this (to change user) **chown** command is used, and this command requires *sudo* permissions (command will request password for a *sudo* access):
+
+```bash
+mkdir -p ~/.mytb-edge-data && sudo chown -R 799:799 ~/.mytb-edge-data
+mkdir -p ~/.mytb-edge-logs && sudo chown -R 799:799 ~/.mytb-edge-logs
+{:copy-code}
+```
+
+#### Running ThingsBoard Edge as docker service
+
+${LOCALHOST_WARNING}
+
+Create docker compose file for ThingsBoard Edge service:
+
+```bash
+nano docker-compose.yml
+{:copy-code}
+```
+
+Add the following lines to the yml file:
+
+```bash
+version: '3.0'
+services:
+  mytbedge:
+    restart: always
+    image: "thingsboard/tb-edge:${TB_EDGE_VERSION}"
+    ports:
+      - "8080:8080"
+      - "1883:1883"
+      - "5683-5688:5683-5688/udp"
+    environment:
+      SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/tb-edge
+      CLOUD_ROUTING_KEY: ${CLOUD_ROUTING_KEY}
+      CLOUD_ROUTING_SECRET: ${CLOUD_ROUTING_SECRET}
+      CLOUD_RPC_HOST: ${BASE_URL}
+      CLOUD_RPC_PORT: ${CLOUD_RPC_PORT}
+      CLOUD_RPC_SSL_ENABLED: ${CLOUD_RPC_SSL_ENABLED}
+    volumes:
+      - ~/.mytb-edge-data:/data
+      - ~/.mytb-edge-logs:/var/log/tb-edge
+  postgres:
+    restart: always
+    image: "postgres:12"
+    ports:
+      - "5432"
+    environment:
+      POSTGRES_DB: tb-edge
+      POSTGRES_PASSWORD: postgres
+    volumes:
+      - ~/.mytb-edge-data/db:/var/lib/postgresql/data
+{:copy-code}
+```
+
+##### [Optional] Update bind ports 
+If ThingsBoard Edge is going to be running on the same machine where ThingsBoard server (cloud) is running, you'll need to update docker compose port mapping to avoid port collision between ThingsBoard server and ThingsBoard Edge.
+
+Please update next lines of `docker-compose.yml` file:
+
+```text
+ports:
+  - "18080:8080"
+  - "11883:1883"
+  - "15683-15688:5683-5688/udp"
+```
+Make sure that ports above (18080, 11883, 15683-15688) are not used by any other application.
+
+#### Start ThingsBoard Edge
+Set the terminal in the directory which contains the `docker-compose.yml` file and execute the following commands to up this docker compose directly:
+
+```bash
+docker compose up -d
+docker compose logs -f mytbedge
+{:copy-code}
+```
+
+###### NOTE: Docker Compose V2 vs docker-compose (with a hyphen)
+
+ThingsBoard supports Docker Compose V2 (Docker Desktop or Compose plugin) starting from **3.4.2** release, because **docker-compose** as standalone setup is no longer supported by Docker.
+We **strongly** recommend to update to Docker Compose V2 and use it.
+If you still rely on using Docker Compose as docker-compose (with a hyphen), then please execute the following commands to start ThingsBoard Edge:
+
+```bash
+docker-compose up -d
+docker-compose logs -f mytbedge
+```
+
+#### Open ThingsBoard Edge UI
+
+Once started, you will be able to open **ThingsBoard Edge UI** using the following link http://localhost:8080.
+
+###### NOTE: Edge HTTP bind port update 
+
+Use next **ThingsBoard Edge UI** link **http://localhost:18080** if you updated HTTP 8080 bind port to **18080**.
+

+ 3 - 0
application/src/main/data/json/edge/install_instructions/docker/localhost_warning.md

@@ -0,0 +1,3 @@
+###### WARNING NOTE: 'localhost' can not be used as CLOUD_RPC_HOST
+
+Please note that your ThingsBoard base URL is **'localhost'** at the moment. **'localhost'** cannot be used for docker containers - please update **CLOUD_RPC_HOST** environment variable below to the IP address of your machine (*docker **host** machine*). IP address must be `192.168.1.XX` or similar format. In other case - ThingsBoard Edge service, that is running in docker container, will not be able to connect to the cloud.

+ 164 - 0
application/src/main/data/json/edge/install_instructions/ubuntu/instructions.md

@@ -0,0 +1,164 @@
+Here is the list of commands, that can be used to quickly install ThingsBoard Edge on Ubuntu Server and connect to the cloud.
+
+#### Install Java 11 (OpenJDK)
+ThingsBoard service is running on Java 11. Follow these instructions to install OpenJDK 11:
+
+```bash
+sudo apt update
+sudo apt install openjdk-11-jdk
+{:copy-code}
+```
+
+Please don't forget to configure your operating system to use OpenJDK 11 by default.
+You can configure which version is the default using the following command:
+
+```bash
+sudo update-alternatives --config java
+{:copy-code}
+```
+
+You can check the installation using the following command:
+
+```bash
+java -version
+{:copy-code}
+```
+
+Expected command output is:
+
+```text
+openjdk version "11.0.xx"
+OpenJDK Runtime Environment (...)
+OpenJDK 64-Bit Server VM (build ...)
+```
+
+#### Configure PostgreSQL
+ThingsBoard Edge uses PostgreSQL database as a local storage.
+Instructions listed below will help you to install PostgreSQL.
+
+```bash
+# install **wget** if not already installed:
+sudo apt install -y wget
+
+# import the repository signing key:
+wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
+
+# add repository contents to your system:
+RELEASE=$(lsb_release -cs)
+echo "deb http://apt.postgresql.org/pub/repos/apt/ ${RELEASE}"-pgdg main | sudo tee  /etc/apt/sources.list.d/pgdg.list
+
+# install and launch the postgresql service:
+sudo apt update
+sudo apt -y install postgresql-12
+sudo service postgresql start
+{:copy-code}
+```
+
+Once PostgreSQL is installed you may want to create a new user or set the password for the main user.
+The instructions below will help to set the password for main PostgreSQL user:
+
+```text
+sudo su - postgres
+psql
+\password
+\q
+```
+
+Then, press “Ctrl+D” to return to main user console and connect to the database to create ThingsBoard Edge DB:
+
+```text
+psql -U postgres -d postgres -h 127.0.0.1 -W
+CREATE DATABASE tb_edge;
+\q
+```
+
+#### Thingsboard Edge service installation
+Download installation package:
+
+```bash
+wget https://github.com/thingsboard/thingsboard-edge/releases/download/v${TB_EDGE_VERSION}/tb-edge-${TB_EDGE_VERSION}.deb
+{:copy-code}
+```
+
+Go to the download repository and install ThingsBoard Edge service:
+
+```bash
+sudo dpkg -i tb-edge-${TB_EDGE_VERSION}.deb
+{:copy-code}
+```
+
+#### Configure ThingsBoard Edge
+To configure ThingsBoard Edge, you  can use the following command to automatically update the configuration file with specific values:
+
+```bash
+sudo sh -c 'cat <<EOL >> /etc/tb-edge/conf/tb-edge.conf
+export CLOUD_ROUTING_KEY=${CLOUD_ROUTING_KEY}
+export CLOUD_ROUTING_SECRET=${CLOUD_ROUTING_SECRET}
+export CLOUD_RPC_HOST=${BASE_URL}
+export CLOUD_RPC_PORT=${CLOUD_RPC_PORT}
+export CLOUD_RPC_SSL_ENABLED=${CLOUD_RPC_SSL_ENABLED}
+EOL'
+{:copy-code}
+```
+
+##### [Optional] Database Configuration
+In case you changed default PostgreSQL datasource settings (**postgres**/**postgres**) please update the configuration file (**/etc/tb-edge/conf/tb-edge.conf**) with your actual values:
+
+```bash
+sudo nano /etc/tb-edge/conf/tb-edge.conf
+{:copy-code}
+```
+
+Please update the following lines in your configuration file. Make sure **to replace**:
+- Replace 'postgres' with your actual PostgreSQL username;
+- Replace 'PUT_YOUR_POSTGRESQL_PASSWORD_HERE' with your actual PostgreSQL password.
+
+```bash
+export SPRING_DATASOURCE_URL=jdbc:postgresql://localhost:5432/tb_edge
+export SPRING_DATASOURCE_USERNAME=postgres
+export SPRING_DATASOURCE_PASSWORD=PUT_YOUR_POSTGRESQL_PASSWORD_HERE
+{:copy-code}
+```
+
+##### [Optional] Update bind ports
+If ThingsBoard Edge is going to be running on the same machine where ThingsBoard server (cloud) is running, you'll need to update configuration parameters to avoid port collision between ThingsBoard server and ThingsBoard Edge.
+
+Please execute the following command to update ThingsBoard Edge configuration file (**/etc/tb-edge/conf/tb-edge.conf**):
+
+```bash
+sudo sh -c 'cat <<EOL >> /etc/tb-edge/conf/tb-edge.conf
+export HTTP_BIND_PORT=18080
+export MQTT_BIND_PORT=11883
+export COAP_BIND_PORT=15683
+export LWM2M_ENABLED=false
+export SNMP_ENABLED=false
+EOL'
+{:copy-code}
+```
+
+Make sure that ports above (18080, 11883, 15683) are not used by any other application.
+
+#### Run installation script
+
+Once ThingsBoard Edge is installed and configured please execute the following install script:
+
+```bash
+sudo /usr/share/tb-edge/bin/install/install.sh
+{:copy-code}
+```
+
+#### Restart ThingsBoard Edge service
+
+```bash
+sudo service tb-edge restart
+{:copy-code}
+```
+
+#### Open ThingsBoard Edge UI
+
+Once started, you will be able to open **ThingsBoard Edge UI** using the following link http://localhost:8080.
+
+###### NOTE: Edge HTTP bind port update
+
+Use next **ThingsBoard Edge UI** link **http://localhost:18080** if you updated HTTP 8080 bind port to **18080**.
+

+ 197 - 0
application/src/main/data/json/edge/rule_chains/edge_root_rule_chain.json

@@ -0,0 +1,197 @@
+{
+  "ruleChain": {
+    "additionalInfo": null,
+    "name": "Edge Root Rule Chain",
+    "type": "EDGE",
+    "firstRuleNodeId": null,
+    "root": true,
+    "debugMode": false,
+    "configuration": null,
+    "externalId": null
+  },
+  "metadata": {
+    "firstNodeIndex": 0,
+    "nodes": [
+      {
+        "additionalInfo": {
+          "description": "Process incoming messages from devices with the alarm rules defined in the device profile. Dispatch all incoming messages with \"Success\" relation type.",
+          "layoutX": 187,
+          "layoutY": 468
+        },
+        "type": "org.thingsboard.rule.engine.profile.TbDeviceProfileNode",
+        "name": "Device Profile Node",
+        "debugMode": false,
+        "configuration": {
+          "persistAlarmRulesState": false,
+          "fetchAlarmRulesStateOnStart": false
+        },
+        "externalId": null
+      },
+      {
+        "additionalInfo": {
+          "layoutX": 823,
+          "layoutY": 157
+        },
+        "type": "org.thingsboard.rule.engine.telemetry.TbMsgTimeseriesNode",
+        "name": "Save Timeseries",
+        "debugMode": false,
+        "configuration": {
+          "defaultTTL": 0
+        },
+        "externalId": null
+      },
+      {
+        "additionalInfo": {
+          "layoutX": 824,
+          "layoutY": 52
+        },
+        "type": "org.thingsboard.rule.engine.telemetry.TbMsgAttributesNode",
+        "name": "Save Client Attributes",
+        "debugMode": false,
+        "configurationVersion": 1,
+        "configuration": {
+          "scope": "CLIENT_SCOPE",
+          "notifyDevice": "false",
+          "sendAttributesUpdatedNotification": "false",
+          "updateAttributesOnlyOnValueChange": "true"
+        },
+        "externalId": null
+      },
+      {
+        "additionalInfo": {
+          "layoutX": 347,
+          "layoutY": 149
+        },
+        "type": "org.thingsboard.rule.engine.filter.TbMsgTypeSwitchNode",
+        "name": "Message Type Switch",
+        "debugMode": false,
+        "configuration": {
+          "version": 0
+        },
+        "externalId": null
+      },
+      {
+        "additionalInfo": {
+          "layoutX": 825,
+          "layoutY": 266
+        },
+        "type": "org.thingsboard.rule.engine.action.TbLogNode",
+        "name": "Log RPC from Device",
+        "debugMode": false,
+        "configuration": {
+          "scriptLang": "TBEL",
+          "jsScript": "return '\\nIncoming message:\\n' + JSON.stringify(msg) + '\\nIncoming metadata:\\n' + JSON.stringify(metadata);",
+          "tbelScript": "return '\\nIncoming message:\\n' + JSON.stringify(msg) + '\\nIncoming metadata:\\n' + JSON.stringify(metadata);"
+        },
+        "externalId": null
+      },
+      {
+        "additionalInfo": {
+          "layoutX": 824,
+          "layoutY": 378
+        },
+        "type": "org.thingsboard.rule.engine.action.TbLogNode",
+        "name": "Log Other",
+        "debugMode": false,
+        "configuration": {
+          "scriptLang": "TBEL",
+          "jsScript": "return '\\nIncoming message:\\n' + JSON.stringify(msg) + '\\nIncoming metadata:\\n' + JSON.stringify(metadata);",
+          "tbelScript": "return '\\nIncoming message:\\n' + JSON.stringify(msg) + '\\nIncoming metadata:\\n' + JSON.stringify(metadata);"
+        },
+        "externalId": null
+      },
+      {
+        "additionalInfo": {
+          "layoutX": 824,
+          "layoutY": 466
+        },
+        "type": "org.thingsboard.rule.engine.rpc.TbSendRPCRequestNode",
+        "name": "RPC Call Request",
+        "debugMode": false,
+        "configuration": {
+          "timeoutInSeconds": 60
+        },
+        "externalId": null
+      },
+      {
+        "additionalInfo": {
+          "layoutX": 1126,
+          "layoutY": 104
+        },
+        "type": "org.thingsboard.rule.engine.edge.TbMsgPushToCloudNode",
+        "name": "Push to cloud",
+        "debugMode": false,
+        "configuration": {
+          "scope": "SERVER_SCOPE"
+        },
+        "externalId": null
+      },
+      {
+        "additionalInfo": {
+          "layoutX": 826,
+          "layoutY": 601
+        },
+        "type": "org.thingsboard.rule.engine.edge.TbMsgPushToCloudNode",
+        "name": "Push to cloud",
+        "debugMode": false,
+        "configuration": {
+          "scope": "SERVER_SCOPE"
+        },
+        "externalId": null
+      }
+    ],
+    "connections": [
+      {
+        "fromIndex": 0,
+        "toIndex": 3,
+        "type": "Success"
+      },
+      {
+        "fromIndex": 1,
+        "toIndex": 7,
+        "type": "Success"
+      },
+      {
+        "fromIndex": 2,
+        "toIndex": 7,
+        "type": "Success"
+      },
+      {
+        "fromIndex": 3,
+        "toIndex": 1,
+        "type": "Post telemetry"
+      },
+      {
+        "fromIndex": 3,
+        "toIndex": 2,
+        "type": "Post attributes"
+      },
+      {
+        "fromIndex": 3,
+        "toIndex": 4,
+        "type": "RPC Request from Device"
+      },
+      {
+        "fromIndex": 3,
+        "toIndex": 5,
+        "type": "Other"
+      },
+      {
+        "fromIndex": 3,
+        "toIndex": 6,
+        "type": "RPC Request to Device"
+      },
+      {
+        "fromIndex": 3,
+        "toIndex": 8,
+        "type": "Attributes Deleted"
+      },
+      {
+        "fromIndex": 3,
+        "toIndex": 8,
+        "type": "Attributes Updated"
+      }
+    ],
+    "ruleChainConnections": null
+  }
+}

+ 24 - 0
application/src/main/data/json/system/oauth2_config_templates/apple_config.json

@@ -0,0 +1,24 @@
+{
+  "providerId": "Apple",
+  "additionalInfo": null,
+  "accessTokenUri": "https://appleid.apple.com/auth/token",
+  "authorizationUri": "https://appleid.apple.com/auth/authorize?response_mode=form_post",
+  "scope": ["email","openid","name"],
+  "jwkSetUri": "https://appleid.apple.com/auth/keys",
+  "userInfoUri": null,
+  "clientAuthenticationMethod": "POST",
+  "userNameAttributeName": "email",
+  "mapperConfig": {
+    "type": "APPLE",
+    "basic": {
+      "emailAttributeKey": "email",
+      "firstNameAttributeKey": "firstName",
+      "lastNameAttributeKey": "lastName",
+      "tenantNameStrategy": "DOMAIN"
+    }
+  },
+  "comment": null,
+  "loginButtonIcon": "apple-logo",
+  "loginButtonLabel": "Apple",
+  "helpLink": "https://developer.apple.com/sign-in-with-apple/get-started/"
+}

+ 23 - 0
application/src/main/data/json/system/oauth2_config_templates/facebook_config.json

@@ -0,0 +1,23 @@
+{
+  "providerId": "Facebook",
+  "accessTokenUri": "https://graph.facebook.com/v2.8/oauth/access_token",
+  "authorizationUri": "https://www.facebook.com/v2.8/dialog/oauth",
+  "scope": ["email","public_profile"],
+  "jwkSetUri": null,
+  "userInfoUri": "https://graph.facebook.com/me?fields=id,name,first_name,last_name,email",
+  "clientAuthenticationMethod": "BASIC",
+  "userNameAttributeName": "email",
+  "mapperConfig": {
+    "type": "BASIC",
+    "basic": {
+      "emailAttributeKey": "email",
+      "firstNameAttributeKey": "first_name",
+      "lastNameAttributeKey": "last_name",
+      "tenantNameStrategy": "DOMAIN"
+    }
+  },
+  "comment": null,
+  "loginButtonIcon": "facebook-logo",
+  "loginButtonLabel": "Facebook",
+  "helpLink": "https://developers.facebook.com/docs/facebook-login/web#logindialog"
+}

+ 21 - 0
application/src/main/data/json/system/oauth2_config_templates/github_config.json

@@ -0,0 +1,21 @@
+{
+  "providerId": "Github",
+  "accessTokenUri": "https://github.com/login/oauth/access_token",
+  "authorizationUri": "https://github.com/login/oauth/authorize",
+  "scope": ["read:user","user:email"],
+  "jwkSetUri": null,
+  "userInfoUri": "https://api.github.com/user",
+  "clientAuthenticationMethod": "BASIC",
+  "userNameAttributeName": "login",
+  "mapperConfig": {
+    "type": "GITHUB",
+    "basic": {
+      "firstNameAttributeKey": "name",
+      "tenantNameStrategy": "DOMAIN"
+    }
+  },
+  "comment": "In order to log into ThingsBoard you need to have user's email. You may configure and use Custom OAuth2 Mapper to get email information. Please refer to <a href=\"https://docs.github.com/en/rest/reference/users#list-email-addresses-for-the-authenticated-user\">Github Documentation</a>",
+  "loginButtonIcon": "github-logo",
+  "loginButtonLabel": "Github",
+  "helpLink": "https://docs.github.com/en/developers/apps/creating-an-oauth-app"
+}

+ 24 - 0
application/src/main/data/json/system/oauth2_config_templates/google_config.json

@@ -0,0 +1,24 @@
+{
+  "providerId": "Google",
+  "additionalInfo": null,
+  "accessTokenUri": "https://oauth2.googleapis.com/token",
+  "authorizationUri": "https://accounts.google.com/o/oauth2/v2/auth",
+  "scope": ["email","openid","profile"],
+  "jwkSetUri": "https://www.googleapis.com/oauth2/v3/certs",
+  "userInfoUri": "https://openidconnect.googleapis.com/v1/userinfo",
+  "clientAuthenticationMethod": "BASIC",
+  "userNameAttributeName": "email",
+  "mapperConfig": {
+    "type": "BASIC",
+    "basic": {
+      "emailAttributeKey": "email",
+      "firstNameAttributeKey": "given_name",
+      "lastNameAttributeKey": "family_name",
+      "tenantNameStrategy": "DOMAIN"
+    }
+  },
+  "comment": null,
+  "loginButtonIcon": "google-logo",
+  "loginButtonLabel": "Google",
+  "helpLink": "https://developers.google.com/adwords/api/docs/guides/authentication"
+}

File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_bundles/alarm_widgets.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_bundles/analogue_gauges.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_bundles/cards.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_bundles/charts.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_bundles/control_widgets.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_bundles/count_widgets.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_bundles/date.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_bundles/digital_gauges.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_bundles/edge_widgets.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_bundles/entity_admin_widgets.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_bundles/entity_widgets.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_bundles/gateway_widgets.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_bundles/gpio_widgets.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_bundles/home_page_widgets.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_bundles/html_widgets.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_bundles/input_widgets.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_bundles/maps.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_bundles/navigation_widgets.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_bundles/status_indicators.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_bundles/tables.json


+ 13 - 0
application/src/main/data/json/system/widget_bundles/weather_widgets.json

@@ -0,0 +1,13 @@
+{
+  "widgetsBundle": {
+    "alias": "weather_widgets",
+    "title": "Weather widgets",
+    "image": null,
+    "description": null,
+    "externalId": null,
+    "name": "Weather widgets"
+  },
+  "widgetTypeFqns": [
+    "wind_speed_and_direction"
+  ]
+}

File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/alarm_count.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/alarms_table.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/asset_admin_table.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/attributes_card.json


File diff suppressed because it is too large
+ 17 - 0
application/src/main/data/json/system/widget_types/bars.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/basic_gpio_control.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/basic_gpio_panel.json


File diff suppressed because it is too large
+ 19 - 0
application/src/main/data/json/system/widget_types/battery_level.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/compass.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/dashboard_state_widget.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/dashboards.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/date_range_navigator.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/device_admin_table.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/device_claiming_widget.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/digital_horizontal_bar.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/digital_speedometer.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/digital_thermometer.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/digital_vertical_bar.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/documentation_links.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/doughnut.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/edge_quick_overview.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/entities_hierarchy.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/entities_table.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/entity_count.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/gateway_configuration.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/gateway_configuration__single_device_.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/gateway_connectors.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/gateway_custom_statistics.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/gateway_events.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/gateway_general_chart_statistics.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/gateway_general_configuration.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/gateway_logs.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/gauge.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/getting_started.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/google_map.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/here_map.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/horizontal_bar.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/horizontal_value_card.json


+ 21 - 0
application/src/main/data/json/system/widget_types/html_card.json

@@ -0,0 +1,21 @@
+{
+  "fqn": "cards.html_card",
+  "name": "HTML Card",
+  "deprecated": false,
+  "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAACgCAAAAABslHx1AAAAAmJLR0QA/4ePzL8AAATFSURBVHja7d3tUxNXFMdx/u7vEkAJsKQK6bilKaBV1Eh5GGNaSyq0WodhRuqMtQJqW5UHCwKGMRJiQpL99cWGEGaaTjtjgaTnvNpz7mYnn8neu/duXtwWFbdWlxs8Vrf21VJcy5TU4FHKrBVbtjJqgshstayWmgFSWm1ZVlPEskEMYhCDGMQgBjGIQQxiEIMYxCAGMYhBDGIQgxjEIAYxiEEMYhCDGMQgBjGIQQxiEIMYxCAG+T9ACrlcLjjyc7lcWflcbfhBfnByOZfL5cpSKZfL+f/2G+WAJ/8dJAHh4GgFeK4BaiOjMYDtyskzAIvSQ+BtI0JmKif3NRBk3PM8Lwwhz/M8LxtAzgf30RoNBJEkjUOk0j4GwJok6XaDQ8LwtSSVXVrP1of4v1w978bu5YNh4fHlfnfwfpDo15Hevm/eHkCyP8Tc/rGV44d8FaLbl/QCRrrqQopXg251bkdSdjBIIpuSNAtAbwXyqgsA595Hh3Sm0+l0Or1QDzJxLWiYhCftdSFJoKMHiPnyvwTOhIHeD9KGA3SfIYBkOsGJtIPz/GNDauIvIfEFGJdKnZwtOPUgOw4kfT0E1vQMmPb12IEZaRJCz1RKBpBJCG+ocAVixw25XArTUdACTBbqdvY56MhLisK8xisDXRyiUi+MStoDnqjUCT9Keg3Oh48MCcXj8Xg8PlwPMqQE/Kzr8HK3LiQBFyozhaI8uClJ8+AUi8CD6qi1DYymUqkksH7Mnf0zLcNIvo2In64LGYXhauLCHUlaAnb3gIUq5FXN7//qmCH98s8RmoXv9KYuZBI+ryZ9cFsKzsvngUdVyAowcDGIjWOGRKRpaINNrdWF3IUeX9LS/PymLsMlSZqCLikM01XIe+CnE3ogRqRtAE9arQtZCVqynbCoWXBWpfddMCaNgLsnLQSj1gVwM5Je3/RPAKIBYPYIJOp5nud5dw8uFIPQxO1eCOf1oRs6Jm71QOtG0FMiydFQAHkKnJlIjTgkTwIyB87uEUglbh5c6G13UGhdkvSyPUicB5J0HYBQe/Bkv+tUPnr/JCDZVq7obyF6d6MNnC+COdTmSCs4A78Hs5dkG3zyYqAy13oec8CJ/XZ6l7qFzfW9apJ/80dNsr5V2yNyGxt7tmY3iEEMYhCDGOTEIJnD6YtBDGKQpocsDrvR5K4kyX96PeoOzu5Lysbj8b2Zvv7SkepphgwBcD4vqRAPVlXR91IauASUVAhWgny6e7ohtEdCwcpdCaDTBYYDCED5sHrxdEOuFZRx4Ya06cC3ZS05sKI04EzM3demA1NlLTqweuo7ewI86U7lHdYQzCgNzEnSHXB9SYPw/amHpKBPGoFzqVQqFYUxpYEX0pHqeINAav4wvXoI+eyweq1BIDHorry+nT6E1FRnGgQyCtFqUxVyo7baGJBHlVG4mFivgRxU9xMbjQIpR4HBqYRLz84hpBwFhqYSLu5Og0C07VZ6dXTvEHKk2iAQZZOdQHcqX3NrSdlb1WrjLHXL26/T/j+s2prdIAYxiEEMYhCDGMQgBjGIQQxiEIMYxCAGMYhBDGIQgxjEIAYxiEEMYhCDGMQgBjGIQQxiEIMY5PRAmmaD4ObYsvndVst+c2yiXWppjm3NS/oTe0OjFEeU1MMAAAAASUVORK5CYII=",
+  "description": "Useful to inject custom HTML code. Designed to display static information only.",
+  "descriptor": {
+    "type": "static",
+    "sizeX": 7.5,
+    "sizeY": 3,
+    "resources": [],
+    "templateHtml": "",
+    "templateCss": "",
+    "controllerScript": "self.onInit = function() {\n    var $injector = self.ctx.$scope.$injector;\n    var utils = $injector.get(self.ctx.servicesMap.get('utils'));\n\n    var cssParser = new cssjs();\n    cssParser.testMode = false;\n    var namespace = 'html-card-' + hashCode(self.ctx.settings.cardCss);\n    cssParser.cssPreviewNamespace = namespace;\n    cssParser.createStyleElement(namespace, self.ctx.settings.cardCss);\n    self.ctx.$container.addClass(namespace);\n    var evtFnPrefix = 'htmlCard_' + Math.abs(hashCode(self.ctx.settings.cardCss + self.ctx.settings.cardHtml + self.ctx.widget.id));\n    cardHtml =  '<div style=\"height:100%\" onclick=\"' + evtFnPrefix + '_onClickFn(event)\">' + \n                self.ctx.settings.cardHtml + \n                '</div>';\n    cardHtml = replaceCustomTranslations(cardHtml);\n    self.ctx.$container.html(cardHtml);\n\n    window[evtFnPrefix + '_onClickFn'] = function (event) {\n        self.ctx.actionsApi.elementClick(event);\n    }\n\n    function hashCode(str) {\n        var hash = 0;\n        var i, char;\n        if (str.length === 0) return hash;\n        for (i = 0; i < str.length; i++) {\n            char = str.charCodeAt(i);\n            hash = ((hash << 5) - hash) + char;\n            hash = hash & hash;\n        }\n        return hash;\n    }\n    \n    function replaceCustomTranslations (pattern) {\n        var customTranslationRegex = new RegExp('{i18n:[^{}]+}', 'g');\n        pattern = pattern.replace(customTranslationRegex, getTranslationText);\n        return pattern;\n    }\n    \n    function getTranslationText (variable) {\n        return utils.customTranslation(variable, variable);\n        \n    }\n}\n\nself.actionSources = function() {\n    return {\n        'elementClick': {\n            name: 'widget-action.element-click',\n            multiple: true\n        }\n    };\n}\n\nself.onDestroy = function() {\n}\n",
+    "settingsSchema": "",
+    "dataKeySettingsSchema": "",
+    "settingsDirective": "tb-html-card-widget-settings",
+    "defaultConfig": "{\"datasources\":[{\"type\":\"static\",\"name\":\"function\",\"dataKeys\":[{\"name\":\"f(x)\",\"type\":\"function\",\"label\":\"Random\",\"color\":\"#2196f3\",\"settings\":{},\"_hash\":0.15479322438769105,\"funcBody\":\"var value = prevValue + Math.random() * 100 - 50;\\nvar multiplier = Math.pow(10, 2 || 0);\\nvar value = Math.round(value * multiplier) / multiplier;\\nif (value < -1000) {\\n\\tvalue = -1000;\\n} else if (value > 1000) {\\n\\tvalue = 1000;\\n}\\nreturn value;\"}]}],\"timewindow\":{\"realtime\":{\"timewindowMs\":60000}},\"showTitle\":false,\"backgroundColor\":\"rgb(255, 255, 255)\",\"color\":\"rgba(0, 0, 0, 0.87)\",\"padding\":\"8px\",\"settings\":{\"cardHtml\":\"<div class='card'>HTML code here</div>\",\"cardCss\":\".card {\\n    font-weight: bold;\\n    font-size: 32px;\\n    color: #999;\\n    width: 100%;\\n    height: 100%;\\n    display: flex;\\n    align-items: center;\\n    justify-content: center;\\n}\"},\"title\":\"HTML Card\",\"dropShadow\":true}"
+  },
+  "externalId": null
+}

File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/html_value_card.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/image_map.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/knob_control.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/label_widget.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/lcd_bar_gauge.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/lcd_gauge.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/led_indicator.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/markdown_html_card.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/markers_placement___google_maps.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/markers_placement___image_map.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/markers_placement___openstreetmap.json


File diff suppressed because it is too large
+ 4 - 0
application/src/main/data/json/system/widget_types/mini_gauge.json


Some files were not shown because too many files changed in this diff