forked from mosip/resident-ui
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request mosip#785 from MadhuMosip/release-0.9.x
MOSIP-37782 deleted copy_cm.sh and copy_secrets.sh from deploy and added error component
- Loading branch information
Showing
7 changed files
with
73 additions
and
46 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { Routes, RouterModule } from '@angular/router'; | ||
import {ErrorComponent} from './error/error.component' | ||
|
||
const routes: Routes = [ | ||
{path:'', component:ErrorComponent} | ||
]; | ||
|
||
@NgModule({ | ||
imports: [RouterModule.forChild(routes)], | ||
exports: [RouterModule] | ||
}) | ||
export class ErrorRoutingModule { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
|
||
import { ErrorRoutingModule } from './error-routing.module'; | ||
import { ErrorComponent } from './error/error.component'; | ||
|
||
@NgModule({ | ||
declarations: [ErrorComponent], | ||
imports: [ | ||
CommonModule, | ||
ErrorRoutingModule | ||
] | ||
}) | ||
export class ErrorModule { } |
12 changes: 12 additions & 0 deletions
12
resident-ui/src/app/feature/error/error/error.component.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.main-container{ | ||
height: 85%; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
text-align: center; | ||
} | ||
.text{ | ||
background-color: rgb(254 226 226); | ||
color: rgb(185 28 28); | ||
padding: 1rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div class="main-container" *ngIf="longJson"> | ||
<p class="text">{{longJson.sessionExpired}}, {{longJson.clickHere2}} <span class="navigate-link" (click)="login()">{{longJson.clickHere}}</span> {{longJson.login}}</p> | ||
</div> |
31 changes: 31 additions & 0 deletions
31
resident-ui/src/app/feature/error/error/error.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { LoginRedirectService } from 'src/app/core/services/loginredirect.service'; | ||
import { TranslateService } from '@ngx-translate/core'; | ||
|
||
@Component({ | ||
selector: 'app-error', | ||
templateUrl: './error.component.html', | ||
styleUrls: ['./error.component.css'] | ||
}) | ||
export class ErrorComponent implements OnInit { | ||
redirectUrl:string; | ||
longJson:any; | ||
constructor( | ||
private redirectService: LoginRedirectService, | ||
private translateService: TranslateService | ||
) { } | ||
|
||
ngOnInit() { | ||
this.translateService | ||
.getTranslation(localStorage.getItem("langCode")) | ||
.subscribe(response => { | ||
this.longJson = response.genericmessage; | ||
console.log(this.longJson) | ||
}); | ||
let urlData = window.location.href.split('#', ) | ||
this.redirectUrl = urlData[0] + "/#/" + "uinservices/dashboard" | ||
} | ||
login(){ | ||
this.redirectService.redirect(this.redirectUrl); | ||
} | ||
} |