-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix parse command bug and yamlTemplate state bug in SetPollingSource/…
…SetTransform editors. (#112) * Fix parse command bug and yamlTemplate state bug. * Isolated a base class between SetPollingSource and SetTransform editors * Add unit tests.
- Loading branch information
1 parent
3f692a8
commit 99a5684
Showing
9 changed files
with
158 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...set-view/additional-components/metadata-component/components/base-main-event.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { ChangeDetectorRef, inject } from "@angular/core"; | ||
import { NgbModal } from "@ng-bootstrap/ng-bootstrap"; | ||
import { DatasetKind } from "src/app/api/kamu.graphql.interface"; | ||
import { MaybeNull } from "src/app/common/app.types"; | ||
import { BaseComponent } from "src/app/common/base.component"; | ||
import { AppDatasetCreateService } from "src/app/dataset-create/dataset-create.service"; | ||
import { DatasetHistoryUpdate } from "src/app/dataset-view/dataset.subscriptions.interface"; | ||
import { TemplatesYamlEventsService } from "src/app/services/templates-yaml-events.service"; | ||
|
||
export abstract class BaseMainEventComponent extends BaseComponent { | ||
public modalService = inject(NgbModal); | ||
public createDatasetService = inject(AppDatasetCreateService); | ||
public cdr = inject(ChangeDetectorRef); | ||
public yamlEventService = inject(TemplatesYamlEventsService); | ||
|
||
public eventYamlByHash: MaybeNull<string>; | ||
public history: DatasetHistoryUpdate; | ||
public datasetKind: DatasetKind; | ||
public errorMessage = ""; | ||
public changedEventYamlByHash: string; | ||
|
||
protected subsribeErrorMessage(): void { | ||
this.trackSubscription( | ||
this.createDatasetService.onErrorCommitEventChanges.subscribe( | ||
(message: string) => { | ||
this.errorMessage = message; | ||
this.cdr.detectChanges(); | ||
}, | ||
), | ||
); | ||
} | ||
|
||
protected abstract onEditYaml(): void; | ||
protected abstract onSaveEvent(): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.