thingsboard-aplcache

Misc fixes

10/9/2018 2:58:27 PM

Details

diff --git a/ui/src/app/entity/entity-subtype-autocomplete.directive.js b/ui/src/app/entity/entity-subtype-autocomplete.directive.js
index 96222d9..4c79f9a 100644
--- a/ui/src/app/entity/entity-subtype-autocomplete.directive.js
+++ b/ui/src/app/entity/entity-subtype-autocomplete.directive.js
@@ -136,6 +136,13 @@ export default function EntitySubtypeAutocomplete($compile, $templateCache, $q, 
                 scope.$on('deviceSaved', function() {
                     scope.entitySubtypes = null;
                 });
+            } else if (scope.entityType == types.entityType.entityView) {
+                scope.selectEntitySubtypeText = 'entity-view.select-entity-view-type';
+                scope.entitySubtypeText = 'entity-view.entity-view-type';
+                scope.entitySubtypeRequiredText = 'entity-view.entity-view-type-required';
+                scope.$on('entityViewSaved', function() {
+                    scope.entitySubtypes = null;
+                });
             }
         }
 
diff --git a/ui/src/app/entity-view/entity-view-fieldset.tpl.html b/ui/src/app/entity-view/entity-view-fieldset.tpl.html
index 82ecb55..66dc116 100644
--- a/ui/src/app/entity-view/entity-view-fieldset.tpl.html
+++ b/ui/src/app/entity-view/entity-view-fieldset.tpl.html
@@ -59,12 +59,15 @@
                 ng-model="entityView.type"
                 entity-type="types.entityType.entityView">
         </tb-entity-subtype-autocomplete>
-        <tb-entity-select flex ng-disabled="!isEdit"
-                          the-form="theForm"
-                          tb-required="true"
-                          allowed-entity-types="allowedEntityTypes"
-                          ng-model="entityView.entityId">
-        </tb-entity-select>
+        <section layout="column">
+            <label translate class="tb-title no-padding">entity-view.related-entity</label>
+            <tb-entity-select flex ng-disabled="!isEdit"
+                              the-form="theForm"
+                              tb-required="true"
+                              allowed-entity-types="allowedEntityTypes"
+                              ng-model="entityView.entityId">
+            </tb-entity-select>
+        </section>
         <md-input-container class="md-block">
             <label translate>entity-view.description</label>
             <textarea ng-model="entityView.additionalInfo.description" rows="2"></textarea>
diff --git a/ui/src/app/help/help-links.constant.js b/ui/src/app/help/help-links.constant.js
index 458c118..9e6bb52 100644
--- a/ui/src/app/help/help-links.constant.js
+++ b/ui/src/app/help/help-links.constant.js
@@ -96,6 +96,7 @@ export default angular.module('thingsboard.help', [])
                 customers: helpBaseUrl + "/docs/user-guide/ui/customers",
                 assets: helpBaseUrl + "/docs/user-guide/ui/assets",
                 devices: helpBaseUrl + "/docs/user-guide/ui/devices",
+                entityViews: helpBaseUrl + "/docs/user-guide/ui/entity-views",
                 dashboards: helpBaseUrl + "/docs/user-guide/ui/dashboards",
                 users: helpBaseUrl + "/docs/user-guide/ui/users",
                 widgetsBundles: helpBaseUrl + "/docs/user-guide/ui/widget-library#bundles",
diff --git a/ui/src/app/locale/locale.constant-en_US.json b/ui/src/app/locale/locale.constant-en_US.json
index 299b5d4..6c6ea43 100644
--- a/ui/src/app/locale/locale.constant-en_US.json
+++ b/ui/src/app/locale/locale.constant-en_US.json
@@ -844,7 +844,8 @@
         "client-attributes": "Client attributes",
         "shared-attributes": "Shared attributes",
         "server-attributes": "Server attributes",
-        "latest-timeseries": "Latest timeseries"
+        "latest-timeseries": "Latest timeseries",
+        "related-entity": "Related entity"
     },
     "event": {
         "event-type": "Event type",