Commit 8e65c8f3 authored by lukas.burgey's avatar lukas.burgey
Browse files

Add failed permanently state

parent 8c28aca2
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
<mat-progress-spinner *ngSwitchCase="'removal_pending'" diameter="24" mode="indeterminate"></mat-progress-spinner> <mat-progress-spinner *ngSwitchCase="'removal_pending'" diameter="24" mode="indeterminate"></mat-progress-spinner>
<mat-icon *ngSwitchCase="'not_deployed'" mat-icon-button>call_received</mat-icon> <mat-icon *ngSwitchCase="'not_deployed'" mat-icon-button>call_received</mat-icon>
<mat-icon *ngSwitchCase="'failed'" mat-icon-button>error</mat-icon> <mat-icon *ngSwitchCase="'failed'" mat-icon-button>error</mat-icon>
<mat-icon *ngSwitchCase="'failed_permanently'" mat-icon-button>error</mat-icon>
<mat-icon *ngSwitchCase="'rejected'" mat-icon-button>error</mat-icon> <mat-icon *ngSwitchCase="'rejected'" mat-icon-button>error</mat-icon>
<mat-icon *ngSwitchDefault mat-icon-button>call_received</mat-icon> <mat-icon *ngSwitchDefault mat-icon-button>call_received</mat-icon>
</span> </span>
......
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
<p *ngSwitchCase="'failed'"> <p *ngSwitchCase="'failed'">
The deployment of your credentials failed: The deployment of your credentials failed:
</p> </p>
<p *ngSwitchCase="'failed_permanently'">
The deployment of your credentials failed too many times:
</p>
<p *ngSwitchCase="'rejected'"> <p *ngSwitchCase="'rejected'">
The deployment of your credentials was rejected: The deployment of your credentials was rejected:
</p> </p>
......
...@@ -20,6 +20,8 @@ export class LanguageService { ...@@ -20,6 +20,8 @@ export class LanguageService {
return 'Removal pending'; return 'Removal pending';
case 'failed': case 'failed':
return 'Failed'; return 'Failed';
case 'failed_permanently':
return 'Failed Permanently';
case 'rejected': case 'rejected':
return 'Rejected'; return 'Rejected';
case 'questionnaire': case 'questionnaire':
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
<mat-progress-spinner *ngSwitchCase="'removal_pending'" diameter="15" mode="indeterminate"></mat-progress-spinner> <mat-progress-spinner *ngSwitchCase="'removal_pending'" diameter="15" mode="indeterminate"></mat-progress-spinner>
<mat-icon *ngSwitchCase="'not_deployed'">call_received</mat-icon> <mat-icon *ngSwitchCase="'not_deployed'">call_received</mat-icon>
<mat-icon *ngSwitchCase="'failed'">error</mat-icon> <mat-icon *ngSwitchCase="'failed'">error</mat-icon>
<mat-icon *ngSwitchCase="'failed_permanently'">error</mat-icon>
<mat-icon *ngSwitchCase="'rejected'">error</mat-icon> <mat-icon *ngSwitchCase="'rejected'">error</mat-icon>
<mat-icon *ngSwitchDefault>call_received</mat-icon> <mat-icon *ngSwitchDefault>call_received</mat-icon>
</span> </span>
......
...@@ -5,7 +5,7 @@ import { Observable } from 'rxjs'; ...@@ -5,7 +5,7 @@ import { Observable } from 'rxjs';
import { UserService } from '../user.service'; import { UserService } from '../user.service';
import { LanguageService } from '../language.service'; import { LanguageService } from '../language.service';
import { DialogService } from '../dialogues/dialog.service'; import { DialogService } from '../dialogues/dialog.service';
import { Site, Service, DeploymentState, StateID } from '../types/types.module'; import { Service, DeploymentState, StateID } from '../types/types.module';
interface Button { interface Button {
text: string; text: string;
...@@ -41,6 +41,11 @@ export class StateComponent implements OnInit { ...@@ -41,6 +41,11 @@ export class StateComponent implements OnInit {
text: 'Show Error', text: 'Show Error',
tooltip: 'Show more details on the error', tooltip: 'Show more details on the error',
}, },
'failed_permanently': {
color: 'warn',
text: 'Show Error',
tooltip: 'Show more details on the error',
},
'rejected': { 'rejected': {
color: 'warn', color: 'warn',
text: 'Show Message', text: 'Show Message',
...@@ -78,9 +83,14 @@ export class StateComponent implements OnInit { ...@@ -78,9 +83,14 @@ export class StateComponent implements OnInit {
Please click "${ this.buttons['questionnaire'].text }" to submit the missing data. Please click "${ this.buttons['questionnaire'].text }" to submit the missing data.
`, `,
'failed': ` 'failed': `
The deployment of your credentials failed, but will be tried again. The deployment of your credentials failed, but will be tried again soon.
Please click "${ this.buttons['failed'].text }" for more details concerning this error. Please click "${ this.buttons['failed'].text }" for more details concerning this error.
`, `,
'failed_permanently': `
The deployment of your credentials failed too many times.
It will be retried if something changes at the site.
Please click "${ this.buttons['failed_permanently'].text }" for more details concerning this error.
`,
'rejected': ` 'rejected': `
The deployment of your credentials was rejected. The deployment of your credentials was rejected.
Please click "${ this.buttons['rejected'].text }" to show more details. Please click "${ this.buttons['rejected'].text }" to show more details.
...@@ -106,6 +116,8 @@ export class StateComponent implements OnInit { ...@@ -106,6 +116,8 @@ export class StateComponent implements OnInit {
return this.dialog.openQuestionnaire(this.state$); return this.dialog.openQuestionnaire(this.state$);
case 'failed': case 'failed':
return this.dialog.openMessage(state); return this.dialog.openMessage(state);
case 'failed_permanently':
return this.dialog.openMessage(state);
case 'rejected': case 'rejected':
return this.dialog.openMessage(state); return this.dialog.openMessage(state);
} }
......
...@@ -10,6 +10,7 @@ const states = [ ...@@ -10,6 +10,7 @@ const states = [
'not_deployed', 'not_deployed',
'questionnaire', 'questionnaire',
'failed', 'failed',
'failed_permanently',
'rejected', 'rejected',
] as const; ] as const;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment