Commit f4622c00 authored by Lukas Burgey's avatar Lukas Burgey

Remove obsolete component

parent a309c283
......@@ -27,7 +27,6 @@ import { SshkeysModule } from './sshkeys/sshkeys.module';
// declarations
import { AppComponent } from './app.component';
import { BodyComponent } from './body/body.component';
import { ServiceComponent } from './service/service.component';
import { HeaderComponent } from './header/header.component';
import { FooterComponent } from './footer/footer.component';
import { VoDataComponent } from './vo-data/vo-data.component';
......@@ -54,7 +53,6 @@ import { VoDataComponent } from './vo-data/vo-data.component';
providers: [
<mat-expansion-panel *ngIf="service">
<mat-panel-title>{{ }}</mat-panel-title>
<mat-panel-description>{{ service.description }}</mat-panel-description>
<table style="margin-bottom: 30px; margin: auto;">
<td style="min-width: 150px;">Site</td>
<td style="min-width: 150px;"></td>
<tr *ngFor="let site of" style="height: 42px;">
<span matTooltip="Provided at site {{ }}" style="margin-right: 10px;">
<mat-icon style="vertical-align: middle; padding-right: 5px;">storage</mat-icon>
{{ }}
<span [ngSwitch]="stateItem(site)?.state" class="childs-inline">
<mat-icon *ngSwitchCase="'deployed'" matTooltip="The credentials are deployed for the service {{ }}. Click to see details.">call_made</mat-icon>
<mat-icon *ngSwitchCase="'questionnaire'" matTooltip="The site {{ }} needs more data to deploy your credentials. Please click to submit the data.">warning</mat-icon>
<mat-progress-spinner *ngSwitchCase="'deployment_pending'" diameter="24" mode="indeterminate" matTooltip="Waiting for the deployment of the credentials to the site {{ }}"></mat-progress-spinner>
<mat-progress-spinner *ngSwitchCase="'removal_pending'" diameter="24" mode="indeterminate" matTooltip="Waiting for the removal of the credentials from the site {{ }}"></mat-progress-spinner>
<mat-icon *ngSwitchCase="'not_deployed'" mat-icon-button matTooltip="The credentials are not deployed for the service {{ }}.">call_received</mat-icon>
<mat-icon *ngSwitchCase="'failed'" mat-icon-button matTooltip="Site {{ }} failed to deploy the credentials. The deployment will be retried. Click for details.">error</mat-icon>
<mat-icon *ngSwitchCase="'rejected'" mat-icon-button matTooltip="Site {{ }} rejected the deployment of the credentials. Click for details.">error</mat-icon>
<mat-icon *ngSwitchDefault mat-icon-button matTooltip="Access to this service was never requested.">call_received</mat-icon>
<span [ngSwitch]="stateItem(site)?.state">
<button *ngSwitchCase="'questionnaire'" (click)="dialog.openQuestionnaire(stateItem(site))" mat-raised-button class="mat-elevation-z6"> Questionnaire </button>
<button *ngSwitchCase="'deployed'" (click)="dialog.openCredentials(stateItem(site))" mat-raised-button class="mat-elevation-z6"> Credentials </button>
<button *ngSwitchCase="'failed'" (click)="dialog.openMessage(stateItem(site))" mat-raised-button class="mat-elevation-z6"> Failure </button>
<button *ngSwitchCase="'rejected'" (click)="dialog.openMessage(stateItem(site))" mat-raised-button class="mat-elevation-z6"> Rejected </button>
<div [ngSwitch]="deployment?.state_target">
<span *ngSwitchCase="'not_deployed'" style="margin-right: 15px;">
You did not request access to this service.
<span *ngSwitchCase="'deployed'" style="margin-right: 15px;">
You requested access to this service.
<span *ngSwitchDefault style="margin-right: 15px;">
You never requested access to this service.
<div [ngSwitch]="deployment?.state_target">
<button *ngSwitchCase="'not_deployed'" (click)="changeDeployment('add')" mat-raised-button color="primary" matTooltip="Deploy credentials to the service">
Deploy credentials
<button *ngSwitchCase="'deployed'" (click)="changeDeployment('remove')" mat-raised-button color="primary" matTooltip="Remove credentials from the service">
Remove credentials
<button *ngSwitchDefault (click)="changeDeployment('add')" mat-raised-button color="primary" matTooltip="Deploy credentials to the service for the first time">
Deploy credentials
import { Component, OnInit, Input } from '@angular/core';
import { MatCheckboxChange } from '@angular/material/checkbox';
import { HttpClient, HttpErrorResponse } from '@angular/common/http';
import { UserService } from '../user.service';
import { DialogService } from '../dialogues/dialog.service';
import * as t from '../types/types.module';
selector: 'app-service',
templateUrl: './service.component.html',
styleUrls: ['./service.component.css']
export class ServiceComponent implements OnInit {
@Input() service: t.Service;
@Input() deployment: t.Deployment;
public userService: UserService,
public dialog: DialogService,
public http: HttpClient,
) {
ngOnInit() {
public stateItem(site: t.Site): t.DeploymentState | undefined {
if (this.deployment) {
return this.deployment.states.find(
item => {
return ===
return undefined;
public changeDeployment(action: string) {
const body = {
'type': action,
return'/backend/api/deployments', body).subscribe(
(newDep: t.Deployment) => {
// update the deployment
this.deployment = newDep;
Markdown is supported
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