Browse Source

Set 'default' as default edge type, added hints to cloudEndpoint, licenseKey

pull/3957/head
deaflynx 6 years ago
parent
commit
59018f1284
  1. 15
      ui/src/app/edge/edge-fieldset.tpl.html
  2. 2
      ui/src/app/edge/edge.directive.js
  3. 3
      ui/src/app/locale/locale.constant-en_US.json

15
ui/src/app/edge/edge-fieldset.tpl.html

@ -100,24 +100,17 @@
tb-required="true"
the-form="theForm"
ng-model="edge.type"
entity-type="types.entityType.edge"
ng-value="defaultType">
entity-type="types.entityType.edge">
</tb-entity-subtype-autocomplete>
<div layout="row">
<md-input-container class="md-block" flex>
<div translate class="tb-hint">edge.license-key-hint</div>
<md-input-container class="md-block">
<label translate>edge.edge-license-key</label>
<input required name="edgeLicenseKey" ng-model="edge.edgeLicenseKey">
<div ng-messages="theForm.edgeLicenseKey.$error">
<div translate ng-message="required">edge.edge-license-key-required</div>
</div>
</md-input-container>
<md-button class="md-icon-button" style="margin-top: 14px;">
<md-tooltip md-direction="left">
{{ 'edge.license-key-tooltip' | translate }}
</md-tooltip>
<md-icon md-svg-icon="mdi:help"></md-icon>
</md-button>
</div>
<div translate class="tb-hint">edge.cloud-endpoint-hint</div>
<md-input-container class="md-block">
<label translate>edge.cloud-endpoint</label>
<input required name="cloudEndpoint" ng-model="edge.cloudEndpoint">

2
ui/src/app/edge/edge.directive.js

@ -29,7 +29,6 @@ export default function EdgeDirective($compile, $templateCache, $translate, $mdD
scope.isAssignedToCustomer = false;
scope.isPublic = false;
scope.assignedCustomer = null;
scope.defaultType = 'default';
scope.$watch('edge', function(newVal) {
if (newVal) {
@ -37,6 +36,7 @@ export default function EdgeDirective($compile, $templateCache, $translate, $mdD
scope.edge.routingKey = utils.guid('');
scope.edge.secret = generateSecret(20);
scope.edge.cloudEndpoint = utils.baseUrl();
scope.edge.type = 'default';
}
if (scope.edge.customerId && scope.edge.customerId.id !== types.id.nullUid) {
scope.isAssignedToCustomer = true;

3
ui/src/app/locale/locale.constant-en_US.json

@ -853,7 +853,8 @@
"no-edge-types-matching": "No edge types matching '{{entitySubtype}}' were found.",
"edge-type-list-empty": "No edge types selected.",
"edge-types": "Edge types",
"license-key-tooltip": "To get license key please visit www.thingsboard.io/edge"
"license-key-hint": "To obtain your license please navigate to the <a href='https://thingsboard.io/pricing/?active=thingsboard-edge' target='_blank'>pricing page</a> and select the best license option for your case.",
"cloud-endpoint-hint": "Edge requires HTTP(s) access to Cloud (ThingsBoard CE/PE) to verify the license key. Please specify Cloud URL that Edge is able to connect to."
},
"error": {
"unable-to-connect": "Unable to connect to the server! Please check your internet connection.",

Loading…
Cancel
Save