diff --git a/AMW_angular/io/.gitignore b/AMW_angular/io/.gitignore index 86d943a9b..c0e480932 100644 --- a/AMW_angular/io/.gitignore +++ b/AMW_angular/io/.gitignore @@ -4,6 +4,7 @@ /dist /tmp /out-tsc +debug.log # Only exists if Bazel was run /bazel-out diff --git a/AMW_angular/io/src/app/auditview/auditview-table/auditview-table.service.ts b/AMW_angular/io/src/app/auditview/auditview-table/auditview-table.service.ts index d6c3201b2..67a723eb9 100644 --- a/AMW_angular/io/src/app/auditview/auditview-table/auditview-table.service.ts +++ b/AMW_angular/io/src/app/auditview/auditview-table/auditview-table.service.ts @@ -75,7 +75,6 @@ export class AuditviewTableService { tap(() => this._loading$.next(true)), debounceTime(200), map(([searchTerm, sortColumn, sortDirection, auditlogEntries]) => { - console.log('mapping it'); return this._search( searchTerm, sortColumn, diff --git a/AMW_angular/io/src/app/deployment/deployment.component.spec.ts b/AMW_angular/io/src/app/deployment/deployment.component.spec.ts index f765c4285..fc8a7f616 100644 --- a/AMW_angular/io/src/app/deployment/deployment.component.spec.ts +++ b/AMW_angular/io/src/app/deployment/deployment.component.spec.ts @@ -21,6 +21,7 @@ import * as moment from 'moment'; import { SharedModule } from '../shared/shared.module'; import { NavigationStoreService } from '../navigation/navigation-store.service'; import { DATE_FORMAT } from '../core/amw-constants'; +import { DateTimeModel } from '../shared/date-time-picker/date-time.model'; @Component({ template: '', }) @@ -327,7 +328,7 @@ describe('DeploymentComponent (create deployment)', () => { id: 5, tagDate: 1485378084103, } as ResourceTag; - component.deploymentDate = '2017-01-02 12:00'; + component.deploymentDate = DateTimeModel.fromLocalString('2017-01-02 12:00', DATE_FORMAT); component.transDeploymentParameters = [ { key: 'atest', value: 'foo' } as DeploymentParameter, { key: 'btest', value: 'bar' } as DeploymentParameter, diff --git a/AMW_angular/io/src/app/deployment/deployment.component.ts b/AMW_angular/io/src/app/deployment/deployment.component.ts index 819dd9874..834f6d5e1 100644 --- a/AMW_angular/io/src/app/deployment/deployment.component.ts +++ b/AMW_angular/io/src/app/deployment/deployment.component.ts @@ -19,6 +19,7 @@ import * as moment from 'moment'; import * as $ from 'jquery'; // this needs to be here... import { NavigationStoreService } from '../navigation/navigation-store.service'; import { DATE_FORMAT } from '../core/amw-constants'; +import { DateTimeModel } from '../shared/date-time-picker/date-time.model'; @Component({ selector: 'amw-deployment', @@ -46,7 +47,7 @@ export class DeploymentComponent implements OnInit, AfterViewInit { runtime: Relation = null; resourceTags: ResourceTag[] = [this.defaultResourceTag]; selectedResourceTag: ResourceTag = this.defaultResourceTag; - deploymentDate: string = ''; + deploymentDate: DateTimeModel = null; appsWithVersion: AppWithVersion[] = []; transDeploymentParameter: DeploymentParameter = {} as DeploymentParameter; transDeploymentParameters: DeploymentParameter[] = []; @@ -134,7 +135,6 @@ export class DeploymentComponent implements OnInit, AfterViewInit { if (!this.selectedRelease) { this.selectedRelease = this.releases[0]; } - console.log('selected release is ' + this.selectedRelease.release); this.getRelatedForRelease(); this.goTo(this.selectedAppserver.name + '/' + this.selectedRelease.release); } @@ -171,13 +171,11 @@ export class DeploymentComponent implements OnInit, AfterViewInit { requestDeployment() { this.requestOnly = true; - console.log('requestDeployment()'); this.prepareDeployment(); } createDeployment() { this.requestOnly = false; - console.log('createDeployment()'); this.prepareDeployment(); } @@ -418,10 +416,7 @@ export class DeploymentComponent implements OnInit, AfterViewInit { : new Date().getTime(); } if (this.deploymentDate) { - const dateTime = moment(this.deploymentDate, DATE_FORMAT); - if (dateTime && dateTime.isValid()) { - deploymentRequest.deploymentDate = dateTime.valueOf(); - } + deploymentRequest.deploymentDate = this.deploymentDate.toEpoch(); } if (this.transDeploymentParameters.length > 0) { deploymentRequest.deploymentParameters = this.transDeploymentParameters; @@ -487,7 +482,6 @@ export class DeploymentComponent implements OnInit, AfterViewInit { // for url params only private setPreselected() { if (this.appserverName) { - console.log('pre-selected server is ' + this.appserverName); this.selectedAppserver = _.find(this.appservers, { name: this.appserverName, }); @@ -521,7 +515,6 @@ export class DeploymentComponent implements OnInit, AfterViewInit { // for url params only private setRelease() { if (this.releaseName) { - console.log('pre-selected release is ' + this.releaseName); this.selectedRelease = this.releases.find( (release) => release.release === this.releaseName ); diff --git a/AMW_angular/io/src/app/deployments/deployments-list.component.html b/AMW_angular/io/src/app/deployments/deployments-list.component.html index 8359251d5..063d4f3d2 100644 --- a/AMW_angular/io/src/app/deployments/deployments-list.component.html +++ b/AMW_angular/io/src/app/deployments/deployments-list.component.html @@ -309,21 +309,6 @@