Commit 581a0dec authored by Lukas Burgey's avatar Lukas Burgey
Browse files

Merge branch 'upgrade' into dev

parents afbc921a 8f3b6f0b
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# You can see what browsers were selected by your queries by running:
# npx browserslist
> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.
\ No newline at end of file
This diff is collapsed.
......@@ -12,7 +12,7 @@ import { ProfileDialogService } from '../dialogues/profile-dialog.service';
export class AccountComponent implements OnInit {
// account deletion form
sure: boolean = false;
sure = false;
constructor(
......
......@@ -3,7 +3,6 @@ import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { FormsModule } from '@angular/forms';
import { JsonPipe } from '@angular/common';
import { HttpModule } from '@angular/http';
import { HttpClientModule, HttpClientXsrfModule } from '@angular/common/http';
// Other libs
......@@ -39,7 +38,6 @@ import { AccountComponent } from './account/account.component';
BrowserModule,
BrowserAnimationsModule,
FormsModule,
HttpModule,
HttpClientModule,
HttpClientXsrfModule.withOptions({
cookieName: 'csrftoken',
......
......@@ -3,7 +3,7 @@ import { Component, OnInit, Input } from '@angular/core';
import { Observable } from 'rxjs';
import { UserService } from '../user.service';
import { Deployment, VO, Service } from '../types/types.module'
import { Deployment, VO, Service } from '../types/types.module';
@Component({
selector: '[deployment-action-row]',
......@@ -24,13 +24,13 @@ export class DeploymentActionRowComponent implements OnInit {
}
public changeDeployment(stateTarget: string): void {
if (this.vo != undefined) {
if (this.vo !== undefined) {
this.userService.patchDeployment('vo', stateTarget, this.vo.id);
return
return;
}
if (this.service != undefined) {
if (this.service !== undefined) {
this.userService.patchDeployment('service', stateTarget, this.service.id);
return
return;
}
}
}
......@@ -13,7 +13,7 @@ import { User } from '../../types/types.module';
export class AccountComponent {
// account deletion form
public sure: boolean = false;
public sure = false;
constructor(
public userService: UserService,
......
import { Component, OnInit, Inject } from '@angular/core';
import { MAT_DIALOG_DATA, MatTableDataSource } from '@angular/material';
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatTableDataSource } from '@angular/material/table';
import { Observable } from 'rxjs';
......@@ -14,8 +15,8 @@ import { DeploymentState, Service, CredentialState } from '../../types/types.mod
})
export class CredentialsComponent implements OnInit {
public columns = ["name", "value"];
public credentialCount: number = 0;
public columns = ['name', 'value'];
public credentialCount = 0;
public table: MatTableDataSource<any>;
constructor(
......
......@@ -26,7 +26,7 @@ export class DialogService {
return {
panelClass: 'scrolling-dialog',
data: data,
}
};
}
public openAccount() {
......
......@@ -15,7 +15,7 @@ import { AccountComponent } from './account/account.component';
import { CredentialsComponent } from './credentials/credentials.component';
import { MessageComponent } from './message/message.component';
//providers
// providers
import { DialogService } from './dialog.service';
import { ProfileDialogService } from './profile-dialog.service';
......
import { Component, OnInit, Inject } from '@angular/core';
import { MAT_DIALOG_DATA } from '@angular/material';
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import { UserService } from '../../user.service';
import * as t from '../../types/types.module';
......
import { Component, OnInit, Inject } from '@angular/core';
import { MAT_DIALOG_DATA, MatTableDataSource } from '@angular/material';
import {} from '@angular/material';
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatTableDataSource } from '@angular/material/table';
import { User } from '../../types/types.module';
......
import { Component, OnInit, Inject } from '@angular/core';
import { MAT_DIALOG_DATA } from '@angular/material';
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import { Observable, BehaviorSubject } from 'rxjs';
......@@ -13,7 +13,7 @@ import { JSONObject, DeploymentState } from '../../types/types.module';
})
export class QuestionnaireComponent implements OnInit {
public answers$ = <BehaviorSubject<JSONObject>> new BehaviorSubject(undefined);;
public answers$ = <BehaviorSubject<JSONObject>> new BehaviorSubject(undefined);
constructor(
public userService: UserService,
......@@ -22,15 +22,15 @@ export class QuestionnaireComponent implements OnInit {
state$.subscribe(
(state: DeploymentState) => {
let answers = undefined;
let answers;
// initialize the answers if needed
if (state.answers == undefined) {
if (state.answers === undefined) {
answers = state.questionnaire;
Object.keys(state.questionnaire).forEach(
(key: string) => {
answers[key] = "";
answers[key] = '';
}
);
......
......@@ -32,6 +32,6 @@ export class HeaderComponent implements OnInit {
}
idpCompare(a: IdP, b: IdP): boolean {
return a != undefined && b != undefined && a.id == b.id;
return a !== undefined && b !== undefined && a.id === b.id;
}
}
......@@ -10,22 +10,22 @@ export class LanguageService {
public printState(state: string) {
switch (state) {
case "not_deployed":
return "Not deployed";
case "deployed":
return "Deployed";
case "deployment_pending":
return "Deployment pending";
case "removal_pending":
return "Removal pending";
case "failed":
return "Failed";
case "rejected":
return "Rejected";
case "questionnaire":
return "Questionnaire";
case 'not_deployed':
return 'Not deployed';
case 'deployed':
return 'Deployed';
case 'deployment_pending':
return 'Deployment pending';
case 'removal_pending':
return 'Removal pending';
case 'failed':
return 'Failed';
case 'rejected':
return 'Rejected';
case 'questionnaire':
return 'Questionnaire';
default:
return "Not deployed";
return 'Not deployed';
}
}
}
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { MatButtonModule } from '@angular/material';
import { MatToolbarModule } from '@angular/material';
import { MatButtonModule } from '@angular/material/button';
import { MatToolbarModule } from '@angular/material/toolbar';
import { MatTableModule } from '@angular/material/table';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { MatExpansionModule } from '@angular/material/expansion';
......
......@@ -3,12 +3,12 @@ import { BehaviorSubject, Observable } from 'rxjs';
import { IdP } from '../types/types.module';
export const prefsKey = "feudalPrefs";
export const prefsKey = 'feudalPrefs';
export interface Prefs {
showEmptyVOs?: boolean;
preferredIdP?: IdP;
};
}
@Injectable({
providedIn: 'root'
......@@ -24,7 +24,7 @@ export class PreferencesService {
public save(prefs: Prefs): void {
localStorage.setItem(prefsKey, JSON.stringify(prefs));
console.log("Saved preferences:", prefs);
console.log('Saved preferences:', prefs);
}
public load(): void {
......@@ -32,9 +32,9 @@ export class PreferencesService {
if (loaded != null) {
this.prefs = loaded;
this.prefs$.next(loaded);
console.log("Loaded preferences:", this.prefs);
console.log('Loaded preferences:', this.prefs);
} else {
console.log("No preferences to load");
console.log('No preferences to load');
}
}
......
......@@ -28,7 +28,7 @@ export class ServiceComponent implements OnInit {
ngOnInit() {
this.deploymentState$ = this.userService.subscribeStateFor(this.service);
this.deployment$ = this.userService.subscribeDeployment(
(dep: Deployment) => dep.service ? dep.service.id == this.service.id : false
(dep: Deployment) => dep.service ? dep.service.id === this.service.id : false
);
}
}
......@@ -4,7 +4,7 @@ import { Pipe, PipeTransform } from '@angular/core';
@Pipe({ name: 'ObjKeys', pure: false })
export class ObjKeysPipe implements PipeTransform {
transform(value: any, args: any[] = null): any {
const transformation = Object.keys(value);//.map(key => value[key]);
const transformation = Object.keys(value); // .map(key => value[key]);
return transformation;
}
}
import { Injectable } from '@angular/core';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
@Injectable()
export class SnackBarService {
config = new MatSnackBarConfig()
config = new MatSnackBarConfig();
constructor(
public snackBar: MatSnackBar,
......
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