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/06/14 16:06:43 UTC
[incubator-streampipes] 03/03: Refactored configurations for
adapters
This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch STREAMPIPES-380
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit 14588a62170438f3afb324b0abdbcc81901a7261
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Mon Jun 14 18:06:07 2021 +0200
Refactored configurations for adapters
---
.../format-configuration.component.css} | 0
.../format-configuration.component.html} | 4 ++--
.../format-configuration.component.ts} | 9 ++++-----
.../generic-adapter-configuration.component.css} | 0
.../generic-adapter-configuration.component.html} | 2 +-
.../generic-adapter-configuration.component.ts} | 9 ++++-----
.../new-adapter/new-adapter.component.html | 13 ++++++-------
.../specific-adapter-configuration.component.css} | 0
.../specific-adapter-configuration.component.html} | 0
.../specific-adapter-configuration.component.ts} | 9 ++++-----
ui/src/app/connect/connect.module.ts | 20 +++++++++++++-------
11 files changed, 34 insertions(+), 32 deletions(-)
diff --git a/ui/src/app/connect/components/specific-adapter-settings/specific-adapter-settings.component.css b/ui/src/app/connect/components/format-configuration/format-configuration.component.css
similarity index 100%
rename from ui/src/app/connect/components/specific-adapter-settings/specific-adapter-settings.component.css
rename to ui/src/app/connect/components/format-configuration/format-configuration.component.css
diff --git a/ui/src/app/connect/components/select-format/select-format.component.html b/ui/src/app/connect/components/format-configuration/format-configuration.component.html
similarity index 93%
rename from ui/src/app/connect/components/select-format/select-format.component.html
rename to ui/src/app/connect/components/format-configuration/format-configuration.component.html
index f6502cf..809820a 100644
--- a/ui/src/app/connect/components/select-format/select-format.component.html
+++ b/ui/src/app/connect/components/format-configuration/format-configuration.component.html
@@ -18,11 +18,11 @@
<div *ngIf="selectedFormat">
<div *ngIf="selectedFormat.config.length > 0">
- <sp-configuration-group
+ <sp-configuration-groupkl
[configurationGroup]="formatForm"
[adapterId]="adapterDescription.appId"
[configuration]="selectedFormat.config">
- </sp-configuration-group>
+ </sp-configuration-groupkl>
</div>
<div *ngIf="selectedFormat.config.length === 0" class="sp-blue-border padding" style="padding: 15px;">
diff --git a/ui/src/app/connect/components/select-format/select-format.component.ts b/ui/src/app/connect/components/format-configuration/format-configuration.component.ts
similarity index 91%
rename from ui/src/app/connect/components/select-format/select-format.component.ts
rename to ui/src/app/connect/components/format-configuration/format-configuration.component.ts
index 43f7993..398b34a 100644
--- a/ui/src/app/connect/components/select-format/select-format.component.ts
+++ b/ui/src/app/connect/components/format-configuration/format-configuration.component.ts
@@ -5,16 +5,15 @@ import {
GenericAdapterSetDescription,
GenericAdapterStreamDescription
} from '../../../core-model/gen/streampipes-model';
-import { ConfigurationInfo } from '../../model/ConfigurationInfo';
import { FormBuilder, FormGroup } from '@angular/forms';
import { RestService } from '../../services/rest.service';
@Component({
- selector: 'sp-select-format',
- templateUrl: './select-format.component.html',
- styleUrls: ['./select-format.component.css']
+ selector: 'sp-format-configuration',
+ templateUrl: './format-configuration.component.html',
+ styleUrls: ['./format-configuration.component.css']
})
-export class SelectFormatComponent implements OnInit {
+export class FormatConfigurationComponent implements OnInit {
/**
* Adapter description the selected format is added to
diff --git a/ui/src/app/connect/components/select-format/select-format.component.css b/ui/src/app/connect/components/generic-adapter-configuration/generic-adapter-configuration.component.css
similarity index 100%
rename from ui/src/app/connect/components/select-format/select-format.component.css
rename to ui/src/app/connect/components/generic-adapter-configuration/generic-adapter-configuration.component.css
diff --git a/ui/src/app/connect/components/generic-adapter-settings/generic-adapter-settings.component.html b/ui/src/app/connect/components/generic-adapter-configuration/generic-adapter-configuration.component.html
similarity index 83%
rename from ui/src/app/connect/components/generic-adapter-settings/generic-adapter-settings.component.html
rename to ui/src/app/connect/components/generic-adapter-configuration/generic-adapter-configuration.component.html
index 1d6f281..44f99f6 100644
--- a/ui/src/app/connect/components/generic-adapter-settings/generic-adapter-settings.component.html
+++ b/ui/src/app/connect/components/generic-adapter-configuration/generic-adapter-configuration.component.html
@@ -9,7 +9,7 @@
<sp-configuration-group
[configurationGroup]="genericAdapterForm"
[adapterId]="adapterDescription.appId"
- [configuration]="adapterDescription.protocolDescription.config">
+ [configuration]="protocolDescription.config">
</sp-configuration-group>
</div>
diff --git a/ui/src/app/connect/components/generic-adapter-settings/generic-adapter-settings.component.ts b/ui/src/app/connect/components/generic-adapter-configuration/generic-adapter-configuration.component.ts
similarity index 81%
rename from ui/src/app/connect/components/generic-adapter-settings/generic-adapter-settings.component.ts
rename to ui/src/app/connect/components/generic-adapter-configuration/generic-adapter-configuration.component.ts
index d17a650..3474e91 100644
--- a/ui/src/app/connect/components/generic-adapter-settings/generic-adapter-settings.component.ts
+++ b/ui/src/app/connect/components/generic-adapter-configuration/generic-adapter-configuration.component.ts
@@ -5,15 +5,14 @@ import {
GenericAdapterStreamDescription,
ProtocolDescription
} from '../../../core-model/gen/streampipes-model';
-import { ConfigurationInfo } from '../../model/ConfigurationInfo';
import { FormBuilder, FormGroup } from '@angular/forms';
@Component({
- selector: 'sp-generic-adapter-settings',
- templateUrl: './generic-adapter-settings.component.html',
- styleUrls: ['./generic-adapter-settings.component.css']
+ selector: 'sp-generic-adapter-configuration',
+ templateUrl: './generic-adapter-configuration.component.html',
+ styleUrls: ['./generic-adapter-configuration.component.css']
})
-export class GenericAdapterSettingsComponent implements OnInit {
+export class GenericAdapterConfigurationComponent implements OnInit {
/**
* Adapter description the selected format is added to
diff --git a/ui/src/app/connect/components/new-adapter/new-adapter.component.html b/ui/src/app/connect/components/new-adapter/new-adapter.component.html
index e59686a..0062463 100644
--- a/ui/src/app/connect/components/new-adapter/new-adapter.component.html
+++ b/ui/src/app/connect/components/new-adapter/new-adapter.component.html
@@ -40,15 +40,14 @@
<i class="material-icons">close</i>
</button>
</div>
-
</div>
<mat-horizontal-stepper [linear]="true" #stepper>
<mat-step *ngIf="!isGenericAdapter">
- <sp-specific-adapter-settings
+ <sp-specific-adapter-configuration
[adapterDescription]="adapter"
(validateEmitter)="validateSpecificAdapterForm($event)">
- </sp-specific-adapter-settings>
+ </sp-specific-adapter-configuration>
<div fxLayoutAlign="end">
<button class="mat-basic" mat-raised-button (click)="removeSelection()">Cancel</button>
@@ -61,10 +60,10 @@
</mat-step>
<mat-step *ngIf="isGenericAdapter">
- <sp-generic-adapter-settings
+ <sp-generic-adapter-configuration
[adapterDescription]="adapter"
(validateEmitter)="validateGenericAdapterForm($event)">
- </sp-generic-adapter-settings>
+ </sp-generic-adapter-configuration>
<div fxLayoutAlign="end">
@@ -78,10 +77,10 @@
</mat-step>
<mat-step *ngIf="isGenericAdapter">
- <sp-select-format
+ <sp-format-configuration
[adapterDescription]="adapter"
(validateEmitter)="validateFormat($event)">
- </sp-select-format>
+ </sp-format-configuration>
<div fxLayoutAlign="end">
<button class="mat-basic" mat-raised-button (click)="removeSelection()">Cancel</button>
diff --git a/ui/src/app/connect/components/generic-adapter-settings/generic-adapter-settings.component.css b/ui/src/app/connect/components/specific-adapter-configuration/specific-adapter-configuration.component.css
similarity index 100%
rename from ui/src/app/connect/components/generic-adapter-settings/generic-adapter-settings.component.css
rename to ui/src/app/connect/components/specific-adapter-configuration/specific-adapter-configuration.component.css
diff --git a/ui/src/app/connect/components/specific-adapter-settings/specific-adapter-settings.component.html b/ui/src/app/connect/components/specific-adapter-configuration/specific-adapter-configuration.component.html
similarity index 100%
rename from ui/src/app/connect/components/specific-adapter-settings/specific-adapter-settings.component.html
rename to ui/src/app/connect/components/specific-adapter-configuration/specific-adapter-configuration.component.html
diff --git a/ui/src/app/connect/components/specific-adapter-settings/specific-adapter-settings.component.ts b/ui/src/app/connect/components/specific-adapter-configuration/specific-adapter-configuration.component.ts
similarity index 75%
rename from ui/src/app/connect/components/specific-adapter-settings/specific-adapter-settings.component.ts
rename to ui/src/app/connect/components/specific-adapter-configuration/specific-adapter-configuration.component.ts
index 52b606b..8605d62 100644
--- a/ui/src/app/connect/components/specific-adapter-settings/specific-adapter-settings.component.ts
+++ b/ui/src/app/connect/components/specific-adapter-configuration/specific-adapter-configuration.component.ts
@@ -1,14 +1,13 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { AdapterDescriptionUnion } from '../../../core-model/gen/streampipes-model';
-import { ConfigurationInfo } from '../../model/ConfigurationInfo';
import { FormBuilder, FormGroup } from '@angular/forms';
@Component({
- selector: 'sp-specific-adapter-settings',
- templateUrl: './specific-adapter-settings.component.html',
- styleUrls: ['./specific-adapter-settings.component.css']
+ selector: 'sp-specific-adapter-configuration',
+ templateUrl: './specific-adapter-configuration.component.html',
+ styleUrls: ['./specific-adapter-configuration.component.css']
})
-export class SpecificAdapterSettingsComponent implements OnInit {
+export class SpecificAdapterConfigurationComponent implements OnInit {
/**
* Adapter description the selected format is added to
diff --git a/ui/src/app/connect/connect.module.ts b/ui/src/app/connect/connect.module.ts
index b5fdbb4..79c1ff4 100644
--- a/ui/src/app/connect/connect.module.ts
+++ b/ui/src/app/connect/connect.module.ts
@@ -70,10 +70,11 @@ import { CoreUiModule } from '../core-ui/core-ui.module';
// tslint:disable-next-line:max-line-length
import { EditCorrectionValueComponent } from './dialog/edit-event-property/components/edit-correction-value/edit-correction-value.component';
import { ExistingAdaptersComponent } from './components/data-marketplace/existing-adapters/existing-adapters.component';
-import { SelectFormatComponent } from './components/select-format/select-format.component';
-import { GenericAdapterSettingsComponent } from './components/generic-adapter-settings/generic-adapter-settings.component';
-import { SpecificAdapterSettingsComponent } from './components/specific-adapter-settings/specific-adapter-settings.component';
+// tslint:disable-next-line:max-line-length
+import { SpecificAdapterConfigurationComponent } from './components/specific-adapter-configuration/specific-adapter-configuration.component';
import { ConfigurationGroupComponent } from './components/configuration-group/configuration-group.component';
+import { FormatConfigurationComponent } from './components/format-configuration/format-configuration.component';
+import { GenericAdapterConfigurationComponent } from './components/generic-adapter-configuration/generic-adapter-configuration.component';
@NgModule({
imports: [
@@ -119,9 +120,9 @@ import { ConfigurationGroupComponent } from './components/configuration-group/co
PipelineElementRuntimeInfoComponent,
TimestampPipe,
EditCorrectionValueComponent,
- SelectFormatComponent,
- GenericAdapterSettingsComponent,
- SpecificAdapterSettingsComponent,
+ FormatConfigurationComponent,
+ GenericAdapterConfigurationComponent,
+ SpecificAdapterConfigurationComponent,
ConfigurationGroupComponent
],
providers: [
@@ -136,6 +137,11 @@ import { ConfigurationGroupComponent } from './components/configuration-group/co
TimestampPipe,
xsService,
],
- entryComponents: [ConnectComponent, AdapterStartedDialog, AdapterExportDialog, AdapterUploadDialog, EditEventPropertyComponent],
+ entryComponents: [
+ ConnectComponent,
+ AdapterStartedDialog,
+ AdapterExportDialog,
+ AdapterUploadDialog,
+ EditEventPropertyComponent],
})
export class ConnectModule { }