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

Commit

Permalink
fix: better state analytics broadcast (#563)
Browse files Browse the repository at this point in the history
  • Loading branch information
edewit authored Jan 18, 2019
1 parent 09913d3 commit 1ceb633
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,7 @@ export class ProjectSummaryStepComponent extends LauncherStep implements OnDestr
* Set up this application
*/
@broadcast('completeSummaryStep_Create', {
'launcherComponent.summary': {
location: 'gitHubDetails.organization',
mission: 'mission.name',
pipeline: 'pipeline.name',
projectName: 'dependencyCheck.projectName',
repository: 'gitHubDetails.repository',
runtime: 'runtime.name',
spacePath: 'dependencyCheck.spacePath',
username: 'gitHubDetails.login'
}
'state': 'projectile.toJson'
})
setup(): void {
this.setupInProgress = true;
Expand Down
4 changes: 2 additions & 2 deletions projects/ngx-launcher/src/lib/model/projectile.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ export class Projectile<T> {
}

toHttpPayload(): HttpParams {
return new HttpParams({ fromObject: this.toJson() });
return new HttpParams({ fromObject: this.toJson });
}

toJson(): any {
get toJson(): any {
const result: { [param: string]: string } = {};
Object.keys(this._state).map(k =>
this._state[k].save().map(f => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class StepIndicatorComponent implements OnInit, OnDestroy {
* Navigate to next step
*/
@broadcast('stepIndicatorClicked', {
'state': 'projectile'
'state': 'projectile.toJson'
})
navToNextStep(fromStepId?: string): void {
this.projectile.selectedSection = fromStepId;
Expand Down

0 comments on commit 1ceb633

Please sign in to comment.