Node actions

This commit is contained in:
ziajka
2017-11-29 16:07:53 +01:00
parent 055dde4ea5
commit 935b0b93e6
14 changed files with 189 additions and 8 deletions

View File

@ -1,13 +1,17 @@
<div class="context-menu" [style.left]="leftPosition" [style.top]="topPosition" *ngIf="node">
<span [matMenuTriggerFor]="contextMenu"></span>
<mat-menu #contextMenu="matMenu">
<button mat-menu-item *ngIf="node.status == 'stopped'">
<mat-icon>play_arrow</mat-icon>
<span>Start</span>
</button>
<button mat-menu-item *ngIf="node.status == 'started'">
<mat-icon>stop</mat-icon>
<span>Stop</span>
</button>
<!--<button mat-menu-item *ngIf="node.status == 'stopped'">-->
<!--<mat-icon>play_arrow</mat-icon>-->
<!--<span>Start</span>-->
<!--</button>-->
<!--<ng-container *ngFor="let action of actions">-->
<!--<button mat-menu-item *ngIf="action.isVisible(node)" (click)="action.onClick(node)">-->
<!--<mat-icon>{{ action.icon(node) }}</mat-icon>-->
<!--<span>{{ action.label(node) }}</span>-->
<!--</button>-->
<!--</ng-container>-->
</mat-menu>
</div>