Display app improvements

- Add summary page
- Use common time range component
This commit is contained in:
2021-05-30 19:10:22 -04:00
parent bfc800a6d0
commit ad50839fae
21 changed files with 596 additions and 227 deletions

View File

@@ -4,9 +4,10 @@ import { HubConnectionBuilder, HubConnection } from '@aspnet/signalr';
import { WeatherUpdate } from 'src/app/models/weather/weather-update';
import { WeatherValue } from 'src/app/models/weather/weather-value';
import { HttpClient } from '@angular/common/http';
import { WeatherValueType } from 'src/app/models/weather/weather-value-type';
import { WeatherAggregates } from 'src/app/models/weather/weather-aggregates';
import * as moment from 'moment';
import { WeatherValueType } from 'src/app/models/weather/weather-value-type';
@Injectable({
providedIn: 'root'
@@ -39,4 +40,13 @@ export class WeatherService {
return data;
}
async getReadingAggregate(start: moment.Moment, end: moment.Moment): Promise<WeatherAggregates> {
const startString = start.toISOString();
const endString = end.toISOString();
const data = await this.httpClient.get<WeatherAggregates>(`/api/weather/readings/aggregate?start=${startString}&end=${endString}`).toPromise();
return data;
}
}