You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ze...@apache.org on 2021/09/20 15:03:14 UTC
[incubator-streampipes] branch dev updated (40a73cb -> 44e4130)
This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a change to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git.
from 40a73cb [STREAMPIPES-79] Add start edit mode in widget view
new b4457eb [hotfix] Fix code style in adatper start dialog
new 58d942f [STREAMPIPES-79] Set default widget name
new 44e4130 [STREAMPIPES-424] ISS adapter is broken
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../specific-adapter-configuration.component.ts | 8 +-
.../adapter-started-dialog.component.ts | 193 ++++++++++-----------
.../data-explorer-designer-panel.component.ts | 7 +
ui/tslint.json | 2 +-
4 files changed, 111 insertions(+), 99 deletions(-)
[incubator-streampipes] 01/03: [hotfix] Fix code style in adatper
start dialog
Posted by ze...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit b4457ebf55631c34aae9e50462e44b727c0c8ea2
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Thu Sep 16 16:59:29 2021 +0200
[hotfix] Fix code style in adatper start dialog
---
.../adapter-started-dialog.component.ts | 193 ++++++++++-----------
ui/tslint.json | 2 +-
2 files changed, 97 insertions(+), 98 deletions(-)
diff --git a/ui/src/app/connect/dialog/adapter-started/adapter-started-dialog.component.ts b/ui/src/app/connect/dialog/adapter-started/adapter-started-dialog.component.ts
index f443c49..40711b2 100644
--- a/ui/src/app/connect/dialog/adapter-started/adapter-started-dialog.component.ts
+++ b/ui/src/app/connect/dialog/adapter-started/adapter-started-dialog.component.ts
@@ -16,115 +16,114 @@
*
*/
-import {Component, Inject, Input} from '@angular/core';
-import {ShepherdService} from '../../../services/tour/shepherd.service';
-import {RestService} from "../../services/rest.service";
+import { Component, Input, OnInit } from '@angular/core';
+import { ShepherdService } from '../../../services/tour/shepherd.service';
+import { RestService } from '../../services/rest.service';
import {
AdapterDescriptionUnion,
GenericAdapterSetDescription,
Message,
SpDataStream,
SpecificAdapterSetDescription
-} from "../../../core-model/gen/streampipes-model";
-import {DialogRef} from "../../../core-ui/dialog/base-dialog/dialog-ref";
+} from '../../../core-model/gen/streampipes-model';
+import { DialogRef } from '../../../core-ui/dialog/base-dialog/dialog-ref';
@Component({
- selector: 'sp-dialog-adapter-started-dialog',
- templateUrl: './adapter-started-dialog.component.html',
- styleUrls: ['./adapter-started-dialog.component.scss'],
+ selector: 'sp-dialog-adapter-started-dialog',
+ templateUrl: './adapter-started-dialog.component.html',
+ styleUrls: ['./adapter-started-dialog.component.scss']
})
-export class AdapterStartedDialog {
-
- adapterInstalled: boolean = false;
- public adapterStatus: Message;
- public streamDescription: SpDataStream;
- private pollingActive: boolean = false;
- public runtimeData: any;
- public isSetAdapter: boolean = false;
- public isTemplate: boolean = false;
-
- @Input()
- storeAsTemplate: boolean;
-
- @Input()
- adapter: AdapterDescriptionUnion;
-
- @Input()
- saveInDataLake: boolean;
-
- @Input()
- dataLakeTimestampField: string;
-
- constructor(
- public dialogRef: DialogRef<AdapterStartedDialog>,
- private restService: RestService,
- private ShepherdService: ShepherdService) { }
-
- ngOnInit() {
- this.startAdapter();
- }
-
- startAdapter() {
- if (this.storeAsTemplate) {
-
- this.restService.addAdapterTemplate(this.adapter).subscribe(x => {
- this.adapterStatus = x as Message;
- this.isTemplate = true;
- this.adapterInstalled = true;
- });
-
- } else {
-
- var newAdapter = this.adapter;
- this.restService.addAdapter(this.adapter).subscribe(x => {
- this.adapterInstalled = true;
- this.adapterStatus = x;
- if (x.success) {
-
- // Start preview on streams and message for sets
- if (newAdapter instanceof GenericAdapterSetDescription || newAdapter instanceof SpecificAdapterSetDescription) {
- this.isSetAdapter = true;
- } else {
- this.restService.getSourceDetails(x.notifications[0].title).subscribe(x => {
- this.streamDescription = x;
- this.pollingActive = true;
- });
- }
-
- if (this.saveInDataLake) {
- // TODO pipeline templates are currently not working, this should be changed to use the new UI model
- // const templateName = "org.apache.streampipes.manager.template.instances.DataLakePipelineTemplate";
- // x.notifications[0].title
- // this.pipelineTemplateService.getPipelineTemplateInvocation(x.notifications[0].title + "/streams", templateName)
- // .subscribe(res => {
- //
- // res.list.forEach(property => {
- // if (property instanceof FreeTextStaticProperty && "domId2db_measurement" == property.internalName) {
- // property.value = this.data.adapter.label.toLowerCase().replace(" ", "_");
- // } else if (property instanceof MappingPropertyUnary && "domId2timestamp_mapping" == property.internalName) {
- // property.selectedProperty = "s0::" + this.data.dataLakeTimestampField;
- // }
- //
- //
- // });
- //
- // res.pipelineTemplateId = templateName;
- // res.name = this.data.adapter.label;
- // this.pipelineTemplateService.createPipelineTemplateInvocation(res);
- // });
- }
- }
+export class AdapterStartedDialog implements OnInit {
+
+ adapterInstalled = false;
+ public adapterStatus: Message;
+ public streamDescription: SpDataStream;
+ private pollingActive = false;
+ public runtimeData: any;
+ public isSetAdapter = false;
+ public isTemplate = false;
+
+ @Input()
+ storeAsTemplate: boolean;
+
+ @Input()
+ adapter: AdapterDescriptionUnion;
+
+ @Input()
+ saveInDataLake: boolean;
+
+ @Input()
+ dataLakeTimestampField: string;
+
+ constructor(
+ public dialogRef: DialogRef<AdapterStartedDialog>,
+ private restService: RestService,
+ private shepherdService: ShepherdService) {
+ }
+
+ ngOnInit() {
+ this.startAdapter();
+ }
+
+ startAdapter() {
+ if (this.storeAsTemplate) {
+
+ this.restService.addAdapterTemplate(this.adapter).subscribe(x => {
+ this.adapterStatus = x as Message;
+ this.isTemplate = true;
+ this.adapterInstalled = true;
+ });
+
+ } else {
+
+ const newAdapter = this.adapter;
+ this.restService.addAdapter(this.adapter).subscribe(x => {
+ this.adapterInstalled = true;
+ this.adapterStatus = x;
+ if (x.success) {
+
+ // Start preview on streams and message for sets
+ if (newAdapter instanceof GenericAdapterSetDescription || newAdapter instanceof SpecificAdapterSetDescription) {
+ this.isSetAdapter = true;
+ } else {
+ this.restService.getSourceDetails(x.notifications[0].title).subscribe(st => {
+ this.streamDescription = st;
+ this.pollingActive = true;
});
-
+ }
+
+ if (this.saveInDataLake) {
+ // TODO pipeline templates are currently not working, this should be changed to use the new UI model
+ // const templateName = "org.apache.streampipes.manager.template.instances.DataLakePipelineTemplate";
+ // x.notifications[0].title
+ // this.pipelineTemplateService.getPipelineTemplateInvocation(x.notifications[0].title + "/streams", templateName)
+ // .subscribe(res => {
+ //
+ // res.list.forEach(property => {
+ // if (property instanceof FreeTextStaticProperty && "domId2db_measurement" == property.internalName) {
+ // property.value = this.data.adapter.label.toLowerCase().replace(" ", "_");
+ // } else if (property instanceof MappingPropertyUnary && "domId2timestamp_mapping" == property.internalName) {
+ // property.selectedProperty = "s0::" + this.data.dataLakeTimestampField;
+ // }
+ //
+ //
+ // });
+ //
+ // res.pipelineTemplateId = templateName;
+ // res.name = this.data.adapter.label;
+ // this.pipelineTemplateService.createPipelineTemplateInvocation(res);
+ // });
+ }
}
- }
-
+ });
-
- onCloseConfirm() {
- this.pollingActive = false;
- this.dialogRef.close('Confirm');
- this.ShepherdService.trigger("confirm_adapter_started_button");
}
+ }
+
+ onCloseConfirm() {
+ this.pollingActive = false;
+ this.dialogRef.close('Confirm');
+ this.shepherdService.trigger('confirm_adapter_started_button');
+ }
}
diff --git a/ui/tslint.json b/ui/tslint.json
index 8d4013b..ea6cbeb 100644
--- a/ui/tslint.json
+++ b/ui/tslint.json
@@ -94,7 +94,7 @@
"no-output-rename": true,
"use-lifecycle-interface": true,
"use-pipe-transform-interface": true,
- "component-class-suffix": true,
+ "component-class-suffix": [true, "Component", "Dialog"],
"directive-class-suffix": true
},
"extends": ["tslint:latest", "tslint-config-prettier"]
[incubator-streampipes] 03/03: [STREAMPIPES-424] ISS adapter is
broken
Posted by ze...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit 44e4130d1b7265c75953581c143c23cdb37f2b7a
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Mon Sep 20 17:02:36 2021 +0200
[STREAMPIPES-424] ISS adapter is broken
---
.../specific-adapter-configuration.component.ts | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/ui/src/app/connect/components/specific-adapter-configuration/specific-adapter-configuration.component.ts b/ui/src/app/connect/components/specific-adapter-configuration/specific-adapter-configuration.component.ts
index 55b4684..4cd6978 100644
--- a/ui/src/app/connect/components/specific-adapter-configuration/specific-adapter-configuration.component.ts
+++ b/ui/src/app/connect/components/specific-adapter-configuration/specific-adapter-configuration.component.ts
@@ -49,7 +49,8 @@ export class SpecificAdapterConfigurationComponent implements OnInit {
constructor(
private _formBuilder: FormBuilder
- ) { }
+ ) {
+ }
ngOnInit(): void {
// initialize form for validation
@@ -57,6 +58,11 @@ export class SpecificAdapterConfigurationComponent implements OnInit {
this.specificAdapterForm.statusChanges.subscribe((status) => {
this.specificAdapterSettingsFormValid = this.specificAdapterForm.valid;
});
+
+ // Go directly to event schema configuration when adapter has no configuration properties
+ if (this.adapterDescription.config.length === 0) {
+ this.specificAdapterSettingsFormValid = true;
+ }
}
public removeSelection() {
[incubator-streampipes] 02/03: [STREAMPIPES-79] Set default widget
name
Posted by ze...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit 58d942f299536eeb0fa559f62e94fdb76de02e02
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Thu Sep 16 17:06:22 2021 +0200
[STREAMPIPES-79] Set default widget name
---
.../designer-panel/data-explorer-designer-panel.component.ts | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/ui/src/app/data-explorer/components/designer-panel/data-explorer-designer-panel.component.ts b/ui/src/app/data-explorer/components/designer-panel/data-explorer-designer-panel.component.ts
index 168eee3..b102824 100644
--- a/ui/src/app/data-explorer/components/designer-panel/data-explorer-designer-panel.component.ts
+++ b/ui/src/app/data-explorer/components/designer-panel/data-explorer-designer-panel.component.ts
@@ -57,6 +57,13 @@ export class DataExplorerDesignerPanelComponent implements OnInit {
createNewWidget() {
this.newWidgetMode = false;
+
+ // Set default name to the measure name
+ if (this.currentlyConfiguredWidget.dataConfig.sourceConfigs.length > 0) {
+ this.currentlyConfiguredWidget.baseAppearanceConfig.widgetTitle =
+ this.currentlyConfiguredWidget.dataConfig.sourceConfigs[0].measureName;
+ }
+
this.addWidgetEmitter.emit({ a: this.dataLakeMeasure, b: this.currentlyConfiguredWidget });
}