Commit 415335c63788b1605d40ee6dd2dc17079faf7d6f

Authored by 简柏林
0 parents

首次提交

Too many changes to show.

To preserve performance only 16 of 7749 files are displayed.

  1 +---
  2 +name: "\U0001F41E Bug report"
  3 +about: Create a report to help us improve
  4 +title: "Your title here"
  5 +labels: ['bug', 'unconfirmed']
  6 +assignees: Ultrazombie
  7 +
  8 +---
  9 +
  10 +**Describe the bug**
  11 +A clear and concise description of what the bug is.
  12 +
  13 +**Your Server Environment**
  14 +<!-- 🔅🔅🔅🔅🔅🔅🔅 Choose one of the following or write your own 🔅🔅🔅🔅🔅🔅🔅-->
  15 +* [Live Demo](https://demo.thingsboard.io)
  16 +* [ThingsBoard Cloud](https://thingsboard.cloud)
  17 +* own setup
  18 + * Deployment: monolith or microservices
  19 + * Deployment type: deb, rpm, exe, docker-compose, k8s, ami
  20 + * ThingsBoard Version
  21 + * Community or Professional Edition
  22 + * OS Name and Version
  23 +
  24 +**Your Client Environment**
  25 +<!-- 🔅🔅🔅🔅🔅🔅🔅 Choose one of the following or write your own 🔅🔅🔅🔅🔅🔅🔅-->
  26 +**Desktop (please complete the following information):**
  27 +
  28 +* OS: [e.g. iOS]
  29 +* Browser [e.g. chrome, safari]
  30 +* Version [e.g. 22]
  31 +
  32 +**Smartphone (please complete the following information):**
  33 +* Device: [e.g. iPhone6]
  34 +* OS: [e.g. iOS8.1]
  35 +* Browser [e.g. stock browser, safari]
  36 +* Version [e.g. 22]
  37 +
  38 +**Your Device**
  39 +
  40 +* Connectivity
  41 + * MQTT
  42 + * HTTP
  43 + * CoAP
  44 + * Gateway
  45 + * Integration: (Specify name)
  46 +* Device vendor and model
  47 +
  48 +**To Reproduce**
  49 +Steps to reproduce the behavior:
  50 +1. Go to '...'
  51 +2. Click on '....'
  52 +3. Scroll down to '....'
  53 +4. See error
  54 +
  55 +**Expected behavior**
  56 +A clear and concise description of what you expected to happen.
  57 +
  58 +**Screenshots**
  59 +If applicable, please add screenshots to help explain your problem.
  60 +
  61 +**Additional context**
  62 +Please feel free to add any other context about the problem here.
  63 +
  64 +________________________________________________________________
  65 +**Disclaimer**
  66 +
  67 +We appreciate your contribution whether it is a bug report, feature request, or pull request with improvement (hopefully). Please comply with the [Community ethics policy](https://docs.github.com/en/site-policy/acceptable-use-policies/github-acceptable-use-policies), and do not expect us to answer your requests immediately. Also, do not treat *GitHub issues* as a support channel.
  1 +---
  2 +name: Feature request
  3 +about: Suggest an idea for this project
  4 +title: "Your title here"
  5 +labels: ['feature']
  6 +assignees: 'Ultrazombie'
  7 +
  8 +---
  9 +
  10 +**Is your feature request related to a problem? Please describe.**
  11 +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
  12 +
  13 +**Describe the solution you'd like**
  14 +A clear and concise description of what you want to happen.
  15 +
  16 +**Describe alternatives you've considered**
  17 +A clear and concise description of any alternative solutions or features you've considered.
  18 +
  19 +**Additional context**
  20 +Add any other context or screenshots about the feature request here.
  21 +
  22 +_____________________________________________________
  23 +**Disclaimer**
  24 +
  25 +We appreciate your contribution whether it is a bug report, feature request, or pull request with improvement (hopefully). Please comply with the [Community ethics policy](https://docs.github.com/en/site-policy/acceptable-use-policies/github-acceptable-use-policies)), and do not expect us to answer your requests immediately. Also, do not treat *GitHub issues* as a support channel.
  1 +---
  2 +name: Question
  3 +about: Describe your questions in detail
  4 +title: "Your title here"
  5 +labels: ['question']
  6 +assignees: 'Ultrazombie'
  7 +
  8 +---
  9 +
  10 +**Component**
  11 +
  12 +<!-- Choose one of the following and delete all others. -->
  13 + * UI
  14 + * Rule Engine
  15 + * Installation
  16 + * Generic
  17 +
  18 +**Description**
  19 +Clear and concise details.
  20 +
  21 +**Environment**
  22 +<!-- Add information about your environment and ThingsBoard version if applicable -->
  23 + * OS: name and version
  24 + * ThingsBoard: version
  25 + * Browser: name and version
  26 +
  27 +___________________________________________________________
  28 +**Disclaimer**
  29 +
  30 +We appreciate your contribution whether it is a bug report, feature request, or pull request with improvement (hopefully). Please comply with the [Community ethics policy](https://docs.github.com/en/site-policy/acceptable-use-policies/github-acceptable-use-policies), and do not expect us to answer your requests immediately. Also, do not treat *GitHub issues* as a support channel.
  1 +#
  2 +# Copyright © 2016-2024 The Thingsboard Authors
  3 +#
  4 +# Licensed under the Apache License, Version 2.0 (the "License");
  5 +# you may not use this file except in compliance with the License.
  6 +# You may obtain a copy of the License at
  7 +#
  8 +# http://www.apache.org/licenses/LICENSE-2.0
  9 +#
  10 +# Unless required by applicable law or agreed to in writing, software
  11 +# distributed under the License is distributed on an "AS IS" BASIS,
  12 +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13 +# See the License for the specific language governing permissions and
  14 +# limitations under the License.
  15 +#
  16 +
  17 +changelog:
  18 + exclude:
  19 + labels:
  20 + - Ignore for release
  21 + categories:
  22 + - title: 'Major Core & Rule Engine'
  23 + labels:
  24 + - 'Major Core'
  25 + - 'Major Rule Engine'
  26 + exclude:
  27 + labels:
  28 + - 'Bug'
  29 + - title: 'Major UI'
  30 + labels:
  31 + - 'Major UI'
  32 + exclude:
  33 + labels:
  34 + - 'Bug'
  35 + - title: 'Major Transport'
  36 + labels:
  37 + - 'Major Transport'
  38 + exclude:
  39 + labels:
  40 + - 'Bug'
  41 + - title: 'Major Edge'
  42 + labels:
  43 + - 'Major Edge'
  44 + exclude:
  45 + labels:
  46 + - 'Bug'
  47 + - title: 'Core & Rule Engine'
  48 + labels:
  49 + - 'Core'
  50 + - 'Rule Engine'
  51 + exclude:
  52 + labels:
  53 + - 'Bug'
  54 + - title: 'UI'
  55 + labels:
  56 + - 'UI'
  57 + exclude:
  58 + labels:
  59 + - 'Bug'
  60 + - title: 'Transport'
  61 + labels:
  62 + - 'Transport'
  63 + exclude:
  64 + labels:
  65 + - 'Bug'
  66 + - title: 'Edge'
  67 + labels:
  68 + - 'Edge'
  69 + exclude:
  70 + labels:
  71 + - 'Bug'
  72 + - title: 'Bug: Core & Rule Engine'
  73 + labels:
  74 + - 'Core'
  75 + - 'Rule Engine'
  76 + - 'Bug'
  77 + - title: 'Bug: UI'
  78 + labels:
  79 + - 'UI'
  80 + - 'Bug'
  81 + - title: 'Bug: Transport'
  82 + labels:
  83 + - 'Transport'
  84 + - 'Bug'
  85 + - title: 'Bug: Edge'
  86 + labels:
  87 + - 'Edge'
  88 + - 'Bug'
  1 +#
  2 +# Copyright © 2016-2024 The Thingsboard Authors
  3 +#
  4 +# Licensed under the Apache License, Version 2.0 (the "License");
  5 +# you may not use this file except in compliance with the License.
  6 +# You may obtain a copy of the License at
  7 +#
  8 +# http://www.apache.org/licenses/LICENSE-2.0
  9 +#
  10 +# Unless required by applicable law or agreed to in writing, software
  11 +# distributed under the License is distributed on an "AS IS" BASIS,
  12 +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13 +# See the License for the specific language governing permissions and
  14 +# limitations under the License.
  15 +#
  16 +
  17 +name: Check configuration files
  18 +on:
  19 + push:
  20 + branches:
  21 + - master
  22 + pull_request:
  23 + paths:
  24 + - 'application/src/main/resources/thingsboard.yml'
  25 + - 'transport/http/src/main/resources/tb-http-transport.yml'
  26 + - 'transport/http/src/main/resources/tb-mqtt-transport.yml'
  27 + - 'transport/http/src/main/resources/tb-coap-transport.yml'
  28 + - 'transport/http/src/main/resources/tb-lwm2m-transport.yml'
  29 + - 'transport/http/src/main/resources/tb-snmp-transport.yml'
  30 + - 'msa/vc-executor/src/main/resources/tb-vc-executor.yml'
  31 +
  32 +jobs:
  33 + build:
  34 + name: Check thingsboard.yml file
  35 + runs-on: ubuntu-20.04
  36 + steps:
  37 + - name: Checkout code
  38 + uses: actions/checkout@v2
  39 + - name: Set up Python 3.10
  40 + uses: actions/setup-python@v3
  41 + with:
  42 + python-version: "3.10.2"
  43 + architecture: "x64"
  44 + env:
  45 + AGENT_TOOLSDIRECTORY: /opt/hostedtoolcache
  46 + - name: Run Verification Script
  47 + run: python3 tools/src/main/python/check_yml_file.py
  1 +#
  2 +# Copyright © 2016-2024 The Thingsboard Authors
  3 +#
  4 +# Licensed under the Apache License, Version 2.0 (the "License");
  5 +# you may not use this file except in compliance with the License.
  6 +# You may obtain a copy of the License at
  7 +#
  8 +# http://www.apache.org/licenses/LICENSE-2.0
  9 +#
  10 +# Unless required by applicable law or agreed to in writing, software
  11 +# distributed under the License is distributed on an "AS IS" BASIS,
  12 +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13 +# See the License for the specific language governing permissions and
  14 +# limitations under the License.
  15 +#
  16 +
  17 +name: License header format
  18 +
  19 +on:
  20 + push:
  21 + branches:
  22 + - 'master'
  23 + - 'develop/3*'
  24 + - 'hotfix/3*'
  25 +
  26 +jobs:
  27 + license-format:
  28 + runs-on: ubuntu-latest
  29 +
  30 + steps:
  31 + - name: Checkout Repository
  32 + uses: actions/checkout@v4
  33 +
  34 + - name: Set up JDK
  35 + uses: actions/setup-java@v4
  36 + with:
  37 + distribution: 'corretto' # https://github.com/actions/setup-java?tab=readme-ov-file#supported-distributions
  38 + java-version: '21'
  39 + cache: 'maven' # https://github.com/actions/setup-java?tab=readme-ov-file#caching-sbt-dependencies
  40 +
  41 + - name: License header format
  42 + run: mvn -T 1C license:format
  43 +
  44 + - name: License header format (msa/black-box-tests/)
  45 + run: mvn -T 1C license:format -f msa/black-box-tests/
  46 +
  47 + - name: Set Git user information
  48 + run: |
  49 + git config user.name "ThingsBoard Bot"
  50 + git config user.email "noreply@thingsboard.io"
  51 +
  52 + - name: Check and push changes
  53 + run: |
  54 + git diff --exit-code || git commit -am "License header format" && git push
  1 +*.toDelete
  2 +output/**
  3 +*.class
  4 +*~
  5 +*.iml
  6 +*/.idea/**
  7 +.idea/**
  8 +.idea
  9 +*.log
  10 +*.log.[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]
  11 +*/.classpath
  12 +.classpath
  13 +*/.project
  14 +.project
  15 +.cache/**
  16 +target/
  17 +build/
  18 +tmp_deb_control/
  19 +tmp_rpm_control/
  20 +tmp_sh/
  21 +.gwt/
  22 +.settings/
  23 +/bin
  24 +bin/
  25 +**/dependency-reduced-pom.xml
  26 +pom.xml.versionsBackup
  27 +.DS_Store
  28 +**/.gradle
  29 +**/local.properties
  30 +**/build
  31 +**/target
  32 +**/Californium.properties
  33 +**/Californium3.properties
  34 +**/.env
  35 +.instance_id
  36 +rebuild-docker.sh
  37 +*/.run/**
  38 +.run/**
  39 +.run
  1 + Apache License
  2 + Version 2.0, January 2004
  3 + http://www.apache.org/licenses/
  4 +
  5 + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
  6 +
  7 + 1. Definitions.
  8 +
  9 + "License" shall mean the terms and conditions for use, reproduction,
  10 + and distribution as defined by Sections 1 through 9 of this document.
  11 +
  12 + "Licensor" shall mean the copyright owner or entity authorized by
  13 + the copyright owner that is granting the License.
  14 +
  15 + "Legal Entity" shall mean the union of the acting entity and all
  16 + other entities that control, are controlled by, or are under common
  17 + control with that entity. For the purposes of this definition,
  18 + "control" means (i) the power, direct or indirect, to cause the
  19 + direction or management of such entity, whether by contract or
  20 + otherwise, or (ii) ownership of fifty percent (50%) or more of the
  21 + outstanding shares, or (iii) beneficial ownership of such entity.
  22 +
  23 + "You" (or "Your") shall mean an individual or Legal Entity
  24 + exercising permissions granted by this License.
  25 +
  26 + "Source" form shall mean the preferred form for making modifications,
  27 + including but not limited to software source code, documentation
  28 + source, and configuration files.
  29 +
  30 + "Object" form shall mean any form resulting from mechanical
  31 + transformation or translation of a Source form, including but
  32 + not limited to compiled object code, generated documentation,
  33 + and conversions to other media types.
  34 +
  35 + "Work" shall mean the work of authorship, whether in Source or
  36 + Object form, made available under the License, as indicated by a
  37 + copyright notice that is included in or attached to the work
  38 + (an example is provided in the Appendix below).
  39 +
  40 + "Derivative Works" shall mean any work, whether in Source or Object
  41 + form, that is based on (or derived from) the Work and for which the
  42 + editorial revisions, annotations, elaborations, or other modifications
  43 + represent, as a whole, an original work of authorship. For the purposes
  44 + of this License, Derivative Works shall not include works that remain
  45 + separable from, or merely link (or bind by name) to the interfaces of,
  46 + the Work and Derivative Works thereof.
  47 +
  48 + "Contribution" shall mean any work of authorship, including
  49 + the original version of the Work and any modifications or additions
  50 + to that Work or Derivative Works thereof, that is intentionally
  51 + submitted to Licensor for inclusion in the Work by the copyright owner
  52 + or by an individual or Legal Entity authorized to submit on behalf of
  53 + the copyright owner. For the purposes of this definition, "submitted"
  54 + means any form of electronic, verbal, or written communication sent
  55 + to the Licensor or its representatives, including but not limited to
  56 + communication on electronic mailing lists, source code control systems,
  57 + and issue tracking systems that are managed by, or on behalf of, the
  58 + Licensor for the purpose of discussing and improving the Work, but
  59 + excluding communication that is conspicuously marked or otherwise
  60 + designated in writing by the copyright owner as "Not a Contribution."
  61 +
  62 + "Contributor" shall mean Licensor and any individual or Legal Entity
  63 + on behalf of whom a Contribution has been received by Licensor and
  64 + subsequently incorporated within the Work.
  65 +
  66 + 2. Grant of Copyright License. Subject to the terms and conditions of
  67 + this License, each Contributor hereby grants to You a perpetual,
  68 + worldwide, non-exclusive, no-charge, royalty-free, irrevocable
  69 + copyright license to reproduce, prepare Derivative Works of,
  70 + publicly display, publicly perform, sublicense, and distribute the
  71 + Work and such Derivative Works in Source or Object form.
  72 +
  73 + 3. Grant of Patent License. Subject to the terms and conditions of
  74 + this License, each Contributor hereby grants to You a perpetual,
  75 + worldwide, non-exclusive, no-charge, royalty-free, irrevocable
  76 + (except as stated in this section) patent license to make, have made,
  77 + use, offer to sell, sell, import, and otherwise transfer the Work,
  78 + where such license applies only to those patent claims licensable
  79 + by such Contributor that are necessarily infringed by their
  80 + Contribution(s) alone or by combination of their Contribution(s)
  81 + with the Work to which such Contribution(s) was submitted. If You
  82 + institute patent litigation against any entity (including a
  83 + cross-claim or counterclaim in a lawsuit) alleging that the Work
  84 + or a Contribution incorporated within the Work constitutes direct
  85 + or contributory patent infringement, then any patent licenses
  86 + granted to You under this License for that Work shall terminate
  87 + as of the date such litigation is filed.
  88 +
  89 + 4. Redistribution. You may reproduce and distribute copies of the
  90 + Work or Derivative Works thereof in any medium, with or without
  91 + modifications, and in Source or Object form, provided that You
  92 + meet the following conditions:
  93 +
  94 + (a) You must give any other recipients of the Work or
  95 + Derivative Works a copy of this License; and
  96 +
  97 + (b) You must cause any modified files to carry prominent notices
  98 + stating that You changed the files; and
  99 +
  100 + (c) You must retain, in the Source form of any Derivative Works
  101 + that You distribute, all copyright, patent, trademark, and
  102 + attribution notices from the Source form of the Work,
  103 + excluding those notices that do not pertain to any part of
  104 + the Derivative Works; and
  105 +
  106 + (d) If the Work includes a "NOTICE" text file as part of its
  107 + distribution, then any Derivative Works that You distribute must
  108 + include a readable copy of the attribution notices contained
  109 + within such NOTICE file, excluding those notices that do not
  110 + pertain to any part of the Derivative Works, in at least one
  111 + of the following places: within a NOTICE text file distributed
  112 + as part of the Derivative Works; within the Source form or
  113 + documentation, if provided along with the Derivative Works; or,
  114 + within a display generated by the Derivative Works, if and
  115 + wherever such third-party notices normally appear. The contents
  116 + of the NOTICE file are for informational purposes only and
  117 + do not modify the License. You may add Your own attribution
  118 + notices within Derivative Works that You distribute, alongside
  119 + or as an addendum to the NOTICE text from the Work, provided
  120 + that such additional attribution notices cannot be construed
  121 + as modifying the License.
  122 +
  123 + You may add Your own copyright statement to Your modifications and
  124 + may provide additional or different license terms and conditions
  125 + for use, reproduction, or distribution of Your modifications, or
  126 + for any such Derivative Works as a whole, provided Your use,
  127 + reproduction, and distribution of the Work otherwise complies with
  128 + the conditions stated in this License.
  129 +
  130 + 5. Submission of Contributions. Unless You explicitly state otherwise,
  131 + any Contribution intentionally submitted for inclusion in the Work
  132 + by You to the Licensor shall be under the terms and conditions of
  133 + this License, without any additional terms or conditions.
  134 + Notwithstanding the above, nothing herein shall supersede or modify
  135 + the terms of any separate license agreement you may have executed
  136 + with Licensor regarding such Contributions.
  137 +
  138 + 6. Trademarks. This License does not grant permission to use the trade
  139 + names, trademarks, service marks, or product names of the Licensor,
  140 + except as required for reasonable and customary use in describing the
  141 + origin of the Work and reproducing the content of the NOTICE file.
  142 +
  143 + 7. Disclaimer of Warranty. Unless required by applicable law or
  144 + agreed to in writing, Licensor provides the Work (and each
  145 + Contributor provides its Contributions) on an "AS IS" BASIS,
  146 + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
  147 + implied, including, without limitation, any warranties or conditions
  148 + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
  149 + PARTICULAR PURPOSE. You are solely responsible for determining the
  150 + appropriateness of using or redistributing the Work and assume any
  151 + risks associated with Your exercise of permissions under this License.
  152 +
  153 + 8. Limitation of Liability. In no event and under no legal theory,
  154 + whether in tort (including negligence), contract, or otherwise,
  155 + unless required by applicable law (such as deliberate and grossly
  156 + negligent acts) or agreed to in writing, shall any Contributor be
  157 + liable to You for damages, including any direct, indirect, special,
  158 + incidental, or consequential damages of any character arising as a
  159 + result of this License or out of the use or inability to use the
  160 + Work (including but not limited to damages for loss of goodwill,
  161 + work stoppage, computer failure or malfunction, or any and all
  162 + other commercial damages or losses), even if such Contributor
  163 + has been advised of the possibility of such damages.
  164 +
  165 + 9. Accepting Warranty or Additional Liability. While redistributing
  166 + the Work or Derivative Works thereof, You may choose to offer,
  167 + and charge a fee for, acceptance of support, warranty, indemnity,
  168 + or other liability obligations and/or rights consistent with this
  169 + License. However, in accepting such obligations, You may act only
  170 + on Your own behalf and on Your sole responsibility, not on behalf
  171 + of any other Contributor, and only if You agree to indemnify,
  172 + defend, and hold each Contributor harmless for any liability
  173 + incurred by, or claims asserted against, such Contributor by reason
  174 + of your accepting any such warranty or additional liability.
  175 +
  176 + END OF TERMS AND CONDITIONS
  177 +
  178 + APPENDIX: How to apply the Apache License to your work.
  179 +
  180 + To apply the Apache License to your work, attach the following
  181 + boilerplate notice, with the fields enclosed by brackets "{}"
  182 + replaced with your own identifying information. (Don't include
  183 + the brackets!) The text should be enclosed in the appropriate
  184 + comment syntax for the file format. We also recommend that a
  185 + file or class name and description of purpose be included on the
  186 + same "printed page" as the copyright notice for easier
  187 + identification within third-party archives.
  188 +
  189 + Copyright 2016 The Thingsboard Authors
  190 +
  191 + Licensed under the Apache License, Version 2.0 (the "License");
  192 + you may not use this file except in compliance with the License.
  193 + You may obtain a copy of the License at
  194 +
  195 + http://www.apache.org/licenses/LICENSE-2.0
  196 +
  197 + Unless required by applicable law or agreed to in writing, software
  198 + distributed under the License is distributed on an "AS IS" BASIS,
  199 + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  200 + See the License for the specific language governing permissions and
  201 + limitations under the License.
  1 +# ThingsBoard
  2 +[![Join the chat at https://gitter.im/thingsboard/chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/thingsboard/chat?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
  3 +[![ThingsBoard Builds Server Status](https://img.shields.io/teamcity/build/e/ThingsBoard_Build?label=TB%20builds%20server&server=https%3A%2F%2Fbuilds.thingsboard.io&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAALzAAAC8wHS6QoqAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAB9FJREFUeJzVm3+MXUUVx7+zWwqEtnRLWisQ2lKVUisIQmsqYCohpUhpEGsFKSJJTS0qGiGIISJ/8CNGYzSaEKBQEZUiP7RgVbCVdpE0xYKBWgI2rFLZJZQWtFKobPfjH3Pfdu7s3Pvmzntv3/JNNr3bOXPO+Z6ZO3PumVmjFgEYJWmWpDmSZks6VtIESV3Zv29LWmGMubdVPgw7gEOBJcAaYC/18fd2+zyqngAwXdL7M9keSduMMXgyH5R0laRPSRpbwf62CrLDB8AAS4HnAqP2EvA1YBTwPuBnwP46I70H+DPwALAS+B5wBTCu3VyHIJvG98dMX+B/BW1vAvcAnwdmAp3t5hWFbORXR5AvwmPARcCYdnNJAnCBR+gd7HQ9HZgLfAt4PUB8AzCv3f43DGCTQ6o/RAo43gtCL2Da4W9TAUwEBhxiPymRvcabAR8eTl+biQ7neYokdyTXlvR7xPt9etM8GmZ0FDxL+WD42FdBdkTDJd0jyU1wzi7pd473e0+qA8AM4AbgkrK1BDgOWAc8ChyTaq+eM5ud93ofcHpAZiY2sanhZaDDaTfAZ7HJUmlWCJzm6bqLQM6QBanXkfthcxgPNbTEW9z2AT8AzgTmANdikxwXX/d0XOi0bQEmFNj6GPAfhuKnXkB98kNsNjsITwacKkI3MNrrf4UnswXoiiRfwyqgo4D8L2hVZglMw456DDYCRwR0jCH/KuWCgE2oysjX8KsA+V+2jHzm3CrP4PMBx/4JfAU4qETP+EAQ/gKcA/w7gnwNbl5yD7bG0DLyM7DZXw3d2f9PA+YD5wIzK+gLBSEFA/XIA2cAVwLvbSQAt3mGP5Gs7IDO8dg1ZYDGcAfOwujZuIwDn+ObUx09hHx+v7Eh5nndCyIIDgBbgd0lMiv9IABfIF+LeDnVyU97xj5XR/6bwI5sZEaXyH2UuHd+WSbfRXktYjAIAfL9wGdSA/Cgo+gtSio12IKJa3hNKAgZ+TciyL+AlwECKzI/ioLgTvsa+YtTyXeSz8ZW15E3wN88p3JBwCZNMeShIKkBTsRmmSG4a0o/sDSJfGboBE/5pRF9pgI9oSBUJP8mXpLk2bm6pO9Aw+QzI8s8xVFbXRaEf3h911cgD7Cyjg0/L/GxnoLdoUoA3O1vDxUyLWyO4AehCpYX6D2L/LpUhtsaCkIWxRoeT+g/DVsqT8EWYDowC5jh6FxUUc+tJJblOmSPqWp4JUFHl6TDUoxLOlnSdknPSnK3sA2S9lfQs0zS7SkzwQ/A61U6A6dKWufpSMVg5mmMeUPSXyv2v0zSN6oa7ZAdwRqiA5CRf0TS+KpGAxiQ1OFN4z8l6PErVXUxSvmp1hvTqUnk35adPWskPWSM6fPaq84ASXqscg/gi9gcvJuC6o0nfwrhw5EYvIpNn88HStcN4M6KulfTys/lzKlO0lb8P2Lrf6VbLDAF+DLweEX998aSx372bwP6gPlVA3BEAvm9FJwVYtPqjwDXA08n6AZbOYoeeeAWp++mSlPGGLMLeFjSuRW6Iektx4GDJc2TdJ6khZKOruKDh/skXWSM6a/Q5yjn+dDKFrE1vw0VR2m2039x4kj7uJ+SslyJ/+7rtaly4mCM+a+kBaq2TbnVpfWy216jmCzpkIR+7kK/MymHNsbslX0NYoMweMpsjNklaWuKXQ9zJf2eOocvAbzHee5N/ojIgvBVxY3madh3v4b1iWZ/o3zw5kpaS+SFDGCq8jPguUQ/CmsCZfi403dhwjv/AHAQMAl41mvbGBMEhq4/c1PJTwmQr1f7u97pfzj5EnwUead/KAg/ivD7Zkf+HSBpFwiRfwibI3SXkOj29PgEivAggdU+C8JWR+6+CN9dm1tSyHcBLwbIj87ax1Kcxe0DJmVyY4CdEeR/TXnVeRLwc+C3wHF1fP+Qp/uGlABc6Cl5mPziVi8IzwDfAZ6KIN9LyhQt9v1GT/+sFCXTOVBBXuOTd+TGkp+eqWjKSTBwMPAvR+9TjSibjK35l93mWIxdZFKOxPzFseEgAJd7Olt6v+AC8jdIqwRhLbZM758HRH3tYa/vnoqtKZ4JHIk99tvh6HqNVl3RLSB/JfBEBPnBwxXsJ2uf176qxO7hwE3ALq/PfuyVXhdXt4r8+QHyK7K2cXWCMLiTOPqODwTh2IDdD2CP12LwCnUKMankO8kfiAySd2SKgjCEfEEQ+nznsZc7eyLJA9zddPKZIx0c2NcHgMsL5MZhr83XULiTeCSXAEcG2m4PjPCXsEWWBdhbZ/4h6knN4u07Mxv4MbCojtxo7DW6RTRwopMFxt0xeoCJAblLvCDdlWpzRAG42CO2sET2UUfuVbetsYPF9mKq8zwg6Q8lsm7bRJxt8N0cAPdar5FUupYU9X03B2C782wknVUi+0nneacxZk9rXBpGABO8RXA72demJ7fcWyvubIe/TQN2y11MuJ6wA5v3z8HeMbjba+8n5StwJCDb9lYUEI/Fde3mEQ1svnBKRvp32K/LEPYQd1z3XQJfsG3/Sw/gKElLZev8tb8rnizpBEmF1SDZ06ZbJN0saa+kayQtV77qi6QnJF1njFnXdOebAcIXssvQB3yfcGrcCZwEnAfMC8mMKGArNUVT28VubF4/nyZflx8Jr8BVkr4tm83tzn5ek/S8pM2SnpT0gv8H283C/wGTFfhGtexQwQAAAABJRU5ErkJggg==&labelColor=305680)](https://builds.thingsboard.io/viewType.html?buildTypeId=ThingsBoard_Build&guest=1)
  4 +
  5 +ThingsBoard is an open-source IoT platform for data collection, processing, visualization, and device management.
  6 +
  7 +<img src="./img/logo.png?raw=true" width="100" height="100">
  8 +
  9 +## Documentation
  10 +
  11 +ThingsBoard documentation is hosted on [thingsboard.io](https://thingsboard.io/docs).
  12 +
  13 +## IoT use cases
  14 +
  15 +[**Smart energy**](https://thingsboard.io/smart-energy/)
  16 +[![Smart energy](https://user-images.githubusercontent.com/8308069/152984256-eb48564a-645c-468d-912b-f554b63104a5.gif "Smart energy")](https://thingsboard.io/smart-energy/)
  17 +
  18 +[**Fleet tracking**](https://thingsboard.io/fleet-tracking/)
  19 +[![Fleet tracking](https://user-images.githubusercontent.com/8308069/152984528-0054ed55-8b8b-4cda-ba45-02fe95a81222.gif "Fleet tracking")](https://thingsboard.io/fleet-tracking/)
  20 +
  21 +[**Smart farming**](https://thingsboard.io/smart-farming/)
  22 +[![Smart farming](https://user-images.githubusercontent.com/8308069/152984443-a98b7d3d-ff7a-4037-9011-e71e1e6f755f.gif "Smart farming")](https://thingsboard.io/smart-farming/)
  23 +
  24 +[**IoT Rule Engine**](https://thingsboard.io/docs/user-guide/rule-engine-2-0/re-getting-started/)
  25 +[![IoT Rule Engine](https://img.thingsboard.io/demo/send-email-rule-chain.gif "IoT Rule Engine")](https://thingsboard.io/docs/user-guide/rule-engine-2-0/re-getting-started/)
  26 +
  27 +[**Smart metering**](https://thingsboard.io/smart-metering/)
  28 +[![Smart metering](https://user-images.githubusercontent.com/8308069/31455788-6888a948-aec1-11e7-9819-410e0ba785e0.gif "Smart metering")](https://thingsboard.io/smart-metering/)
  29 +
  30 +## Getting Started
  31 +
  32 +Collect and Visualize your IoT data in minutes by following this [guide](https://thingsboard.io/docs/getting-started-guides/helloworld/).
  33 +
  34 +## Support
  35 +
  36 + - [Community chat](https://gitter.im/thingsboard/chat)
  37 + - [Q&A forum](https://groups.google.com/forum/#!forum/thingsboard)
  38 + - [Stackoverflow](http://stackoverflow.com/questions/tagged/thingsboard)
  39 +
  40 +## Licenses
  41 +
  42 +This project is released under [Apache 2.0 License](./LICENSE).
  1 +!bin/
  2 +/bin/
  1 +<!--
  2 +
  3 + Copyright © 2016-2024 The Thingsboard Authors
  4 +
  5 + Licensed under the Apache License, Version 2.0 (the "License");
  6 + you may not use this file except in compliance with the License.
  7 + You may obtain a copy of the License at
  8 +
  9 + http://www.apache.org/licenses/LICENSE-2.0
  10 +
  11 + Unless required by applicable law or agreed to in writing, software
  12 + distributed under the License is distributed on an "AS IS" BASIS,
  13 + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14 + See the License for the specific language governing permissions and
  15 + limitations under the License.
  16 +
  17 +-->
  18 +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  19 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  20 + <modelVersion>4.0.0</modelVersion>
  21 + <parent>
  22 + <groupId>org.thingsboard</groupId>
  23 + <version>3.7.0</version>
  24 + <artifactId>thingsboard</artifactId>
  25 + </parent>
  26 + <artifactId>application</artifactId>
  27 + <packaging>jar</packaging>
  28 +
  29 + <name>ThingsBoard Server Application</name>
  30 + <url>https://thingsboard.io</url>
  31 + <description>Open-source IoT Platform - Device management, data collection, processing and visualization
  32 + </description>
  33 +
  34 + <properties>
  35 + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  36 + <main.dir>${basedir}/..</main.dir>
  37 + <pkg.type>java</pkg.type>
  38 + <pkg.disabled>false</pkg.disabled>
  39 + <pkg.process-resources.phase>process-resources</pkg.process-resources.phase>
  40 + <pkg.package.phase>package</pkg.package.phase>
  41 + <pkg.name>thingsboard</pkg.name>
  42 + <pkg.win.dist>${project.build.directory}/windows</pkg.win.dist>
  43 + <pkg.copyInstallScripts>true</pkg.copyInstallScripts>
  44 + <pkg.implementationTitle>ThingsBoard</pkg.implementationTitle>
  45 + <pkg.mainClass>org.thingsboard.server.ThingsboardServerApplication</pkg.mainClass>
  46 + </properties>
  47 +
  48 + <dependencies>
  49 + <dependency>
  50 + <groupId>io.netty</groupId>
  51 + <artifactId>netty-transport-native-epoll</artifactId>
  52 + <!-- Explicitly bring in the linux classifier, test may fail on 32-bit linux -->
  53 + <classifier>linux-x86_64</classifier>
  54 + </dependency>
  55 + <dependency>
  56 + <groupId>org.thingsboard.common</groupId>
  57 + <artifactId>actor</artifactId>
  58 + </dependency>
  59 + <dependency>
  60 + <groupId>org.thingsboard.common</groupId>
  61 + <artifactId>util</artifactId>
  62 + </dependency>
  63 + <dependency>
  64 + <groupId>org.thingsboard.rule-engine</groupId>
  65 + <artifactId>rule-engine-api</artifactId>
  66 + </dependency>
  67 + <dependency>
  68 + <groupId>org.thingsboard.common</groupId>
  69 + <artifactId>cluster-api</artifactId>
  70 + </dependency>
  71 + <dependency>
  72 + <groupId>org.thingsboard.common</groupId>
  73 + <artifactId>version-control</artifactId>
  74 + </dependency>
  75 + <dependency>
  76 + <groupId>org.thingsboard.rule-engine</groupId>
  77 + <artifactId>rule-engine-components</artifactId>
  78 + </dependency>
  79 + <dependency>
  80 + <groupId>org.thingsboard.common.transport</groupId>
  81 + <artifactId>transport-api</artifactId>
  82 + </dependency>
  83 + <dependency>
  84 + <groupId>org.thingsboard.common.transport</groupId>
  85 + <artifactId>mqtt</artifactId>
  86 + </dependency>
  87 + <dependency>
  88 + <groupId>org.thingsboard.common.transport</groupId>
  89 + <artifactId>http</artifactId>
  90 + </dependency>
  91 + <dependency>
  92 + <groupId>org.thingsboard.common.transport</groupId>
  93 + <artifactId>coap</artifactId>
  94 + </dependency>
  95 + <dependency>
  96 + <groupId>org.thingsboard.common.transport</groupId>
  97 + <artifactId>lwm2m</artifactId>
  98 + </dependency>
  99 + <dependency>
  100 + <groupId>org.thingsboard.common.transport</groupId>
  101 + <artifactId>snmp</artifactId>
  102 + </dependency>
  103 + <dependency>
  104 + <groupId>org.thingsboard</groupId>
  105 + <artifactId>dao</artifactId>
  106 + </dependency>
  107 + <dependency>
  108 + <groupId>org.thingsboard.common</groupId>
  109 + <artifactId>queue</artifactId>
  110 + </dependency>
  111 + <dependency>
  112 + <groupId>org.thingsboard.common.script</groupId>
  113 + <artifactId>script-api</artifactId>
  114 + </dependency>
  115 + <dependency>
  116 + <groupId>org.thingsboard.common.script</groupId>
  117 + <artifactId>remote-js-client</artifactId>
  118 + </dependency>
  119 + <dependency>
  120 + <groupId>org.thingsboard.common</groupId>
  121 + <artifactId>stats</artifactId>
  122 + </dependency>
  123 + <dependency>
  124 + <groupId>org.thingsboard.common</groupId>
  125 + <artifactId>edge-api</artifactId>
  126 + </dependency>
  127 + <dependency>
  128 + <groupId>org.thingsboard</groupId>
  129 + <artifactId>dao</artifactId>
  130 + <type>test-jar</type>
  131 + <scope>test</scope>
  132 + </dependency>
  133 + <dependency>
  134 + <groupId>io.takari.junit</groupId>
  135 + <artifactId>takari-cpsuite</artifactId>
  136 + <scope>test</scope>
  137 + </dependency>
  138 + <dependency>
  139 + <groupId>org.eclipse.paho</groupId>
  140 + <artifactId>org.eclipse.paho.client.mqttv3</artifactId>
  141 + </dependency>
  142 + <dependency>
  143 + <groupId>org.eclipse.paho</groupId>
  144 + <artifactId>org.eclipse.paho.mqttv5.client</artifactId>
  145 + </dependency>
  146 + <dependency>
  147 + <groupId>org.thingsboard</groupId>
  148 + <artifactId>ui-ngx</artifactId>
  149 + <version>${project.version}</version>
  150 + <scope>runtime</scope>
  151 + </dependency>
  152 + <dependency>
  153 + <groupId>org.springframework.integration</groupId>
  154 + <artifactId>spring-integration-redis</artifactId>
  155 + </dependency>
  156 + <dependency>
  157 + <groupId>org.springframework.boot</groupId>
  158 + <artifactId>spring-boot-starter-security</artifactId>
  159 + </dependency>
  160 + <dependency>
  161 + <groupId>org.springframework.boot</groupId>
  162 + <artifactId>spring-boot-starter-web</artifactId>
  163 + </dependency>
  164 + <dependency>
  165 + <groupId>org.springframework.boot</groupId>
  166 + <artifactId>spring-boot-starter-websocket</artifactId>
  167 + </dependency>
  168 + <dependency>
  169 + <groupId>org.springframework.security</groupId>
  170 + <artifactId>spring-security-oauth2-client</artifactId>
  171 + </dependency>
  172 + <dependency>
  173 + <groupId>org.springframework.security</groupId>
  174 + <artifactId>spring-security-oauth2-jose</artifactId>
  175 + </dependency>
  176 + <dependency>
  177 + <groupId>io.jsonwebtoken</groupId>
  178 + <artifactId>jjwt</artifactId>
  179 + </dependency>
  180 + <dependency>
  181 + <groupId>org.freemarker</groupId>
  182 + <artifactId>freemarker</artifactId>
  183 + </dependency>
  184 + <dependency>
  185 + <groupId>commons-io</groupId>
  186 + <artifactId>commons-io</artifactId>
  187 + </dependency>
  188 + <dependency>
  189 + <groupId>org.apache.commons</groupId>
  190 + <artifactId>commons-csv</artifactId>
  191 + </dependency>
  192 + <dependency>
  193 + <groupId>org.springframework</groupId>
  194 + <artifactId>spring-context-support</artifactId>
  195 + </dependency>
  196 + <dependency>
  197 + <groupId>org.slf4j</groupId>
  198 + <artifactId>slf4j-api</artifactId>
  199 + </dependency>
  200 + <dependency>
  201 + <groupId>org.slf4j</groupId>
  202 + <artifactId>log4j-over-slf4j</artifactId>
  203 + </dependency>
  204 + <dependency>
  205 + <groupId>ch.qos.logback</groupId>
  206 + <artifactId>logback-core</artifactId>
  207 + </dependency>
  208 + <dependency>
  209 + <groupId>ch.qos.logback</groupId>
  210 + <artifactId>logback-classic</artifactId>
  211 + </dependency>
  212 + <dependency>
  213 + <groupId>com.sun.mail</groupId>
  214 + <artifactId>jakarta.mail</artifactId>
  215 + </dependency>
  216 + <dependency>
  217 + <groupId>jakarta.xml.bind</groupId>
  218 + <artifactId>jakarta.xml.bind-api</artifactId>
  219 + </dependency>
  220 + <dependency>
  221 + <groupId>javax.xml.bind</groupId>
  222 + <artifactId>jaxb-api</artifactId>
  223 + </dependency>
  224 + <dependency>
  225 + <groupId>com.twilio.sdk</groupId>
  226 + <artifactId>twilio</artifactId>
  227 + </dependency>
  228 + <dependency>
  229 + <groupId>com.amazonaws</groupId>
  230 + <artifactId>aws-java-sdk-sns</artifactId>
  231 + </dependency>
  232 + <dependency>
  233 + <groupId>org.apache.curator</groupId>
  234 + <artifactId>curator-recipes</artifactId>
  235 + </dependency>
  236 + <dependency>
  237 + <groupId>com.google.protobuf</groupId>
  238 + <artifactId>protobuf-java</artifactId>
  239 + </dependency>
  240 + <dependency>
  241 + <groupId>io.netty</groupId>
  242 + <artifactId>netty-all</artifactId>
  243 + </dependency>
  244 + <dependency>
  245 + <groupId>io.netty</groupId>
  246 + <artifactId>netty-tcnative-boringssl-static</artifactId>
  247 + </dependency>
  248 + <dependency>
  249 + <groupId>io.grpc</groupId>
  250 + <artifactId>grpc-netty-shaded</artifactId>
  251 + </dependency>
  252 + <dependency>
  253 + <groupId>io.grpc</groupId>
  254 + <artifactId>grpc-protobuf</artifactId>
  255 + </dependency>
  256 + <dependency>
  257 + <groupId>io.grpc</groupId>
  258 + <artifactId>grpc-stub</artifactId>
  259 + </dependency>
  260 + <dependency>
  261 + <groupId>org.opensmpp</groupId>
  262 + <artifactId>opensmpp-core</artifactId>
  263 + </dependency>
  264 + <dependency>
  265 + <groupId>org.thingsboard</groupId>
  266 + <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
  267 + </dependency>
  268 + <dependency>
  269 + <groupId>com.sun.winsw</groupId>
  270 + <artifactId>winsw</artifactId>
  271 + <classifier>bin</classifier>
  272 + <type>exe</type>
  273 + <scope>provided</scope>
  274 + </dependency>
  275 + <dependency>
  276 + <groupId>org.thingsboard</groupId>
  277 + <artifactId>tools</artifactId>
  278 + <scope>test</scope>
  279 + </dependency>
  280 + <dependency>
  281 + <groupId>org.thingsboard</groupId>
  282 + <artifactId>rest-client</artifactId>
  283 + <scope>test</scope>
  284 + </dependency>
  285 + <dependency>
  286 + <groupId>org.springframework.security</groupId>
  287 + <artifactId>spring-security-test</artifactId>
  288 + <scope>test</scope>
  289 + </dependency>
  290 + <dependency>
  291 + <groupId>com.jayway.jsonpath</groupId>
  292 + <artifactId>json-path</artifactId>
  293 + </dependency>
  294 + <dependency>
  295 + <groupId>com.jayway.jsonpath</groupId>
  296 + <artifactId>json-path-assert</artifactId>
  297 + <scope>test</scope>
  298 + </dependency>
  299 + <dependency>
  300 + <groupId>org.springframework.boot</groupId>
  301 + <artifactId>spring-boot-starter-test</artifactId>
  302 + <scope>test</scope>
  303 + </dependency>
  304 + <dependency>
  305 + <groupId>org.junit.vintage</groupId>
  306 + <artifactId>junit-vintage-engine</artifactId>
  307 + <scope>test</scope>
  308 + </dependency>
  309 + <dependency>
  310 + <groupId>org.awaitility</groupId>
  311 + <artifactId>awaitility</artifactId>
  312 + <scope>test</scope>
  313 + </dependency>
  314 + <dependency>
  315 + <groupId>org.dbunit</groupId>
  316 + <artifactId>dbunit</artifactId>
  317 + <scope>test</scope>
  318 + </dependency>
  319 + <dependency>
  320 + <groupId>com.github.springtestdbunit</groupId>
  321 + <artifactId>spring-test-dbunit</artifactId>
  322 + <scope>test</scope>
  323 + </dependency>
  324 + <dependency>
  325 + <groupId>org.testcontainers</groupId>
  326 + <artifactId>cassandra</artifactId>
  327 + <scope>test</scope>
  328 + </dependency>
  329 + <dependency>
  330 + <groupId>org.testcontainers</groupId>
  331 + <artifactId>postgresql</artifactId>
  332 + <scope>test</scope>
  333 + </dependency>
  334 + <dependency>
  335 + <groupId>org.testcontainers</groupId>
  336 + <artifactId>jdbc</artifactId>
  337 + <scope>test</scope>
  338 + </dependency>
  339 + <dependency>
  340 + <groupId>org.javadelight</groupId>
  341 + <artifactId>delight-nashorn-sandbox</artifactId>
  342 + </dependency>
  343 + <dependency>
  344 + <groupId>org.passay</groupId>
  345 + <artifactId>passay</artifactId>
  346 + </dependency>
  347 + <dependency>
  348 + <groupId>com.github.ua-parser</groupId>
  349 + <artifactId>uap-java</artifactId>
  350 + </dependency>
  351 + <dependency>
  352 + <groupId>org.java-websocket</groupId>
  353 + <artifactId>Java-WebSocket</artifactId>
  354 + <scope>test</scope>
  355 + </dependency>
  356 + <dependency>
  357 + <groupId>org.jboss.aerogear</groupId>
  358 + <artifactId>aerogear-otp-java</artifactId>
  359 + </dependency>
  360 + <dependency>
  361 + <groupId>com.slack.api</groupId>
  362 + <artifactId>slack-api-client</artifactId>
  363 + </dependency>
  364 + <dependency>
  365 + <groupId>com.google.oauth-client</groupId>
  366 + <artifactId>google-oauth-client</artifactId>
  367 + </dependency>
  368 + <dependency>
  369 + <groupId>com.google.firebase</groupId>
  370 + <artifactId>firebase-admin</artifactId>
  371 + </dependency>
  372 + </dependencies>
  373 +
  374 + <build>
  375 + <finalName>${pkg.name}-${project.version}</finalName>
  376 + <resources>
  377 + <resource>
  378 + <directory>${project.basedir}/src/main/resources</directory>
  379 + <filtering>true</filtering>
  380 + <includes>
  381 + <include>thingsboard.yml</include>
  382 + </includes>
  383 + </resource>
  384 + <resource>
  385 + <directory>${project.basedir}/src/main/resources</directory>
  386 + <filtering>false</filtering>
  387 + <excludes>
  388 + <exclude>thingsboard.yml</exclude>
  389 + </excludes>
  390 + </resource>
  391 + </resources>
  392 + <plugins>
  393 + <plugin>
  394 + <groupId>org.apache.maven.plugins</groupId>
  395 + <artifactId>maven-compiler-plugin</artifactId>
  396 + </plugin>
  397 + <plugin>
  398 + <groupId>org.apache.maven.plugins</groupId>
  399 + <artifactId>maven-surefire-plugin</artifactId>
  400 + <configuration>
  401 + <systemPropertyVariables>
  402 + <spring.config.name>thingsboard</spring.config.name>
  403 + </systemPropertyVariables>
  404 + <excludes>
  405 + <exclude>**/nosql/*Test.java</exclude>
  406 + </excludes>
  407 + <includes>
  408 + <include>**/*Test.java</include>
  409 + <include>**/*TestSuite.java</include>
  410 + </includes>
  411 + </configuration>
  412 + </plugin>
  413 + <plugin>
  414 + <groupId>org.apache.maven.plugins</groupId>
  415 + <artifactId>maven-resources-plugin</artifactId>
  416 + </plugin>
  417 + <plugin>
  418 + <groupId>org.apache.maven.plugins</groupId>
  419 + <artifactId>maven-dependency-plugin</artifactId>
  420 + </plugin>
  421 + <plugin>
  422 + <groupId>org.apache.maven.plugins</groupId>
  423 + <artifactId>maven-jar-plugin</artifactId>
  424 + </plugin>
  425 + <plugin>
  426 + <groupId>org.springframework.boot</groupId>
  427 + <artifactId>spring-boot-maven-plugin</artifactId>
  428 + </plugin>
  429 + <plugin>
  430 + <groupId>org.thingsboard</groupId>
  431 + <artifactId>gradle-maven-plugin</artifactId>
  432 + </plugin>
  433 + <plugin>
  434 + <groupId>org.apache.maven.plugins</groupId>
  435 + <artifactId>maven-assembly-plugin</artifactId>
  436 + </plugin>
  437 + <plugin>
  438 + <groupId>org.apache.maven.plugins</groupId>
  439 + <artifactId>maven-install-plugin</artifactId>
  440 + </plugin>
  441 + <plugin>
  442 + <groupId>org.xolstice.maven.plugins</groupId>
  443 + <artifactId>protobuf-maven-plugin</artifactId>
  444 + </plugin>
  445 + <plugin>
  446 + <groupId>org.codehaus.mojo</groupId>
  447 + <artifactId>build-helper-maven-plugin</artifactId>
  448 + </plugin>
  449 + </plugins>
  450 + </build>
  451 + <repositories>
  452 + <repository>
  453 + <id>jenkins</id>
  454 + <name>Jenkins Repository</name>
  455 + <url>https://repo.jenkins-ci.org/releases</url>
  456 + <snapshots>
  457 + <enabled>false</enabled>
  458 + </snapshots>
  459 + </repository>
  460 + </repositories>
  461 +</project>
  1 +<?xml version="1.0" encoding="UTF-8" ?>
  2 +<!--
  3 +
  4 + Copyright © 2016-2024 The Thingsboard Authors
  5 +
  6 + Licensed under the Apache License, Version 2.0 (the "License");
  7 + you may not use this file except in compliance with the License.
  8 + You may obtain a copy of the License at
  9 +
  10 + http://www.apache.org/licenses/LICENSE-2.0
  11 +
  12 + Unless required by applicable law or agreed to in writing, software
  13 + distributed under the License is distributed on an "AS IS" BASIS,
  14 + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15 + See the License for the specific language governing permissions and
  16 + limitations under the License.
  17 +
  18 +-->
  19 +<!DOCTYPE configuration>
  20 +<configuration scan="true" scanPeriod="10 seconds">
  21 +
  22 + <appender name="fileLogAppender"
  23 + class="ch.qos.logback.core.rolling.RollingFileAppender">
  24 + <file>${pkg.logFolder}/${pkg.name}.log</file>
  25 + <rollingPolicy
  26 + class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
  27 + <fileNamePattern>${pkg.logFolder}/${pkg.name}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
  28 + <maxFileSize>100MB</maxFileSize>
  29 + <maxHistory>30</maxHistory>
  30 + <totalSizeCap>3GB</totalSizeCap>
  31 + </rollingPolicy>
  32 + <encoder>
  33 + <pattern>%d{ISO8601} [%thread] %-5level %logger{36} - %msg%n</pattern>
  34 + </encoder>
  35 + </appender>
  36 +
  37 + <logger name="org.thingsboard.server" level="INFO" />
  38 + <logger name="com.microsoft.azure.servicebus.primitives.CoreMessageReceiver" level="OFF" />
  39 + <logger name="org.apache.kafka.common.utils.AppInfoParser" level="WARN"/>
  40 + <logger name="org.apache.kafka.clients" level="WARN"/>
  41 +
  42 + <root level="INFO">
  43 + <appender-ref ref="fileLogAppender"/>
  44 + </root>
  45 +
  46 +</configuration>
  1 +#
  2 +# Copyright © 2016-2024 The Thingsboard Authors
  3 +#
  4 +# Licensed under the Apache License, Version 2.0 (the "License");
  5 +# you may not use this file except in compliance with the License.
  6 +# You may obtain a copy of the License at
  7 +#
  8 +# http://www.apache.org/licenses/LICENSE-2.0
  9 +#
  10 +# Unless required by applicable law or agreed to in writing, software
  11 +# distributed under the License is distributed on an "AS IS" BASIS,
  12 +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13 +# See the License for the specific language governing permissions and
  14 +# limitations under the License.
  15 +#
  16 +
  17 +export JAVA_OPTS="$JAVA_OPTS -Dplatform=@pkg.platform@ -Dinstall.data_dir=@pkg.installFolder@/data"
  18 +export JAVA_OPTS="$JAVA_OPTS -Xlog:gc*,heap*,age*,safepoint=debug:file=@pkg.logFolder@/gc.log:time,uptime,level,tags:filecount=10,filesize=10M"
  19 +export JAVA_OPTS="$JAVA_OPTS -XX:+IgnoreUnrecognizedVMOptions -XX:+HeapDumpOnOutOfMemoryError"
  20 +export JAVA_OPTS="$JAVA_OPTS -XX:-UseBiasedLocking -XX:+UseTLAB -XX:+ResizeTLAB -XX:+PerfDisableSharedMem -XX:+UseCondCardMark"
  21 +export JAVA_OPTS="$JAVA_OPTS -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:MaxTenuringThreshold=10"
  22 +export LOG_FILENAME=${pkg.name}.out
  23 +export LOADER_PATH=${pkg.installFolder}/conf,${pkg.installFolder}/extensions
  24 +export SQL_DATA_FOLDER=${pkg.installFolder}/data/sql
  1 +-----BEGIN CERTIFICATE-----
  2 +MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBh
  3 +MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
  4 +d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBH
  5 +MjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAwMDBaMGExCzAJBgNVBAYTAlVT
  6 +MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j
  7 +b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkqhkiG
  8 +9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlUyfuI
  9 +2/Ou8jqJkTx65qsGGmvPrC3oXgkkRLpimn7Wo6h+4FR1IAWsULecYxpsMNzaHxmx
  10 +1x7e/dfgy5SDN67sH0NO3Xss0r0upS/kqbitOtSZpLYl6ZtrAGCSYP9PIUkY92eQ
  11 +q2EGnI/yuum06ZIya7XzV+hdG82MHauVBJVJ8zUtluNJbd134/tJS7SsVQepj5Wz
  12 +tCO7TG1F8PapspUwtP1MVYwnSlcUfIKdzXOS0xZKBgyMUNGPHgm+F6HmIcr9g+UQ
  13 +vIOlCsRnKPZzFBQ9RnbDhxSJITRNrw9FDKZJobq7nMWxM4MphQIDAQABo0IwQDAP
  14 +BgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUTiJUIBiV
  15 +5uNu5g/6+rkS7QYXjzkwDQYJKoZIhvcNAQELBQADggEBAGBnKJRvDkhj6zHd6mcY
  16 +1Yl9PMWLSn/pvtsrF9+wX3N3KjITOYFnQoQj8kVnNeyIv/iPsGEMNKSuIEyExtv4
  17 +NeF22d+mQrvHRAiGfzZ0JFrabA0UWTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NG
  18 +Fdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBHQRFXGU7Aj64GxJUTFy8bJZ91
  19 +8rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/iyK5S9kJRaTe
  20 +pLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl
  21 +MrY=
  22 +-----END CERTIFICATE-----
  1 +{
  2 + "title": "Firmware",
  3 + "image": null,
  4 + "mobileHide": false,
  5 + "mobileOrder": null,
  6 + "configuration": {
  7 + "description": "",
  8 + "widgets": {
  9 + "cd03188e-cd9d-9601-fd57-da4cb95fc016": {
  10 + "type": "latest",
  11 + "sizeX": 7.5,
  12 + "sizeY": 6.5,
  13 + "config": {
  14 + "timewindow": {
  15 + "displayValue": "",
  16 + "selectedTab": 0,
  17 + "realtime": {
  18 + "realtimeType": 1,
  19 + "interval": 1000,
  20 + "timewindowMs": 86400000,
  21 + "quickInterval": "CURRENT_DAY"
  22 + },
  23 + "history": {
  24 + "historyType": 0,
  25 + "interval": 1000,
  26 + "timewindowMs": 60000,
  27 + "fixedTimewindow": {
  28 + "startTimeMs": 1694085363133,
  29 + "endTimeMs": 1694171763133
  30 + },
  31 + "quickInterval": "CURRENT_DAY"
  32 + },
  33 + "aggregation": {
  34 + "type": "NONE",
  35 + "limit": 200
  36 + }
  37 + },
  38 + "showTitle": true,
  39 + "backgroundColor": "rgb(255, 255, 255)",
  40 + "color": "rgba(0, 0, 0, 0.87)",
  41 + "padding": "4px",
  42 + "settings": {
  43 + "enableSearch": true,
  44 + "displayPagination": true,
  45 + "defaultPageSize": 10,
  46 + "defaultSortOrder": "entityName",
  47 + "displayEntityName": true,
  48 + "displayEntityType": false,
  49 + "enableSelectColumnDisplay": false,
  50 + "enableStickyHeader": true,
  51 + "enableStickyAction": false,
  52 + "entitiesTitle": "Devices",
  53 + "displayEntityLabel": false,
  54 + "entityNameColumnTitle": "Device"
  55 + },
  56 + "title": "New Entities table",
  57 + "dropShadow": true,
  58 + "enableFullscreen": true,
  59 + "titleStyle": {
  60 + "fontSize": "16px",
  61 + "fontWeight": 400,
  62 + "padding": "5px 10px 5px 10px"
  63 + },
  64 + "useDashboardTimewindow": false,
  65 + "showLegend": false,
  66 + "datasources": [
  67 + {
  68 + "type": "entity",
  69 + "name": null,
  70 + "entityAliasId": "639da5b4-31f0-0151-6282-c37a3897b7e8",
  71 + "filterId": "8fdb88d0-50ac-2232-fdb7-69c30c16544e",
  72 + "dataKeys": [
  73 + {
  74 + "name": "current_fw_title",
  75 + "type": "timeseries",
  76 + "label": "Current FW title",
  77 + "color": "#2196f3",
  78 + "settings": {
  79 + "columnWidth": "0px",
  80 + "useCellStyleFunction": false,
  81 + "cellStyleFunction": "",
  82 + "useCellContentFunction": false,
  83 + "defaultColumnVisibility": "visible",
  84 + "columnSelectionToDisplay": "enabled"
  85 + },
  86 + "_hash": 0.09545533885166413,
  87 + "units": null,
  88 + "decimals": null,
  89 + "funcBody": null,
  90 + "usePostProcessing": null,
  91 + "postFuncBody": null
  92 + },
  93 + {
  94 + "name": "current_fw_version",
  95 + "type": "timeseries",
  96 + "label": "Current FW version",
  97 + "color": "#4caf50",
  98 + "settings": {
  99 + "columnWidth": "0px",
  100 + "useCellStyleFunction": false,
  101 + "cellStyleFunction": "",
  102 + "useCellContentFunction": false,
  103 + "defaultColumnVisibility": "visible",
  104 + "columnSelectionToDisplay": "enabled"
  105 + },
  106 + "_hash": 0.7206056602328659,
  107 + "units": null,
  108 + "decimals": null,
  109 + "funcBody": null,
  110 + "usePostProcessing": null,
  111 + "postFuncBody": null
  112 + },
  113 + {
  114 + "name": "target_fw_title",
  115 + "type": "timeseries",
  116 + "label": "Target FW title",
  117 + "color": "#ffc107",
  118 + "settings": {
  119 + "columnWidth": "0px",
  120 + "useCellStyleFunction": false,
  121 + "cellStyleFunction": "",
  122 + "useCellContentFunction": false,
  123 + "defaultColumnVisibility": "visible",
  124 + "columnSelectionToDisplay": "enabled"
  125 + },
  126 + "_hash": 0.9934225682766313,
  127 + "units": null,
  128 + "decimals": null,
  129 + "funcBody": null,
  130 + "usePostProcessing": null,
  131 + "postFuncBody": null
  132 + },
  133 + {
  134 + "name": "target_fw_version",
  135 + "type": "timeseries",
  136 + "label": "Target FW version",
  137 + "color": "#607d8b",
  138 + "settings": {
  139 + "columnWidth": "0px",
  140 + "useCellStyleFunction": false,
  141 + "cellStyleFunction": "",
  142 + "useCellContentFunction": false,
  143 + "cellContentFunction": "",
  144 + "defaultColumnVisibility": "visible",
  145 + "columnSelectionToDisplay": "enabled"
  146 + },
  147 + "_hash": 0.5251724416842531,
  148 + "units": null,
  149 + "decimals": null,
  150 + "funcBody": null,
  151 + "usePostProcessing": null,
  152 + "postFuncBody": null
  153 + },
  154 + {
  155 + "name": "target_fw_ts",
  156 + "type": "timeseries",
  157 + "label": "Target FW set time",
  158 + "color": "#e91e63",
  159 + "settings": {
  160 + "columnWidth": "0px",
  161 + "useCellStyleFunction": false,
  162 + "cellStyleFunction": "",
  163 + "useCellContentFunction": true,
  164 + "defaultColumnVisibility": "visible",
  165 + "columnSelectionToDisplay": "enabled",
  166 + "cellContentFunction": "if (value !== '') {\n return ctx.date.transform(value, 'yyyy-MM-dd HH:mm:ss');\n}\nreturn '';"
  167 + },
  168 + "_hash": 0.31823244858578237,
  169 + "units": null,
  170 + "decimals": null,
  171 + "funcBody": null,
  172 + "usePostProcessing": null,
  173 + "postFuncBody": null
  174 + },
  175 + {
  176 + "name": "fw_state",
  177 + "type": "timeseries",
  178 + "label": "Progress",
  179 + "color": "#9c27b0",
  180 + "settings": {
  181 + "columnWidth": "30%",
  182 + "useCellStyleFunction": true,
  183 + "useCellContentFunction": true,
  184 + "defaultColumnVisibility": "visible",
  185 + "columnSelectionToDisplay": "enabled",
  186 + "cellStyleFunction": "return {\n 'padding-right': '30px'\n}",
  187 + "cellContentFunction": "if (value !== '') {\n var mapProgress = {\n 'QUEUED': 0,\n 'INITIATED': 5,\n 'DOWNLOADING': 10,\n 'DOWNLOADED': 55,\n 'VERIFIED': 60,\n 'UPDATING': 70,\n 'FAILED': 99,\n 'UPDATED': 100\n }\n var color = 'mat-primary';\n var progress = mapProgress[value];\n if (value == 'FAILED') {\n color = 'mat-accent';\n }\n return `<mat-progress-bar style=\"height: 8px\" role=\"progressbar\" aria-valuemin=\"0\" aria-valuemax=\"100\" tabindex=\"-1\" mode=\"determinate\" value=\"${progress}\" class=\"mat-progress-bar ${color}\" aria-valuenow=\"${progress}\"><div aria-hidden=\"true\"><svg width=\"100%\" height=\"8\" focusable=\"false\" class=\"mat-progress-bar-background mat-progress-bar-element\"><defs><pattern x=\"4\" y=\"0\" width=\"8\" height=\"4\" patternUnits=\"userSpaceOnUse\" id=\"mat-progress-bar-0\"><circle cx=\"2\" cy=\"2\" r=\"2\"></circle></pattern></defs><rect width=\"100%\" height=\"100%\" fill=\"url(\"/components/progress-bar/overview#mat-progress-bar-0\")\"></rect></svg><div class=\"mat-progress-bar-buffer mat-progress-bar-element\"></div><div class=\"mat-progress-bar-primary mat-progress-bar-fill mat-progress-bar-element\" style=\"transform: scale3d(${progress / 100}, 1, 1);\"></div><div class=\"mat-progress-bar-secondary mat-progress-bar-fill mat-progress-bar-element\"></div></div></mat-progress-bar>`;\n}"
  188 + },
  189 + "_hash": 0.8174211757846257,
  190 + "units": null,
  191 + "decimals": null,
  192 + "funcBody": null,
  193 + "usePostProcessing": null,
  194 + "postFuncBody": null
  195 + },
  196 + {
  197 + "name": "fw_state",
  198 + "type": "timeseries",
  199 + "label": "Status",
  200 + "color": "#f44336",
  201 + "settings": {
  202 + "columnWidth": "130px",
  203 + "useCellStyleFunction": true,
  204 + "useCellContentFunction": true,
  205 + "defaultColumnVisibility": "visible",
  206 + "columnSelectionToDisplay": "enabled",
  207 + "cellStyleFunction": "if (value == 'FAILED') {\n return {'color' : '#D93025'};\n}\nreturn {};",
  208 + "cellContentFunction": "function icon(value) {\n if (value == 'QUEUED') {\n return '<mat-icon _role=\"img\" class=\"mat-icon notranslate material-icons mat-icon-no-color\" aria-hidden=\"true\" data-mat-icon-type=\"font\" style=\"color: #000;\"><svg style=\"width:24px;height:24px\" viewBox=\"0 0 24 24\"><path fill=\"currentColor\" d=\"M6,2V8H6V8L10,12L6,16V16H6V22H18V16H18V16L14,12L18,8V8H18V2H6M16,16.5V20H8V16.5L12,12.5L16,16.5M12,11.5L8,7.5V4H16V7.5L12,11.5Z\" /></svg></mat-icon>';\n }\n if (value == 'INITIATED' || value == 'DOWNLOADING' || value == 'DOWNLOADED') {\n return '<mat-icon _role=\"img\" class=\"mat-icon notranslate material-icons mat-icon-no-color\" aria-hidden=\"true\" data-mat-icon-type=\"font\" style=\"color: #000\"><svg viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12.74 2.1951C11.63 1.2876 10.2575 0.687598 8.75 0.537598V2.0526C9.845 2.1876 10.8425 2.6226 11.675 3.2676L12.74 2.1951ZM13.9475 7.2501H15.4625C15.3125 5.7426 14.7125 4.3701 13.805 3.2601L12.7325 4.3251C13.3775 5.1576 13.8125 6.1551 13.9475 7.2501ZM12.7325 11.6751L13.805 12.7476C14.7125 11.6376 15.3125 10.2576 15.4625 8.7576H13.9475C13.8125 9.8451 13.3775 10.8426 12.7325 11.6751ZM8.75 13.9476V15.4626C10.2575 15.3126 11.63 14.7126 12.74 13.8051L11.6675 12.7326C10.8425 13.3776 9.845 13.8126 8.75 13.9476ZM8.75 8.0001V4.2501H7.25V8.0001H4.25L8 11.7501L11.75 8.0001H8.75ZM7.25 13.9476V15.4626C3.4625 15.0876 0.5 11.8926 0.5 8.0001C0.5 4.1076 3.4625 0.912598 7.25 0.537598V2.0526C4.2875 2.4201 2 4.9401 2 8.0001C2 11.0601 4.2875 13.5801 7.25 13.9476Z\" fill=\"black\"/></svg></mat-icon>';\n }\n if (value == 'VERIFIED' || value == 'UPDATING' ) {\n return '<mat-icon _role=\"img\" class=\"mat-icon notranslate material-icons mat-icon-no-color\" aria-hidden=\"true\" data-mat-icon-type=\"font\" style=\"color: #000\">update</mat-icon>';\n }\n if (value == 'UPDATED') {\n return '<mat-icon _role=\"img\" class=\"mat-icon notranslate material-icons mat-icon-no-color\" aria-hidden=\"true\" data-mat-icon-type=\"font\" style=\"color: #000\"><svg style=\"width:22px;height:22px\" viewBox=\"0 0 34 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M33.26 2.82L30.44 0L12.06 18.38L3.55999 9.9L0.73999 12.72L12.06 24.04L33.26 2.82Z\" fill=\"black\"/><path d=\"M31 28H3V32H31V28Z\" fill=\"black\"/></svg></mat-icon>';\n }\n if (value == 'FAILED') {\n return '<mat-icon _role=\"img\" class=\"mat-icon notranslate material-icons mat-icon-no-color\" aria-hidden=\"true\" data-mat-icon-type=\"font\" style=\"color: #D93025\">warning</mat-icon>';\n }\n return '';\n}\nfunction capitalize (s) {\n if (typeof s !== 'string') return '';\n return s.charAt(0).toUpperCase() + s.slice(1).toLowerCase();\n}\n\nreturn icon(value) + '<span style=\"vertical-align: super;padding-left: 8px;\">' + capitalize(value) + '</span>';"
  209 + },
  210 + "_hash": 0.7764426948615217,
  211 + "units": null,
  212 + "decimals": null,
  213 + "funcBody": null,
  214 + "usePostProcessing": null,
  215 + "postFuncBody": null
  216 + },
  217 + {
  218 + "name": "fw_checksum",
  219 + "type": "attribute",
  220 + "label": "fw_checksum",
  221 + "color": "#3f51b5",
  222 + "settings": {
  223 + "columnWidth": "0px",
  224 + "useCellStyleFunction": false,
  225 + "cellStyleFunction": "",
  226 + "useCellContentFunction": false,
  227 + "defaultColumnVisibility": "hidden",
  228 + "columnSelectionToDisplay": "disabled"
  229 + },
  230 + "_hash": 0.5594087842471693,
  231 + "units": null,
  232 + "decimals": null,
  233 + "funcBody": null,
  234 + "usePostProcessing": null,
  235 + "postFuncBody": null
  236 + },
  237 + {
  238 + "name": "fw_url",
  239 + "type": "attribute",
  240 + "label": "fw_url",
  241 + "color": "#e91e63",
  242 + "settings": {
  243 + "columnWidth": "0px",
  244 + "useCellStyleFunction": false,
  245 + "cellStyleFunction": "",
  246 + "useCellContentFunction": false,
  247 + "cellContentFunction": "",
  248 + "defaultColumnVisibility": "hidden",
  249 + "columnSelectionToDisplay": "disabled"
  250 + },
  251 + "_hash": 0.4204673738685043,
  252 + "units": null,
  253 + "decimals": null,
  254 + "funcBody": null,
  255 + "usePostProcessing": null,
  256 + "postFuncBody": null
  257 + }
  258 + ]
  259 + }
  260 + ],
  261 + "actions": {
  262 + "actionCellButton": [
  263 + {
  264 + "name": "History firmware update",
  265 + "icon": "history",
  266 + "type": "openDashboardState",
  267 + "targetDashboardStateId": "device_firmware_history",
  268 + "setEntityId": true,
  269 + "stateEntityParamName": null,
  270 + "openInSeparateDialog": false,
  271 + "dialogTitle": "",
  272 + "dialogHideDashboardToolbar": true,
  273 + "dialogWidth": null,
  274 + "dialogHeight": null,
  275 + "openRightLayout": false,
  276 + "id": "98a1406c-3301-bc2f-2c5d-d637ce3b663b"
  277 + },
  278 + {
  279 + "name": "Edit firmware",
  280 + "icon": "edit",
  281 + "type": "customPretty",
  282 + "customHtml": "<form #editEntityForm=\"ngForm\" [formGroup]=\"editEntityFormGroup\"\n (ngSubmit)=\"save()\" class=\"edit-entity-form\">\n <mat-toolbar fxLayout=\"row\" color=\"primary\">\n <h2>Edit firmware {{entityName}}</h2>\n <span fxFlex></span>\n <button mat-icon-button (click)=\"cancel()\" type=\"button\">\n <mat-icon class=\"material-icons\">close</mat-icon>\n </button>\n </mat-toolbar>\n <mat-progress-bar color=\"warn\" mode=\"indeterminate\" *ngIf=\"isLoading$ | async\">\n </mat-progress-bar>\n <div style=\"height: 4px;\" *ngIf=\"!(isLoading$ | async)\"></div>\n <div *ngIf=\"entity.deviceProfileId\" mat-dialog-content fxLayout=\"column\">\n <tb-ota-package-autocomplete\n [useFullEntityId]=\"true\"\n [deviceProfileId]=\"entity.deviceProfileId.id\"\n formControlName=\"firmwareId\">\n </tb-ota-package-autocomplete>\n </div>\n <div mat-dialog-actions fxLayout=\"row\" fxLayoutAlign=\"end center\">\n <button mat-button color=\"primary\"\n type=\"button\"\n [disabled]=\"(isLoading$ | async)\"\n (click)=\"cancel()\" cdkFocusInitial>\n Cancel\n </button>\n <button mat-button mat-raised-button color=\"primary\"\n type=\"submit\"\n [disabled]=\"(isLoading$ | async) || editEntityForm.invalid || !editEntityForm.dirty\">\n Save\n </button>\n </div>\n</form>",
  283 + "customCss": "form {\n min-width: 300px !important;\n}",
  284 + "customFunction": "let $injector = widgetContext.$scope.$injector;\nlet customDialog = $injector.get(widgetContext.servicesMap.get('customDialog'));\nlet entityService = $injector.get(widgetContext.servicesMap.get('entityService'));\nlet deviceService = $injector.get(widgetContext.servicesMap.get('deviceService'));\n\nopenEditEntityDialog();\n\nfunction openEditEntityDialog() {\n customDialog.customDialog(htmlTemplate, EditEntityDialogController).subscribe();\n}\n\nfunction EditEntityDialogController(instance) {\n let vm = instance;\n\n vm.entityName = entityName;\n vm.entity = {};\n\n vm.editEntityFormGroup = vm.fb.group({\n firmwareId: [null]\n });\n\n getEntityInfo();\n\n vm.cancel = function() {\n vm.dialogRef.close(null);\n };\n\n vm.save = function() {\n vm.editEntityFormGroup.markAsPristine();\n saveEntity().subscribe(\n function () {\n // widgetContext.updateAliases();\n vm.dialogRef.close(null);\n }\n );\n };\n\n\n function getEntityInfo() {\n entityService.getEntity(entityId.entityType, entityId.id).subscribe(\n function (data) {\n vm.entity = data;\n vm.editEntityFormGroup.patchValue({\n firmwareId: vm.entity.firmwareId\n }, {emitEvent: false});\n }\n );\n }\n\n function saveEntity() {\n const formValues = vm.editEntityFormGroup.value;\n vm.entity.firmwareId = formValues.firmwareId;\n return deviceService.saveDevice(vm.entity);\n }\n}",
  285 + "customResources": [],
  286 + "id": "23099c1d-454b-25dc-8bc0-7cf33c21c5d5"
  287 + },
  288 + {
  289 + "name": "Download firmware",
  290 + "icon": "file_download",
  291 + "type": "custom",
  292 + "customFunction": "let $injector = widgetContext.$scope.$injector;\nlet entityService = $injector.get(widgetContext.servicesMap.get('entityService'));\nlet otaPackageService = $injector.get(widgetContext.servicesMap.get('otaPackageService'));\nlet deviceProfileService = $injector.get(widgetContext.servicesMap.get('deviceProfileService'));\n\ngetDeviceFirmware();\n\nfunction getDeviceFirmware() {\n var entityIdValue = entityId.id;\n var data = widgetContext.data.find((el) => el.datasource.entityId === entityIdValue && el.dataKey.name === 'fw_url');\n var url = data.data[0][1];\n if (url === '') {\n entityService.getEntity(entityId.entityType, entityId.id).subscribe(\n function (data) {\n if (data.firmwareId !== null) {\n otaPackageService.downloadOtaPackage(data.firmwareId.id).subscribe(); \n } else {\n deviceProfileService.getDeviceProfile(data.deviceProfileId.id).subscribe(\n function (deviceProfile) {\n if (deviceProfile.firmwareId !== null) {\n otaPackageService.downloadOtaPackage(deviceProfile.firmwareId.id).subscribe();\n } else {\n widgetContext.showToast('warn', 'Device ' + entityName +' has not firmware set.', 2000, 'top');\n }\n });\n }\n }\n );\n } else {\n widgetContext.showToast('warn', 'Device ' + entityName +' has not firmware set.', 2000, 'top');\n }\n}",
  293 + "id": "12533058-42f6-e75f-620c-219c48d01ec0"
  294 + },
  295 + {
  296 + "name": "Copy checksum/URL",
  297 + "icon": "content_copy",
  298 + "type": "custom",
  299 + "customFunction": "function copyToClipboard(text) {\n if (window.clipboardData && window.clipboardData.setData) {\n return window.clipboardData.setData(\"Text\", text);\n\n }\n else if (document.queryCommandSupported && document.queryCommandSupported(\"copy\")) {\n var textarea = document.createElement(\"textarea\");\n textarea.textContent = text;\n textarea.style.position = \"fixed\";\n document.body.appendChild(textarea);\n textarea.select();\n try {\n return document.execCommand(\"copy\");\n }\n catch (ex) {\n console.warn(\"Copy to clipboard failed.\", ex);\n return false;\n }\n document.body.removeChild(textarea);\n }\n}\nvar entityIdValue = entityId.id;\nvar data = widgetContext.data.find((el) => el.datasource.entityId === entityIdValue && el.dataKey.name === 'fw_checksum');\nvar checksum = data.data[0][1];\nif (checksum !== '') {\n copyToClipboard(checksum);\n widgetContext.showSuccessToast('Firmware checksum has been copied to clipboard', 2000, 'top');\n} else {\n data = widgetContext.data.find((el) => el.datasource.entityId === entityIdValue && el.dataKey.name === 'fw_url');\n var url = data.data[0][1];\n if (url !== '') {\n copyToClipboard(url);\n widgetContext.showSuccessToast('Firmware direct URL has been copied to clipboard', 2000, 'top');\n } else {\n widgetContext.showToast('warn', 'Device ' + entityName +' has not firmware set.', 2000, 'top');\n }\n}",
  300 + "id": "09323079-7111-87f7-90d1-c62cd7d85dc7"
  301 + }
  302 + ]
  303 + },
  304 + "showTitleIcon": false,
  305 + "iconColor": "rgba(0, 0, 0, 0.87)",
  306 + "iconSize": "24px",
  307 + "titleTooltip": "",
  308 + "widgetStyle": {}
  309 + },
  310 + "row": 0,
  311 + "col": 0,
  312 + "id": "cd03188e-cd9d-9601-fd57-da4cb95fc016",
  313 + "typeFullFqn": "system.cards.entities_table"
  314 + },
  315 + "100b756c-0082-6505-3ae1-3603e6deea48": {
  316 + "type": "timeseries",
  317 + "sizeX": 8,
  318 + "sizeY": 6.5,
  319 + "config": {
  320 + "datasources": [
  321 + {
  322 + "type": "entity",
  323 + "name": null,
  324 + "entityAliasId": "19f41c21-d9af-e666-8f50-e1748778f955",
  325 + "filterId": null,
  326 + "dataKeys": [
  327 + {
  328 + "name": "current_fw_title",
  329 + "type": "timeseries",
  330 + "label": "Current firmware title",
  331 + "color": "#2196f3",
  332 + "settings": {
  333 + "useCellStyleFunction": false,
  334 + "cellStyleFunction": "",
  335 + "useCellContentFunction": false,
  336 + "cellContentFunction": ""
  337 + },
  338 + "_hash": 0.5978079905579401,
  339 + "units": null,
  340 + "decimals": null,
  341 + "funcBody": null,
  342 + "usePostProcessing": null,
  343 + "postFuncBody": null
  344 + },
  345 + {
  346 + "name": "current_fw_version",
  347 + "type": "timeseries",
  348 + "label": "Current firmware version",
  349 + "color": "#4caf50",
  350 + "settings": {
  351 + "useCellStyleFunction": false,
  352 + "cellStyleFunction": "",
  353 + "useCellContentFunction": false,
  354 + "cellContentFunction": ""
  355 + },
  356 + "_hash": 0.027392025058568192,
  357 + "units": null,
  358 + "decimals": null,
  359 + "funcBody": null,
  360 + "usePostProcessing": null,
  361 + "postFuncBody": null
  362 + },
  363 + {
  364 + "name": "target_fw_title",
  365 + "type": "timeseries",
  366 + "label": "Target firmware title",
  367 + "color": "#f44336",
  368 + "settings": {
  369 + "useCellStyleFunction": false,
  370 + "cellStyleFunction": "",
  371 + "useCellContentFunction": false,
  372 + "cellContentFunction": ""
  373 + },
  374 + "_hash": 0.9496350796287059,
  375 + "units": null,
  376 + "decimals": null,
  377 + "funcBody": null,
  378 + "usePostProcessing": null,
  379 + "postFuncBody": null
  380 + },
  381 + {
  382 + "name": "target_fw_version",
  383 + "type": "timeseries",
  384 + "label": "Target firmware version",
  385 + "color": "#ffc107",
  386 + "settings": {
  387 + "useCellStyleFunction": false,
  388 + "cellStyleFunction": "",
  389 + "useCellContentFunction": false,
  390 + "cellContentFunction": ""
  391 + },
  392 + "_hash": 0.6734152252264187,
  393 + "units": null,
  394 + "decimals": null,
  395 + "funcBody": null,
  396 + "usePostProcessing": null,
  397 + "postFuncBody": null
  398 + },
  399 + {
  400 + "name": "fw_state",
  401 + "type": "timeseries",
  402 + "label": "Status",
  403 + "color": "#607d8b",
  404 + "settings": {
  405 + "useCellStyleFunction": false,
  406 + "cellStyleFunction": "",
  407 + "useCellContentFunction": false,
  408 + "cellContentFunction": ""
  409 + },
  410 + "_hash": 0.2983399718643074,
  411 + "units": null,
  412 + "decimals": null,
  413 + "funcBody": null,
  414 + "usePostProcessing": true,
  415 + "postFuncBody": "function capitalize (s) {\n if (typeof s !== 'string') return '';\n return s.charAt(0).toUpperCase() + s.slice(1).toLowerCase();\n}\nif (value !== '') {\n return capitalize(value);\n}\nreturn value;"
  416 + }
  417 + ]
  418 + }
  419 + ],
  420 + "timewindow": {
  421 + "hideInterval": false,
  422 + "hideAggregation": false,
  423 + "hideAggInterval": false,
  424 + "hideTimezone": false,
  425 + "selectedTab": 0,
  426 + "realtime": {
  427 + "realtimeType": 0,
  428 + "timewindowMs": 2592000000,
  429 + "quickInterval": "CURRENT_DAY",
  430 + "interval": 1000
  431 + },
  432 + "aggregation": {
  433 + "type": "NONE",
  434 + "limit": 200
  435 + }
  436 + },
  437 + "showTitle": false,
  438 + "backgroundColor": "rgb(255, 255, 255)",
  439 + "color": "rgba(0, 0, 0, 0.87)",
  440 + "padding": "8px",
  441 + "settings": {
  442 + "showTimestamp": true,
  443 + "displayPagination": true,
  444 + "defaultPageSize": 10,
  445 + "enableSearch": true,
  446 + "enableStickyHeader": true,
  447 + "enableStickyAction": true
  448 + },
  449 + "title": "Firmware history",
  450 + "dropShadow": false,
  451 + "enableFullscreen": false,
  452 + "titleStyle": {
  453 + "fontSize": "16px",
  454 + "fontWeight": 400,
  455 + "padding": "5px 10px 5px 10px"
  456 + },
  457 + "useDashboardTimewindow": false,
  458 + "showLegend": false,
  459 + "widgetStyle": {},
  460 + "actions": {},
  461 + "showTitleIcon": false,
  462 + "iconColor": "rgba(0, 0, 0, 0.87)",
  463 + "iconSize": "24px",
  464 + "displayTimewindow": true,
  465 + "titleTooltip": ""
  466 + },
  467 + "row": 0,
  468 + "col": 0,
  469 + "id": "100b756c-0082-6505-3ae1-3603e6deea48",
  470 + "typeFullFqn": "system.cards.timeseries_table"
  471 + },
  472 + "17543c57-af4a-2c1e-bf12-53a7b46791e6": {
  473 + "type": "latest",
  474 + "sizeX": 8,
  475 + "sizeY": 3,
  476 + "config": {
  477 + "datasources": [
  478 + {
  479 + "type": "entityCount",
  480 + "name": "",
  481 + "entityAliasId": "639da5b4-31f0-0151-6282-c37a3897b7e8",
  482 + "filterId": "19a0ad1c-b31d-4a29-9d7b-5d87e2a8ea6e",
  483 + "dataKeys": [
  484 + {
  485 + "name": "count",
  486 + "type": "count",
  487 + "label": "waitingDevicesNumber",
  488 + "color": "#4caf50",
  489 + "settings": {},
  490 + "_hash": 0.7404827038869322,
  491 + "units": null,
  492 + "decimals": null,
  493 + "funcBody": null,
  494 + "usePostProcessing": null,
  495 + "postFuncBody": null
  496 + }
  497 + ]
  498 + }
  499 + ],
  500 + "timewindow": {
  501 + "displayValue": "",
  502 + "selectedTab": 0,
  503 + "realtime": {
  504 + "realtimeType": 1,
  505 + "interval": 1000,
  506 + "timewindowMs": 60000,
  507 + "quickInterval": "CURRENT_DAY"
  508 + },
  509 + "history": {
  510 + "historyType": 0,
  511 + "interval": 1000,
  512 + "timewindowMs": 60000,
  513 + "fixedTimewindow": {
  514 + "startTimeMs": 1694085363133,
  515 + "endTimeMs": 1694171763133
  516 + },
  517 + "quickInterval": "CURRENT_DAY"
  518 + },
  519 + "aggregation": {
  520 + "type": "AVG",
  521 + "limit": 25000
  522 + }
  523 + },
  524 + "showTitle": false,
  525 + "backgroundColor": "#fff",
  526 + "color": "rgba(0, 0, 0, 0.87)",
  527 + "padding": "0px",
  528 + "settings": {
  529 + "cardHtml": "<div class='card' id=\"activeDevices\">\n <div class='content' id=\"activeDevices\">\n <img id=\"activeDevices\" src='data:image/svg+xml;utf8,<svg width=\"24\" height=\"40\" viewBox=\"0 0 24 40\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M0 0V12H0.0200005L0 12.02L8 20L0 28L0.0200005 28.02H0V40H24V28.02H23.98L24 28L16 20L24 12.02L23.98 12H24V0H0ZM20 29V36H4V29L12 21L20 29ZM12 19L4 11V4H20V11L12 19Z\" fill=\"black\"/>\n</svg>\n'>\n <div class='value' id=\"activeDevices\">\n ${waitingDevicesNumber:0}\n </div> \n <div class='description' id=\"activeDevices\">\n Device Waiting\n </div>\n </div>\n</div>",
  530 + "cardCss": ".card {\n width: 100%;\n height: 100%;\n border: 1px solid #E0E0E0;\n box-sizing: border-box;\n}\n\n.card .content {\n padding: 20px 10px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 100%;\n box-sizing: border-box;\n}\n\n.card .value {\n margin: 18px 0 5px;\n font-weight: 500;\n font-size: 3em;\n line-height: 1.1em;\n text-align: center;\n letter-spacing: -0.02em;\n color: #333333;\n}\n\n.card .description {\n font-size: 1em;\n line-height: 1.1em;\n color: #000000;\n opacity: 0.6;\n text-align: center;\n letter-spacing: -0.02em;\n}\n\n@media (min-width: 960px) and (max-width: 1200px) {\n .card .content img {\n height: 28px; \n }\n \n .card .value {\n margin: 12px 0 5px;\n font-size: 2em;\n line-height: 1;\n }\n \n .card .description {\n font-size: 0.8em;\n line-height: 1;\n }\n}"
  531 + },
  532 + "title": "New HTML Value Card",
  533 + "dropShadow": true,
  534 + "enableFullscreen": false,
  535 + "widgetStyle": {},
  536 + "titleStyle": {
  537 + "fontSize": "16px",
  538 + "fontWeight": 400
  539 + },
  540 + "useDashboardTimewindow": true,
  541 + "showLegend": false,
  542 + "actions": {
  543 + "elementClick": [
  544 + {
  545 + "name": "activeDevices",
  546 + "icon": "more_horiz",
  547 + "type": "openDashboardState",
  548 + "targetDashboardStateId": "device_waiting",
  549 + "setEntityId": false,
  550 + "stateEntityParamName": null,
  551 + "openInSeparateDialog": false,
  552 + "dialogTitle": "",
  553 + "dialogHideDashboardToolbar": true,
  554 + "dialogWidth": null,
  555 + "dialogHeight": null,
  556 + "openRightLayout": false,
  557 + "id": "4d9a77a2-f0a5-690c-a83b-b0e940be788c"
  558 + }
  559 + ]
  560 + },
  561 + "showTitleIcon": false,
  562 + "titleIcon": null,
  563 + "iconColor": "rgba(0, 0, 0, 0.87)",
  564 + "iconSize": "24px",
  565 + "titleTooltip": "",
  566 + "enableDataExport": false,
  567 + "displayTimewindow": true
  568 + },
  569 + "id": "17543c57-af4a-2c1e-bf12-53a7b46791e6",
  570 + "typeFullFqn": "system.cards.html_value_card"
  571 + },
  572 + "6c1c4e1a-bce0-f5ad-ff8b-ba1dfc5a4ec6": {
  573 + "type": "latest",
  574 + "sizeX": 8,
  575 + "sizeY": 3,
  576 + "config": {
  577 + "datasources": [
  578 + {
  579 + "type": "entityCount",
  580 + "name": "",
  581 + "entityAliasId": "639da5b4-31f0-0151-6282-c37a3897b7e8",
  582 + "filterId": "579f0468-9ce9-7e3e-b34c-88dd3de59897",
  583 + "dataKeys": [
  584 + {
  585 + "name": "count",
  586 + "type": "count",
  587 + "label": "updatingDevicesNumber",
  588 + "color": "#4caf50",
  589 + "settings": {},
  590 + "_hash": 0.7404827038869322,
  591 + "units": null,
  592 + "decimals": null,
  593 + "funcBody": null,
  594 + "usePostProcessing": null,
  595 + "postFuncBody": null
  596 + }
  597 + ]
  598 + }
  599 + ],
  600 + "timewindow": {
  601 + "displayValue": "",
  602 + "selectedTab": 0,
  603 + "realtime": {
  604 + "realtimeType": 1,
  605 + "interval": 1000,
  606 + "timewindowMs": 60000,
  607 + "quickInterval": "CURRENT_DAY"
  608 + },
  609 + "history": {
  610 + "historyType": 0,
  611 + "interval": 1000,
  612 + "timewindowMs": 60000,
  613 + "fixedTimewindow": {
  614 + "startTimeMs": 1694085363133,
  615 + "endTimeMs": 1694171763133
  616 + },
  617 + "quickInterval": "CURRENT_DAY"
  618 + },
  619 + "aggregation": {
  620 + "type": "AVG",
  621 + "limit": 25000
  622 + }
  623 + },
  624 + "showTitle": false,
  625 + "backgroundColor": "#fff",
  626 + "color": "rgba(0, 0, 0, 0.87)",
  627 + "padding": "0px",
  628 + "settings": {
  629 + "cardHtml": "<div class='card' id=\"activeDevices\">\n <div class='content' id=\"activeDevices\">\n <img id=\"activeDevices\" src='data:image/svg+xml;utf8,<svg width=\"36\" height=\"36\" viewBox=\"0 0 36 36\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M36 14.24H22.44L27.92 8.6C22.46 3.2 13.62 3 8.16001 8.4C2.70001 13.82 2.70001 22.56 8.16001 27.98C13.62 33.4 22.46 33.4 27.92 27.98C30.64 25.3 32 22.16 32 18.2H36C36 22.16 34.24 27.3 30.72 30.78C23.7 37.74 12.3 37.74 5.28001 30.78C-1.71999 23.84 -1.77999 12.56 5.24001 5.62C12.26 -1.32 23.52 -1.32 30.54 5.62L36 0V14.24ZM19 10V18.5L26 22.66L24.56 25.08L16 20V10H19Z\" fill=\"black\"/>\n</svg>'>\n <div class='value' id=\"activeDevices\">\n ${updatingDevicesNumber:0}\n </div> \n <div class='description' id=\"activeDevices\">\n Device Updating\n </div>\n </div>\n</div>",
  630 + "cardCss": ".card {\n width: 100%;\n height: 100%;\n border: 1px solid #E0E0E0;\n box-sizing: border-box;\n}\n\n.card .content {\n padding: 20px 10px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 100%;\n box-sizing: border-box;\n}\n\n.card .value {\n margin: 18px 0 5px;\n font-weight: 500;\n font-size: 3em;\n line-height: 1.1em;\n text-align: center;\n letter-spacing: -0.02em;\n color: #333333;\n}\n\n.card .description {\n font-size: 1em;\n line-height: 1.1em;\n color: #000000;\n opacity: 0.6;\n text-align: center;\n letter-spacing: -0.02em;\n}\n\n@media (min-width: 960px) and (max-width: 1200px) {\n .card .content img {\n height: 28px; \n }\n \n .card .value {\n margin: 12px 0 5px;\n font-size: 2em;\n line-height: 1;\n }\n \n .card .description {\n font-size: 0.8em;\n line-height: 1;\n }\n}"
  631 + },
  632 + "title": "New HTML Value Card",
  633 + "dropShadow": true,
  634 + "enableFullscreen": false,
  635 + "widgetStyle": {},
  636 + "titleStyle": {
  637 + "fontSize": "16px",
  638 + "fontWeight": 400
  639 + },
  640 + "useDashboardTimewindow": true,
  641 + "showLegend": false,
  642 + "actions": {
  643 + "elementClick": [
  644 + {
  645 + "name": "activeDevices",
  646 + "icon": "more_horiz",
  647 + "type": "openDashboardState",
  648 + "targetDashboardStateId": "device_updating",
  649 + "setEntityId": false,
  650 + "stateEntityParamName": null,
  651 + "openInSeparateDialog": false,
  652 + "dialogTitle": "",
  653 + "dialogHideDashboardToolbar": true,
  654 + "dialogWidth": null,
  655 + "dialogHeight": null,
  656 + "openRightLayout": false,
  657 + "id": "57d39904-2350-b29b-78ed-56b8268814cb"
  658 + }
  659 + ]
  660 + },
  661 + "showTitleIcon": false,
  662 + "titleIcon": null,
  663 + "iconColor": "rgba(0, 0, 0, 0.87)",
  664 + "iconSize": "24px",
  665 + "titleTooltip": "",
  666 + "enableDataExport": false,
  667 + "displayTimewindow": true
  668 + },
  669 + "id": "6c1c4e1a-bce0-f5ad-ff8b-ba1dfc5a4ec6",
  670 + "typeFullFqn": "system.cards.html_value_card"
  671 + },
  672 + "e6674227-9cf3-a2f6-ecac-5ccfc38a3c81": {
  673 + "type": "latest",
  674 + "sizeX": 8,
  675 + "sizeY": 3,
  676 + "config": {
  677 + "datasources": [
  678 + {
  679 + "type": "entityCount",
  680 + "name": "",
  681 + "entityAliasId": "639da5b4-31f0-0151-6282-c37a3897b7e8",
  682 + "filterId": "6044e198-df64-cd76-f339-696f220c4943",
  683 + "dataKeys": [
  684 + {
  685 + "name": "count",
  686 + "type": "count",
  687 + "label": "updatedDevicesNumber",
  688 + "color": "#4caf50",
  689 + "settings": {},
  690 + "_hash": 0.7404827038869322,
  691 + "units": null,
  692 + "decimals": null,
  693 + "funcBody": null,
  694 + "usePostProcessing": null,
  695 + "postFuncBody": null
  696 + }
  697 + ]
  698 + }
  699 + ],
  700 + "timewindow": {
  701 + "displayValue": "",
  702 + "selectedTab": 0,
  703 + "realtime": {
  704 + "realtimeType": 1,
  705 + "interval": 1000,
  706 + "timewindowMs": 60000,
  707 + "quickInterval": "CURRENT_DAY"
  708 + },
  709 + "history": {
  710 + "historyType": 0,
  711 + "interval": 1000,
  712 + "timewindowMs": 60000,
  713 + "fixedTimewindow": {
  714 + "startTimeMs": 1694085363133,
  715 + "endTimeMs": 1694171763133
  716 + },
  717 + "quickInterval": "CURRENT_DAY"
  718 + },
  719 + "aggregation": {
  720 + "type": "AVG",
  721 + "limit": 25000
  722 + }
  723 + },
  724 + "showTitle": false,
  725 + "backgroundColor": "#fff",
  726 + "color": "rgba(0, 0, 0, 0.87)",
  727 + "padding": "0px",
  728 + "settings": {
  729 + "cardHtml": "<div class='card' id=\"activeDevices\">\n <div class='content' id=\"activeDevices\">\n <img id=\"activeDevices\" src='data:image/svg+xml;utf8,<svg width=\"34\" height=\"32\" viewBox=\"0 0 34 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M33.26 2.82L30.44 0L12.06 18.38L3.55999 9.9L0.73999 12.72L12.06 24.04L33.26 2.82Z\" fill=\"black\"/>\n<path d=\"M31 28H3V32H31V28Z\" fill=\"black\"/>\n</svg>'>\n <div class='value' id=\"activeDevices\">\n ${updatedDevicesNumber:0}\n </div> \n <div class='description' id=\"activeDevices\">\n Device Updated\n </div>\n </div>\n</div>",
  730 + "cardCss": ".card {\n width: 100%;\n height: 100%;\n border: 1px solid #E0E0E0;\n box-sizing: border-box;\n}\n\n.card .content {\n padding: 20px 10px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 100%;\n box-sizing: border-box;\n}\n\n.card .value {\n margin: 18px 0 5px;\n font-weight: 500;\n font-size: 3em;\n line-height: 1.1em;\n text-align: center;\n letter-spacing: -0.02em;\n color: #333333;\n}\n\n.card .description {\n font-size: 1em;\n line-height: 1.1em;\n color: #000000;\n opacity: 0.6;\n text-align: center;\n letter-spacing: -0.02em;\n}\n\n@media (min-width: 960px) and (max-width: 1200px) {\n .card .content img {\n height: 28px; \n }\n \n .card .value {\n margin: 12px 0 5px;\n font-size: 2em;\n line-height: 1;\n }\n \n .card .description {\n font-size: 0.8em;\n line-height: 1;\n }\n}"
  731 + },
  732 + "title": "New HTML Value Card",
  733 + "dropShadow": true,
  734 + "enableFullscreen": false,
  735 + "widgetStyle": {},
  736 + "titleStyle": {
  737 + "fontSize": "16px",
  738 + "fontWeight": 400
  739 + },
  740 + "useDashboardTimewindow": true,
  741 + "showLegend": false,
  742 + "actions": {
  743 + "elementClick": [
  744 + {
  745 + "name": "activeDevices",
  746 + "icon": "more_horiz",
  747 + "type": "openDashboardState",
  748 + "targetDashboardStateId": "device_updated",
  749 + "setEntityId": false,
  750 + "stateEntityParamName": null,
  751 + "openInSeparateDialog": false,
  752 + "dialogTitle": "",
  753 + "dialogHideDashboardToolbar": true,
  754 + "dialogWidth": null,
  755 + "dialogHeight": null,
  756 + "openRightLayout": false,
  757 + "id": "d787c212-8c56-34f0-349a-5aae2ffd1eae"
  758 + }
  759 + ]
  760 + },
  761 + "showTitleIcon": false,
  762 + "titleIcon": null,
  763 + "iconColor": "rgba(0, 0, 0, 0.87)",
  764 + "iconSize": "24px",
  765 + "titleTooltip": "",
  766 + "enableDataExport": false,
  767 + "displayTimewindow": true
  768 + },
  769 + "id": "e6674227-9cf3-a2f6-ecac-5ccfc38a3c81",
  770 + "typeFullFqn": "system.cards.html_value_card"
  771 + },
  772 + "77b10144-b904-edd5-8c7c-8fb75616c6d8": {
  773 + "type": "latest",
  774 + "sizeX": 8,
  775 + "sizeY": 3,
  776 + "config": {
  777 + "datasources": [
  778 + {
  779 + "type": "entityCount",
  780 + "name": "",
  781 + "entityAliasId": "639da5b4-31f0-0151-6282-c37a3897b7e8",
  782 + "filterId": "bdbc6ea1-95a7-3912-341a-58dc7704a00f",
  783 + "dataKeys": [
  784 + {
  785 + "name": "count",
  786 + "type": "count",
  787 + "label": "updatingDevicesNumber",
  788 + "color": "#4caf50",
  789 + "settings": {},
  790 + "_hash": 0.7404827038869322,
  791 + "units": null,
  792 + "decimals": null,
  793 + "funcBody": null,
  794 + "usePostProcessing": null,
  795 + "postFuncBody": null
  796 + }
  797 + ]
  798 + }
  799 + ],
  800 + "timewindow": {
  801 + "displayValue": "",
  802 + "selectedTab": 0,
  803 + "realtime": {
  804 + "realtimeType": 1,
  805 + "interval": 1000,
  806 + "timewindowMs": 60000,
  807 + "quickInterval": "CURRENT_DAY"
  808 + },
  809 + "history": {
  810 + "historyType": 0,
  811 + "interval": 1000,
  812 + "timewindowMs": 60000,
  813 + "fixedTimewindow": {
  814 + "startTimeMs": 1694085363133,
  815 + "endTimeMs": 1694171763133
  816 + },
  817 + "quickInterval": "CURRENT_DAY"
  818 + },
  819 + "aggregation": {
  820 + "type": "AVG",
  821 + "limit": 25000
  822 + }
  823 + },
  824 + "showTitle": false,
  825 + "backgroundColor": "#fff",
  826 + "color": "rgba(0, 0, 0, 0.87)",
  827 + "padding": "0px",
  828 + "settings": {
  829 + "cardHtml": "<div class='card' id=\"activeDevices\">\n <div class='content' id=\"activeDevices\">\n <div class=\"container-svg\" id=\"activeDevices\">\n <svg viewBox=\"0 0 24 24\" id=\"activeDevices\">\n <path id=\"activeDevices\" fill=\"currentColor\" d=\"M13 14H11V9H13M13 18H11V16H13M1 21H23L12 2L1 21Z\" />\n </svg>\n </div>\n <div class='value error_firmware_failed_count' id=\"activeDevices\">\n ${updatingDevicesNumber:0}\n </div> \n <script type=\"text/javascript\">\n function init() {\n var counter = $('.error_firmware_failed_count');\n var value = +counter.text();\n if(value) {\n counter.css('color', '#D93025');\n }\n };\n init();\n </script>\n <div class='description' id=\"activeDevices\">\n Device Failed\n </div>\n </div>\n</div>",
  830 + "cardCss": ".card {\n width: 100%;\n height: 100%;\n border: 1px solid #E0E0E0;\n box-sizing: border-box;\n}\n\n.card .content {\n padding: 20px 10px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 100%;\n box-sizing: border-box;\n}\n\n.card .container-svg {\n height: 40px;\n width: 40px;\n}\n\n.card .value {\n margin: 18px 0 5px;\n font-weight: 500;\n font-size: 3em;\n line-height: 1.1em;\n text-align: center;\n letter-spacing: -0.02em;\n color: #333333;\n}\n\n.card .description {\n font-size: 1em;\n line-height: 1.1em;\n color: #000000;\n opacity: 0.6;\n text-align: center;\n letter-spacing: -0.02em;\n}\n\n@media (min-width: 960px) and (max-width: 1200px) {\n .card .container-svg {\n height: 28px;\n width: 28px;\n }\n \n .card .value {\n margin: 12px 0 5px;\n font-size: 2em;\n line-height: 1;\n }\n \n .card .description {\n font-size: 0.8em;\n line-height: 1;\n }\n}"
  831 + },
  832 + "title": "New HTML Value Card",
  833 + "dropShadow": true,
  834 + "enableFullscreen": false,
  835 + "widgetStyle": {},
  836 + "titleStyle": {
  837 + "fontSize": "16px",
  838 + "fontWeight": 400
  839 + },
  840 + "useDashboardTimewindow": true,
  841 + "showLegend": false,
  842 + "actions": {
  843 + "elementClick": [
  844 + {
  845 + "name": "activeDevices",
  846 + "icon": "more_horiz",
  847 + "type": "openDashboardState",
  848 + "targetDashboardStateId": "device_error",
  849 + "setEntityId": false,
  850 + "stateEntityParamName": null,
  851 + "openInSeparateDialog": false,
  852 + "dialogTitle": "",
  853 + "dialogHideDashboardToolbar": true,
  854 + "dialogWidth": null,
  855 + "dialogHeight": null,
  856 + "openRightLayout": false,
  857 + "id": "0b3d2887-9929-84d5-3795-0763dca15cba"
  858 + }
  859 + ]
  860 + },
  861 + "showTitleIcon": false,
  862 + "titleIcon": null,
  863 + "iconColor": "rgba(0, 0, 0, 0.87)",
  864 + "iconSize": "24px",
  865 + "titleTooltip": "",
  866 + "enableDataExport": false,
  867 + "displayTimewindow": true
  868 + },
  869 + "id": "77b10144-b904-edd5-8c7c-8fb75616c6d8",
  870 + "typeFullFqn": "system.cards.html_value_card"
  871 + },
  872 + "21be08bb-ec90-f760-ad6f-e7678f12c401": {
  873 + "type": "latest",
  874 + "sizeX": 7.5,
  875 + "sizeY": 6.5,
  876 + "config": {
  877 + "timewindow": {
  878 + "displayValue": "",
  879 + "selectedTab": 0,
  880 + "realtime": {
  881 + "realtimeType": 1,
  882 + "interval": 1000,
  883 + "timewindowMs": 86400000,
  884 + "quickInterval": "CURRENT_DAY"
  885 + },
  886 + "history": {
  887 + "historyType": 0,
  888 + "interval": 1000,
  889 + "timewindowMs": 60000,
  890 + "fixedTimewindow": {
  891 + "startTimeMs": 1694085363133,
  892 + "endTimeMs": 1694171763133
  893 + },
  894 + "quickInterval": "CURRENT_DAY"
  895 + },
  896 + "aggregation": {
  897 + "type": "NONE",
  898 + "limit": 200
  899 + }
  900 + },
  901 + "showTitle": true,
  902 + "backgroundColor": "rgb(255, 255, 255)",
  903 + "color": "rgba(0, 0, 0, 0.87)",
  904 + "padding": "4px",
  905 + "settings": {
  906 + "enableSearch": true,
  907 + "displayPagination": true,
  908 + "defaultPageSize": 10,
  909 + "defaultSortOrder": "entityName",
  910 + "displayEntityName": true,
  911 + "displayEntityType": false,
  912 + "enableSelectColumnDisplay": false,
  913 + "enableStickyHeader": true,
  914 + "enableStickyAction": true,
  915 + "entitiesTitle": "Devices",
  916 + "displayEntityLabel": false,
  917 + "entityNameColumnTitle": "Device"
  918 + },
  919 + "title": "New Entities table",
  920 + "dropShadow": true,
  921 + "enableFullscreen": true,
  922 + "titleStyle": {
  923 + "fontSize": "16px",
  924 + "fontWeight": 400,
  925 + "padding": "5px 10px 5px 10px"
  926 + },
  927 + "useDashboardTimewindow": false,
  928 + "showLegend": false,
  929 + "datasources": [
  930 + {
  931 + "type": "entity",
  932 + "name": null,
  933 + "entityAliasId": "639da5b4-31f0-0151-6282-c37a3897b7e8",
  934 + "filterId": "19a0ad1c-b31d-4a29-9d7b-5d87e2a8ea6e",
  935 + "dataKeys": [
  936 + {
  937 + "name": "current_fw_title",
  938 + "type": "timeseries",
  939 + "label": "Current FW title",
  940 + "color": "#2196f3",
  941 + "settings": {
  942 + "columnWidth": "0px",
  943 + "useCellStyleFunction": false,
  944 + "cellStyleFunction": "",
  945 + "useCellContentFunction": false,
  946 + "defaultColumnVisibility": "visible",
  947 + "columnSelectionToDisplay": "enabled"
  948 + },
  949 + "_hash": 0.09545533885166413,
  950 + "units": null,
  951 + "decimals": null,
  952 + "funcBody": null,
  953 + "usePostProcessing": null,
  954 + "postFuncBody": null
  955 + },
  956 + {
  957 + "name": "current_fw_version",
  958 + "type": "timeseries",
  959 + "label": "Current FW version",
  960 + "color": "#4caf50",
  961 + "settings": {
  962 + "columnWidth": "0px",
  963 + "useCellStyleFunction": false,
  964 + "cellStyleFunction": "",
  965 + "useCellContentFunction": false,
  966 + "defaultColumnVisibility": "visible",
  967 + "columnSelectionToDisplay": "enabled"
  968 + },
  969 + "_hash": 0.7206056602328659,
  970 + "units": null,
  971 + "decimals": null,
  972 + "funcBody": null,
  973 + "usePostProcessing": null,
  974 + "postFuncBody": null
  975 + },
  976 + {
  977 + "name": "target_fw_title",
  978 + "type": "timeseries",
  979 + "label": "Target FW title",
  980 + "color": "#ffc107",
  981 + "settings": {
  982 + "columnWidth": "0px",
  983 + "useCellStyleFunction": false,
  984 + "cellStyleFunction": "",
  985 + "useCellContentFunction": false,
  986 + "defaultColumnVisibility": "visible",
  987 + "columnSelectionToDisplay": "enabled"
  988 + },
  989 + "_hash": 0.9934225682766313,
  990 + "units": null,
  991 + "decimals": null,
  992 + "funcBody": null,
  993 + "usePostProcessing": null,
  994 + "postFuncBody": null
  995 + },
  996 + {
  997 + "name": "target_fw_version",
  998 + "type": "timeseries",
  999 + "label": "Target FW version",
  1000 + "color": "#607d8b",
  1001 + "settings": {
  1002 + "columnWidth": "0px",
  1003 + "useCellStyleFunction": false,
  1004 + "cellStyleFunction": "",
  1005 + "useCellContentFunction": false,
  1006 + "cellContentFunction": "",
  1007 + "defaultColumnVisibility": "visible",
  1008 + "columnSelectionToDisplay": "enabled"
  1009 + },
  1010 + "_hash": 0.5251724416842531,
  1011 + "units": null,
  1012 + "decimals": null,
  1013 + "funcBody": null,
  1014 + "usePostProcessing": null,
  1015 + "postFuncBody": null
  1016 + },
  1017 + {
  1018 + "name": "target_fw_ts",
  1019 + "type": "timeseries",
  1020 + "label": "Target FW set time",
  1021 + "color": "#e91e63",
  1022 + "settings": {
  1023 + "columnWidth": "0px",
  1024 + "useCellStyleFunction": false,
  1025 + "cellStyleFunction": "",
  1026 + "useCellContentFunction": true,
  1027 + "defaultColumnVisibility": "visible",
  1028 + "columnSelectionToDisplay": "enabled",
  1029 + "cellContentFunction": "if (value !== '') {\n return ctx.date.transform(value, 'yyyy-MM-dd HH:mm:ss');\n}\nreturn '';"
  1030 + },
  1031 + "_hash": 0.31823244858578237,
  1032 + "units": null,
  1033 + "decimals": null,
  1034 + "funcBody": null,
  1035 + "usePostProcessing": null,
  1036 + "postFuncBody": null
  1037 + },
  1038 + {
  1039 + "name": "fw_state",
  1040 + "type": "timeseries",
  1041 + "label": "Progress",
  1042 + "color": "#9c27b0",
  1043 + "settings": {
  1044 + "columnWidth": "30%",
  1045 + "useCellStyleFunction": true,
  1046 + "useCellContentFunction": true,
  1047 + "defaultColumnVisibility": "visible",
  1048 + "columnSelectionToDisplay": "enabled",
  1049 + "cellStyleFunction": "return {\n 'padding-right': '30px'\n}",
  1050 + "cellContentFunction": "if (value !== '') {\n var mapProgress = {\n 'QUEUED': 0,\n 'INITIATED': 5,\n 'DOWNLOADING': 10,\n 'DOWNLOADED': 55,\n 'VERIFIED': 60,\n 'UPDATING': 70,\n 'FAILED': 99,\n 'UPDATED': 100\n }\n var color = 'mat-primary';\n var progress = mapProgress[value];\n if (value == 'FAILED') {\n color = 'mat-accent';\n }\n return `<mat-progress-bar style=\"height: 8px\" role=\"progressbar\" aria-valuemin=\"0\" aria-valuemax=\"100\" tabindex=\"-1\" mode=\"determinate\" value=\"${progress}\" class=\"mat-progress-bar ${color}\" aria-valuenow=\"${progress}\"><div aria-hidden=\"true\"><svg width=\"100%\" height=\"8\" focusable=\"false\" class=\"mat-progress-bar-background mat-progress-bar-element\"><defs><pattern x=\"4\" y=\"0\" width=\"8\" height=\"4\" patternUnits=\"userSpaceOnUse\" id=\"mat-progress-bar-0\"><circle cx=\"2\" cy=\"2\" r=\"2\"></circle></pattern></defs><rect width=\"100%\" height=\"100%\" fill=\"url(\"/components/progress-bar/overview#mat-progress-bar-0\")\"></rect></svg><div class=\"mat-progress-bar-buffer mat-progress-bar-element\"></div><div class=\"mat-progress-bar-primary mat-progress-bar-fill mat-progress-bar-element\" style=\"transform: scale3d(${progress / 100}, 1, 1);\"></div><div class=\"mat-progress-bar-secondary mat-progress-bar-fill mat-progress-bar-element\"></div></div></mat-progress-bar>`;\n}"
  1051 + },
  1052 + "_hash": 0.8174211757846257,
  1053 + "units": null,
  1054 + "decimals": null,
  1055 + "funcBody": null,
  1056 + "usePostProcessing": null,
  1057 + "postFuncBody": null
  1058 + },
  1059 + {
  1060 + "name": "fw_state",
  1061 + "type": "timeseries",
  1062 + "label": "Status",
  1063 + "color": "#f44336",
  1064 + "settings": {
  1065 + "columnWidth": "130px",
  1066 + "useCellStyleFunction": true,
  1067 + "useCellContentFunction": true,
  1068 + "defaultColumnVisibility": "visible",
  1069 + "columnSelectionToDisplay": "enabled",
  1070 + "cellStyleFunction": "if (value == 'FAILED') {\n return {'color' : '#D93025'};\n}\nreturn {};",
  1071 + "cellContentFunction": "function icon(value) {\n if (value == 'QUEUED') {\n return '<mat-icon _role=\"img\" class=\"mat-icon notranslate material-icons mat-icon-no-color\" aria-hidden=\"true\" data-mat-icon-type=\"font\" style=\"color: #000;\"><svg style=\"width:24px;height:24px\" viewBox=\"0 0 24 24\"><path fill=\"currentColor\" d=\"M6,2V8H6V8L10,12L6,16V16H6V22H18V16H18V16L14,12L18,8V8H18V2H6M16,16.5V20H8V16.5L12,12.5L16,16.5M12,11.5L8,7.5V4H16V7.5L12,11.5Z\" /></svg></mat-icon>';\n }\n if (value == 'INITIATED' || value == 'DOWNLOADING' || value == 'DOWNLOADED') {\n return '<mat-icon _role=\"img\" class=\"mat-icon notranslate material-icons mat-icon-no-color\" aria-hidden=\"true\" data-mat-icon-type=\"font\" style=\"color: #000\"><svg viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12.74 2.1951C11.63 1.2876 10.2575 0.687598 8.75 0.537598V2.0526C9.845 2.1876 10.8425 2.6226 11.675 3.2676L12.74 2.1951ZM13.9475 7.2501H15.4625C15.3125 5.7426 14.7125 4.3701 13.805 3.2601L12.7325 4.3251C13.3775 5.1576 13.8125 6.1551 13.9475 7.2501ZM12.7325 11.6751L13.805 12.7476C14.7125 11.6376 15.3125 10.2576 15.4625 8.7576H13.9475C13.8125 9.8451 13.3775 10.8426 12.7325 11.6751ZM8.75 13.9476V15.4626C10.2575 15.3126 11.63 14.7126 12.74 13.8051L11.6675 12.7326C10.8425 13.3776 9.845 13.8126 8.75 13.9476ZM8.75 8.0001V4.2501H7.25V8.0001H4.25L8 11.7501L11.75 8.0001H8.75ZM7.25 13.9476V15.4626C3.4625 15.0876 0.5 11.8926 0.5 8.0001C0.5 4.1076 3.4625 0.912598 7.25 0.537598V2.0526C4.2875 2.4201 2 4.9401 2 8.0001C2 11.0601 4.2875 13.5801 7.25 13.9476Z\" fill=\"black\"/></svg></mat-icon>';\n }\n if (value == 'VERIFIED' || value == 'UPDATING' ) {\n return '<mat-icon _role=\"img\" class=\"mat-icon notranslate material-icons mat-icon-no-color\" aria-hidden=\"true\" data-mat-icon-type=\"font\" style=\"color: #000\">update</mat-icon>';\n }\n if (value == 'UPDATED') {\n return '<mat-icon _role=\"img\" class=\"mat-icon notranslate material-icons mat-icon-no-color\" aria-hidden=\"true\" data-mat-icon-type=\"font\" style=\"color: #000\"><svg style=\"width:22px;height:22px\" viewBox=\"0 0 34 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M33.26 2.82L30.44 0L12.06 18.38L3.55999 9.9L0.73999 12.72L12.06 24.04L33.26 2.82Z\" fill=\"black\"/><path d=\"M31 28H3V32H31V28Z\" fill=\"black\"/></svg></mat-icon>';\n }\n if (value == 'FAILED') {\n return '<mat-icon _role=\"img\" class=\"mat-icon notranslate material-icons mat-icon-no-color\" aria-hidden=\"true\" data-mat-icon-type=\"font\" style=\"color: #D93025\">warning</mat-icon>';\n }\n return '';\n}\nfunction capitalize (s) {\n if (typeof s !== 'string') return '';\n return s.charAt(0).toUpperCase() + s.slice(1).toLowerCase();\n}\n\nreturn icon(value) + '<span style=\"vertical-align: super;padding-left: 8px;\">' + capitalize(value) + '</span>';"
  1072 + },
  1073 + "_hash": 0.7764426948615217,
  1074 + "units": null,
  1075 + "decimals": null,
  1076 + "funcBody": null,
  1077 + "usePostProcessing": null,
  1078 + "postFuncBody": null
  1079 + },
  1080 + {
  1081 + "name": "fw_checksum",
  1082 + "type": "attribute",
  1083 + "label": "fw_checksum",
  1084 + "color": "#3f51b5",
  1085 + "settings": {
  1086 + "columnWidth": "0px",
  1087 + "useCellStyleFunction": false,
  1088 + "cellStyleFunction": "",
  1089 + "useCellContentFunction": false,
  1090 + "defaultColumnVisibility": "hidden",
  1091 + "columnSelectionToDisplay": "disabled"
  1092 + },
  1093 + "_hash": 0.5594087842471693,
  1094 + "units": null,
  1095 + "decimals": null,
  1096 + "funcBody": null,
  1097 + "usePostProcessing": null,
  1098 + "postFuncBody": null
  1099 + },
  1100 + {
  1101 + "name": "fw_url",
  1102 + "type": "attribute",
  1103 + "label": "fw_url",
  1104 + "color": "#e91e63",
  1105 + "settings": {
  1106 + "columnWidth": "0px",
  1107 + "useCellStyleFunction": false,
  1108 + "cellStyleFunction": "",
  1109 + "useCellContentFunction": false,
  1110 + "cellContentFunction": "",
  1111 + "defaultColumnVisibility": "hidden",
  1112 + "columnSelectionToDisplay": "disabled"
  1113 + },
  1114 + "_hash": 0.4204673738685043,
  1115 + "units": null,
  1116 + "decimals": null,
  1117 + "funcBody": null,
  1118 + "usePostProcessing": null,
  1119 + "postFuncBody": null
  1120 + }
  1121 + ]
  1122 + }
  1123 + ],
  1124 + "actions": {
  1125 + "actionCellButton": [
  1126 + {
  1127 + "name": "History firmware update",
  1128 + "icon": "history",
  1129 + "type": "openDashboardState",
  1130 + "targetDashboardStateId": "device_firmware_history",
  1131 + "setEntityId": true,
  1132 + "stateEntityParamName": null,
  1133 + "openInSeparateDialog": false,
  1134 + "dialogTitle": "",
  1135 + "dialogHideDashboardToolbar": true,
  1136 + "dialogWidth": null,
  1137 + "dialogHeight": null,
  1138 + "openRightLayout": false,
  1139 + "id": "98a1406c-3301-bc2f-2c5d-d637ce3b663b"
  1140 + },
  1141 + {
  1142 + "name": "Edit firmware",
  1143 + "icon": "edit",
  1144 + "type": "customPretty",
  1145 + "customHtml": "<form #editEntityForm=\"ngForm\" [formGroup]=\"editEntityFormGroup\"\n (ngSubmit)=\"save()\" class=\"edit-entity-form\">\n <mat-toolbar fxLayout=\"row\" color=\"primary\">\n <h2>Edit firmware {{entityName}}</h2>\n <span fxFlex></span>\n <button mat-icon-button (click)=\"cancel()\" type=\"button\">\n <mat-icon class=\"material-icons\">close</mat-icon>\n </button>\n </mat-toolbar>\n <mat-progress-bar color=\"warn\" mode=\"indeterminate\" *ngIf=\"isLoading$ | async\">\n </mat-progress-bar>\n <div style=\"height: 4px;\" *ngIf=\"!(isLoading$ | async)\"></div>\n <div *ngIf=\"entity.deviceProfileId\" mat-dialog-content fxLayout=\"column\">\n <tb-ota-package-autocomplete\n [useFullEntityId]=\"true\"\n [deviceProfileId]=\"entity.deviceProfileId.id\"\n formControlName=\"firmwareId\">\n </tb-ota-package-autocomplete>\n </div>\n <div mat-dialog-actions fxLayout=\"row\" fxLayoutAlign=\"end center\">\n <button mat-button color=\"primary\"\n type=\"button\"\n [disabled]=\"(isLoading$ | async)\"\n (click)=\"cancel()\" cdkFocusInitial>\n Cancel\n </button>\n <button mat-button mat-raised-button color=\"primary\"\n type=\"submit\"\n [disabled]=\"(isLoading$ | async) || editEntityForm.invalid || !editEntityForm.dirty\">\n Save\n </button>\n </div>\n</form>",
  1146 + "customCss": "form {\n min-width: 300px !important;\n}",
  1147 + "customFunction": "let $injector = widgetContext.$scope.$injector;\nlet customDialog = $injector.get(widgetContext.servicesMap.get('customDialog'));\nlet entityService = $injector.get(widgetContext.servicesMap.get('entityService'));\nlet deviceService = $injector.get(widgetContext.servicesMap.get('deviceService'));\n\nopenEditEntityDialog();\n\nfunction openEditEntityDialog() {\n customDialog.customDialog(htmlTemplate, EditEntityDialogController).subscribe();\n}\n\nfunction EditEntityDialogController(instance) {\n let vm = instance;\n\n vm.entityName = entityName;\n vm.entity = {};\n\n vm.editEntityFormGroup = vm.fb.group({\n firmwareId: [null]\n });\n\n getEntityInfo();\n\n vm.cancel = function() {\n vm.dialogRef.close(null);\n };\n\n vm.save = function() {\n vm.editEntityFormGroup.markAsPristine();\n saveEntity().subscribe(\n function () {\n // widgetContext.updateAliases();\n vm.dialogRef.close(null);\n }\n );\n };\n\n\n function getEntityInfo() {\n entityService.getEntity(entityId.entityType, entityId.id).subscribe(\n function (data) {\n vm.entity = data;\n vm.editEntityFormGroup.patchValue({\n firmwareId: vm.entity.firmwareId\n }, {emitEvent: false});\n }\n );\n }\n\n function saveEntity() {\n const formValues = vm.editEntityFormGroup.value;\n vm.entity.firmwareId = formValues.firmwareId;\n return deviceService.saveDevice(vm.entity);\n }\n}",
  1148 + "customResources": [],
  1149 + "id": "23099c1d-454b-25dc-8bc0-7cf33c21c5d5"
  1150 + },
  1151 + {
  1152 + "name": "Download firmware",
  1153 + "icon": "file_download",
  1154 + "type": "custom",
  1155 + "customFunction": "let $injector = widgetContext.$scope.$injector;\nlet entityService = $injector.get(widgetContext.servicesMap.get('entityService'));\nlet otaPackageService = $injector.get(widgetContext.servicesMap.get('otaPackageService'));\nlet deviceProfileService = $injector.get(widgetContext.servicesMap.get('deviceProfileService'));\n\ngetDeviceFirmware();\n\nfunction getDeviceFirmware() {\n var entityIdValue = entityId.id;\n var data = widgetContext.data.find((el) => el.datasource.entityId === entityIdValue && el.dataKey.name === 'fw_url');\n var url = data.data[0][1];\n if (url === '') {\n entityService.getEntity(entityId.entityType, entityId.id).subscribe(\n function (data) {\n if (data.firmwareId !== null) {\n otaPackageService.downloadOtaPackage(data.firmwareId.id).subscribe(); \n } else {\n deviceProfileService.getDeviceProfile(data.deviceProfileId.id).subscribe(\n function (deviceProfile) {\n if (deviceProfile.firmwareId !== null) {\n otaPackageService.downloadOtaPackage(deviceProfile.firmwareId.id).subscribe();\n } else {\n widgetContext.showToast('warn', 'Device ' + entityName +' has not firmware set.', 2000, 'top');\n }\n });\n }\n }\n );\n } else {\n widgetContext.showToast('warn', 'Device ' + entityName +' has not firmware set.', 2000, 'top');\n }\n}",
  1156 + "id": "12533058-42f6-e75f-620c-219c48d01ec0"
  1157 + },
  1158 + {
  1159 + "name": "Copy checksum/URL",
  1160 + "icon": "content_copy",
  1161 + "type": "custom",
  1162 + "customFunction": "function copyToClipboard(text) {\n if (window.clipboardData && window.clipboardData.setData) {\n return window.clipboardData.setData(\"Text\", text);\n\n }\n else if (document.queryCommandSupported && document.queryCommandSupported(\"copy\")) {\n var textarea = document.createElement(\"textarea\");\n textarea.textContent = text;\n textarea.style.position = \"fixed\";\n document.body.appendChild(textarea);\n textarea.select();\n try {\n return document.execCommand(\"copy\");\n }\n catch (ex) {\n console.warn(\"Copy to clipboard failed.\", ex);\n return false;\n }\n document.body.removeChild(textarea);\n }\n}\nvar entityIdValue = entityId.id;\nvar data = widgetContext.data.find((el) => el.datasource.entityId === entityIdValue && el.dataKey.name === 'fw_checksum');\nvar checksum = data.data[0][1];\nif (checksum !== '') {\n copyToClipboard(checksum);\n widgetContext.showSuccessToast('Firmware checksum has been copied to clipboard', 2000, 'top');\n} else {\n data = widgetContext.data.find((el) => el.datasource.entityId === entityIdValue && el.dataKey.name === 'fw_url');\n var url = data.data[0][1];\n if (url !== '') {\n copyToClipboard(url);\n widgetContext.showSuccessToast('Firmware direct URL has been copied to clipboard', 2000, 'top');\n } else {\n widgetContext.showToast('warn', 'Device ' + entityName +' has not firmware set.', 2000, 'top');\n }\n}",
  1163 + "id": "09323079-7111-87f7-90d1-c62cd7d85dc7"
  1164 + }
  1165 + ]
  1166 + },
  1167 + "showTitleIcon": false,
  1168 + "iconColor": "rgba(0, 0, 0, 0.87)",
  1169 + "iconSize": "24px",
  1170 + "titleTooltip": "",
  1171 + "widgetStyle": {}
  1172 + },
  1173 + "row": 0,
  1174 + "col": 0,
  1175 + "id": "21be08bb-ec90-f760-ad6f-e7678f12c401",
  1176 + "typeFullFqn": "system.cards.entities_table"
  1177 + },
  1178 + "e8280043-d3dc-7acb-c2ff-a4522972ff91": {
  1179 + "type": "latest",
  1180 + "sizeX": 7.5,
  1181 + "sizeY": 6.5,
  1182 + "config": {
  1183 + "timewindow": {
  1184 + "displayValue": "",
  1185 + "selectedTab": 0,
  1186 + "realtime": {
  1187 + "realtimeType": 1,
  1188 + "interval": 1000,
  1189 + "timewindowMs": 86400000,
  1190 + "quickInterval": "CURRENT_DAY"
  1191 + },
  1192 + "history": {
  1193 + "historyType": 0,
  1194 + "interval": 1000,
  1195 + "timewindowMs": 60000,
  1196 + "fixedTimewindow": {
  1197 + "startTimeMs": 1694085363133,
  1198 + "endTimeMs": 1694171763133
  1199 + },
  1200 + "quickInterval": "CURRENT_DAY"
  1201 + },
  1202 + "aggregation": {
  1203 + "type": "NONE",
  1204 + "limit": 200
  1205 + }
  1206 + },
  1207 + "showTitle": true,
  1208 + "backgroundColor": "rgb(255, 255, 255)",
  1209 + "color": "rgba(0, 0, 0, 0.87)",
  1210 + "padding": "4px",
  1211 + "settings": {
  1212 + "enableSearch": true,
  1213 + "displayPagination": true,
  1214 + "defaultPageSize": 10,
  1215 + "defaultSortOrder": "entityName",
  1216 + "displayEntityName": true,
  1217 + "displayEntityType": false,
  1218 + "enableSelectColumnDisplay": false,
  1219 + "enableStickyHeader": true,
  1220 + "enableStickyAction": true,
  1221 + "entitiesTitle": "Devices",
  1222 + "displayEntityLabel": false,
  1223 + "entityNameColumnTitle": "Device"
  1224 + },
  1225 + "title": "New Entities table",
  1226 + "dropShadow": true,
  1227 + "enableFullscreen": true,
  1228 + "titleStyle": {
  1229 + "fontSize": "16px",
  1230 + "fontWeight": 400,
  1231 + "padding": "5px 10px 5px 10px"
  1232 + },
  1233 + "useDashboardTimewindow": false,
  1234 + "showLegend": false,
  1235 + "datasources": [
  1236 + {
  1237 + "type": "entity",
  1238 + "name": null,
  1239 + "entityAliasId": "639da5b4-31f0-0151-6282-c37a3897b7e8",
  1240 + "filterId": "579f0468-9ce9-7e3e-b34c-88dd3de59897",
  1241 + "dataKeys": [
  1242 + {
  1243 + "name": "current_fw_title",
  1244 + "type": "timeseries",
  1245 + "label": "Current FW title",
  1246 + "color": "#2196f3",
  1247 + "settings": {
  1248 + "columnWidth": "0px",
  1249 + "useCellStyleFunction": false,
  1250 + "cellStyleFunction": "",
  1251 + "useCellContentFunction": false,
  1252 + "defaultColumnVisibility": "visible",
  1253 + "columnSelectionToDisplay": "enabled"
  1254 + },
  1255 + "_hash": 0.09545533885166413,
  1256 + "units": null,
  1257 + "decimals": null,
  1258 + "funcBody": null,
  1259 + "usePostProcessing": null,
  1260 + "postFuncBody": null
  1261 + },
  1262 + {
  1263 + "name": "current_fw_version",
  1264 + "type": "timeseries",
  1265 + "label": "Current FW version",
  1266 + "color": "#4caf50",
  1267 + "settings": {
  1268 + "columnWidth": "0px",
  1269 + "useCellStyleFunction": false,
  1270 + "cellStyleFunction": "",
  1271 + "useCellContentFunction": false,
  1272 + "defaultColumnVisibility": "visible",
  1273 + "columnSelectionToDisplay": "enabled"
  1274 + },
  1275 + "_hash": 0.7206056602328659,
  1276 + "units": null,
  1277 + "decimals": null,
  1278 + "funcBody": null,
  1279 + "usePostProcessing": null,
  1280 + "postFuncBody": null
  1281 + },
  1282 + {
  1283 + "name": "target_fw_title",
  1284 + "type": "timeseries",
  1285 + "label": "Target FW title",
  1286 + "color": "#ffc107",
  1287 + "settings": {
  1288 + "columnWidth": "0px",
  1289 + "useCellStyleFunction": false,
  1290 + "cellStyleFunction": "",
  1291 + "useCellContentFunction": false,
  1292 + "defaultColumnVisibility": "visible",
  1293 + "columnSelectionToDisplay": "enabled"
  1294 + },
  1295 + "_hash": 0.9934225682766313,
  1296 + "units": null,
  1297 + "decimals": null,
  1298 + "funcBody": null,
  1299 + "usePostProcessing": null,
  1300 + "postFuncBody": null
  1301 + },
  1302 + {
  1303 + "name": "target_fw_version",
  1304 + "type": "timeseries",
  1305 + "label": "Target FW version",
  1306 + "color": "#607d8b",
  1307 + "settings": {
  1308 + "columnWidth": "0px",
  1309 + "useCellStyleFunction": false,
  1310 + "cellStyleFunction": "",
  1311 + "useCellContentFunction": false,
  1312 + "cellContentFunction": "",
  1313 + "defaultColumnVisibility": "visible",
  1314 + "columnSelectionToDisplay": "enabled"
  1315 + },
  1316 + "_hash": 0.5251724416842531,
  1317 + "units": null,
  1318 + "decimals": null,
  1319 + "funcBody": null,
  1320 + "usePostProcessing": null,
  1321 + "postFuncBody": null
  1322 + },
  1323 + {
  1324 + "name": "target_fw_ts",
  1325 + "type": "timeseries",
  1326 + "label": "Target FW set time",
  1327 + "color": "#e91e63",
  1328 + "settings": {
  1329 + "columnWidth": "0px",
  1330 + "useCellStyleFunction": false,
  1331 + "cellStyleFunction": "",
  1332 + "useCellContentFunction": true,
  1333 + "defaultColumnVisibility": "visible",
  1334 + "columnSelectionToDisplay": "enabled",
  1335 + "cellContentFunction": "if (value !== '') {\n return ctx.date.transform(value, 'yyyy-MM-dd HH:mm:ss');\n}\nreturn '';"
  1336 + },
  1337 + "_hash": 0.31823244858578237,
  1338 + "units": null,
  1339 + "decimals": null,
  1340 + "funcBody": null,
  1341 + "usePostProcessing": null,
  1342 + "postFuncBody": null
  1343 + },
  1344 + {
  1345 + "name": "fw_state",
  1346 + "type": "timeseries",
  1347 + "label": "Progress",
  1348 + "color": "#9c27b0",
  1349 + "settings": {
  1350 + "columnWidth": "30%",
  1351 + "useCellStyleFunction": true,
  1352 + "useCellContentFunction": true,
  1353 + "defaultColumnVisibility": "visible",
  1354 + "columnSelectionToDisplay": "enabled",
  1355 + "cellStyleFunction": "return {\n 'padding-right': '30px'\n}",
  1356 + "cellContentFunction": "if (value !== '') {\n var mapProgress = {\n 'QUEUED': 0,\n 'INITIATED': 5,\n 'DOWNLOADING': 10,\n 'DOWNLOADED': 55,\n 'VERIFIED': 60,\n 'UPDATING': 70,\n 'FAILED': 99,\n 'UPDATED': 100\n }\n var color = 'mat-primary';\n var progress = mapProgress[value];\n if (value == 'FAILED') {\n color = 'mat-accent';\n }\n return `<mat-progress-bar style=\"height: 8px\" role=\"progressbar\" aria-valuemin=\"0\" aria-valuemax=\"100\" tabindex=\"-1\" mode=\"determinate\" value=\"${progress}\" class=\"mat-progress-bar ${color}\" aria-valuenow=\"${progress}\"><div aria-hidden=\"true\"><svg width=\"100%\" height=\"8\" focusable=\"false\" class=\"mat-progress-bar-background mat-progress-bar-element\"><defs><pattern x=\"4\" y=\"0\" width=\"8\" height=\"4\" patternUnits=\"userSpaceOnUse\" id=\"mat-progress-bar-0\"><circle cx=\"2\" cy=\"2\" r=\"2\"></circle></pattern></defs><rect width=\"100%\" height=\"100%\" fill=\"url(\"/components/progress-bar/overview#mat-progress-bar-0\")\"></rect></svg><div class=\"mat-progress-bar-buffer mat-progress-bar-element\"></div><div class=\"mat-progress-bar-primary mat-progress-bar-fill mat-progress-bar-element\" style=\"transform: scale3d(${progress / 100}, 1, 1);\"></div><div class=\"mat-progress-bar-secondary mat-progress-bar-fill mat-progress-bar-element\"></div></div></mat-progress-bar>`;\n}"
  1357 + },
  1358 + "_hash": 0.8174211757846257,
  1359 + "units": null,
  1360 + "decimals": null,
  1361 + "funcBody": null,
  1362 + "usePostProcessing": null,
  1363 + "postFuncBody": null
  1364 + },
  1365 + {
  1366 + "name": "fw_state",
  1367 + "type": "timeseries",
  1368 + "label": "Status",
  1369 + "color": "#f44336",
  1370 + "settings": {
  1371 + "columnWidth": "130px",
  1372 + "useCellStyleFunction": true,
  1373 + "useCellContentFunction": true,
  1374 + "defaultColumnVisibility": "visible",
  1375 + "columnSelectionToDisplay": "enabled",
  1376 + "cellStyleFunction": "if (value == 'FAILED') {\n return {'color' : '#D93025'};\n}\nreturn {};",
  1377 + "cellContentFunction": "function icon(value) {\n if (value == 'QUEUED') {\n return '<mat-icon _role=\"img\" class=\"mat-icon notranslate material-icons mat-icon-no-color\" aria-hidden=\"true\" data-mat-icon-type=\"font\" style=\"color: #000;\"><svg style=\"width:24px;height:24px\" viewBox=\"0 0 24 24\"><path fill=\"currentColor\" d=\"M6,2V8H6V8L10,12L6,16V16H6V22H18V16H18V16L14,12L18,8V8H18V2H6M16,16.5V20H8V16.5L12,12.5L16,16.5M12,11.5L8,7.5V4H16V7.5L12,11.5Z\" /></svg></mat-icon>';\n }\n if (value == 'INITIATED' || value == 'DOWNLOADING' || value == 'DOWNLOADED') {\n return '<mat-icon _role=\"img\" class=\"mat-icon notranslate material-icons mat-icon-no-color\" aria-hidden=\"true\" data-mat-icon-type=\"font\" style=\"color: #000\"><svg viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12.74 2.1951C11.63 1.2876 10.2575 0.687598 8.75 0.537598V2.0526C9.845 2.1876 10.8425 2.6226 11.675 3.2676L12.74 2.1951ZM13.9475 7.2501H15.4625C15.3125 5.7426 14.7125 4.3701 13.805 3.2601L12.7325 4.3251C13.3775 5.1576 13.8125 6.1551 13.9475 7.2501ZM12.7325 11.6751L13.805 12.7476C14.7125 11.6376 15.3125 10.2576 15.4625 8.7576H13.9475C13.8125 9.8451 13.3775 10.8426 12.7325 11.6751ZM8.75 13.9476V15.4626C10.2575 15.3126 11.63 14.7126 12.74 13.8051L11.6675 12.7326C10.8425 13.3776 9.845 13.8126 8.75 13.9476ZM8.75 8.0001V4.2501H7.25V8.0001H4.25L8 11.7501L11.75 8.0001H8.75ZM7.25 13.9476V15.4626C3.4625 15.0876 0.5 11.8926 0.5 8.0001C0.5 4.1076 3.4625 0.912598 7.25 0.537598V2.0526C4.2875 2.4201 2 4.9401 2 8.0001C2 11.0601 4.2875 13.5801 7.25 13.9476Z\" fill=\"black\"/></svg></mat-icon>';\n }\n if (value == 'VERIFIED' || value == 'UPDATING' ) {\n return '<mat-icon _role=\"img\" class=\"mat-icon notranslate material-icons mat-icon-no-color\" aria-hidden=\"true\" data-mat-icon-type=\"font\" style=\"color: #000\">update</mat-icon>';\n }\n if (value == 'UPDATED') {\n return '<mat-icon _role=\"img\" class=\"mat-icon notranslate material-icons mat-icon-no-color\" aria-hidden=\"true\" data-mat-icon-type=\"font\" style=\"color: #000\"><svg style=\"width:22px;height:22px\" viewBox=\"0 0 34 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M33.26 2.82L30.44 0L12.06 18.38L3.55999 9.9L0.73999 12.72L12.06 24.04L33.26 2.82Z\" fill=\"black\"/><path d=\"M31 28H3V32H31V28Z\" fill=\"black\"/></svg></mat-icon>';\n }\n if (value == 'FAILED') {\n return '<mat-icon _role=\"img\" class=\"mat-icon notranslate material-icons mat-icon-no-color\" aria-hidden=\"true\" data-mat-icon-type=\"font\" style=\"color: #D93025\">warning</mat-icon>';\n }\n return '';\n}\nfunction capitalize (s) {\n if (typeof s !== 'string') return '';\n return s.charAt(0).toUpperCase() + s.slice(1).toLowerCase();\n}\n\nreturn icon(value) + '<span style=\"vertical-align: super;padding-left: 8px;\">' + capitalize(value) + '</span>';"
  1378 + },
  1379 + "_hash": 0.7764426948615217,
  1380 + "units": null,
  1381 + "decimals": null,
  1382 + "funcBody": null,
  1383 + "usePostProcessing": null,
  1384 + "postFuncBody": null
  1385 + },
  1386 + {
  1387 + "name": "fw_checksum",
  1388 + "type": "attribute",
  1389 + "label": "fw_checksum",
  1390 + "color": "#3f51b5",
  1391 + "settings": {
  1392 + "columnWidth": "0px",
  1393 + "useCellStyleFunction": false,
  1394 + "cellStyleFunction": "",
  1395 + "useCellContentFunction": false,
  1396 + "defaultColumnVisibility": "hidden",
  1397 + "columnSelectionToDisplay": "disabled"
  1398 + },
  1399 + "_hash": 0.5594087842471693,
  1400 + "units": null,
  1401 + "decimals": null,
  1402 + "funcBody": null,
  1403 + "usePostProcessing": null,
  1404 + "postFuncBody": null
  1405 + },
  1406 + {
  1407 + "name": "fw_url",
  1408 + "type": "attribute",
  1409 + "label": "fw_url",
  1410 + "color": "#e91e63",
  1411 + "settings": {
  1412 + "columnWidth": "0px",
  1413 + "useCellStyleFunction": false,
  1414 + "cellStyleFunction": "",
  1415 + "useCellContentFunction": false,
  1416 + "cellContentFunction": "",
  1417 + "defaultColumnVisibility": "hidden",
  1418 + "columnSelectionToDisplay": "disabled"
  1419 + },
  1420 + "_hash": 0.4204673738685043,
  1421 + "units": null,
  1422 + "decimals": null,
  1423 + "funcBody": null,
  1424 + "usePostProcessing": null,
  1425 + "postFuncBody": null
  1426 + }
  1427 + ]
  1428 + }
  1429 + ],
  1430 + "actions": {
  1431 + "actionCellButton": [
  1432 + {
  1433 + "name": "History firmware update",
  1434 + "icon": "history",
  1435 + "type": "openDashboardState",
  1436 + "targetDashboardStateId": "device_firmware_history",
  1437 + "setEntityId": true,
  1438 + "stateEntityParamName": null,
  1439 + "openInSeparateDialog": false,
  1440 + "dialogTitle": "",
  1441 + "dialogHideDashboardToolbar": true,
  1442 + "dialogWidth": null,
  1443 + "dialogHeight": null,
  1444 + "openRightLayout": false,
  1445 + "id": "98a1406c-3301-bc2f-2c5d-d637ce3b663b"
  1446 + },
  1447 + {
  1448 + "name": "Edit firmware",
  1449 + "icon": "edit",
  1450 + "type": "customPretty",
  1451 + "customHtml": "<form #editEntityForm=\"ngForm\" [formGroup]=\"editEntityFormGroup\"\n (ngSubmit)=\"save()\" class=\"edit-entity-form\">\n <mat-toolbar fxLayout=\"row\" color=\"primary\">\n <h2>Edit firmware {{entityName}}</h2>\n <span fxFlex></span>\n <button mat-icon-button (click)=\"cancel()\" type=\"button\">\n <mat-icon class=\"material-icons\">close</mat-icon>\n </button>\n </mat-toolbar>\n <mat-progress-bar color=\"warn\" mode=\"indeterminate\" *ngIf=\"isLoading$ | async\">\n </mat-progress-bar>\n <div style=\"height: 4px;\" *ngIf=\"!(isLoading$ | async)\"></div>\n <div *ngIf=\"entity.deviceProfileId\" mat-dialog-content fxLayout=\"column\">\n <tb-ota-package-autocomplete\n [useFullEntityId]=\"true\"\n [deviceProfileId]=\"entity.deviceProfileId.id\"\n formControlName=\"firmwareId\">\n </tb-ota-package-autocomplete>\n </div>\n <div mat-dialog-actions fxLayout=\"row\" fxLayoutAlign=\"end center\">\n <button mat-button color=\"primary\"\n type=\"button\"\n [disabled]=\"(isLoading$ | async)\"\n (click)=\"cancel()\" cdkFocusInitial>\n Cancel\n </button>\n <button mat-button mat-raised-button color=\"primary\"\n type=\"submit\"\n [disabled]=\"(isLoading$ | async) || editEntityForm.invalid || !editEntityForm.dirty\">\n Save\n </button>\n </div>\n</form>",
  1452 + "customCss": "form {\n min-width: 300px !important;\n}",
  1453 + "customFunction": "let $injector = widgetContext.$scope.$injector;\nlet customDialog = $injector.get(widgetContext.servicesMap.get('customDialog'));\nlet entityService = $injector.get(widgetContext.servicesMap.get('entityService'));\nlet deviceService = $injector.get(widgetContext.servicesMap.get('deviceService'));\n\nopenEditEntityDialog();\n\nfunction openEditEntityDialog() {\n customDialog.customDialog(htmlTemplate, EditEntityDialogController).subscribe();\n}\n\nfunction EditEntityDialogController(instance) {\n let vm = instance;\n\n vm.entityName = entityName;\n vm.entity = {};\n\n vm.editEntityFormGroup = vm.fb.group({\n firmwareId: [null]\n });\n\n getEntityInfo();\n\n vm.cancel = function() {\n vm.dialogRef.close(null);\n };\n\n vm.save = function() {\n vm.editEntityFormGroup.markAsPristine();\n saveEntity().subscribe(\n function () {\n // widgetContext.updateAliases();\n vm.dialogRef.close(null);\n }\n );\n };\n\n\n function getEntityInfo() {\n entityService.getEntity(entityId.entityType, entityId.id).subscribe(\n function (data) {\n vm.entity = data;\n vm.editEntityFormGroup.patchValue({\n firmwareId: vm.entity.firmwareId\n }, {emitEvent: false});\n }\n );\n }\n\n function saveEntity() {\n const formValues = vm.editEntityFormGroup.value;\n vm.entity.firmwareId = formValues.firmwareId;\n return deviceService.saveDevice(vm.entity);\n }\n}",
  1454 + "customResources": [],
  1455 + "id": "23099c1d-454b-25dc-8bc0-7cf33c21c5d5"
  1456 + },
  1457 + {
  1458 + "name": "Download firmware",
  1459 + "icon": "file_download",
  1460 + "type": "custom",
  1461 + "customFunction": "let $injector = widgetContext.$scope.$injector;\nlet entityService = $injector.get(widgetContext.servicesMap.get('entityService'));\nlet otaPackageService = $injector.get(widgetContext.servicesMap.get('otaPackageService'));\nlet deviceProfileService = $injector.get(widgetContext.servicesMap.get('deviceProfileService'));\n\ngetDeviceFirmware();\n\nfunction getDeviceFirmware() {\n var entityIdValue = entityId.id;\n var data = widgetContext.data.find((el) => el.datasource.entityId === entityIdValue && el.dataKey.name === 'fw_url');\n var url = data.data[0][1];\n if (url === '') {\n entityService.getEntity(entityId.entityType, entityId.id).subscribe(\n function (data) {\n if (data.firmwareId !== null) {\n otaPackageService.downloadOtaPackage(data.firmwareId.id).subscribe(); \n } else {\n deviceProfileService.getDeviceProfile(data.deviceProfileId.id).subscribe(\n function (deviceProfile) {\n if (deviceProfile.firmwareId !== null) {\n otaPackageService.downloadOtaPackage(deviceProfile.firmwareId.id).subscribe();\n } else {\n widgetContext.showToast('warn', 'Device ' + entityName +' has not firmware set.', 2000, 'top');\n }\n });\n }\n }\n );\n } else {\n widgetContext.showToast('warn', 'Device ' + entityName +' has not firmware set.', 2000, 'top');\n }\n}",
  1462 + "id": "12533058-42f6-e75f-620c-219c48d01ec0"
  1463 + },
  1464 + {
  1465 + "name": "Copy checksum/URL",
  1466 + "icon": "content_copy",
  1467 + "type": "custom",
  1468 + "customFunction": "function copyToClipboard(text) {\n if (window.clipboardData && window.clipboardData.setData) {\n return window.clipboardData.setData(\"Text\", text);\n\n }\n else if (document.queryCommandSupported && document.queryCommandSupported(\"copy\")) {\n var textarea = document.createElement(\"textarea\");\n textarea.textContent = text;\n textarea.style.position = \"fixed\";\n document.body.appendChild(textarea);\n textarea.select();\n try {\n return document.execCommand(\"copy\");\n }\n catch (ex) {\n console.warn(\"Copy to clipboard failed.\", ex);\n return false;\n }\n document.body.removeChild(textarea);\n }\n}\nvar entityIdValue = entityId.id;\nvar data = widgetContext.data.find((el) => el.datasource.entityId === entityIdValue && el.dataKey.name === 'fw_checksum');\nvar checksum = data.data[0][1];\nif (checksum !== '') {\n copyToClipboard(checksum);\n widgetContext.showSuccessToast('Firmware checksum has been copied to clipboard', 2000, 'top');\n} else {\n data = widgetContext.data.find((el) => el.datasource.entityId === entityIdValue && el.dataKey.name === 'fw_url');\n var url = data.data[0][1];\n if (url !== '') {\n copyToClipboard(url);\n widgetContext.showSuccessToast('Firmware direct URL has been copied to clipboard', 2000, 'top');\n } else {\n widgetContext.showToast('warn', 'Device ' + entityName +' has not firmware set.', 2000, 'top');\n }\n}",
  1469 + "id": "09323079-7111-87f7-90d1-c62cd7d85dc7"
  1470 + }
  1471 + ]
  1472 + },
  1473 + "showTitleIcon": false,
  1474 + "iconColor": "rgba(0, 0, 0, 0.87)",
  1475 + "iconSize": "24px",
  1476 + "titleTooltip": "",
  1477 + "widgetStyle": {}
  1478 + },
  1479 + "row": 0,
  1480 + "col": 0,
  1481 + "id": "e8280043-d3dc-7acb-c2ff-a4522972ff91",
  1482 + "typeFullFqn": "system.cards.entities_table"
  1483 + },
  1484 + "3624013b-378c-f110-5eba-ae95c25a4dcc": {
  1485 + "type": "latest",
  1486 + "sizeX": 7.5,
  1487 + "sizeY": 6.5,
  1488 + "config": {
  1489 + "timewindow": {
  1490 + "displayValue": "",
  1491 + "selectedTab": 0,
  1492 + "realtime": {
  1493 + "realtimeType": 1,
  1494 + "interval": 1000,
  1495 + "timewindowMs": 86400000,
  1496 + "quickInterval": "CURRENT_DAY"
  1497 + },
  1498 + "history": {
  1499 + "historyType": 0,
  1500 + "interval": 1000,
  1501 + "timewindowMs": 60000,
  1502 + "fixedTimewindow": {
  1503 + "startTimeMs": 1694085363133,
  1504 + "endTimeMs": 1694171763133
  1505 + },
  1506 + "quickInterval": "CURRENT_DAY"
  1507 + },
  1508 + "aggregation": {
  1509 + "type": "NONE",
  1510 + "limit": 200
  1511 + }
  1512 + },
  1513 + "showTitle": true,
  1514 + "backgroundColor": "rgb(255, 255, 255)",
  1515 + "color": "rgba(0, 0, 0, 0.87)",
  1516 + "padding": "4px",
  1517 + "settings": {
  1518 + "enableSearch": true,
  1519 + "displayPagination": true,
  1520 + "defaultPageSize": 10,
  1521 + "defaultSortOrder": "entityName",
  1522 + "displayEntityName": true,
  1523 + "displayEntityType": false,
  1524 + "enableSelectColumnDisplay": false,
  1525 + "enableStickyHeader": true,
  1526 + "enableStickyAction": true,
  1527 + "entitiesTitle": "Devices",
  1528 + "displayEntityLabel": false,
  1529 + "entityNameColumnTitle": "Device"
  1530 + },
  1531 + "title": "New Entities table",
  1532 + "dropShadow": true,
  1533 + "enableFullscreen": true,
  1534 + "titleStyle": {
  1535 + "fontSize": "16px",
  1536 + "fontWeight": 400,
  1537 + "padding": "5px 10px 5px 10px"
  1538 + },
  1539 + "useDashboardTimewindow": false,
  1540 + "showLegend": false,
  1541 + "datasources": [
  1542 + {
  1543 + "type": "entity",
  1544 + "name": null,
  1545 + "entityAliasId": "639da5b4-31f0-0151-6282-c37a3897b7e8",
  1546 + "filterId": "bdbc6ea1-95a7-3912-341a-58dc7704a00f",
  1547 + "dataKeys": [
  1548 + {
  1549 + "name": "current_fw_title",
  1550 + "type": "timeseries",
  1551 + "label": "Current FW title",
  1552 + "color": "#2196f3",
  1553 + "settings": {
  1554 + "columnWidth": "0px",
  1555 + "useCellStyleFunction": false,
  1556 + "cellStyleFunction": "",
  1557 + "useCellContentFunction": false,
  1558 + "defaultColumnVisibility": "visible",
  1559 + "columnSelectionToDisplay": "enabled"
  1560 + },
  1561 + "_hash": 0.09545533885166413,
  1562 + "units": null,
  1563 + "decimals": null,
  1564 + "funcBody": null,
  1565 + "usePostProcessing": null,
  1566 + "postFuncBody": null
  1567 + },
  1568 + {
  1569 + "name": "current_fw_version",
  1570 + "type": "timeseries",
  1571 + "label": "Current FW version",
  1572 + "color": "#4caf50",
  1573 + "settings": {
  1574 + "columnWidth": "0px",
  1575 + "useCellStyleFunction": false,
  1576 + "cellStyleFunction": "",
  1577 + "useCellContentFunction": false,
  1578 + "defaultColumnVisibility": "visible",
  1579 + "columnSelectionToDisplay": "enabled"
  1580 + },
  1581 + "_hash": 0.7206056602328659,
  1582 + "units": null,
  1583 + "decimals": null,
  1584 + "funcBody": null,
  1585 + "usePostProcessing": null,
  1586 + "postFuncBody": null
  1587 + },
  1588 + {
  1589 + "name": "target_fw_title",
  1590 + "type": "timeseries",
  1591 + "label": "Target FW title",
  1592 + "color": "#ffc107",
  1593 + "settings": {
  1594 + "columnWidth": "0px",
  1595 + "useCellStyleFunction": false,
  1596 + "cellStyleFunction": "",
  1597 + "useCellContentFunction": false,
  1598 + "defaultColumnVisibility": "visible",
  1599 + "columnSelectionToDisplay": "enabled"
  1600 + },
  1601 + "_hash": 0.9934225682766313,
  1602 + "units": null,
  1603 + "decimals": null,
  1604 + "funcBody": null,
  1605 + "usePostProcessing": null,
  1606 + "postFuncBody": null
  1607 + },
  1608 + {
  1609 + "name": "target_fw_version",
  1610 + "type": "timeseries",
  1611 + "label": "Target FW version",
  1612 + "color": "#607d8b",
  1613 + "settings": {
  1614 + "columnWidth": "0px",
  1615 + "useCellStyleFunction": false,
  1616 + "cellStyleFunction": "",
  1617 + "useCellContentFunction": false,
  1618 + "cellContentFunction": "",
  1619 + "defaultColumnVisibility": "visible",
  1620 + "columnSelectionToDisplay": "enabled"
  1621 + },
  1622 + "_hash": 0.5251724416842531,
  1623 + "units": null,
  1624 + "decimals": null,
  1625 + "funcBody": null,
  1626 + "usePostProcessing": null,
  1627 + "postFuncBody": null
  1628 + },
  1629 + {
  1630 + "name": "target_fw_ts",
  1631 + "type": "timeseries",
  1632 + "label": "Target FW set time",
  1633 + "color": "#e91e63",
  1634 + "settings": {
  1635 + "columnWidth": "0px",
  1636 + "useCellStyleFunction": false,
  1637 + "cellStyleFunction": "",
  1638 + "useCellContentFunction": true,
  1639 + "defaultColumnVisibility": "visible",
  1640 + "columnSelectionToDisplay": "enabled",
  1641 + "cellContentFunction": "if (value !== '') {\n return ctx.date.transform(value, 'yyyy-MM-dd HH:mm:ss');\n}\nreturn '';"
  1642 + },
  1643 + "_hash": 0.31823244858578237,
  1644 + "units": null,
  1645 + "decimals": null,
  1646 + "funcBody": null,
  1647 + "usePostProcessing": null,
  1648 + "postFuncBody": null
  1649 + },
  1650 + {
  1651 + "name": "fw_state",
  1652 + "type": "timeseries",
  1653 + "label": "Progress",
  1654 + "color": "#9c27b0",
  1655 + "settings": {
  1656 + "columnWidth": "30%",
  1657 + "useCellStyleFunction": true,
  1658 + "useCellContentFunction": true,
  1659 + "defaultColumnVisibility": "visible",
  1660 + "columnSelectionToDisplay": "enabled",
  1661 + "cellStyleFunction": "return {\n 'padding-right': '30px'\n}",
  1662 + "cellContentFunction": "if (value !== '') {\n var mapProgress = {\n 'QUEUED': 0,\n 'INITIATED': 5,\n 'DOWNLOADING': 10,\n 'DOWNLOADED': 55,\n 'VERIFIED': 60,\n 'UPDATING': 70,\n 'FAILED': 99,\n 'UPDATED': 100\n }\n var color = 'mat-primary';\n var progress = mapProgress[value];\n if (value == 'FAILED') {\n color = 'mat-accent';\n }\n return `<mat-progress-bar style=\"height: 8px\" role=\"progressbar\" aria-valuemin=\"0\" aria-valuemax=\"100\" tabindex=\"-1\" mode=\"determinate\" value=\"${progress}\" class=\"mat-progress-bar ${color}\" aria-valuenow=\"${progress}\"><div aria-hidden=\"true\"><svg width=\"100%\" height=\"8\" focusable=\"false\" class=\"mat-progress-bar-background mat-progress-bar-element\"><defs><pattern x=\"4\" y=\"0\" width=\"8\" height=\"4\" patternUnits=\"userSpaceOnUse\" id=\"mat-progress-bar-0\"><circle cx=\"2\" cy=\"2\" r=\"2\"></circle></pattern></defs><rect width=\"100%\" height=\"100%\" fill=\"url(\"/components/progress-bar/overview#mat-progress-bar-0\")\"></rect></svg><div class=\"mat-progress-bar-buffer mat-progress-bar-element\"></div><div class=\"mat-progress-bar-primary mat-progress-bar-fill mat-progress-bar-element\" style=\"transform: scale3d(${progress / 100}, 1, 1);\"></div><div class=\"mat-progress-bar-secondary mat-progress-bar-fill mat-progress-bar-element\"></div></div></mat-progress-bar>`;\n}"
  1663 + },
  1664 + "_hash": 0.8174211757846257,
  1665 + "units": null,
  1666 + "decimals": null,
  1667 + "funcBody": null,
  1668 + "usePostProcessing": null,
  1669 + "postFuncBody": null
  1670 + },
  1671 + {
  1672 + "name": "fw_state",
  1673 + "type": "timeseries",
  1674 + "label": "Status",
  1675 + "color": "#f44336",
  1676 + "settings": {
  1677 + "columnWidth": "130px",
  1678 + "useCellStyleFunction": true,
  1679 + "useCellContentFunction": true,
  1680 + "defaultColumnVisibility": "visible",
  1681 + "columnSelectionToDisplay": "enabled",
  1682 + "cellStyleFunction": "if (value == 'FAILED') {\n return {'color' : '#D93025'};\n}\nreturn {};",
  1683 + "cellContentFunction": "function icon(value) {\n if (value == 'QUEUED') {\n return '<mat-icon _role=\"img\" class=\"mat-icon notranslate material-icons mat-icon-no-color\" aria-hidden=\"true\" data-mat-icon-type=\"font\" style=\"color: #000;\"><svg style=\"width:24px;height:24px\" viewBox=\"0 0 24 24\"><path fill=\"currentColor\" d=\"M6,2V8H6V8L10,12L6,16V16H6V22H18V16H18V16L14,12L18,8V8H18V2H6M16,16.5V20H8V16.5L12,12.5L16,16.5M12,11.5L8,7.5V4H16V7.5L12,11.5Z\" /></svg></mat-icon>';\n }\n if (value == 'INITIATED' || value == 'DOWNLOADING' || value == 'DOWNLOADED') {\n return '<mat-icon _role=\"img\" class=\"mat-icon notranslate material-icons mat-icon-no-color\" aria-hidden=\"true\" data-mat-icon-type=\"font\" style=\"color: #000\"><svg viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12.74 2.1951C11.63 1.2876 10.2575 0.687598 8.75 0.537598V2.0526C9.845 2.1876 10.8425 2.6226 11.675 3.2676L12.74 2.1951ZM13.9475 7.2501H15.4625C15.3125 5.7426 14.7125 4.3701 13.805 3.2601L12.7325 4.3251C13.3775 5.1576 13.8125 6.1551 13.9475 7.2501ZM12.7325 11.6751L13.805 12.7476C14.7125 11.6376 15.3125 10.2576 15.4625 8.7576H13.9475C13.8125 9.8451 13.3775 10.8426 12.7325 11.6751ZM8.75 13.9476V15.4626C10.2575 15.3126 11.63 14.7126 12.74 13.8051L11.6675 12.7326C10.8425 13.3776 9.845 13.8126 8.75 13.9476ZM8.75 8.0001V4.2501H7.25V8.0001H4.25L8 11.7501L11.75 8.0001H8.75ZM7.25 13.9476V15.4626C3.4625 15.0876 0.5 11.8926 0.5 8.0001C0.5 4.1076 3.4625 0.912598 7.25 0.537598V2.0526C4.2875 2.4201 2 4.9401 2 8.0001C2 11.0601 4.2875 13.5801 7.25 13.9476Z\" fill=\"black\"/></svg></mat-icon>';\n }\n if (value == 'VERIFIED' || value == 'UPDATING' ) {\n return '<mat-icon _role=\"img\" class=\"mat-icon notranslate material-icons mat-icon-no-color\" aria-hidden=\"true\" data-mat-icon-type=\"font\" style=\"color: #000\">update</mat-icon>';\n }\n if (value == 'UPDATED') {\n return '<mat-icon _role=\"img\" class=\"mat-icon notranslate material-icons mat-icon-no-color\" aria-hidden=\"true\" data-mat-icon-type=\"font\" style=\"color: #000\"><svg style=\"width:22px;height:22px\" viewBox=\"0 0 34 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M33.26 2.82L30.44 0L12.06 18.38L3.55999 9.9L0.73999 12.72L12.06 24.04L33.26 2.82Z\" fill=\"black\"/><path d=\"M31 28H3V32H31V28Z\" fill=\"black\"/></svg></mat-icon>';\n }\n if (value == 'FAILED') {\n return '<mat-icon _role=\"img\" class=\"mat-icon notranslate material-icons mat-icon-no-color\" aria-hidden=\"true\" data-mat-icon-type=\"font\" style=\"color: #D93025\">warning</mat-icon>';\n }\n return '';\n}\nfunction capitalize (s) {\n if (typeof s !== 'string') return '';\n return s.charAt(0).toUpperCase() + s.slice(1).toLowerCase();\n}\n\nreturn icon(value) + '<span style=\"vertical-align: super;padding-left: 8px;\">' + capitalize(value) + '</span>';"
  1684 + },
  1685 + "_hash": 0.7764426948615217,
  1686 + "units": null,
  1687 + "decimals": null,
  1688 + "funcBody": null,
  1689 + "usePostProcessing": null,
  1690 + "postFuncBody": null
  1691 + },
  1692 + {
  1693 + "name": "fw_checksum",
  1694 + "type": "attribute",
  1695 + "label": "fw_checksum",
  1696 + "color": "#3f51b5",
  1697 + "settings": {
  1698 + "columnWidth": "0px",
  1699 + "useCellStyleFunction": false,
  1700 + "cellStyleFunction": "",
  1701 + "useCellContentFunction": false,
  1702 + "defaultColumnVisibility": "hidden",
  1703 + "columnSelectionToDisplay": "disabled"
  1704 + },
  1705 + "_hash": 0.5594087842471693,
  1706 + "units": null,
  1707 + "decimals": null,
  1708 + "funcBody": null,
  1709 + "usePostProcessing": null,
  1710 + "postFuncBody": null
  1711 + },
  1712 + {
  1713 + "name": "fw_url",
  1714 + "type": "attribute",
  1715 + "label": "fw_url",
  1716 + "color": "#e91e63",
  1717 + "settings": {
  1718 + "columnWidth": "0px",
  1719 + "useCellStyleFunction": false,
  1720 + "cellStyleFunction": "",
  1721 + "useCellContentFunction": false,
  1722 + "cellContentFunction": "",
  1723 + "defaultColumnVisibility": "hidden",
  1724 + "columnSelectionToDisplay": "disabled"
  1725 + },
  1726 + "_hash": 0.4204673738685043,
  1727 + "units": null,
  1728 + "decimals": null,
  1729 + "funcBody": null,
  1730 + "usePostProcessing": null,
  1731 + "postFuncBody": null
  1732 + }
  1733 + ]
  1734 + }
  1735 + ],
  1736 + "actions": {
  1737 + "actionCellButton": [
  1738 + {
  1739 + "name": "History firmware update",
  1740 + "icon": "history",
  1741 + "type": "openDashboardState",
  1742 + "targetDashboardStateId": "device_firmware_history",
  1743 + "setEntityId": true,
  1744 + "stateEntityParamName": null,
  1745 + "openInSeparateDialog": false,
  1746 + "dialogTitle": "",
  1747 + "dialogHideDashboardToolbar": true,
  1748 + "dialogWidth": null,
  1749 + "dialogHeight": null,
  1750 + "openRightLayout": false,
  1751 + "id": "98a1406c-3301-bc2f-2c5d-d637ce3b663b"
  1752 + },
  1753 + {
  1754 + "name": "Edit firmware",
  1755 + "icon": "edit",
  1756 + "type": "customPretty",
  1757 + "customHtml": "<form #editEntityForm=\"ngForm\" [formGroup]=\"editEntityFormGroup\"\n (ngSubmit)=\"save()\" class=\"edit-entity-form\">\n <mat-toolbar fxLayout=\"row\" color=\"primary\">\n <h2>Edit firmware {{entityName}}</h2>\n <span fxFlex></span>\n <button mat-icon-button (click)=\"cancel()\" type=\"button\">\n <mat-icon class=\"material-icons\">close</mat-icon>\n </button>\n </mat-toolbar>\n <mat-progress-bar color=\"warn\" mode=\"indeterminate\" *ngIf=\"isLoading$ | async\">\n </mat-progress-bar>\n <div style=\"height: 4px;\" *ngIf=\"!(isLoading$ | async)\"></div>\n <div *ngIf=\"entity.deviceProfileId\" mat-dialog-content fxLayout=\"column\">\n <tb-ota-package-autocomplete\n [useFullEntityId]=\"true\"\n [deviceProfileId]=\"entity.deviceProfileId.id\"\n formControlName=\"firmwareId\">\n </tb-ota-package-autocomplete>\n </div>\n <div mat-dialog-actions fxLayout=\"row\" fxLayoutAlign=\"end center\">\n <button mat-button color=\"primary\"\n type=\"button\"\n [disabled]=\"(isLoading$ | async)\"\n (click)=\"cancel()\" cdkFocusInitial>\n Cancel\n </button>\n <button mat-button mat-raised-button color=\"primary\"\n type=\"submit\"\n [disabled]=\"(isLoading$ | async) || editEntityForm.invalid || !editEntityForm.dirty\">\n Save\n </button>\n </div>\n</form>",
  1758 + "customCss": "form {\n min-width: 300px !important;\n}",
  1759 + "customFunction": "let $injector = widgetContext.$scope.$injector;\nlet customDialog = $injector.get(widgetContext.servicesMap.get('customDialog'));\nlet entityService = $injector.get(widgetContext.servicesMap.get('entityService'));\nlet deviceService = $injector.get(widgetContext.servicesMap.get('deviceService'));\n\nopenEditEntityDialog();\n\nfunction openEditEntityDialog() {\n customDialog.customDialog(htmlTemplate, EditEntityDialogController).subscribe();\n}\n\nfunction EditEntityDialogController(instance) {\n let vm = instance;\n\n vm.entityName = entityName;\n vm.entity = {};\n\n vm.editEntityFormGroup = vm.fb.group({\n firmwareId: [null]\n });\n\n getEntityInfo();\n\n vm.cancel = function() {\n vm.dialogRef.close(null);\n };\n\n vm.save = function() {\n vm.editEntityFormGroup.markAsPristine();\n saveEntity().subscribe(\n function () {\n // widgetContext.updateAliases();\n vm.dialogRef.close(null);\n }\n );\n };\n\n\n function getEntityInfo() {\n entityService.getEntity(entityId.entityType, entityId.id).subscribe(\n function (data) {\n vm.entity = data;\n vm.editEntityFormGroup.patchValue({\n firmwareId: vm.entity.firmwareId\n }, {emitEvent: false});\n }\n );\n }\n\n function saveEntity() {\n const formValues = vm.editEntityFormGroup.value;\n vm.entity.firmwareId = formValues.firmwareId;\n return deviceService.saveDevice(vm.entity);\n }\n}",
  1760 + "customResources": [],
  1761 + "id": "23099c1d-454b-25dc-8bc0-7cf33c21c5d5"
  1762 + },
  1763 + {
  1764 + "name": "Download firmware",
  1765 + "icon": "file_download",
  1766 + "type": "custom",
  1767 + "customFunction": "let $injector = widgetContext.$scope.$injector;\nlet entityService = $injector.get(widgetContext.servicesMap.get('entityService'));\nlet otaPackageService = $injector.get(widgetContext.servicesMap.get('otaPackageService'));\nlet deviceProfileService = $injector.get(widgetContext.servicesMap.get('deviceProfileService'));\n\ngetDeviceFirmware();\n\nfunction getDeviceFirmware() {\n var entityIdValue = entityId.id;\n var data = widgetContext.data.find((el) => el.datasource.entityId === entityIdValue && el.dataKey.name === 'fw_url');\n var url = data.data[0][1];\n if (url === '') {\n entityService.getEntity(entityId.entityType, entityId.id).subscribe(\n function (data) {\n if (data.firmwareId !== null) {\n otaPackageService.downloadOtaPackage(data.firmwareId.id).subscribe(); \n } else {\n deviceProfileService.getDeviceProfile(data.deviceProfileId.id).subscribe(\n function (deviceProfile) {\n if (deviceProfile.firmwareId !== null) {\n otaPackageService.downloadOtaPackage(deviceProfile.firmwareId.id).subscribe();\n } else {\n widgetContext.showToast('warn', 'Device ' + entityName +' has not firmware set.', 2000, 'top');\n }\n });\n }\n }\n );\n } else {\n widgetContext.showToast('warn', 'Device ' + entityName +' has not firmware set.', 2000, 'top');\n }\n}",
  1768 + "id": "12533058-42f6-e75f-620c-219c48d01ec0"
  1769 + },
  1770 + {
  1771 + "name": "Copy checksum/URL",
  1772 + "icon": "content_copy",
  1773 + "type": "custom",
  1774 + "customFunction": "function copyToClipboard(text) {\n if (window.clipboardData && window.clipboardData.setData) {\n return window.clipboardData.setData(\"Text\", text);\n\n }\n else if (document.queryCommandSupported && document.queryCommandSupported(\"copy\")) {\n var textarea = document.createElement(\"textarea\");\n textarea.textContent = text;\n textarea.style.position = \"fixed\";\n document.body.appendChild(textarea);\n textarea.select();\n try {\n return document.execCommand(\"copy\");\n }\n catch (ex) {\n console.warn(\"Copy to clipboard failed.\", ex);\n return false;\n }\n document.body.removeChild(textarea);\n }\n}\nvar entityIdValue = entityId.id;\nvar data = widgetContext.data.find((el) => el.datasource.entityId === entityIdValue && el.dataKey.name === 'fw_checksum');\nvar checksum = data.data[0][1];\nif (checksum !== '') {\n copyToClipboard(checksum);\n widgetContext.showSuccessToast('Firmware checksum has been copied to clipboard', 2000, 'top');\n} else {\n data = widgetContext.data.find((el) => el.datasource.entityId === entityIdValue && el.dataKey.name === 'fw_url');\n var url = data.data[0][1];\n if (url !== '') {\n copyToClipboard(url);\n widgetContext.showSuccessToast('Firmware direct URL has been copied to clipboard', 2000, 'top');\n } else {\n widgetContext.showToast('warn', 'Device ' + entityName +' has not firmware set.', 2000, 'top');\n }\n}",
  1775 + "id": "09323079-7111-87f7-90d1-c62cd7d85dc7"
  1776 + }
  1777 + ]
  1778 + },
  1779 + "showTitleIcon": false,
  1780 + "iconColor": "rgba(0, 0, 0, 0.87)",
  1781 + "iconSize": "24px",
  1782 + "titleTooltip": "",
  1783 + "widgetStyle": {}
  1784 + },
  1785 + "row": 0,
  1786 + "col": 0,
  1787 + "id": "3624013b-378c-f110-5eba-ae95c25a4dcc",
  1788 + "typeFullFqn": "system.cards.entities_table"
  1789 + },
  1790 + "d2d13e0d-4e71-889f-9343-ad2f0af9f176": {
  1791 + "type": "latest",
  1792 + "sizeX": 7.5,
  1793 + "sizeY": 6.5,
  1794 + "config": {
  1795 + "timewindow": {
  1796 + "displayValue": "",
  1797 + "selectedTab": 0,
  1798 + "realtime": {
  1799 + "realtimeType": 1,
  1800 + "interval": 1000,
  1801 + "timewindowMs": 86400000,
  1802 + "quickInterval": "CURRENT_DAY"
  1803 + },
  1804 + "history": {
  1805 + "historyType": 0,
  1806 + "interval": 1000,
  1807 + "timewindowMs": 60000,
  1808 + "fixedTimewindow": {
  1809 + "startTimeMs": 1694085363133,
  1810 + "endTimeMs": 1694171763133
  1811 + },
  1812 + "quickInterval": "CURRENT_DAY"
  1813 + },
  1814 + "aggregation": {
  1815 + "type": "NONE",
  1816 + "limit": 200
  1817 + }
  1818 + },
  1819 + "showTitle": true,
  1820 + "backgroundColor": "rgb(255, 255, 255)",
  1821 + "color": "rgba(0, 0, 0, 0.87)",
  1822 + "padding": "4px",
  1823 + "settings": {
  1824 + "enableSearch": true,
  1825 + "displayPagination": true,
  1826 + "defaultPageSize": 10,
  1827 + "defaultSortOrder": "entityName",
  1828 + "displayEntityName": true,
  1829 + "displayEntityType": false,
  1830 + "enableSelectColumnDisplay": false,
  1831 + "enableStickyHeader": true,
  1832 + "enableStickyAction": true,
  1833 + "entitiesTitle": "Devices",
  1834 + "displayEntityLabel": false,
  1835 + "entityNameColumnTitle": "Device"
  1836 + },
  1837 + "title": "New Entities table",
  1838 + "dropShadow": true,
  1839 + "enableFullscreen": true,
  1840 + "titleStyle": {
  1841 + "fontSize": "16px",
  1842 + "fontWeight": 400,
  1843 + "padding": "5px 10px 5px 10px"
  1844 + },
  1845 + "useDashboardTimewindow": false,
  1846 + "showLegend": false,
  1847 + "datasources": [
  1848 + {
  1849 + "type": "entity",
  1850 + "name": null,
  1851 + "entityAliasId": "639da5b4-31f0-0151-6282-c37a3897b7e8",
  1852 + "filterId": "6044e198-df64-cd76-f339-696f220c4943",
  1853 + "dataKeys": [
  1854 + {
  1855 + "name": "current_fw_title",
  1856 + "type": "timeseries",
  1857 + "label": "Current FW title",
  1858 + "color": "#2196f3",
  1859 + "settings": {
  1860 + "columnWidth": "0px",
  1861 + "useCellStyleFunction": false,
  1862 + "cellStyleFunction": "",
  1863 + "useCellContentFunction": false,
  1864 + "defaultColumnVisibility": "visible",
  1865 + "columnSelectionToDisplay": "enabled"
  1866 + },
  1867 + "_hash": 0.09545533885166413,
  1868 + "units": null,
  1869 + "decimals": null,
  1870 + "funcBody": null,
  1871 + "usePostProcessing": null,
  1872 + "postFuncBody": null
  1873 + },
  1874 + {
  1875 + "name": "current_fw_version",
  1876 + "type": "timeseries",
  1877 + "label": "Current FW version",
  1878 + "color": "#4caf50",
  1879 + "settings": {
  1880 + "columnWidth": "0px",
  1881 + "useCellStyleFunction": false,
  1882 + "cellStyleFunction": "",
  1883 + "useCellContentFunction": false,
  1884 + "defaultColumnVisibility": "visible",
  1885 + "columnSelectionToDisplay": "enabled"
  1886 + },
  1887 + "_hash": 0.7206056602328659,
  1888 + "units": null,
  1889 + "decimals": null,
  1890 + "funcBody": null,
  1891 + "usePostProcessing": null,
  1892 + "postFuncBody": null
  1893 + },
  1894 + {
  1895 + "name": "target_fw_title",
  1896 + "type": "timeseries",
  1897 + "label": "Target FW title",
  1898 + "color": "#ffc107",
  1899 + "settings": {
  1900 + "columnWidth": "0px",
  1901 + "useCellStyleFunction": false,
  1902 + "cellStyleFunction": "",
  1903 + "useCellContentFunction": false,
  1904 + "defaultColumnVisibility": "visible",
  1905 + "columnSelectionToDisplay": "enabled"
  1906 + },
  1907 + "_hash": 0.9934225682766313,
  1908 + "units": null,
  1909 + "decimals": null,
  1910 + "funcBody": null,
  1911 + "usePostProcessing": null,
  1912 + "postFuncBody": null
  1913 + },
  1914 + {
  1915 + "name": "target_fw_version",
  1916 + "type": "timeseries",
  1917 + "label": "Target FW version",
  1918 + "color": "#607d8b",
  1919 + "settings": {
  1920 + "columnWidth": "0px",
  1921 + "useCellStyleFunction": false,
  1922 + "cellStyleFunction": "",
  1923 + "useCellContentFunction": false,
  1924 + "cellContentFunction": "",
  1925 + "defaultColumnVisibility": "visible",
  1926 + "columnSelectionToDisplay": "enabled"
  1927 + },
  1928 + "_hash": 0.5251724416842531,
  1929 + "units": null,
  1930 + "decimals": null,
  1931 + "funcBody": null,
  1932 + "usePostProcessing": null,
  1933 + "postFuncBody": null
  1934 + },
  1935 + {
  1936 + "name": "target_fw_ts",
  1937 + "type": "timeseries",
  1938 + "label": "Target FW set time",
  1939 + "color": "#e91e63",
  1940 + "settings": {
  1941 + "columnWidth": "0px",
  1942 + "useCellStyleFunction": false,
  1943 + "cellStyleFunction": "",
  1944 + "useCellContentFunction": true,
  1945 + "defaultColumnVisibility": "visible",
  1946 + "columnSelectionToDisplay": "enabled",
  1947 + "cellContentFunction": "if (value !== '') {\n return ctx.date.transform(value, 'yyyy-MM-dd HH:mm:ss');\n}\nreturn '';"
  1948 + },
  1949 + "_hash": 0.31823244858578237,
  1950 + "units": null,
  1951 + "decimals": null,
  1952 + "funcBody": null,
  1953 + "usePostProcessing": null,
  1954 + "postFuncBody": null
  1955 + },
  1956 + {
  1957 + "name": "fw_state",
  1958 + "type": "timeseries",
  1959 + "label": "Progress",
  1960 + "color": "#9c27b0",
  1961 + "settings": {
  1962 + "columnWidth": "30%",
  1963 + "useCellStyleFunction": true,
  1964 + "useCellContentFunction": true,
  1965 + "defaultColumnVisibility": "visible",
  1966 + "columnSelectionToDisplay": "enabled",
  1967 + "cellStyleFunction": "return {\n 'padding-right': '30px'\n}",
  1968 + "cellContentFunction": "if (value !== '') {\n var mapProgress = {\n 'QUEUED': 0,\n 'INITIATED': 5,\n 'DOWNLOADING': 10,\n 'DOWNLOADED': 55,\n 'VERIFIED': 60,\n 'UPDATING': 70,\n 'FAILED': 99,\n 'UPDATED': 100\n }\n var color = 'mat-primary';\n var progress = mapProgress[value];\n if (value == 'FAILED') {\n color = 'mat-accent';\n }\n return `<mat-progress-bar style=\"height: 8px\" role=\"progressbar\" aria-valuemin=\"0\" aria-valuemax=\"100\" tabindex=\"-1\" mode=\"determinate\" value=\"${progress}\" class=\"mat-progress-bar ${color}\" aria-valuenow=\"${progress}\"><div aria-hidden=\"true\"><svg width=\"100%\" height=\"8\" focusable=\"false\" class=\"mat-progress-bar-background mat-progress-bar-element\"><defs><pattern x=\"4\" y=\"0\" width=\"8\" height=\"4\" patternUnits=\"userSpaceOnUse\" id=\"mat-progress-bar-0\"><circle cx=\"2\" cy=\"2\" r=\"2\"></circle></pattern></defs><rect width=\"100%\" height=\"100%\" fill=\"url(\"/components/progress-bar/overview#mat-progress-bar-0\")\"></rect></svg><div class=\"mat-progress-bar-buffer mat-progress-bar-element\"></div><div class=\"mat-progress-bar-primary mat-progress-bar-fill mat-progress-bar-element\" style=\"transform: scale3d(${progress / 100}, 1, 1);\"></div><div class=\"mat-progress-bar-secondary mat-progress-bar-fill mat-progress-bar-element\"></div></div></mat-progress-bar>`;\n}"
  1969 + },
  1970 + "_hash": 0.8174211757846257,
  1971 + "units": null,
  1972 + "decimals": null,
  1973 + "funcBody": null,
  1974 + "usePostProcessing": null,
  1975 + "postFuncBody": null
  1976 + },
  1977 + {
  1978 + "name": "fw_state",
  1979 + "type": "timeseries",
  1980 + "label": "Status",
  1981 + "color": "#f44336",
  1982 + "settings": {
  1983 + "columnWidth": "130px",
  1984 + "useCellStyleFunction": true,
  1985 + "useCellContentFunction": true,
  1986 + "defaultColumnVisibility": "visible",
  1987 + "columnSelectionToDisplay": "enabled",
  1988 + "cellStyleFunction": "if (value == 'FAILED') {\n return {'color' : '#D93025'};\n}\nreturn {};",
  1989 + "cellContentFunction": "function icon(value) {\n if (value == 'QUEUED') {\n return '<mat-icon _role=\"img\" class=\"mat-icon notranslate material-icons mat-icon-no-color\" aria-hidden=\"true\" data-mat-icon-type=\"font\" style=\"color: #000;\"><svg style=\"width:24px;height:24px\" viewBox=\"0 0 24 24\"><path fill=\"currentColor\" d=\"M6,2V8H6V8L10,12L6,16V16H6V22H18V16H18V16L14,12L18,8V8H18V2H6M16,16.5V20H8V16.5L12,12.5L16,16.5M12,11.5L8,7.5V4H16V7.5L12,11.5Z\" /></svg></mat-icon>';\n }\n if (value == 'INITIATED' || value == 'DOWNLOADING' || value == 'DOWNLOADED') {\n return '<mat-icon _role=\"img\" class=\"mat-icon notranslate material-icons mat-icon-no-color\" aria-hidden=\"true\" data-mat-icon-type=\"font\" style=\"color: #000\"><svg viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12.74 2.1951C11.63 1.2876 10.2575 0.687598 8.75 0.537598V2.0526C9.845 2.1876 10.8425 2.6226 11.675 3.2676L12.74 2.1951ZM13.9475 7.2501H15.4625C15.3125 5.7426 14.7125 4.3701 13.805 3.2601L12.7325 4.3251C13.3775 5.1576 13.8125 6.1551 13.9475 7.2501ZM12.7325 11.6751L13.805 12.7476C14.7125 11.6376 15.3125 10.2576 15.4625 8.7576H13.9475C13.8125 9.8451 13.3775 10.8426 12.7325 11.6751ZM8.75 13.9476V15.4626C10.2575 15.3126 11.63 14.7126 12.74 13.8051L11.6675 12.7326C10.8425 13.3776 9.845 13.8126 8.75 13.9476ZM8.75 8.0001V4.2501H7.25V8.0001H4.25L8 11.7501L11.75 8.0001H8.75ZM7.25 13.9476V15.4626C3.4625 15.0876 0.5 11.8926 0.5 8.0001C0.5 4.1076 3.4625 0.912598 7.25 0.537598V2.0526C4.2875 2.4201 2 4.9401 2 8.0001C2 11.0601 4.2875 13.5801 7.25 13.9476Z\" fill=\"black\"/></svg></mat-icon>';\n }\n if (value == 'VERIFIED' || value == 'UPDATING' ) {\n return '<mat-icon _role=\"img\" class=\"mat-icon notranslate material-icons mat-icon-no-color\" aria-hidden=\"true\" data-mat-icon-type=\"font\" style=\"color: #000\">update</mat-icon>';\n }\n if (value == 'UPDATED') {\n return '<mat-icon _role=\"img\" class=\"mat-icon notranslate material-icons mat-icon-no-color\" aria-hidden=\"true\" data-mat-icon-type=\"font\" style=\"color: #000\"><svg style=\"width:22px;height:22px\" viewBox=\"0 0 34 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M33.26 2.82L30.44 0L12.06 18.38L3.55999 9.9L0.73999 12.72L12.06 24.04L33.26 2.82Z\" fill=\"black\"/><path d=\"M31 28H3V32H31V28Z\" fill=\"black\"/></svg></mat-icon>';\n }\n if (value == 'FAILED') {\n return '<mat-icon _role=\"img\" class=\"mat-icon notranslate material-icons mat-icon-no-color\" aria-hidden=\"true\" data-mat-icon-type=\"font\" style=\"color: #D93025\">warning</mat-icon>';\n }\n return '';\n}\nfunction capitalize (s) {\n if (typeof s !== 'string') return '';\n return s.charAt(0).toUpperCase() + s.slice(1).toLowerCase();\n}\n\nreturn icon(value) + '<span style=\"vertical-align: super;padding-left: 8px;\">' + capitalize(value) + '</span>';"
  1990 + },
  1991 + "_hash": 0.7764426948615217,
  1992 + "units": null,
  1993 + "decimals": null,
  1994 + "funcBody": null,
  1995 + "usePostProcessing": null,
  1996 + "postFuncBody": null
  1997 + },
  1998 + {
  1999 + "name": "fw_checksum",
  2000 + "type": "attribute",
  2001 + "label": "fw_checksum",
  2002 + "color": "#3f51b5",
  2003 + "settings": {
  2004 + "columnWidth": "0px",
  2005 + "useCellStyleFunction": false,
  2006 + "cellStyleFunction": "",
  2007 + "useCellContentFunction": false,
  2008 + "defaultColumnVisibility": "hidden",
  2009 + "columnSelectionToDisplay": "disabled"
  2010 + },
  2011 + "_hash": 0.5594087842471693,
  2012 + "units": null,
  2013 + "decimals": null,
  2014 + "funcBody": null,
  2015 + "usePostProcessing": null,
  2016 + "postFuncBody": null
  2017 + },
  2018 + {
  2019 + "name": "fw_url",
  2020 + "type": "attribute",
  2021 + "label": "fw_url",
  2022 + "color": "#e91e63",
  2023 + "settings": {
  2024 + "columnWidth": "0px",
  2025 + "useCellStyleFunction": false,
  2026 + "cellStyleFunction": "",
  2027 + "useCellContentFunction": false,
  2028 + "cellContentFunction": "",
  2029 + "defaultColumnVisibility": "hidden",
  2030 + "columnSelectionToDisplay": "disabled"
  2031 + },
  2032 + "_hash": 0.4204673738685043,
  2033 + "units": null,
  2034 + "decimals": null,
  2035 + "funcBody": null,
  2036 + "usePostProcessing": null,
  2037 + "postFuncBody": null
  2038 + }
  2039 + ]
  2040 + }
  2041 + ],
  2042 + "actions": {
  2043 + "actionCellButton": [
  2044 + {
  2045 + "name": "History firmware update",
  2046 + "icon": "history",
  2047 + "type": "openDashboardState",
  2048 + "targetDashboardStateId": "device_firmware_history",
  2049 + "setEntityId": true,
  2050 + "stateEntityParamName": null,
  2051 + "openInSeparateDialog": false,
  2052 + "dialogTitle": "",
  2053 + "dialogHideDashboardToolbar": true,
  2054 + "dialogWidth": null,
  2055 + "dialogHeight": null,
  2056 + "openRightLayout": false,
  2057 + "id": "98a1406c-3301-bc2f-2c5d-d637ce3b663b"
  2058 + },
  2059 + {
  2060 + "name": "Edit firmware",
  2061 + "icon": "edit",
  2062 + "type": "customPretty",
  2063 + "customHtml": "<form #editEntityForm=\"ngForm\" [formGroup]=\"editEntityFormGroup\"\n (ngSubmit)=\"save()\" class=\"edit-entity-form\">\n <mat-toolbar fxLayout=\"row\" color=\"primary\">\n <h2>Edit firmware {{entityName}}</h2>\n <span fxFlex></span>\n <button mat-icon-button (click)=\"cancel()\" type=\"button\">\n <mat-icon class=\"material-icons\">close</mat-icon>\n </button>\n </mat-toolbar>\n <mat-progress-bar color=\"warn\" mode=\"indeterminate\" *ngIf=\"isLoading$ | async\">\n </mat-progress-bar>\n <div style=\"height: 4px;\" *ngIf=\"!(isLoading$ | async)\"></div>\n <div *ngIf=\"entity.deviceProfileId\" mat-dialog-content fxLayout=\"column\">\n <tb-ota-package-autocomplete\n [useFullEntityId]=\"true\"\n [deviceProfileId]=\"entity.deviceProfileId.id\"\n formControlName=\"firmwareId\">\n </tb-ota-package-autocomplete>\n </div>\n <div mat-dialog-actions fxLayout=\"row\" fxLayoutAlign=\"end center\">\n <button mat-button color=\"primary\"\n type=\"button\"\n [disabled]=\"(isLoading$ | async)\"\n (click)=\"cancel()\" cdkFocusInitial>\n Cancel\n </button>\n <button mat-button mat-raised-button color=\"primary\"\n type=\"submit\"\n [disabled]=\"(isLoading$ | async) || editEntityForm.invalid || !editEntityForm.dirty\">\n Save\n </button>\n </div>\n</form>",
  2064 + "customCss": "form {\n min-width: 300px !important;\n}",
  2065 + "customFunction": "let $injector = widgetContext.$scope.$injector;\nlet customDialog = $injector.get(widgetContext.servicesMap.get('customDialog'));\nlet entityService = $injector.get(widgetContext.servicesMap.get('entityService'));\nlet deviceService = $injector.get(widgetContext.servicesMap.get('deviceService'));\n\nopenEditEntityDialog();\n\nfunction openEditEntityDialog() {\n customDialog.customDialog(htmlTemplate, EditEntityDialogController).subscribe();\n}\n\nfunction EditEntityDialogController(instance) {\n let vm = instance;\n\n vm.entityName = entityName;\n vm.entity = {};\n\n vm.editEntityFormGroup = vm.fb.group({\n firmwareId: [null]\n });\n\n getEntityInfo();\n\n vm.cancel = function() {\n vm.dialogRef.close(null);\n };\n\n vm.save = function() {\n vm.editEntityFormGroup.markAsPristine();\n saveEntity().subscribe(\n function () {\n // widgetContext.updateAliases();\n vm.dialogRef.close(null);\n }\n );\n };\n\n\n function getEntityInfo() {\n entityService.getEntity(entityId.entityType, entityId.id).subscribe(\n function (data) {\n vm.entity = data;\n vm.editEntityFormGroup.patchValue({\n firmwareId: vm.entity.firmwareId\n }, {emitEvent: false});\n }\n );\n }\n\n function saveEntity() {\n const formValues = vm.editEntityFormGroup.value;\n vm.entity.firmwareId = formValues.firmwareId;\n return deviceService.saveDevice(vm.entity);\n }\n}",
  2066 + "customResources": [],
  2067 + "id": "23099c1d-454b-25dc-8bc0-7cf33c21c5d5"
  2068 + },
  2069 + {
  2070 + "name": "Download firmware",
  2071 + "icon": "file_download",
  2072 + "type": "custom",
  2073 + "customFunction": "let $injector = widgetContext.$scope.$injector;\nlet entityService = $injector.get(widgetContext.servicesMap.get('entityService'));\nlet otaPackageService = $injector.get(widgetContext.servicesMap.get('otaPackageService'));\nlet deviceProfileService = $injector.get(widgetContext.servicesMap.get('deviceProfileService'));\n\ngetDeviceFirmware();\n\nfunction getDeviceFirmware() {\n var entityIdValue = entityId.id;\n var data = widgetContext.data.find((el) => el.datasource.entityId === entityIdValue && el.dataKey.name === 'fw_url');\n var url = data.data[0][1];\n if (url === '') {\n entityService.getEntity(entityId.entityType, entityId.id).subscribe(\n function (data) {\n if (data.firmwareId !== null) {\n otaPackageService.downloadOtaPackage(data.firmwareId.id).subscribe(); \n } else {\n deviceProfileService.getDeviceProfile(data.deviceProfileId.id).subscribe(\n function (deviceProfile) {\n if (deviceProfile.firmwareId !== null) {\n otaPackageService.downloadOtaPackage(deviceProfile.firmwareId.id).subscribe();\n } else {\n widgetContext.showToast('warn', 'Device ' + entityName +' has not firmware set.', 2000, 'top');\n }\n });\n }\n }\n );\n } else {\n widgetContext.showToast('warn', 'Device ' + entityName +' has not firmware set.', 2000, 'top');\n }\n}",
  2074 + "id": "12533058-42f6-e75f-620c-219c48d01ec0"
  2075 + },
  2076 + {
  2077 + "name": "Copy checksum/URL",
  2078 + "icon": "content_copy",
  2079 + "type": "custom",
  2080 + "customFunction": "function copyToClipboard(text) {\n if (window.clipboardData && window.clipboardData.setData) {\n return window.clipboardData.setData(\"Text\", text);\n\n }\n else if (document.queryCommandSupported && document.queryCommandSupported(\"copy\")) {\n var textarea = document.createElement(\"textarea\");\n textarea.textContent = text;\n textarea.style.position = \"fixed\";\n document.body.appendChild(textarea);\n textarea.select();\n try {\n return document.execCommand(\"copy\");\n }\n catch (ex) {\n console.warn(\"Copy to clipboard failed.\", ex);\n return false;\n }\n document.body.removeChild(textarea);\n }\n}\nvar entityIdValue = entityId.id;\nvar data = widgetContext.data.find((el) => el.datasource.entityId === entityIdValue && el.dataKey.name === 'fw_checksum');\nvar checksum = data.data[0][1];\nif (checksum !== '') {\n copyToClipboard(checksum);\n widgetContext.showSuccessToast('Firmware checksum has been copied to clipboard', 2000, 'top');\n} else {\n data = widgetContext.data.find((el) => el.datasource.entityId === entityIdValue && el.dataKey.name === 'fw_url');\n var url = data.data[0][1];\n if (url !== '') {\n copyToClipboard(url);\n widgetContext.showSuccessToast('Firmware direct URL has been copied to clipboard', 2000, 'top');\n } else {\n widgetContext.showToast('warn', 'Device ' + entityName +' has not firmware set.', 2000, 'top');\n }\n}",
  2081 + "id": "09323079-7111-87f7-90d1-c62cd7d85dc7"
  2082 + }
  2083 + ]
  2084 + },
  2085 + "showTitleIcon": false,
  2086 + "iconColor": "rgba(0, 0, 0, 0.87)",
  2087 + "iconSize": "24px",
  2088 + "titleTooltip": "",
  2089 + "widgetStyle": {}
  2090 + },
  2091 + "row": 0,
  2092 + "col": 0,
  2093 + "id": "d2d13e0d-4e71-889f-9343-ad2f0af9f176",
  2094 + "typeFullFqn": "system.cards.entities_table"
  2095 + }
  2096 + },
  2097 + "states": {
  2098 + "default": {
  2099 + "name": "Device list",
  2100 + "root": true,
  2101 + "layouts": {
  2102 + "main": {
  2103 + "widgets": {
  2104 + "cd03188e-cd9d-9601-fd57-da4cb95fc016": {
  2105 + "sizeX": 19,
  2106 + "sizeY": 12,
  2107 + "row": 0,
  2108 + "col": 0
  2109 + },
  2110 + "17543c57-af4a-2c1e-bf12-53a7b46791e6": {
  2111 + "sizeX": 5,
  2112 + "sizeY": 3,
  2113 + "row": 0,
  2114 + "col": 19
  2115 + },
  2116 + "6c1c4e1a-bce0-f5ad-ff8b-ba1dfc5a4ec6": {
  2117 + "sizeX": 5,
  2118 + "sizeY": 3,
  2119 + "row": 3,
  2120 + "col": 19
  2121 + },
  2122 + "e6674227-9cf3-a2f6-ecac-5ccfc38a3c81": {
  2123 + "sizeX": 5,
  2124 + "sizeY": 3,
  2125 + "row": 9,
  2126 + "col": 19
  2127 + },
  2128 + "77b10144-b904-edd5-8c7c-8fb75616c6d8": {
  2129 + "sizeX": 5,
  2130 + "sizeY": 3,
  2131 + "row": 6,
  2132 + "col": 19
  2133 + }
  2134 + },
  2135 + "gridSettings": {
  2136 + "backgroundColor": "#eeeeee",
  2137 + "color": "rgba(0,0,0,0.870588)",
  2138 + "columns": 24,
  2139 + "margin": 12,
  2140 + "backgroundSizeMode": "100%",
  2141 + "autoFillHeight": true,
  2142 + "backgroundImageUrl": null,
  2143 + "mobileAutoFillHeight": true,
  2144 + "mobileRowHeight": 70,
  2145 + "outerMargin": true
  2146 + }
  2147 + }
  2148 + }
  2149 + },
  2150 + "device_firmware_history": {
  2151 + "name": "Firmware history: ${entityName}",
  2152 + "root": false,
  2153 + "layouts": {
  2154 + "main": {
  2155 + "widgets": {
  2156 + "100b756c-0082-6505-3ae1-3603e6deea48": {
  2157 + "sizeX": 24,
  2158 + "sizeY": 12,
  2159 + "row": 0,
  2160 + "col": 0
  2161 + }
  2162 + },
  2163 + "gridSettings": {
  2164 + "backgroundColor": "#eeeeee",
  2165 + "color": "rgba(0,0,0,0.870588)",
  2166 + "columns": 24,
  2167 + "margin": 10,
  2168 + "backgroundSizeMode": "100%",
  2169 + "autoFillHeight": true,
  2170 + "backgroundImageUrl": null,
  2171 + "mobileAutoFillHeight": false,
  2172 + "mobileRowHeight": 70,
  2173 + "outerMargin": true
  2174 + }
  2175 + }
  2176 + }
  2177 + },
  2178 + "device_waiting": {
  2179 + "name": "Device waiting",
  2180 + "root": false,
  2181 + "layouts": {
  2182 + "main": {
  2183 + "widgets": {
  2184 + "21be08bb-ec90-f760-ad6f-e7678f12c401": {
  2185 + "sizeX": 24,
  2186 + "sizeY": 12,
  2187 + "row": 0,
  2188 + "col": 0
  2189 + }
  2190 + },
  2191 + "gridSettings": {
  2192 + "backgroundColor": "#eeeeee",
  2193 + "color": "rgba(0,0,0,0.870588)",
  2194 + "columns": 24,
  2195 + "margin": 10,
  2196 + "backgroundSizeMode": "100%",
  2197 + "autoFillHeight": true,
  2198 + "backgroundImageUrl": null,
  2199 + "mobileAutoFillHeight": false,
  2200 + "mobileRowHeight": 70,
  2201 + "outerMargin": true
  2202 + }
  2203 + }
  2204 + }
  2205 + },
  2206 + "device_updating": {
  2207 + "name": "Device updating",
  2208 + "root": false,
  2209 + "layouts": {
  2210 + "main": {
  2211 + "widgets": {
  2212 + "e8280043-d3dc-7acb-c2ff-a4522972ff91": {
  2213 + "sizeX": 24,
  2214 + "sizeY": 12,
  2215 + "row": 0,
  2216 + "col": 0
  2217 + }
  2218 + },
  2219 + "gridSettings": {
  2220 + "backgroundColor": "#eeeeee",
  2221 + "color": "rgba(0,0,0,0.870588)",
  2222 + "columns": 24,
  2223 + "margin": 10,
  2224 + "backgroundSizeMode": "100%",
  2225 + "autoFillHeight": true,
  2226 + "backgroundImageUrl": null,
  2227 + "mobileAutoFillHeight": false,
  2228 + "mobileRowHeight": 70,
  2229 + "outerMargin": true
  2230 + }
  2231 + }
  2232 + }
  2233 + },
  2234 + "device_updated": {
  2235 + "name": "Device updated",
  2236 + "root": false,
  2237 + "layouts": {
  2238 + "main": {
  2239 + "widgets": {
  2240 + "d2d13e0d-4e71-889f-9343-ad2f0af9f176": {
  2241 + "sizeX": 27,
  2242 + "sizeY": 12,
  2243 + "row": 0,
  2244 + "col": 0
  2245 + }
  2246 + },
  2247 + "gridSettings": {
  2248 + "backgroundColor": "#eeeeee",
  2249 + "color": "rgba(0,0,0,0.870588)",
  2250 + "columns": 24,
  2251 + "margin": 10,
  2252 + "backgroundSizeMode": "100%",
  2253 + "autoFillHeight": true,
  2254 + "backgroundImageUrl": null,
  2255 + "mobileAutoFillHeight": false,
  2256 + "mobileRowHeight": 70,
  2257 + "outerMargin": true
  2258 + }
  2259 + }
  2260 + }
  2261 + },
  2262 + "device_error": {
  2263 + "name": "Device failed",
  2264 + "root": false,
  2265 + "layouts": {
  2266 + "main": {
  2267 + "widgets": {
  2268 + "3624013b-378c-f110-5eba-ae95c25a4dcc": {
  2269 + "sizeX": 24,
  2270 + "sizeY": 12,
  2271 + "row": 0,
  2272 + "col": 0
  2273 + }
  2274 + },
  2275 + "gridSettings": {
  2276 + "backgroundColor": "#eeeeee",
  2277 + "color": "rgba(0,0,0,0.870588)",
  2278 + "columns": 24,
  2279 + "margin": 10,
  2280 + "backgroundSizeMode": "100%",
  2281 + "autoFillHeight": true,
  2282 + "backgroundImageUrl": null,
  2283 + "mobileAutoFillHeight": false,
  2284 + "mobileRowHeight": 70,
  2285 + "outerMargin": true
  2286 + }
  2287 + }
  2288 + }
  2289 + }
  2290 + },
  2291 + "entityAliases": {
  2292 + "639da5b4-31f0-0151-6282-c37a3897b7e8": {
  2293 + "id": "639da5b4-31f0-0151-6282-c37a3897b7e8",
  2294 + "alias": "All devices",
  2295 + "filter": {
  2296 + "type": "entityType",
  2297 + "resolveMultiple": true,
  2298 + "entityType": "DEVICE"
  2299 + }
  2300 + },
  2301 + "19f41c21-d9af-e666-8f50-e1748778f955": {
  2302 + "id": "19f41c21-d9af-e666-8f50-e1748778f955",
  2303 + "alias": "State entity",
  2304 + "filter": {
  2305 + "type": "stateEntity",
  2306 + "resolveMultiple": false,
  2307 + "stateEntityParamName": null,
  2308 + "defaultStateEntity": null
  2309 + }
  2310 + }
  2311 + },
  2312 + "filters": {
  2313 + "19a0ad1c-b31d-4a29-9d7b-5d87e2a8ea6e": {
  2314 + "id": "19a0ad1c-b31d-4a29-9d7b-5d87e2a8ea6e",
  2315 + "filter": "WaitingDevicesFilter",
  2316 + "keyFilters": [
  2317 + {
  2318 + "key": {
  2319 + "type": "TIME_SERIES",
  2320 + "key": "fw_state"
  2321 + },
  2322 + "valueType": "STRING",
  2323 + "predicates": [
  2324 + {
  2325 + "keyFilterPredicate": {
  2326 + "operation": "EQUAL",
  2327 + "value": {
  2328 + "defaultValue": "QUEUED",
  2329 + "dynamicValue": null
  2330 + },
  2331 + "ignoreCase": false,
  2332 + "type": "STRING"
  2333 + },
  2334 + "userInfo": {
  2335 + "editable": true,
  2336 + "label": "",
  2337 + "autogeneratedLabel": true,
  2338 + "order": 0
  2339 + }
  2340 + }
  2341 + ]
  2342 + }
  2343 + ],
  2344 + "editable": false
  2345 + },
  2346 + "579f0468-9ce9-7e3e-b34c-88dd3de59897": {
  2347 + "id": "579f0468-9ce9-7e3e-b34c-88dd3de59897",
  2348 + "filter": "UpdatingDevicesFilter",
  2349 + "keyFilters": [
  2350 + {
  2351 + "key": {
  2352 + "type": "TIME_SERIES",
  2353 + "key": "fw_state"
  2354 + },
  2355 + "valueType": "STRING",
  2356 + "predicates": [
  2357 + {
  2358 + "keyFilterPredicate": {
  2359 + "operation": "OR",
  2360 + "predicates": [
  2361 + {
  2362 + "keyFilterPredicate": {
  2363 + "operation": "EQUAL",
  2364 + "value": {
  2365 + "defaultValue": "INITIATED",
  2366 + "dynamicValue": null
  2367 + },
  2368 + "ignoreCase": false,
  2369 + "type": "STRING"
  2370 + },
  2371 + "userInfo": {
  2372 + "editable": false,
  2373 + "label": "fw_state equel",
  2374 + "autogeneratedLabel": true,
  2375 + "order": 0
  2376 + }
  2377 + },
  2378 + {
  2379 + "keyFilterPredicate": {
  2380 + "operation": "EQUAL",
  2381 + "value": {
  2382 + "defaultValue": "DOWNLOADING",
  2383 + "dynamicValue": null
  2384 + },
  2385 + "ignoreCase": false,
  2386 + "type": "STRING"
  2387 + },
  2388 + "userInfo": {
  2389 + "editable": false,
  2390 + "label": "fw_state equal",
  2391 + "autogeneratedLabel": true,
  2392 + "order": 0
  2393 + }
  2394 + },
  2395 + {
  2396 + "keyFilterPredicate": {
  2397 + "operation": "EQUAL",
  2398 + "value": {
  2399 + "defaultValue": "DOWNLOADED",
  2400 + "dynamicValue": null
  2401 + },
  2402 + "ignoreCase": false,
  2403 + "type": "STRING"
  2404 + },
  2405 + "userInfo": {
  2406 + "editable": false,
  2407 + "label": "fw_state equal",
  2408 + "autogeneratedLabel": true,
  2409 + "order": 0
  2410 + }
  2411 + },
  2412 + {
  2413 + "keyFilterPredicate": {
  2414 + "operation": "EQUAL",
  2415 + "value": {
  2416 + "defaultValue": "VERIFIED",
  2417 + "dynamicValue": null
  2418 + },
  2419 + "ignoreCase": false,
  2420 + "type": "STRING"
  2421 + },
  2422 + "userInfo": {
  2423 + "editable": false,
  2424 + "label": "fw_state equal",
  2425 + "autogeneratedLabel": true,
  2426 + "order": 0
  2427 + }
  2428 + },
  2429 + {
  2430 + "keyFilterPredicate": {
  2431 + "operation": "EQUAL",
  2432 + "value": {
  2433 + "defaultValue": "UPDATING",
  2434 + "dynamicValue": null
  2435 + },
  2436 + "ignoreCase": false,
  2437 + "type": "STRING"
  2438 + },
  2439 + "userInfo": {
  2440 + "editable": false,
  2441 + "label": "fw_state equal",
  2442 + "autogeneratedLabel": true,
  2443 + "order": 0
  2444 + }
  2445 + }
  2446 + ],
  2447 + "type": "COMPLEX"
  2448 + },
  2449 + "userInfo": {
  2450 + "editable": true,
  2451 + "label": "",
  2452 + "autogeneratedLabel": true,
  2453 + "order": 0
  2454 + }
  2455 + }
  2456 + ]
  2457 + }
  2458 + ],
  2459 + "editable": false
  2460 + },
  2461 + "6044e198-df64-cd76-f339-696f220c4943": {
  2462 + "id": "6044e198-df64-cd76-f339-696f220c4943",
  2463 + "filter": "UpdetedDevicesFilter",
  2464 + "keyFilters": [
  2465 + {
  2466 + "key": {
  2467 + "type": "TIME_SERIES",
  2468 + "key": "fw_state"
  2469 + },
  2470 + "valueType": "STRING",
  2471 + "predicates": [
  2472 + {
  2473 + "keyFilterPredicate": {
  2474 + "operation": "EQUAL",
  2475 + "value": {
  2476 + "defaultValue": "UPDATED",
  2477 + "dynamicValue": null
  2478 + },
  2479 + "ignoreCase": false,
  2480 + "type": "STRING"
  2481 + },
  2482 + "userInfo": {
  2483 + "editable": true,
  2484 + "label": "",
  2485 + "autogeneratedLabel": true,
  2486 + "order": 0
  2487 + }
  2488 + }
  2489 + ]
  2490 + }
  2491 + ],
  2492 + "editable": false
  2493 + },
  2494 + "bdbc6ea1-95a7-3912-341a-58dc7704a00f": {
  2495 + "id": "bdbc6ea1-95a7-3912-341a-58dc7704a00f",
  2496 + "filter": "FailedDevicesFilter",
  2497 + "keyFilters": [
  2498 + {
  2499 + "key": {
  2500 + "type": "TIME_SERIES",
  2501 + "key": "fw_state"
  2502 + },
  2503 + "valueType": "STRING",
  2504 + "predicates": [
  2505 + {
  2506 + "keyFilterPredicate": {
  2507 + "operation": "EQUAL",
  2508 + "value": {
  2509 + "defaultValue": "FAILED",
  2510 + "dynamicValue": null
  2511 + },
  2512 + "ignoreCase": false,
  2513 + "type": "STRING"
  2514 + },
  2515 + "userInfo": {
  2516 + "editable": true,
  2517 + "label": "",
  2518 + "autogeneratedLabel": true,
  2519 + "order": 0
  2520 + }
  2521 + }
  2522 + ]
  2523 + }
  2524 + ],
  2525 + "editable": false
  2526 + },
  2527 + "8fdb88d0-50ac-2232-fdb7-69c30c16544e": {
  2528 + "id": "8fdb88d0-50ac-2232-fdb7-69c30c16544e",
  2529 + "filter": "DeviceSearch",
  2530 + "keyFilters": [
  2531 + {
  2532 + "key": {
  2533 + "type": "ENTITY_FIELD",
  2534 + "key": "name"
  2535 + },
  2536 + "valueType": "STRING",
  2537 + "predicates": [
  2538 + {
  2539 + "keyFilterPredicate": {
  2540 + "operation": "CONTAINS",
  2541 + "value": {
  2542 + "defaultValue": ""
  2543 + },
  2544 + "ignoreCase": true,
  2545 + "type": "STRING"
  2546 + },
  2547 + "userInfo": {
  2548 + "editable": true,
  2549 + "label": "Device name",
  2550 + "autogeneratedLabel": false,
  2551 + "order": 0
  2552 + }
  2553 + }
  2554 + ]
  2555 + }
  2556 + ],
  2557 + "editable": true
  2558 + }
  2559 + },
  2560 + "timewindow": {
  2561 + "displayValue": "",
  2562 + "hideInterval": false,
  2563 + "hideAggregation": false,
  2564 + "hideAggInterval": false,
  2565 + "hideTimezone": false,
  2566 + "selectedTab": 0,
  2567 + "realtime": {
  2568 + "realtimeType": 0,
  2569 + "interval": 1000,
  2570 + "timewindowMs": 60000,
  2571 + "quickInterval": "CURRENT_DAY"
  2572 + },
  2573 + "history": {
  2574 + "historyType": 0,
  2575 + "interval": 1000,
  2576 + "timewindowMs": 60000,
  2577 + "fixedTimewindow": {
  2578 + "startTimeMs": 1618998609030,
  2579 + "endTimeMs": 1619085009030
  2580 + },
  2581 + "quickInterval": "CURRENT_DAY"
  2582 + },
  2583 + "aggregation": {
  2584 + "type": "AVG",
  2585 + "limit": 25000
  2586 + }
  2587 + },
  2588 + "settings": {
  2589 + "stateControllerId": "entity",
  2590 + "showTitle": false,
  2591 + "showDashboardsSelect": false,
  2592 + "showEntitiesSelect": false,
  2593 + "showDashboardTimewindow": true,
  2594 + "showDashboardExport": false,
  2595 + "toolbarAlwaysOpen": true,
  2596 + "titleColor": "rgba(0,0,0,0.870588)",
  2597 + "showFilters": true,
  2598 + "showDashboardLogo": false,
  2599 + "dashboardLogoUrl": null,
  2600 + "showUpdateDashboardImage": false
  2601 + }
  2602 + },
  2603 + "externalId": null,
  2604 + "name": "Firmware"
  2605 +}
  1 +{
  2 + "title": "Rule Engine Statistics",
  3 + "image": null,
  4 + "mobileHide": false,
  5 + "mobileOrder": null,
  6 + "configuration": {
  7 + "widgets": {
  8 + "5eb79712-5c24-3060-7e4f-6af36b8f842d": {
  9 + "type": "timeseries",
  10 + "sizeX": 24,
  11 + "sizeY": 5,
  12 + "config": {
  13 + "datasources": [
  14 + {
  15 + "type": "entity",
  16 + "entityAliasId": "140f23dd-e3a0-ed98-6189-03c49d2d8018",
  17 + "dataKeys": [
  18 + {
  19 + "name": "ruleEngineException",
  20 + "type": "timeseries",
  21 + "label": "Rule Chain",
  22 + "color": "#2196f3",
  23 + "settings": {
  24 + "useCellStyleFunction": false,
  25 + "useCellContentFunction": true,
  26 + "cellContentFunction": "return JSON.parse(value).ruleChainName;"
  27 + },
  28 + "_hash": 0.9954481282345906
  29 + },
  30 + {
  31 + "name": "ruleEngineException",
  32 + "type": "timeseries",
  33 + "label": "Rule Node",
  34 + "color": "#4caf50",
  35 + "settings": {
  36 + "useCellStyleFunction": false,
  37 + "useCellContentFunction": true,
  38 + "cellContentFunction": "return JSON.parse(value).ruleNodeName;"
  39 + },
  40 + "_hash": 0.18580357036589978
  41 + },
  42 + {
  43 + "name": "ruleEngineException",
  44 + "type": "timeseries",
  45 + "label": "Latest Error",
  46 + "color": "#f44336",
  47 + "settings": {
  48 + "useCellStyleFunction": false,
  49 + "useCellContentFunction": true,
  50 + "cellContentFunction": "return JSON.parse(value).message;"
  51 + },
  52 + "_hash": 0.7255162989552142
  53 + }
  54 + ],
  55 + "alarmFilterConfig": {
  56 + "statusList": [
  57 + "ACTIVE"
  58 + ]
  59 + },
  60 + "latestDataKeys": [
  61 + {
  62 + "name": "queueName",
  63 + "type": "entityField",
  64 + "label": "Queue name",
  65 + "color": "#ffc107",
  66 + "settings": {
  67 + "show": false,
  68 + "order": null,
  69 + "useCellStyleFunction": false,
  70 + "cellStyleFunction": "",
  71 + "useCellContentFunction": false,
  72 + "cellContentFunction": "",
  73 + "defaultColumnVisibility": "visible",
  74 + "columnSelectionToDisplay": "enabled"
  75 + },
  76 + "_hash": 0.8104572478982748,
  77 + "aggregationType": null,
  78 + "units": null,
  79 + "decimals": null,
  80 + "funcBody": null,
  81 + "usePostProcessing": null,
  82 + "postFuncBody": null
  83 + },
  84 + {
  85 + "name": "serviceId",
  86 + "type": "entityField",
  87 + "label": "Service Id",
  88 + "color": "#607d8b",
  89 + "settings": {
  90 + "show": false,
  91 + "order": null,
  92 + "useCellStyleFunction": false,
  93 + "cellStyleFunction": "",
  94 + "useCellContentFunction": false,
  95 + "cellContentFunction": "",
  96 + "defaultColumnVisibility": "visible",
  97 + "columnSelectionToDisplay": "enabled"
  98 + },
  99 + "_hash": 0.38329217099945034,
  100 + "aggregationType": null,
  101 + "units": null,
  102 + "decimals": null,
  103 + "funcBody": null,
  104 + "usePostProcessing": null,
  105 + "postFuncBody": null
  106 + }
  107 + ]
  108 + }
  109 + ],
  110 + "timewindow": {
  111 + "realtime": {
  112 + "interval": 1000,
  113 + "timewindowMs": 86400000
  114 + },
  115 + "aggregation": {
  116 + "type": "NONE",
  117 + "limit": 200
  118 + }
  119 + },
  120 + "showTitle": true,
  121 + "backgroundColor": "rgb(255, 255, 255)",
  122 + "color": "rgba(0, 0, 0, 0.87)",
  123 + "padding": "8px",
  124 + "settings": {
  125 + "showTimestamp": true,
  126 + "displayPagination": true,
  127 + "defaultPageSize": 10,
  128 + "enableSearch": true,
  129 + "enableSelectColumnDisplay": true
  130 + },
  131 + "title": "Exceptions",
  132 + "dropShadow": true,
  133 + "enableFullscreen": true,
  134 + "titleStyle": {
  135 + "fontSize": "16px",
  136 + "fontWeight": 400
  137 + },
  138 + "useDashboardTimewindow": false,
  139 + "showLegend": false,
  140 + "widgetStyle": {},
  141 + "actions": {},
  142 + "showTitleIcon": false,
  143 + "titleIcon": null,
  144 + "iconColor": "rgba(0, 0, 0, 0.87)",
  145 + "iconSize": "24px",
  146 + "titleTooltip": "",
  147 + "displayTimewindow": true,
  148 + "configMode": "basic",
  149 + "titleFont": null,
  150 + "titleColor": null
  151 + },
  152 + "id": "5eb79712-5c24-3060-7e4f-6af36b8f842d",
  153 + "typeFullFqn": "system.cards.timeseries_table"
  154 + },
  155 + "42face47-730d-f930-fef5-2a1ef6304b16": {
  156 + "typeFullFqn": "system.time_series_chart",
  157 + "type": "timeseries",
  158 + "sizeX": 8,
  159 + "sizeY": 5,
  160 + "config": {
  161 + "datasources": [
  162 + {
  163 + "type": "entity",
  164 + "entityAliasId": "140f23dd-e3a0-ed98-6189-03c49d2d8018",
  165 + "dataKeys": [
  166 + {
  167 + "name": "successfulMsgs",
  168 + "type": "timeseries",
  169 + "label": "{i18n:api-usage.successful}",
  170 + "color": "#4caf50",
  171 + "settings": {
  172 + "yAxisId": "default",
  173 + "showInLegend": true,
  174 + "dataHiddenByDefault": false,
  175 + "type": "line",
  176 + "lineSettings": {
  177 + "showLine": true,
  178 + "step": false,
  179 + "stepType": "start",
  180 + "smooth": false,
  181 + "lineType": "solid",
  182 + "lineWidth": 2.5,
  183 + "showPoints": false,
  184 + "showPointLabel": false,
  185 + "pointLabelPosition": "top",
  186 + "pointLabelFont": {
  187 + "family": "Roboto",
  188 + "size": 11,
  189 + "sizeUnit": "px",
  190 + "style": "normal",
  191 + "weight": "400",
  192 + "lineHeight": "1"
  193 + },
  194 + "pointLabelColor": "rgba(0, 0, 0, 0.76)",
  195 + "pointShape": "circle",
  196 + "pointSize": 12,
  197 + "fillAreaSettings": {
  198 + "type": "none",
  199 + "opacity": 0.4,
  200 + "gradient": {
  201 + "start": 100,
  202 + "end": 0
  203 + }
  204 + }
  205 + },
  206 + "barSettings": {
  207 + "showBorder": false,
  208 + "borderWidth": 2,
  209 + "borderRadius": 0,
  210 + "showLabel": false,
  211 + "labelPosition": "top",
  212 + "labelFont": {
  213 + "family": "Roboto",
  214 + "size": 11,
  215 + "sizeUnit": "px",
  216 + "style": "normal",
  217 + "weight": "400",
  218 + "lineHeight": "1"
  219 + },
  220 + "labelColor": "rgba(0, 0, 0, 0.76)",
  221 + "backgroundSettings": {
  222 + "type": "none",
  223 + "opacity": 0.4,
  224 + "gradient": {
  225 + "start": 100,
  226 + "end": 0
  227 + }
  228 + }
  229 + }
  230 + },
  231 + "_hash": 0.15490750967648736,
  232 + "aggregationType": null,
  233 + "units": null,
  234 + "decimals": null,
  235 + "funcBody": null,
  236 + "usePostProcessing": null,
  237 + "postFuncBody": null
  238 + },
  239 + {
  240 + "name": "failedMsgs",
  241 + "type": "timeseries",
  242 + "label": "{i18n:api-usage.permanent-failures}",
  243 + "color": "#ef5350",
  244 + "settings": {
  245 + "yAxisId": "default",
  246 + "showInLegend": true,
  247 + "dataHiddenByDefault": false,
  248 + "type": "line",
  249 + "lineSettings": {
  250 + "showLine": true,
  251 + "step": false,
  252 + "stepType": "start",
  253 + "smooth": false,
  254 + "lineType": "solid",
  255 + "lineWidth": 2.5,
  256 + "showPoints": false,
  257 + "showPointLabel": false,
  258 + "pointLabelPosition": "top",
  259 + "pointLabelFont": {
  260 + "family": "Roboto",
  261 + "size": 11,
  262 + "sizeUnit": "px",
  263 + "style": "normal",
  264 + "weight": "400",
  265 + "lineHeight": "1"
  266 + },
  267 + "pointLabelColor": "rgba(0, 0, 0, 0.76)",
  268 + "pointShape": "circle",
  269 + "pointSize": 12,
  270 + "fillAreaSettings": {
  271 + "type": "none",
  272 + "opacity": 0.4,
  273 + "gradient": {
  274 + "start": 100,
  275 + "end": 0
  276 + }
  277 + }
  278 + },
  279 + "barSettings": {
  280 + "showBorder": false,
  281 + "borderWidth": 2,
  282 + "borderRadius": 0,
  283 + "showLabel": false,
  284 + "labelPosition": "top",
  285 + "labelFont": {
  286 + "family": "Roboto",
  287 + "size": 11,
  288 + "sizeUnit": "px",
  289 + "style": "normal",
  290 + "weight": "400",
  291 + "lineHeight": "1"
  292 + },
  293 + "labelColor": "rgba(0, 0, 0, 0.76)",
  294 + "backgroundSettings": {
  295 + "type": "none",
  296 + "opacity": 0.4,
  297 + "gradient": {
  298 + "start": 100,
  299 + "end": 0
  300 + }
  301 + }
  302 + }
  303 + },
  304 + "_hash": 0.4186621166514697,
  305 + "aggregationType": null,
  306 + "units": null,
  307 + "decimals": null,
  308 + "funcBody": null,
  309 + "usePostProcessing": null,
  310 + "postFuncBody": null
  311 + },
  312 + {
  313 + "name": "tmpFailed",
  314 + "type": "timeseries",
  315 + "label": "{i18n:api-usage.processing-failures}",
  316 + "color": "#ffc107",
  317 + "settings": {
  318 + "yAxisId": "default",
  319 + "showInLegend": true,
  320 + "dataHiddenByDefault": false,
  321 + "type": "line",
  322 + "lineSettings": {
  323 + "showLine": true,
  324 + "step": false,
  325 + "stepType": "start",
  326 + "smooth": false,
  327 + "lineType": "solid",
  328 + "lineWidth": 2.5,
  329 + "showPoints": false,
  330 + "showPointLabel": false,
  331 + "pointLabelPosition": "top",
  332 + "pointLabelFont": {
  333 + "family": "Roboto",
  334 + "size": 11,
  335 + "sizeUnit": "px",
  336 + "style": "normal",
  337 + "weight": "400",
  338 + "lineHeight": "1"
  339 + },
  340 + "pointLabelColor": "rgba(0, 0, 0, 0.76)",
  341 + "pointShape": "circle",
  342 + "pointSize": 12,
  343 + "fillAreaSettings": {
  344 + "type": "none",
  345 + "opacity": 0.4,
  346 + "gradient": {
  347 + "start": 100,
  348 + "end": 0
  349 + }
  350 + }
  351 + },
  352 + "barSettings": {
  353 + "showBorder": false,
  354 + "borderWidth": 2,
  355 + "borderRadius": 0,
  356 + "showLabel": false,
  357 + "labelPosition": "top",
  358 + "labelFont": {
  359 + "family": "Roboto",
  360 + "size": 11,
  361 + "sizeUnit": "px",
  362 + "style": "normal",
  363 + "weight": "400",
  364 + "lineHeight": "1"
  365 + },
  366 + "labelColor": "rgba(0, 0, 0, 0.76)",
  367 + "backgroundSettings": {
  368 + "type": "none",
  369 + "opacity": 0.4,
  370 + "gradient": {
  371 + "start": 100,
  372 + "end": 0
  373 + }
  374 + }
  375 + }
  376 + },
  377 + "_hash": 0.49891007198715376,
  378 + "aggregationType": null,
  379 + "units": null,
  380 + "decimals": null,
  381 + "funcBody": null,
  382 + "usePostProcessing": null,
  383 + "postFuncBody": null
  384 + }
  385 + ],
  386 + "alarmFilterConfig": {
  387 + "statusList": [
  388 + "ACTIVE"
  389 + ]
  390 + },
  391 + "latestDataKeys": [
  392 + {
  393 + "name": "queueName",
  394 + "type": "entityField",
  395 + "label": "Queue name",
  396 + "color": "#ffc107",
  397 + "settings": {},
  398 + "_hash": 0.8012481564934415
  399 + },
  400 + {
  401 + "name": "serviceId",
  402 + "type": "entityField",
  403 + "label": "Service Id",
  404 + "color": "#607d8b",
  405 + "settings": {},
  406 + "_hash": 0.0724871638610094
  407 + }
  408 + ]
  409 + }
  410 + ],
  411 + "timewindow": {
  412 + "hideInterval": false,
  413 + "hideLastInterval": false,
  414 + "hideQuickInterval": false,
  415 + "hideAggregation": false,
  416 + "hideAggInterval": false,
  417 + "hideTimezone": false,
  418 + "selectedTab": 0,
  419 + "realtime": {
  420 + "realtimeType": 0,
  421 + "timewindowMs": 300000,
  422 + "quickInterval": "CURRENT_DAY",
  423 + "interval": 1000
  424 + },
  425 + "aggregation": {
  426 + "type": "NONE",
  427 + "limit": 8640
  428 + }
  429 + },
  430 + "showTitle": true,
  431 + "backgroundColor": "#FFFFFF",
  432 + "color": "rgba(0, 0, 0, 0.87)",
  433 + "padding": "0px",
  434 + "settings": {
  435 + "yAxes": {
  436 + "default": {
  437 + "units": null,
  438 + "decimals": 0,
  439 + "show": true,
  440 + "label": "",
  441 + "labelFont": {
  442 + "family": "Roboto",
  443 + "size": 12,
  444 + "sizeUnit": "px",
  445 + "style": "normal",
  446 + "weight": "600",
  447 + "lineHeight": "1"
  448 + },
  449 + "labelColor": "rgba(0, 0, 0, 0.54)",
  450 + "position": "left",
  451 + "showTickLabels": true,
  452 + "tickLabelFont": {
  453 + "family": "Roboto",
  454 + "size": 12,
  455 + "sizeUnit": "px",
  456 + "style": "normal",
  457 + "weight": "400",
  458 + "lineHeight": "1"
  459 + },
  460 + "tickLabelColor": "rgba(0, 0, 0, 0.54)",
  461 + "ticksFormatter": "var rounder = Math.pow(10, 1);\nvar powers = [\n {key: 'Q', value: Math.pow(10, 15)},\n {key: 'T', value: Math.pow(10, 12)},\n {key: 'B', value: Math.pow(10, 9)},\n {key: 'M', value: Math.pow(10, 6)},\n {key: 'K', value: 1000}\n];\n\nvar key = '';\n\nfor (var i = 0; i < powers.length; i++) {\n var reduced = value / powers[i].value;\n reduced = Math.round(reduced * rounder) / rounder;\n if (reduced >= 1) {\n value = reduced;\n key = powers[i].key;\n break;\n }\n}\nreturn value + key;",
  462 + "showTicks": true,
  463 + "ticksColor": "rgba(0, 0, 0, 0.54)",
  464 + "showLine": true,
  465 + "lineColor": "rgba(0, 0, 0, 0.54)",
  466 + "showSplitLines": true,
  467 + "splitLinesColor": "rgba(0, 0, 0, 0.12)",
  468 + "id": "default",
  469 + "order": 0,
  470 + "min": null,
  471 + "max": null
  472 + }
  473 + },
  474 + "thresholds": [],
  475 + "dataZoom": true,
  476 + "stack": false,
  477 + "xAxis": {
  478 + "show": true,
  479 + "label": "",
  480 + "labelFont": {
  481 + "family": "Roboto",
  482 + "size": 12,
  483 + "sizeUnit": "px",
  484 + "style": "normal",
  485 + "weight": "600",
  486 + "lineHeight": "1"
  487 + },
  488 + "labelColor": "rgba(0, 0, 0, 0.54)",
  489 + "position": "bottom",
  490 + "showTickLabels": true,
  491 + "tickLabelFont": {
  492 + "family": "Roboto",
  493 + "size": 10,
  494 + "sizeUnit": "px",
  495 + "style": "normal",
  496 + "weight": "400",
  497 + "lineHeight": "1"
  498 + },
  499 + "tickLabelColor": "rgba(0, 0, 0, 0.54)",
  500 + "showTicks": true,
  501 + "ticksColor": "rgba(0, 0, 0, 0.54)",
  502 + "showLine": true,
  503 + "lineColor": "rgba(0, 0, 0, 0.54)",
  504 + "showSplitLines": true,
  505 + "splitLinesColor": "rgba(0, 0, 0, 0.12)"
  506 + },
  507 + "noAggregationBarWidthSettings": {
  508 + "strategy": "group",
  509 + "groupWidth": {
  510 + "relative": false,
  511 + "relativeWidth": 2,
  512 + "absoluteWidth": 1800000
  513 + },
  514 + "barWidth": {
  515 + "relative": true,
  516 + "relativeWidth": 2,
  517 + "absoluteWidth": 1000
  518 + }
  519 + },
  520 + "showLegend": true,
  521 + "legendLabelFont": {
  522 + "family": "Roboto",
  523 + "size": 12,
  524 + "sizeUnit": "px",
  525 + "style": "normal",
  526 + "weight": "400",
  527 + "lineHeight": "16px"
  528 + },
  529 + "legendLabelColor": "rgba(0, 0, 0, 0.76)",
  530 + "legendConfig": {
  531 + "direction": "column",
  532 + "position": "bottom",
  533 + "sortDataKeys": false,
  534 + "showMin": true,
  535 + "showMax": true,
  536 + "showAvg": false,
  537 + "showTotal": true,
  538 + "showLatest": false
  539 + },
  540 + "showTooltip": true,
  541 + "tooltipTrigger": "axis",
  542 + "tooltipValueFont": {
  543 + "family": "Roboto",
  544 + "size": 12,
  545 + "sizeUnit": "px",
  546 + "style": "normal",
  547 + "weight": "500",
  548 + "lineHeight": "16px"
  549 + },
  550 + "tooltipValueColor": "rgba(0, 0, 0, 0.76)",
  551 + "tooltipShowDate": true,
  552 + "tooltipDateFormat": {
  553 + "format": "yyyy-MM-dd HH:mm:ss",
  554 + "lastUpdateAgo": false,
  555 + "custom": false
  556 + },
  557 + "tooltipDateFont": {
  558 + "family": "Roboto",
  559 + "size": 11,
  560 + "sizeUnit": "px",
  561 + "style": "normal",
  562 + "weight": "400",
  563 + "lineHeight": "16px"
  564 + },
  565 + "tooltipDateColor": "rgba(0, 0, 0, 0.76)",
  566 + "tooltipDateInterval": true,
  567 + "tooltipBackgroundColor": "rgba(255, 255, 255, 0.76)",
  568 + "tooltipBackgroundBlur": 4,
  569 + "animation": {
  570 + "animation": true,
  571 + "animationThreshold": 2000,
  572 + "animationDuration": 300,
  573 + "animationEasing": "cubicOut",
  574 + "animationDelay": 0,
  575 + "animationDurationUpdate": 300,
  576 + "animationEasingUpdate": "cubicOut",
  577 + "animationDelayUpdate": 0
  578 + },
  579 + "background": {
  580 + "type": "color",
  581 + "color": "#fff",
  582 + "overlay": {
  583 + "enabled": false,
  584 + "color": "rgba(255,255,255,0.72)",
  585 + "blur": 3
  586 + }
  587 + },
  588 + "padding": "12px"
  589 + },
  590 + "title": "{i18n:api-usage.queue-stats}",
  591 + "dropShadow": true,
  592 + "enableFullscreen": true,
  593 + "titleStyle": null,
  594 + "configMode": "basic",
  595 + "actions": {},
  596 + "showTitleIcon": false,
  597 + "titleIcon": "thermostat",
  598 + "iconColor": "#1F6BDD",
  599 + "useDashboardTimewindow": false,
  600 + "displayTimewindow": true,
  601 + "titleFont": {
  602 + "size": 16,
  603 + "sizeUnit": "px",
  604 + "family": "Roboto",
  605 + "weight": "500",
  606 + "style": "normal",
  607 + "lineHeight": "24px"
  608 + },
  609 + "titleColor": "rgba(0, 0, 0, 0.87)",
  610 + "titleTooltip": "",
  611 + "widgetStyle": {},
  612 + "widgetCss": "",
  613 + "pageSize": 1024,
  614 + "units": "",
  615 + "decimals": null,
  616 + "noDataDisplayMessage": "",
  617 + "timewindowStyle": {
  618 + "showIcon": false,
  619 + "iconSize": "24px",
  620 + "icon": null,
  621 + "iconPosition": "left",
  622 + "font": {
  623 + "size": 12,
  624 + "sizeUnit": "px",
  625 + "family": "Roboto",
  626 + "weight": "400",
  627 + "style": "normal",
  628 + "lineHeight": "16px"
  629 + },
  630 + "color": "rgba(0, 0, 0, 0.38)",
  631 + "displayTypePrefix": true
  632 + },
  633 + "margin": "0px",
  634 + "borderRadius": "0px",
  635 + "iconSize": "0px"
  636 + },
  637 + "row": 0,
  638 + "col": 0,
  639 + "id": "42face47-730d-f930-fef5-2a1ef6304b16"
  640 + },
  641 + "6a74ab56-cb36-e75e-c094-a51a896da94a": {
  642 + "typeFullFqn": "system.time_series_chart",
  643 + "type": "timeseries",
  644 + "sizeX": 8,
  645 + "sizeY": 5,
  646 + "config": {
  647 + "datasources": [
  648 + {
  649 + "type": "entity",
  650 + "entityAliasId": "140f23dd-e3a0-ed98-6189-03c49d2d8018",
  651 + "dataKeys": [
  652 + {
  653 + "name": "timeoutMsgs",
  654 + "type": "timeseries",
  655 + "label": "{i18n:api-usage.permanent-timeouts}",
  656 + "color": "#4caf50",
  657 + "settings": {
  658 + "yAxisId": "default",
  659 + "showInLegend": true,
  660 + "dataHiddenByDefault": false,
  661 + "type": "line",
  662 + "lineSettings": {
  663 + "showLine": true,
  664 + "step": false,
  665 + "stepType": "start",
  666 + "smooth": false,
  667 + "lineType": "solid",
  668 + "lineWidth": 2.5,
  669 + "showPoints": false,
  670 + "showPointLabel": false,
  671 + "pointLabelPosition": "top",
  672 + "pointLabelFont": {
  673 + "family": "Roboto",
  674 + "size": 11,
  675 + "sizeUnit": "px",
  676 + "style": "normal",
  677 + "weight": "400",
  678 + "lineHeight": "1"
  679 + },
  680 + "pointLabelColor": "rgba(0, 0, 0, 0.76)",
  681 + "pointShape": "circle",
  682 + "pointSize": 12,
  683 + "fillAreaSettings": {
  684 + "type": "none",
  685 + "opacity": 0.4,
  686 + "gradient": {
  687 + "start": 100,
  688 + "end": 0
  689 + }
  690 + }
  691 + },
  692 + "barSettings": {
  693 + "showBorder": false,
  694 + "borderWidth": 2,
  695 + "borderRadius": 0,
  696 + "showLabel": false,
  697 + "labelPosition": "top",
  698 + "labelFont": {
  699 + "family": "Roboto",
  700 + "size": 11,
  701 + "sizeUnit": "px",
  702 + "style": "normal",
  703 + "weight": "400",
  704 + "lineHeight": "1"
  705 + },
  706 + "labelColor": "rgba(0, 0, 0, 0.76)",
  707 + "backgroundSettings": {
  708 + "type": "none",
  709 + "opacity": 0.4,
  710 + "gradient": {
  711 + "start": 100,
  712 + "end": 0
  713 + }
  714 + }
  715 + }
  716 + },
  717 + "_hash": 0.565222981550328,
  718 + "aggregationType": null,
  719 + "units": null,
  720 + "decimals": null,
  721 + "funcBody": null,
  722 + "usePostProcessing": null,
  723 + "postFuncBody": null
  724 + },
  725 + {
  726 + "name": "tmpTimeout",
  727 + "type": "timeseries",
  728 + "label": "{i18n:api-usage.processing-timeouts}",
  729 + "color": "#9c27b0",
  730 + "settings": {
  731 + "yAxisId": "default",
  732 + "showInLegend": true,
  733 + "dataHiddenByDefault": false,
  734 + "type": "line",
  735 + "lineSettings": {
  736 + "showLine": true,
  737 + "step": false,
  738 + "stepType": "start",
  739 + "smooth": false,
  740 + "lineType": "solid",
  741 + "lineWidth": 2.5,
  742 + "showPoints": false,
  743 + "showPointLabel": false,
  744 + "pointLabelPosition": "top",
  745 + "pointLabelFont": {
  746 + "family": "Roboto",
  747 + "size": 11,
  748 + "sizeUnit": "px",
  749 + "style": "normal",
  750 + "weight": "400",
  751 + "lineHeight": "1"
  752 + },
  753 + "pointLabelColor": "rgba(0, 0, 0, 0.76)",
  754 + "pointShape": "circle",
  755 + "pointSize": 12,
  756 + "fillAreaSettings": {
  757 + "type": "none",
  758 + "opacity": 0.4,
  759 + "gradient": {
  760 + "start": 100,
  761 + "end": 0
  762 + }
  763 + }
  764 + },
  765 + "barSettings": {
  766 + "showBorder": false,
  767 + "borderWidth": 2,
  768 + "borderRadius": 0,
  769 + "showLabel": false,
  770 + "labelPosition": "top",
  771 + "labelFont": {
  772 + "family": "Roboto",
  773 + "size": 11,
  774 + "sizeUnit": "px",
  775 + "style": "normal",
  776 + "weight": "400",
  777 + "lineHeight": "1"
  778 + },
  779 + "labelColor": "rgba(0, 0, 0, 0.76)",
  780 + "backgroundSettings": {
  781 + "type": "none",
  782 + "opacity": 0.4,
  783 + "gradient": {
  784 + "start": 100,
  785 + "end": 0
  786 + }
  787 + }
  788 + }
  789 + },
  790 + "_hash": 0.2679547062508352,
  791 + "aggregationType": null,
  792 + "units": null,
  793 + "decimals": null,
  794 + "funcBody": null,
  795 + "usePostProcessing": null,
  796 + "postFuncBody": null
  797 + }
  798 + ],
  799 + "alarmFilterConfig": {
  800 + "statusList": [
  801 + "ACTIVE"
  802 + ]
  803 + },
  804 + "latestDataKeys": [
  805 + {
  806 + "name": "queueName",
  807 + "type": "entityField",
  808 + "label": "Queue name",
  809 + "color": "#f44336",
  810 + "settings": {},
  811 + "_hash": 0.7242351292118758
  812 + },
  813 + {
  814 + "name": "serviceId",
  815 + "type": "entityField",
  816 + "label": "Service Id",
  817 + "color": "#ffc107",
  818 + "settings": {},
  819 + "_hash": 0.3347262075244206
  820 + }
  821 + ]
  822 + }
  823 + ],
  824 + "timewindow": {
  825 + "hideInterval": false,
  826 + "hideLastInterval": false,
  827 + "hideQuickInterval": false,
  828 + "hideAggregation": false,
  829 + "hideAggInterval": false,
  830 + "hideTimezone": false,
  831 + "selectedTab": 0,
  832 + "realtime": {
  833 + "realtimeType": 0,
  834 + "timewindowMs": 300000,
  835 + "quickInterval": "CURRENT_DAY",
  836 + "interval": 1000
  837 + },
  838 + "aggregation": {
  839 + "type": "NONE",
  840 + "limit": 8640
  841 + }
  842 + },
  843 + "showTitle": true,
  844 + "backgroundColor": "#FFFFFF",
  845 + "color": "rgba(0, 0, 0, 0.87)",
  846 + "padding": "0px",
  847 + "settings": {
  848 + "yAxes": {
  849 + "default": {
  850 + "units": null,
  851 + "decimals": 0,
  852 + "show": true,
  853 + "label": "",
  854 + "labelFont": {
  855 + "family": "Roboto",
  856 + "size": 12,
  857 + "sizeUnit": "px",
  858 + "style": "normal",
  859 + "weight": "600",
  860 + "lineHeight": "1"
  861 + },
  862 + "labelColor": "rgba(0, 0, 0, 0.54)",
  863 + "position": "left",
  864 + "showTickLabels": true,
  865 + "tickLabelFont": {
  866 + "family": "Roboto",
  867 + "size": 12,
  868 + "sizeUnit": "px",
  869 + "style": "normal",
  870 + "weight": "400",
  871 + "lineHeight": "1"
  872 + },
  873 + "tickLabelColor": "rgba(0, 0, 0, 0.54)",
  874 + "ticksFormatter": "var rounder = Math.pow(10, 1);\nvar powers = [\n {key: 'Q', value: Math.pow(10, 15)},\n {key: 'T', value: Math.pow(10, 12)},\n {key: 'B', value: Math.pow(10, 9)},\n {key: 'M', value: Math.pow(10, 6)},\n {key: 'K', value: 1000}\n];\n\nvar key = '';\n\nfor (var i = 0; i < powers.length; i++) {\n var reduced = value / powers[i].value;\n reduced = Math.round(reduced * rounder) / rounder;\n if (reduced >= 1) {\n value = reduced;\n key = powers[i].key;\n break;\n }\n}\nreturn value + key;",
  875 + "showTicks": true,
  876 + "ticksColor": "rgba(0, 0, 0, 0.54)",
  877 + "showLine": true,
  878 + "lineColor": "rgba(0, 0, 0, 0.54)",
  879 + "showSplitLines": true,
  880 + "splitLinesColor": "rgba(0, 0, 0, 0.12)",
  881 + "id": "default",
  882 + "order": 0,
  883 + "min": null,
  884 + "max": null
  885 + }
  886 + },
  887 + "thresholds": [],
  888 + "dataZoom": true,
  889 + "stack": false,
  890 + "xAxis": {
  891 + "show": true,
  892 + "label": "",
  893 + "labelFont": {
  894 + "family": "Roboto",
  895 + "size": 12,
  896 + "sizeUnit": "px",
  897 + "style": "normal",
  898 + "weight": "600",
  899 + "lineHeight": "1"
  900 + },
  901 + "labelColor": "rgba(0, 0, 0, 0.54)",
  902 + "position": "bottom",
  903 + "showTickLabels": true,
  904 + "tickLabelFont": {
  905 + "family": "Roboto",
  906 + "size": 10,
  907 + "sizeUnit": "px",
  908 + "style": "normal",
  909 + "weight": "400",
  910 + "lineHeight": "1"
  911 + },
  912 + "tickLabelColor": "rgba(0, 0, 0, 0.54)",
  913 + "showTicks": true,
  914 + "ticksColor": "rgba(0, 0, 0, 0.54)",
  915 + "showLine": true,
  916 + "lineColor": "rgba(0, 0, 0, 0.54)",
  917 + "showSplitLines": true,
  918 + "splitLinesColor": "rgba(0, 0, 0, 0.12)"
  919 + },
  920 + "noAggregationBarWidthSettings": {
  921 + "strategy": "group",
  922 + "groupWidth": {
  923 + "relative": false,
  924 + "relativeWidth": 2,
  925 + "absoluteWidth": 1800000
  926 + },
  927 + "barWidth": {
  928 + "relative": true,
  929 + "relativeWidth": 2,
  930 + "absoluteWidth": 1000
  931 + }
  932 + },
  933 + "showLegend": true,
  934 + "legendLabelFont": {
  935 + "family": "Roboto",
  936 + "size": 12,
  937 + "sizeUnit": "px",
  938 + "style": "normal",
  939 + "weight": "400",
  940 + "lineHeight": "16px"
  941 + },
  942 + "legendLabelColor": "rgba(0, 0, 0, 0.76)",
  943 + "legendConfig": {
  944 + "direction": "column",
  945 + "position": "bottom",
  946 + "sortDataKeys": false,
  947 + "showMin": true,
  948 + "showMax": true,
  949 + "showAvg": false,
  950 + "showTotal": true,
  951 + "showLatest": false
  952 + },
  953 + "showTooltip": true,
  954 + "tooltipTrigger": "axis",
  955 + "tooltipValueFont": {
  956 + "family": "Roboto",
  957 + "size": 12,
  958 + "sizeUnit": "px",
  959 + "style": "normal",
  960 + "weight": "500",
  961 + "lineHeight": "16px"
  962 + },
  963 + "tooltipValueColor": "rgba(0, 0, 0, 0.76)",
  964 + "tooltipShowDate": true,
  965 + "tooltipDateFormat": {
  966 + "format": "yyyy-MM-dd HH:mm:ss",
  967 + "lastUpdateAgo": false,
  968 + "custom": false
  969 + },
  970 + "tooltipDateFont": {
  971 + "family": "Roboto",
  972 + "size": 11,
  973 + "sizeUnit": "px",
  974 + "style": "normal",
  975 + "weight": "400",
  976 + "lineHeight": "16px"
  977 + },
  978 + "tooltipDateColor": "rgba(0, 0, 0, 0.76)",
  979 + "tooltipDateInterval": true,
  980 + "tooltipBackgroundColor": "rgba(255, 255, 255, 0.76)",
  981 + "tooltipBackgroundBlur": 4,
  982 + "animation": {
  983 + "animation": true,
  984 + "animationThreshold": 2000,
  985 + "animationDuration": 300,
  986 + "animationEasing": "cubicOut",
  987 + "animationDelay": 0,
  988 + "animationDurationUpdate": 300,
  989 + "animationEasingUpdate": "cubicOut",
  990 + "animationDelayUpdate": 0
  991 + },
  992 + "background": {
  993 + "type": "color",
  994 + "color": "#fff",
  995 + "overlay": {
  996 + "enabled": false,
  997 + "color": "rgba(255,255,255,0.72)",
  998 + "blur": 3
  999 + }
  1000 + },
  1001 + "padding": "12px"
  1002 + },
  1003 + "title": "{i18n:api-usage.processing-failures-and-timeouts}",
  1004 + "dropShadow": true,
  1005 + "enableFullscreen": true,
  1006 + "titleStyle": null,
  1007 + "configMode": "basic",
  1008 + "actions": {},
  1009 + "showTitleIcon": false,
  1010 + "titleIcon": "thermostat",
  1011 + "iconColor": "#1F6BDD",
  1012 + "useDashboardTimewindow": false,
  1013 + "displayTimewindow": true,
  1014 + "titleFont": {
  1015 + "size": 16,
  1016 + "sizeUnit": "px",
  1017 + "family": "Roboto",
  1018 + "weight": "500",
  1019 + "style": "normal",
  1020 + "lineHeight": "24px"
  1021 + },
  1022 + "titleColor": "rgba(0, 0, 0, 0.87)",
  1023 + "titleTooltip": "",
  1024 + "widgetStyle": {},
  1025 + "widgetCss": "",
  1026 + "pageSize": 1024,
  1027 + "units": "",
  1028 + "decimals": null,
  1029 + "noDataDisplayMessage": "",
  1030 + "timewindowStyle": {
  1031 + "showIcon": false,
  1032 + "iconSize": "24px",
  1033 + "icon": null,
  1034 + "iconPosition": "left",
  1035 + "font": {
  1036 + "size": 12,
  1037 + "sizeUnit": "px",
  1038 + "family": "Roboto",
  1039 + "weight": "400",
  1040 + "style": "normal",
  1041 + "lineHeight": "16px"
  1042 + },
  1043 + "color": "rgba(0, 0, 0, 0.38)",
  1044 + "displayTypePrefix": true
  1045 + },
  1046 + "margin": "0px",
  1047 + "borderRadius": "0px",
  1048 + "iconSize": "0px"
  1049 + },
  1050 + "row": 0,
  1051 + "col": 0,
  1052 + "id": "6a74ab56-cb36-e75e-c094-a51a896da94a"
  1053 + }
  1054 + },
  1055 + "states": {
  1056 + "default": {
  1057 + "name": "Rule Engine Statistics",
  1058 + "root": true,
  1059 + "layouts": {
  1060 + "main": {
  1061 + "widgets": {
  1062 + "5eb79712-5c24-3060-7e4f-6af36b8f842d": {
  1063 + "sizeX": 24,
  1064 + "sizeY": 5,
  1065 + "row": 7,
  1066 + "col": 0
  1067 + },
  1068 + "42face47-730d-f930-fef5-2a1ef6304b16": {
  1069 + "sizeX": 12,
  1070 + "sizeY": 7,
  1071 + "row": 0,
  1072 + "col": 0
  1073 + },
  1074 + "6a74ab56-cb36-e75e-c094-a51a896da94a": {
  1075 + "sizeX": 12,
  1076 + "sizeY": 7,
  1077 + "row": 0,
  1078 + "col": 12
  1079 + }
  1080 + },
  1081 + "gridSettings": {
  1082 + "backgroundColor": "#eeeeee",
  1083 + "color": "rgba(0,0,0,0.870588)",
  1084 + "columns": 24,
  1085 + "backgroundSizeMode": "100%",
  1086 + "autoFillHeight": true,
  1087 + "mobileAutoFillHeight": false,
  1088 + "mobileRowHeight": 70,
  1089 + "margin": 10,
  1090 + "outerMargin": true
  1091 + }
  1092 + }
  1093 + }
  1094 + }
  1095 + },
  1096 + "entityAliases": {
  1097 + "140f23dd-e3a0-ed98-6189-03c49d2d8018": {
  1098 + "id": "140f23dd-e3a0-ed98-6189-03c49d2d8018",
  1099 + "alias": "TbServiceQueues",
  1100 + "filter": {
  1101 + "type": "entityType",
  1102 + "resolveMultiple": true,
  1103 + "entityType": "QUEUE_STATS"
  1104 + }
  1105 + }
  1106 + },
  1107 + "timewindow": {
  1108 + "displayValue": "",
  1109 + "selectedTab": 0,
  1110 + "hideInterval": false,
  1111 + "hideAggregation": false,
  1112 + "hideAggInterval": false,
  1113 + "realtime": {
  1114 + "interval": 1000,
  1115 + "timewindowMs": 60000
  1116 + },
  1117 + "history": {
  1118 + "historyType": 0,
  1119 + "interval": 1000,
  1120 + "timewindowMs": 60000,
  1121 + "fixedTimewindow": {
  1122 + "startTimeMs": 1586176634823,
  1123 + "endTimeMs": 1586263034823
  1124 + }
  1125 + },
  1126 + "aggregation": {
  1127 + "type": "AVG",
  1128 + "limit": 25000
  1129 + }
  1130 + },
  1131 + "settings": {
  1132 + "stateControllerId": "entity",
  1133 + "showTitle": false,
  1134 + "showDashboardsSelect": true,
  1135 + "showEntitiesSelect": true,
  1136 + "showDashboardTimewindow": true,
  1137 + "showDashboardExport": true,
  1138 + "toolbarAlwaysOpen": true
  1139 + },
  1140 + "filters": {}
  1141 + },
  1142 + "name": "Rule Engine Statistics"
  1143 +}