-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
1,021 additions
and
35 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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "esp-iot-flasher", | ||
"name": "esp-app-market", | ||
"version": "0.0.0", | ||
"scripts": { | ||
"ng": "ng", | ||
|
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
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.mdc-card { | ||
margin-bottom: 10px; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<h1>{{device?.name}}</h1> | ||
<mat-card> | ||
<mat-card-header> | ||
<img mat-card-avatar [src]="device?.imageThumbnail" alt="Device"/> | ||
<mat-card-title>{{device?.name}}</mat-card-title> | ||
<mat-card-subtitle>{{device?.manufacturer}}</mat-card-subtitle> | ||
|
||
</mat-card-header> | ||
|
||
<mat-card-content>{{device?.description}}</mat-card-content> | ||
</mat-card> | ||
|
||
|
||
<mat-card *ngFor="let app of apps"> | ||
<mat-card-header> | ||
<img mat-card-avatar [src]="app.appIcon" alt="Device"/> | ||
<mat-card-title>{{app.name}}</mat-card-title> | ||
<mat-card-subtitle>{{app?.version}}</mat-card-subtitle> | ||
</mat-card-header> | ||
<mat-card-content>{{app?.description}}</mat-card-content> | ||
<mat-card-actions align="end"> | ||
<button mat-raised-button color="primary" [routerLink]="['/device', device?.id, 'app', app.id]">Flash App</button> | ||
|
||
</mat-card-actions> | ||
</mat-card> |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { AppsComponent } from './apps.component'; | ||
|
||
describe('AppsComponent', () => { | ||
let component: AppsComponent; | ||
let fixture: ComponentFixture<AppsComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ AppsComponent ] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(AppsComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { ActivatedRoute } from '@angular/router'; | ||
import { DevicesService } from '../services/devices.service'; | ||
import { Device } from '../models/device'; | ||
import { AppsService } from '../services/apps.service'; | ||
import { App } from '../models/app'; | ||
|
||
@Component({ | ||
selector: 'app-apps', | ||
templateUrl: './apps.component.html', | ||
styleUrls: ['./apps.component.css'] | ||
}) | ||
export class AppsComponent implements OnInit{ | ||
|
||
deviceId: string; | ||
device: Device | undefined; | ||
apps: App[]; | ||
|
||
constructor(private route: ActivatedRoute, | ||
public deviceService: DevicesService, | ||
public appService: AppsService ) { } | ||
|
||
|
||
ngOnInit(): void { | ||
this.deviceId = this.route.snapshot.paramMap.get("deviceId")!; | ||
console.log(this.deviceId); | ||
this.deviceService.findById(this.deviceId).subscribe((device) => { this.device = device; }) | ||
console.log(this.device); | ||
this.appService.findByDeviceId(this.deviceId).subscribe((apps) => { | ||
this.apps = apps; | ||
}); | ||
} | ||
|
||
} |
Empty file.
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<mat-card *ngFor="let device of devices"> | ||
<mat-card-header> | ||
<img mat-card-avatar [src]="device.imageThumbnail" alt="Device"/> | ||
<mat-card-title>{{device.name}}</mat-card-title> | ||
<mat-card-subtitle>{{device.manufacturer}}</mat-card-subtitle> | ||
|
||
</mat-card-header> | ||
|
||
<mat-card-content>{{device.description}}</mat-card-content> | ||
<mat-card-actions> | ||
<button mat-raised-button [routerLink]="['/device', device.id]">Apps</button> | ||
</mat-card-actions> | ||
</mat-card> |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { DevicesComponent } from './devices.component'; | ||
|
||
describe('DevicesComponent', () => { | ||
let component: DevicesComponent; | ||
let fixture: ComponentFixture<DevicesComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ DevicesComponent ] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(DevicesComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { DevicesService } from '../services/devices.service'; | ||
import { Device } from '../models/device'; | ||
|
||
@Component({ | ||
selector: 'app-devices', | ||
templateUrl: './devices.component.html', | ||
styleUrls: ['./devices.component.css'] | ||
}) | ||
export class DevicesComponent implements OnInit { | ||
|
||
devices: Device[] = []; | ||
|
||
constructor(public deviceService: DevicesService) { } | ||
|
||
ngOnInit(): void { | ||
this.deviceService.getDevices().subscribe((devices) => { | ||
this.devices = devices; | ||
}); | ||
} | ||
|
||
} |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.flex-container { | ||
display: flex; | ||
justify-content: space-around; | ||
flex-wrap: wrap; | ||
padding: 16px; | ||
} | ||
|
||
.flex-row { | ||
display: flex; /* or inline-flex */ | ||
padding-right: 10px; | ||
gap: 20px; | ||
align-items: baseline; | ||
justify-content: space-between; | ||
} | ||
|
||
.mdc-card { | ||
margin-bottom: 10px; | ||
} | ||
|
Oops, something went wrong.