Skip to content

Commit ac44b9d

Browse files
authored
Merge pull request #2471 from asfadmin/tyler/aria-version
Aria version filter
2 parents df44ed5 + c352712 commit ac44b9d

12 files changed

Lines changed: 109 additions & 2 deletions

File tree

src/app/components/header/info-bar/info-bar.component.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,13 @@
213213
</span>
214214
}
215215
</span>
216+
<span>
217+
@if (!!ariaVersion) {
218+
<span>
219+
<b> {{ 'ARIA_VERSION' | translate }}:</b> {{ ariaVersion }}
220+
</span>
221+
}
222+
</span>
216223
</div>
217224
<div class="last-info">
218225
<app-ci-search></app-ci-search>

src/app/components/header/info-bar/info-bar.component.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ export class InfoBarComponent implements OnInit, OnDestroy {
8282
public jobIds: string[];
8383
public selectedDataset: string;
8484
public selectedDatasetIsNISARFormat = false;
85+
public ariaVersion: string;
8586

8687
private subs = new SubSink();
8788

@@ -240,6 +241,9 @@ export class InfoBarComponent implements OnInit, OnDestroy {
240241
.subscribe(
241242
(productionConfig) => (this.productionConfig = productionConfig),
242243
);
244+
const ariaVersionSub = this.store$
245+
.select(filtersStore.getAriaVersion)
246+
.subscribe((version) => (this.ariaVersion = version));
243247
[
244248
startSub,
245249
endSub,
@@ -272,6 +276,7 @@ export class InfoBarComponent implements OnInit, OnDestroy {
272276
productionConfigSub,
273277
scienceProductsSub,
274278
jobIdsSub,
279+
ariaVersionSub,
275280
].forEach((sub) => this.subs.add(sub));
276281

277282
this.subs.add(

src/app/components/shared/scene-metadata/scene-metadata.component.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,19 @@
476476
<li>
477477
<b> {{ 'ARIA_VERSION' | translate }} </b>
478478
{{ scene.metadata.ariaVersion }}
479+
@if (isGeoSearch()) {
480+
<mat-icon
481+
[matMenuTriggerFor]="addAriaVersionMenu"
482+
class="v-mid clickable"
483+
>
484+
settings
485+
</mat-icon>
486+
}
487+
<mat-menu #addAriaVersionMenu="matMenu">
488+
<button (click)="setAriaVersion()" mat-menu-item>
489+
{{ 'SET_ARIA_VERSION' | translate }}
490+
</button>
491+
</mat-menu>
479492
</li>
480493
}
481494
@if (dataset.source; as source) {

src/app/components/shared/scene-metadata/scene-metadata.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,12 @@ export class SceneMetadataComponent implements OnInit, OnDestroy {
211211
);
212212
}
213213

214+
public setAriaVersion(): void {
215+
this.store$.dispatch(
216+
new filtersStore.setAriaVersion(this.scene.metadata.ariaVersion),
217+
);
218+
}
219+
214220
private capitalizeFirstLetter(str) {
215221
return str.charAt(0).toUpperCase() + str.slice(1);
216222
}

src/app/components/shared/selectors/other-selector/other-selector.component.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,18 @@
139139
</mat-hint> -->
140140
</mat-form-field>
141141
}
142+
@if (dataset.apiValue.dataset === 'ARIA S1 GUNW') {
143+
<mat-form-field>
144+
<mat-label> Version Number </mat-label>
145+
<input
146+
matInput
147+
type="text"
148+
placeholder="3.0.1"
149+
(input)="onNewAriaVersionSelected($event.target.value)"
150+
[(ngModel)]="ariaVersion"
151+
/>
152+
</mat-form-field>
153+
}
142154

143155
@if (dataset.id === 'NISAR') {
144156
<app-short-name-selector

src/app/components/shared/selectors/other-selector/other-selector.component.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ import { PropertyService } from '@services';
99
import { SubSink } from 'subsink';
1010
import * as models from '@models';
1111
import { ProductTypeSelectorComponent } from '../product-type-selector/product-type-selector.component';
12-
import { MatFormField, MatHint, MatInput } from '@angular/material/input';
12+
import {
13+
MatFormField,
14+
MatHint,
15+
MatInput,
16+
MatLabel,
17+
} from '@angular/material/input';
1318
import { MatSelect, MatOption } from '@angular/material/select';
1419
import { FormsModule } from '@angular/forms';
1520
import { ShortNameSelectorComponent } from '../short-name-selector/short-name-selector.component';
@@ -27,6 +32,7 @@ import { TranslateModule } from '@ngx-translate/core';
2732

2833
MatOption,
2934
MatHint,
35+
MatLabel,
3036
MatInput,
3137
ShortNameSelectorComponent,
3238
TranslateModule,
@@ -43,6 +49,7 @@ export class OtherSelectorComponent implements OnInit, OnDestroy {
4349
polarizations: models.DatasetPolarizations;
4450
subtypes: models.DatasetSubtypes;
4551
groupID: string;
52+
ariaVersion: string;
4653

4754
public datasetProductTypes$ = this.store$.select(
4855
filtersStore.getProductTypes,
@@ -55,7 +62,6 @@ export class OtherSelectorComponent implements OnInit, OnDestroy {
5562
public selectedDataset$ = this.store$.select(filtersStore.getSelectedDataset);
5663
public subtypes$ = this.store$.select(filtersStore.getSubtypes);
5764
public groupID$ = this.store$.select(filtersStore.getGroupID);
58-
5965
public flightDirectionTypes = models.flightDirections;
6066
public p = models.Props;
6167
private subs = new SubSink();
@@ -96,6 +102,11 @@ export class OtherSelectorComponent implements OnInit, OnDestroy {
96102
this.subs.add(
97103
this.groupID$.subscribe((groupID) => (this.groupID = groupID)),
98104
);
105+
this.subs.add(
106+
this.store$
107+
.select(filtersStore.getAriaVersion)
108+
.subscribe((version) => (this.ariaVersion = version)),
109+
);
99110
}
100111

101112
public onNewDatasetBeamModes(beamModes: string[]): void {
@@ -127,6 +138,9 @@ export class OtherSelectorComponent implements OnInit, OnDestroy {
127138
public onNewSubtypeSelected(subtypes): void {
128139
this.store$.dispatch(new filtersStore.SetSubtypes(subtypes));
129140
}
141+
public onNewAriaVersionSelected(version): void {
142+
this.store$.dispatch(new filtersStore.setAriaVersion(version));
143+
}
130144

131145
public onNewGroupID(): void {
132146
if (this.groupID.length > 29) {

src/app/components/sidebar/saved-searches/saved-search/search-filters/geographic-search-filters/geographic-search-filters.component.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@
151151
{{ 'JOINT_OBSERVATION_ONLY' | translate }}
152152
</div>
153153
}
154+
@if (filters.ariaVersion) {
155+
<div>
156+
<b>{{ 'ARIA_VERSION' | translate }}:</b> {{ filters.ariaVersion }}
157+
</div>
158+
}
154159
</div>
155160
}
156161

src/app/models/search.model.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ export interface GeographicFiltersType {
102102
rangeBandwidth: string[];
103103
instrument: string[];
104104
groupID: null | string;
105+
106+
ariaVersion?: string;
105107
}
106108

107109
export interface SarviewsFiltersType {

src/app/services/search-params.service.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ export class SearchParamsService {
8989
})),
9090
);
9191

92+
private ariaVersion$ = this.store$.select(filterStore.getAriaVersion).pipe(
93+
map((ariaVersion) => ({
94+
ariaVersion,
95+
})),
96+
);
97+
9298
private searchPolygon$ = combineLatest([
9399
this.mapService.searchPolygon$.pipe(startWith(null)),
94100
this.store$.select(filterStore.getShouldOmitSearchPolygon),
@@ -307,6 +313,7 @@ export class SearchParamsService {
307313
// this.operaCalibrationParam$,
308314
this.sciProducts$,
309315
this.groupID$,
316+
this.ariaVersion$,
310317
]).pipe(
311318
map((params: any[]) =>
312319
params.reduce((total, param) => ({ ...total, ...param }), {}),

src/app/services/url-state.service.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,13 @@ export class UrlStateService {
820820
),
821821
loader: this.loadProduction,
822822
},
823+
{
824+
name: 'ariaVersion',
825+
source: this.store$
826+
.select(filterStore.getAriaVersion)
827+
.pipe(map((ariaVersion) => ({ ariaVersion }))),
828+
loader: this.loadAriaVersion,
829+
},
823830
{
824831
name: 'useFrameForBaseline',
825832
source: this.store$
@@ -1342,6 +1349,10 @@ export class UrlStateService {
13421349
return new filterStore.SetUseFrameForBaseline(!!usingseFrameForBaseline);
13431350
};
13441351

1352+
private loadAriaVersion = (version: string): Action => {
1353+
return new filterStore.setAriaVersion(version);
1354+
};
1355+
13451356
private loadSeriesState = (seriesState) => {
13461357
const states: models.timeseriesChartItemState[] = [];
13471358
seriesState.split('::').forEach((x) => {

0 commit comments

Comments
 (0)