-
-
Notifications
You must be signed in to change notification settings - Fork 175
Expand file tree
/
Copy pathcontextual-menu.component.html
More file actions
145 lines (126 loc) · 6.13 KB
/
Copy pathcontextual-menu.component.html
File metadata and controls
145 lines (126 loc) · 6.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<ng-container *ngIf="selectedSession">
<div #menuTrigger="matMenuTrigger" [matMenuTriggerFor]="menu" [style.position]="'fixed'" [style.left.px]="menuX" [style.top.px]="menuY"></div>
<mat-menu #menu [hasBackdrop]="false" role="menu">
<span mat-menu-item class="not-displayed">dummy fix for github issue 3352</span>
<button mat-menu-item (click)="startSession();" *ngIf="selectedSession.status === eSessionStatus.inactive">
<i class="moon-Play"></i>
<span>Start Session</span>
</button>
<button mat-menu-item (click)="stopSession();" *ngIf="selectedSession.status === eSessionStatus.active || selectedSession.status === eSessionStatus.pending">
<img class="moon-stop-outline"
src="assets/images/stop-circle-light{{optionsService.colorTheme === eConstants.darkTheme || (optionsService.colorTheme === eConstants.systemDefaultTheme && appService.isDarkMode()) ? '-dark' : ''}}.png"
alt="stop-circle">
<span style="margin-left: 7px;">Stop Session</span>
</button>
<ng-container *ngIf="selectedSession.type === eSessionType.awsIamRoleFederated">
<button mat-menu-item (click)="logoutFromFederatedSession();">
<i class="moon-Close"></i>
<span> Logout</span>
</button>
</ng-container>
<ng-container *ngIf="selectedSession.type !== eSessionType.azure && selectedSession.type !== eSessionType.awsIamRoleChained">
<div class="divider"></div>
<button mat-menu-item (click)="createAChainedSessionFromSelectedOne();">
<i class="moon-Add"></i>
<span> Create Chained Session</span>
</button>
</ng-container>
<div class="divider" *ngIf="selectedSession.type !== eSessionType.azure"></div>
<button mat-menu-item [matMenuTriggerFor]="change" *ngIf="selectedSession.type !== eSessionType.azure">
<i class="moon-Star"></i>
<span> Change</span>
</button>
<ng-container *ngIf="selectedSession.type !== eSessionType.azure">
<button mat-menu-item (click)="ssmModalOpen();">
<i class="moon-Server"></i>
<span>View SSM Sessions</span>
</button>
</ng-container>
<ng-container
*ngIf="selectedSession.type === eSessionType.awsSsoRole || selectedSession.type === eSessionType.awsIamRoleFederated || selectedSession.type === eSessionType.awsIamRoleChained">
<button [disabled]="this.optionsService.extensionEnabled && isWebConsoleFetching ? true : null" [class.disabled]="isWebConsoleFetching" mat-menu-item (click)="openAwsWebConsole();">
<i class="moon-Open-Web-Console"></i>
<span> Open Web Console</span>
</button>
</ng-container>
<div class="divider"></div>
<ng-container
*ngIf="(selectedSession.type === eSessionType.awsIamRoleFederated || selectedSession.type === eSessionType.awsIamRoleChained || selectedSession.type === eSessionType.awsSsoRole)">
<button mat-menu-item [matMenuTriggerFor]="copy">
<i class="moon-Copy"></i>
<span> Copy</span>
</button>
<div class="divider"></div>
</ng-container>
<button mat-menu-item (click)="editSession();"
*ngIf="selectedSession.type !== eSessionType.awsSsoRole && selectedSession.type !== eSessionType.azure && !isLeappTeamUser">
<i class="moon-Edit"></i>
<span>Edit Session</span>
</button>
<ng-container *ngIf="optionsService.pinned.indexOf(selectedSession.sessionId) === -1">
<button mat-menu-item (click)="pinSession();">
<i class="moon-Pin"></i>
<span>Pin Session</span>
</button>
</ng-container>
<ng-container *ngIf="optionsService.pinned.indexOf(selectedSession.sessionId) !== -1">
<button mat-menu-item (click)="unpinSession();">
<i class="moon-Pin"></i>
<span>Unpin Session</span>
</button>
</ng-container>
<ng-container *ngIf="selectedSession.type !== eSessionType.awsSsoRole && selectedSession.type !== eSessionType.azure">
<button mat-menu-item (click)="deleteSession();">
<i class="moon-Delete"></i>
<span>Delete Session</span>
</button>
</ng-container>
<ng-container
*ngIf="!eConstants.disablePluginSystem && appProviderService.pluginManagerService.availableAwsCredentialsPlugins(appService.detectOs(), selectedSession).length > 0">
<div class="divider"></div>
<button mat-menu-item [matMenuTriggerFor]="pluginList">
<i class="moon-Puzzle"></i>
<span> Plugins</span>
</button>
</ng-container>
</mat-menu>
<mat-menu #change>
<button mat-menu-item (click)="changeRegionModalOpen();">
<i class="moon-Region"></i>
<span>Region</span>
</button>
<button mat-menu-item (click)="changeProfileModalOpen();"
*ngIf="(selectedSession.type === eSessionType.awsIamRoleFederated || selectedSession.type === eSessionType.awsIamRoleChained || selectedSession.type === eSessionType.awsSsoRole || selectedSession.type === eSessionType.awsIamUser)">
<i class="moon-User"></i>
<span>Named Profile</span>
</button>
<button mat-menu-item (click)="changeColorModalOpen();">
<i class="moon-Star"></i>
<span>Color</span>
</button>
</mat-menu>
<mat-menu #copy>
<button mat-menu-item (click)="copyCredentials(1);">
<i class="fab fa-aws"></i>
<span>Account Number</span>
</button>
<button mat-menu-item (click)="copyCredentials(2);">
<i class="fab fa-aws"></i>
<span>Role ARN</span>
</button>
<button mat-menu-item (click)="copyAwsWebConsoleUrl();">
<i class="fab fa-aws"></i>
<span>Web Console URL</span>
</button>
</mat-menu>
<mat-menu #pluginList>
<ng-container *ngFor="let plugin of appProviderService.pluginManagerService.availableAwsCredentialsPlugins(appService.detectOs(), selectedSession)">
<ng-container>
<button mat-menu-item (click)="applyPluginAction(plugin);">
<i class="{{plugin.actionIcon}}"></i>
<span> {{plugin.actionName}}</span>
</button>
</ng-container>
</ng-container>
</mat-menu>
</ng-container>