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 2022/02/02 09:23:01 UTC
[incubator-streampipes] 01/02: [hotfix] Remove linting errors in add module
This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch experimental-module-federation
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit e9cb859e3465a0d2755e060a31d2b70f52752c81
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Wed Feb 2 10:15:24 2022 +0100
[hotfix] Remove linting errors in add module
---
ui/src/app/add/add.component.html | 14 +++++++-------
ui/src/app/add/add.component.ts | 2 +-
.../endpoint-item/endpoint-item.component.ts | 12 ++++++------
.../add/dialogs/add-endpoint/add-endpoint.component.ts | 18 +++++++++---------
.../endpoint-installation.component.ts | 6 +++---
5 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/ui/src/app/add/add.component.html b/ui/src/app/add/add.component.html
index 0591fd4..63c025a 100644
--- a/ui/src/app/add/add.component.html
+++ b/ui/src/app/add/add.component.html
@@ -99,13 +99,13 @@
</div>
<div fxLayout="row wrap" class="w-100">
- <endpoint-item fxFlex="33"
- [itemSelected]="endpointItem.selected"
- [item]="endpointItem"
- (triggerInstallation)="triggerInstallation($event)"
- *ngFor="let endpointItem of endpointItems | pipelineElementTypeFilter: selectedTab | pipelineElementNameFilter: filterTerm | pipelineElementInstallationStatusFilter: selectedInstallationStatus | orderBy: 'asc':'name'"
- class="p-15"
- (click)="toggleSelected(endpointItem)"></endpoint-item>
+ <sp-endpoint-item fxFlex="33"
+ [itemSelected]="endpointItem.selected"
+ [item]="endpointItem"
+ (triggerInstallation)="triggerInstallation($event)"
+ *ngFor="let endpointItem of endpointItems | pipelineElementTypeFilter: selectedTab | pipelineElementNameFilter: filterTerm | pipelineElementInstallationStatusFilter: selectedInstallationStatus | orderBy: 'asc':'name'"
+ class="p-15"
+ (click)="toggleSelected(endpointItem)"></sp-endpoint-item>
</div>
</div>
<div fxFlex="100" fxLayout="row" fxLayoutAlign="center center" *ngIf="!endpointItemsLoadingComplete">
diff --git a/ui/src/app/add/add.component.ts b/ui/src/app/add/add.component.ts
index 43d9584..29301ff 100644
--- a/ui/src/app/add/add.component.ts
+++ b/ui/src/app/add/add.component.ts
@@ -27,7 +27,7 @@ import { EndpointInstallationComponent } from './dialogs/endpoint-installation/e
import { ExtensionsServiceEndpointItem } from '@streampipes/platform-services';
@Component({
- selector: 'add',
+ selector: 'sp-add',
templateUrl: './add.component.html',
styleUrls: ['./add.component.scss']
})
diff --git a/ui/src/app/add/components/endpoint-item/endpoint-item.component.ts b/ui/src/app/add/components/endpoint-item/endpoint-item.component.ts
index fb7b20c..bcc9932 100644
--- a/ui/src/app/add/components/endpoint-item/endpoint-item.component.ts
+++ b/ui/src/app/add/components/endpoint-item/endpoint-item.component.ts
@@ -16,7 +16,7 @@
*
*/
-import { Component, EventEmitter, Input, OnInit, Output, Sanitizer } from '@angular/core';
+import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { MatSnackBar } from '@angular/material/snack-bar';
import { AddService } from '../../services/add.service';
import { DomSanitizer, SafeUrl } from '@angular/platform-browser';
@@ -27,7 +27,7 @@ import { PanelType } from '../../../core-ui/dialog/base-dialog/base-dialog.model
import { DialogService } from '../../../core-ui/dialog/base-dialog/base-dialog.service';
@Component({
- selector: 'endpoint-item',
+ selector: 'sp-endpoint-item',
templateUrl: './endpoint-item.component.html',
styleUrls: ['./endpoint-item.component.scss']
})
@@ -66,7 +66,7 @@ export class EndpointItemComponent implements OnInit {
const objectURL = URL.createObjectURL(blob);
this.image = this.sanitizer.bypassSecurityTrustUrl(objectURL);
this.iconReady = true;
- }, error => this.iconError = true);
+ }, () => this.iconError = true);
}
}
@@ -76,7 +76,7 @@ export class EndpointItemComponent implements OnInit {
result = s;
} else {
const words = s.split(' ');
- words.forEach(function (word, i) {
+ words.forEach((word, i) => {
if (i < 4) {
result += word.charAt(0);
}
@@ -107,11 +107,11 @@ export class EndpointItemComponent implements OnInit {
findItemStyle() {
const baseType = 'pe-label ';
- if (this.item.type == 'stream') {
+ if (this.item.type === 'stream') {
this.itemTypeStyle = baseType + 'stream-label';
} else if (this.item.type === 'set') {
this.itemTypeStyle = baseType + 'set-label';
- } else if (this.item.type == 'sepa') {
+ } else if (this.item.type === 'sepa') {
this.itemTypeStyle = baseType + 'processor-label';
} else {
this.itemTypeStyle = baseType + 'sink-label';
diff --git a/ui/src/app/add/dialogs/add-endpoint/add-endpoint.component.ts b/ui/src/app/add/dialogs/add-endpoint/add-endpoint.component.ts
index 89f239e..561a1cd 100644
--- a/ui/src/app/add/dialogs/add-endpoint/add-endpoint.component.ts
+++ b/ui/src/app/add/dialogs/add-endpoint/add-endpoint.component.ts
@@ -21,7 +21,7 @@ import { AddService } from '../../services/add.service';
import { DialogRef } from '../../../core-ui/dialog/base-dialog/dialog-ref';
@Component({
- selector: 'add-endpoint-dialog',
+ selector: 'sp-add-endpoint-dialog',
templateUrl: './add-endpoint.component.html',
styleUrls: ['./add-endpoint.component.scss']
})
@@ -33,8 +33,8 @@ export class AddEndpointComponent implements OnInit {
endpointsChanged = false;
- constructor(private AddService: AddService,
- private DialogRef: DialogRef<AddEndpointComponent>) {
+ constructor(private addService: AddService,
+ private dialogRef: DialogRef<AddEndpointComponent>) {
this.rdfEndpoints = [];
this.addSelected = false;
this.newEndpoint = {};
@@ -49,7 +49,7 @@ export class AddEndpointComponent implements OnInit {
}
loadRdfEndpoints() {
- this.AddService.getRdfEndpoints()
+ this.addService.getRdfEndpoints()
.subscribe(rdfEndpoints => {
this.rdfEndpoints = rdfEndpoints;
});
@@ -57,22 +57,22 @@ export class AddEndpointComponent implements OnInit {
addRdfEndpoint(rdfEndpoint) {
console.log(rdfEndpoint);
- this.AddService.addRdfEndpoint(rdfEndpoint)
- .subscribe(message => {
+ this.addService.addRdfEndpoint(rdfEndpoint)
+ .subscribe(() => {
this.loadRdfEndpoints();
this.endpointsChanged = true;
});
}
removeRdfEndpoint(rdfEndpointId) {
- this.AddService.removeRdfEndpoint(rdfEndpointId)
- .subscribe(message => {
+ this.addService.removeRdfEndpoint(rdfEndpointId)
+ .subscribe(() => {
this.loadRdfEndpoints();
this.endpointsChanged = true;
});
}
close() {
- this.DialogRef.close(this.endpointsChanged);
+ this.dialogRef.close(this.endpointsChanged);
}
}
diff --git a/ui/src/app/add/dialogs/endpoint-installation/endpoint-installation.component.ts b/ui/src/app/add/dialogs/endpoint-installation/endpoint-installation.component.ts
index b455cd4..7b58353 100644
--- a/ui/src/app/add/dialogs/endpoint-installation/endpoint-installation.component.ts
+++ b/ui/src/app/add/dialogs/endpoint-installation/endpoint-installation.component.ts
@@ -21,7 +21,7 @@ import { DialogRef } from '../../../core-ui/dialog/base-dialog/dialog-ref';
import { PipelineElementEndpointService } from '@streampipes/platform-services';
@Component({
- selector: 'endpoint-installation-dialog',
+ selector: 'sp-endpoint-installation-dialog',
templateUrl: './endpoint-installation.component.html',
styleUrls: ['./endpoint-installation.component.scss']
})
@@ -88,7 +88,7 @@ export class EndpointInstallationComponent {
this.installationStatus[index].status = 'error';
this.installationStatus[index].details = data.notifications[0].additionalInformation;
}
- }, data => {
+ }, () => {
this.installationStatus[index].status = 'error';
})
.add(() => {
@@ -107,7 +107,7 @@ export class EndpointInstallationComponent {
this.pipelineElementEndpointService.del(endpointUri.elementId)
.subscribe(data => {
this.installationStatus[index].status = data.success ? 'success' : 'error';
- }, data => {
+ }, () => {
this.installationStatus[index].status = 'error';
})
.add(() => {