From fc1696523d8414282832e8cd62f1941485619bae Mon Sep 17 00:00:00 2001 From: Ray Plante Date: Fri, 19 Jul 2019 13:58:26 -0400 Subject: [PATCH 1/3] landing page menu: use location.mdService for md --- angular/src/app/landing/landing.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angular/src/app/landing/landing.component.ts b/angular/src/app/landing/landing.component.ts index 5f121e506..62fb08d1f 100644 --- a/angular/src/app/landing/landing.component.ts +++ b/angular/src/app/landing/landing.component.ts @@ -256,7 +256,7 @@ export class LandingComponent implements OnInit { * Update menu on landing page */ updateMenu() { - let mdapi = this.cfg.get("mdAPI", "/unconfigured"); + let mdapi = this.cfg.get("locations.mdService", "/unconfigured"); this.serviceApi = mdapi + "records?@id=" + this.record['@id']; if (!_.includes(mdapi, "/rmm/")) this.serviceApi = mdapi + this.record['ediid']; From 8f61de97c1ba3707a8310cb73f8d67bf0b52368b Mon Sep 17 00:00:00 2001 From: Ray Plante Date: Fri, 19 Jul 2019 15:06:25 -0400 Subject: [PATCH 2/3] app.component.ts: clean out commented out code --- angular/src/app/app.component.ts | 47 -------------------------------- 1 file changed, 47 deletions(-) diff --git a/angular/src/app/app.component.ts b/angular/src/app/app.component.ts index 7fbe44a47..ba726da59 100644 --- a/angular/src/app/app.component.ts +++ b/angular/src/app/app.component.ts @@ -11,50 +11,3 @@ export class AppComponent { title = 'PDR Resource Landing Page'; } -/* - * if SSR is working, this version, which enables a "loading" spinner, - * should not be necessary - * -export class AppComponent implements AfterViewInit, OnInit { - element: HTMLElement; - - constructor(private commonVarService: CommonVarService, - private router: Router) { - this.router.events.subscribe(event => { - if (event instanceof NavigationStart) { - this.element.hidden = false; - } else if (event instanceof NavigationEnd || event instanceof NavigationCancel || event instanceof NavigationError) { - // this.element.hidden = true; - // console.log("Spinner is not visible."); - } - }, () => { - this.element.hidden = true; - }); - } - - /** - * Get the params OnInit - * - ngOnInit() { - this.element = document.getElementById('loadspinner') as HTMLElement; - this.element.hidden = false; - setTimeout(() => { - this.element.hidden = true; - }, 15000); - } - - ngAfterViewInit() { - setTimeout(() => { - this.commonVarService.watchContentReady().subscribe( - value => { - // let element: HTMLElement = document.getElementById('loadspinner') as HTMLElement; - this.element.hidden = value; - setTimeout(() => { - this.element.hidden = true; - }, 10000); - } - ); - }); - } -} -*/ From 046068563d86cc595005a7801f3384c62ced2485 Mon Sep 17 00:00:00 2001 From: Ray Plante Date: Fri, 19 Jul 2019 15:20:38 -0400 Subject: [PATCH 3/3] undoing clean out of app.component.ts --- angular/src/app/app.component.ts | 47 ++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/angular/src/app/app.component.ts b/angular/src/app/app.component.ts index ba726da59..7fbe44a47 100644 --- a/angular/src/app/app.component.ts +++ b/angular/src/app/app.component.ts @@ -11,3 +11,50 @@ export class AppComponent { title = 'PDR Resource Landing Page'; } +/* + * if SSR is working, this version, which enables a "loading" spinner, + * should not be necessary + * +export class AppComponent implements AfterViewInit, OnInit { + element: HTMLElement; + + constructor(private commonVarService: CommonVarService, + private router: Router) { + this.router.events.subscribe(event => { + if (event instanceof NavigationStart) { + this.element.hidden = false; + } else if (event instanceof NavigationEnd || event instanceof NavigationCancel || event instanceof NavigationError) { + // this.element.hidden = true; + // console.log("Spinner is not visible."); + } + }, () => { + this.element.hidden = true; + }); + } + + /** + * Get the params OnInit + * + ngOnInit() { + this.element = document.getElementById('loadspinner') as HTMLElement; + this.element.hidden = false; + setTimeout(() => { + this.element.hidden = true; + }, 15000); + } + + ngAfterViewInit() { + setTimeout(() => { + this.commonVarService.watchContentReady().subscribe( + value => { + // let element: HTMLElement = document.getElementById('loadspinner') as HTMLElement; + this.element.hidden = value; + setTimeout(() => { + this.element.hidden = true; + }, 10000); + } + ); + }); + } +} +*/