Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit 6b6b40a

Browse files
BoykoAlexghillert
authored andcommitted
Redirect to stream-defs page when stream(s) created
1 parent a57be82 commit 6b6b40a

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"ngx-pagination": "3.0.1",
3838
"rxjs": "5.5.2",
3939
"sockjs-client": "1.1.4",
40-
"spring-flo": "0.7.0-beta",
40+
"spring-flo": "git://github.com/spring-projects/spring-flo#0ee041142d50044512b091b504e9ab9df3ffcd48",
4141
"stompjs": "2.3.3",
4242
"tixif-ngx-busy": "0.0.5",
4343
"zone.js": "0.8.18",

ui/src/app/streams/stream-create-dialog/stream-create-dialog.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { StreamsService } from '../streams.service';
88
import { ToastyService } from 'ng2-toasty';
99
import { Properties } from 'spring-flo';
1010
import { Subscription } from 'rxjs/Subscription';
11+
import { Router } from '@angular/router';
1112

1213
/**
1314
* Stores progress percentage.
@@ -53,7 +54,8 @@ export class StreamCreateDialogComponent implements OnInit {
5354
private bsModalRef: BsModalRef,
5455
private toastyService: ToastyService,
5556
private parserService: ParserService,
56-
private streamService: StreamsService
57+
private streamService: StreamsService,
58+
private router: Router
5759
) {}
5860

5961
ngOnInit() {
@@ -237,6 +239,7 @@ export class StreamCreateDialogComponent implements OnInit {
237239
this.bsModalRef.hide();
238240
this.toastyService.success('Stream(s) have been created successfully');
239241
}, PROGRESS_BAR_WAIT_TIME);
242+
this.router.navigate(['streams/definitions']);
240243
} else {
241244
// There are more streams to create, so create the next one
242245
this.waitForStreamDef(def.name, 0).then(() => {

ui/src/app/streams/stream-create/stream-create.component.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,12 @@ export class StreamCreateComponent implements OnInit, OnDestroy {
105105
const bsModalRef = this.bsModalService
106106
.show(StreamCreateDialogComponent);
107107
bsModalRef.content.setDsl(this.dsl);
108-
bsModalRef.content.successCallback = () => this.editorContext.clearGraph();
108+
bsModalRef.content.successCallback = () => {
109+
this.editorContext.clearGraph();
110+
// At this moment graph <-> dsl syncing is off because neither DSL editor nor graph editor has focus on
111+
// Therefore, kick off the text update manually.
112+
this.editorContext.updateText();
113+
};
109114
}
110115

111116
contentAssist(doc: CodeMirror.EditorFromTextArea) {

0 commit comments

Comments
 (0)