Browse Source

Merge pull request #15001 from thingsboard/lts-4.3

LTS to RC
pull/15008/head
Viacheslav Klimov 8 months ago
committed by GitHub
parent
commit
38c8322b5d
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 43
      rest-client/src/main/java/org/thingsboard/rest/client/RestClient.java
  2. 4
      ui-ngx/package.json
  3. 15
      ui-ngx/patches/echarts+5.5.1-TB.patch
  4. 12
      ui-ngx/yarn.lock

43
rest-client/src/main/java/org/thingsboard/rest/client/RestClient.java

@ -22,6 +22,7 @@ import com.google.common.base.Strings;
import lombok.Getter;
import lombok.SneakyThrows;
import org.apache.commons.io.IOUtils;
import org.apache.hc.core5.net.URIBuilder;
import org.apache.commons.lang3.concurrent.LazyInitializer;
import org.apache.hc.core5.net.URIBuilder;
import org.springframework.core.ParameterizedTypeReference;
@ -94,6 +95,8 @@ import org.thingsboard.server.common.data.asset.AssetSearchQuery;
import org.thingsboard.server.common.data.audit.ActionType;
import org.thingsboard.server.common.data.audit.AuditLog;
import org.thingsboard.server.common.data.cf.CalculatedField;
import org.thingsboard.server.common.data.cf.CalculatedFieldInfo;
import org.thingsboard.server.common.data.cf.CalculatedFieldType;
import org.thingsboard.server.common.data.device.DeviceSearchQuery;
import org.thingsboard.server.common.data.domain.Domain;
import org.thingsboard.server.common.data.domain.DomainInfo;
@ -4368,6 +4371,46 @@ public class RestClient implements Closeable {
}
@SneakyThrows(URISyntaxException.class)
public PageData<CalculatedFieldInfo> getCalculatedFields(PageLink pageLink,
Set<CalculatedFieldType> types,
EntityType entityType,
Set<UUID> entities,
Set<String> names) {
var urlBuilder = new URIBuilder(baseURL).appendPath("/api/calculatedFields");
urlBuilder.addParameter("pageSize", String.valueOf(pageLink.getPageSize()));
urlBuilder.addParameter("page", String.valueOf(pageLink.getPage()));
if (!isEmpty(pageLink.getTextSearch())) {
urlBuilder.addParameter("textSearch", pageLink.getTextSearch());
}
if (pageLink.getSortOrder() != null) {
urlBuilder.addParameter("sortProperty", pageLink.getSortOrder().getProperty());
urlBuilder.addParameter("sortOrder", pageLink.getSortOrder().getDirection().name());
}
if (!CollectionUtils.isEmpty(types)) {
for (CalculatedFieldType type : types) {
urlBuilder.addParameter("types", type.name());
}
}
if (entityType != null) {
urlBuilder.addParameter("entityType", entityType.name());
}
if (!CollectionUtils.isEmpty(entities)) {
for (UUID entity : entities) {
urlBuilder.addParameter("entities", entity.toString());
}
}
if (!CollectionUtils.isEmpty(names)) {
for (String name : names) {
urlBuilder.addParameter("name", name);
}
}
return restTemplate.exchange(
urlBuilder.build(),
HttpMethod.GET, HttpEntity.EMPTY,
new ParameterizedTypeReference<PageData<CalculatedFieldInfo>>() {}).getBody();
}
public void deleteCalculatedField(CalculatedFieldId calculatedFieldId) {
restTemplate.delete(baseURL + "/api/calculatedField/{calculatedFieldId}", calculatedFieldId.getId());
}

4
ui-ngx/package.json

@ -46,7 +46,7 @@
"canvas-gauges": "^2.1.7",
"core-js": "^3.48.0",
"dayjs": "1.11.19",
"echarts": "https://github.com/thingsboard/echarts/archive/5.5.1-TB.tar.gz",
"echarts": "https://github.com/thingsboard/echarts/archive/5.5.2-TB.tar.gz",
"flot": "https://github.com/thingsboard/flot.git#0.9-work",
"flot.curvedlines": "https://github.com/MichaelZinsmaier/CurvedLines.git#master",
"font-awesome": "^4.7.0",
@ -71,7 +71,7 @@
"ngx-clipboard": "^16.0.0",
"ngx-daterangepicker-material": "^6.0.4",
"ngx-drag-drop": "^20.0.1",
"ngx-flowchart": "https://github.com/thingsboard/ngx-flowchart.git#release/3.0.0",
"ngx-flowchart": "https://github.com/thingsboard/ngx-flowchart.git#release/4.0.0",
"ngx-hm-carousel": "^19.0.0",
"ngx-markdown": "^20.1.0",
"ngx-sharebuttons": "^17.0.0",

15
ui-ngx/patches/echarts+5.5.1-TB.patch

@ -1,15 +0,0 @@
diff --git a/node_modules/echarts/index.d.ts b/node_modules/echarts/index.d.ts
index 811908a..5f77c60 100644
--- a/node_modules/echarts/index.d.ts
+++ b/node_modules/echarts/index.d.ts
@@ -17,7 +17,7 @@
* under the License.
*/
-import * as echarts from './types/dist/echarts';
+// import * as echarts from './types/dist/echarts';
// Export for UMD module.
export as namespace echarts;
-export = echarts;
\ No newline at end of file
+export * from './types/dist/echarts';

12
ui-ngx/yarn.lock

@ -5405,9 +5405,9 @@ eastasianwidth@^0.2.0:
resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb"
integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==
"echarts@https://github.com/thingsboard/echarts/archive/5.5.1-TB.tar.gz":
version "5.5.1-TB"
resolved "https://github.com/thingsboard/echarts/archive/5.5.1-TB.tar.gz#8cf0cbb1b4c6161f0b587a1a649ff4f8eecbbf42"
"echarts@https://github.com/thingsboard/echarts/archive/5.5.2-TB.tar.gz":
version "5.5.2-TB"
resolved "https://github.com/thingsboard/echarts/archive/5.5.2-TB.tar.gz#779494c24fb5448ecaf79315bf609bb52b431df9"
dependencies:
tslib "2.3.0"
zrender "https://github.com/thingsboard/zrender/archive/5.5.0-TB.tar.gz"
@ -8098,9 +8098,9 @@ ngx-drag-drop@^20.0.1:
dependencies:
tslib "^2.3.0"
"ngx-flowchart@https://github.com/thingsboard/ngx-flowchart.git#release/3.0.0":
version "3.0.0"
resolved "https://github.com/thingsboard/ngx-flowchart.git#0160a1356129c2a3d4dcf7e064e4ba0a39ff668d"
"ngx-flowchart@https://github.com/thingsboard/ngx-flowchart.git#release/4.0.0":
version "4.0.0"
resolved "https://github.com/thingsboard/ngx-flowchart.git#735bc818ef218a169ac50e87edc6a093b3e97715"
dependencies:
tslib "^2.3.0"

Loading…
Cancel
Save