You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2022/03/27 10:08:24 UTC
[incubator-streampipes] branch dev updated: [hotfix] Add button to create new adapter from editor
This is an automated email from the ASF dual-hosted git repository.
riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
The following commit(s) were added to refs/heads/dev by this push:
new 22407ef [hotfix] Add button to create new adapter from editor
22407ef is described below
commit 22407ef42aee94a0aaaf7c1651eb9c1fd27446b9
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Sun Mar 27 12:08:18 2022 +0200
[hotfix] Add button to create new adapter from editor
---
.../pipeline-element-icon-stand.component.html | 9 +++++++--
.../pipeline-element-icon-stand.component.ts | 8 +++++++-
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/ui/src/app/editor/components/pipeline-element-icon-stand/pipeline-element-icon-stand.component.html b/ui/src/app/editor/components/pipeline-element-icon-stand/pipeline-element-icon-stand.component.html
index 8ee1603..f625f1f 100644
--- a/ui/src/app/editor/components/pipeline-element-icon-stand/pipeline-element-icon-stand.component.html
+++ b/ui/src/app/editor/components/pipeline-element-icon-stand/pipeline-element-icon-stand.component.html
@@ -64,8 +64,13 @@
fxLayoutAlign="start center">
{{availableType.title}}
</div>
- <span fxFlex>
- </span>
+ <span fxFlex></span>
+ <button mat-icon-button
+ matTooltip="Create new source"
+ (click)="navigateToConnect()"
+ *ngIf="availableType.title === availableTypes[0].title">
+ <mat-icon>add</mat-icon>
+ </button>
<button mat-icon-button
(click)="toggleOpen(availableType)"
*ngIf="!availableType.open">
diff --git a/ui/src/app/editor/components/pipeline-element-icon-stand/pipeline-element-icon-stand.component.ts b/ui/src/app/editor/components/pipeline-element-icon-stand/pipeline-element-icon-stand.component.ts
index 1db85b5..c1c5dac 100644
--- a/ui/src/app/editor/components/pipeline-element-icon-stand/pipeline-element-icon-stand.component.ts
+++ b/ui/src/app/editor/components/pipeline-element-icon-stand/pipeline-element-icon-stand.component.ts
@@ -21,6 +21,7 @@ import { RestApi } from '../../../services/rest-api.service';
import { PeCategory, PipelineElementType, PipelineElementUnion } from '../../model/editor.model';
import { EditorService } from '../../services/editor.service';
import { zip } from 'rxjs';
+import { Router } from "@angular/router";
@Component({
@@ -65,7 +66,8 @@ export class PipelineElementIconStandComponent implements OnInit, AfterViewInit
uncategorized: PeCategory = {code: 'UNCATEGORIZED', label: 'Uncategorized', description: ''};
constructor(private restApi: RestApi,
- private editorService: EditorService) {
+ private editorService: EditorService,
+ private router: Router) {
}
@@ -149,4 +151,8 @@ export class PipelineElementIconStandComponent implements OnInit, AfterViewInit
this.makeDraggable();
}
+ navigateToConnect() {
+ this.router.navigate(['connect']);
+ }
+
}