Skip to content

Commit c4cafb1

Browse files
augusthjerrildfcv-iteratorItAugustHA-Iterator
authored
Updated Chirpstack from V3 to V4 (#152)
* Fixed routing of gateway list + fixed memory leak by unsubscribing properly from gateway fetches * Fixed routing errors in gateway list * Changed mqtt datatarget topic placeholder + added tooltip * Added additional text changes from Product Owner * Removed maxLenght from device AND gateway EUI, now removes non-hex digits on submit * Gateway upgrades to get data from v4. * Added sticky to name column on gateway status table * Implemented application table column selection * Removed unused controller name from select * Moved column selector to own component + implemented column selection on iot-device table * Changed datastructure of gateway to match database + Column administration on gateway-status-table * Changed column selector for a cog icon button * Chirpstack updates. * small fixes after merge * Spinner for device profiles * changed printhWidth to match backend * fresh package-lock * updated to node-version 18 on github * First set of pr changes * some PR changes before merge * PR changes and added prettier from backend so it can match with frontend (both are nodejs, so shouldn't it be the same?) * Updated package-lock and bumped monaco-editor down to 0.33 * Fixes * da.json addition --------- Co-authored-by: Frederik Christ Vestergaard <[email protected]> Co-authored-by: August Andersen <[email protected]>
1 parent a9603f3 commit c4cafb1

File tree

58 files changed

+1398
-1984
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1398
-1984
lines changed

.github/workflows/on-push-pr.action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- uses: actions/setup-node@v3
3333
name: Set NodeJS version
3434
with:
35-
node-version: 14
35+
node-version: 18
3636
- name: Install packages
3737
run: "npm ci"
3838
- name: Build source

.prettierrc

Lines changed: 0 additions & 4 deletions
This file was deleted.

.prettierrc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
trailingComma: "es5",
3+
tabWidth: 4,
4+
printWidth: 120,
5+
semi: true,
6+
singleQuote: false,
7+
useTabs: false,
8+
bracketSpacing: true,
9+
arrowParens: "avoid",
10+
endOfLine: "auto",
11+
};

package-lock.json

Lines changed: 278 additions & 297 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"jwt-decode": "^3.1.2",
4242
"leaflet": "^1.7.1",
4343
"moment": "^2.29.4",
44-
"monaco-editor": "^0.44.0",
44+
"monaco-editor": "^0.33.0",
4545
"ng": "0.0.0",
4646
"ng-inline-svg": "^11.0.0",
4747
"ngx-monaco-editor-v2": "^14.0.4",

src/app/applications/applications-list/applications-table/applications-table.component.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
<table mat-table [dataSource]="data" class="example-table" matSort matSortActive="name" matSortDisableClear
1717
matSortDirection="asc">
1818

19-
<!-- Name Column -->
2019
<ng-container matColumnDef="name">
2120
<th mat-header-cell *matHeaderCellDef mat-sort-header class="col-2">
2221
{{ 'APPLICATION-TABLE.NAME' | translate }}
@@ -45,7 +44,6 @@
4544
</td>
4645
</ng-container>
4746

48-
<!-- Devices Column -->
4947
<ng-container matColumnDef="devices">
5048
<th mat-header-cell *matHeaderCellDef mat-sort-header class="col-2">
5149
{{ 'APPLICATION-TABLE.IOT-DEVICES' | translate }}</th>
@@ -136,7 +134,6 @@
136134
</td>
137135
</ng-container>
138136

139-
<!-- Menu Column -->
140137
<ng-container matColumnDef="menu">
141138
<th mat-header-cell *matHeaderCellDef class="col-1"></th>
142139
<td mat-cell *matCellDef="let element">

src/app/applications/bulk-import/bulk-mapping.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ export class BulkMapping {
3636
applicationSessionKey: data.applicationSessionKey
3737
? data.applicationSessionKey
3838
: undefined,
39-
serviceProfileID: data.serviceProfileID
40-
? data.serviceProfileID
41-
: undefined,
4239
deviceProfileID: data.deviceProfileID ? data.deviceProfileID : undefined,
4340
fCntUp: data.fCntUp ? +data.fCntUp : undefined,
4441
nFCntDown: data.nFCntDown ? +data.nFCntDown : undefined,

src/app/applications/iot-devices/iot-device-detail/downlink/downlink.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export class DownlinkComponent implements OnInit {
5555
if (error?.error?.chirpstackError?.error == "f_port must be > 0") {
5656
this.errorMessages = ["port must be > 0"]
5757
return;
58-
}
58+
}
5959
this.errorMessages = this.errorMessageService.handleErrorMessage(error);
6060
}
6161

src/app/applications/iot-devices/iot-device-detail/iot-device-detail-lorawan/iot-device-detail-lorawan.component.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<p><strong>{{ 'IOTDEVICE.LORA.DEVEUI' | translate }}</strong>{{device.lorawanSettings.devEUI}}</p>
2-
<p><strong>{{ 'IOTDEVICE.LORA.SERVICEPROFILE' | translate }}</strong>{{serviceProfileName}}</p>
32
<p><strong>{{ 'IOTDEVICE.LORA.DEVICEPROFILE' | translate }}</strong>{{deviceProfileName}}</p>
43
<ng-container *ngIf="OTAA">
54
<p><strong>{{ 'IOTDEVICE.LORA.OTAAAPPLICATIONKEY' | translate }}</strong>{{device.lorawanSettings?.OTAAapplicationKey}}
@@ -15,4 +14,4 @@
1514
<p><strong>{{ 'IOTDEVICE.LORA.NFCNTDOWN' | translate }}</strong>{{device.lorawanSettings?.nFCntDown }}</p>
1615
</ng-container>
1716
<p><strong>{{ 'IOTDEVICE.LORA.SKIPFCNTCHECK' | translate }}</strong>{{device.lorawanSettings?.skipFCntCheck | yesNo}}
18-
</p>
17+
</p>
Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import { Component, Input, OnInit } from '@angular/core';
22
import { IotDevice } from '@applications/iot-devices/iot-device.model';
33
import { DeviceProfileService } from '@profiles/device-profiles/device-profile.service';
4-
import { ServiceProfileResponseOne } from '@profiles/service-profiles/service-profile.model';
5-
import { ServiceProfileService } from '@profiles/service-profiles/service-profile.service';
6-
import { Subscribable, Subscription } from 'rxjs';
4+
import { Subscription } from 'rxjs';
75

86
@Component({
97
selector: 'app-iot-device-detail-lorawan',
@@ -16,16 +14,13 @@ export class IotDeviceDetailLorawanComponent implements OnInit {
1614
deviceProfileSubscription: Subscription;
1715
public OTAA: boolean;
1816
public deviceProfileName: string;
19-
public serviceProfileName: string;
2017

2118
constructor(
2219
private deviceProfileService: DeviceProfileService,
23-
private serviceProfileService: ServiceProfileService
2420
) { }
2521

2622
ngOnInit(): void {
2723
this.getDeviceProfil();
28-
this.getServiceProfil();
2924
}
3025

3126
getDeviceProfil() {
@@ -35,12 +30,4 @@ export class IotDeviceDetailLorawanComponent implements OnInit {
3530
this.deviceProfileName = response.deviceProfile.name;
3631
});
3732
}
38-
39-
getServiceProfil() {
40-
this.deviceProfileSubscription = this.serviceProfileService.getOne(this.device.lorawanSettings?.serviceProfileID)
41-
.subscribe((response: ServiceProfileResponseOne) => {
42-
this.serviceProfileName = response.serviceProfile.name;
43-
});
44-
}
45-
4633
}

0 commit comments

Comments
 (0)