From 8faa3ae668218158286b185dd7e3e0bec5a89b45 Mon Sep 17 00:00:00 2001 From: "stuart.woodman" Date: Fri, 6 Dec 2024 10:36:19 +1100 Subject: [PATCH] Update search service names, allow multiple to be added to search filter. --- .../menupanel/search/searchpanel.component.ts | 19 ++++++++++--------- .../nvcl/nvcl.datasetlist.component.ts | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/app/menupanel/search/searchpanel.component.ts b/src/app/menupanel/search/searchpanel.component.ts index 2a053547..f30abf09 100644 --- a/src/app/menupanel/search/searchpanel.component.ts +++ b/src/app/menupanel/search/searchpanel.component.ts @@ -1,7 +1,7 @@ import { Component, ElementRef, HostListener, Inject, OnInit, ViewChild } from '@angular/core'; import { RectangleEditorObservable } from '@auscope/angular-cesium'; -import { Bbox, CSWRecordModel, CsMapService, LayerHandlerService, LayerModel, ManageStateService, RenderStatusService, UtilitiesService, Constants } from '@auscope/portal-core-ui'; +import { Bbox, CSWRecordModel, CsMapService, LayerHandlerService, LayerModel, RenderStatusService, UtilitiesService, Constants } from '@auscope/portal-core-ui'; import { NgbDropdown, NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { SearchService } from 'app/services/search/search.service'; import { Observable, Subject, Subscription } from 'rxjs'; @@ -61,11 +61,11 @@ const OGC_SERVICES = [ checked: true }, { name: 'IRIS', - fields: ['OGC:IRIS'], + fields: ['iris'], checked: true }, { name: "KML", - fields: ['OGC:KML'], + fields: ['kml'], checked: true }, { name: 'WFS', @@ -77,7 +77,7 @@ const OGC_SERVICES = [ checked: true }, { name: 'WWW', - fields: ['OGC:WWW'], + fields: ['OGC:WWW', 'WWW:LINK-1.0-http--link'], checked: true }] @@ -144,8 +144,7 @@ export class SearchPanelComponent implements OnInit { constructor(private searchService: SearchService, private csMapService: CsMapService, private layerHandlerService: LayerHandlerService, private layerManagerService: LayerManagerService, private uiLayerModelService: UILayerModelService, private renderStatusService: RenderStatusService, - private sidebarService: SidebarService, - private manageStateService: ManageStateService, private modalService: NgbModal, + private sidebarService: SidebarService, private modalService: NgbModal, private http: HttpClient, @Inject('env') private env) { } ngOnInit() { @@ -712,10 +711,12 @@ export class SearchPanelComponent implements OnInit { // OGC services if selected const selectedServices: string[] = []; - const checkedServices = this.ogcServices.filter(s => s.checked === true); - if (checkedServices.length < OGC_SERVICES.length) { + if (!this.allOGCServices.checked) { + const checkedServices = this.ogcServices.filter(s => s.checked === true); for (const service of checkedServices) { - selectedServices.push(service.fields[0]); + for (const serviceField of service.fields) { + selectedServices.push(serviceField); + } } } diff --git a/src/app/modalwindow/querier/customanalytic/nvcl/nvcl.datasetlist.component.ts b/src/app/modalwindow/querier/customanalytic/nvcl/nvcl.datasetlist.component.ts index 14ad4898..3882d16a 100644 --- a/src/app/modalwindow/querier/customanalytic/nvcl/nvcl.datasetlist.component.ts +++ b/src/app/modalwindow/querier/customanalytic/nvcl/nvcl.datasetlist.component.ts @@ -220,7 +220,7 @@ export class NVCLDatasetListComponent implements OnInit { this.nvclService.getNVCL2_0_Images(url, datasetId).subscribe(trayImages => { for (const trayImage of trayImages) { if (trayImage.logName === 'Tray Thumbnail Images') { - this.datasetImages[datasetId] = [] + this.datasetImages[datasetId] = []; let httpParams = new HttpParams(); // httpParams = httpParams.append('serviceUrl', this.nvclService.getNVCLDataServiceUrl(this.onlineResource.url)); // httpParams = httpParams.append('logId', trayImage.logId);