Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AUS-3936 Clear bounds issue, plus minor UI tweaks #277

Merged
merged 2 commits into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,6 @@ export class DownloadPanelComponent implements OnInit {
*/
public clearBounds(): void {
this.boundsService.clearBounds();
this.wcsDownloadForm = {};
this.wcsDownloadListOption = null;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/app/menupanel/login/login-menu.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
</div>
</button>
<mat-menu #loginMenu="matMenu" style="margin-top:12px;">
<h5 *ngIf="userHasStates()" mat-menu-item><button (click)="manageStates()" class="btn user-button"><i class="ti-link"></i>&nbsp;&nbsp;Manage Permanent Links</button></h5>
<h5 mat-menu-item><button (click)="logOut()" class="btn user-button"><i class="fa fa-power-off"></i>&nbsp;&nbsp;Log Out</button></h5>
<h5 *ngIf="userHasStates()" mat-menu-item (click)="manageStates()"><i class="ti-link"></i>&nbsp;&nbsp;Manage Permanent Links</h5>
<h5 mat-menu-item (click)="logOut()"><i class="fa fa-power-off"></i>&nbsp;&nbsp;Log Out</h5>
</mat-menu>
</div>
<div *ngIf="!user">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ export class NVCLDatasetListComponent implements OnInit {
this.selectedLogNames[datasetId] = logNames;
if (logIds.length <= 0) {
alert('No logs selected');
return;
}

setTimeout(() => {
Expand Down Expand Up @@ -309,6 +310,7 @@ export class NVCLDatasetListComponent implements OnInit {

if (logIds.length <= 0) {
alert('No logs selected');
return;
}
this.nvclService.getNVCL2_0_CSVDownload(this.onlineResource.url, logIds).
subscribe(response => {
Expand Down
2 changes: 1 addition & 1 deletion src/app/modalwindow/querier/querier.modal.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h2 style="margin-top:10px;">No results found, try zooming to improve accuracy</
<div class="card-header">
<h4 class="card-title">
<a (click)="transformToHtml(doc)" *ngIf="doc.node_name !== null" class="accordion-link" data-toggle="collapse" href="#doc-collapse{{i}}">
{{doc.layer.name}} : {{doc.node_name}}&nbsp;<i *ngIf="transformingToHtml[doc.key] && doc.expanded" class="fa fa-spinner fa-spin"></i>
{{doc.layer.name}}{{doc.node_name ? ': ' + doc.node_name : ''}}&nbsp;<i *ngIf="transformingToHtml[doc.key] && doc.expanded" class="fa fa-spinner fa-spin"></i>
</a>
<a (click)="transformToHtml(doc)" *ngIf="doc.node_name === null" class="accordion-link" data-toggle="collapse" href="#doc-collapse{{i}}">
{{doc.layer.name}}&nbsp;<i *ngIf="transformingToHtml[doc.key] && doc.expanded" class="fa fa-spinner fa-spin"></i>
Expand Down
30 changes: 15 additions & 15 deletions src/app/modalwindow/querier/querier.modal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ export class QuerierModalComponent implements OnInit {
});
}


/**
* Copy drawn polygon to clipboard
* @param document polygon as document
Expand Down Expand Up @@ -185,32 +184,37 @@ export class QuerierModalComponent implements OnInit {

// Look for changes and update UI after brief delay
public onDataChange(): void {
let htmldata = []
let Expression=/http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/;
let objExp=new RegExp(Expression);
const htmldata = []
const Expression = /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/;
const objExp = new RegExp(Expression);
for (let i = 0; i < this.docs.length; i++) {
var doc = new DOMParser().parseFromString(this.docs[i].raw, "text/xml");
const doc = new DOMParser().parseFromString(this.docs[i].raw, 'text/xml');
if (doc.getElementsByTagName('gml:name').length != 0) {
for (let html in doc.getElementsByTagName('gml:name')) {
for (const html in doc.getElementsByTagName('gml:name')) {
if(!objExp.test(doc.getElementsByTagName('gml:name')[html].innerHTML)) {
htmldata.push(doc.getElementsByTagName('gml:name')[html].innerHTML)
}
}
} else if (doc.getElementsByTagName('gml:NAME').length != 0) {
for (const html in doc.getElementsByTagName('gml:NAME')) {
if(!objExp.test(doc.getElementsByTagName('gml:NAME')[html].innerHTML)) {
htmldata.push(doc.getElementsByTagName('gml:NAME')[html].innerHTML)
}
}
} else if (doc.getElementsByTagName('gsmlp:name').length != 0) {
for (let html in doc.getElementsByTagName('gsmlp:name')) {
for (const html in doc.getElementsByTagName('gsmlp:name')) {
if(!objExp.test(doc.getElementsByTagName('gsmlp:name')[html].innerHTML)) {
htmldata.push(doc.getElementsByTagName('gsmlp:name')[html].innerHTML)
}
}
} else if (doc.getElementsByTagName('null:name').length != 0) {
for (let html in doc.getElementsByTagName('null:name')) {
for (const html in doc.getElementsByTagName('null:name')) {
if(!objExp.test(doc.getElementsByTagName('null:name')[html].innerHTML)) {
htmldata.push(doc.getElementsByTagName('null:name')[html].innerHTML)
}
}
}
this.docs[i]['node_name'] = htmldata[i]

}
setTimeout(() => {
this.changeDetectorRef.detectChanges();
Expand All @@ -223,7 +227,6 @@ export class QuerierModalComponent implements OnInit {
* @param document
*/
public transformToHtml(document): void {

if (this.msclService.usesGMLObs(document.raw)) {
this.hasMsclAnalytics = true;
}
Expand Down Expand Up @@ -269,16 +272,14 @@ export class QuerierModalComponent implements OnInit {
document.loadSubComponent = true;
this.transformingToHtml[document.key] = false;
this.changeDetectorRef.detectChanges();
},
// try default XML tree display
error => {
}, () => {
// try default XML tree display
this.parseTree(document);
this.transformingToHtml[document.key] = false;
this.changeDetectorRef.detectChanges();
});
}


/**
* Parses server response and builds a document tree
* @param document server response object
Expand Down Expand Up @@ -373,7 +374,6 @@ export class QuerierModalComponent implements OnInit {
return data;
}


/**
* Reformats labels to make them more user-friendly
* @param label label string
Expand Down