You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by bo...@apache.org on 2023/10/27 11:15:04 UTC
(streampipes) 01/02: refactor: remove update button & move permissions button to top level view
This is an automated email from the ASF dual-hosted git repository.
bossenti pushed a commit to branch 2095-remove-update-functionality-from-ui
in repository https://gitbox.apache.org/repos/asf/streampipes.git
commit 6a8baca2cdeb410947334eac9cf95aaea0788d43
Author: bossenti <bo...@posteo.de>
AuthorDate: Fri Oct 27 13:14:04 2023 +0200
refactor: remove update button & move permissions button to top level view
---
.../endpoint-item/endpoint-item.component.html | 34 ++++++----------------
.../endpoint-item/endpoint-item.component.ts | 20 +------------
2 files changed, 10 insertions(+), 44 deletions(-)
diff --git a/ui/src/app/add/components/endpoint-item/endpoint-item.component.html b/ui/src/app/add/components/endpoint-item/endpoint-item.component.html
index 1a536414f..2a46c897b 100644
--- a/ui/src/app/add/components/endpoint-item/endpoint-item.component.html
+++ b/ui/src/app/add/components/endpoint-item/endpoint-item.component.html
@@ -90,34 +90,18 @@
</button>
<div *ngIf="item.installed" style="margin-left: 5px">
<button
- class="small-button-add mat-basic no-min-width"
- [disabled]="!item.editable"
- mat-raised-button
+ class="small-button-add-inverted"
mat-button
- [matMenuTriggerFor]="menu"
+ mat-raised-button
+ [disabled]="!item.editable"
+ (click)="
+ showPermissionsDialog(item.elementId, item.name)
+ "
+ *ngIf="item.available"
>
- <span style="font-size: 12px">...</span>
+ <mat-icon>share</mat-icon>
+ <span> Manage permissions</span>
</button>
- <mat-menu #menu="matMenu">
- <button
- mat-menu-item
- (click)="refresh(item.elementId)"
- [disabled]="!item.available"
- >
- <mat-icon>refresh</mat-icon>
- <span> Update</span>
- </button>
- <button
- mat-menu-item
- (click)="
- showPermissionsDialog(item.elementId, item.name)
- "
- [disabled]="!item.available"
- >
- <mat-icon>share</mat-icon>
- <span> Manage permissions</span>
- </button>
- </mat-menu>
</div>
</div>
</div>
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 73c8f331a..e4f586a33 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
@@ -20,10 +20,7 @@ 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';
-import {
- ExtensionsServiceEndpointItem,
- PipelineElementEndpointService,
-} from '@streampipes/platform-services';
+import { ExtensionsServiceEndpointItem } from '@streampipes/platform-services';
import { AppConstants } from '../../../services/app.constants';
import { ObjectPermissionDialogComponent } from '../../../core-ui/object-permission-dialog/object-permission-dialog.component';
import { PanelType, DialogService } from '@streampipes/shared-ui';
@@ -51,8 +48,6 @@ export class EndpointItemComponent implements OnInit {
triggerInstallation: EventEmitter<any> = new EventEmitter<any>();
constructor(
- private snackBar: MatSnackBar,
- private pipelineElementEndpointService: PipelineElementEndpointService,
private addService: AddService,
private sanitizer: DomSanitizer,
public appConstants: AppConstants,
@@ -137,19 +132,6 @@ export class EndpointItemComponent implements OnInit {
event.stopPropagation();
}
- refresh(elementId: string) {
- this.pipelineElementEndpointService
- .update(elementId)
- .subscribe(msg => {
- this.snackBar.open(msg.notifications[0].title, 'Ok', {
- duration: 2000,
- });
- })
- .add(() => {
- // this.loadCurrentElements(type);
- });
- }
-
showPermissionsDialog(elementId: string, elementName: string) {
const dialogRef = this.dialogService.open(
ObjectPermissionDialogComponent,