Skip to content
This repository has been archived by the owner on Jul 23, 2019. It is now read-only.

Commit

Permalink
fix: store codebaseId in depencencyCheck (#448)
Browse files Browse the repository at this point in the history
  • Loading branch information
edewit authored Oct 23, 2018
1 parent 4266ba2 commit 2f076b1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ export class ProjectProgressNextstepComponent implements OnChanges, OnDestroy {
@Input() gettingStartedInfo: boolean;
@Input() statusLink: string;
errorMessage: string;
codeBaseCreated = false;
codebaseId: string;
private _progress: Progress[];
private socket: WebSocket;

Expand Down Expand Up @@ -62,8 +60,7 @@ export class ProjectProgressNextstepComponent implements OnChanges, OnDestroy {
console.log('data from ws', message);
const data = message.data || {};
if (data.codeBaseId !== undefined) {
this.codeBaseCreated = true;
this.codebaseId = data.codeBaseId;
this.projectile.sharedState.state.codebaseId = data.codeBaseId;
}
if (data && data.error) {
console.log(message.data.error);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ export class DependencyCheck {
projectVersion: string;
spacePath: string;
targetEnvironment?: string;
codebaseId?: string;
}
2 changes: 1 addition & 1 deletion src/app/create-app/create-app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
[routerLink]="['/', 'pipelines']">
View Pipeline</a>
<button class="btn btn-primary btn-lg margin-left-10 f8launcher-openIDE"
[disabled]="!codeBaseCreated" (click)="createWorkSpace()">
[disabled]="!codebaseId" (click)="createWorkSpace()">
Edit Application in Web IDE
</button>
</span>
Expand Down
9 changes: 6 additions & 3 deletions src/app/create-app/create-app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@ import {
Component,
OnInit
} from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Router } from '@angular/router';
import { DependencyCheck } from '../../../projects/ngx-launcher/src/lib/model/dependency-check.model';
import { Projectile } from '../../../projects/ngx-launcher/src/lib/model/projectile.model';

@Component({
selector: 'create-app',
templateUrl: './create-app.component.html'
})
export class CreateAppComponent implements OnInit {
depEditorFlag = true;
codeBaseCreated = true;
constructor(private router: Router, private route: ActivatedRoute) {
codebaseId: string;
constructor(private router: Router, projectile: Projectile<DependencyCheck>) {
this.codebaseId = projectile.sharedState.state.codebaseId;
}

ngOnInit(): void {
Expand Down

0 comments on commit 2f076b1

Please sign in to comment.