Loading src/app/app-routing.module.ts +3 −3 Original line number Diff line number Diff line Loading @@ -19,11 +19,11 @@ const Routes: Routes = [ { path: 'dps', component: DataPolicyStatementComponent }, { path: 'dashboard', canActivate: [AuthGuard], component: TableComponent}, { path: 'dashboard/site', canActivate: [AuthGuard], component: SiteComponent}, { path: 'dashboard/hostNameComponent', canActivate: [AuthGuard], component: HostnameComponent}, { path: 'dashboard/site/:sitename', canActivate: [AuthGuard], component: SiteComponent}, { path: 'dashboard/hosts/:sitename', canActivate: [AuthGuard], component: HostnameComponent}, { path: 'dashboard/servComponent', canActivate: [AuthGuard],component: ServiceComponentComponent}, { path: 'dashboard/servCompHisComponent', canActivate: [AuthGuard], component: ServiceComponentHistoryComponent}, { path: 'dashboard/component-history/:hostname/:component', canActivate: [AuthGuard], component: ServiceComponentHistoryComponent}, { path: 'dashboard/fullTableComponent', canActivate: [AuthGuard], component: FulltableComponent}, { path: '**', redirectTo: 'login'} ]; Loading src/app/dashboard/fulltable/fulltable.component.ts +3 −3 Original line number Diff line number Diff line Loading @@ -287,7 +287,7 @@ export class FulltableComponent implements OnInit , DoCheck, AfterViewInit{ (asite: Site) => { sessionStorage.setItem('preSitePage', 'Service'); sessionStorage.setItem('currentSelectedSite', JSON.stringify(asite) ); this.router.navigate(['/dashboard/site'], { relativeTo: this.route }); this.router.navigate(['/dashboard/site',serverData.siteName], { relativeTo: this.route }); } ).catch( Loading Loading @@ -344,7 +344,7 @@ export class FulltableComponent implements OnInit , DoCheck, AfterViewInit{ .then( (asite: Site) => { sessionStorage.setItem('currentSelectedSite', JSON.stringify(asite) ); this.router.navigate(['/dashboard/site'], { relativeTo: this.route }); this.router.navigate(['/dashboard/site',name], { relativeTo: this.route }); } ).catch( error => { Loading @@ -362,7 +362,7 @@ export class FulltableComponent implements OnInit , DoCheck, AfterViewInit{ if ( serviceComponent.servCompTagAtSite !== null && serviceComponent.servCompTagAtSite !== ''){ this.servCompService.setSelectedServComp(serviceComponent); sessionStorage.removeItem('currentServComp'); this.router.navigate(['/dashboard/servCompHisComponent'], { relativeTo: this.route }); this.router.navigate(['/dashboard/component-history',serviceComponent.hostName,serviceComponent.servCompName], { relativeTo: this.route }); } } Loading src/app/dashboard/site/site.component.ts +8 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ import { AuthService } from 'src/app/auth.service'; import { MatIconRegistry } from "@angular/material/icon"; import { DomSanitizer } from "@angular/platform-browser"; import { MatDialog } from '@angular/material'; import { switchMap } from 'rxjs/operators'; import {ProfileDialogComponent} from '../profile-dialog/profile-dialog.component'; @Component({ Loading @@ -28,6 +29,7 @@ export class SiteComponent implements OnInit, OnDestroy { shortgiisUrl: string; previousView: string; username: string; public sitename: string; constructor(private siteService: SiteService, public router: Router, Loading Loading @@ -66,6 +68,8 @@ export class SiteComponent implements OnInit, OnDestroy { } ngOnInit() { //this.sitename = this.site.shortName; this.sitename = this.route.snapshot.paramMap.get("sitename") } cuturls(){ Loading Loading @@ -152,6 +156,9 @@ export class SiteComponent implements OnInit, OnDestroy { (asite: Site) => { sessionStorage.setItem('currentSelectedSite', JSON.stringify(asite) ); this.site = asite; this.sitename = this.site.shortName; this.router.navigate(['/dashboard/site',this.sitename], { relativeTo: this.route }); this.sitename = this.route.snapshot.paramMap.get("sitename"); if ( this.site.hostNames !== null && this.site.hostNames.length >0) { this.hasHosts = true; } else { Loading @@ -165,6 +172,7 @@ export class SiteComponent implements OnInit, OnDestroy { } ); this.setNameLists(); this.cuturls(); } Loading src/app/dashboard/table/table.component.ts +3 −3 Original line number Diff line number Diff line Loading @@ -189,7 +189,7 @@ onClick(serverData: SiteShort) { (asite: Site) => { sessionStorage.setItem('preSitePage', 'Site'); sessionStorage.setItem('currentSelectedSite', JSON.stringify(asite) ); this.router.navigate(['/dashboard/site'], { relativeTo: this.route }); this.router.navigate(['/dashboard/site',serverData.siteName], { relativeTo: this.route }); } ).catch( Loading @@ -209,7 +209,7 @@ onSiteNameSelected(name: string) { .then( (asite: Site) => { sessionStorage.setItem('currentSelectedSite', JSON.stringify(asite) ); this.router.navigate(['/dashboard/site'], { relativeTo: this.route }); this.router.navigate(['/dashboard/site',name], { relativeTo: this.route }); } ).catch( error => { Loading Loading @@ -317,7 +317,7 @@ public onHostsSelected(site: SiteShort) { sessionStorage.removeItem('currentHostList'); sessionStorage.removeItem('currentServCompList'); sessionStorage.removeItem('noOfServices'); this.router.navigate(['/dashboard/hostNameComponent'], { relativeTo: this.route }); this.router.navigate(['/dashboard/hosts',site.siteName], { relativeTo: this.route }); } } Loading Loading
src/app/app-routing.module.ts +3 −3 Original line number Diff line number Diff line Loading @@ -19,11 +19,11 @@ const Routes: Routes = [ { path: 'dps', component: DataPolicyStatementComponent }, { path: 'dashboard', canActivate: [AuthGuard], component: TableComponent}, { path: 'dashboard/site', canActivate: [AuthGuard], component: SiteComponent}, { path: 'dashboard/hostNameComponent', canActivate: [AuthGuard], component: HostnameComponent}, { path: 'dashboard/site/:sitename', canActivate: [AuthGuard], component: SiteComponent}, { path: 'dashboard/hosts/:sitename', canActivate: [AuthGuard], component: HostnameComponent}, { path: 'dashboard/servComponent', canActivate: [AuthGuard],component: ServiceComponentComponent}, { path: 'dashboard/servCompHisComponent', canActivate: [AuthGuard], component: ServiceComponentHistoryComponent}, { path: 'dashboard/component-history/:hostname/:component', canActivate: [AuthGuard], component: ServiceComponentHistoryComponent}, { path: 'dashboard/fullTableComponent', canActivate: [AuthGuard], component: FulltableComponent}, { path: '**', redirectTo: 'login'} ]; Loading
src/app/dashboard/fulltable/fulltable.component.ts +3 −3 Original line number Diff line number Diff line Loading @@ -287,7 +287,7 @@ export class FulltableComponent implements OnInit , DoCheck, AfterViewInit{ (asite: Site) => { sessionStorage.setItem('preSitePage', 'Service'); sessionStorage.setItem('currentSelectedSite', JSON.stringify(asite) ); this.router.navigate(['/dashboard/site'], { relativeTo: this.route }); this.router.navigate(['/dashboard/site',serverData.siteName], { relativeTo: this.route }); } ).catch( Loading Loading @@ -344,7 +344,7 @@ export class FulltableComponent implements OnInit , DoCheck, AfterViewInit{ .then( (asite: Site) => { sessionStorage.setItem('currentSelectedSite', JSON.stringify(asite) ); this.router.navigate(['/dashboard/site'], { relativeTo: this.route }); this.router.navigate(['/dashboard/site',name], { relativeTo: this.route }); } ).catch( error => { Loading @@ -362,7 +362,7 @@ export class FulltableComponent implements OnInit , DoCheck, AfterViewInit{ if ( serviceComponent.servCompTagAtSite !== null && serviceComponent.servCompTagAtSite !== ''){ this.servCompService.setSelectedServComp(serviceComponent); sessionStorage.removeItem('currentServComp'); this.router.navigate(['/dashboard/servCompHisComponent'], { relativeTo: this.route }); this.router.navigate(['/dashboard/component-history',serviceComponent.hostName,serviceComponent.servCompName], { relativeTo: this.route }); } } Loading
src/app/dashboard/site/site.component.ts +8 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ import { AuthService } from 'src/app/auth.service'; import { MatIconRegistry } from "@angular/material/icon"; import { DomSanitizer } from "@angular/platform-browser"; import { MatDialog } from '@angular/material'; import { switchMap } from 'rxjs/operators'; import {ProfileDialogComponent} from '../profile-dialog/profile-dialog.component'; @Component({ Loading @@ -28,6 +29,7 @@ export class SiteComponent implements OnInit, OnDestroy { shortgiisUrl: string; previousView: string; username: string; public sitename: string; constructor(private siteService: SiteService, public router: Router, Loading Loading @@ -66,6 +68,8 @@ export class SiteComponent implements OnInit, OnDestroy { } ngOnInit() { //this.sitename = this.site.shortName; this.sitename = this.route.snapshot.paramMap.get("sitename") } cuturls(){ Loading Loading @@ -152,6 +156,9 @@ export class SiteComponent implements OnInit, OnDestroy { (asite: Site) => { sessionStorage.setItem('currentSelectedSite', JSON.stringify(asite) ); this.site = asite; this.sitename = this.site.shortName; this.router.navigate(['/dashboard/site',this.sitename], { relativeTo: this.route }); this.sitename = this.route.snapshot.paramMap.get("sitename"); if ( this.site.hostNames !== null && this.site.hostNames.length >0) { this.hasHosts = true; } else { Loading @@ -165,6 +172,7 @@ export class SiteComponent implements OnInit, OnDestroy { } ); this.setNameLists(); this.cuturls(); } Loading
src/app/dashboard/table/table.component.ts +3 −3 Original line number Diff line number Diff line Loading @@ -189,7 +189,7 @@ onClick(serverData: SiteShort) { (asite: Site) => { sessionStorage.setItem('preSitePage', 'Site'); sessionStorage.setItem('currentSelectedSite', JSON.stringify(asite) ); this.router.navigate(['/dashboard/site'], { relativeTo: this.route }); this.router.navigate(['/dashboard/site',serverData.siteName], { relativeTo: this.route }); } ).catch( Loading @@ -209,7 +209,7 @@ onSiteNameSelected(name: string) { .then( (asite: Site) => { sessionStorage.setItem('currentSelectedSite', JSON.stringify(asite) ); this.router.navigate(['/dashboard/site'], { relativeTo: this.route }); this.router.navigate(['/dashboard/site',name], { relativeTo: this.route }); } ).catch( error => { Loading Loading @@ -317,7 +317,7 @@ public onHostsSelected(site: SiteShort) { sessionStorage.removeItem('currentHostList'); sessionStorage.removeItem('currentServCompList'); sessionStorage.removeItem('noOfServices'); this.router.navigate(['/dashboard/hostNameComponent'], { relativeTo: this.route }); this.router.navigate(['/dashboard/hosts',site.siteName], { relativeTo: this.route }); } } Loading