Skip to content

Commit 5c70bb9

Browse files
author
Jeppe Elkjær Jørgensen
committed
Merge branch 'develop' of https://github.com/OS2iot/OS2IoT-frontend into develop
2 parents 92568f3 + 12f0027 commit 5c70bb9

File tree

7 files changed

+66
-48
lines changed

7 files changed

+66
-48
lines changed
Lines changed: 36 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,41 @@
1-
<ng-container *ngIf="payloadDecoder">
2-
<app-top-bar-single [data]="payloadDecoder" [backButton]="backButton" [buttons]="buttons"></app-top-bar-single>
3-
<div class="p-5">
4-
<div class="application-component">
5-
<div class="col d-flex top-bar">
6-
<button class="btn btn-primary py-3" [routerLink]="['../../payload-decoder-edit', payloadDecoder.id]" routerLinkActive="active">{{ 'PAYLOAD-DECODER.EDIT' | translate }}</button>
7-
</div>
8-
<div class="col-12 mb-4 py-3 bottom-separator">
9-
<div class="col-8 py-4">
10-
<div class="col-12 col-sm-12">
11-
<h4>{{ 'PAYLOAD-DECODER.NAME' | translate }}</h4>
12-
</div>
13-
<div class="col-12 pt-2 col-sm-8">
14-
<p>{{payloadDecoder.name}}</p>
15-
</div>
16-
</div>
17-
<div class="col-12 py-4">
18-
<div class="col-12 col-sm-12">
19-
<h4>{{ 'PAYLOAD-DECODER.DECODINGFUNCTION' | translate }}</h4>
20-
</div>
1+
<app-top-bar-single [data]="payloadDecoder" [backButton]="backButton" [buttons]="buttons"></app-top-bar-single>
2+
<div *ngIf="payloadDecoder">
3+
<div class=" jumbotron m-md-4 p-md-3">
4+
<div class="row">
5+
<div class="col-xs-12">
6+
<div class="float-left">
7+
<h4> {{ 'PAYLOAD-DECODER.NAME' | translate }} {{payloadDecoder.name}}</h4>
218
</div>
22-
<div class="col-12 pt-2 col-sm-8">
23-
<pre>
24-
<code>
25-
{{payloadDecoder.decodingFunction}}
26-
</code>
27-
</pre>
9+
<div class="btn-group float-right">
10+
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown"
11+
aria-haspopup="true" aria-expanded="false">
12+
{{'PAYLOAD-DECODER.DETAIL.DROPDOWN' | translate}} <span class="caret"></span>
13+
</button>
14+
<ul class="dropdown-menu" attr.aria-labelledby="tableRowDropdown-{{payloadDecoder.id}}">
15+
<li class="dropdown-item">
16+
<a [routerLink]="['../../payload-decoder-edit', payloadDecoder.id]"
17+
routerLinkActive="active">{{ 'PAYLOAD-DECODER.DETAIL.EDIT' | translate }}
18+
</a>
19+
</li>
20+
<!-- <li class="dropdown-item">
21+
<a (click)="onDeletePayloadDecoder()" [routerLink]="">{{ 'PAYLOAD-DECODER.DETAIL.DELETE' | translate }}
22+
</a>
23+
</li> -->
24+
</ul>
2825
</div>
2926
</div>
3027
</div>
3128
</div>
32-
</ng-container>
29+
<div class=" jumbotron m-md-4 p-md-3">
30+
<div class="row">
31+
<div class="col-xs-12">
32+
<h4>{{ 'PAYLOAD-DECODER.DECODINGFUNCTION' | translate }}</h4>
33+
<pre>
34+
<code>
35+
{{payloadDecoder.decodingFunction}}
36+
</code>
37+
</pre>
38+
</div>
39+
</div>
40+
</div>
41+
</div>

src/app/payload-decoder/payload-decoder/payload-decoder-detail/payload-decoder-detail.component.ts

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ export class PayloadDecoderDetailComponent implements OnInit {
2020
public backButton: BackButton = { label: '', routerLink: '/datatarget-list' };
2121
public buttons: QuickActionButton[] = [
2222
{
23-
label: 'PAYLOAD-DECODER.DELETE',
24-
type: 'delete',
23+
label: 'PAYLOAD-DECODER.DELETE',
24+
type: 'delete',
2525
},
2626
{
27-
label: 'PAYLOAD-DECODER.EDIT',
28-
type: 'edit',
27+
label: 'PAYLOAD-DECODER.EDIT',
28+
type: 'edit',
2929
},
3030
];
3131
id: number;
@@ -34,24 +34,29 @@ export class PayloadDecoderDetailComponent implements OnInit {
3434
constructor(
3535
public translate: TranslateService,
3636
private route: ActivatedRoute,
37-
private payloadDecoderService: PayloadDecoderService
38-
) {
39-
}
37+
private payloadDecoderService: PayloadDecoderService,
38+
) {
39+
}
4040

4141
ngOnInit(): void {
4242
this.translate.use('da');
43+
44+
this.translate.get(['PAYLOAD-DECODER.TITLE'])
45+
.subscribe(translations => {
46+
this.backButton.label = translations['PAYLOAD-DECODER.TITLE'];
47+
});
4348
this.id = +this.route.snapshot.paramMap.get('id');
4449
if (this.id > 0) {
4550
this.getPayloadDecoder(this.id);
4651
}
4752
}
4853

4954
private getPayloadDecoder(id: number) {
50-
this.subscription = this.payloadDecoderService.getOne(id)
55+
this.subscription = this.payloadDecoderService.getOne(id)
5156
.subscribe(
5257
(response) => {
53-
this.payloadDecoder = response;
54-
});
58+
this.payloadDecoder = response;
59+
});
5560
}
5661

5762
}

src/app/views/administration-gateway/create-lora-gateway/create-lora-gateway.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ export class CreateLoraGatewayComponent implements OnInit {
2020
}
2121

2222
ngOnInit(): void {
23-
this.translate.get(['NAV.MY-LORA-GATEWAYS', 'FORM.CREATE-NEW-LORA-GATEWAY', 'LORA-GATEWAY.CREATE'])
23+
this.translate.get(['NAV.LORA-GATEWAYS', 'FORM.CREATE-NEW-LORA-GATEWAY', 'LORA-GATEWAY.CREATE'])
2424
.subscribe(translations => {
25-
this.backButton.label = translations['NAV.MY-LORA-GATEWAYS']
25+
this.backButton.label = translations['NAV.LORA-GATEWAYS']
2626
this.title = translations['FORM.CREATE-NEW-LORA-GATEWAY']
2727
this.submitButton = translations['LORA-GATEWAY.CREATE']
2828
});

src/app/views/administration-gateway/edit-gateway/edit-gateway.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ export class EditGatewayComponent implements OnInit {
2222
}
2323

2424
ngOnInit(): void {
25-
this.translate.get(['NAV.MY-LORA-GATEWAYS', 'FORM.EDIT-NEW-GATEWAY', 'GATEWAY.SAVE'])
25+
this.translate.get(['NAV.LORA-GATEWAYS', 'FORM.EDIT-NEW-GATEWAY', 'GATEWAY.SAVE'])
2626
.subscribe(translations => {
27-
this.backButton.label = translations['NAV.MY-LORA-GATEWAYS'];
27+
this.backButton.label = translations['NAV.LORA-GATEWAYS'];
2828
this.title = translations['FORM.EDIT-NEW-GATEWAY'];
2929
this.submitButton = translations['GATEWAY.SAVE'];
3030
});

src/app/views/administration-gateway/gateway/gateway.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ export class GatewayComponent implements OnInit {
109109
if (this.id) {
110110
this.bindGateway(this.id);
111111
}
112-
this.translate.get(['NAV.MY-LORA-GATEWAYS'])
112+
this.translate.get(['NAV.LORA-GATEWAYS'])
113113
.subscribe(translations => {
114-
this.backButton.label = translations['NAV.MY-LORA-GATEWAYS'];
114+
this.backButton.label = translations['NAV.LORA-GATEWAYS'];
115115
});
116116
}
117117

src/app/views/administration-gateway/list-lora-gateway/list-lora-gateway.component.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<div class="px-sm-5 py-sm-4">
22
<div class="row mb-5">
3-
<app-top-bar [pageLimit]="pageLimit"
4-
[title]="'NAV.MY-LORA-GATEWAYS' | translate" [ctaLabel]="'FORM.CREATE-NEW-LORA-GATEWAY' | translate"
5-
[ctaRouterLink]="'edit-gateway'" >
3+
<app-top-bar [pageLimit]="pageLimit" [title]="'NAV.LORA-GATEWAYS' | translate"
4+
[ctaLabel]="'FORM.CREATE-NEW-LORA-GATEWAY' | translate" [ctaRouterLink]="'edit-gateway'">
65
</app-top-bar>
76
</div>
87
<div class="row">

src/assets/i18n/da.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,16 @@
111111
"EDIT": "Redigér"
112112
},
113113
"PAYLOAD-DECODER": {
114+
"TITLE": "Payload decoder",
114115
"SAVE": "Gem Payload Decoder",
115-
"NAME": "Navn",
116+
"NAME": "Navn: ",
116117
"ID": "Payload Decoder Id",
117118
"DECODINGFUNCTION": "Decoder funktion",
118-
"EDIT": "Redigér Payload Decoder"
119+
"DETAIL": {
120+
"DROPDOWN": "Håndter Payload Decoder",
121+
"EDIT": "Redigér",
122+
"DELETE": "Slet"
123+
}
119124
},
120125
"PAYLOAD-DECODER-TABLE-ROW": {
121126
"EDIT": "Redigér",

0 commit comments

Comments
 (0)