Hide sensitive edge info for Customers update
This commit is contained in:
parent
5ee16ef5af
commit
21823588d4
@ -58,7 +58,7 @@
|
||||
<md-button ngclipboard data-clipboard-action="copy"
|
||||
ngclipboard-success="onEdgeInfoCopied('key')"
|
||||
data-clipboard-text="{{edge.routingKey}}" ng-show="!isEdit"
|
||||
ng-if="edgeScope === 'tenant'"
|
||||
ng-if="isTenantAdmin"
|
||||
class="md-raised">
|
||||
<md-icon md-svg-icon="mdi:clipboard-arrow-left"></md-icon>
|
||||
<span translate>edge.copy-edge-key</span>
|
||||
@ -66,14 +66,14 @@
|
||||
<md-button ngclipboard data-clipboard-action="copy"
|
||||
ngclipboard-success="onEdgeInfoCopied('secret')"
|
||||
data-clipboard-text="{{edge.secret}}" ng-show="!isEdit"
|
||||
ng-if="edgeScope === 'tenant'"
|
||||
ng-if="isTenantAdmin"
|
||||
class="md-raised">
|
||||
<md-icon md-svg-icon="mdi:clipboard-arrow-left"></md-icon>
|
||||
<span translate>edge.copy-edge-secret</span>
|
||||
</md-button>
|
||||
<md-button ng-click="onEdgeSync(edge.id)"
|
||||
ng-show="!isEdit"
|
||||
ng-if="edgeScope === 'tenant'"
|
||||
ng-if="isTenantAdmin"
|
||||
class="md-raised">
|
||||
<md-icon md-svg-icon="mdi:sync"></md-icon>
|
||||
<span translate>edge.sync</span>
|
||||
@ -105,16 +105,16 @@
|
||||
ng-model="edge.type"
|
||||
entity-type="types.entityType.edge">
|
||||
</tb-entity-subtype-autocomplete>
|
||||
<div ng-show="edgeScope === 'tenant'" translate class="tb-hint">edge.license-key-hint</div>
|
||||
<md-input-container class="md-block" ng-if="edgeScope === 'tenant'">
|
||||
<div translate class="tb-hint" ng-if="isTenantAdmin">edge.license-key-hint</div>
|
||||
<md-input-container class="md-block" ng-if="isTenantAdmin">
|
||||
<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>
|
||||
<div ng-if="edgeScope === 'tenant'" translate class="tb-hint">edge.cloud-endpoint-hint</div>
|
||||
<md-input-container class="md-block" ng-if="edgeScope === 'tenant'">
|
||||
<div translate class="tb-hint" ng-if="isTenantAdmin">edge.cloud-endpoint-hint</div>
|
||||
<md-input-container class="md-block" ng-if="isTenantAdmin">
|
||||
<label translate>edge.cloud-endpoint</label>
|
||||
<input required name="cloudEndpoint" ng-model="edge.cloudEndpoint">
|
||||
<div ng-messages="theForm.cloudEndpoint.$error">
|
||||
@ -122,7 +122,7 @@
|
||||
</div>
|
||||
</md-input-container>
|
||||
</fieldset>
|
||||
<div layout="row" ng-if="edgeScope === 'tenant'">
|
||||
<div layout="row" ng-if="isTenantAdmin">
|
||||
<md-input-container class="md-block" flex>
|
||||
<label translate>edge.edge-key</label>
|
||||
<input ng-model="edge.routingKey" disabled>
|
||||
@ -137,7 +137,7 @@
|
||||
</md-tooltip>
|
||||
</md-button>
|
||||
</div>
|
||||
<div layout="row" ng-if="edgeScope === 'tenant'">
|
||||
<div layout="row" ng-if="isTenantAdmin">
|
||||
<md-input-container class="md-block" flex>
|
||||
<label translate>edge.edge-secret</label>
|
||||
<input ng-model="edge.secret" disabled>
|
||||
|
||||
@ -20,7 +20,7 @@ import edgeFieldsetTemplate from './edge-fieldset.tpl.html';
|
||||
/* eslint-enable import/no-unresolved, import/default */
|
||||
|
||||
/*@ngInject*/
|
||||
export default function EdgeDirective($compile, $templateCache, $translate, $mdDialog, $document, utils, toast, types, customerService, edgeService) {
|
||||
export default function EdgeDirective($compile, $templateCache, $translate, $mdDialog, $document, utils, toast, types, customerService, edgeService, userService) {
|
||||
var linker = function (scope, element) {
|
||||
var template = $templateCache.get(edgeFieldsetTemplate);
|
||||
element.html(template);
|
||||
@ -29,6 +29,7 @@ export default function EdgeDirective($compile, $templateCache, $translate, $mdD
|
||||
scope.isAssignedToCustomer = false;
|
||||
scope.isPublic = false;
|
||||
scope.assignedCustomer = null;
|
||||
scope.isTenantAdmin = userService.getCurrentUser().authority === 'TENANT_ADMIN';
|
||||
|
||||
scope.$watch('edge', function(newVal) {
|
||||
if (newVal) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user