-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from GDSC-HSU/feature/view-device
Feature/view device
- Loading branch information
Showing
19 changed files
with
353 additions
and
88 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
import { DeviceStatus } from "./enums/device_status"; | ||
|
||
export interface Device { | ||
id?: string, | ||
accessKey?: string, | ||
oid?: string, | ||
name?: string, | ||
location?: string, | ||
hardwareInfo?: JSON, | ||
tag?: Array<string>; | ||
tags?: Array<string>; | ||
status?: DeviceStatus; | ||
timestampUpdate?: string; | ||
} |
This file was deleted.
Oops, something went wrong.
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
4 changes: 2 additions & 2 deletions
4
src/app/pages/dashboard/pages/devices/components/device-card/device-card.component.html
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
12 changes: 9 additions & 3 deletions
12
src/app/pages/dashboard/pages/devices/components/device-card/device-card.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,16 +1,22 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { ChangeDetectorRef, Component, Input, OnInit } from '@angular/core'; | ||
import { NbDialogService } from '@nebular/theme'; | ||
import { Device } from 'src/app/models/device'; | ||
import { DeviceService } from 'src/app/services/device/device.service'; | ||
import { CreateDeviceDialogComponent } from '../../dialog/create-device-dialog/create-device-dialog.component'; | ||
|
||
@Component({ | ||
selector: 'app-device-card', | ||
templateUrl: './device-card.component.html', | ||
styleUrls: ['./device-card.component.scss'] | ||
}) | ||
export class DeviceCardComponent implements OnInit { | ||
constructor(public deviceService: DeviceService) { } | ||
@Input() loading!: boolean; | ||
constructor(private dialogService: NbDialogService, public deviceService: DeviceService, private ref: ChangeDetectorRef) { } | ||
ngOnInit(): void { | ||
this.deviceService.renderUIDeviceStatus = () => { this.ref.detectChanges() } | ||
} | ||
|
||
|
||
openAddNewDialog() { | ||
this.dialogService.open(CreateDeviceDialogComponent); | ||
} | ||
} |
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.