Skip to content

Commit f4eda01

Browse files
more changes
1 parent 2125a66 commit f4eda01

File tree

34 files changed

+542
-464
lines changed

34 files changed

+542
-464
lines changed

back-end/api/src/observation/services/observations.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ export class ObservationsService {
543543
filter.toDate ?? null // p_to_date timestamptz
544544
];
545545

546-
const sql = `SELECT * FROM func_data_availaibility_details($1, $2, $3, $4, $5, $6)`;
546+
const sql = `SELECT * FROM func_data_availaibility_details($1, $2, $3, $4, $5, $6)`;
547547

548548
const rows = await this.dataSource.query(sql, params);
549549

front-end/pwa/src/app/core/dashboard/dashboard.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Subject, takeUntil } from 'rxjs';
33
import { PagesDataService } from '../services/pages-data.service';
44
import { AppAuthService } from 'src/app/app-auth.service';
55
import { LoggedInUserModel } from 'src/app/admin/users/models/logged-in-user.model';
6-
import { CachedMetadataSearchService } from 'src/app/metadata/metadata-updates/cached-metadata-search.service';
6+
import { CachedMetadataService } from 'src/app/metadata/metadata-updates/cached-metadata.service';
77

88
@Component({
99
selector: 'app-dashboard',
@@ -19,7 +19,7 @@ export class DashboardComponent implements OnDestroy {
1919
constructor(
2020
private pagesDataService: PagesDataService,
2121
private appAuthService: AppAuthService,
22-
private cachedMetadataSearchService: CachedMetadataSearchService,) {
22+
private cachedMetadataSearchService: CachedMetadataService,) {
2323
this.pagesDataService.setPageHeader('Dashboard');
2424

2525
this.appAuthService.user.pipe(

front-end/pwa/src/app/data-ingestion/data-correction/data-correction.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { IntervalsUtil } from 'src/app/shared/controls/period-input/Intervals.ut
99
import { ObservationDefinition } from '../form-entry/defintitions/observation.definition';
1010
import { PagingParameters } from 'src/app/shared/controls/page-input/paging-parameters';
1111
import { DateUtils } from 'src/app/shared/utils/date.utils';
12-
import { CachedMetadataSearchService } from 'src/app/metadata/metadata-updates/cached-metadata-search.service';
12+
import { CachedMetadataService } from 'src/app/metadata/metadata-updates/cached-metadata.service';
1313
import { HttpErrorResponse } from '@angular/common/http';
1414
import { ActivatedRoute } from '@angular/router';
1515
import { ObservationEntry } from 'src/app/observations/models/observation-entry.model';
@@ -40,7 +40,7 @@ export class DataCorrectionComponent implements OnInit, OnDestroy {
4040

4141
constructor(
4242
private pagesDataService: PagesDataService,
43-
private cachedMetadataSearchService: CachedMetadataSearchService,
43+
private cachedMetadataSearchService: CachedMetadataService,
4444
private observationService: ObservationsService,
4545
private route: ActivatedRoute,
4646
) {
@@ -51,7 +51,7 @@ export class DataCorrectionComponent implements OnInit, OnDestroy {
5151
).subscribe(allMetadataLoaded => {
5252
if (!allMetadataLoaded) return;
5353
// Get the climsoft time zone display setting
54-
this.utcOffset = this.cachedMetadataSearchService.getUTCOffSet();
54+
this.utcOffset = this.cachedMetadataSearchService.utcOffSet;
5555
this.allMetadataLoaded = allMetadataLoaded;
5656
this.queryData();
5757
});

front-end/pwa/src/app/data-ingestion/deleted-data/deleted-data.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { IntervalsUtil } from 'src/app/shared/controls/period-input/Intervals.ut
99
import { ObservationDefinition } from '../form-entry/defintitions/observation.definition';
1010
import { PagingParameters } from 'src/app/shared/controls/page-input/paging-parameters';
1111
import { DateUtils } from 'src/app/shared/utils/date.utils';
12-
import { CachedMetadataSearchService } from 'src/app/metadata/metadata-updates/cached-metadata-search.service';
12+
import { CachedMetadataService } from 'src/app/metadata/metadata-updates/cached-metadata.service';
1313

1414
interface ObservationEntry {
1515
obsDef: ObservationDefinition;
@@ -50,7 +50,7 @@ export class DeletedDataComponent implements OnDestroy {
5050

5151
constructor(
5252
private pagesDataService: PagesDataService,
53-
private cachedMetadataSearchService: CachedMetadataSearchService,
53+
private cachedMetadataSearchService: CachedMetadataService,
5454
private observationService: ObservationsService,
5555
) {
5656
this.pagesDataService.setPageHeader('Deleted Data');
@@ -60,7 +60,7 @@ export class DeletedDataComponent implements OnDestroy {
6060
).subscribe(data => {
6161
//console.log('cached: ', data)
6262
if (!data) return;
63-
this.utcOffset = this.cachedMetadataSearchService.getUTCOffSet();
63+
this.utcOffset = this.cachedMetadataSearchService.utcOffSet;
6464
this.queryData();
6565
});
6666

front-end/pwa/src/app/data-ingestion/form-entry/defintitions/form-entry.definition.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { RangeThresholdQCTestParamsModel } from "src/app/metadata/qc-tests/model
1010
import { StationCacheModel } from "src/app/metadata/stations/services/stations-cache.service";
1111
import { EntryFormObservationQueryModel } from "../../models/entry-form-observation-query.model";
1212
import { ElementCacheModel } from "src/app/metadata/elements/services/elements-cache.service";
13-
import { CachedMetadataSearchService } from "src/app/metadata/metadata-updates/cached-metadata-search.service";
13+
import { CachedMetadataService } from "src/app/metadata/metadata-updates/cached-metadata.service";
1414
import { ViewObservationModel } from "../../models/view-observation.model";
1515
import { QCStatusEnum } from "../../models/qc-status.enum";
1616

@@ -43,12 +43,12 @@ export class FormEntryDefinition {
4343

4444

4545

46-
private cachedMetadataSearchService: CachedMetadataSearchService;
46+
private cachedMetadataSearchService: CachedMetadataService;
4747

4848
constructor(
4949
station: StationCacheModel,
5050
source: ViewSourceModel,
51-
newCachedMetadataSearchService: CachedMetadataSearchService) {
51+
newCachedMetadataSearchService: CachedMetadataService) {
5252

5353
this.station = station;
5454
this.source = source;

front-end/pwa/src/app/data-ingestion/form-entry/defintitions/observation.definition.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ViewObservationLogModel } from "src/app/data-ingestion/models/view-obse
44
import { DateUtils } from "src/app/shared/utils/date.utils";
55
import { NumberUtils } from "src/app/shared/utils/number.utils";
66
import { StringUtils } from "src/app/shared/utils/string.utils";
7-
import { CachedMetadataSearchService } from "src/app/metadata/metadata-updates/cached-metadata-search.service";
7+
import { CachedMetadataService } from "src/app/metadata/metadata-updates/cached-metadata.service";
88
import { QCTestTypeEnum } from "src/app/metadata/qc-tests/models/qc-test-type.enum";
99
import { ViewObservationModel, ViewQCTestLog } from "../../models/view-observation.model";
1010

@@ -43,10 +43,10 @@ export class ObservationDefinition {
4343
public originalInterval: number;
4444

4545

46-
private cachedMetadataSearchService: CachedMetadataSearchService;
46+
private cachedMetadataSearchService: CachedMetadataService;
4747

4848
constructor(
49-
newCachedMetadataSearchService: CachedMetadataSearchService,
49+
newCachedMetadataSearchService: CachedMetadataService,
5050
observation: ViewObservationModel,
5151
scaleValue: boolean,) {
5252
this._observation = observation;
@@ -328,7 +328,7 @@ export class ObservationDefinition {
328328

329329
public getObservationLog(): ViewObservationLogModel[] {
330330
const element = this.cachedMetadataSearchService.getElement(this.observation.elementId);
331-
const utcOffset = this.cachedMetadataSearchService.getUTCOffSet();
331+
const utcOffset = this.cachedMetadataSearchService.utcOffSet;
332332
// Transform the log data accordingly
333333
const viewObservationLog: ViewObservationLogModel[] = this.observation.log ? this.observation.log.map(item => {
334334
const viewLog = { ...item };
@@ -344,7 +344,7 @@ export class ObservationDefinition {
344344
}
345345
) : [];
346346

347-
347+
348348

349349
return viewObservationLog;
350350
}

front-end/pwa/src/app/data-ingestion/form-entry/form-entry.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { DateUtils } from 'src/app/shared/utils/date.utils';
2121
import { AppLocationService } from 'src/app/app-location.service';
2222
import * as turf from '@turf/turf';
2323
import { HttpErrorResponse } from '@angular/common/http';
24-
import { CachedMetadataSearchService } from 'src/app/metadata/metadata-updates/cached-metadata-search.service';
24+
import { CachedMetadataService } from 'src/app/metadata/metadata-updates/cached-metadata.service';
2525
import { AppAuthInterceptor } from 'src/app/app-auth.interceptor';
2626

2727
@Component({
@@ -66,7 +66,7 @@ export class FormEntryComponent implements OnInit, OnDestroy {
6666
(private pagesDataService: PagesDataService,
6767
private stationFormsService: StationFormsService,
6868
private observationService: ObservationsService,
69-
private cachedMetadataSearchService: CachedMetadataSearchService,
69+
private cachedMetadataSearchService: CachedMetadataService,
7070
private locationService: AppLocationService,
7171
private route: ActivatedRoute,
7272
private location: Location,) {
Lines changed: 44 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,46 @@
1-
<div class="d-flex flex-column align-items-center">
2-
<div class="fw-bold">Still in development!</div>
3-
<div class="text-info">
4-
Details will enable detailed analysis of availability of data.
1+
<div>
2+
<div class="mb-2">
3+
<app-data-availability-filter-selection-details [enableQueryButton]="enableQueryButton"
4+
[filter]="filter" (filterChange)="onQueryClick($event)" />
5+
</div>
6+
<div class="app-table-container" style="height: 80vh;">
7+
<table class="table table-hover table-sm">
8+
<thead>
9+
<tr>
10+
<th>Station</th>
11+
<th>Element</th>
12+
<th>Level</th>
13+
<th>Inteval</th>
14+
<th>From Date</th>
15+
<th>To Date</th>
16+
<th>Expected</th>
17+
<th>Non-Missing</th>
18+
<th>Confirmed Missing</th>
19+
<th>Gaps</th>
20+
<th>Gaps + Missing</th>
21+
<th>QC Nones</th>
22+
<th>QC Passes</th>
23+
<th>QC Fails</th>
24+
</tr>
25+
</thead>
26+
<tbody class="table-group-divider">
27+
<tr *ngFor="let detail of availabilityDetails" class="app-cursor-pointer">
28+
<td> {{ detail.stationId + ' - ' + detail.stationName }} </td>
29+
<td> {{ detail.elementId + ' - ' + detail.elementAbbrv }} </td>
30+
<td> {{ detail.level }} </td>
31+
<td> {{ detail.intervalName }} </td>
32+
<td> {{ detail.fromFormattedDatetime }} </td>
33+
<td> {{ detail.toFormattedDatetime }} </td>
34+
<td> {{ detail.expected }} </td>
35+
<td> {{ detail.nonMissing }} </td>
36+
<td> {{ detail.confirmedMissing }} </td>
37+
<td> {{ detail.gaps }} </td>
38+
<td> {{ detail.gapsPlusMissing }} </td>
39+
<td> {{ detail.qcNones }} </td>
40+
<td> {{ detail.qcPasses }} </td>
41+
<td> {{ detail.qcFails }} </td>
42+
</tr>
43+
</tbody>
44+
</table>
545
</div>
6-
</div>
7-
8-
<div class="app-table-container" style="height: 80vh;">
9-
<table class="table table-hover table-sm">
10-
<thead>
11-
<tr>
12-
<th>Station</th>
13-
<th>Element</th>
14-
<th>Level</th>
15-
<th>Inteval</th>
16-
<th>From Date</th>
17-
<th>To Date</th>
18-
<th>Expected</th>
19-
<th>Non-Missing</th>
20-
<th>Confirmed Missing</th>
21-
<th>Gaps</th>
22-
<th>Gaps + Missing</th>
23-
<th>QC Nones</th>
24-
<th>QC Passes</th>
25-
<th>QC Fails</th>
26-
</tr>
27-
</thead>
28-
<tbody class="table-group-divider">
29-
<tr *ngFor="let detail of availabilityDetails" class="app-cursor-pointer">
30-
<td> {{ detail.stationId + ' - ' + detail.stationName }} </td>
31-
<td> {{ detail.elementId + ' - ' + detail.elementAbbrv }} </td>
32-
<td> {{ detail.level }} </td>
33-
<td> {{ detail.intervalName }} </td>
34-
<td> {{ detail.fromFormattedDatetime }} </td>
35-
<td> {{ detail.toFormattedDatetime }} </td>
36-
<td> {{ detail.expected }} </td>
37-
<td> {{ detail.nonMissing }} </td>
38-
<td> {{ detail.confirmedMissing }} </td>
39-
<td> {{ detail.gaps }} </td>
40-
<td> {{ detail.gapsPlusMissing }} </td>
41-
<td> {{ detail.qcNones }} </td>
42-
<td> {{ detail.qcPasses }} </td>
43-
<td> {{ detail.qcFails }} </td>
44-
</tr>
45-
</tbody>
46-
</table>
4746
</div>

0 commit comments

Comments
 (0)