Browse Source

Merge pull request #1138 from thingsboard/minor-fix

Minor fix
pull/1139/head
Igor Kulikov 8 years ago
committed by GitHub
parent
commit
f14d25609e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 240
      dao/src/main/resources/cassandra/system-data.cql
  2. 2
      rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/action/TbCopyAttributesToEntityViewNode.java
  3. 4
      ui/src/app/entity-view/entity-view.routes.js
  4. 6
      ui/src/app/entity/entity-subtype-list.directive.js
  5. 7
      ui/src/app/entity/entity-subtype-select.directive.js
  6. 8
      ui/src/app/services/menu.service.js

240
dao/src/main/resources/cassandra/system-data.cql

File diff suppressed because one or more lines are too long

2
rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/action/TbCopyAttributesToEntityViewNode.java

@ -48,7 +48,7 @@ import static org.thingsboard.rule.engine.api.TbRelationTypes.SUCCESS;
@Slf4j @Slf4j
@RuleNode( @RuleNode(
type = ComponentType.ACTION, type = ComponentType.ACTION,
name = "copy attributes", name = "copy to view",
configClazz = EmptyNodeConfiguration.class, configClazz = EmptyNodeConfiguration.class,
nodeDescription = "Copy attributes from asset/device to entity view and changes message originator to related entity view", nodeDescription = "Copy attributes from asset/device to entity view and changes message originator to related entity view",
nodeDetails = "Copy attributes from asset/device to related entity view according to entity view configuration. \n " + nodeDetails = "Copy attributes from asset/device to related entity view according to entity view configuration. \n " +

4
ui/src/app/entity-view/entity-view.routes.js

@ -42,7 +42,7 @@ export default function EntityViewRoutes($stateProvider, types) {
pageTitle: 'entity-view.entity-views' pageTitle: 'entity-view.entity-views'
}, },
ncyBreadcrumb: { ncyBreadcrumb: {
label: '{"icon": "view_stream", "label": "entity-view.entity-views"}' label: '{"icon": "view_quilt", "label": "entity-view.entity-views"}'
} }
}) })
.state('home.customers.entityViews', { .state('home.customers.entityViews', {
@ -65,7 +65,7 @@ export default function EntityViewRoutes($stateProvider, types) {
pageTitle: 'customer.entity-views' pageTitle: 'customer.entity-views'
}, },
ncyBreadcrumb: { ncyBreadcrumb: {
label: '{"icon": "view_stream", "label": "{{ vm.customerEntityViewsTitle }}", "translate": "false"}' label: '{"icon": "view_quilt", "label": "{{ vm.customerEntityViewsTitle }}", "translate": "false"}'
} }
}); });

6
ui/src/app/entity/entity-subtype-list.directive.js

@ -47,6 +47,12 @@ export default function EntitySubtypeListDirective($compile, $templateCache, $q,
scope.secondaryPlaceholder = '+' + $translate.instant('device.device-type'); scope.secondaryPlaceholder = '+' + $translate.instant('device.device-type');
scope.noSubtypesMathingText = 'device.no-device-types-matching'; scope.noSubtypesMathingText = 'device.no-device-types-matching';
scope.subtypeListEmptyText = 'device.device-type-list-empty'; scope.subtypeListEmptyText = 'device.device-type-list-empty';
} else if (scope.entityType == types.entityType.entityView) {
scope.placeholder = scope.tbRequired ? $translate.instant('entity-view.enter-entity-view-type')
: $translate.instant('entity-view.any-entity-view');
scope.secondaryPlaceholder = '+' + $translate.instant('entity-view.entity-view-type');
scope.noSubtypesMathingText = 'entity-view.no-entity-view-types-matching';
scope.subtypeListEmptyText = 'entity-view.entity-view-type-list-empty';
} }
scope.$watch('tbRequired', function () { scope.$watch('tbRequired', function () {

7
ui/src/app/entity/entity-subtype-select.directive.js

@ -102,6 +102,9 @@ export default function EntitySubtypeSelect($compile, $templateCache, $translate
} else if (scope.entityType == types.entityType.device) { } else if (scope.entityType == types.entityType.device) {
scope.entitySubtypeTitle = 'device.device-type'; scope.entitySubtypeTitle = 'device.device-type';
scope.entitySubtypeRequiredText = 'device.device-type-required'; scope.entitySubtypeRequiredText = 'device.device-type-required';
} else if (scope.entityType == types.entityType.entityView) {
scope.entitySubtypeTitle = 'entity-view.entity-view-type';
scope.entitySubtypeRequiredText = 'entity-view.entity-view-type-required';
} }
scope.entitySubtypes.length = 0; scope.entitySubtypes.length = 0;
if (scope.entitySubtypesList && scope.entitySubtypesList.length) { if (scope.entitySubtypesList && scope.entitySubtypesList.length) {
@ -118,6 +121,10 @@ export default function EntitySubtypeSelect($compile, $templateCache, $translate
scope.$on('deviceSaved', function() { scope.$on('deviceSaved', function() {
loadSubTypes(); loadSubTypes();
}); });
} else if (scope.entityType == types.entityType.entityView) {
scope.$on('entityViewSaved', function() {
loadSubTypes();
});
} }
} }
} }

8
ui/src/app/services/menu.service.js

@ -171,7 +171,7 @@ function Menu(userService, $state, $rootScope) {
name: 'entity-view.entity-views', name: 'entity-view.entity-views',
type: 'link', type: 'link',
state: 'home.entityViews', state: 'home.entityViews',
icon: 'view_stream' icon: 'view_quilt'
}, },
{ {
name: 'widget.widget-library', name: 'widget.widget-library',
@ -238,7 +238,7 @@ function Menu(userService, $state, $rootScope) {
places: [ places: [
{ {
name: 'entity-view.entity-views', name: 'entity-view.entity-views',
icon: 'view_stream', icon: 'view_quilt',
state: 'home.entityViews' state: 'home.entityViews'
} }
] ]
@ -293,7 +293,7 @@ function Menu(userService, $state, $rootScope) {
name: 'entity-view.entity-views', name: 'entity-view.entity-views',
type: 'link', type: 'link',
state: 'home.entityViews', state: 'home.entityViews',
icon: 'view_stream' icon: 'view_quilt'
}, },
{ {
name: 'dashboard.dashboards', name: 'dashboard.dashboards',
@ -328,7 +328,7 @@ function Menu(userService, $state, $rootScope) {
places: [ places: [
{ {
name: 'entity-view.entity-views', name: 'entity-view.entity-views',
icon: 'view_stream', icon: 'view_quilt',
state: 'home.entityViews' state: 'home.entityViews'
} }
] ]

Loading…
Cancel
Save