diff --git a/src/app/applications/application.model.ts b/src/app/applications/application.model.ts index 07982ae4..6ebbf7d7 100644 --- a/src/app/applications/application.model.ts +++ b/src/app/applications/application.model.ts @@ -6,6 +6,7 @@ import { ApplicationStatus } from './enums/status.enum'; import { IotDevice } from './iot-devices/iot-device.model'; import { ApplicationDeviceType } from './models/application-device-type.model'; import { PermissionResponse } from '@app/admin/permission/permission.model'; +import { Datatarget } from '@applications/datatarget/datatarget.model'; export class Application { public id: number; @@ -33,6 +34,7 @@ export class Application { public deviceTypes?: ApplicationDeviceType[]; public permissions: PermissionResponse[]; public permissionIds: number[]; + public dataTargets: Datatarget[]; } export class ApplicationRequest { diff --git a/src/app/applications/applications-list/applications-table/applications-table.component.html b/src/app/applications/applications-list/applications-table/applications-table.component.html index 14d26618..6f014aa6 100644 --- a/src/app/applications/applications-list/applications-table/applications-table.component.html +++ b/src/app/applications/applications-list/applications-table/applications-table.component.html @@ -1,3 +1,31 @@ +
| + | {{ 'APPLICATION-TABLE.NAME' | translate }} | {{element.name}} + class="application-link">{{element.name}} + | ++ {{'APPLICATION-TABLE.OWNER' | translate}} + | ++ {{application.owner ?? '-'}} + | ++ {{'APPLICATION-TABLE.CONTACT-PERSON' | translate}} + | ++ {{application.contactPerson ?? '-'}} | {{ 'APPLICATION-TABLE.IOT-DEVICES' | translate }} | - {{element ?.iotDevices?.length ? element?.iotDevices?.length : 0}} + {{element?.iotDevices?.length ?? 0}} + | + + ++ {{ 'APPLICATION-TABLE.DATA-TARGETS' | translate}} + | ++ {{application?.dataTargets?.length ?? 0}} + | ++ {{ 'APPLICATION-TABLE.OPEN-DATA-DK' | translate }} + | ++ {{isOpenDataDK(application.dataTargets) | yesNo}} + | ++ {{'APPLICATION-TABLE.STATUS' | translate}} + | ++ {{'APPLICATION.STATUS.' + application.status | translate}} + | ++ {{'APPLICATION-TABLE.PERSONAL-DATA' | translate}} + | +
+ |
+ + {{'APPLICATION-TABLE.START-DATE' | translate}} + | ++ {{(application.startDate | dateOnly) ?? '-'}} + | ++ {{'APPLICATION-TABLE.END-DATE' | translate}} + | ++ {{(application.endDate | dateOnly) ?? '-'}} + | ++ {{'APPLICATION-TABLE.CATEGORY' | translate}} + | ++ {{application.category ?? '-'}} + | ++ {{'APPLICATION-TABLE.CONTROLLED-PROPERTIES' | translate}} + | ++ {{mapControlledProperties(application.controlledProperties) ?? '-'}} + | ++ {{'APPLICATION-TABLE.DEVICE-TYPES' | translate}} + | ++ {{mapDeviceTypes(application.deviceTypes) ?? '-'}} | + |
|---|
|
-
-
+ |
+
+
+
+ |
+
+
+
+
+ |
-
+
- {{'DATATARGET.DELETE' | translate}}
- |
-
-
-
-
- |
-
-
-
- {{'DATATARGET.DELETE' | translate}} - |
+
|
{{element.name}}
{{element.name}}
diff --git a/src/app/gateway/gateway-table/gateway-table.component.ts b/src/app/gateway/gateway-table/gateway-table.component.ts
index f5e05dd6..6fc4bc43 100644
--- a/src/app/gateway/gateway-table/gateway-table.component.ts
+++ b/src/app/gateway/gateway-table/gateway-table.component.ts
@@ -1,139 +1,148 @@
-import { ChirpstackGatewayService } from 'src/app/shared/services/chirpstack-gateway.service';
-import { TranslateService } from '@ngx-translate/core';
-import { Gateway, GatewayResponseMany } from '../gateway.model';
-import {
- faExclamationTriangle,
- faCheckCircle,
-} from '@fortawesome/free-solid-svg-icons';
-import moment from 'moment';
-import { Component, ViewChild, AfterViewInit, Input } from '@angular/core';
-import { MatPaginator, PageEvent } from '@angular/material/paginator';
-import { Observable, of as observableOf, Subject } from 'rxjs';
-import { catchError, map, startWith, switchMap } from 'rxjs/operators';
-import { MeService } from '@shared/services/me.service';
-import { DeleteDialogService } from '@shared/components/delete-dialog/delete-dialog.service';
-import { environment } from '@environments/environment';
-import { MatSort } from '@angular/material/sort';
-import { MatTableDataSource } from '@angular/material/table';
-import { tableSorter } from '@shared/helpers/table-sorting.helper';
-import { OrganizationAccessScope } from '@shared/enums/access-scopes';
-import { DefaultPageSizeOptions } from '@shared/constants/page.constants';
-
-@Component({
- selector: 'app-gateway-table',
- templateUrl: './gateway-table.component.html',
- styleUrls: ['./gateway-table.component.scss'],
-})
-export class GatewayTableComponent implements AfterViewInit {
- @Input() organisationChangeSubject: Subject |