This is an automated email from the ASF dual-hosted git repository.
riemer pushed a commit to branch 2599-remove-rdfendpointstorage
in repository https://gitbox.apache.org/repos/asf/streampipes.git
The following commit(s) were added to refs/heads/2599-remove-rdfendpointstorage
by this push:
new f073b446ca chore(#2599): Remove RDF endpoint storage
f073b446ca is described below
commit f073b446ca03a8c0e45e0f177e3a9785f559c9c1
Author: Dominik Riemer <[email protected]>
AuthorDate: Wed Mar 20 23:34:11 2024 +0100
chore(#2599): Remove RDF endpoint storage
---
.../manager/endpoint/EndpointFetcher.java | 14 +--
.../manager/setup/CouchDbInstallationStep.java | 17 ----
.../admin/ExtensionsServiceEndpointResource.java | 34 +------
.../storage/couchdb/CouchDbStorageManager.java | 7 --
.../impl/ExtensionsServiceEndpointStorageImpl.java | 50 ----------
.../streampipes/storage/couchdb/utils/Utils.java | 6 --
ui/src/app/add/add.component.html | 8 --
ui/src/app/add/add.component.ts | 28 ------
ui/src/app/add/add.module.ts | 2 -
.../add-endpoint/add-endpoint.component.html | 111 ---------------------
.../add-endpoint/add-endpoint.component.scss | 19 ----
.../dialogs/add-endpoint/add-endpoint.component.ts | 76 --------------
ui/src/app/add/services/add.service.ts | 21 ----
13 files changed, 2 insertions(+), 391 deletions(-)
diff --git
a/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/endpoint/EndpointFetcher.java
b/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/endpoint/EndpointFetcher.java
index 1896f33194..abe3ff2b75 100644
---
a/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/endpoint/EndpointFetcher.java
+++
b/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/endpoint/EndpointFetcher.java
@@ -18,14 +18,10 @@
package org.apache.streampipes.manager.endpoint;
import org.apache.streampipes.model.client.endpoint.ExtensionsServiceEndpoint;
-import org.apache.streampipes.storage.management.StorageDispatcher;
import org.apache.streampipes.svcdiscovery.SpServiceDiscovery;
-import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
public class EndpointFetcher {
@@ -38,15 +34,7 @@ public class EndpointFetcher {
new ExtensionsServiceEndpoint(endpoint);
serviceExtensionsServiceEndpoints.add(extensionsServiceEndpoint);
}
- List<ExtensionsServiceEndpoint> databasedExtensionsServiceEndpoints =
StorageDispatcher.INSTANCE.getNoSqlStore()
- .getRdfEndpointStorage()
- .getExtensionsServiceEndpoints();
- List<ExtensionsServiceEndpoint> concatList =
- Stream.of(databasedExtensionsServiceEndpoints,
serviceExtensionsServiceEndpoints)
- .flatMap(Collection::stream)
- .collect(Collectors.toList());
-
- return concatList;
+ return serviceExtensionsServiceEndpoints;
}
}
diff --git
a/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/setup/CouchDbInstallationStep.java
b/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/setup/CouchDbInstallationStep.java
index ae8852a330..e980d9f900 100644
---
a/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/setup/CouchDbInstallationStep.java
+++
b/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/setup/CouchDbInstallationStep.java
@@ -21,28 +21,22 @@ package org.apache.streampipes.manager.setup;
import org.apache.streampipes.manager.setup.design.UserDesignDocument;
import org.apache.streampipes.manager.setup.tasks.CreateAssetLinkTypeTask;
import org.apache.streampipes.manager.setup.tasks.CreateDefaultAssetTask;
-import org.apache.streampipes.model.client.endpoint.ExtensionsServiceEndpoint;
-import
org.apache.streampipes.storage.couchdb.impl.ExtensionsServiceEndpointStorageImpl;
import org.apache.streampipes.storage.couchdb.utils.Utils;
import org.lightcouch.DesignDocument;
import org.lightcouch.DesignDocument.MapReduce;
import org.lightcouch.Response;
-import java.util.ArrayList;
import java.util.HashMap;
-import java.util.List;
import java.util.Map;
import static
org.apache.streampipes.manager.setup.design.DesignDocumentUtils.prepareDocument;
public class CouchDbInstallationStep extends InstallationStep {
- private static final String initRdfEndpointHost = "http://localhost:";
private static final String PREPARING_NOTIFICATIONS_TEXT = "Preparing
database "
+ "'notifications'...";
private static final String PREPARING_USERS_TEXT = "Preparing database
'users'...";
- private static List<String> initRdfEndpointPorts = new ArrayList<>();
public CouchDbInstallationStep() {
@@ -52,7 +46,6 @@ public class CouchDbInstallationStep extends InstallationStep
{
public void install() {
createDatabases();
createViews();
- addRdfEndpoints();
new CreateAssetLinkTypeTask().execute();
new CreateDefaultAssetTask().execute();
}
@@ -77,7 +70,6 @@ public class CouchDbInstallationStep extends InstallationStep
{
Utils.getCouchDbNotificationClient();
Utils.getCouchDbPipelineCategoriesClient();
Utils.getCouchDbVisualizationClient();
- Utils.getCouchDbRdfEndpointClient();
Utils.getCouchDbDashboardClient();
Utils.getCouchDbDashboardWidgetClient();
Utils.getCouchDbLabelClient();
@@ -97,15 +89,6 @@ public class CouchDbInstallationStep extends
InstallationStep {
addPipelineView();
}
- private void addRdfEndpoints() {
- ExtensionsServiceEndpointStorageImpl rdfEndpointStorage = new
ExtensionsServiceEndpointStorageImpl();
- initRdfEndpointPorts
- .forEach(p -> rdfEndpointStorage
- .addExtensionsServiceEndpoint(new
ExtensionsServiceEndpoint(initRdfEndpointHost + p)));
-
- logSuccess("Discovering pipeline element endpoints...");
- }
-
private void addNotificationView() {
try {
DesignDocument userDocument =
prepareDocument("_design/notificationtypes");
diff --git
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/admin/ExtensionsServiceEndpointResource.java
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/admin/ExtensionsServiceEndpointResource.java
index a2d83a014f..23ac7041bd 100644
---
a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/admin/ExtensionsServiceEndpointResource.java
+++
b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/admin/ExtensionsServiceEndpointResource.java
@@ -31,16 +31,14 @@ import
org.apache.streampipes.rest.core.base.impl.AbstractAuthGuardedRestResourc
import org.apache.streampipes.rest.security.AuthConstants;
import org.apache.streampipes.rest.shared.exception.SpMessageException;
import org.apache.streampipes.sdk.utils.Assets;
-import org.apache.streampipes.storage.api.IExtensionsServiceEndpointStorage;
import org.apache.http.client.fluent.Request;
+
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -55,32 +53,6 @@ import java.util.List;
@PreAuthorize(AuthConstants.IS_ADMIN_ROLE)
public class ExtensionsServiceEndpointResource extends
AbstractAuthGuardedRestResource {
- @GetMapping(produces = MediaType.APPLICATION_JSON_VALUE)
- public ResponseEntity<List<ExtensionsServiceEndpoint>> getAllEndpoints() {
- //TODO: return the endpoint of passing services
- return ok(getEndpoints());
- }
-
- @PostMapping(produces = MediaType.APPLICATION_JSON_VALUE)
- public ResponseEntity<Void> addRdfEndpoint(@RequestBody
ExtensionsServiceEndpoint extensionsServiceEndpoint) {
- getRdfEndpointStorage()
- .addExtensionsServiceEndpoint(extensionsServiceEndpoint);
-
- return ok();
- }
-
-
- @DeleteMapping(
- path = "/{rdfEndpointId}",
- produces = MediaType.APPLICATION_JSON_VALUE,
- consumes = MediaType.APPLICATION_JSON_VALUE)
- public ResponseEntity<Void> removeRdfEndpoint(@PathVariable("rdfEndpointId")
String rdfEndpointId) {
- getRdfEndpointStorage()
- .removeExtensionsServiceEndpoint(rdfEndpointId);
-
- return ok();
- }
-
@GetMapping(path = "/items", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<List<ExtensionsServiceEndpointItem>>
getEndpointContents() {
List<ExtensionsServiceEndpoint> endpoints = getEndpoints();
@@ -213,8 +185,4 @@ public class ExtensionsServiceEndpointResource extends
AbstractAuthGuardedRestRe
private List<DataSinkDescription> getAllDataSinks() {
return getNoSqlStorage().getDataSinkStorage().getAll();
}
-
- private IExtensionsServiceEndpointStorage getRdfEndpointStorage() {
- return getNoSqlStorage().getRdfEndpointStorage();
- }
}
diff --git
a/streampipes-storage-couchdb/src/main/java/org/apache/streampipes/storage/couchdb/CouchDbStorageManager.java
b/streampipes-storage-couchdb/src/main/java/org/apache/streampipes/storage/couchdb/CouchDbStorageManager.java
index 87886fc7c9..3b9533ee26 100644
---
a/streampipes-storage-couchdb/src/main/java/org/apache/streampipes/storage/couchdb/CouchDbStorageManager.java
+++
b/streampipes-storage-couchdb/src/main/java/org/apache/streampipes/storage/couchdb/CouchDbStorageManager.java
@@ -29,7 +29,6 @@ import org.apache.streampipes.storage.api.IDataLakeStorage;
import org.apache.streampipes.storage.api.IDataProcessorStorage;
import org.apache.streampipes.storage.api.IDataSinkStorage;
import org.apache.streampipes.storage.api.IDataStreamStorage;
-import org.apache.streampipes.storage.api.IExtensionsServiceEndpointStorage;
import org.apache.streampipes.storage.api.IFileMetadataStorage;
import org.apache.streampipes.storage.api.IGenericStorage;
import org.apache.streampipes.storage.api.IImageStorage;
@@ -62,7 +61,6 @@ import
org.apache.streampipes.storage.couchdb.impl.DataProcessorStorageImpl;
import org.apache.streampipes.storage.couchdb.impl.DataSinkStorageImpl;
import org.apache.streampipes.storage.couchdb.impl.DataStreamStorageImpl;
import
org.apache.streampipes.storage.couchdb.impl.ExtensionsServiceConfigStorageImpl;
-import
org.apache.streampipes.storage.couchdb.impl.ExtensionsServiceEndpointStorageImpl;
import
org.apache.streampipes.storage.couchdb.impl.ExtensionsServiceStorageImpl;
import org.apache.streampipes.storage.couchdb.impl.FileMetadataStorageImpl;
import org.apache.streampipes.storage.couchdb.impl.GenericStorageImpl;
@@ -139,11 +137,6 @@ public enum CouchDbStorageManager implements INoSqlStorage
{
return new VisualizationStorageImpl();
}
- @Override
- public IExtensionsServiceEndpointStorage getRdfEndpointStorage() {
- return new ExtensionsServiceEndpointStorageImpl();
- }
-
@Override
public IAssetDashboardStorage getAssetDashboardStorage() {
return new AssetDashboardStorageImpl();
diff --git
a/streampipes-storage-couchdb/src/main/java/org/apache/streampipes/storage/couchdb/impl/ExtensionsServiceEndpointStorageImpl.java
b/streampipes-storage-couchdb/src/main/java/org/apache/streampipes/storage/couchdb/impl/ExtensionsServiceEndpointStorageImpl.java
deleted file mode 100644
index 6cc882ff91..0000000000
---
a/streampipes-storage-couchdb/src/main/java/org/apache/streampipes/storage/couchdb/impl/ExtensionsServiceEndpointStorageImpl.java
+++ /dev/null
@@ -1,50 +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.
- *
- */
-
-package org.apache.streampipes.storage.couchdb.impl;
-
-import org.apache.streampipes.model.client.endpoint.ExtensionsServiceEndpoint;
-import org.apache.streampipes.storage.api.IExtensionsServiceEndpointStorage;
-import org.apache.streampipes.storage.couchdb.dao.AbstractDao;
-import org.apache.streampipes.storage.couchdb.utils.Utils;
-
-import java.util.List;
-
-public class ExtensionsServiceEndpointStorageImpl extends
AbstractDao<ExtensionsServiceEndpoint>
- implements IExtensionsServiceEndpointStorage {
-
- public ExtensionsServiceEndpointStorageImpl() {
- super(Utils::getCouchDbRdfEndpointClient, ExtensionsServiceEndpoint.class);
- }
-
- @Override
- public void addExtensionsServiceEndpoint(ExtensionsServiceEndpoint
extensionsServiceEndpoint) {
- persist(extensionsServiceEndpoint);
- }
-
- @Override
- public void removeExtensionsServiceEndpoint(String rdfEndpointId) {
- delete(rdfEndpointId);
- }
-
- @Override
- public List<ExtensionsServiceEndpoint> getExtensionsServiceEndpoints() {
- return findAll();
- }
-
-}
diff --git
a/streampipes-storage-couchdb/src/main/java/org/apache/streampipes/storage/couchdb/utils/Utils.java
b/streampipes-storage-couchdb/src/main/java/org/apache/streampipes/storage/couchdb/utils/Utils.java
index 401001d9d4..1d4819cf1a 100644
---
a/streampipes-storage-couchdb/src/main/java/org/apache/streampipes/storage/couchdb/utils/Utils.java
+++
b/streampipes-storage-couchdb/src/main/java/org/apache/streampipes/storage/couchdb/utils/Utils.java
@@ -114,12 +114,6 @@ public class Utils {
return getCouchDbStandardSerializerClient("visualizations");
}
- //TODO: Remove??
- public static CouchDbClient getCouchDbRdfEndpointClient() {
- CouchDbClient dbClient = new CouchDbClient(props("rdfendpoint"));
- return dbClient;
- }
-
public static CouchDbClient getCouchDbDataExplorerDashboardClient() {
return getCouchDbGsonClient("dataexplorerdashboard");
}
diff --git a/ui/src/app/add/add.component.html
b/ui/src/app/add/add.component.html
index 624b881aea..78d0dcac10 100644
--- a/ui/src/app/add/add.component.html
+++ b/ui/src/app/add/add.component.html
@@ -131,14 +131,6 @@
<mat-icon>refresh</mat-icon>
</button>
</div>
- <button
- mat-icon-button
- color="accent"
- (click)="showManageRdfEndpointsDialog()"
- matTooltip="Manage Endpoints"
- >
- <i class="material-icons">settings</i>
- </button>
</div>
<div fxLayout="column" fxFlex="100">
<div
diff --git a/ui/src/app/add/add.component.ts b/ui/src/app/add/add.component.ts
index 82e3f1f8de..f5bcffad7a 100644
--- a/ui/src/app/add/add.component.ts
+++ b/ui/src/app/add/add.component.ts
@@ -24,7 +24,6 @@ import {
PanelType,
SpBreadcrumbService,
} from '@streampipes/shared-ui';
-import { AddEndpointComponent } from
'./dialogs/add-endpoint/add-endpoint.component';
import { EndpointInstallationComponent } from
'./dialogs/endpoint-installation/endpoint-installation.component';
import { ExtensionsServiceEndpointItem } from '@streampipes/platform-services';
import { Router } from '@angular/router';
@@ -45,7 +44,6 @@ export class AddComponent implements OnInit {
selectedTab: string;
availableTypes: string[] = ['all', 'set', 'stream', 'sepa', 'action'];
- selectedCategoryIndex = 0;
selectedCategory = 'all';
selectedEndpointItems: any[] = [];
@@ -92,12 +90,6 @@ export class AddComponent implements OnInit {
}
}
- setSelectedTab(index: number) {
- this.selectedEndpointItems = [];
- this.selectAll(false);
- this.selectedTab = this.availableTypes[index];
- }
-
isSelected(endpointItem) {
return endpointItem.selected;
}
@@ -124,21 +116,6 @@ export class AddComponent implements OnInit {
this.changeDetectorRef.detectChanges();
}
- showManageRdfEndpointsDialog() {
- const dialogRef: DialogRef<AddEndpointComponent> =
- this.dialogService.open(AddEndpointComponent, {
- panelType: PanelType.STANDARD_PANEL,
- title: 'Manage Endpoints',
- width: '70vw',
- data: {},
- });
- dialogRef.afterClosed().subscribe(data => {
- if (data) {
- this.getEndpointItems();
- }
- });
- }
-
getEndpointItems() {
this.endpointItemsLoadingComplete = false;
this.addService.getRdfEndpointItems().subscribe(endpointItems => {
@@ -211,9 +188,4 @@ export class AddComponent implements OnInit {
get selectedInstallationStatus(): string {
return this._selectedInstallationStatus;
}
-
- navigateTo(routeId: string): void {
- this.router.navigate(['add', routeId]);
- this.activeLink = routeId;
- }
}
diff --git a/ui/src/app/add/add.module.ts b/ui/src/app/add/add.module.ts
index edcc92a1f4..baef466d46 100644
--- a/ui/src/app/add/add.module.ts
+++ b/ui/src/app/add/add.module.ts
@@ -28,7 +28,6 @@ import { MatProgressSpinnerModule } from
'@angular/material/progress-spinner';
import { PipelineElementTypeFilter } from
'./filter/pipeline-element-type.pipe';
import { EndpointItemComponent } from
'./components/endpoint-item/endpoint-item.component';
import { AddService } from './services/add.service';
-import { AddEndpointComponent } from
'./dialogs/add-endpoint/add-endpoint.component';
import { OrderByPipe } from './filter/order-by.pipe';
import { EndpointInstallationComponent } from
'./dialogs/endpoint-installation/endpoint-installation.component';
import { PipelineElementNameFilter } from
'./filter/pipeline-element-name.pipe';
@@ -60,7 +59,6 @@ import { SharedUiModule } from
'../../../projects/streampipes/shared-ui/src/lib/
],
declarations: [
AddComponent,
- AddEndpointComponent,
EndpointInstallationComponent,
EndpointItemComponent,
OrderByPipe,
diff --git a/ui/src/app/add/dialogs/add-endpoint/add-endpoint.component.html
b/ui/src/app/add/dialogs/add-endpoint/add-endpoint.component.html
deleted file mode 100644
index a67ac94208..0000000000
--- a/ui/src/app/add/dialogs/add-endpoint/add-endpoint.component.html
+++ /dev/null
@@ -1,111 +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.
- ~
- -->
-
-<div class="sp-dialog-container">
- <div class="sp-dialog-content p-15">
- <h5><b>Existing Endpoints</b></h5>
- <div>
- <div
- *ngFor="
- let rdfEndpoint of rdfEndpoints
- | orderBy: 'asc' : 'endpointUrl'
- "
- >
- <div
- layout="row"
- class="md-with-secondary"
- *ngIf="rdfEndpoint._id !== undefined"
- >
- <div
- class="md-list-item-text"
- fxFlex="80"
- fxLayout="column"
- >
- {{ rdfEndpoint.endpointUrl }}
- </div>
- <div
- class="md-list-item-text"
- fxFlex="20"
- fxLayout="column"
- >
- <button
- mat-button
- mat-flat-button
- (click)="removeRdfEndpoint(rdfEndpoint._id)"
- >
- <mat-icon color="accent">delete</mat-icon>
- </button>
- </div>
- </div>
- </div>
- <mat-divider></mat-divider>
- <div *ngIf="addSelected">
- <div fxLayout="row" class="md-with-secondary">
- <div
- class="md-list-item-text"
- fxFlex="80"
- fxLayout="column"
- >
- <mat-form-field>
- <mat-label>Endpoint URL</mat-label>
- <input
- matInput
- type="text"
- [(ngModel)]="newEndpoint.endpointUrl"
- />
- </mat-form-field>
- </div>
- <div
- class="md-list-item-text"
- fxFlex="20"
- fxlayout="column"
- >
- <button
- mat-button
- mat-flat-button
- (click)="addRdfEndpoint(newEndpoint)"
- >
- <mat-icon>save</mat-icon>
- </button>
- </div>
- </div>
- </div>
- </div>
- <div style="margin-top: 10px">
- <button
- mat-button
- mat-raised-button
- color="accent"
- (click)="showAddInput()"
- >
- Add Endpoint
- </button>
- </div>
- </div>
- <mat-divider></mat-divider>
- <div class="sp-dialog-actions actions-align-right">
- <button
- mat-button
- mat-raised-button
- class="mat-basic"
- (click)="close()"
- >
- Close
- </button>
- </div>
-</div>
diff --git a/ui/src/app/add/dialogs/add-endpoint/add-endpoint.component.scss
b/ui/src/app/add/dialogs/add-endpoint/add-endpoint.component.scss
deleted file mode 100644
index fddade7bf6..0000000000
--- a/ui/src/app/add/dialogs/add-endpoint/add-endpoint.component.scss
+++ /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.
- *
- */
-
-@import '../../../../scss/sp/sp-dialog.scss';
diff --git a/ui/src/app/add/dialogs/add-endpoint/add-endpoint.component.ts
b/ui/src/app/add/dialogs/add-endpoint/add-endpoint.component.ts
deleted file mode 100644
index d8d52bbd0e..0000000000
--- a/ui/src/app/add/dialogs/add-endpoint/add-endpoint.component.ts
+++ /dev/null
@@ -1,76 +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, OnInit } from '@angular/core';
-import { AddService } from '../../services/add.service';
-import { DialogRef } from '@streampipes/shared-ui';
-
-@Component({
- selector: 'sp-add-endpoint-dialog',
- templateUrl: './add-endpoint.component.html',
- styleUrls: ['./add-endpoint.component.scss'],
-})
-export class AddEndpointComponent implements OnInit {
- rdfEndpoints: any;
- addSelected: any;
- newEndpoint: any;
-
- endpointsChanged = false;
-
- constructor(
- private addService: AddService,
- private dialogRef: DialogRef<AddEndpointComponent>,
- ) {
- this.rdfEndpoints = [];
- this.addSelected = false;
- this.newEndpoint = {};
- }
-
- ngOnInit() {
- this.loadRdfEndpoints();
- }
-
- showAddInput() {
- this.addSelected = true;
- }
-
- loadRdfEndpoints() {
- this.addService.getRdfEndpoints().subscribe(rdfEndpoints => {
- this.rdfEndpoints = rdfEndpoints;
- });
- }
-
- addRdfEndpoint(rdfEndpoint) {
- console.log(rdfEndpoint);
- this.addService.addRdfEndpoint(rdfEndpoint).subscribe(() => {
- this.loadRdfEndpoints();
- this.endpointsChanged = true;
- });
- }
-
- removeRdfEndpoint(rdfEndpointId) {
- this.addService.removeRdfEndpoint(rdfEndpointId).subscribe(() => {
- this.loadRdfEndpoints();
- this.endpointsChanged = true;
- });
- }
-
- close() {
- this.dialogRef.close(this.endpointsChanged);
- }
-}
diff --git a/ui/src/app/add/services/add.service.ts
b/ui/src/app/add/services/add.service.ts
index 225db527ed..f49b7c259e 100644
--- a/ui/src/app/add/services/add.service.ts
+++ b/ui/src/app/add/services/add.service.ts
@@ -32,12 +32,6 @@ export class AddService {
private platformServicesCommons: PlatformServicesCommons,
) {}
- getRdfEndpoints(): Observable<any> {
- return this.http.get(
- this.platformServicesCommons.apiBasePath + '/rdfendpoints',
- );
- }
-
getRdfEndpointItems(): Observable<ExtensionsServiceEndpointItem[]> {
return this.http
.get(
@@ -53,21 +47,6 @@ export class AddService {
);
}
- addRdfEndpoint(rdfEndpoint): Observable<any> {
- return this.http.post(
- this.platformServicesCommons.apiBasePath + '/rdfendpoints',
- rdfEndpoint,
- );
- }
-
- removeRdfEndpoint(rdfEndpointId): Observable<any> {
- return this.http.delete(
- this.platformServicesCommons.apiBasePath +
- '/rdfendpoints/' +
- rdfEndpointId,
- );
- }
-
getRdfEndpointIcon(item: ExtensionsServiceEndpointItem): Observable<any> {
return this.http.post(
this.platformServicesCommons.apiBasePath +