mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-02-17 02:51:39 -05:00
Refactoring
This commit is contained in:
@@ -22,3 +22,4 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { LaundryService } from '../../services/laundry/laundry.service';
|
import { LaundryService } from '../../services/laundry/laundry.service';
|
||||||
import { LaundryStatus } from '../../services/laundry/laundry-status';
|
import { LaundryStatus } from '../../models/laundry/laundry-status';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-laundry',
|
selector: 'app-laundry',
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import { map, shareReplay } from 'rxjs/operators';
|
|||||||
styleUrls: ['./nav.component.scss']
|
styleUrls: ['./nav.component.scss']
|
||||||
})
|
})
|
||||||
export class NavComponent {
|
export class NavComponent {
|
||||||
|
|
||||||
isHandset$: Observable<boolean> = this.breakpointObserver.observe(Breakpoints.Handset)
|
isHandset$: Observable<boolean> = this.breakpointObserver.observe(Breakpoints.Handset)
|
||||||
.pipe(
|
.pipe(
|
||||||
map(result => result.matches),
|
map(result => result.matches),
|
||||||
@@ -17,5 +16,4 @@ export class NavComponent {
|
|||||||
);
|
);
|
||||||
|
|
||||||
constructor(private breakpointObserver: BreakpointObserver) { }
|
constructor(private breakpointObserver: BreakpointObserver) { }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
|
|||||||
import { Chart } from 'angular-highcharts';
|
import { Chart } from 'angular-highcharts';
|
||||||
import { SeriesLineOptions } from 'highcharts';
|
import { SeriesLineOptions } from 'highcharts';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { WeatherValue } from '../../../services/weather/weather-value';
|
import { WeatherValue } from '../../../models/weather/weather-value';
|
||||||
import { ActivatedRoute, ParamMap } from '@angular/router';
|
import { ActivatedRoute, ParamMap } from '@angular/router';
|
||||||
import * as moment from 'moment';
|
import * as moment from 'moment';
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { WeatherReading } from '../../../services/weather/weather-reading';
|
import { WeatherReading } from '../../../models/weather/weather-reading';
|
||||||
import { WeatherService } from '../../../services/weather/weather.service';
|
import { WeatherService } from '../../../services/weather/weather.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|||||||
7
Display/src/app/models/laundry/laundry-status.spec.ts
Normal file
7
Display/src/app/models/laundry/laundry-status.spec.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import { LaundryStatus } from './laundry-status';
|
||||||
|
|
||||||
|
describe('LaundryStatus', () => {
|
||||||
|
it('should create an instance', () => {
|
||||||
|
expect(new LaundryStatus()).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
7
Display/src/app/models/weather/weather-reading.spec.ts
Normal file
7
Display/src/app/models/weather/weather-reading.spec.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import { WeatherReading } from './weather-reading';
|
||||||
|
|
||||||
|
describe('WeatherReading', () => {
|
||||||
|
it('should create an instance', () => {
|
||||||
|
expect(new WeatherReading()).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
import { LaundryStatus } from './laundry-status';
|
|
||||||
|
|
||||||
describe('LaundryStatus', () => {
|
|
||||||
it('should create an instance', () => {
|
|
||||||
expect(new LaundryStatus()).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Observable, BehaviorSubject } from 'rxjs';
|
import { Observable, BehaviorSubject } from 'rxjs';
|
||||||
import { Socket } from 'ngx-socket-io';
|
import { Socket } from 'ngx-socket-io';
|
||||||
import { LaundryStatus } from './laundry-status';
|
import { LaundryStatus } from '../../models/laundry/laundry-status';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
import { WeatherReading } from './weather-reading';
|
|
||||||
|
|
||||||
describe('WeatherReading', () => {
|
|
||||||
it('should create an instance', () => {
|
|
||||||
expect(new WeatherReading()).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Observable, BehaviorSubject } from 'rxjs';
|
import { Observable, BehaviorSubject } from 'rxjs';
|
||||||
import { HubConnectionBuilder, HubConnection } from '@aspnet/signalr';
|
import { HubConnectionBuilder, HubConnection } from '@aspnet/signalr';
|
||||||
import { WeatherReading } from './weather-reading';
|
import { WeatherReading } from '../../models/weather/weather-reading';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
|
|||||||
Reference in New Issue
Block a user