You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2022/10/18 14:14:56 UTC
[incubator-streampipes] 02/02: [STREAMPIPES-598] Add adapter metrics
This is an automated email from the ASF dual-hosted git repository.
riemer pushed a commit to branch STREAMPIPES-598
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit 03ad75f619764269d7d19862667b94608e44496a
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Tue Oct 18 16:14:41 2022 +0200
[STREAMPIPES-598] Add adapter metrics
---
.../backend/StreamPipesResourceConfig.java | 1 +
streampipes-connect/pom.xml | 5 ++
.../elements/SendToBrokerAdapterSink.java | 17 ++++--
.../simulator/machine/MachineDataSimulator.java | 3 +-
.../monitoring/pipeline/ExtensionsLogProvider.java | 4 ++
.../rest/impl/AbstractMonitoringResource.java | 29 +++++-----
.../rest/impl/AdapterMonitoringResource.java | 28 ++++++++++
.../streampipes/rest/impl/PipelineMonitoring.java | 9 +--
.../src/lib/apis/abstract-monitoring.service.ts | 48 ++++++++++++++++
...ng.service.ts => adapter-monitoring.service.ts} | 40 +++++---------
.../src/lib/apis/pipeline-monitoring.service.ts | 28 +++-------
.../platform-services/src/public-api.ts | 1 +
.../abstract-adapter-details.directive.ts | 64 ++++++++++++++++++++++
.../adapter-details-logs.component.html} | 29 ++++++----
.../adapter-details-logs.component.scss} | 18 ------
.../adapter-details-logs.component.ts | 54 ++++++++++++++++++
.../adapter-details-metrics.component.html | 54 ++++++++++++++++++
.../adapter-details-metrics.component.scss} | 18 ------
.../adapter-details-metrics.component.ts | 56 +++++++++++++++++++
.../adapter-details-overview.component.html} | 20 +++----
.../adapter-details-overview.component.scss} | 18 ------
.../adapter-details-overview.component.ts | 46 ++++++++++++++++
.../adapter-details/adapter-details-tabs.ts} | 25 ++++-----
.../existing-adapters.component.html | 19 ++++++-
.../existing-adapters.component.ts | 4 ++
ui/src/app/connect/connect.module.ts | 27 +++++++--
ui/src/app/core-ui/core-ui.module.ts | 5 +-
.../status/status-widget.component.css | 0
.../status/status-widget.component.html | 4 +-
.../status/status-widget.component.ts | 3 +
.../pipeline-logs/pipeline-logs.component.html | 1 +
.../pipeline-details/pipeline-details.module.ts | 2 -
32 files changed, 503 insertions(+), 177 deletions(-)
diff --git a/streampipes-backend/src/main/java/org/apache/streampipes/backend/StreamPipesResourceConfig.java b/streampipes-backend/src/main/java/org/apache/streampipes/backend/StreamPipesResourceConfig.java
index 96ccf69aa..c55e23fc0 100644
--- a/streampipes-backend/src/main/java/org/apache/streampipes/backend/StreamPipesResourceConfig.java
+++ b/streampipes-backend/src/main/java/org/apache/streampipes/backend/StreamPipesResourceConfig.java
@@ -49,6 +49,7 @@ public class StreamPipesResourceConfig extends ResourceConfig {
public StreamPipesResourceConfig() {
setProperties(Collections.singletonMap("jersey.config.server.response.setStatusOverSendError", true));
register(AccountActivationResource.class);
+ register(AdapterMonitoringResource.class);
register(Authentication.class);
register(AssetDashboardResource.class);
register(AssetManagementResource.class);
diff --git a/streampipes-connect/pom.xml b/streampipes-connect/pom.xml
index f3fc31f6b..55f2cdd29 100755
--- a/streampipes-connect/pom.xml
+++ b/streampipes-connect/pom.xml
@@ -39,6 +39,11 @@
<artifactId>streampipes-connect-api</artifactId>
<version>0.71.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.streampipes</groupId>
+ <artifactId>streampipes-container</artifactId>
+ <version>0.71.0-SNAPSHOT</version>
+ </dependency>
<dependency>
<groupId>org.apache.streampipes</groupId>
<artifactId>streampipes-dataformat-json</artifactId>
diff --git a/streampipes-connect/src/main/java/org/apache/streampipes/connect/adapter/preprocessing/elements/SendToBrokerAdapterSink.java b/streampipes-connect/src/main/java/org/apache/streampipes/connect/adapter/preprocessing/elements/SendToBrokerAdapterSink.java
index 8ba2652da..048b71b55 100644
--- a/streampipes-connect/src/main/java/org/apache/streampipes/connect/adapter/preprocessing/elements/SendToBrokerAdapterSink.java
+++ b/streampipes-connect/src/main/java/org/apache/streampipes/connect/adapter/preprocessing/elements/SendToBrokerAdapterSink.java
@@ -20,11 +20,14 @@ package org.apache.streampipes.connect.adapter.preprocessing.elements;
import org.apache.streampipes.commons.exceptions.SpRuntimeException;
import org.apache.streampipes.connect.api.IAdapterPipelineElement;
import org.apache.streampipes.connect.adapter.util.TransportFormatSelector;
+import org.apache.streampipes.container.monitoring.SpMonitoringManager;
import org.apache.streampipes.dataformat.SpDataFormatDefinition;
import org.apache.streampipes.messaging.EventProducer;
+import org.apache.streampipes.model.StreamPipesErrorMessage;
import org.apache.streampipes.model.connect.adapter.AdapterDescription;
import org.apache.streampipes.model.grounding.TransportFormat;
import org.apache.streampipes.model.grounding.TransportProtocol;
+import org.apache.streampipes.model.monitoring.SpLogEntry;
import java.util.Map;
import java.util.function.Supplier;
@@ -68,18 +71,20 @@ public abstract class SendToBrokerAdapterSink<T extends TransportProtocol> imple
public Map<String, Object> process(Map<String, Object> event) {
try {
if (event != null) {
- if ("true".equals(System.getenv("SP_DEBUG_CONNECT"))) {
- event.put("internal_t2", System.currentTimeMillis());
- }
sendToBroker(dataFormatDefinition.fromMap(event));
+ SpMonitoringManager.INSTANCE.increaseOutCounter(
+ adapterDescription.getElementId(),
+ System.currentTimeMillis());
}
- } catch (Exception e) {
- e.printStackTrace();
+ } catch (RuntimeException e) {
+ SpMonitoringManager.INSTANCE.addErrorMessage(
+ adapterDescription.getElementId(),
+ SpLogEntry.from(System.currentTimeMillis(), StreamPipesErrorMessage.from(e)));
}
return null;
}
- protected void sendToBroker(byte[] event) throws Exception {
+ protected void sendToBroker(byte[] event) throws RuntimeException {
producer.publish(event);
}
diff --git a/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/java/org/apache/streampipes/connect/iiot/adapters/simulator/machine/MachineDataSimulator.java b/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/java/org/apache/streampipes/connect/iiot/adapters/simulator/machine/MachineDataSimulator.java
index 8a7581256..ee3b18be7 100644
--- a/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/java/org/apache/streampipes/connect/iiot/adapters/simulator/machine/MachineDataSimulator.java
+++ b/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/java/org/apache/streampipes/connect/iiot/adapters/simulator/machine/MachineDataSimulator.java
@@ -15,8 +15,9 @@ package org.apache.streampipes.connect.iiot.adapters.simulator.machine;/*
* limitations under the License.
*
*/
-import org.apache.streampipes.connect.api.exception.AdapterException;
+
import org.apache.streampipes.connect.adapter.model.pipeline.AdapterPipeline;
+import org.apache.streampipes.connect.api.exception.AdapterException;
import java.util.HashMap;
import java.util.Map;
diff --git a/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/monitoring/pipeline/ExtensionsLogProvider.java b/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/monitoring/pipeline/ExtensionsLogProvider.java
index e9365da28..87b9c61e8 100644
--- a/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/monitoring/pipeline/ExtensionsLogProvider.java
+++ b/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/monitoring/pipeline/ExtensionsLogProvider.java
@@ -81,6 +81,10 @@ public enum ExtensionsLogProvider {
return allLogInfos.get(resourceId);
}
+ public SpMetricsEntry getMetricInfosForAdapter(String resourceId) {
+ return allMetricsInfos.get(resourceId);
+ }
+
public Map<String, SpMetricsEntry> getMetricInfosForPipeline(String pipelineId) {
var pipeline = PipelineManager.getPipeline(pipelineId);
diff --git a/ui/src/app/pipeline-details/components/monitoring/widget/status/status-widget.component.css b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/AbstractMonitoringResource.java
similarity index 62%
copy from ui/src/app/pipeline-details/components/monitoring/widget/status/status-widget.component.css
copy to streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/AbstractMonitoringResource.java
index 14e119862..5e5f85227 100644
--- a/ui/src/app/pipeline-details/components/monitoring/widget/status/status-widget.component.css
+++ b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/AbstractMonitoringResource.java
@@ -16,20 +16,19 @@
*
*/
-.statusValue {
- font-size: 40pt;
- background: darkblue;
- color: white;
- margin:5px;
- min-height:140px;
- padding: 15px;
-}
+package org.apache.streampipes.rest.impl;
-.statusValue>h4 {
- font-size:20pt;
- margin-bottom: 30px;
-}
+import org.apache.streampipes.manager.monitoring.pipeline.ExtensionsServiceLogExecutor;
+import org.apache.streampipes.rest.core.base.impl.AbstractAuthGuardedRestResource;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.core.Response;
-.fix-margin {
- margin-top: -5px;
-}
\ No newline at end of file
+public abstract class AbstractMonitoringResource extends AbstractAuthGuardedRestResource {
+
+ @GET
+ public Response triggerMonitoringUpdate() {
+ new ExtensionsServiceLogExecutor().triggerUpdate();
+ return ok();
+ }
+}
diff --git a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/AdapterMonitoringResource.java b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/AdapterMonitoringResource.java
new file mode 100644
index 000000000..76b53d06b
--- /dev/null
+++ b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/AdapterMonitoringResource.java
@@ -0,0 +1,28 @@
+package org.apache.streampipes.rest.impl;
+
+import org.apache.streampipes.manager.monitoring.pipeline.ExtensionsLogProvider;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+@Path("/v2/adapter-monitoring")
+public class AdapterMonitoringResource extends AbstractMonitoringResource {
+
+ @Path("adapter/{elementId}/logs")
+ @GET
+ @Produces(MediaType.APPLICATION_JSON)
+ public Response getLogInfoForAdapter(@PathParam("elementId") String elementId) {
+ return ok(ExtensionsLogProvider.INSTANCE.getLogInfosForAdapter(elementId));
+ }
+
+ @Path("adapter/{elementId}/metrics")
+ @GET
+ @Produces(MediaType.APPLICATION_JSON)
+ public Response getMetricsInfoForAdapter(@PathParam("elementId") String elementId) {
+ return ok(ExtensionsLogProvider.INSTANCE.getMetricInfosForAdapter(elementId));
+ }
+}
diff --git a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/PipelineMonitoring.java b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/PipelineMonitoring.java
index f3f34cde2..90be6c198 100644
--- a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/PipelineMonitoring.java
+++ b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/PipelineMonitoring.java
@@ -18,9 +18,7 @@
package org.apache.streampipes.rest.impl;
import org.apache.streampipes.manager.monitoring.pipeline.ExtensionsLogProvider;
-import org.apache.streampipes.manager.monitoring.pipeline.ExtensionsServiceLogExecutor;
import org.apache.streampipes.rest.api.IPipelineMonitoring;
-import org.apache.streampipes.rest.core.base.impl.AbstractRestResource;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
@@ -30,7 +28,7 @@ import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
@Path("/v2/pipeline-monitoring")
-public class PipelineMonitoring extends AbstractRestResource implements IPipelineMonitoring {
+public class PipelineMonitoring extends AbstractMonitoringResource implements IPipelineMonitoring {
@Path("pipeline/{pipelineId}/logs")
@GET
@@ -48,9 +46,4 @@ public class PipelineMonitoring extends AbstractRestResource implements IPipelin
return ok(ExtensionsLogProvider.INSTANCE.getMetricInfosForPipeline(pipelineId));
}
- @GET
- public Response triggerMonitoringUpdate() {
- new ExtensionsServiceLogExecutor().triggerUpdate();
- return ok();
- }
}
diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/abstract-monitoring.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/abstract-monitoring.service.ts
new file mode 100644
index 000000000..81dca975a
--- /dev/null
+++ b/ui/projects/streampipes/platform-services/src/lib/apis/abstract-monitoring.service.ts
@@ -0,0 +1,48 @@
+/*
+ * 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 { Observable } from 'rxjs';
+import { HttpClient } from '@angular/common/http';
+import { PlatformServicesCommons } from './commons.service';
+
+export abstract class AbstractMonitoringService {
+
+ constructor(protected http: HttpClient,
+ protected platformServicesCommons: PlatformServicesCommons) {
+ }
+
+ triggerMonitoringUpdate(): Observable<any> {
+ return this.http.get(this.monitoringBasePath);
+ }
+
+ protected logUrl(elementId: string): string {
+ return `${this.monitoringUrl(elementId)}/logs`;
+ }
+
+ protected metricsUrl(elementId: string): string {
+ return`${this.monitoringUrl(elementId)}/metrics`;
+ }
+
+ protected monitoringUrl(elementId): string {
+ return `${this.monitoringBasePath}/${this.monitoringPathAppendix}/${encodeURIComponent(elementId)}`;
+ }
+
+ protected abstract get monitoringBasePath();
+
+ protected abstract get monitoringPathAppendix();
+}
diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-monitoring.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/adapter-monitoring.service.ts
similarity index 51%
copy from ui/projects/streampipes/platform-services/src/lib/apis/pipeline-monitoring.service.ts
copy to ui/projects/streampipes/platform-services/src/lib/apis/adapter-monitoring.service.ts
index 88a029303..3a8314a0c 100644
--- a/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-monitoring.service.ts
+++ b/ui/projects/streampipes/platform-services/src/lib/apis/adapter-monitoring.service.ts
@@ -22,44 +22,34 @@ import { Observable } from 'rxjs';
import { PipelineMonitoringInfo, SpLogEntry, SpMetricsEntry } from '../model/gen/streampipes-model';
import { PlatformServicesCommons } from './commons.service';
import { map } from 'rxjs/operators';
+import { AbstractMonitoringService } from './abstract-monitoring.service';
@Injectable({
providedIn: 'root'
})
-export class PipelineMonitoringService {
+export class AdapterMonitoringService extends AbstractMonitoringService {
- constructor(private http: HttpClient,
- private platformServicesCommons: PlatformServicesCommons) {
+ constructor(http: HttpClient,
+ platformServicesCommons: PlatformServicesCommons) {
+ super(http, platformServicesCommons);
}
- triggerMonitoringUpdate(): Observable<any> {
- return this.http.get(this.monitoringBasePath);
+ getLogInfoForAdapter(elementId: string): Observable<SpLogEntry[]> {
+ return this.http.get(this.logUrl(elementId))
+ .pipe(map(response => response as SpLogEntry[]));
}
- getLogInfoForPipeline(pipelineId: string): Observable<Record<string, SpLogEntry[]>> {
- return this.http.get(this.logUrl(pipelineId))
- .pipe(map(response => response as Record<string, SpLogEntry[]>));
+ getMetricsInfoForAdapter(elementId: string): Observable<SpMetricsEntry> {
+ return this.http.get(this.metricsUrl(elementId))
+ .pipe(map(response => response as SpMetricsEntry));
}
- getMetricsInfoForPipeline(pipelineId: string): Observable<Record<string, SpMetricsEntry>> {
- return this.http.get(this.metricsUrl(pipelineId))
- .pipe(map(response => response as Record<string, SpMetricsEntry>));
+ protected get monitoringBasePath(): string {
+ return `${this.platformServicesCommons.apiBasePath}/adapter-monitoring`;
}
- private logUrl(pipelineId: string): string {
- return `${this.monitoringUrl(pipelineId)}/logs`;
- }
-
- private metricsUrl(pipelineId: string): string {
- return`${this.monitoringUrl(pipelineId)}/metrics`;
- }
-
- private monitoringUrl(pipelineId): string {
- return `${this.monitoringBasePath}/pipeline/${pipelineId}`;
- }
-
- private get monitoringBasePath(): string {
- return `${this.platformServicesCommons.apiBasePath}/pipeline-monitoring`;
+ protected get monitoringPathAppendix(): string {
+ return 'adapter';
}
}
diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-monitoring.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-monitoring.service.ts
index 88a029303..7816b9eea 100644
--- a/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-monitoring.service.ts
+++ b/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-monitoring.service.ts
@@ -22,18 +22,16 @@ import { Observable } from 'rxjs';
import { PipelineMonitoringInfo, SpLogEntry, SpMetricsEntry } from '../model/gen/streampipes-model';
import { PlatformServicesCommons } from './commons.service';
import { map } from 'rxjs/operators';
+import { AbstractMonitoringService } from './abstract-monitoring.service';
@Injectable({
providedIn: 'root'
})
-export class PipelineMonitoringService {
+export class PipelineMonitoringService extends AbstractMonitoringService {
- constructor(private http: HttpClient,
- private platformServicesCommons: PlatformServicesCommons) {
- }
-
- triggerMonitoringUpdate(): Observable<any> {
- return this.http.get(this.monitoringBasePath);
+ constructor(http: HttpClient,
+ platformServicesCommons: PlatformServicesCommons) {
+ super(http, platformServicesCommons);
}
getLogInfoForPipeline(pipelineId: string): Observable<Record<string, SpLogEntry[]>> {
@@ -46,20 +44,12 @@ export class PipelineMonitoringService {
.pipe(map(response => response as Record<string, SpMetricsEntry>));
}
- private logUrl(pipelineId: string): string {
- return `${this.monitoringUrl(pipelineId)}/logs`;
- }
-
- private metricsUrl(pipelineId: string): string {
- return`${this.monitoringUrl(pipelineId)}/metrics`;
- }
-
- private monitoringUrl(pipelineId): string {
- return `${this.monitoringBasePath}/pipeline/${pipelineId}`;
+ protected get monitoringBasePath(): string {
+ return `${this.platformServicesCommons.apiBasePath}/pipeline-monitoring`;
}
- private get monitoringBasePath(): string {
- return `${this.platformServicesCommons.apiBasePath}/pipeline-monitoring`;
+ protected get monitoringPathAppendix(): string {
+ return 'pipeline';
}
}
diff --git a/ui/projects/streampipes/platform-services/src/public-api.ts b/ui/projects/streampipes/platform-services/src/public-api.ts
index e686a6e4b..d032d4d15 100644
--- a/ui/projects/streampipes/platform-services/src/public-api.ts
+++ b/ui/projects/streampipes/platform-services/src/public-api.ts
@@ -25,6 +25,7 @@ export * from './lib/platform-services.module';
export * from './lib/apis/commons.service';
export * from './lib/apis/adapter.service';
+export * from './lib/apis/adapter-monitoring.service';
export * from './lib/apis/asset-management.service';
export * from './lib/apis/data-view-data-explorer.service';
export * from './lib/apis/datalake-rest.service';
diff --git a/ui/src/app/connect/components/adapter-details/abstract-adapter-details.directive.ts b/ui/src/app/connect/components/adapter-details/abstract-adapter-details.directive.ts
new file mode 100644
index 000000000..f0f2d5d40
--- /dev/null
+++ b/ui/src/app/connect/components/adapter-details/abstract-adapter-details.directive.ts
@@ -0,0 +1,64 @@
+/*
+ * 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 { AuthService } from '../../../services/auth.service';
+import { ActivatedRoute } from '@angular/router';
+import { AdapterDescriptionUnion, AdapterService, AdapterMonitoringService } from '@streampipes/platform-services';
+import { SpNavigationItem } from '@streampipes/shared-ui';
+import { SpAdapterDetailsTabs } from './adapter-details-tabs';
+
+export abstract class SpAbstractAdapterDetailsDirective {
+
+ currentAdapterId: string;
+ tabs: SpNavigationItem[] = [];
+ adapter: AdapterDescriptionUnion;
+
+
+ constructor(protected authService: AuthService,
+ protected activatedRoute: ActivatedRoute,
+ protected adapterService: AdapterService,
+ protected adapterMonitoringService: AdapterMonitoringService) {
+ }
+
+ onInit(): void {
+ this.authService.user$.subscribe(user => {
+ const elementId = this.activatedRoute.snapshot.params.elementId;
+ if (elementId) {
+ this.tabs = new SpAdapterDetailsTabs().getTabs(elementId);
+ this.currentAdapterId = elementId;
+ this.loadAdapter();
+ }
+ });
+ }
+
+ loadAdapter(): void {
+ this.adapterService.getAdapter(this.currentAdapterId).subscribe(res => {
+ this.adapter = res;
+ this.onAdapterLoaded();
+ });
+ }
+
+ triggerUpdate(): void {
+ this.adapterMonitoringService.triggerMonitoringUpdate().subscribe(() => {
+ this.onAdapterLoaded();
+ });
+ }
+
+ abstract onAdapterLoaded(): void;
+
+}
diff --git a/ui/src/app/pipeline-details/components/monitoring/widget/status/status-widget.component.html b/ui/src/app/connect/components/adapter-details/adapter-details-logs/adapter-details-logs.component.html
similarity index 63%
copy from ui/src/app/pipeline-details/components/monitoring/widget/status/status-widget.component.html
copy to ui/src/app/connect/components/adapter-details/adapter-details-logs/adapter-details-logs.component.html
index fe11e2a8f..ba88a3927 100644
--- a/ui/src/app/pipeline-details/components/monitoring/widget/status/status-widget.component.html
+++ b/ui/src/app/connect/components/adapter-details/adapter-details-logs/adapter-details-logs.component.html
@@ -16,14 +16,21 @@
~
-->
-<div fxFlex="100" fxLayoutAlign="center center" fxLayout="column">
- <ngx-charts-number-card style="width:400px;"
- [view]="[400,150]"
- [results]="chartData"
- [scheme]="'cool'"
- [cardColor]="color"
- [animations]="false"
- [bandColor]="bandColor"
- [textColor]="textColor">
- </ngx-charts-number-card>
-</div>
+<sp-basic-nav-tabs [spNavigationItems]="tabs"
+ [activeLink]="'logs'"
+ [showBackLink]="true"
+ [backLinkTarget]="['connect']">
+
+ <div nav fxFlex="100" fxLayout="row" fxLayoutAlign="end center">
+ <button mat-button
+ mat-icon-button
+ color="accent"
+ class="mr-10"
+ matTooltip="Refresh"
+ (click)="triggerUpdate()">
+ </button>
+ </div>
+ <h1>Logs</h1>
+
+
+</sp-basic-nav-tabs>
diff --git a/ui/src/app/pipeline-details/components/monitoring/widget/status/status-widget.component.css b/ui/src/app/connect/components/adapter-details/adapter-details-logs/adapter-details-logs.component.scss
similarity index 76%
copy from ui/src/app/pipeline-details/components/monitoring/widget/status/status-widget.component.css
copy to ui/src/app/connect/components/adapter-details/adapter-details-logs/adapter-details-logs.component.scss
index 14e119862..13cbc4aac 100644
--- a/ui/src/app/pipeline-details/components/monitoring/widget/status/status-widget.component.css
+++ b/ui/src/app/connect/components/adapter-details/adapter-details-logs/adapter-details-logs.component.scss
@@ -15,21 +15,3 @@
* limitations under the License.
*
*/
-
-.statusValue {
- font-size: 40pt;
- background: darkblue;
- color: white;
- margin:5px;
- min-height:140px;
- padding: 15px;
-}
-
-.statusValue>h4 {
- font-size:20pt;
- margin-bottom: 30px;
-}
-
-.fix-margin {
- margin-top: -5px;
-}
\ No newline at end of file
diff --git a/ui/src/app/connect/components/adapter-details/adapter-details-logs/adapter-details-logs.component.ts b/ui/src/app/connect/components/adapter-details/adapter-details-logs/adapter-details-logs.component.ts
new file mode 100644
index 000000000..92930bc3a
--- /dev/null
+++ b/ui/src/app/connect/components/adapter-details/adapter-details-logs/adapter-details-logs.component.ts
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+import { Component, OnInit } from '@angular/core';
+import { SpAbstractAdapterDetailsDirective } from '../abstract-adapter-details.directive';
+import { AuthService } from '../../../../services/auth.service';
+import { ActivatedRoute } from '@angular/router';
+import { AdapterService, AdapterMonitoringService, SpLogEntry } from '@streampipes/platform-services';
+
+@Component({
+ selector: 'sp-adapter-details-logs',
+ templateUrl: './adapter-details-logs.component.html',
+ styleUrls: ['./adapter-details-logs.component.scss']
+})
+export class SpAdapterDetailsLogsComponent extends SpAbstractAdapterDetailsDirective implements OnInit {
+
+ adapterLogs: SpLogEntry[];
+
+ constructor(authService: AuthService,
+ activatedRoute: ActivatedRoute,
+ adapterService: AdapterService,
+ adapterMonitoringService: AdapterMonitoringService) {
+ super(authService, activatedRoute, adapterService, adapterMonitoringService);
+ }
+
+ ngOnInit(): void {
+ super.onInit();
+ }
+
+ loadLogs(): void {
+ this.adapterMonitoringService.getLogInfoForAdapter(this.currentAdapterId).subscribe(res => {
+ this.adapterLogs = res;
+ });
+ }
+
+ onAdapterLoaded(): void {
+ }
+
+}
diff --git a/ui/src/app/connect/components/adapter-details/adapter-details-metrics/adapter-details-metrics.component.html b/ui/src/app/connect/components/adapter-details/adapter-details-metrics/adapter-details-metrics.component.html
new file mode 100644
index 000000000..2fc381645
--- /dev/null
+++ b/ui/src/app/connect/components/adapter-details/adapter-details-metrics/adapter-details-metrics.component.html
@@ -0,0 +1,54 @@
+<!--
+ ~ 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.
+ ~
+ -->
+
+<sp-basic-nav-tabs [spNavigationItems]="tabs"
+ [activeLink]="'metrics'"
+ [showBackLink]="true"
+ [backLinkTarget]="['connect']">
+ <div nav fxFlex="100" fxLayout="row" fxLayoutAlign="end center">
+ <button mat-button
+ mat-icon-button
+ color="accent"
+ class="mr-10"
+ matTooltip="Refresh"
+ (click)="triggerUpdate()">
+ <i class="material-icons">refresh</i>
+ </button>
+ </div>
+ <div fxFlex="100" fxLayout="column" *ngIf="adapter">
+ <sp-basic-header-title-component [title]="adapter.name + ' - Metrics'"></sp-basic-header-title-component>
+ <div fxLayout="row" fxLayoutAlign="center center">
+ <div fxFlex="50">
+ <sp-status-widget fxFlex="100" label="Last published message"
+ [widgetHeight]="400"
+ [widgetWidth]="500"
+ [statusValue]="adapterMetrics.lastTimestamp | date : 'medium'">
+ </sp-status-widget>
+ </div>
+ <div fxFlex="50">
+ <sp-status-widget fxFlex="100" label="Published messages"
+ [widgetHeight]="400"
+ [widgetWidth]="500"
+ [statusValue]="adapterMetrics.messagesOut.counter">
+ </sp-status-widget>
+ </div>
+ </div>
+ </div>
+
+
+</sp-basic-nav-tabs>
diff --git a/ui/src/app/pipeline-details/components/monitoring/widget/status/status-widget.component.css b/ui/src/app/connect/components/adapter-details/adapter-details-metrics/adapter-details-metrics.component.scss
similarity index 76%
copy from ui/src/app/pipeline-details/components/monitoring/widget/status/status-widget.component.css
copy to ui/src/app/connect/components/adapter-details/adapter-details-metrics/adapter-details-metrics.component.scss
index 14e119862..13cbc4aac 100644
--- a/ui/src/app/pipeline-details/components/monitoring/widget/status/status-widget.component.css
+++ b/ui/src/app/connect/components/adapter-details/adapter-details-metrics/adapter-details-metrics.component.scss
@@ -15,21 +15,3 @@
* limitations under the License.
*
*/
-
-.statusValue {
- font-size: 40pt;
- background: darkblue;
- color: white;
- margin:5px;
- min-height:140px;
- padding: 15px;
-}
-
-.statusValue>h4 {
- font-size:20pt;
- margin-bottom: 30px;
-}
-
-.fix-margin {
- margin-top: -5px;
-}
\ No newline at end of file
diff --git a/ui/src/app/connect/components/adapter-details/adapter-details-metrics/adapter-details-metrics.component.ts b/ui/src/app/connect/components/adapter-details/adapter-details-metrics/adapter-details-metrics.component.ts
new file mode 100644
index 000000000..94d4c77cb
--- /dev/null
+++ b/ui/src/app/connect/components/adapter-details/adapter-details-metrics/adapter-details-metrics.component.ts
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+import { Component, OnInit } from '@angular/core';
+import { SpAbstractAdapterDetailsDirective } from '../abstract-adapter-details.directive';
+import { AuthService } from '../../../../services/auth.service';
+import { ActivatedRoute } from '@angular/router';
+import { AdapterService, AdapterMonitoringService, SpMetricsEntry } from '@streampipes/platform-services';
+
+@Component({
+ selector: 'sp-adapter-details-metrics',
+ templateUrl: './adapter-details-metrics.component.html',
+ styleUrls: ['./adapter-details-metrics.component.scss']
+})
+export class SpAdapterDetailsMetricsComponent extends SpAbstractAdapterDetailsDirective implements OnInit {
+
+ adapterMetrics: SpMetricsEntry;
+
+ constructor(authService: AuthService,
+ activatedRoute: ActivatedRoute,
+ adapterService: AdapterService,
+ adapterMonitoringService: AdapterMonitoringService) {
+ super(authService, activatedRoute, adapterService, adapterMonitoringService);
+ }
+
+ ngOnInit(): void {
+ super.onInit();
+ }
+
+ loadMetrics(): void {
+ this.adapterMonitoringService.getMetricsInfoForAdapter(this.currentAdapterId).subscribe(res => {
+ this.adapterMetrics = res;
+ console.log(res);
+ });
+ }
+
+ onAdapterLoaded(): void {
+ this.loadMetrics();
+ }
+
+}
diff --git a/ui/src/app/pipeline-details/components/monitoring/widget/status/status-widget.component.html b/ui/src/app/connect/components/adapter-details/adapter-details-overview/adapter-details-overview.component.html
similarity index 68%
copy from ui/src/app/pipeline-details/components/monitoring/widget/status/status-widget.component.html
copy to ui/src/app/connect/components/adapter-details/adapter-details-overview/adapter-details-overview.component.html
index fe11e2a8f..50cb84629 100644
--- a/ui/src/app/pipeline-details/components/monitoring/widget/status/status-widget.component.html
+++ b/ui/src/app/connect/components/adapter-details/adapter-details-overview/adapter-details-overview.component.html
@@ -16,14 +16,12 @@
~
-->
-<div fxFlex="100" fxLayoutAlign="center center" fxLayout="column">
- <ngx-charts-number-card style="width:400px;"
- [view]="[400,150]"
- [results]="chartData"
- [scheme]="'cool'"
- [cardColor]="color"
- [animations]="false"
- [bandColor]="bandColor"
- [textColor]="textColor">
- </ngx-charts-number-card>
-</div>
+<sp-basic-nav-tabs [spNavigationItems]="tabs"
+ [activeLink]="'overview'"
+ [showBackLink]="true"
+ [backLinkTarget]="['connect']">
+
+ <h1>Overview</h1>
+
+
+</sp-basic-nav-tabs>
diff --git a/ui/src/app/pipeline-details/components/monitoring/widget/status/status-widget.component.css b/ui/src/app/connect/components/adapter-details/adapter-details-overview/adapter-details-overview.component.scss
similarity index 76%
copy from ui/src/app/pipeline-details/components/monitoring/widget/status/status-widget.component.css
copy to ui/src/app/connect/components/adapter-details/adapter-details-overview/adapter-details-overview.component.scss
index 14e119862..13cbc4aac 100644
--- a/ui/src/app/pipeline-details/components/monitoring/widget/status/status-widget.component.css
+++ b/ui/src/app/connect/components/adapter-details/adapter-details-overview/adapter-details-overview.component.scss
@@ -15,21 +15,3 @@
* limitations under the License.
*
*/
-
-.statusValue {
- font-size: 40pt;
- background: darkblue;
- color: white;
- margin:5px;
- min-height:140px;
- padding: 15px;
-}
-
-.statusValue>h4 {
- font-size:20pt;
- margin-bottom: 30px;
-}
-
-.fix-margin {
- margin-top: -5px;
-}
\ No newline at end of file
diff --git a/ui/src/app/connect/components/adapter-details/adapter-details-overview/adapter-details-overview.component.ts b/ui/src/app/connect/components/adapter-details/adapter-details-overview/adapter-details-overview.component.ts
new file mode 100644
index 000000000..e739a1663
--- /dev/null
+++ b/ui/src/app/connect/components/adapter-details/adapter-details-overview/adapter-details-overview.component.ts
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+import { Component, OnInit } from '@angular/core';
+import { SpAbstractAdapterDetailsDirective } from '../abstract-adapter-details.directive';
+import { AuthService } from '../../../../services/auth.service';
+import { ActivatedRoute } from '@angular/router';
+import { AdapterService, AdapterMonitoringService } from '@streampipes/platform-services';
+
+@Component({
+ selector: 'sp-adapter-details-overview',
+ templateUrl: './adapter-details-overview.component.html',
+ styleUrls: ['./adapter-details-overview.component.scss']
+})
+export class SpAdapterDetailsOverviewComponent extends SpAbstractAdapterDetailsDirective implements OnInit {
+
+ constructor(authService: AuthService,
+ activatedRoute: ActivatedRoute,
+ adapterService: AdapterService,
+ adapterMonitoringService: AdapterMonitoringService) {
+ super(authService, activatedRoute, adapterService, adapterMonitoringService);
+ }
+
+ ngOnInit(): void {
+ super.onInit();
+ }
+
+ onAdapterLoaded(): void {
+ }
+
+}
diff --git a/ui/src/app/pipeline-details/components/monitoring/widget/status/status-widget.component.css b/ui/src/app/connect/components/adapter-details/adapter-details-tabs.ts
similarity index 62%
copy from ui/src/app/pipeline-details/components/monitoring/widget/status/status-widget.component.css
copy to ui/src/app/connect/components/adapter-details/adapter-details-tabs.ts
index 14e119862..88596c8d1 100644
--- a/ui/src/app/pipeline-details/components/monitoring/widget/status/status-widget.component.css
+++ b/ui/src/app/connect/components/adapter-details/adapter-details-tabs.ts
@@ -16,20 +16,15 @@
*
*/
-.statusValue {
- font-size: 40pt;
- background: darkblue;
- color: white;
- margin:5px;
- min-height:140px;
- padding: 15px;
-}
+import { SpNavigationItem } from '@streampipes/shared-ui';
-.statusValue>h4 {
- font-size:20pt;
- margin-bottom: 30px;
-}
+export class SpAdapterDetailsTabs {
-.fix-margin {
- margin-top: -5px;
-}
\ No newline at end of file
+ public getTabs(elementId: string): SpNavigationItem[] {
+ return [
+ {itemId: 'overview', itemTitle: 'Overview', itemLink: ['connect', 'details', elementId, 'overview']},
+ {itemId: 'metrics', itemTitle: 'Metrics', itemLink: ['connect', 'details', elementId, 'metrics']},
+ {itemId: 'logs', itemTitle: 'Logs', itemLink: ['connect', 'details', elementId, 'logs']}
+ ];
+ }
+}
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 e0113978b..b3acc3186 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
@@ -136,6 +136,19 @@
fxFlexOrder="1"
fxLayout="row"
fxLayoutAlign="center center">
+ <button color="accent"
+ mat-button mat-icon-button
+ matTooltip="Show details"
+ matTooltipPosition="above"
+ data-cy="details-adapter"
+ (click)="navigateToDetailsOverviewPage(adapter)">
+ <i class="material-icons">search</i>
+ </button>
+ </span>
+ <span fxFlex
+ fxFlexOrder="2"
+ fxLayout="row"
+ fxLayoutAlign="center center">
<button color="accent"
mat-button mat-icon-button
matTooltip="Show info"
@@ -146,7 +159,7 @@
</button>
</span>
<span fxFlex
- fxFlexOrder="2"
+ fxFlexOrder="3"
fxLayout="row"
fxLayoutAlign="center center"
*ngIf="isAdmin">
@@ -160,7 +173,7 @@
</button>
</span>
<span fxFlex
- fxFlexOrder="3"
+ fxFlexOrder="4"
fxLayout="row"
fxLayoutAlign="center center">
<button color="accent"
@@ -175,7 +188,7 @@
</button>
</span>
<span fxFlex
- fxFlexOrder="3"
+ fxFlexOrder="5"
fxLayout="row"
fxLayoutAlign="center center">
<button color="accent"
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 b14661a96..a87204fd6 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
@@ -202,4 +202,8 @@ export class ExistingAdaptersComponent implements OnInit {
}
}
+ navigateToDetailsOverviewPage(adapter: AdapterDescriptionUnion): void {
+ this.router.navigate(['connect', 'details', adapter.elementId, 'overview']);
+ }
+
}
diff --git a/ui/src/app/connect/connect.module.ts b/ui/src/app/connect/connect.module.ts
index f7d7f3374..b6a2d2e1d 100644
--- a/ui/src/app/connect/connect.module.ts
+++ b/ui/src/app/connect/connect.module.ts
@@ -114,6 +114,9 @@ import {
} from './components/adapter-configuration/adapter-configuration-header/adapter-configuration-header.component';
import { NewAdapterComponent } from './components/new-adapter/new-adapter.component';
import { EditAdapterComponent } from './components/edit-adapter/edit-adapter.component';
+import { SpAdapterDetailsOverviewComponent } from './components/adapter-details/adapter-details-overview/adapter-details-overview.component';
+import { SpAdapterDetailsLogsComponent } from './components/adapter-details/adapter-details-logs/adapter-details-logs.component';
+import { SpAdapterDetailsMetricsComponent } from './components/adapter-details/adapter-details-metrics/adapter-details-metrics.component';
@NgModule({
imports: [
@@ -153,7 +156,20 @@ import { EditAdapterComponent } from './components/edit-adapter/edit-adapter.com
{
path: 'edit/:elementId',
component: EditAdapterComponent,
- }]
+ },
+ {
+ path: 'details/:elementId/overview',
+ component: SpAdapterDetailsOverviewComponent
+ },
+ {
+ path: 'details/:elementId/metrics',
+ component: SpAdapterDetailsMetricsComponent
+ },
+ {
+ path: 'details/:elementId/logs',
+ component: SpAdapterDetailsLogsComponent
+ }
+ ]
}]),
SharedUiModule
],
@@ -162,6 +178,7 @@ import { EditAdapterComponent } from './components/edit-adapter/edit-adapter.com
ErrorMessageComponent
],
declarations: [
+ AdapterConfigurationHeaderComponent,
AdapterDescriptionComponent,
AdapterStartedDialog,
DataMarketplaceComponent,
@@ -181,7 +198,6 @@ import { EditAdapterComponent } from './components/edit-adapter/edit-adapter.com
FormatListComponent,
JsonPrettyPrintPipe,
AdapterConfigurationComponent,
- SpAdapterTemplateDialogComponent,
PipelineElementRuntimeInfoComponent,
TimestampPipe,
EditCorrectionValueComponent,
@@ -195,9 +211,12 @@ import { EditAdapterComponent } from './components/edit-adapter/edit-adapter.com
SpEpSettingsSectionComponent,
StartAdapterConfigurationComponent,
FormatItemJsonComponent,
- SpConnectFilterToolbarComponent,
+ SpAdapterDetailsOverviewComponent,
+ SpAdapterDetailsLogsComponent,
+ SpAdapterDetailsMetricsComponent,
SpAdapterOptionsPanelComponent,
- AdapterConfigurationHeaderComponent,
+ SpAdapterTemplateDialogComponent,
+ SpConnectFilterToolbarComponent,
NewAdapterComponent,
EditAdapterComponent
],
diff --git a/ui/src/app/core-ui/core-ui.module.ts b/ui/src/app/core-ui/core-ui.module.ts
index 5b5bfd027..fcc569664 100644
--- a/ui/src/app/core-ui/core-ui.module.ts
+++ b/ui/src/app/core-ui/core-ui.module.ts
@@ -97,6 +97,7 @@ import { SelectFormatComponent } from './data-download-dialog/components/select-
import { DownloadComponent } from './data-download-dialog/components/download/download.component';
import { SelectDataRangeComponent } from './data-download-dialog/components/select-data/select-data-range/select-data-range.component';
import { SelectDataMissingValuesComponent } from './data-download-dialog/components/select-data/select-data-missing-values/select-data-missing-values.component';
+import { StatusWidgetComponent } from './status/status-widget.component';
@NgModule({
imports: [
@@ -170,6 +171,7 @@ import { SelectDataMissingValuesComponent } from './data-download-dialog/compone
DownloadComponent,
SelectDataRangeComponent,
SelectDataMissingValuesComponent,
+ StatusWidgetComponent
],
providers: [
MatDatepickerModule,
@@ -208,7 +210,8 @@ import { SelectDataMissingValuesComponent } from './data-download-dialog/compone
ImageViewerComponent,
ErrorHintComponent,
PipelineStartedStatusComponent,
- SplitSectionComponent
+ SplitSectionComponent,
+ StatusWidgetComponent
]
})
export class CoreUiModule {
diff --git a/ui/src/app/pipeline-details/components/monitoring/widget/status/status-widget.component.css b/ui/src/app/core-ui/status/status-widget.component.css
similarity index 100%
rename from ui/src/app/pipeline-details/components/monitoring/widget/status/status-widget.component.css
rename to ui/src/app/core-ui/status/status-widget.component.css
diff --git a/ui/src/app/pipeline-details/components/monitoring/widget/status/status-widget.component.html b/ui/src/app/core-ui/status/status-widget.component.html
similarity index 90%
rename from ui/src/app/pipeline-details/components/monitoring/widget/status/status-widget.component.html
rename to ui/src/app/core-ui/status/status-widget.component.html
index fe11e2a8f..6b0782cce 100644
--- a/ui/src/app/pipeline-details/components/monitoring/widget/status/status-widget.component.html
+++ b/ui/src/app/core-ui/status/status-widget.component.html
@@ -17,8 +17,8 @@
-->
<div fxFlex="100" fxLayoutAlign="center center" fxLayout="column">
- <ngx-charts-number-card style="width:400px;"
- [view]="[400,150]"
+ <ngx-charts-number-card [ngStyle]="{width: widgetWidth + 'px'}"
+ [view]="[widgetWidth,widgetHeight]"
[results]="chartData"
[scheme]="'cool'"
[cardColor]="color"
diff --git a/ui/src/app/pipeline-details/components/monitoring/widget/status/status-widget.component.ts b/ui/src/app/core-ui/status/status-widget.component.ts
similarity index 96%
rename from ui/src/app/pipeline-details/components/monitoring/widget/status/status-widget.component.ts
rename to ui/src/app/core-ui/status/status-widget.component.ts
index 3e6a74340..425fd2dba 100644
--- a/ui/src/app/pipeline-details/components/monitoring/widget/status/status-widget.component.ts
+++ b/ui/src/app/core-ui/status/status-widget.component.ts
@@ -29,6 +29,9 @@ export class StatusWidgetComponent implements OnInit {
@Input() bandColor = 'rgb(27, 20, 100)';
@Input() textColor = 'rgb(96,96,96)';
+ @Input() widgetWidth = 400;
+ @Input() widgetHeight = 150;
+
_label: string;
_statusValue: string;
diff --git a/ui/src/app/pipeline-details/components/pipeline-logs/pipeline-logs.component.html b/ui/src/app/pipeline-details/components/pipeline-logs/pipeline-logs.component.html
index 2a1bf3f6f..475ab4714 100644
--- a/ui/src/app/pipeline-details/components/pipeline-logs/pipeline-logs.component.html
+++ b/ui/src/app/pipeline-details/components/pipeline-logs/pipeline-logs.component.html
@@ -28,6 +28,7 @@
class="mr-10"
matTooltip="Refresh"
(click)="triggerLogUpdate()">
+ <i class="material-icons">refresh</i>
</button>
</div>
<div fxLayout="column" class="page-container-padding" *ngIf="pipeline">
diff --git a/ui/src/app/pipeline-details/pipeline-details.module.ts b/ui/src/app/pipeline-details/pipeline-details.module.ts
index 21a1a417a..8f9813ec2 100644
--- a/ui/src/app/pipeline-details/pipeline-details.module.ts
+++ b/ui/src/app/pipeline-details/pipeline-details.module.ts
@@ -36,7 +36,6 @@ import { PipelineMonitoringComponent } from './components/monitoring/pipeline-mo
import { PipelineElementStatisticsComponent } from './components/monitoring/statistics/pipeline-element-statistics.component';
import { NgxChartsModule } from '@swimlane/ngx-charts';
import { BarchartWidgetComponent } from './components/monitoring/widget/barchart/barchart-widget.component';
-import { StatusWidgetComponent } from './components/monitoring/widget/status/status-widget.component';
import { PlatformServicesModule } from '@streampipes/platform-services';
import { SpPipelineDetailsOverviewComponent } from './components/overview/pipeline-details-overview.component';
import { SharedUiModule } from '@streampipes/shared-ui';
@@ -69,7 +68,6 @@ import { PipelineLogsComponent } from './components/pipeline-logs/pipeline-logs.
PipelineStatusComponent,
PipelinePreviewComponent,
QuickEditComponent,
- StatusWidgetComponent,
BarchartWidgetComponent,
SpPipelineDetailsOverviewComponent,
],