From c992d71a79c03c21ab42d2170331c846897c1b6f Mon Sep 17 00:00:00 2001 From: Vincent Fazio Date: Wed, 5 Apr 2023 13:21:49 +1000 Subject: [PATCH] AUS-3908 Improve "Info" panel layer metadata display --- .../infopanel/subpanel/subpanel.component.html | 8 ++++---- .../common/infopanel/subpanel/subpanel.component.ts | 12 ++++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/app/menupanel/common/infopanel/subpanel/subpanel.component.html b/src/app/menupanel/common/infopanel/subpanel/subpanel.component.html index 29b17a94..490a5a14 100644 --- a/src/app/menupanel/common/infopanel/subpanel/subpanel.component.html +++ b/src/app/menupanel/common/infopanel/subpanel/subpanel.component.html @@ -1,10 +1,10 @@

Title: {{cswRecord.name}}

Abstract: {{cswRecord.description}}

Contact org: {{cswRecord.contactOrg}}

-

Funder: {{cswRecord.funderOrg}}

+

Funder: {{cswRecord.funderOrg}}

Constraints: {{cleanConstraints(cswRecord.constraints)}}

Access Constraints: {{selectConstraints(layer.capabilityRecords, cswRecord.accessConstraints)}}

-

Info URL: Link to Geonetwork Record

+

Info URL: Link to Geonetwork Record

DOI Name: {{onlineResource.name}}
@@ -14,8 +14,8 @@

{{onlineResource.type}}: {{onlineResource.type}} GetCapabilities Info - {{onlineResource.name.split('_').join(' ')}}: - {{ onlineResource.url }} + {{onlineResource.name.split('_').join(' ')}}: + {{ removeProxy(onlineResource.url) }}

diff --git a/src/app/menupanel/common/infopanel/subpanel/subpanel.component.ts b/src/app/menupanel/common/infopanel/subpanel/subpanel.component.ts index 36df9895..25315e09 100644 --- a/src/app/menupanel/common/infopanel/subpanel/subpanel.component.ts +++ b/src/app/menupanel/common/infopanel/subpanel/subpanel.component.ts @@ -58,6 +58,18 @@ export class InfoPanelSubComponent implements OnChanges { return onlineResource.type === 'WMS' || onlineResource.type === 'WFS' || onlineResource.type === 'WCS' || onlineResource.type === 'CSW'; } + /** Removes proxy from URL for display purposes + * + * e.g. "http://localhost:8080/getViaProxy.do?url=https://raw.githubusercontent.com/CesiumGS/cesium/main/Apps/SampleData/kml/bikeRide.kml" + * get converted to "https://raw.githubusercontent.com/CesiumGS/cesium/main/Apps/SampleData/kml/bikeRide.kml" + * + * @param url URL which may be prepended with a reference to the proxy + * @returns URL without the proxy part + */ + public removeProxy(url: string): string { + return url.replace(/^.+getViaProxy\.do\?url=/, ""); + } + /** * Create a WMS/WFS/WCS/CSW GetCapabilities URL from the provided OnlineResource *