You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ze...@apache.org on 2021/09/30 12:34:55 UTC
[incubator-streampipes] branch STREAMPIPES-432 updated (5ceef39 ->
6798f79)
This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a change to branch STREAMPIPES-432
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git.
from 5ceef39 Add cypress test to validate save to data lake option
add b657317 [hotfix] Fix lining errors in pipeline dialogs
new 43e536b Merge branch 'dev' into STREAMPIPES-432
new 6798f79 [STREAMPIPES-432] Add started pipeline confirmation to adapter starting dialog
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
ui/src/app/connect/connect.module.ts | 1 +
.../adapter-started-dialog.component.html | 75 ++++---
.../adapter-started-dialog.component.ts | 13 +-
ui/src/app/core-ui/core-ui.module.ts | 7 +-
.../pipeline-started-status.component.html | 68 ++++++
.../pipeline-started-status.component.scss} | 2 -
.../pipeline-started-status.component.ts} | 39 ++--
.../delete-pipeline-dialog.component.ts | 20 +-
.../import-pipeline-dialog.component.ts | 65 +++---
.../pipeline-categories-dialog.component.ts | 45 ++--
.../pipeline-notifications.component.ts | 16 +-
.../pipeline-status-dialog.component.html | 58 ++---
.../pipeline-status-dialog.component.ts | 145 +++++++------
.../start-all-pipelines-dialog.component.ts | 239 ++++++++++-----------
ui/src/app/pipelines/pipelines.module.ts | 48 +++--
.../apis/pipeline-template.service.ts | 15 +-
16 files changed, 466 insertions(+), 390 deletions(-)
create mode 100644 ui/src/app/core-ui/pipeline/pipeline-started-status/pipeline-started-status.component.html
copy ui/src/app/{connect/dialog/adapter-started/adapter-started-dialog.component.scss => core-ui/pipeline/pipeline-started-status/pipeline-started-status.component.scss} (96%)
copy ui/src/app/{editor/dialog/matching-error/matching-error.component.ts => core-ui/pipeline/pipeline-started-status/pipeline-started-status.component.ts} (54%)
[incubator-streampipes] 01/02: Merge branch 'dev' into
STREAMPIPES-432
Posted by ze...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch STREAMPIPES-432
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit 43e536b2615dabd5a2dd610d17f063a97d35f4bd
Merge: 5ceef39 b657317
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Thu Sep 30 11:59:16 2021 +0200
Merge branch 'dev' into STREAMPIPES-432
.../delete-pipeline-dialog.component.ts | 20 +-
.../import-pipeline-dialog.component.ts | 65 +++---
.../pipeline-categories-dialog.component.ts | 45 ++--
.../pipeline-notifications.component.ts | 16 +-
.../pipeline-status-dialog.component.ts | 150 +++++++------
.../start-all-pipelines-dialog.component.ts | 239 ++++++++++-----------
6 files changed, 271 insertions(+), 264 deletions(-)
[incubator-streampipes] 02/02: [STREAMPIPES-432] Add started
pipeline confirmation to adapter starting dialog
Posted by ze...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch STREAMPIPES-432
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit 6798f794a6fbe2920fba793be8072d4943850009
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Thu Sep 30 14:34:09 2021 +0200
[STREAMPIPES-432] Add started pipeline confirmation to adapter starting
dialog
---
ui/src/app/connect/connect.module.ts | 1 +
.../adapter-started-dialog.component.html | 75 +++++++++++++---------
.../adapter-started-dialog.component.ts | 13 +++-
ui/src/app/core-ui/core-ui.module.ts | 7 +-
.../pipeline-started-status.component.html | 68 ++++++++++++++++++++
.../pipeline-started-status.component.scss | 24 +++++++
.../pipeline-started-status.component.ts | 56 ++++++++++++++++
.../pipeline-status-dialog.component.html | 58 ++++-------------
.../pipeline-status-dialog.component.ts | 5 --
ui/src/app/pipelines/pipelines.module.ts | 48 +++++++-------
.../apis/pipeline-template.service.ts | 15 +++--
11 files changed, 256 insertions(+), 114 deletions(-)
diff --git a/ui/src/app/connect/connect.module.ts b/ui/src/app/connect/connect.module.ts
index c84a136..a91fa7f 100644
--- a/ui/src/app/connect/connect.module.ts
+++ b/ui/src/app/connect/connect.module.ts
@@ -96,6 +96,7 @@ import { DeleteAdapterDialogComponent } from './dialog/delete-adapter-dialog/del
MatInputModule,
MatFormFieldModule,
MatSliderModule,
+ CoreUiModule,
TreeModule.forRoot()
],
exports: [
diff --git a/ui/src/app/connect/dialog/adapter-started/adapter-started-dialog.component.html b/ui/src/app/connect/dialog/adapter-started/adapter-started-dialog.component.html
index 2525afd..316d6b5 100644
--- a/ui/src/app/connect/dialog/adapter-started/adapter-started-dialog.component.html
+++ b/ui/src/app/connect/dialog/adapter-started/adapter-started-dialog.component.html
@@ -18,47 +18,58 @@
<div class="sp-dialog-container">
<div class="sp-dialog-content p-15">
- <div fxLayout="column" *ngIf="!adapterInstalled">
- <div fxLayoutAlign="center" >
- <mat-spinner fxLayoutAlign="center" style="margin: 10px 0 5px 0" color="accent">Loading</mat-spinner>
- </div>
- <div fxLayoutAlign="center">
- <h3>Please wait while your new adapter is being generated...</h3>
+ <div fxLayout="column" fxLayoutAlign="center center" fxFlex="100">
+ <div fxLayout="column" *ngIf="!adapterInstalled">
+ <div fxLayoutAlign="center">
+ <mat-spinner fxLayoutAlign="center" style="margin: 10px 0 5px 0" color="accent">Loading
+ </mat-spinner>
+ </div>
+ <div fxLayoutAlign="center">
+ <h3>Please wait while your new adapter is being generated...</h3>
+ </div>
</div>
- </div>
- <div fxLayout="column" *ngIf="adapterInstalled">
+ <div fxLayout="column" *ngIf="adapterInstalled">
- <div *ngIf="adapterStatus.success">
- <div *ngIf="!isSetAdapter && !isTemplate">
- <div class="success-message" fxFlex="100" fxLayoutAlign="center center" fxLayout="row">
- <i class="material-icons">done</i>
- <span> Your new data stream is now available in the pipeline editor.</span>
+ <div *ngIf="adapterStatus.success">
+ <div *ngIf="!isSetAdapter && !isTemplate">
+ <div class="success-message" fxFlex="100" fxLayoutAlign="center center" fxLayout="row">
+ <i class="material-icons">done</i>
+ <span> Your new data stream is now available in the pipeline editor.</span>
+ </div>
</div>
- </div>
- <div *ngIf="isSetAdapter">
- <div class="success-message" fxFlex="100" fxLayoutAlign="center center" fxLayout="row" data-cy="sp-connect-adapter-set-success">
- <i class="material-icons">done</i>
- <span> Your new data set is now available in the pipeline editor.</span>
+ <div *ngIf="isSetAdapter">
+ <div class="success-message" fxFlex="100" fxLayoutAlign="center center" fxLayout="row"
+ data-cy="sp-connect-adapter-set-success">
+ <i class="material-icons">done</i>
+ <span> Your new data set is now available in the pipeline editor.</span>
+ </div>
</div>
- </div>
- <div *ngIf="isTemplate">
- <div class="success-message" fxFlex="100" fxLayoutAlign="center center" fxLayout="row">
- <i class="material-icons">done</i>
- <span>Template created. You or other users can now create adapters based on this template.</span>
+ <div *ngIf="isTemplate">
+ <div class="success-message" fxFlex="100" fxLayoutAlign="center center" fxLayout="row">
+ <i class="material-icons">done</i>
+ <span>Template created. You or other users can now create adapters based on this template.</span>
+ </div>
</div>
- </div>
- <div *ngIf="!isSetAdapter && !isTemplate">
- <pipeline-element-runtime-info [streamDescription]="streamDescription" [pollingActive]="pollingActive"></pipeline-element-runtime-info>
- </div>
+ <div *ngIf="!isSetAdapter && !isTemplate">
+ <pipeline-element-runtime-info [streamDescription]="streamDescription"
+ [pollingActive]="pollingActive"></pipeline-element-runtime-info>
+ </div>
- </div>
- <div *ngIf="!adapterStatus.success">
- <div class="success-message" fxFlex="100" fxLayoutAlign="center center" fxLayout="row">
- <i class="material-icons">error</i>
- <span>Something went wrong during the adapter installation.</span>
</div>
+ <div *ngIf="!adapterStatus.success">
+ <div class="success-message" fxFlex="100" fxLayoutAlign="center center" fxLayout="row">
+ <i class="material-icons">error</i>
+ <span>Something went wrong during the adapter installation.</span>
+ </div>
+ </div>
+ </div>
+
+ <div fxLayout="column" fxLayoutAlign="center center" fxFlex="100">
+ <sp-pipeline-started-status
+ [pipelineOperationStatus]="pipelineOperationStatus">
+ </sp-pipeline-started-status>
</div>
</div>
</div>
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 96b3b6c..0d874a1 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
@@ -23,6 +23,7 @@ import {
AdapterDescriptionUnion,
GenericAdapterSetDescription,
Message,
+ PipelineOperationStatus,
SpDataStream,
SpecificAdapterSetDescription
} from '../../../core-model/gen/streampipes-model';
@@ -44,6 +45,7 @@ export class AdapterStartedDialog implements OnInit {
public runtimeData: any;
public isSetAdapter = false;
public isTemplate = false;
+ public pipelineOperationStatus: PipelineOperationStatus;
@Input()
storeAsTemplate: boolean;
@@ -100,16 +102,21 @@ export class AdapterStartedDialog implements OnInit {
this.pipelineTemplateService.getPipelineTemplateInvocation(this.adapter.adapterId, pipelineId)
.subscribe(res => {
- const indexName = this.adapter.name.toLowerCase().replace(/ /g, '_');
+ const indexName = this.adapter.name
+ .toLowerCase()
+ .replace(/ /g, '_')
+ .replace(/\./g, '_');
const pipelineInvocation = PipelineInvocationBuilder
.create(res)
- .setName(indexName)
+ .setName('persist_' + indexName)
.setTemplateId(pipelineId)
.setFreeTextStaticProperty('db_measurement', indexName)
.setMappingPropertyUnary('timestamp_mapping', 's0::' + this.dataLakeTimestampField)
.build();
- this.pipelineTemplateService.createPipelineTemplateInvocation(pipelineInvocation);
+ this.pipelineTemplateService.createPipelineTemplateInvocation(pipelineInvocation).subscribe(pipelineOperationStatus => {
+ this.pipelineOperationStatus = pipelineOperationStatus;
+ });
});
}
}
diff --git a/ui/src/app/core-ui/core-ui.module.ts b/ui/src/app/core-ui/core-ui.module.ts
index 9265d2b..989a4ab 100644
--- a/ui/src/app/core-ui/core-ui.module.ts
+++ b/ui/src/app/core-ui/core-ui.module.ts
@@ -79,6 +79,7 @@ import { NgxChartsModule } from '@swimlane/ngx-charts';
import { BarchartWidgetComponent } from './widget/barchart/barchart-widget.component';
import { ErrorHintComponent } from './error-hint/error-hint.component';
import { AddToCollectionComponent } from './static-properties/static-collection/add-to-collection/add-to-collection.component';
+import { PipelineStartedStatusComponent } from './pipeline/pipeline-started-status/pipeline-started-status.component';
@NgModule({
imports: [
@@ -135,7 +136,8 @@ import { AddToCollectionComponent } from './static-properties/static-collection/
StatusWidgetComponent,
LabelListItemComponent,
ErrorHintComponent,
- AddToCollectionComponent
+ AddToCollectionComponent,
+ PipelineStartedStatusComponent
],
providers: [
MatDatepickerModule,
@@ -177,7 +179,8 @@ import { AddToCollectionComponent } from './static-properties/static-collection/
ImageViewerComponent,
StatusWidgetComponent,
BarchartWidgetComponent,
- ErrorHintComponent
+ ErrorHintComponent,
+ PipelineStartedStatusComponent
]
})
export class CoreUiModule {
diff --git a/ui/src/app/core-ui/pipeline/pipeline-started-status/pipeline-started-status.component.html b/ui/src/app/core-ui/pipeline/pipeline-started-status/pipeline-started-status.component.html
new file mode 100644
index 0000000..89b2f33
--- /dev/null
+++ b/ui/src/app/core-ui/pipeline/pipeline-started-status/pipeline-started-status.component.html
@@ -0,0 +1,68 @@
+<!--
+ ~ 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
+ fxLayout="column"
+ fxLayoutAlign="center center"
+ fxFlex="100">
+ <div class="success-message"
+ fxFlex="100"
+ fxLayoutAlign="center center"
+ fxLayout="column"
+ data-cy="sp-pipeline-started-dialog">
+ <div fxLayout="row">
+ <mat-icon color="accent" *ngIf="pipelineOperationStatus.success">done</mat-icon>
+ <mat-icon style="color: red;" *ngIf="!pipelineOperationStatus.success">error</mat-icon>
+ <span> {{pipelineOperationStatus.title}}.</span>
+ </div>
+ <span *ngIf="action == 1 && !pipelineOperationStatus.success" class="message-small">You can perform a forced stop, which will stop and reset the pipeline status.</span>
+ </div>
+ <div fxLayout="row">
+ <button mat-button mat-raised-button class="mat-basic" (click)="toggleStatusDetailsVisible()">
+ <div *ngIf="!statusDetailsVisible">Show Details</div>
+ <div *ngIf="statusDetailsVisible">Hide Details</div>
+ </button>
+ <button mat-button mat-raised-button class="ml-10" color="accent" (click)="forceStopPipeline()"
+ *ngIf="action == 1 && !pipelineOperationStatus.success">
+ <div>Force stop</div>
+ </button>
+ </div>
+
+ <div fxFlex="100" fxLayout="column" *ngIf="statusDetailsVisible" class="w-100">
+ <div fxFlex="100" fxLayout="column" class="mat-elevation-z1 mt-10"
+ *ngFor="let msg of pipelineOperationStatus.elementStatus">
+ <div fxFlex="100" fxLayout="column" class="p-15">
+ <div fxFlex="100" fxLayout="row" fxLayoutAlign="start center">
+ <mat-icon color="accent" *ngIf="msg.success">done</mat-icon>
+ <mat-icon style="color:red;" *ngIf="!msg.success">warning</mat-icon>
+ <div fxFlex="100" fxLayout="column" class="ml-5">
+ <span><b>{{msg.elementName}}</b></span>
+ <small>{{msg.elementId.substr(0, msg.elementId.lastIndexOf("/"))}}</small>
+ </div>
+ </div>
+ <div>
+ <div fxFlex="100" fxLayout="column" *ngIf="msg.optionalMessage" class="mt-10">
+ <div class="error-message">
+ {{msg.optionalMessage}}
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
\ No newline at end of file
diff --git a/ui/src/app/core-ui/pipeline/pipeline-started-status/pipeline-started-status.component.scss b/ui/src/app/core-ui/pipeline/pipeline-started-status/pipeline-started-status.component.scss
new file mode 100644
index 0000000..55a7c3c
--- /dev/null
+++ b/ui/src/app/core-ui/pipeline/pipeline-started-status/pipeline-started-status.component.scss
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ *
+ */
+
+.success-message {
+ text-align: center;
+ font-size: 14pt;
+ margin-top: 20px;
+ margin-bottom: 20px;
+}
diff --git a/ui/src/app/core-ui/pipeline/pipeline-started-status/pipeline-started-status.component.ts b/ui/src/app/core-ui/pipeline/pipeline-started-status/pipeline-started-status.component.ts
new file mode 100644
index 0000000..d6bc1ed
--- /dev/null
+++ b/ui/src/app/core-ui/pipeline/pipeline-started-status/pipeline-started-status.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, EventEmitter, Input, OnInit, Output } from '@angular/core';
+import { PipelineOperationStatus } from '../../../core-model/gen/streampipes-model';
+import { PipelineAction } from '../../../pipelines/model/pipeline-model';
+
+@Component({
+ selector: 'sp-pipeline-started-status',
+ templateUrl: './pipeline-started-status.component.html',
+ styleUrls: ['./pipeline-started-status.component.scss']
+})
+export class PipelineStartedStatusComponent implements OnInit {
+
+ @Input()
+ pipelineOperationStatus: PipelineOperationStatus;
+
+ @Input()
+ action: PipelineAction;
+
+ @Output()
+ forceStopPipelineEmitter = new EventEmitter();
+
+ statusDetailsVisible: boolean;
+
+ constructor() {
+ }
+
+ ngOnInit(): void {
+ this.statusDetailsVisible = false;
+ }
+
+ forceStopPipeline() {
+ this.forceStopPipelineEmitter.emit();
+ }
+
+ toggleStatusDetailsVisible() {
+ this.statusDetailsVisible = !(this.statusDetailsVisible);
+ }
+
+}
diff --git a/ui/src/app/pipelines/dialog/pipeline-status/pipeline-status-dialog.component.html b/ui/src/app/pipelines/dialog/pipeline-status/pipeline-status-dialog.component.html
index ad5e4be..311a4b8 100644
--- a/ui/src/app/pipelines/dialog/pipeline-status/pipeline-status-dialog.component.html
+++ b/ui/src/app/pipelines/dialog/pipeline-status/pipeline-status-dialog.component.html
@@ -1,5 +1,4 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
+<!-- ~ 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
@@ -19,18 +18,19 @@
<div class="sp-dialog-container">
<div class="sp-dialog-content p-15">
<div fxFlex="100" fxLayoutAlign="center center" fxLayout="column" *ngIf="operationInProgress">
- <div fxLayoutAlign="center" >
+ <div fxLayoutAlign="center">
<mat-spinner color="accent"
[diameter]="50"
fxLayoutAlign="center"
- style="margin: 10px 0 5px 0" >{{action == 0 ? "Starting..." : "Stopping"}}
+ style="margin: 10px 0 5px 0">{{action == 0 ? "Starting..." : "Stopping"}}
</mat-spinner>
</div>
<div fxLayoutAlign="center">
<h3>Please wait while the pipeline is {{action == 0 ? "starting..." : "stopping"}}...</h3>
</div>
</div>
- <div *ngIf="!operationInProgress && forceStopActive" fxLayout="column" fxLayoutAlign="center center" fxFlex="100">
+ <div *ngIf="!operationInProgress && forceStopActive" fxLayout="column" fxLayoutAlign="center center"
+ fxFlex="100">
<div class="success-message" fxFlex="100" fxLayoutAlign="center center" fxLayout="column">
<div fxLayout="row">
<mat-icon color="accent">done</mat-icon>
@@ -38,48 +38,18 @@
</div>
</div>
</div>
- <div *ngIf="!operationInProgress && !forceStopActive" fxLayout="column" fxLayoutAlign="center center" fxFlex="100">
- <div class="success-message" fxFlex="100" fxLayoutAlign="center center" fxLayout="column" data-cy="sp-pipeline-started-dialog">
- <div fxLayout="row">
- <mat-icon color="accent" *ngIf="pipelineOperationStatus.success">done</mat-icon>
- <mat-icon style="color: red;" *ngIf="!pipelineOperationStatus.success">error</mat-icon>
- <span> {{pipelineOperationStatus.title}}.</span>
- </div>
- <span *ngIf="action == 1 && !pipelineOperationStatus.success" class="message-small">You can perform a forced stop, which will stop and reset the pipeline status.</span>
- </div>
- <div fxLayout="row">
- <button mat-button mat-raised-button class="mat-basic" (click)="toggleStatusDetailsVisible()">
- <div *ngIf="!statusDetailsVisible">Show Details</div>
- <div *ngIf="statusDetailsVisible">Hide Details</div>
- </button>
- <button mat-button mat-raised-button class="ml-10" color="accent" (click)="forceStopPipeline()" *ngIf="action == 1 && !pipelineOperationStatus.success">
- <div>Force stop</div>
- </button>
- </div>
- <div fxFlex="100" fxLayout="column" *ngIf="statusDetailsVisible" class="w-100">
- <div fxFlex="100" fxLayout="column" class="mat-elevation-z1 mt-10" *ngFor="let msg of pipelineOperationStatus.elementStatus">
- <div fxFlex="100" fxLayout="column" class="p-15">
- <div fxFlex="100" fxLayout="row" fxLayoutAlign="start center">
- <mat-icon color="accent" *ngIf="msg.success">done</mat-icon>
- <mat-icon style="color:red;" *ngIf="!msg.success">warning</mat-icon>
- <div fxFlex="100" fxLayout="column" class="ml-5">
- <span><b>{{msg.elementName}}</b></span>
- <small>{{msg.elementId.substr(0, msg.elementId.lastIndexOf("/"))}}</small>
- </div>
- </div>
- <div>
- <div fxFlex="100" fxLayout="column" *ngIf="msg.optionalMessage" class="mt-10">
- <div class="error-message">
- {{msg.optionalMessage}}
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
+ <div fxLayout="column" fxLayoutAlign="center center" fxFlex="100">
+ <sp-pipeline-started-status
+ *ngIf="!operationInProgress && !forceStopActive"
+ [pipelineOperationStatus]="pipelineOperationStatus"
+ [action]="action"
+ (forceStopPipelineEmitter)="forceStopPipeline()">
+ </sp-pipeline-started-status>
</div>
+
</div>
+
<mat-divider></mat-divider>
<div class="sp-dialog-actions actions-align-right">
<button mat-button mat-raised-button class="mat-basic"
diff --git a/ui/src/app/pipelines/dialog/pipeline-status/pipeline-status-dialog.component.ts b/ui/src/app/pipelines/dialog/pipeline-status/pipeline-status-dialog.component.ts
index 0a3090a..0e167e5 100644
--- a/ui/src/app/pipelines/dialog/pipeline-status/pipeline-status-dialog.component.ts
+++ b/ui/src/app/pipelines/dialog/pipeline-status/pipeline-status-dialog.component.ts
@@ -31,7 +31,6 @@ import { ShepherdService } from '../../../services/tour/shepherd.service';
})
export class PipelineStatusDialogComponent implements OnInit {
- statusDetailsVisible: any;
operationInProgress = true;
forceStopActive = false;
pipelineOperationStatus: PipelineOperationStatus;
@@ -45,7 +44,6 @@ export class PipelineStatusDialogComponent implements OnInit {
constructor(private dialogRef: DialogRef<PipelineStatusDialogComponent>,
private pipelineService: PipelineService,
private shepherdService: ShepherdService) {
- this.statusDetailsVisible = false;
}
ngOnInit(): void {
@@ -60,9 +58,6 @@ export class PipelineStatusDialogComponent implements OnInit {
this.dialogRef.close();
}
- toggleStatusDetailsVisible() {
- this.statusDetailsVisible = !(this.statusDetailsVisible);
- }
startPipeline() {
this.pipelineService.startPipeline(this.pipelineId).subscribe(msg => {
diff --git a/ui/src/app/pipelines/pipelines.module.ts b/ui/src/app/pipelines/pipelines.module.ts
index f6fd8f8..5a207a9 100644
--- a/ui/src/app/pipelines/pipelines.module.ts
+++ b/ui/src/app/pipelines/pipelines.module.ts
@@ -16,27 +16,28 @@
*
*/
-import {CategoryAlreadyInPipelinePipe} from './category-already-in-pipeline.filter';
-import {PipelineOperationsService} from "./services/pipeline-operations.service";
-import {PipelinesComponent} from "./pipelines.component";
-import {NgModule} from "@angular/core";
-import {FlexLayoutModule} from "@angular/flex-layout";
-import {MatTabsModule} from "@angular/material/tabs";
-import {MatButtonModule} from "@angular/material/button";
-import {CustomMaterialModule} from "../CustomMaterial/custom-material.module";
-import {CommonModule} from "@angular/common";
-import {PipelineOverviewComponent} from "./components/pipeline-overview/pipeline-overview.component";
-import {PipelineStatusDialogComponent} from "./dialog/pipeline-status/pipeline-status-dialog.component";
-import {DeletePipelineDialogComponent} from "./dialog/delete-pipeline/delete-pipeline-dialog.component";
-import {MatProgressSpinnerModule} from "@angular/material/progress-spinner";
-import {ImportPipelineDialogComponent} from "./dialog/import-pipeline/import-pipeline-dialog.component";
-import {StartAllPipelinesDialogComponent} from "./dialog/start-all-pipelines/start-all-pipelines-dialog.component";
-import {PipelineCategoriesDialogComponent} from "./dialog/pipeline-categories/pipeline-categories-dialog.component";
-import {FormsModule} from "@angular/forms";
-import {PipelineInCategoryPipe} from "./pipeline-category.filter";
-import {MatSortModule} from "@angular/material/sort";
-import {MatTableModule} from "@angular/material/table";
-import {PipelineNotificationsComponent} from "./dialog/pipeline-notifications/pipeline-notifications.component";
+import { CategoryAlreadyInPipelinePipe } from './category-already-in-pipeline.filter';
+import { PipelineOperationsService } from './services/pipeline-operations.service';
+import { PipelinesComponent } from './pipelines.component';
+import { NgModule } from '@angular/core';
+import { FlexLayoutModule } from '@angular/flex-layout';
+import { MatTabsModule } from '@angular/material/tabs';
+import { MatButtonModule } from '@angular/material/button';
+import { CustomMaterialModule } from '../CustomMaterial/custom-material.module';
+import { CommonModule } from '@angular/common';
+import { PipelineOverviewComponent } from './components/pipeline-overview/pipeline-overview.component';
+import { PipelineStatusDialogComponent } from './dialog/pipeline-status/pipeline-status-dialog.component';
+import { DeletePipelineDialogComponent } from './dialog/delete-pipeline/delete-pipeline-dialog.component';
+import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
+import { ImportPipelineDialogComponent } from './dialog/import-pipeline/import-pipeline-dialog.component';
+import { StartAllPipelinesDialogComponent } from './dialog/start-all-pipelines/start-all-pipelines-dialog.component';
+import { PipelineCategoriesDialogComponent } from './dialog/pipeline-categories/pipeline-categories-dialog.component';
+import { FormsModule } from '@angular/forms';
+import { PipelineInCategoryPipe } from './pipeline-category.filter';
+import { MatSortModule } from '@angular/material/sort';
+import { MatTableModule } from '@angular/material/table';
+import { PipelineNotificationsComponent } from './dialog/pipeline-notifications/pipeline-notifications.component';
+import { CoreUiModule } from '../core-ui/core-ui.module';
@NgModule({
imports: [
@@ -48,7 +49,8 @@ import {PipelineNotificationsComponent} from "./dialog/pipeline-notifications/pi
CommonModule,
MatProgressSpinnerModule,
MatSortModule,
- MatTableModule
+ MatTableModule,
+ CoreUiModule
],
declarations: [
DeletePipelineDialogComponent,
@@ -60,7 +62,7 @@ import {PipelineNotificationsComponent} from "./dialog/pipeline-notifications/pi
PipelineStatusDialogComponent,
StartAllPipelinesDialogComponent,
PipelineInCategoryPipe,
- CategoryAlreadyInPipelinePipe,
+ CategoryAlreadyInPipelinePipe
],
providers: [
PipelineOperationsService,
diff --git a/ui/src/app/platform-services/apis/pipeline-template.service.ts b/ui/src/app/platform-services/apis/pipeline-template.service.ts
index b0f6433..2943910 100644
--- a/ui/src/app/platform-services/apis/pipeline-template.service.ts
+++ b/ui/src/app/platform-services/apis/pipeline-template.service.ts
@@ -19,7 +19,12 @@
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { AuthStatusService } from '../../services/auth-status.service';
-import { FreeTextStaticProperty, PipelineTemplateInvocation, StaticPropertyUnion } from '../../core-model/gen/streampipes-model';
+import {
+ FreeTextStaticProperty,
+ PipelineOperationStatus,
+ PipelineTemplateInvocation,
+ StaticPropertyUnion
+} from '../../core-model/gen/streampipes-model';
import { map } from 'rxjs/operators';
import { Observable } from 'rxjs';
@@ -103,10 +108,10 @@ export class PipelineTemplateService {
return val as FreeTextStaticProperty;
}
- createPipelineTemplateInvocation(invocation: PipelineTemplateInvocation) {
- this.http
- .post(this.getServerUrl() + '/api/v2/pipeline-templates', invocation)
- .subscribe();
+ createPipelineTemplateInvocation(invocation: PipelineTemplateInvocation): Observable<PipelineOperationStatus> {
+ return this.http
+ .post(`${this.getServerUrl()}/api/v2/pipeline-templates`, invocation)
+ .pipe(map(result => PipelineOperationStatus.fromData(result as PipelineOperationStatus)));
}
}