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 2026/10/02 08:11:19 UTC
(streampipes) branch dev updated: chore(deps): Remove getting started tutorials since they relied on shepherd.js (#4993)
This is an automated email from the ASF dual-hosted git repository.
tenthe pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/streampipes.git
The following commit(s) were added to refs/heads/dev by this push:
new 7889b4ec38 chore(deps): Remove getting started tutorials since they relied on shepherd.js (#4993)
7889b4ec38 is described below
commit 7889b4ec38dd1464937f27c38dc7ef98e60cba1a
Author: dependabot[bot] <49...@users.noreply.github.com>
AuthorDate: Fri Oct 2 10:11:13 2026 +0200
chore(deps): Remove getting started tutorials since they relied on shepherd.js (#4993)
Signed-off-by: dependabot[bot] <su...@github.com>
Co-authored-by: dependabot[bot] <49...@users.noreply.github.com>
Co-authored-by: Philipp Zehnder <te...@users.noreply.github.com>
---
.../rest/impl/pe/DataProcessorResource.java | 6 +-
.../streampipes/rest/impl/pe/DataSinkResource.java | 6 +-
.../rest/impl/pe/DataStreamResource.java | 12 +-
.../PipelineElementResourceAuthorizationTest.java | 129 +++++++
.../userManagement/addUserAdmin.smoke.spec.ts | 3 -
ui/deployment/i18n/de.json | 4 -
ui/deployment/i18n/en.json | 4 -
ui/deployment/i18n/pl.json | 4 -
ui/package-lock.json | 49 ---
ui/package.json | 1 -
.../adapter-catalog-item.component.ts | 6 +-
.../adapter-configuration.component.ts | 4 -
.../event-property-row.component.ts | 3 -
.../event-property-scope.component.ts | 5 -
.../configure-schema/configure-schema.component.ts | 5 -
.../start-adapter-configuration.component.html | 1 -
.../start-adapter-configuration.component.ts | 14 -
.../existing-adapters.component.html | 13 -
.../existing-adapters.component.ts | 18 +-
.../adapter-started-dialog.component.ts | 3 -
.../edit-schema-transformation.component.ts | 2 -
.../edit-event-property.component.ts | 3 -
.../components/pipeline/pipeline.component.ts | 7 -
.../editor/dialog/customize/customize.component.ts | 10 -
.../missing-elements-for-tutorial.component.html | 55 ---
.../missing-elements-for-tutorial.component.ts | 53 ---
ui/src/app/editor/editor.component.html | 1 -
.../welcome-tour/welcome-tour.component.html | 96 -----
.../welcome-tour/welcome-tour.component.scss | 50 ---
.../dialog/welcome-tour/welcome-tour.component.ts | 207 -----------
ui/src/app/home/home.component.ts | 409 +++++++++------------
ui/src/app/pipelines/pipelines.component.html | 12 -
ui/src/app/pipelines/pipelines.component.ts | 23 +-
ui/src/app/services/tour/adapter-tour.constants.ts | 169 ---------
.../tour/create-pipeline-tour.constants.ts | 168 ---------
.../app/services/tour/dashboard-tour.constants.ts | 87 -----
ui/src/app/services/tour/shepherd.service.ts | 213 -----------
ui/src/app/services/tour/tour-provider.service.ts | 57 ---
ui/src/scss/main.scss | 3 -
ui/src/scss/sp/shepherd-new.scss | 240 ------------
40 files changed, 329 insertions(+), 1826 deletions(-)
diff --git a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataProcessorResource.java b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataProcessorResource.java
index 925014ba94..847c704a10 100644
--- a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataProcessorResource.java
+++ b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataProcessorResource.java
@@ -70,14 +70,16 @@ public class DataProcessorResource extends AbstractAuthGuardedRestResource {
}
@DeleteMapping(path = "/{elementId}", produces = MediaType.APPLICATION_JSON_VALUE)
- @PreAuthorize(AuthConstants.HAS_WRITE_PIPELINE_ELEMENT_PRIVILEGE)
+ @PreAuthorize(AuthConstants.HAS_WRITE_PIPELINE_ELEMENT_PRIVILEGE
+ + " and hasPermission(#elementId, 'WRITE')")
public ResponseEntity<Message> removeOwn(@PathVariable("elementId") String elementId) {
dataProcessorResourceManager.delete(elementId);
return constructSuccessMessage(NotificationType.STORAGE_SUCCESS.uiNotification());
}
@GetMapping(path = "/{elementId}", produces = MediaType.APPLICATION_JSON_VALUE)
- @PreAuthorize(AuthConstants.HAS_READ_PIPELINE_ELEMENT_PRIVILEGE)
+ @PreAuthorize(AuthConstants.HAS_READ_PIPELINE_ELEMENT_PRIVILEGE
+ + " and hasPermission(#elementId, 'READ')")
public ResponseEntity<?> getElement(@PathVariable("elementId") String elementId) {
try {
return ok(dataProcessorResourceManager.findAsInvocation(elementId));
diff --git a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataSinkResource.java b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataSinkResource.java
index a2567e5ef9..164803e5bc 100644
--- a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataSinkResource.java
+++ b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataSinkResource.java
@@ -68,14 +68,16 @@ public class DataSinkResource extends AbstractAuthGuardedRestResource {
}
@DeleteMapping(path = "/{elementId}", produces = MediaType.APPLICATION_JSON_VALUE)
- @PreAuthorize(AuthConstants.HAS_WRITE_PIPELINE_ELEMENT_PRIVILEGE)
+ @PreAuthorize(AuthConstants.HAS_WRITE_PIPELINE_ELEMENT_PRIVILEGE
+ + " and hasPermission(#elementId, 'WRITE')")
public ResponseEntity<Message> removeOwn(@PathVariable("elementId") String elementId) {
dataSinkResourceManager.delete(elementId);
return constructSuccessMessage(NotificationType.STORAGE_SUCCESS.uiNotification());
}
@GetMapping(path = "/{elementId}", produces = MediaType.APPLICATION_JSON_VALUE)
- @PreAuthorize(AuthConstants.HAS_READ_PIPELINE_ELEMENT_PRIVILEGE)
+ @PreAuthorize(AuthConstants.HAS_READ_PIPELINE_ELEMENT_PRIVILEGE
+ + " and hasPermission(#elementId, 'READ')")
public ResponseEntity<?> getElement(@PathVariable("elementId") String elementId) {
try {
return ok(dataSinkResourceManager.findAsInvocation(elementId));
diff --git a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataStreamResource.java b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataStreamResource.java
index 1080571485..f7063bff4e 100644
--- a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataStreamResource.java
+++ b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/pe/DataStreamResource.java
@@ -83,7 +83,8 @@ public class DataStreamResource extends AbstractAuthGuardedRestResource {
}
@DeleteMapping(path = "/{elementId}", produces = MediaType.APPLICATION_JSON_VALUE)
- @PreAuthorize(AuthConstants.HAS_WRITE_PIPELINE_ELEMENT_PRIVILEGE)
+ @PreAuthorize(AuthConstants.HAS_WRITE_PIPELINE_ELEMENT_PRIVILEGE
+ + " and hasPermission(#elementId, 'WRITE')")
public ResponseEntity<Message> delete(@PathVariable("elementId") String elementId) {
dataStreamResourceManager.delete(elementId);
publishEvent(new DataStreamDeletedEvent(elementId));
@@ -91,7 +92,8 @@ public class DataStreamResource extends AbstractAuthGuardedRestResource {
}
@GetMapping(path = "/{elementId}", produces = MediaType.APPLICATION_JSON_VALUE)
- @PreAuthorize(AuthConstants.HAS_READ_PIPELINE_ELEMENT_PRIVILEGE)
+ @PreAuthorize(AuthConstants.HAS_READ_PIPELINE_ELEMENT_PRIVILEGE
+ + " and hasPermission(#elementId, 'READ')")
public ResponseEntity<?> getElement(@PathVariable("elementId") String elementId) {
try {
return ok(dataStreamResourceManager.findAsInvocation(elementId));
@@ -101,7 +103,8 @@ public class DataStreamResource extends AbstractAuthGuardedRestResource {
}
@PutMapping(path = "/{elementId}", produces = MediaType.APPLICATION_JSON_VALUE)
- @PreAuthorize(AuthConstants.HAS_WRITE_PIPELINE_ELEMENT_PRIVILEGE)
+ @PreAuthorize(AuthConstants.HAS_WRITE_PIPELINE_ELEMENT_PRIVILEGE
+ + " and hasPermission(#elementId, 'WRITE')")
public ResponseEntity<Message> update(@PathVariable("elementId") String elementId,
@RequestBody SpDataStream updatedElement) throws HttpResponseException {
if (!elementId.equals(updatedElement.getElementId())) {
@@ -119,7 +122,8 @@ public class DataStreamResource extends AbstractAuthGuardedRestResource {
produces = MediaType.APPLICATION_JSON_VALUE,
consumes = MediaType.APPLICATION_JSON_VALUE
)
- @PreAuthorize(AuthConstants.HAS_WRITE_PIPELINE_ELEMENT_PRIVILEGE)
+ @PreAuthorize(AuthConstants.HAS_WRITE_PIPELINE_ELEMENT_PRIVILEGE
+ + " and hasPermission(#updatedElement.elementId, 'WRITE')")
public ResponseEntity<List<PipelineUpdateInfo>> performPipelineMigrationPreflight(
@RequestBody SpDataStream updatedElement) {
return ok(dataStreamUpdateManagement.checkPipelineMigrations(updatedElement));
diff --git a/streampipes-rest/src/test/java/org/apache/streampipes/rest/impl/pe/PipelineElementResourceAuthorizationTest.java b/streampipes-rest/src/test/java/org/apache/streampipes/rest/impl/pe/PipelineElementResourceAuthorizationTest.java
new file mode 100644
index 0000000000..0dcabfa462
--- /dev/null
+++ b/streampipes-rest/src/test/java/org/apache/streampipes/rest/impl/pe/PipelineElementResourceAuthorizationTest.java
@@ -0,0 +1,129 @@
+/*
+ * 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.rest.impl.pe;
+
+import org.apache.streampipes.model.SpDataStream;
+import org.apache.streampipes.model.client.user.DefaultPrivilege;
+
+import org.junit.jupiter.api.Test;
+import org.springframework.security.access.PermissionEvaluator;
+import org.springframework.security.access.expression.ExpressionUtils;
+import org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.authority.SimpleGrantedAuthority;
+import org.springframework.security.util.SimpleMethodInvocation;
+
+import java.lang.reflect.Method;
+import java.util.List;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+/**
+ * Evaluates the {@link PreAuthorize} expressions of the single-element handlers with the
+ * Spring Security expression handler, so that the object permission of the addressed
+ * element is required in addition to the general pipeline element privilege.
+ */
+class PipelineElementResourceAuthorizationTest {
+
+ private static final String ELEMENT_ID = "sp:spdatastream:element-a";
+
+ private record Handler(Method method, Object[] args, String privilege, String permission) {
+ }
+
+ private static List<Handler> handlers() throws NoSuchMethodException {
+ var read = DefaultPrivilege.Constants.PRIVILEGE_READ_PIPELINE_ELEMENT_VALUE;
+ var write = DefaultPrivilege.Constants.PRIVILEGE_WRITE_PIPELINE_ELEMENT_VALUE;
+ var stream = new SpDataStream();
+ stream.setElementId(ELEMENT_ID);
+
+ return List.of(
+ new Handler(DataStreamResource.class.getMethod("getElement", String.class),
+ new Object[]{ELEMENT_ID}, read, "READ"),
+ new Handler(DataStreamResource.class.getMethod("delete", String.class),
+ new Object[]{ELEMENT_ID}, write, "WRITE"),
+ new Handler(DataStreamResource.class.getMethod("update", String.class, SpDataStream.class),
+ new Object[]{ELEMENT_ID, stream}, write, "WRITE"),
+ new Handler(DataStreamResource.class.getMethod("performPipelineMigrationPreflight", SpDataStream.class),
+ new Object[]{stream}, write, "WRITE"),
+ new Handler(DataProcessorResource.class.getMethod("getElement", String.class),
+ new Object[]{ELEMENT_ID}, read, "READ"),
+ new Handler(DataProcessorResource.class.getMethod("removeOwn", String.class),
+ new Object[]{ELEMENT_ID}, write, "WRITE"),
+ new Handler(DataSinkResource.class.getMethod("getElement", String.class),
+ new Object[]{ELEMENT_ID}, read, "READ"),
+ new Handler(DataSinkResource.class.getMethod("removeOwn", String.class),
+ new Object[]{ELEMENT_ID}, write, "WRITE")
+ );
+ }
+
+ @Test
+ void deniesUserWithPrivilegeButWithoutObjectPermission() throws Exception {
+ for (var handler : handlers()) {
+ var evaluator = mock(PermissionEvaluator.class);
+ when(evaluator.hasPermission(any(), any(), any())).thenReturn(false);
+
+ assertFalse(evaluate(handler, evaluator, handler.privilege()), handler.method().toString());
+ verify(evaluator).hasPermission(any(Authentication.class), eq(ELEMENT_ID), eq(handler.permission()));
+ }
+ }
+
+ @Test
+ void allowsUserWithPrivilegeAndObjectPermission() throws Exception {
+ for (var handler : handlers()) {
+ var evaluator = mock(PermissionEvaluator.class);
+ when(evaluator.hasPermission(any(), eq(ELEMENT_ID), eq(handler.permission()))).thenReturn(true);
+
+ assertTrue(evaluate(handler, evaluator, handler.privilege()), handler.method().toString());
+ }
+ }
+
+ @Test
+ void deniesUserWithObjectPermissionButWithoutPrivilege() throws Exception {
+ for (var handler : handlers()) {
+ var evaluator = mock(PermissionEvaluator.class);
+ when(evaluator.hasPermission(any(), any(), any())).thenReturn(true);
+
+ assertFalse(evaluate(handler, evaluator, "PRIVILEGE_UNRELATED"), handler.method().toString());
+ }
+ }
+
+ private static boolean evaluate(Handler handler,
+ PermissionEvaluator evaluator,
+ String authority) {
+ var expressionHandler = new DefaultMethodSecurityExpressionHandler();
+ expressionHandler.setPermissionEvaluator(evaluator);
+
+ Authentication auth = new UsernamePasswordAuthenticationToken(
+ "user", "n/a", List.of(new SimpleGrantedAuthority(authority)));
+ var invocation = new SimpleMethodInvocation(null, handler.method(), handler.args());
+ var context = expressionHandler.createEvaluationContext(() -> auth, invocation);
+ var expression = expressionHandler.getExpressionParser()
+ .parseExpression(handler.method().getAnnotation(PreAuthorize.class).value());
+
+ return ExpressionUtils.evaluateAsBoolean(expression, context);
+ }
+}
diff --git a/ui/cypress/tests/userManagement/addUserAdmin.smoke.spec.ts b/ui/cypress/tests/userManagement/addUserAdmin.smoke.spec.ts
index 03e605b6f4..a265008094 100644
--- a/ui/cypress/tests/userManagement/addUserAdmin.smoke.spec.ts
+++ b/ui/cypress/tests/userManagement/addUserAdmin.smoke.spec.ts
@@ -52,9 +52,6 @@ describe('Test User Management', () => {
// Login as user
UserUtils.switchUser(user);
- UserUtils.goToUserConfiguration();
- cy.dataCy('close-tutorial-button').click();
-
UserUtils.switchUser(UserUtils.adminUser);
UserUtils.goToUserConfiguration();
diff --git a/ui/deployment/i18n/de.json b/ui/deployment/i18n/de.json
index 63e6cf43aa..9cae1c90eb 100644
--- a/ui/deployment/i18n/de.json
+++ b/ui/deployment/i18n/de.json
@@ -584,7 +584,6 @@
"Inspect currently registered extensions services": "Derzeit registrierte Extensions überprüfen",
"Install": "Installieren",
"Install selected": "Ausgewählte installieren",
- "Install the following pipeline elements and start the tutorial again:": "Installieren Sie die folgenden Pipeline-Elemente und starten Sie das Lernprogramm erneut:",
"Install, update, or remove extensions for this installation.": "Installieren, aktualisieren oder entfernen Sie Extensions für diese Installation.",
"Installation": "Installation",
"Installed": "Installiert",
@@ -1194,7 +1193,6 @@
"The input data stream does not satisfy the requirements specified by the data processor.": "Der Eingabedatenstrom erfüllt nicht die vom Datenprozessor festgelegten Anforderungen.",
"The original event is used without transformation. Your script is preserved.": "Das Originalereignis wird ohne Transformation verwendet. Ihr Skript bleibt erhalten.",
"The timestamp must be a UNIX timestamp in milliseconds. Edit the timestamp field or add an ingestion timestamp.": "Der Zeitstempel muss einem UNIX-Zeitstempel in Millisekunden entsprechen. Zeitstempelfeld markieren oder einen Zeitstempel im Skripteditor hinzufügen.",
- "The tutorial requires pipeline elements that are not yet installed.": "Für das Lernprogramm werden Pipeline-Elemente benötigt, die noch nicht installiert sind.",
"The value should be a number": "Der Wert sollte eine Zahl sein",
"There was an error while guessing the schema of your configured data stream": "Beim Erkennen des Schemas der Datenquelle ist ein Fehler aufgetreten",
"There was an error while resetting your password.": "Beim Zurücksetzen Ihres Passworts ist ein Fehler aufgetreten.",
@@ -1263,8 +1261,6 @@
"Trust": "Vertrauen",
"Try again": "Erneut versuchen",
"Trying to send test mail...": "Test-Mail wird versendet...",
- "Tutorial": "Einführung",
- "Tutorial: Generic Adapter": "Einführung: Generischer Adapter",
"Type": "Typ",
"Typography": "Typografie",
"URL": "URL",
diff --git a/ui/deployment/i18n/en.json b/ui/deployment/i18n/en.json
index 9f6674d4e6..e10c091e91 100644
--- a/ui/deployment/i18n/en.json
+++ b/ui/deployment/i18n/en.json
@@ -584,7 +584,6 @@
"Inspect currently registered extensions services": null,
"Install": null,
"Install selected": null,
- "Install the following pipeline elements and start the tutorial again:": null,
"Install, update, or remove extensions for this installation.": null,
"Installation": null,
"Installed": null,
@@ -1194,7 +1193,6 @@
"The input data stream does not satisfy the requirements specified by the data processor.": null,
"The original event is used without transformation. Your script is preserved.": null,
"The timestamp must be a UNIX timestamp in milliseconds. Edit the timestamp field or add an ingestion timestamp.": null,
- "The tutorial requires pipeline elements that are not yet installed.": null,
"The value should be a number": null,
"There was an error while guessing the schema of your configured data stream": null,
"There was an error while resetting your password.": null,
@@ -1263,8 +1261,6 @@
"Trust": null,
"Try again": null,
"Trying to send test mail...": null,
- "Tutorial": null,
- "Tutorial: Generic Adapter": null,
"Type": null,
"Typography": null,
"URL": null,
diff --git a/ui/deployment/i18n/pl.json b/ui/deployment/i18n/pl.json
index fb23795710..af93780d27 100644
--- a/ui/deployment/i18n/pl.json
+++ b/ui/deployment/i18n/pl.json
@@ -584,7 +584,6 @@
"Inspect currently registered extensions services": "Sprawdź obecnie zarejestrowane usługi rozszerzeń",
"Install": "Zainstaluj",
"Install selected": "Zainstaluj wybrane",
- "Install the following pipeline elements and start the tutorial again:": "Zainstaluj następujące elementy strumienia i uruchom samouczek ponownie:",
"Install, update, or remove extensions for this installation.": "Instaluj, aktualizuj lub usuwaj rozszerzenia dla tej instalacji.",
"Installation": "Instalacja",
"Installed": "Zainstalowane",
@@ -1194,7 +1193,6 @@
"The input data stream does not satisfy the requirements specified by the data processor.": "Strumień danych wejściowych nie spełnia wymagań określonych przez procesor danych.",
"The original event is used without transformation. Your script is preserved.": "Oryginalne zdarzenie jest używane bez przekształcania. Skrypt zostaje zachowany.",
"The timestamp must be a UNIX timestamp in milliseconds. Edit the timestamp field or add an ingestion timestamp.": "Znacznik czasu musi być znacznikiem UNIX w milisekundach. Edytuj pole znacznika czasu lub dodaj znacznik czasu konsumowania zdarzenia.",
- "The tutorial requires pipeline elements that are not yet installed.": "Samouczek wymaga elementów strumienia, które nie są jeszcze zainstalowane.",
"The value should be a number": "Wartość powinna być liczbą",
"There was an error while guessing the schema of your configured data stream": "Wystąpił błąd podczas rozpoznawania schematu skonfigurowanego strumień danych",
"There was an error while resetting your password.": "Wystąpił błąd podczas resetowania hasła.",
@@ -1263,8 +1261,6 @@
"Trust": "Zaufaj",
"Try again": "Spróbuj ponownie",
"Trying to send test mail...": "Próba wysłania wiadomości testowej...",
- "Tutorial": "Samouczek",
- "Tutorial: Generic Adapter": "Samouczek: adapter ogólny",
"Type": "Typ",
"Typography": "Typografia",
"URL": "URL",
diff --git a/ui/package-lock.json b/ui/package-lock.json
index fc109ced1a..0b749774e6 100644
--- a/ui/package-lock.json
+++ b/ui/package-lock.json
@@ -58,7 +58,6 @@
"quill": "^2.0.3",
"roboto-fontface": "0.10.0",
"rxjs": "^7.8.2",
- "shepherd.js": "13.0.3",
"stream-browserify": "3.0.0",
"supercluster": "^9.1.0",
"swagger-ui-dist": "5.32.15",
@@ -2493,31 +2492,6 @@
}
}
},
- "node_modules/@floating-ui/core": {
- "version": "1.8.0",
- "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.8.0.tgz",
- "integrity": "sha512-0CIZ5itps/8x7BG8dEIhs53BvCUH2PCoogtakwRTut+Arm58sJooJ0AuZhLw2HJYIR5cMLNPBSS728sPho2khQ==",
- "license": "MIT",
- "dependencies": {
- "@floating-ui/utils": "^0.2.12"
- }
- },
- "node_modules/@floating-ui/dom": {
- "version": "1.8.0",
- "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.8.0.tgz",
- "integrity": "sha512-yXSrzeHZBTZadLOlfyhCkJHNeLJnHRnRInwdZ40L7ZiaAtrBwoYlsDrX3v5zB1Utk7CLfzcOVnVVWoXEky7Ceg==",
- "license": "MIT",
- "dependencies": {
- "@floating-ui/core": "^1.8.0",
- "@floating-ui/utils": "^0.2.12"
- }
- },
- "node_modules/@floating-ui/utils": {
- "version": "0.2.12",
- "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.12.tgz",
- "integrity": "sha512-HpCo8tmWzLVad5s2d19EhAz5zqrrQ6s69qd6moPMQvkOuSwDT1YgRfWSVuc4ennqrgv3OHppiOGMQ7oC13yIww==",
- "license": "MIT"
- },
"node_modules/@fortawesome/fontawesome-free": {
"version": "7.3.1",
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-7.3.1.tgz",
@@ -7499,15 +7473,6 @@
"node": ">= 6"
}
},
- "node_modules/deepmerge-ts": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-5.1.0.tgz",
- "integrity": "sha512-eS8dRJOckyo9maw9Tu5O5RUi/4inFLrnoLkBe3cPfDMx3WZioXtmOew4TXQaxq7Rhl4xjDtR7c6x8nNTxOvbFw==",
- "license": "BSD-3-Clause",
- "engines": {
- "node": ">=16.0.0"
- }
- },
"node_modules/delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
@@ -12691,20 +12656,6 @@
"node": ">=8"
}
},
- "node_modules/shepherd.js": {
- "version": "13.0.3",
- "resolved": "https://registry.npmjs.org/shepherd.js/-/shepherd.js-13.0.3.tgz",
- "integrity": "sha512-1lQtQUNQYi+8k9BAmbUZh7D2QxFfkxiWKU0XFTbzYaIrCkB4nR0DLQuarH5G7Ym6L8wfbadxP3hJhZ2HzVktaA==",
- "license": "MIT",
- "dependencies": {
- "@floating-ui/dom": "^1.6.5",
- "@scarf/scarf": "^1.3.0",
- "deepmerge-ts": "^5.1.0"
- },
- "engines": {
- "node": "18.* || >= 20"
- }
- },
"node_modules/side-channel": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.1.tgz",
diff --git a/ui/package.json b/ui/package.json
index b17d711ad6..5b570cea8d 100644
--- a/ui/package.json
+++ b/ui/package.json
@@ -79,7 +79,6 @@
"quill": "^2.0.3",
"roboto-fontface": "0.10.0",
"rxjs": "^7.8.2",
- "shepherd.js": "13.0.3",
"supercluster": "^9.1.0",
"stream-browserify": "3.0.0",
"swagger-ui-dist": "5.32.15",
diff --git a/ui/src/app/connect/components/adapter-catalog/adapter-description/adapter-catalog-item.component.ts b/ui/src/app/connect/components/adapter-catalog/adapter-description/adapter-catalog-item.component.ts
index c43b7299cc..08e71deac6 100644
--- a/ui/src/app/connect/components/adapter-catalog/adapter-description/adapter-catalog-item.component.ts
+++ b/ui/src/app/connect/components/adapter-catalog/adapter-description/adapter-catalog-item.component.ts
@@ -32,7 +32,6 @@ import { DomSanitizer, SafeUrl } from '@angular/platform-browser';
import { DialogService, PanelType } from '@streampipes/shared-ui';
import { SpAdapterDocumentationDialogComponent } from '../../../dialog/adapter-documentation/adapter-documentation-dialog.component';
import { Router } from '@angular/router';
-import { ShepherdService } from '../../../../services/tour/shepherd.service';
import { MatButton } from '@angular/material/button';
import { MatTooltip } from '@angular/material/tooltip';
import { MatIcon } from '@angular/material/icon';
@@ -50,7 +49,6 @@ export class AdapterCatalogItemComponent implements OnInit {
private sanitizer = inject(DomSanitizer);
private dialogService = inject(DialogService);
private router = inject(Router);
- private shepherdService = inject(ShepherdService);
@Input()
adapter: AdapterDescription | AdapterSummaryDto;
@@ -75,9 +73,7 @@ export class AdapterCatalogItemComponent implements OnInit {
}
selectAdapter(appId: string) {
- this.router.navigate(['connect', 'create', appId]).then(() => {
- this.shepherdService.trigger('new-adapter-selected');
- });
+ this.router.navigate(['connect', 'create', appId]);
}
openDocumentation(event: MouseEvent): void {
diff --git a/ui/src/app/connect/components/adapter-configuration/adapter-configuration.component.ts b/ui/src/app/connect/components/adapter-configuration/adapter-configuration.component.ts
index 77cd1c0e8b..30add9c692 100644
--- a/ui/src/app/connect/components/adapter-configuration/adapter-configuration.component.ts
+++ b/ui/src/app/connect/components/adapter-configuration/adapter-configuration.component.ts
@@ -31,7 +31,6 @@ import {
PipelineElementAssetService,
SpAssetTreeNode,
} from '@streampipes/platform-services';
-import { ShepherdService } from '../../../services/tour/shepherd.service';
import { Router } from '@angular/router';
import { TranslatePipe, TranslateService } from '@ngx-translate/core';
import { AdapterConfigurationStateService } from './adapter-configuration-state-service/adapter-configuration-state.service';
@@ -85,7 +84,6 @@ import { DeleteAdapterDialogComponent } from '../../dialog/delete-adapter-dialog
],
})
export class AdapterConfigurationComponent implements OnInit, OnDestroy {
- private shepherdService = inject(ShepherdService);
private router = inject(Router);
private translate = inject(TranslateService);
private stateService = inject(AdapterConfigurationStateService);
@@ -268,7 +266,6 @@ export class AdapterConfigurationComponent implements OnInit, OnDestroy {
this.stateService.state().adapterDescription ??
this.adapterDescription;
- this.shepherdService.trigger('specific-settings-next-button');
this.goForward();
this.stateService.updateAdapter(adapter);
@@ -295,7 +292,6 @@ export class AdapterConfigurationComponent implements OnInit, OnDestroy {
}
nextConfigureFields() {
- this.shepherdService.trigger('event-schema-next-button');
this.goForward();
}
diff --git a/ui/src/app/connect/components/adapter-configuration/configure-fields/event-property-row/event-property-row.component.ts b/ui/src/app/connect/components/adapter-configuration/configure-fields/event-property-row/event-property-row.component.ts
index 2aed1b24c6..7d466e9206 100644
--- a/ui/src/app/connect/components/adapter-configuration/configure-fields/event-property-row/event-property-row.component.ts
+++ b/ui/src/app/connect/components/adapter-configuration/configure-fields/event-property-row/event-property-row.component.ts
@@ -37,7 +37,6 @@ import {
} from '@streampipes/platform-services';
import { EditEventPropertyComponent } from '../../../../dialog/edit-event-property/edit-event-property.component';
import { DialogService, PanelType } from '@streampipes/shared-ui';
-import { ShepherdService } from '../../../../../services/tour/shepherd.service';
import {
FlexDirective,
LayoutAlignDirective,
@@ -69,7 +68,6 @@ import { TranslatePipe } from '@ngx-translate/core';
})
export class EventPropertyRowComponent implements OnInit {
private dialogService = inject(DialogService);
- private shepherdService = inject(ShepherdService);
@Input() eventProperty: EventProperty;
@@ -197,7 +195,6 @@ export class EventPropertyRowComponent implements OnInit {
originalProperty: this.originalProperty,
},
});
- this.shepherdService.trigger('adapter-edit-field-clicked');
dialogRef.afterClosed().subscribe(_ => {
this.timestampProperty = this.isTimestampProperty();
diff --git a/ui/src/app/connect/components/adapter-configuration/configure-fields/event-property-row/event-property-scope/event-property-scope.component.ts b/ui/src/app/connect/components/adapter-configuration/configure-fields/event-property-row/event-property-scope/event-property-scope.component.ts
index a80a920c0c..771421affb 100644
--- a/ui/src/app/connect/components/adapter-configuration/configure-fields/event-property-row/event-property-scope/event-property-scope.component.ts
+++ b/ui/src/app/connect/components/adapter-configuration/configure-fields/event-property-row/event-property-scope/event-property-scope.component.ts
@@ -19,7 +19,6 @@
import {
Component,
EventEmitter,
- inject,
Input,
OnInit,
Output,
@@ -35,7 +34,6 @@ import {
MatSelect,
MatSelectChange,
} from '@angular/material/select';
-import { ShepherdService } from '../../../../../../services/tour/shepherd.service';
import { MatFormField } from '@angular/material/form-field';
import { TranslatePipe } from '@ngx-translate/core';
@@ -52,8 +50,6 @@ type PropertyScope =
imports: [MatFormField, MatSelect, MatOption, TranslatePipe],
})
export class EventPropertyScopeComponent implements OnInit {
- private shepherdService = inject(ShepherdService);
-
@Input()
eventProperty: EventPropertyPrimitive;
@@ -97,7 +93,6 @@ export class EventPropertyScopeComponent implements OnInit {
this.eventProperty.runtimeType;
}
this.eventProperty.runtimeType = DataType.LONG;
- this.shepherdService.trigger('timestamp-property-selected');
} else {
if (this.currentScope === 'TIMESTAMP_PROPERTY') {
this.eventProperty.semanticType = undefined;
diff --git a/ui/src/app/connect/components/adapter-configuration/configure-schema/configure-schema.component.ts b/ui/src/app/connect/components/adapter-configuration/configure-schema/configure-schema.component.ts
index 5c8a29f9e8..be60807af1 100644
--- a/ui/src/app/connect/components/adapter-configuration/configure-schema/configure-schema.component.ts
+++ b/ui/src/app/connect/components/adapter-configuration/configure-schema/configure-schema.component.ts
@@ -48,7 +48,6 @@ import { SelectAdapterTransformationTemplateDialogComponent } from '../../../dia
import { Mode } from '../adapter-event-preview/adapter-event-preview.component';
import { MatDialog } from '@angular/material/dialog';
import { UploadSampleEventDialogComponent } from '../../../dialog/upload-sample-event-dialog/upload-sample-event-dialog.component';
-import { ShepherdService } from '../../../../services/tour/shepherd.service';
import {
FlexDirective,
LayoutAlignDirective,
@@ -93,7 +92,6 @@ export class ConfigureSchemaComponent implements OnInit {
private dialog = inject(MatDialog);
private dialogService = inject(DialogService);
private translateService = inject(TranslateService);
- private shepherdService = inject(ShepherdService);
@Input()
adapterDescription: AdapterDescription;
@@ -279,7 +277,6 @@ export class ConfigureSchemaComponent implements OnInit {
this.stateService.state().adapterDescription ??
this.adapterDescription,
);
- this.shepherdService.trigger('configure-schema-script-run');
}
openAdapterConfigurationChangedDialog(): void {
@@ -379,7 +376,6 @@ export class ConfigureSchemaComponent implements OnInit {
adapterDescription.transformationConfig.scriptActive = true;
this.stateService.updateAdapter(adapterDescription);
this.stateService.runScript(adapterDescription);
- this.shepherdService.trigger('configure-schema-script-enabled');
}
}
@@ -396,7 +392,6 @@ export class ConfigureSchemaComponent implements OnInit {
transformationConfigurationChanged:
transformationConfigurationChanged,
});
- this.shepherdService.trigger('configure-schema-next-button');
this.nextEmitter.emit();
}
diff --git a/ui/src/app/connect/components/adapter-configuration/start-adapter-configuration/start-adapter-configuration.component.html b/ui/src/app/connect/components/adapter-configuration/start-adapter-configuration/start-adapter-configuration.component.html
index 68c1ade0ee..ed81bf2876 100644
--- a/ui/src/app/connect/components/adapter-configuration/start-adapter-configuration/start-adapter-configuration.component.html
+++ b/ui/src/app/connect/components/adapter-configuration/start-adapter-configuration/start-adapter-configuration.component.html
@@ -33,7 +33,6 @@
[placeholder]="'Name' | translate"
data-cy="sp-adapter-name"
required
- (blur)="triggerTutorialAdapterNameAssigned()"
/>
@if (
startAdapterForm
diff --git a/ui/src/app/connect/components/adapter-configuration/start-adapter-configuration/start-adapter-configuration.component.ts b/ui/src/app/connect/components/adapter-configuration/start-adapter-configuration/start-adapter-configuration.component.ts
index 63bcc34a51..b7bbffb704 100644
--- a/ui/src/app/connect/components/adapter-configuration/start-adapter-configuration/start-adapter-configuration.component.ts
+++ b/ui/src/app/connect/components/adapter-configuration/start-adapter-configuration/start-adapter-configuration.component.ts
@@ -53,7 +53,6 @@ import {
SpSplitButtonAction,
SpSplitButtonComponent,
} from '@streampipes/shared-ui';
-import { ShepherdService } from '../../../../services/tour/shepherd.service';
import { TimestampPipe } from '../../../filter/timestamp.pipe';
import { ValidateName } from '../../../../core-ui/static-properties/input.validator';
import { TranslatePipe, TranslateService } from '@ngx-translate/core';
@@ -107,7 +106,6 @@ export class StartAdapterConfigurationComponent implements OnInit {
];
private dialogService = inject(DialogService);
- private shepherdService = inject(ShepherdService);
private formBuilder = inject(UntypedFormBuilder);
private timestampPipe = inject(TimestampPipe);
private translateService = inject(TranslateService);
@@ -232,7 +230,6 @@ export class StartAdapterConfigurationComponent implements OnInit {
}
public startAdapter(startAdapterNow: boolean) {
- this.shepherdService.trigger('adapter-settings-adapter-started');
const dialogRef = this.dialogService.open(AdapterStartedDialog, {
panelType: PanelType.STANDARD_PANEL,
title: this.translateService.instant('Adapter generation'),
@@ -317,16 +314,5 @@ export class StartAdapterConfigurationComponent implements OnInit {
handlePersistOption(selected: boolean) {
this.saveInDataLake = selected;
this.findDefaultTimestamp(selected);
- this.checkAndTriggerTutorial('adapter-persist-selected');
- }
-
- triggerTutorialAdapterNameAssigned() {
- this.checkAndTriggerTutorial('adapter-name-assigned');
- }
-
- checkAndTriggerTutorial(actionId: string) {
- if (this.adapterDescription.name === 'Tutorial') {
- this.shepherdService.trigger(actionId);
- }
}
}
diff --git a/ui/src/app/connect/components/existing-adapters/existing-adapters.component.html b/ui/src/app/connect/components/existing-adapters/existing-adapters.component.html
index c9743ae3f6..cfc81bae46 100644
--- a/ui/src/app/connect/components/existing-adapters/existing-adapters.component.html
+++ b/ui/src/app/connect/components/existing-adapters/existing-adapters.component.html
@@ -35,19 +35,6 @@
<mat-icon aria-hidden="true">add</mat-icon
>{{ 'New adapter' | translate }}
</button>
- <button
- pageActions
- type="button"
- mat-icon-button
- color="accent"
- id="startAdapterTutorial3"
- (click)="startAdapterTutorial()"
- [attr.aria-label]="'Tutorial: Generic Adapter' | translate"
- [matTooltip]="'Tutorial: Generic Adapter' | translate"
- [disabled]="tutorialActive"
- >
- <mat-icon aria-hidden="true">school</mat-icon>
- </button>
<button
pageActions
type="button"
diff --git a/ui/src/app/connect/components/existing-adapters/existing-adapters.component.ts b/ui/src/app/connect/components/existing-adapters/existing-adapters.component.ts
index 2847c704fa..2ae4ab693b 100644
--- a/ui/src/app/connect/components/existing-adapters/existing-adapters.component.ts
+++ b/ui/src/app/connect/components/existing-adapters/existing-adapters.component.ts
@@ -69,7 +69,6 @@ import { MatSort, MatSortHeader } from '@angular/material/sort';
import { Router } from '@angular/router';
import { SpConnectRoutes } from '../../connect.breadcrumb';
import { Subscription } from 'rxjs';
-import { ShepherdService } from '../../../services/tour/shepherd.service';
import { TranslatePipe, TranslateService } from '@ngx-translate/core';
import {
FlexDirective,
@@ -144,7 +143,6 @@ export class ExistingAdaptersComponent implements OnInit, OnDestroy {
new MatTableDataSource();
adapterMetrics: Record<string, SpMetricsEntry> = {};
- tutorialActive = false;
readonly bulkAdapterActionOptions: SpTableMultiActionOption[] = [
{ value: 'start', label: 'Start selected', icon: 'play_arrow' },
{ value: 'stop', label: 'Stop selected', icon: 'stop' },
@@ -152,7 +150,6 @@ export class ExistingAdaptersComponent implements OnInit, OnDestroy {
assetFilter$: Subscription;
user$: Subscription;
- tutorial$: Subscription;
currentFilterIds: Set<string> = new Set<string>();
startAdapterErrorText = 'Could not start adapter';
@@ -164,7 +161,6 @@ export class ExistingAdaptersComponent implements OnInit, OnDestroy {
private router = inject(Router);
private pipelineElementAssetService = inject(PipelineElementAssetService);
private breadcrumbService = inject(SpBreadcrumbService);
- private shepherdService = inject(ShepherdService);
private translate = inject(TranslateService);
private adapterMonitoringService = inject(AdapterMonitoringService);
private assetFilterService = inject(SpAssetBrowserService);
@@ -207,11 +203,6 @@ export class ExistingAdaptersComponent implements OnInit, OnDestroy {
this.user$ = this.currentUserService.user$.subscribe(_user => {
this.getAdaptersRunning();
});
- this.tutorial$ = this.shepherdService.tutorialActive$.subscribe(
- tutorialActive => {
- this.tutorialActive = tutorialActive;
- },
- );
}
startAdapter(adapter: AdapterSummaryDto): void {
@@ -485,14 +476,8 @@ export class ExistingAdaptersComponent implements OnInit, OnDestroy {
this.dataSource.data = this.filteredAdapters;
}
- startAdapterTutorial(): void {
- this.shepherdService.startAdapterTour();
- }
-
createNewAdapter(): void {
- this.router.navigate(['connect', 'catalog']).then(() => {
- this.shepherdService.trigger('new-adapter-clicked');
- });
+ this.router.navigate(['connect', 'catalog']);
}
navigateToDetailsOverviewPage(adapter: AdapterSummaryDto): void {
@@ -501,7 +486,6 @@ export class ExistingAdaptersComponent implements OnInit, OnDestroy {
ngOnDestroy(): void {
this.user$?.unsubscribe();
- this.tutorial$?.unsubscribe();
this.assetFilter$?.unsubscribe();
}
}
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 f4ca996c7a..7289c42ce6 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
@@ -25,7 +25,6 @@ import {
Output,
ChangeDetectionStrategy,
} from '@angular/core';
-import { ShepherdService } from '../../../services/tour/shepherd.service';
import {
AdapterDescription,
AdapterService,
@@ -83,7 +82,6 @@ export class AdapterStartedDialog implements OnInit {
translateService = inject(TranslateService);
public dialogRef = inject(DialogRef<AdapterStartedDialog>);
private adapterService = inject(AdapterService);
- private shepherdService = inject(ShepherdService);
private pipelineTemplateService = inject(PipelineTemplateService);
private compactPipelineService = inject(CompactPipelineService);
private assetSaveService = inject(AssetSaveService);
@@ -377,7 +375,6 @@ export class AdapterStartedDialog implements OnInit {
onCloseConfirm() {
this.dialogRef.close('Confirm');
- this.shepherdService.trigger('confirm_adapter_started_button');
}
onKeepEditing() {
diff --git a/ui/src/app/connect/dialog/edit-event-property/components/edit-schema-transformation/edit-schema-transformation.component.ts b/ui/src/app/connect/dialog/edit-event-property/components/edit-schema-transformation/edit-schema-transformation.component.ts
index 2f1eece018..9f721254da 100644
--- a/ui/src/app/connect/dialog/edit-event-property/components/edit-schema-transformation/edit-schema-transformation.component.ts
+++ b/ui/src/app/connect/dialog/edit-event-property/components/edit-schema-transformation/edit-schema-transformation.component.ts
@@ -37,7 +37,6 @@ import {
UntypedFormControl,
} from '@angular/forms';
import { Observable } from 'rxjs';
-import { ShepherdService } from '../../../../../services/tour/shepherd.service';
import {
EventProperty,
EventPropertyPrimitive,
@@ -88,7 +87,6 @@ import { TranslatePipe } from '@ngx-translate/core';
})
export class EditSchemaTransformationComponent implements OnInit {
private semanticTypesRestService = inject(SemanticTypesRestService);
- private shepherdService = inject(ShepherdService);
private router = inject(Router);
@Input()
diff --git a/ui/src/app/connect/dialog/edit-event-property/edit-event-property.component.ts b/ui/src/app/connect/dialog/edit-event-property/edit-event-property.component.ts
index e29767bcf2..8ff5711b4d 100644
--- a/ui/src/app/connect/dialog/edit-event-property/edit-event-property.component.ts
+++ b/ui/src/app/connect/dialog/edit-event-property/edit-event-property.component.ts
@@ -44,7 +44,6 @@ import {
FormFieldComponent,
SplitSectionComponent,
} from '@streampipes/shared-ui';
-import { ShepherdService } from '../../../services/tour/shepherd.service';
import {
FlexDirective,
LayoutAlignDirective,
@@ -82,7 +81,6 @@ import { TranslatePipe } from '@ngx-translate/core';
export class EditEventPropertyComponent implements OnInit {
public dialogRef = inject(DialogRef<EditEventPropertyComponent>);
private formBuilder = inject(UntypedFormBuilder);
- private shepherdService = inject(ShepherdService);
@Input() eventProperty: EventProperty;
@@ -184,7 +182,6 @@ export class EditEventPropertyComponent implements OnInit {
this.cachedProperty.additionalMetadata.originType;
}
this.dialogRef.close({ data: this.eventProperty });
- this.shepherdService.trigger('adapter-field-changed');
}
handleDataTypeChange() {
diff --git a/ui/src/app/editor/components/pipeline/pipeline.component.ts b/ui/src/app/editor/components/pipeline/pipeline.component.ts
index bb51853075..ca8ee7ea5b 100644
--- a/ui/src/app/editor/components/pipeline/pipeline.component.ts
+++ b/ui/src/app/editor/components/pipeline/pipeline.component.ts
@@ -20,7 +20,6 @@ import { PipelineValidationService } from '../../services/pipeline-validation.se
import { JsplumbService } from '../../services/jsplumb.service';
import { PipelineEditorService } from '../../services/pipeline-editor.service';
import { JsplumbBridge } from '../../services/jsplumb-bridge.service';
-import { ShepherdService } from '../../../services/tour/shepherd.service';
import {
Component,
EventEmitter,
@@ -105,7 +104,6 @@ export class PipelineComponent implements OnInit, OnDestroy {
private objectProvider = inject(ObjectProvider);
private editorService = inject(EditorService);
private idGeneratorService = inject(IdGeneratorService);
- private shepherdService = inject(ShepherdService);
private pipelineStyleService = inject(PipelineStyleService);
private pipelineValidationService = inject(PipelineValidationService);
private dialogService = inject(DialogService);
@@ -302,11 +300,6 @@ export class PipelineComponent implements OnInit, OnDestroy {
);
}, 10);
}
- if (this.shepherdService.isTourActive()) {
- this.shepherdService.trigger(
- 'drop-' + pipelineElementConfig.type,
- );
- }
}
this.JsplumbBridge.repaintEverything();
this.validatePipeline();
diff --git a/ui/src/app/editor/dialog/customize/customize.component.ts b/ui/src/app/editor/dialog/customize/customize.component.ts
index 5cdf3d908c..3875494048 100644
--- a/ui/src/app/editor/dialog/customize/customize.component.ts
+++ b/ui/src/app/editor/dialog/customize/customize.component.ts
@@ -50,7 +50,6 @@ import {
UntypedFormBuilder,
UntypedFormGroup,
} from '@angular/forms';
-import { ShepherdService } from '../../../services/tour/shepherd.service';
import { ConfigurationInfo } from '../../../connect/model/ConfigurationInfo';
import { PipelineStyleService } from '../../services/pipeline-style.service';
import { StaticPropertyUtilService } from '../../../core-ui/static-properties/static-property-util.service';
@@ -103,7 +102,6 @@ import { MatIcon } from '@angular/material/icon';
export class CustomizeComponent implements OnInit, AfterViewInit {
private dialogRef = inject<DialogRef<CustomizeComponent>>(DialogRef);
private jsPlumbService = inject(JsplumbService);
- private shepherdService = inject(ShepherdService);
private fb = inject(UntypedFormBuilder);
private changeDetectorRef = inject(ChangeDetectorRef);
private pipelineElementTemplateService = inject(
@@ -165,11 +163,6 @@ export class CustomizeComponent implements OnInit, AfterViewInit {
this.parentForm.statusChanges.subscribe(_status => {
this.formValid = this.viewInitialized && this.parentForm.valid;
});
- if (this.shepherdService.isTourActive()) {
- this.shepherdService.trigger(
- 'customize-' + this.pipelineElement.type,
- );
- }
this.loadPipelineElementTemplates();
}
@@ -192,9 +185,6 @@ export class CustomizeComponent implements OnInit, AfterViewInit {
PipelineElementConfigurationStatus.OK,
);
this.pipelineElement.payload.configured = true;
- if (this.shepherdService.isTourActive()) {
- this.shepherdService.trigger('save-' + this.pipelineElement.type);
- }
this.dialogRef.close(this.pipelineElement);
}
diff --git a/ui/src/app/editor/dialog/missing-elements-for-tutorial/missing-elements-for-tutorial.component.html b/ui/src/app/editor/dialog/missing-elements-for-tutorial/missing-elements-for-tutorial.component.html
deleted file mode 100644
index 508b26a9ae..0000000000
--- a/ui/src/app/editor/dialog/missing-elements-for-tutorial/missing-elements-for-tutorial.component.html
+++ /dev/null
@@ -1,55 +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">
- <div fxFlex="100" fxLayout="column">
- <div fxFlex="100" fxLayout="column">
- <h4>
- {{
- 'The tutorial requires pipeline elements that are not yet installed.'
- | translate
- }}
- </h4>
- <h5>
- {{
- 'Install the following pipeline elements and start the tutorial again:'
- | translate
- }}
- </h5>
- @for (
- missingElement of missingElementsForTutorial;
- track missingElement
- ) {
- <div>
- <li>
- <b>{{ missingElement.name }}</b>
- <i>({{ missingElement.appId }})</i>
- </li>
- </div>
- }
- </div>
- </div>
- </div>
- <mat-divider></mat-divider>
- <div class="sp-dialog-actions actions-align-right">
- <button mat-button mat-flat-button class="mat-basic" (click)="close()">
- {{ 'Close' | translate }}
- </button>
- </div>
-</div>
diff --git a/ui/src/app/editor/dialog/missing-elements-for-tutorial/missing-elements-for-tutorial.component.ts b/ui/src/app/editor/dialog/missing-elements-for-tutorial/missing-elements-for-tutorial.component.ts
deleted file mode 100644
index b49012d3c0..0000000000
--- a/ui/src/app/editor/dialog/missing-elements-for-tutorial/missing-elements-for-tutorial.component.ts
+++ /dev/null
@@ -1,53 +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,
- Input,
- inject,
- ChangeDetectionStrategy,
-} from '@angular/core';
-import { DialogRef } from '@streampipes/shared-ui';
-import { FlexDirective, LayoutDirective } from '@ngbracket/ngx-layout/flex';
-import { MatDivider } from '@angular/material/divider';
-import { MatButton } from '@angular/material/button';
-import { TranslatePipe } from '@ngx-translate/core';
-
-@Component({
- selector: 'sp-missing-elements-for-tutorial',
- templateUrl: './missing-elements-for-tutorial.component.html',
- changeDetection: ChangeDetectionStrategy.Eager,
- imports: [
- FlexDirective,
- LayoutDirective,
- MatDivider,
- MatButton,
- TranslatePipe,
- ],
-})
-export class MissingElementsForTutorialComponent {
- private dialogRef =
- inject<DialogRef<MissingElementsForTutorialComponent>>(DialogRef);
-
- @Input()
- missingElementsForTutorial: any[];
-
- close() {
- this.dialogRef.close();
- }
-}
diff --git a/ui/src/app/editor/editor.component.html b/ui/src/app/editor/editor.component.html
index e0d6a7f869..12cf95afd7 100644
--- a/ui/src/app/editor/editor.component.html
+++ b/ui/src/app/editor/editor.component.html
@@ -65,7 +65,6 @@
<sp-pipeline-element-icon-stand
editorPalette
[elementFilter]="elementFilter"
- id="shepherd-test"
[allElements]="allElements"
></sp-pipeline-element-icon-stand>
</sp-pipeline-assembly>
diff --git a/ui/src/app/home/dialog/welcome-tour/welcome-tour.component.html b/ui/src/app/home/dialog/welcome-tour/welcome-tour.component.html
deleted file mode 100644
index ee30228481..0000000000
--- a/ui/src/app/home/dialog/welcome-tour/welcome-tour.component.html
+++ /dev/null
@@ -1,96 +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" fxLayout="column">
- <div fxFlex="100" fxLayoutAlign="center center" fxLayout="column">
- <b><h2 class="welcome-animation">Hello!</h2></b>
- <b
- ><h3>Thank you for using {{ appConstants.APP_NAME }}.</h3></b
- >
- </div>
- <div fxFlex="100" fxLayoutAlign="center center" fxLayout="column">
- <div fxFlex="100" fxLayoutAlign="center center" fxLayout="column">
- <b
- >{{ appConstants.APP_NAME }} is your toolbox for IIoT data
- management and analytics.</b
- >
- <p>
- If you are using {{ appConstants.APP_NAME }} for the first
- time, we recommend taking the interactive tour!
- </p>
- @if (loadingTutorialResources) {
- <div
- class="tutorial-status"
- fxLayout="row"
- fxLayoutAlign="center center"
- fxLayoutGap="10px"
- >
- <sp-spinner
- [diameter]="20"
- layout="row"
- gap="10px"
- text="Checking tutorial pipeline elements..."
- ></sp-spinner>
- </div>
- }
- @if (showMissingElementsHint) {
- <sp-alert-banner
- type="info"
- title="Missing Elements for Tutorial"
- description="The tutorial needs additional pipeline elements.
- Install the missing extensions (Settings -> Extensions) and reopen the tour."
- >
- </sp-alert-banner>
- }
- </div>
- @if (!loadingTutorialResources && !showMissingElementsHint) {
- <button
- mat-button
- mat-flat-button
- color="accent"
- [disabled]="loadingTutorialResources"
- (click)="startTutorial()"
- >
- Start Tour
- </button>
- }
- </div>
- </div>
- <mat-divider></mat-divider>
- <div class="sp-dialog-actions actions-align-right" fxLayout="row">
- <button
- mat-button
- mat-flat-button
- class="mat-basic"
- (click)="hideTourForever()"
- style="margin-right: 10px"
- >
- Do not show again
- </button>
- <button
- mat-button
- mat-flat-button
- class="mat-basic"
- (click)="close()"
- data-cy="close-tutorial-button"
- >
- Close
- </button>
- </div>
-</div>
diff --git a/ui/src/app/home/dialog/welcome-tour/welcome-tour.component.scss b/ui/src/app/home/dialog/welcome-tour/welcome-tour.component.scss
deleted file mode 100644
index a06a4f52eb..0000000000
--- a/ui/src/app/home/dialog/welcome-tour/welcome-tour.component.scss
+++ /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.
- *
- */
-
-.welcome-animation {
- font-family: Arial;
- border-right: 0.1em solid black;
- width: 5ch;
- white-space: nowrap;
- overflow: hidden;
- -webkit-animation:
- typing 1s steps(5, end),
- blink-caret 0.5s step-end infinite alternate;
-}
-
-@keyframes typing {
- from {
- width: 0;
- }
-}
-
-@keyframes blink-caret {
- 50% {
- border-color: transparent;
- }
-}
-
-.tutorial-status {
- margin-top: 0.5rem;
-}
-
-.tutorial-hint {
- margin: 0.5rem 0 0;
- text-align: center;
- max-width: 28rem;
-}
diff --git a/ui/src/app/home/dialog/welcome-tour/welcome-tour.component.ts b/ui/src/app/home/dialog/welcome-tour/welcome-tour.component.ts
deleted file mode 100644
index f0e4aafff0..0000000000
--- a/ui/src/app/home/dialog/welcome-tour/welcome-tour.component.ts
+++ /dev/null
@@ -1,207 +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 {
- DialogRef,
- DialogService,
- PanelType,
- SpAlertBannerComponent,
- SpSpinnerComponent,
-} from '@streampipes/shared-ui';
-import {
- Component,
- Input,
- OnInit,
- inject,
- ChangeDetectionStrategy,
-} from '@angular/core';
-import { AppConstants } from '../../../services/app.constants';
-import { AuthService } from '../../../services/auth.service';
-import {
- AdapterDescription,
- AdapterService,
- NamedStreamPipesEntity,
- PipelineElementService,
- UserAccount,
- UserInfo,
-} from '@streampipes/platform-services';
-import { ProfileService } from '../../../profile/profile.service';
-import {
- FlexDirective,
- LayoutAlignDirective,
- LayoutDirective,
-} from '@ngbracket/ngx-layout/flex';
-import { MatButton } from '@angular/material/button';
-import { MatDivider } from '@angular/material/divider';
-import { MissingElementsForTutorialComponent } from '../../../editor/dialog/missing-elements-for-tutorial/missing-elements-for-tutorial.component';
-import { forkJoin } from 'rxjs';
-import { LayoutGapDirective } from '@ngbracket/ngx-layout';
-
-@Component({
- selector: 'sp-welcome-tour',
- templateUrl: './welcome-tour.component.html',
- styleUrls: ['./welcome-tour.component.scss'],
- changeDetection: ChangeDetectionStrategy.Eager,
- imports: [
- LayoutDirective,
- FlexDirective,
- LayoutAlignDirective,
- MatButton,
- MatDivider,
- SpSpinnerComponent,
- LayoutGapDirective,
- SpAlertBannerComponent,
- ],
-})
-export class WelcomeTourComponent implements OnInit {
- private static readonly REQUIRED_ADAPTER_FOR_TUTORIAL_APP_ID =
- 'org.apache.streampipes.connect.iiot.adapters.simulator.machine';
- private static readonly REQUIRED_PROCESSOR_FOR_TUTORIAL_APP_ID =
- 'org.apache.streampipes.processors.filters.jvm.numericalfilter';
- private static readonly REQUIRED_SINK_FOR_TUTORIAL_APP_ID =
- 'org.apache.streampipes.sinks.internal.jvm.dataset';
-
- private authService = inject(AuthService);
- private dialogRef = inject<DialogRef<WelcomeTourComponent>>(DialogRef);
- private profileService = inject(ProfileService);
- private dialogService = inject(DialogService);
- private adapterService = inject(AdapterService);
- private pipelineElementService = inject(PipelineElementService);
- appConstants = inject(AppConstants);
-
- @Input()
- userInfo: UserInfo;
-
- currentUser: UserAccount;
- availablePipelineElements: NamedStreamPipesEntity[] = [];
- availableAdapters: AdapterDescription[] = [];
- missingElementsForTutorial = [];
- tutorialAvailable = false;
- loadingTutorialResources = true;
-
- ngOnInit(): void {
- this.profileService
- .getUserProfile(this.userInfo.username)
- .subscribe(data => {
- this.currentUser = data;
- });
-
- forkJoin([
- this.adapterService.getAdapterDescriptions(),
- this.pipelineElementService.getDataStreams(),
- this.pipelineElementService.getDataProcessors(),
- this.pipelineElementService.getDataSinks(),
- ]).subscribe(res => {
- this.availableAdapters = res[0];
- this.availablePipelineElements = []
- .concat(...res[1])
- .concat(...res[2])
- .concat(...res[3]);
- this.missingElementsForTutorial =
- this.getMissingElementsForTutorial();
- this.tutorialAvailable =
- this.missingElementsForTutorial.length === 0;
- this.loadingTutorialResources = false;
- });
- }
-
- hideTourForever() {
- this.currentUser.hideTutorial = true;
- this.profileService
- .updateUserProfile(this.currentUser)
- .subscribe(_data => {
- this.authService.updateTokenAndUserInfo();
- this.close();
- });
- }
-
- startTutorial() {
- if (this.loadingTutorialResources) {
- return;
- }
-
- if (this.tutorialAvailable) {
- this.close(true);
- } else {
- this.dialogService.open(MissingElementsForTutorialComponent, {
- panelType: PanelType.STANDARD_PANEL,
- title: 'Tutorial requires pipeline elements',
- data: {
- missingElementsForTutorial: this.missingElementsForTutorial,
- },
- });
- }
- }
-
- close(startTutorial = false) {
- this.dialogRef.close(startTutorial);
- }
-
- get showMissingElementsHint() {
- return !this.loadingTutorialResources && !this.tutorialAvailable;
- }
-
- private getMissingElementsForTutorial() {
- const missingElements = [];
-
- if (
- !this.requiredPeForTourPresent(
- this.availableAdapters,
- WelcomeTourComponent.REQUIRED_ADAPTER_FOR_TUTORIAL_APP_ID,
- )
- ) {
- missingElements.push({
- name: 'Machine Data Simulator',
- appId: WelcomeTourComponent.REQUIRED_ADAPTER_FOR_TUTORIAL_APP_ID,
- });
- }
-
- if (
- !this.requiredPeForTourPresent(
- this.availablePipelineElements,
- WelcomeTourComponent.REQUIRED_PROCESSOR_FOR_TUTORIAL_APP_ID,
- )
- ) {
- missingElements.push({
- name: 'Numerical Filter',
- appId: WelcomeTourComponent.REQUIRED_PROCESSOR_FOR_TUTORIAL_APP_ID,
- });
- }
-
- if (
- !this.requiredPeForTourPresent(
- this.availablePipelineElements,
- WelcomeTourComponent.REQUIRED_SINK_FOR_TUTORIAL_APP_ID,
- )
- ) {
- missingElements.push({
- name: 'Dashboard Sink',
- appId: WelcomeTourComponent.REQUIRED_SINK_FOR_TUTORIAL_APP_ID,
- });
- }
-
- return missingElements;
- }
-
- private requiredPeForTourPresent(
- list: Array<{ appId: string }>,
- appId: string,
- ) {
- return list?.some(el => el.appId === appId);
- }
-}
diff --git a/ui/src/app/home/home.component.ts b/ui/src/app/home/home.component.ts
index 69629dc91d..d3152c36b4 100644
--- a/ui/src/app/home/home.component.ts
+++ b/ui/src/app/home/home.component.ts
@@ -1,228 +1,181 @@
-/*
- * 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,
- inject,
- OnDestroy,
- OnInit,
- signal,
- ChangeDetectionStrategy,
-} from '@angular/core';
-import { HomeService } from './home.service';
-import { Router } from '@angular/router';
-import { AppConstants } from '../services/app.constants';
-import {
- CurrentUserService,
- DialogService,
- LocalStorageService,
- PanelType,
- SpAlertBannerComponent,
- SpAssetBrowserService,
- SpBasicViewComponent,
- SpBreadcrumbService,
- SpSpinnerComponent,
- SplitSectionComponent,
-} from '@streampipes/shared-ui';
-import { UserRole } from '../core/auth/user-role.enum';
-import { WelcomeTourComponent } from './dialog/welcome-tour/welcome-tour.component';
-import { ShepherdService } from '../services/tour/shepherd.service';
-import {
- AssetConstants,
- AssetLinkType,
- AssetManagementService,
- AssetSiteDesc,
- GenericStorageService,
- LocationConfig,
- LocationConfigService,
- SpAssetModel,
- UserInfo,
-} from '@streampipes/platform-services';
-import { forkJoin, Subscription } from 'rxjs';
-import { StatusBox } from './models/home.model';
-import {
- FlexDirective,
- FlexFillDirective,
- LayoutDirective,
-} from '@ngbracket/ngx-layout/flex';
-import { WelcomeComponent } from './components/welcome/welcome.component';
-import { StatusComponent } from './components/status.component';
-import {
- MatButtonToggle,
- MatButtonToggleGroup,
-} from '@angular/material/button-toggle';
-import { HomeAssetMapComponent } from './components/asset-map/home-asset-map.component';
-import { HomeAssetTableComponent } from './components/asset-table/home-asset-table.component';
-import { TranslatePipe } from '@ngx-translate/core';
-
-@Component({
- templateUrl: './home.component.html',
- styleUrls: ['./home.component.scss'],
- changeDetection: ChangeDetectionStrategy.Eager,
- imports: [
- LayoutDirective,
- WelcomeComponent,
- StatusComponent,
- FlexFillDirective,
- SpBasicViewComponent,
- SpSpinnerComponent,
- SplitSectionComponent,
- MatButtonToggleGroup,
- MatButtonToggle,
- FlexDirective,
- HomeAssetMapComponent,
- SpAlertBannerComponent,
- HomeAssetTableComponent,
- TranslatePipe,
- ],
-})
-export class HomeComponent implements OnInit, OnDestroy {
- serviceLinks = [];
- showStatus = false;
-
- statusBoxes: StatusBox[] = [];
- locationConfig: LocationConfig;
- assets: SpAssetModel[] = [];
- filteredAssets: SpAssetModel[] = [];
- sites: Record<string, AssetSiteDesc> = {};
- assetLinkTypes: Record<string, AssetLinkType> = {};
-
- isTutorialOpen = false;
- currentUser: UserInfo;
- selectedView = signal<string>('table');
- contentLoaded = false;
-
- private homeService = inject(HomeService);
- private currentUserService = inject(CurrentUserService);
- private router = inject(Router);
- public appConstants = inject(AppConstants);
- private breadcrumbService = inject(SpBreadcrumbService);
- private dialogService = inject(DialogService);
- private shepherdService = inject(ShepherdService);
- private genericStorageService = inject(GenericStorageService);
- private locationService = inject(LocationConfigService);
- private assetService = inject(AssetManagementService);
- private localStorageService = inject(LocalStorageService);
- private assetFilterService = inject(SpAssetBrowserService);
-
- assetFilter$: Subscription;
-
- constructor() {
- this.serviceLinks = this.homeService.getFilteredServiceLinks();
- this.statusBoxes = this.homeService
- .getFilteredServiceLinks()
- .filter(s => s.showStatusBox)
- .map(s => s.statusBox);
- this.selectedView.set(
- this.localStorageService.get('default-asset-view', 'table'),
- );
- }
-
- ngOnInit() {
- this.currentUser = this.currentUserService.getCurrentUser();
- this.assetFilter$ =
- this.assetFilterService.currentAssetFilter$.subscribe(filter => {
- this.filteredAssets = filter.selectedAssets as SpAssetModel[];
- if (this.filteredAssets) {
- this.sortAssetLinks(this.filteredAssets);
- }
- });
- const isAdmin = this.hasRole(UserRole.ROLE_ADMIN);
- forkJoin([
- this.genericStorageService.getAllDocuments(
- AssetConstants.ASSET_LINK_TYPES_DOC_NAME,
- ),
- this.locationService.getLocationConfig(),
- this.assetService.getAllAssets(),
- this.genericStorageService.getAllDocuments(
- AssetConstants.ASSET_SITES_APP_DOC_NAME,
- ),
- ]).subscribe(res => {
- res[0].forEach(doc => {
- this.assetLinkTypes[doc.linkType] = doc;
- });
- this.locationConfig = res[1];
- this.assets = res[2];
- this.sortAssetLinks(this.assets);
- res[3].forEach(doc => {
- this.sites[doc._id] = doc;
- });
- this.contentLoaded = true;
- this.showStatus = true;
- });
- console.log(isAdmin);
- console.log(this.currentUser.showTutorial);
- if (isAdmin && this.currentUser.showTutorial) {
- this.checkForTutorial();
- }
- this.breadcrumbService.updateBreadcrumb([]);
- }
-
- hasRole(role: UserRole): boolean {
- return this.currentUser.roles.indexOf(role) > -1;
- }
-
- sortAssetLinks(assets: SpAssetModel[]) {
- assets.forEach(asset => {
- asset.assetLinks = [...(asset.assetLinks ?? [])].sort((a, b) => {
- const leftType = a.linkType ?? '';
- const rightType = b.linkType ?? '';
- const typeCompare = leftType.localeCompare(rightType);
- if (typeCompare !== 0) {
- return typeCompare;
- }
-
- return (a.linkLabel ?? '').localeCompare(b.linkLabel ?? '');
- });
- });
- }
-
- checkForTutorial() {
- this.isTutorialOpen = true;
- const dialogRef = this.dialogService.open(WelcomeTourComponent, {
- panelType: PanelType.STANDARD_PANEL,
- title: 'Welcome to ' + this.appConstants.APP_NAME,
- data: {
- userInfo: this.currentUser,
- },
- });
- dialogRef.afterClosed().subscribe(startTutorial => {
- if (startTutorial) {
- this.startTutorial();
- } else {
- this.isTutorialOpen = false;
- }
- });
- }
-
- startTutorial() {
- this.router.navigate(['connect']).then(() => {
- this.shepherdService.startAdapterTour();
- this.isTutorialOpen = false;
- });
- }
-
- updateView(view: string): void {
- this.selectedView.set(view);
- this.localStorageService.set('default-asset-view', view);
- }
-
- ngOnDestroy() {
- this.assetFilter$?.unsubscribe();
- }
-}
+/*
+ * 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,
+ inject,
+ OnDestroy,
+ OnInit,
+ signal,
+ ChangeDetectionStrategy,
+} from '@angular/core';
+import { HomeService } from './home.service';
+import {
+ CurrentUserService,
+ LocalStorageService,
+ SpAlertBannerComponent,
+ SpAssetBrowserService,
+ SpBasicViewComponent,
+ SpBreadcrumbService,
+ SpSpinnerComponent,
+ SplitSectionComponent,
+} from '@streampipes/shared-ui';
+import {
+ AssetConstants,
+ AssetLinkType,
+ AssetManagementService,
+ AssetSiteDesc,
+ GenericStorageService,
+ LocationConfig,
+ LocationConfigService,
+ SpAssetModel,
+ UserInfo,
+} from '@streampipes/platform-services';
+import { forkJoin, Subscription } from 'rxjs';
+import { StatusBox } from './models/home.model';
+import {
+ FlexDirective,
+ FlexFillDirective,
+ LayoutDirective,
+} from '@ngbracket/ngx-layout/flex';
+import { WelcomeComponent } from './components/welcome/welcome.component';
+import { StatusComponent } from './components/status.component';
+import {
+ MatButtonToggle,
+ MatButtonToggleGroup,
+} from '@angular/material/button-toggle';
+import { HomeAssetMapComponent } from './components/asset-map/home-asset-map.component';
+import { HomeAssetTableComponent } from './components/asset-table/home-asset-table.component';
+import { TranslatePipe } from '@ngx-translate/core';
+
+@Component({
+ templateUrl: './home.component.html',
+ styleUrls: ['./home.component.scss'],
+ changeDetection: ChangeDetectionStrategy.Eager,
+ imports: [
+ LayoutDirective,
+ WelcomeComponent,
+ StatusComponent,
+ FlexFillDirective,
+ SpBasicViewComponent,
+ SpSpinnerComponent,
+ SplitSectionComponent,
+ MatButtonToggleGroup,
+ MatButtonToggle,
+ FlexDirective,
+ HomeAssetMapComponent,
+ SpAlertBannerComponent,
+ HomeAssetTableComponent,
+ TranslatePipe,
+ ],
+})
+export class HomeComponent implements OnInit, OnDestroy {
+ serviceLinks = [];
+ showStatus = false;
+
+ statusBoxes: StatusBox[] = [];
+ locationConfig: LocationConfig;
+ assets: SpAssetModel[] = [];
+ filteredAssets: SpAssetModel[] = [];
+ sites: Record<string, AssetSiteDesc> = {};
+ assetLinkTypes: Record<string, AssetLinkType> = {};
+
+ currentUser: UserInfo;
+ selectedView = signal<string>('table');
+ contentLoaded = false;
+
+ private homeService = inject(HomeService);
+ private currentUserService = inject(CurrentUserService);
+ private breadcrumbService = inject(SpBreadcrumbService);
+ private genericStorageService = inject(GenericStorageService);
+ private locationService = inject(LocationConfigService);
+ private assetService = inject(AssetManagementService);
+ private localStorageService = inject(LocalStorageService);
+ private assetFilterService = inject(SpAssetBrowserService);
+
+ assetFilter$: Subscription;
+
+ constructor() {
+ this.serviceLinks = this.homeService.getFilteredServiceLinks();
+ this.statusBoxes = this.homeService
+ .getFilteredServiceLinks()
+ .filter(s => s.showStatusBox)
+ .map(s => s.statusBox);
+ this.selectedView.set(
+ this.localStorageService.get('default-asset-view', 'table'),
+ );
+ }
+
+ ngOnInit() {
+ this.currentUser = this.currentUserService.getCurrentUser();
+ this.assetFilter$ =
+ this.assetFilterService.currentAssetFilter$.subscribe(filter => {
+ this.filteredAssets = filter.selectedAssets as SpAssetModel[];
+ if (this.filteredAssets) {
+ this.sortAssetLinks(this.filteredAssets);
+ }
+ });
+ forkJoin([
+ this.genericStorageService.getAllDocuments(
+ AssetConstants.ASSET_LINK_TYPES_DOC_NAME,
+ ),
+ this.locationService.getLocationConfig(),
+ this.assetService.getAllAssets(),
+ this.genericStorageService.getAllDocuments(
+ AssetConstants.ASSET_SITES_APP_DOC_NAME,
+ ),
+ ]).subscribe(res => {
+ res[0].forEach(doc => {
+ this.assetLinkTypes[doc.linkType] = doc;
+ });
+ this.locationConfig = res[1];
+ this.assets = res[2];
+ this.sortAssetLinks(this.assets);
+ res[3].forEach(doc => {
+ this.sites[doc._id] = doc;
+ });
+ this.contentLoaded = true;
+ this.showStatus = true;
+ });
+ this.breadcrumbService.updateBreadcrumb([]);
+ }
+
+ sortAssetLinks(assets: SpAssetModel[]) {
+ assets.forEach(asset => {
+ asset.assetLinks = [...(asset.assetLinks ?? [])].sort((a, b) => {
+ const leftType = a.linkType ?? '';
+ const rightType = b.linkType ?? '';
+ const typeCompare = leftType.localeCompare(rightType);
+ if (typeCompare !== 0) {
+ return typeCompare;
+ }
+
+ return (a.linkLabel ?? '').localeCompare(b.linkLabel ?? '');
+ });
+ });
+ }
+
+ updateView(view: string): void {
+ this.selectedView.set(view);
+ this.localStorageService.set('default-asset-view', view);
+ }
+
+ ngOnDestroy() {
+ this.assetFilter$?.unsubscribe();
+ }
+}
diff --git a/ui/src/app/pipelines/pipelines.component.html b/ui/src/app/pipelines/pipelines.component.html
index 6b0ca7b8e9..0f75a0dece 100644
--- a/ui/src/app/pipelines/pipelines.component.html
+++ b/ui/src/app/pipelines/pipelines.component.html
@@ -38,18 +38,6 @@
>{{ 'New Pipeline' | translate }}
</button>
}
- <button
- pageActions
- type="button"
- mat-icon-button
- color="accent"
- (click)="startPipelineTour()"
- [attr.aria-label]="'Tutorial' | translate"
- [matTooltip]="'Tutorial' | translate"
- [disabled]="tutorialActive"
- >
- <mat-icon aria-hidden="true">school</mat-icon>
- </button>
<button
pageActions
type="button"
diff --git a/ui/src/app/pipelines/pipelines.component.ts b/ui/src/app/pipelines/pipelines.component.ts
index 26e56d801e..b2e4f4c358 100644
--- a/ui/src/app/pipelines/pipelines.component.ts
+++ b/ui/src/app/pipelines/pipelines.component.ts
@@ -46,7 +46,6 @@ import { AuthService } from '../services/auth.service';
import { UserPrivilege } from '../core/auth/user-privilege.enum';
import { SpPipelineRoutes } from './pipelines.breadcrumb';
import { UserRole } from '../core/auth/user-role.enum';
-import { ShepherdService } from '../services/tour/shepherd.service';
import { Subscription } from 'rxjs';
import { MatButton, MatIconButton } from '@angular/material/button';
import { MatTooltip } from '@angular/material/tooltip';
@@ -91,8 +90,6 @@ export class PipelinesComponent implements OnInit, OnDestroy {
functionsReady = false;
isAdminRole = false;
- tutorialActive = false;
- tutorial$: Subscription;
user$: Subscription;
assetFilter$: Subscription;
currentFilters: Set<string> = new Set<string>();
@@ -104,7 +101,6 @@ export class PipelinesComponent implements OnInit, OnDestroy {
private router = inject(Router);
private functionsService = inject(FunctionsService);
private breadcrumbService = inject(SpBreadcrumbService);
- private shepherdService = inject(ShepherdService);
private assetFilterService = inject(SpAssetBrowserService);
readonly pageHeaderAssetLinkType$ =
@@ -126,16 +122,8 @@ export class PipelinesComponent implements OnInit, OnDestroy {
);
this.isAdminRole = this.authService.hasRole(UserRole.ROLE_ADMIN);
});
- if (this.shepherdService.isTourActive()) {
- this.shepherdService.trigger('pipeline-started');
- }
this.getPipelines();
this.getFunctions();
- this.tutorial$ = this.shepherdService.tutorialActive$.subscribe(
- tutorialActive => {
- this.tutorialActive = tutorialActive;
- },
- );
}
getFunctions() {
@@ -199,21 +187,12 @@ export class PipelinesComponent implements OnInit, OnDestroy {
});
}
- startPipelineTour(): void {
- this.shepherdService.startPipelineTour();
- }
-
navigateToPipelineEditor() {
- this.router
- .navigate(['pipelines', 'create'])
- .then(() =>
- this.shepherdService.trigger('pipeline-new-button-clicked'),
- );
+ this.router.navigate(['pipelines', 'create']);
}
ngOnDestroy() {
this.user$?.unsubscribe();
- this.tutorial$?.unsubscribe();
this.assetFilter$?.unsubscribe();
}
}
diff --git a/ui/src/app/services/tour/adapter-tour.constants.ts b/ui/src/app/services/tour/adapter-tour.constants.ts
deleted file mode 100644
index 29440dc0df..0000000000
--- a/ui/src/app/services/tour/adapter-tour.constants.ts
+++ /dev/null
@@ -1,169 +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.
- *
- */
-
-export default {
- adapterTour: {
- id: 'adapter',
- steps: [
- {
- stepId: 'step-1',
- title: 'Welcome to Connect!',
- text: '<p>This is the <b>Connect</b> view, where you create adapters for data streams. Adapters create data streams, and those streams can be used in pipelines or visualizations.</p><p>Click <b>Next</b> to continue.</p>',
- classes: 'shepherd shepherd-welcome',
- buttons: ['cancel', 'next'],
- },
- {
- stepId: 'step-3',
- title: 'New adapter',
- text: '<p>Click <b>New adapter</b> to open the list of available adapters.</p>',
- attachToElement:
- '[data-cy="connect-create-new-adapter-button"]',
- attachPosition: 'left',
- buttons: ['cancel'],
- },
- {
- stepId: 'step-4',
- title: 'Select the machine data simulator',
- text: "<p>The adapter overview lists all installed adapters, including a simulator we'll use for this tutorial.</p><p>Search for and <b>click</b> <b>Machine Data Simulator</b>.</p>",
- attachToElement: '#Machine_Data_Simulator',
- attachPosition: 'top',
- buttons: ['cancel'],
- },
- {
- stepId: 'step-5',
- title: 'Adapter settings',
- text: 'Adapter creation follows a four-step process. In this first step, you can provide basic settings like protocol info. For this tutorial, keep the defaults to produce <b>Flow Rate</b> measurements at one message per second.',
- attachToElement: '[data-cy="adapter-settings-next-button"]',
- attachPosition: 'top',
- buttons: ['cancel'],
- },
- {
- stepId: 'step-6',
- title: 'Configure schema',
- text: '<p>In this step, you can preview the incoming message and optionally enable a transformation script to modify the event.</p><p>Enable the script to continue.</p>',
- attachToElement: '[data-cy="toggle-script-active"]',
- attachPosition: 'top',
- buttons: ['cancel'],
- },
- {
- stepId: 'step-8',
- title: 'Rename and run the script',
- text: '<p>Field renaming is now done in the transformation script. Update the script to rename the <b>temperature</b> field to <b>temp</b>.</p><p>This is how the resulting script should look:</p><pre><code>function transform(event, out, ctx) {\n event.temp = event.temperature;\n delete event.temperature;\n out.collect(event);\n}</code></pre><p>Click <b>Run script</b> to apply the transformation and update the preview.</p>',
- attachToElement: '[data-cy="configure-schema-script-editor"]',
- attachPosition: 'top',
- buttons: ['cancel'],
- },
- {
- stepId: 'step-9',
- title: 'Continue',
- text: 'Click <b>Next</b> to continue.',
- attachToElement: '[data-cy="configure-schema-next-button"]',
- attachPosition: 'bottom',
- buttons: ['cancel'],
- },
- {
- stepId: 'step-10',
- title: 'Configure fields',
- text: 'Review and adjust the detected fields. Use the scope dropdown to mark the timestamp field as <b>Timestamp</b>.',
- attachToElement: '[data-cy="event-property-row"]',
- attachPosition: 'top',
- buttons: ['cancel'],
- },
- {
- stepId: 'step-11',
- title: 'Message preview',
- text: 'Use the preview to verify the resulting event structure after your changes.',
- attachToElement:
- '[data-cy="configure-fields-event-preview-result"]',
- attachPosition: 'bottom',
- buttons: ['cancel', 'next'],
- },
- {
- stepId: 'step-12',
- title: 'Go to next step',
- text: 'Finish configuring fields and continue to the final step to start the adapter. Click <b>Next</b> to continue.',
- attachToElement: '[data-cy="configure-fields-next-button"]',
- attachPosition: 'bottom',
- buttons: ['cancel'],
- },
- {
- stepId: 'step-13',
- title: 'Adapter name',
- text: 'Change the name of the adapter to <b>Tutorial</b> and click outside the input field to continue.',
- attachToElement: '[data-cy="sp-adapter-name"]',
- attachPosition: 'top',
- buttons: ['cancel'],
- },
- {
- stepId: 'step-14',
- title: 'Persistence',
- text: 'Check <b>Persist</b> to store all messages produced by this adapter. Only persisted data can be visualized in the dashboard or inspected in the data lake.<br/>You can also persist data later using the pipeline editor.',
- attachToElement: '[data-cy="sp-store-in-datalake"]',
- attachPosition: 'top',
- buttons: ['cancel'],
- },
- {
- stepId: 'step-15',
- title: 'Start Adapter',
- text: "Now it's time to start the adapter. Click <b>Start adapter</b> to deploy it.",
- attachToElement:
- '[data-cy="adapter-settings-start-adapter-btn"]',
- attachPosition: 'top',
- buttons: ['cancel'],
- },
- {
- stepId: 'step-16',
- title: 'Congratulations',
- text: '<p><b>Congratulations!</b> You have created your first adapter and finished the tutorial.</p><p>Go to the pipeline editor to see the new data stream.</p>',
- classes: 'shepherd shepherd-welcome',
- buttons: ['cancel', 'pipeline-tutorial'],
- },
- ],
- matchingSteps: [
- { actionId: 'new-adapter-clicked', currentStep: 'step-3' },
- { actionId: 'new-adapter-selected', currentStep: 'step-4' },
- {
- actionId: 'specific-settings-next-button',
- currentStep: 'step-5',
- },
- {
- actionId: 'configure-schema-script-enabled',
- currentStep: 'step-6',
- },
- {
- actionId: 'configure-schema-script-run',
- currentStep: 'step-8',
- },
- {
- actionId: 'configure-schema-next-button',
- currentStep: 'step-9',
- },
- {
- actionId: 'timestamp-property-selected',
- currentStep: 'step-10',
- },
- { actionId: 'event-schema-next-button', currentStep: 'step-12' },
- { actionId: 'adapter-name-assigned', currentStep: 'step-13' },
- { actionId: 'adapter-persist-selected', currentStep: 'step-14' },
- {
- actionId: 'adapter-settings-adapter-started',
- currentStep: 'step-15',
- },
- ],
- },
-};
diff --git a/ui/src/app/services/tour/create-pipeline-tour.constants.ts b/ui/src/app/services/tour/create-pipeline-tour.constants.ts
deleted file mode 100644
index 39209c18a1..0000000000
--- a/ui/src/app/services/tour/create-pipeline-tour.constants.ts
+++ /dev/null
@@ -1,168 +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.
- *
- */
-
-export default {
- createPipelineTour: {
- id: 'create-pipeline',
- steps: [
- {
- stepId: 'step-1',
- title: 'Pipeline tutorial',
- classes: 'shepherd shepherd-welcome',
- text: "<p>This tour will teach you how to create your first pipeline. You will learn how to select streams, how to connect data processors and sinks and how to start a pipeline.</p> <p>This tour requires a data stream called <b>Tutorial</b> which you've created in the adapter tutorial.</p>Click <b>next</b> to continue.",
- buttons: ['cancel', 'next'],
- },
- {
- stepId: 'step-2',
- title: 'Create pipeline',
- classes: 'shepherd shepherd-welcome',
- text: '<p>In this view, you can see already existing pipelines. To create a new pipeline, click the button above.</p>',
- buttons: ['cancel'],
- attachToElement: '[data-cy="pipelines-navigate-to-editor"]',
- attachPosition: 'left',
- },
- {
- stepId: 'step-3',
- title: 'Pipeline assembly',
- classes: 'shepherd shepherd-welcome',
- text: '<p>The pipeline assembly is the place where you can create pipelines. <br>Pipelines combine data streams, processors and sinks and can be used to trigger alarms, to transform data or to apply data analytics algorithms.<br> Click <b>Next</b> to continue.</p>',
- buttons: ['cancel', 'next'],
- },
- {
- stepId: 'step-4',
- title: 'Pipeline Element Selection',
- text: "<p>Let's start!</p> <p>This is the <b>Pipeline Element Selection</b> panel. Here you can select and use all available pipeline elements.</p>",
- attachToElement: '#editor-icon-stand',
- attachPosition: 'left',
- buttons: ['cancel', 'next'],
- },
- {
- stepId: 'step-5',
- title: 'Selecting data streams',
- text: "The first element of a pipeline is a data stream, which produces data you'd like to transform. <p>To select a stream, drag and drop the stream named <b>Tutorial</b> to the assembly area on the right.</p>",
- attachToElement: '#tutorial',
- attachPosition: 'left',
- buttons: ['cancel'],
- },
- {
- stepId: 'step-6',
- title: 'Creating pipelines',
- text: '<p>Cool!</p> <p>Dragging and dropping elements is the basic principle you need to know to create pipelines. You only need to select a pipeline element and drop it to the assembly area.</p><p>Click <b>Next</b> to continue.</p>',
- buttons: ['cancel', 'next'],
- },
- {
- stepId: 'step-7',
- title: 'Data processors',
- text: 'Now we will add a data processor. This is the data processor list which shows all currently available data processors.<p>Click <b>Next</b> to continue.</p>',
- attachToElement: '#panel-1',
- attachPosition: 'left',
- buttons: ['cancel', 'next'],
- },
- {
- stepId: 'step-8',
- title: 'Selecting data processors',
- text: '<p>Processors can provide simple capabilities such as filters or aggregations, but can also provide more advanced capabilities such as trend and pattern detection or even pre-trained neural networks.</p><p>Select the processor called <b>Numerical Filter</b> and move it to the assembly area.</p>',
- attachToElement:
- '#org\\.apache\\.streampipes\\.processors\\.filters\\.jvm\\.numericalfilter',
- attachPosition: 'right',
- buttons: ['cancel'],
- },
- {
- stepId: 'step-9',
- title: 'Connecting elements',
- text: "<p>Now it's time to connect the first elements of your pipeline!</p> <p>Click the gray output port of the stream and connect it with the Numerical Filter component.</p>",
- attachToElement:
- '#assembly>div.jsplumb-endpoint:nth-of-type(1)',
- attachPosition: 'bottom',
- buttons: ['cancel'],
- },
- {
- stepId: 'step-10',
- title: 'Customize elements',
- text: '<p>Most pipeline elements can be customized according to your needs. Whenever you connect two elements with each other, a configuration dialog pops up.</p><p>Select <b>Mass Flow</b> as the field to filter, select <b>greater than (>) </b> as operation, select <b>2</b> as the threshold value and click <b>Save</b>.</p>',
- attachToElement: 'div .dialog-panel-content',
- attachPosition: 'right',
- buttons: ['cancel'],
- },
- {
- stepId: 'step-11',
- title: 'Selecting data sinks',
- text: "<p>What's missing?</p><p>Every pipeline needs a data sink. Sinks define what to do with the output of your pipeline and can be visualizations, notifications, or can trigger third party components or even actuators.</p><p>Click <b>Next</b> to continue.</p>",
- attachToElement: '#panel-2',
- attachPosition: 'left',
- buttons: ['cancel', 'next'],
- },
- {
- stepId: 'step-12',
- title: 'Finish Pipeline',
- text: '<p>Almost there!</p>Select the <b>Data Lake</b> sink and connect the <b>Numerical Filter</b> to the Data Lake sink. Enter any identifier as the storage name in the configuration menu.</p>',
- attachToElement:
- '#org\\.apache\\.streampipes\\.sinks\\.internal\\.jvm\\.datalake',
- attachPosition: 'left',
- buttons: ['cancel'],
- },
- {
- stepId: 'step-13',
- title: 'Save Pipeline',
- text: "<p>Great!</p><p>Your first pipeline is complete. No we're ready to start the pipeline.</p><p>Click the <b>Save</b> icon to open the save dialog.</p>",
- attachToElement:
- '.pipeline-assembly-options>div>button:nth-of-type(1)',
- attachPosition: 'left',
- buttons: ['cancel'],
- },
- {
- stepId: 'step-14',
- title: 'Enter pipeline name',
- text: '<p>Enter a name and an optional description of your pipeline.</p><p>Afterwards, make sure that <b>Start pipeline immediately</b> is checked.</p>',
- attachToElement: 'div .dialog-panel-content',
- attachPosition: 'right',
- buttons: ['cancel'],
- },
- {
- stepId: 'step-15',
- title: 'Save Pipeline Dialog',
- text: '<p>Click on <b>Apply</b> to start the pipeline.</p>',
- attachToElement: '[data-cy="sp-editor-save"]',
- attachPosition: 'top',
- buttons: ['cancel'],
- },
- {
- stepId: 'step-16',
- title: 'Pipeline Started',
- text: "<p>Congratulations!</p><p>You've completed the pipeline tutorial.</p>",
- attachToElement:
- 'md-dialog>form>md-dialog-actions>button:nth-of-type(1)',
- attachPosition: 'bottom',
- buttons: ['cancel'],
- },
- ],
- matchingSteps: [
- { actionId: 'pipeline-new-button-clicked', currentStep: 'step-2' },
- { actionId: 'drop-stream', currentStep: 'step-5' },
- { actionId: 'select-sepa', currentStep: 'step-7' },
- { actionId: 'drop-sepa', currentStep: 'step-8' },
- { actionId: 'customize-sepa', currentStep: 'step-9' },
- { actionId: 'save-sepa', currentStep: 'step-10' },
- { actionId: 'select-action', currentStep: 'step-11' },
- { actionId: 'save-action', currentStep: 'step-12' },
- { actionId: 'enter-pipeline-name', currentStep: 'step-13' },
- { actionId: 'save-pipeline-dialog', currentStep: 'step-14' },
- { actionId: 'pipeline-started', currentStep: 'step-15' },
- ],
- },
-};
diff --git a/ui/src/app/services/tour/dashboard-tour.constants.ts b/ui/src/app/services/tour/dashboard-tour.constants.ts
deleted file mode 100644
index c9a6f1cc83..0000000000
--- a/ui/src/app/services/tour/dashboard-tour.constants.ts
+++ /dev/null
@@ -1,87 +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.
- *
- */
-
-export default {
- dashboardTour: {
- id: 'dashboard',
- steps: [
- {
- stepId: 'step-1',
- title: 'Welcome to the Dashboard Tutorial!',
- classes: 'shepherd shepherd-welcome',
- text: "<p>In this tutorial, you'll learn how to create a live dashboard that shows data from a running pipeline.</p><b>Note:</b>This tutorial requires a running pipeline that makes use of the <i>Dashboard Sink</i>. If you don't have such a pipeline started yet, go to the pipeline editor and create one.<p>Press <i>Next</i> to start the tutorial!</p>",
- buttons: ['cancel', 'next'],
- },
- {
- stepId: 'step-2',
- title: 'Add visualization',
- text: "<p>Let's start!</p><p>To create a new visualization, click the <i>Add visualization</i> button.</p>",
- attachToElement: '#add-viz-button',
- attachPosition: 'bottom',
- buttons: ['cancel'],
- },
- {
- stepId: 'step-3',
- title: 'Select pipeline',
- text: '<p>This wizard allows to configure visualizations. The first step is to select a currently running pipeline.</p><p>Click the pipeline shown on the left.</p>',
- attachToElement: 'md-grid-tile:nth-of-type(1)',
- attachPosition: 'right',
- buttons: ['cancel'],
- },
- {
- stepId: 'step-4',
- title: 'Select visualization',
- text: "<p>The second step requires the selection of a visualization. You can select from tables, gauges, maps or charts.</p><p>In this tutorial, we'll create a table visualization, so click the <i>Table</i> visualization on the left.</p>",
- attachToElement: 'md-grid-tile:nth-of-type(1)',
- attachPosition: 'right',
- buttons: ['cancel'],
- },
- {
- stepId: 'step-5',
- title: 'Customize visualization',
- text: '<p>Some visualizations can be customized according to your needs.</p><p>For instance, the table visualization provides a dialog to filter columns. Click the <i>Select all</i> button on the left to select all fields from the incoming event.</p>',
- attachToElement: '#select-all-button',
- attachPosition: 'right',
- buttons: ['cancel'],
- },
- {
- stepId: 'step-6',
- title: 'Save visualization',
- text: 'Now you are ready to save your visualization. Click <i>Save</i> to create a new visualization in your dashboard.',
- attachToElement: '#save-viz-button',
- attachPosition: 'bottom',
- buttons: ['cancel'],
- },
- {
- stepId: 'step-7',
- title: 'Cool!',
- text: '<p>Now you should see live data coming in. There are many more visualization types you can try.</p>Press <i>Exit</i> to finish the tour.',
- attachToElement: '.widget-container:nth-of-type(1)',
- attachPosition: 'right',
- buttons: ['cancel'],
- },
- ],
- matchingSteps: [
- { actionId: 'add-viz', currentStep: 'step-2' },
- { actionId: 'select-pipeline', currentStep: 'step-3' },
- { actionId: 'select-viz', currentStep: 'step-4' },
- { actionId: 'customize-viz', currentStep: 'step-5' },
- { actionId: 'save-viz', currentStep: 'step-6' },
- ],
- },
-};
diff --git a/ui/src/app/services/tour/shepherd.service.ts b/ui/src/app/services/tour/shepherd.service.ts
deleted file mode 100644
index ad6085e699..0000000000
--- a/ui/src/app/services/tour/shepherd.service.ts
+++ /dev/null
@@ -1,213 +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 Shepherd, { type StepOptions, type Tour } from 'shepherd.js';
-import { Injectable, inject } from '@angular/core';
-import { Router } from '@angular/router';
-import { TourProviderService } from './tour-provider.service';
-import { BehaviorSubject } from 'rxjs';
-
-@Injectable({ providedIn: 'root' })
-export class ShepherdService {
- private router = inject(Router);
- private tourProviderService = inject(TourProviderService);
-
- currentTour: Tour;
- currentTourSettings: any;
- timeWaitMillis: number;
- tutorialActive = false;
-
- public tutorialActive$ = new BehaviorSubject(false);
-
- constructor() {
- const tourProviderService = this.tourProviderService;
-
- this.timeWaitMillis = tourProviderService.getTime();
- }
-
- makeTour(currentTourSettings) {
- const tour = new Shepherd.Tour({
- confirmCancel: () => {
- return new Promise(resolve => {
- const exit = window.confirm(
- 'Do you really want to cancel the tour?',
- );
- if (exit) {
- resolve(true);
- this.changeTutorialStatus(false);
- } else {
- resolve(false);
- }
- });
- },
- defaultStepOptions: {
- classes: 'shadow-md bg-purple-dark',
- scrollTo: true,
- },
- });
-
- currentTourSettings.steps.forEach(step => {
- tour.addStep(this.makeStep(tour, step));
- });
-
- return tour;
- }
-
- makeStep(tour, step) {
- const stepDefinition: StepOptions = {
- title: step.title,
- text: step.text,
- classes: step.classes,
- id: step.stepId,
- buttons: this.generateButtons(tour, step.buttons),
- };
-
- if (step.attachToElement) {
- Object.assign(stepDefinition, {
- attachTo: {
- element: step.attachToElement,
- on: step.attachPosition,
- },
- });
- }
-
- return stepDefinition;
- }
-
- generateButtons(tour, buttons) {
- const generatedButtons = [];
- buttons.forEach(button => {
- generatedButtons.push(this.generateButton(tour, button));
- });
- return generatedButtons;
- }
-
- generateButton(tour, button) {
- if (button === 'back') {
- return this.makeBackButton(tour);
- } else if (button === 'next') {
- return this.makeNextButton(tour);
- } else if (button === 'cancel') {
- return this.makeCancelButton(tour);
- } else if (button === 'dashboard') {
- return this.makeStartDashboardTutorialButton();
- } else if (button === 'pipeline-tutorial') {
- return this.makeStartPipelineTutorialButton();
- }
- }
-
- startTour(tourSettings) {
- this.currentTourSettings = tourSettings;
- this.currentTour = this.makeTour(this.currentTourSettings);
- this.currentTour.start();
- this.changeTutorialStatus(true);
- }
-
- makeCancelButton(tour) {
- return {
- action: tour.cancel,
- classes: 'shepherd-button-secondary',
- text: 'Exit Tour',
- };
- }
-
- makeNextButton(tour) {
- return {
- action: tour.next,
- text: 'Next',
- };
- }
-
- makeBackButton(tour) {
- return {
- action: tour.back,
- classes: 'shepherd-button-secondary',
- text: 'Back',
- };
- }
-
- makeStartDashboardTutorialButton() {
- return {
- action: this.switchAndStartDashboardTour(),
- text: 'Dashboard Tutorial',
- };
- }
-
- makeStartPipelineTutorialButton() {
- return {
- action: () => {
- this.currentTour.complete();
- this.router.navigate(['pipelines'], {
- queryParams: { startTutorial: true },
- });
- },
- text: 'Start pipeline tutorial',
- };
- }
-
- trigger(actionId) {
- if (Shepherd.activeTour) {
- if (
- this.shouldTrigger(
- actionId,
- this.currentTour.getCurrentStep().id,
- )
- ) {
- setTimeout(
- () => this.currentTour.next(),
- this.tourProviderService.getTime(),
- );
- }
- }
- }
-
- shouldTrigger(actionId, currentStep) {
- return this.currentTourSettings.matchingSteps.some(el => {
- return el.actionId === actionId && el.currentStep === currentStep;
- });
- }
-
- isTourActive() {
- return Shepherd.activeTour;
- }
-
- hideCurrentStep() {
- Shepherd.activeTour.getCurrentStep().hide();
- }
-
- switchAndStartDashboardTour() {
- this.router.navigateByUrl('dashboard');
- }
-
- startPipelineTour() {
- this.startTour(this.tourProviderService.getTourById('create-pipeline'));
- }
-
- startDashboardTour() {
- this.startTour(this.tourProviderService.getTourById('dashboard'));
- }
-
- startAdapterTour() {
- this.startTour(this.tourProviderService.getTourById('adapter'));
- }
-
- changeTutorialStatus(tutorialActive: boolean): void {
- this.tutorialActive = tutorialActive;
- this.tutorialActive$.next(tutorialActive);
- }
-}
diff --git a/ui/src/app/services/tour/tour-provider.service.ts b/ui/src/app/services/tour/tour-provider.service.ts
deleted file mode 100644
index 7595df79b0..0000000000
--- a/ui/src/app/services/tour/tour-provider.service.ts
+++ /dev/null
@@ -1,57 +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 createPipelineTourConstants from './create-pipeline-tour.constants';
-import dashboardTourConstants from './dashboard-tour.constants';
-import adapterTourConstants from './adapter-tour.constants';
-import { Injectable } from '@angular/core';
-
-@Injectable({ providedIn: 'root' })
-export class TourProviderService {
- guidedTours: any;
-
- // This is needed to configure the time in cypress test cases
- time: any;
-
- constructor() {
- this.guidedTours = [];
- this.guidedTours.push(createPipelineTourConstants.createPipelineTour);
- this.guidedTours.push(dashboardTourConstants.dashboardTour);
- this.guidedTours.push(adapterTourConstants.adapterTour);
- this.time = 500;
- }
-
- getAvailableTours() {
- return this.guidedTours;
- }
-
- getTourById(tourId) {
- return this.guidedTours.find(tour => {
- return tour.id === tourId;
- });
- }
-
- // This is needed to configure the time in cypress test cases
- setTime(newTime) {
- this.time = newTime;
- }
-
- getTime() {
- return this.time;
- }
-}
diff --git a/ui/src/scss/main.scss b/ui/src/scss/main.scss
index 7bd22b90b1..ec67fb1ec2 100644
--- a/ui/src/scss/main.scss
+++ b/ui/src/scss/main.scss
@@ -20,7 +20,6 @@
@use '@fortawesome/fontawesome-free/css/all.css';
@use '@jsplumb/browser-ui/css/jsplumbtoolkit.css';
-@use 'shepherd.js/dist/css/shepherd.css';
@use 'leaflet/dist/leaflet.css';
@use 'material-icons/iconfont/material-icons.css';
@use 'quill/dist/quill.snow.css';
@@ -28,8 +27,6 @@
@use 'roboto-fontface/css/roboto/roboto-fontface.css';
-@use './sp/shepherd-new';
-
@use './sp/main';
@use './sp/spinner';
@use './sp/feature-card';
diff --git a/ui/src/scss/sp/shepherd-new.scss b/ui/src/scss/sp/shepherd-new.scss
deleted file mode 100644
index bee5f42550..0000000000
--- a/ui/src/scss/sp/shepherd-new.scss
+++ /dev/null
@@ -1,240 +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.
- *
- */
-
-@use './variables' as spThemeVars;
-@use '../custom-theme/custom-variables' as customThemeVars;
-
-.shepherd-button {
- background: var(--color-primary);
- border: 0;
- border-radius: 3px;
- color: hsla(0, 0%, 100%, 0.75);
- cursor: pointer;
- margin-right: 0.5rem;
- padding: 0.5rem 1.5rem;
- transition: all 0.5s ease;
-}
-
-.shepherd-button:not(:disabled):hover {
- background: var(--color-primary-alt);
- color: hsla(0, 0%, 100%, 0.75);
-}
-
-.shepherd-button.shepherd-button-secondary {
- background: #f1f2f3;
- color: rgba(0, 0, 0, 0.75);
-}
-
-.shepherd-button.shepherd-button-secondary:not(:disabled):hover {
- background: #d6d9db;
- color: rgba(0, 0, 0, 0.75);
-}
-
-.shepherd-button:disabled {
- cursor: not-allowed;
-}
-
-.shepherd-footer {
- border-bottom-left-radius: 5px;
- border-bottom-right-radius: 5px;
- display: flex;
- justify-content: flex-end;
- padding: 0 0.75rem 0.75rem;
- background: white;
-}
-
-.shepherd-footer .shepherd-button:last-child {
- margin-right: 0;
-}
-
-.shepherd-cancel-icon {
- background: transparent;
- border: none;
- color: hsla(0, 0%, 50%, 0.75);
- cursor: pointer;
- font-size: 2em;
- font-weight: 400;
- margin: 0;
- padding: 0;
- transition: color 0.5s ease;
-}
-
-.shepherd-cancel-icon:hover {
- color: rgba(0, 0, 0, 0.75);
-}
-
-.shepherd-has-title .shepherd-content .shepherd-cancel-icon {
- color: hsla(0, 0%, 50%, 0.75);
-}
-
-.shepherd-has-title .shepherd-content .shepherd-cancel-icon:hover {
- color: rgba(0, 0, 0, 0.75);
-}
-
-.shepherd-title {
- color: #fff;
- display: flex;
- flex: 1 0 auto;
- font-size: 1rem;
- font-weight: 400;
- margin: 0;
- padding: 0;
-}
-
-.shepherd-header {
- align-items: center;
- border-top-left-radius: 5px;
- border-top-right-radius: 5px;
- display: flex;
- justify-content: flex-end;
- line-height: 2em;
- padding: 0.75rem 0.75rem 0;
-}
-
-.shepherd-has-title .shepherd-content .shepherd-header {
- background: var(--color-primary);
- padding: 1em;
-}
-
-.shepherd-text {
- color: rgba(0, 0, 0, 0.75);
- font-size: 1rem;
- line-height: 1.3em;
- padding: 0.75em;
- background: white;
-}
-
-.shepherd-text p {
- margin-top: 0;
-}
-
-.shepherd-text p:last-child {
- margin-bottom: 0;
-}
-
-.shepherd-content {
- border-radius: 5px;
- outline: none;
- padding: 0;
-}
-
-.shepherd-element {
- background: #fafafa;
- border-radius: 5px;
- box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
- max-width: 400px;
- opacity: 0;
- outline: none;
- transition:
- opacity 0.3s,
- visibility 0.3s;
- visibility: hidden;
- width: 100%;
- z-index: 9999;
-}
-
-.shepherd-enabled.shepherd-element {
- opacity: 1;
- visibility: visible;
-}
-
-.shepherd-element[data-popper-reference-hidden]:not(.shepherd-centered) {
- opacity: 0;
- pointer-events: none;
- visibility: hidden;
-}
-
-.shepherd-element,
-.shepherd-element *,
-.shepherd-element :after,
-.shepherd-element :before {
- box-sizing: border-box;
-}
-
-.shepherd-arrow,
-.shepherd-arrow:before {
- height: 16px;
- position: absolute;
- width: 16px;
-}
-
-.shepherd-arrow:before {
- background: lightblue;
- content: '';
- transform: rotate(45deg);
-}
-
-.shepherd-element[data-popper-placement^='top'] > .shepherd-arrow {
- bottom: -8px;
-}
-
-.shepherd-element[data-popper-placement^='bottom'] > .shepherd-arrow {
- top: -8px;
-}
-
-.shepherd-element[data-popper-placement^='left'] > .shepherd-arrow {
- right: -8px;
-}
-
-.shepherd-element[data-popper-placement^='right'] > .shepherd-arrow {
- left: -8px;
-}
-
-.shepherd-element.shepherd-centered > .shepherd-arrow {
- opacity: 0;
-}
-
-.shepherd-element.shepherd-has-title[data-popper-placement^='bottom']
- > .shepherd-arrow:before {
- background-color: #e6e6e6;
-}
-
-.shepherd-target-click-disabled.shepherd-enabled.shepherd-target,
-.shepherd-target-click-disabled.shepherd-enabled.shepherd-target * {
- pointer-events: none;
-}
-
-.shepherd-modal-overlay-container {
- height: 0;
- left: 0;
- opacity: 0;
- overflow: hidden;
- pointer-events: none;
- position: fixed;
- top: 0;
- transition:
- all 0.3s ease-out,
- height 0ms 0.3s,
- opacity 0.3s 0ms;
- width: 100vw;
- z-index: 9997;
-}
-
-.shepherd-modal-overlay-container.shepherd-modal-is-visible {
- height: 100vh;
- opacity: 0.5;
- transform: translateZ(0);
- transition:
- all 0.3s ease-out,
- height 0s 0s,
- opacity 0.3s 0s;
-}
-
-.shepherd-modal-overlay-container.shepherd-modal-is-visible path {
- pointer-events: all;
-}