diff --git a/smp-angular/src/app/alert/alert.component.ts b/smp-angular/src/app/alert/alert.component.ts index 8819f705336f227964d989b0e4e21272ff9e1e7e..857369e2f54f44d47c79c7165da93a6a2e32d3d0 100644 --- a/smp-angular/src/app/alert/alert.component.ts +++ b/smp-angular/src/app/alert/alert.component.ts @@ -1,4 +1,4 @@ -import {Component} from "@angular/core"; +import {Component, OnInit} from "@angular/core"; import {AlertService} from "./alert.service"; @Component({ @@ -8,7 +8,7 @@ import {AlertService} from "./alert.service"; styleUrls: ['./alert.component.css'] }) -export class AlertComponent { +export class AlertComponent implements OnInit { message: any; public static readonly MAX_COUNT_CSV: number = 10000; diff --git a/smp-angular/src/app/alerts/alerts.component.ts b/smp-angular/src/app/alerts/alerts.component.ts index 9f256634b0e629367037c4e0e704a48ff3340507..bb6516a8977e6131337f8821bf8dca01ae771b9f 100644 --- a/smp-angular/src/app/alerts/alerts.component.ts +++ b/smp-angular/src/app/alerts/alerts.component.ts @@ -1,4 +1,4 @@ -import {Component, TemplateRef, ViewChild} from "@angular/core"; +import {Component, OnInit, TemplateRef, ViewChild} from "@angular/core"; import {ColumnPicker} from "../common/column-picker/column-picker.model"; import {RowLimiter} from "../common/row-limiter/row-limiter.model"; import {isNullOrUndefined} from "util"; @@ -18,7 +18,7 @@ import {SaveDialogComponent} from "../common/save-dialog/save-dialog.component"; templateUrl: './alerts.component.html' }) -export class AlertsComponent { +export class AlertsComponent implements OnInit { @ViewChild('rowProcessed') rowProcessed: TemplateRef<any>; diff --git a/smp-angular/src/app/common/cancel-dialog/cancel-dialog.component.ts b/smp-angular/src/app/common/cancel-dialog/cancel-dialog.component.ts index a3dbf4d5e8ca5626dced39add20535ee8dd57ddc..eab36212421849e9c84f3001e1eec94ae228369f 100644 --- a/smp-angular/src/app/common/cancel-dialog/cancel-dialog.component.ts +++ b/smp-angular/src/app/common/cancel-dialog/cancel-dialog.component.ts @@ -1,4 +1,4 @@ -import {Component, OnInit} from '@angular/core'; +import {Component} from '@angular/core'; import {MdDialogRef} from "@angular/material"; @Component({ @@ -6,12 +6,9 @@ import {MdDialogRef} from "@angular/material"; templateUrl: './cancel-dialog.component.html', styleUrls: ['./cancel-dialog.component.css'] }) -export class CancelDialogComponent implements OnInit { +export class CancelDialogComponent { constructor(public dialogRef: MdDialogRef<CancelDialogComponent>) { } - ngOnInit() { - } - } diff --git a/smp-angular/src/app/common/column-picker/column-picker.component.ts b/smp-angular/src/app/common/column-picker/column-picker.component.ts index b2cc6e1a4527752fe762aac2ddc7a3157fed15ec..3b5c37bc8ab920452799d0ac75bc7983e8931982 100644 --- a/smp-angular/src/app/common/column-picker/column-picker.component.ts +++ b/smp-angular/src/app/common/column-picker/column-picker.component.ts @@ -1,11 +1,11 @@ -import {Component, EventEmitter, Input, OnInit, Output} from "@angular/core"; +import {Component, EventEmitter, Input, Output} from "@angular/core"; import {isNullOrUndefined} from "util"; @Component({ selector: 'app-column-picker', templateUrl: './column-picker.component.html' }) -export class ColumnPickerComponent implements OnInit { +export class ColumnPickerComponent { columnSelection: boolean; @@ -21,9 +21,6 @@ export class ColumnPickerComponent implements OnInit { constructor() { } - ngOnInit() { - } - toggleColumnSelection() { this.columnSelection = !this.columnSelection } diff --git a/smp-angular/src/app/common/save-dialog/save-dialog.component.spec.ts b/smp-angular/src/app/common/save-dialog/save-dialog.component.spec.ts index 2edb761896cece908b019346880059bc3ea3ab62..0d3215f7cff0dfa1ffcdda40105d870926a636cc 100644 --- a/smp-angular/src/app/common/save-dialog/save-dialog.component.spec.ts +++ b/smp-angular/src/app/common/save-dialog/save-dialog.component.spec.ts @@ -2,7 +2,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { SaveDialogComponent } from './save-dialog.component'; -describe('ServicegroupExtensionDialogComponent', () => { +describe('SaveDialogComponent', () => { let component: SaveDialogComponent; let fixture: ComponentFixture<SaveDialogComponent>; diff --git a/smp-angular/src/app/common/save-dialog/save-dialog.component.ts b/smp-angular/src/app/common/save-dialog/save-dialog.component.ts index c9b2c888c1aa23da6fd15b869394db56560e9372..1c098b49146b8f450a1828d1b75dc7184653ed55 100644 --- a/smp-angular/src/app/common/save-dialog/save-dialog.component.ts +++ b/smp-angular/src/app/common/save-dialog/save-dialog.component.ts @@ -1,16 +1,14 @@ -import {Component, OnInit} from '@angular/core'; +import {Component} from '@angular/core'; import {MdDialogRef} from "@angular/material"; @Component({ selector: 'app-messagefilter-dialog', templateUrl: './save-dialog.component.html' }) -export class SaveDialogComponent implements OnInit { +export class SaveDialogComponent { constructor(public dialogRef: MdDialogRef<SaveDialogComponent>) { } - ngOnInit() { - } } diff --git a/smp-angular/src/app/common/search-table/search-table.component.ts b/smp-angular/src/app/common/search-table/search-table.component.ts index 6cba1fa5930a822e48e8ee6d3daefa521c9876db..294f8b26b9533d949c002e3717d6b3d2d8c7a7dd 100644 --- a/smp-angular/src/app/common/search-table/search-table.component.ts +++ b/smp-angular/src/app/common/search-table/search-table.component.ts @@ -1,4 +1,4 @@ -import {Component, EventEmitter, Input, TemplateRef, ViewChild} from "@angular/core"; +import {Component, EventEmitter, Input, OnInit, TemplateRef, ViewChild} from "@angular/core"; import {Http, URLSearchParams, Response} from "@angular/http"; import {SearchTableResult} from "./search-table-result.model"; import {Observable} from "rxjs"; @@ -15,15 +15,12 @@ import {SearchTableController} from "./search-table-controller"; styleUrls: ['./search-table.component.css'] }) -export class SearchTableComponent { +export class SearchTableComponent implements OnInit { @ViewChild('rowActions') rowActions: TemplateRef<any>; @Input() @ViewChild('additionalToolButtons') additionalToolButtons: TemplateRef<any>; @Input() @ViewChild('searchPanel') searchPanel: TemplateRef<any>; - - - @Input() id: String = ""; @Input() title: String = ""; @Input() columnPicker: ColumnPicker; @@ -31,16 +28,12 @@ export class SearchTableComponent { @Input() searchTableController: SearchTableController; @Input() filter: any = {}; - - columnActions:any; rowLimiter: RowLimiter = new RowLimiter(); selected = []; - - loading: boolean = false; rows = []; count: number = 0; @@ -52,14 +45,12 @@ export class SearchTableComponent { msgStatus: Array<String>; - messageResent = new EventEmitter(false); constructor(protected http: Http, protected alertService: AlertService, public dialog: MdDialog) { } ngOnInit() { - this.columnActions = { cellTemplate: this.rowActions, name: 'Actions', diff --git a/smp-angular/src/app/custom-date/date-format.service.ts b/smp-angular/src/app/custom-date/date-format.service.ts index e6791c5bd27b4188df7738c2c1295861130a7fce..9f61abcd56e370e9a47ae235a84999ff4faa5298 100644 --- a/smp-angular/src/app/custom-date/date-format.service.ts +++ b/smp-angular/src/app/custom-date/date-format.service.ts @@ -3,19 +3,19 @@ import {Injectable} from "@angular/core"; @Injectable() export class DateFormatService { - private static getFormattedDate(date: Date): string { + format(date: Date): string { + return this.getFormattedDate(date) + "_" + this.getFormattedTime(date); + } + + private getFormattedDate(date: Date): string { return ("0" + date.getDate()).slice(-2).toString()+"-"+ ("0" + (date.getMonth() + 1)).slice(-2).toString()+"-"+ date.getFullYear().toString(); } - private static getFormattedTime(date: Date): string { + private getFormattedTime(date: Date): string { return ("0" + date.getHours()).slice(-2).toString()+"h"+ ("0" + date.getMinutes()).slice(-2).toString()+"m"+ ("0" + date.getSeconds()).slice(-2).toString(); } - - static format(date: Date): string { - return this.getFormattedDate(date) + "_" + this.getFormattedTime(date); - } } diff --git a/smp-angular/src/app/domain/domain-details-dialog/domain-details-dialog.component.ts b/smp-angular/src/app/domain/domain-details-dialog/domain-details-dialog.component.ts index 44ad2ac8ed0b651a799d9343cf91db21f80b7182..7058eab9ceaaa4b00cfa92d902293dcfa82c129a 100644 --- a/smp-angular/src/app/domain/domain-details-dialog/domain-details-dialog.component.ts +++ b/smp-angular/src/app/domain/domain-details-dialog/domain-details-dialog.component.ts @@ -1,19 +1,15 @@ -import {Component, OnInit} from '@angular/core'; +import {Component} from '@angular/core'; import {MdDialogRef} from "@angular/material"; @Component({ selector: 'domain-details-dialog', templateUrl: './domain-details-dialog.component.html' }) -export class DomainDetailsDialogComponent implements OnInit { +export class DomainDetailsDialogComponent { domain; dateFormat: String = 'yyyy-MM-dd HH:mm:ssZ'; constructor(public dialogRef: MdDialogRef<DomainDetailsDialogComponent>) { } - - ngOnInit() { - } - } diff --git a/smp-angular/src/app/domain/domain.component.ts b/smp-angular/src/app/domain/domain.component.ts index 008116839b79df7bdaf28b1d7bc9ed8ef6dc9f22..9127f08badf99ea6a932921218ad029d1ebfe242 100644 --- a/smp-angular/src/app/domain/domain.component.ts +++ b/smp-angular/src/app/domain/domain.component.ts @@ -1,4 +1,4 @@ -import {Component, TemplateRef, ViewChild} from "@angular/core"; +import {Component, OnInit, TemplateRef, ViewChild} from "@angular/core"; import {ColumnPicker} from "../common/column-picker/column-picker.model"; import {MdDialog, MdDialogRef} from "@angular/material"; @@ -11,7 +11,7 @@ import {DomainController} from "./domain-controller"; templateUrl:'./domain.component.html', styleUrls: ['./domain.component.css'] }) -export class DomainComponent { +export class DomainComponent implements OnInit { @ViewChild('rowMetadataAction') rowMetadataAction: TemplateRef<any>; @ViewChild('rowExtensionAction') rowExtensionAction: TemplateRef<any>; diff --git a/smp-angular/src/app/security/default-password-dialog/default-password-dialog.component.ts b/smp-angular/src/app/security/default-password-dialog/default-password-dialog.component.ts index a2519a804363c7943235c9e3c5e7f9e29ea01aa3..24e50370b5ffc240be0b41064ad76c8d14957583 100644 --- a/smp-angular/src/app/security/default-password-dialog/default-password-dialog.component.ts +++ b/smp-angular/src/app/security/default-password-dialog/default-password-dialog.component.ts @@ -1,4 +1,4 @@ -import {Component, OnInit} from "@angular/core"; +import {Component} from "@angular/core"; import {MdDialogRef} from "@angular/material"; @Component({ @@ -6,11 +6,8 @@ import {MdDialogRef} from "@angular/material"; templateUrl: './default-password-dialog.component.html', styleUrls: ['./default-password-dialog.component.css'] }) -export class DefaultPasswordDialogComponent implements OnInit { +export class DefaultPasswordDialogComponent { constructor(public dialogRef: MdDialogRef<DefaultPasswordDialogComponent>) { } - ngOnInit() { - } - } diff --git a/smp-angular/src/app/security/is-authorized.directive.ts b/smp-angular/src/app/security/is-authorized.directive.ts index b53cccf91cebb83325274eb4c388e322fb560d17..1fbe813d9480415f87a3c97f3be19909297f7d59 100644 --- a/smp-angular/src/app/security/is-authorized.directive.ts +++ b/smp-angular/src/app/security/is-authorized.directive.ts @@ -1,10 +1,10 @@ -import {Directive,ElementRef,Input} from '@angular/core'; +import {Directive, ElementRef, Input, OnInit} from '@angular/core'; import {SecurityService} from './security.service'; @Directive({ selector:'[isAuthorized]' }) -export class IsAuthorized { +export class IsAuthorized implements OnInit { @Input('isAuthorized') role:string; constructor(private _elementRef:ElementRef, private securityService:SecurityService) { } diff --git a/smp-angular/src/app/service-group/service-group.component.ts b/smp-angular/src/app/service-group/service-group.component.ts index 6e13170d39afae82b35d0ba59986d5dadb54ad30..051c7ca7f73a5a3a1028dce2d272ead3ac99607a 100644 --- a/smp-angular/src/app/service-group/service-group.component.ts +++ b/smp-angular/src/app/service-group/service-group.component.ts @@ -1,4 +1,4 @@ -import {Component, TemplateRef, ViewChild} from "@angular/core"; +import {Component, OnInit, TemplateRef, ViewChild} from "@angular/core"; import {ColumnPicker} from "../common/column-picker/column-picker.model"; import {MdDialog, MdDialogRef} from "@angular/material"; import {ServiceGroupDetailsDialogComponent} from "./service-group-details-dialog/service-group-details-dialog.component"; @@ -11,7 +11,7 @@ import {ServiceGroupController} from "./service-group-controller"; templateUrl:'./service-group.component.html', styleUrls: ['./service-group.component.css'] }) -export class ServiceGroupComponent { +export class ServiceGroupComponent implements OnInit { @ViewChild('rowMetadataAction') rowMetadataAction: TemplateRef<any> @ViewChild('rowExtensionAction') rowExtensionAction: TemplateRef<any> diff --git a/smp-angular/src/app/user/user-details-dialog/user-details-dialog.component.spec.ts b/smp-angular/src/app/user/user-details-dialog/user-details-dialog.component.spec.ts index 634a222ca7f975a5ca057666481ab8dc89679234..00187815861780b58826057aabf33a59363d2538 100644 --- a/smp-angular/src/app/user/user-details-dialog/user-details-dialog.component.spec.ts +++ b/smp-angular/src/app/user/user-details-dialog/user-details-dialog.component.spec.ts @@ -1,20 +1,20 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { ServicegroupDetailsDialogComponent } from './servicegroup-details-dialog.component'; +import {UserDetailsDialogComponent} from './user-details-dialog.component'; -describe('ServiceGroupDetailsDialogComponent', () => { - let component: ServicegroupDetailsDialogComponent; - let fixture: ComponentFixture<ServicegroupDetailsDialogComponent>; +describe('UserDetailsDialogComponent', () => { + let component: UserDetailsDialogComponent; + let fixture: ComponentFixture<UserDetailsDialogComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ ServicegroupDetailsDialogComponent ] + declarations: [ UserDetailsDialogComponent ] }) .compileComponents(); })); beforeEach(() => { - fixture = TestBed.createComponent(ServicegroupDetailsDialogComponent); + fixture = TestBed.createComponent(UserDetailsDialogComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/smp-angular/src/app/user/user.component.ts b/smp-angular/src/app/user/user.component.ts index 7df94f310f7d5239e9f069f9bc9a3be35b6bfac3..bcac77b2ba171b483a21743a333a4e46fe231a8d 100644 --- a/smp-angular/src/app/user/user.component.ts +++ b/smp-angular/src/app/user/user.component.ts @@ -1,4 +1,4 @@ -import {Component, TemplateRef, ViewChild} from "@angular/core"; +import {Component, OnInit, TemplateRef, ViewChild} from "@angular/core"; import {ColumnPicker} from "../common/column-picker/column-picker.model"; import {MdDialog, MdDialogRef} from "@angular/material"; @@ -11,7 +11,7 @@ import {UserController} from "./user-controller"; templateUrl:'./user.component.html', styleUrls: ['./user.component.css'] }) -export class UserComponent { +export class UserComponent implements OnInit { @ViewChild('rowMetadataAction') rowMetadataAction: TemplateRef<any> @ViewChild('rowExtensionAction') rowExtensionAction: TemplateRef<any>