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 2020/06/28 21:41:24 UTC
[incubator-streampipes] 02/06: [STREAMPIPES-145] Remove protocol
component from StreamPipes Connect
This is an automated email from the ASF dual-hosted git repository.
riemer pushed a commit to branch STREAMPIPES-145
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit ea24afdd83a3be808be675838d601646fe64a310
Author: Dominik Riemer <ri...@fzi.de>
AuthorDate: Sun Jun 28 12:58:40 2020 +0200
[STREAMPIPES-145] Remove protocol component from StreamPipes Connect
---
ui/src/app/connect/connect.module.ts | 3 -
.../connect/new-adapter/new-adapter.component.html | 2 -
.../new-adapter/new-adapter.component.spec.ts | 79 ---------------------
.../protocol-component/protocol.component.css | 80 ----------------------
.../protocol-component/protocol.component.html | 19 -----
.../protocol-component/protocol.component.ts | 58 ----------------
6 files changed, 241 deletions(-)
diff --git a/ui/src/app/connect/connect.module.ts b/ui/src/app/connect/connect.module.ts
index 71f47f9..6e9b9f5 100644
--- a/ui/src/app/connect/connect.module.ts
+++ b/ui/src/app/connect/connect.module.ts
@@ -49,8 +49,6 @@ import {StaticPropertyUtilService} from './static-properties/static-property-uti
import {TransformationRuleService} from './transformation-rule.service';
import {StaticSecretInputComponent} from "./static-properties/static-secret-input/static-secret-input.component";
-import {ProtocolComponent} from './protocol-component/protocol.component';
-
import {ShepherdService} from '../services/tour/shepherd.service';
import {ConnectService} from './connect.service';
import {AdapterDescriptionComponent} from './data-marketplace/adapter-description/adapter-description.component';
@@ -134,7 +132,6 @@ import {xsService} from "../NS/XS.service";
StaticMappingUnaryComponent,
TimestampPipe,
StaticAnyInput,
- ProtocolComponent,
FormatListComponent,
FormatComponent,
DataMarketplaceComponent,
diff --git a/ui/src/app/connect/new-adapter/new-adapter.component.html b/ui/src/app/connect/new-adapter/new-adapter.component.html
index 3de6232..dea2a71 100644
--- a/ui/src/app/connect/new-adapter/new-adapter.component.html
+++ b/ui/src/app/connect/new-adapter/new-adapter.component.html
@@ -64,8 +64,6 @@
(updateEmitter)="triggerUpdate($event)" [completedStaticProperty]="completedStaticProperty">
</app-static-property>
</div>
-<!-- <app-protocol (validateEmitter)="validateProtocol($event)" [protocol]="adapter.protocolDescription"-->
-<!-- *ngIf="isGenericAdapter"></app-protocol>-->
</form>
</div>
</div>
diff --git a/ui/src/app/connect/new-adapter/new-adapter.component.spec.ts b/ui/src/app/connect/new-adapter/new-adapter.component.spec.ts
deleted file mode 100644
index 3a978e0..0000000
--- a/ui/src/app/connect/new-adapter/new-adapter.component.spec.ts
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-import {async, ComponentFixture, TestBed,} from '@angular/core/testing';
-import {CommonModule} from '@angular/common';
-import {NO_ERRORS_SCHEMA} from '@angular/core';
-import {NewAdapterComponent} from './new-adapter.component';
-import {BrowserModule} from '@angular/platform-browser';
-import {FormsModule, ReactiveFormsModule} from '@angular/forms';
-import {MatGridListModule} from '@angular/material';
-import {CustomMaterialModule} from '../../CustomMaterial/custom-material.module';
-import {DragulaModule} from 'ng2-dragula';
-import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
-import {FlexLayoutModule} from '@angular/flex-layout';
-import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
-
-describe('NewComponent', () => {
- let fixture: ComponentFixture<NewAdapterComponent>;
- let newComponent: NewAdapterComponent;
-
- beforeEach(async(() => {
- TestBed.configureTestingModule({
- imports: [
- BrowserModule,
- BrowserAnimationsModule,
- FormsModule,
- ReactiveFormsModule,
- CommonModule,
- FlexLayoutModule,
- MatGridListModule,
- CustomMaterialModule,
- DragulaModule,
- MatProgressSpinnerModule,
- ],
- declarations: [NewAdapterComponent],
- providers: [
- // { provide: RestService, useClass: EmptyMockService},
- // { provide: FormBuilder, useClass: EmptyMockService},
- // { provide: MatDialog, useClass: EmptyMockService}
- ],
- schemas: [NO_ERRORS_SCHEMA],
- }).compileComponents();
- fixture = TestBed.createComponent(NewAdapterComponent);
- fixture.detectChanges();
- newComponent = fixture.componentInstance;
- }));
-
- // it('should create the component', async(() => {
- // expect(newComponent).toBeTruthy();
- // }));
-
- // it('should get two ConsulServices from service', async(() => {
- // expect(configurationComponent.consulServices.length).toBe(2);
- // }));
-
- /*
- it('should show two consul services from mock data', async(() => {
- expect(fixture.nativeElement.querySelectorAll('consul-service').length).toBe(2);
- }));
- it('should set width of both services equally', async(() => {
- expect(fixture.nativeElement.querySelectorAll('consul-service')[0].style.width).toBe(fixture.nativeElement.querySelectorAll('consul-service')[1].style.width);
- }));
- */
-});
diff --git a/ui/src/app/connect/protocol-component/protocol.component.css b/ui/src/app/connect/protocol-component/protocol.component.css
deleted file mode 100644
index a5fb959..0000000
--- a/ui/src/app/connect/protocol-component/protocol.component.css
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-.example-full-width {
- width: 100%;
- }
-
- .example-form {
- min-width: 300px;
- max-width: 500px;
- width: 100%;
- }
-
- #test {
- min-height: 100%;
- }
-
- /*p {*/
- /*width: 100%;*/
- /*height: 100%;*/
- /*margin-top: 30px;*/
- /*text-align: center;*/
- /*font-weight: bold;*/
- /*font-size: 1.3em;*/
- /*} */
- .cover {
- width: 100%;
- height: 100%;
- }
-
- .fullWidth {
- width: 100%;
- height: 100%;
- }
-
- .wrapping {
- min-height: 100px;
- box-sizing: border-box;
- width: 33%;
- border: solid #ccc 1px;
- border-radius: 2px;
- cursor: pointer;
- padding-top: 5px !important;
- padding-bottom: 5px !important;
- margin-bottom: 10px;
- text-align: center;
- }
-
- .wrapping:hover {
- animation-name: borderChange;
- animation-duration: 500ms;
- animation-fill-mode: forwards;
- }
-
- @keyframes borderChange {
- from{}
- to{box-shadow: 2px 2px 2px #b4b4b4;}
- }
-
- .selectedItem {
- border-color: #b4b4b4 !important;
- box-shadow: 2px 2px 2px #b4b4b4;
- text-align: left;
- }
-
\ No newline at end of file
diff --git a/ui/src/app/connect/protocol-component/protocol.component.html b/ui/src/app/connect/protocol-component/protocol.component.html
deleted file mode 100644
index ff99ad7..0000000
--- a/ui/src/app/connect/protocol-component/protocol.component.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- ~
- -->
-
-<app-select-static-properties [adapterId]="protocol.appId" [staticProperties]="protocol.config" (validateEmitter)="validateText($event)" id="test"></app-select-static-properties>
\ No newline at end of file
diff --git a/ui/src/app/connect/protocol-component/protocol.component.ts b/ui/src/app/connect/protocol-component/protocol.component.ts
deleted file mode 100644
index 5270243..0000000
--- a/ui/src/app/connect/protocol-component/protocol.component.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-import {Component, EventEmitter, Input, Output} from '@angular/core';
-import {ProtocolDescription} from '../model/connect/grounding/ProtocolDescription';
-
-@Component({
- selector: 'app-protocol',
- templateUrl: './protocol.component.html',
- styleUrls: ['./protocol.component.css']
-})
-
-export class ProtocolComponent {
-
- @Input() protocol: ProtocolDescription;
- @Input() selectedProtocol: ProtocolDescription;
- @Output() validateEmitter = new EventEmitter();
- @Output() editableEmitter = new EventEmitter();
- @Output() selectedProtocolEmitter = new EventEmitter();
-
- private hasConfig: Boolean;
-
- constructor() {
- this.hasConfig=true;
- }
-
- validateText(textValid) {
-
- // if(textValid && this.protocol.edit) {
- if(textValid) {
- this.validateEmitter.emit(true);
- this.selectedProtocol = this.protocol;
- this.selectedProtocolEmitter.emit(this.selectedProtocol);
- }
- else {
- this.validateEmitter.emit(false);
- this.selectedProtocol = null;
- }
- }
- ngOnInit() {
- console.log(this.protocol);
- }
-}
\ No newline at end of file