Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IOT-1507: More gateway metadata (#158)
* Added new gateway metadata to table and details view * Added minwidths to gateway table
- Loading branch information
1 parent
dcf75e1
commit 41b4140
Showing
12 changed files
with
431 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import { recordToEntries } from '@shared/helpers/record.helper'; | ||
import { recordToEntries } from "@shared/helpers/record.helper"; | ||
|
||
export enum ApplicationStatus { | ||
'NONE' = 'NONE', | ||
'IN-OPERATION' = 'IN-OPERATION', | ||
'PROJECT' = 'PROJECT', | ||
'PROTOTYPE' = 'PROTOTYPE', | ||
'OTHER' = 'OTHER', | ||
"NONE" = "NONE", | ||
"IN-OPERATION" = "IN-OPERATION", | ||
"PROJECT" = "PROJECT", | ||
"PROTOTYPE" = "PROTOTYPE", | ||
"OTHER" = "OTHER", | ||
} | ||
|
||
export const ApplicationStatusEntries = recordToEntries(ApplicationStatus); |
22 changes: 11 additions & 11 deletions
22
...applications/iot-devices/iot-devices-tab/export-csv-dialog/export-csv-dialog.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import { Component, Inject, OnInit } from '@angular/core'; | ||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; | ||
import { DialogModel } from '@shared/models/dialog.model'; | ||
import { Component, Inject, OnInit } from "@angular/core"; | ||
import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog"; | ||
import { DialogModel } from "@shared/models/dialog.model"; | ||
|
||
@Component({ | ||
selector: 'export-csv-dialog', | ||
templateUrl: './export-csv-dialog.component.html', | ||
styleUrls: ['./export-csv-dialog.component.scss'], | ||
selector: "export-csv-dialog", | ||
templateUrl: "./export-csv-dialog.component.html", | ||
styleUrls: ["./export-csv-dialog.component.scss"], | ||
}) | ||
export class ExportCsvDialogComponent implements OnInit { | ||
constructor( | ||
public dialog: MatDialogRef<ExportCsvDialogComponent>, | ||
@Inject(MAT_DIALOG_DATA) public dialogModel: DialogModel | ||
) {} | ||
constructor( | ||
public dialog: MatDialogRef<ExportCsvDialogComponent>, | ||
@Inject(MAT_DIALOG_DATA) public dialogModel: DialogModel | ||
) {} | ||
|
||
ngOnInit(): void {} | ||
ngOnInit(): void {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,40 @@ | ||
import moment from 'moment'; | ||
import moment from "moment"; | ||
import { recordToEntries } from "@shared/helpers/record.helper"; | ||
|
||
export enum GatewayStatusInterval { | ||
DAY = 'DAY', | ||
WEEK = 'WEEK', | ||
MONTH = 'MONTH', | ||
DAY = "DAY", | ||
WEEK = "WEEK", | ||
MONTH = "MONTH", | ||
} | ||
|
||
export const gatewayStatusIntervalToDate = ( | ||
interval: GatewayStatusInterval | ||
): Date => { | ||
const now = new Date(); | ||
export const gatewayStatusIntervalToDate = (interval: GatewayStatusInterval): Date => { | ||
const now = new Date(); | ||
|
||
switch (interval) { | ||
case GatewayStatusInterval.WEEK: | ||
return moment(now).subtract(7, 'days').toDate(); | ||
case GatewayStatusInterval.MONTH: | ||
return moment(now).subtract(30, 'days').toDate(); | ||
default: | ||
return moment(now).subtract(1, 'days').toDate(); | ||
} | ||
switch (interval) { | ||
case GatewayStatusInterval.WEEK: | ||
return moment(now).subtract(7, "days").toDate(); | ||
case GatewayStatusInterval.MONTH: | ||
return moment(now).subtract(30, "days").toDate(); | ||
default: | ||
return moment(now).subtract(1, "days").toDate(); | ||
} | ||
}; | ||
|
||
export enum GatewayPlacement { | ||
"NONE" = "NONE", | ||
"OUTDOORS" = "OUTDOORS", | ||
"INDOORS" = "INDOORS", | ||
"OTHER" = "OTHER", | ||
} | ||
|
||
export enum GatewaySetupStatus { | ||
"NONE" = "NONE", | ||
"IN-OPERATION" = "IN-OPERATION", | ||
"PROJECT" = "PROJECT", | ||
"PROTOTYPE" = "PROTOTYPE", | ||
"OTHER" = "OTHER", | ||
} | ||
|
||
export const GatewayPlacementEntries = recordToEntries(GatewayPlacement); | ||
|
||
export const GatewayStatusEntries = recordToEntries(GatewaySetupStatus); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.