Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(#2095): remove update button & move permissions button #2155

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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>&nbsp;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>&nbsp;Update</span>
</button>
<button
mat-menu-item
(click)="
showPermissionsDialog(item.elementId, item.name)
"
[disabled]="!item.available"
>
<mat-icon>share</mat-icon>
<span>&nbsp;Manage permissions</span>
</button>
</mat-menu>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Loading