Browse Source

added buttons Copy Edge Key and Secret instead of old icon buttons

pull/3811/head
Artem Babak 6 years ago
parent
commit
2309193d83
  1. 10
      ui-ngx/src/app/modules/home/pages/edge/edge-tabs.component.ts
  2. 33
      ui-ngx/src/app/modules/home/pages/edge/edge.component.html
  3. 4
      ui-ngx/src/assets/locale/locale.constant-en_US.json

10
ui-ngx/src/app/modules/home/pages/edge/edge-tabs.component.ts

@ -14,11 +14,11 @@
/// limitations under the License.
///
import {Component} from '@angular/core';
import {Store} from "@ngrx/store";
import {AppState} from "@core/core.state";
import {EdgeInfo} from "@shared/models/edge.models";
import {EntityTabsComponent} from "@home/components/entity/entity-tabs.component";
import { Component } from '@angular/core';
import { Store } from "@ngrx/store";
import { AppState } from "@core/core.state";
import { EdgeInfo } from "@shared/models/edge.models";
import { EntityTabsComponent } from "@home/components/entity/entity-tabs.component";
@Component({
selector: 'tb-edge-tabs',

33
ui-ngx/src/app/modules/home/pages/edge/edge.component.html

@ -79,6 +79,23 @@
<mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon>
<span translate>edge.copy-id</span>
</button>
<button mat-raised-button
ngxClipboard
(cbOnSuccess)="onEdgeSecretCopied($event)"
[cbContent]="entity?.id?.id"
[fxShow]="!isEdit">
<mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon>
<span translate>edge.copy-edge-secret</span>
</button>
<button mat-raised-button
ngxClipboard
(cbOnSuccess)="onEdgeKeyCopied($event)"
[cbContent]="entity?.id?.id"
[fxShow]="!isEdit">
<mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon>
<span translate>edge.copy-edge-key</span>
</button>
</div>
</div>
<div class="mat-padding" fxLayout="column">
@ -147,14 +164,6 @@
<input matInput formControlName="routingKey">
</mat-form-field>
</fieldset>
<button mat-button mat-icon-button
style="margin-top: 14px"
ngxClipboard
(cbOnSuccess)="onEdgeKeyCopied($event)"
[cbContent]="entity?.routingKey"
[fxShow]="!isEdit">
<mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon>
</button>
</div>
<div fxLayout="row">
<fieldset fxFlex disabled>
@ -163,14 +172,6 @@
<input matInput formControlName="secret">
</mat-form-field>
</fieldset>
<button mat-button mat-icon-button
style="margin-top: 14px"
ngxClipboard
(cbOnSuccess)="onEdgeSecretCopied($event)"
[cbContent]="entity?.secret"
[fxShow]="!isEdit">
<mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon>
</button>
</div>
</form>
</div>

4
ui-ngx/src/assets/locale/locale.constant-en_US.json

@ -983,10 +983,10 @@
"rulechains": "Edge Rule Chains",
"rulechain": "Edge Rule Chain",
"edge-key": "Edge key",
"copy-edge-key": "Copy edge key",
"copy-edge-key": "Copy Edge key",
"edge-key-copied-message": "Edge key has been copied to clipboard",
"edge-secret": "Edge secret",
"copy-edge-secret": "Copy edge secret",
"copy-edge-secret": "Copy Edge secret",
"edge-secret-copied-message": "Edge secret has been copied to clipboard",
"manage-edge-assets": "Manage edge assets",
"manage-edge-devices": "Manage edge devices",

Loading…
Cancel
Save