|
1 | | -<ng-container *ngIf="template === 'default'"> |
2 | | - <div class="utm-botton-container"> |
3 | | - <div (click)="closeConsole()" class="overlay-bottom"></div> |
4 | | - <div class="utm-bottom-action"> |
5 | | - <div class="window-agent"> |
6 | | - <div class="command-header d-flex justify-content-between align-items-center "> |
7 | | - <span *ngIf="agent" |
8 | | - [ngClass]="agent.status === agentStatusEnum.ONLINE?'text-success-800':'text-warning-800'" |
9 | | - class="span-small-icon d-flex justify-content-start align-items-center ml-3"> |
10 | | - <i |
11 | | - [ngClass]="'icon-circle2'" |
12 | | - class="mr-2"></i> |
13 | | - {{ agent.hostname }} ({{ agent.os }}) |
14 | | - </span> |
| 1 | +<div [ngClass]="{'utm-botton-container': template === 'default', |
| 2 | + 'top-zero': template === 'default'}"> |
| 3 | + <div *ngIf="template === 'default'" (click)="closeConsole()" class="overlay-bottom"></div> |
15 | 4 |
|
16 | | - <button (click)="closeConsole()" aria-label="Close" |
17 | | - class="close button-close" type="button"> |
18 | | - <div class="close-icon"></div> |
19 | | - </button> |
20 | | - </div> |
21 | | - |
22 | | - <ng-container *ngIf="!authorize"> |
23 | | - <div class="terminal f-flex flex-column"> |
24 | | - <div class="d-flex justify-content-start align-items-start" *ngIf="!commandInProgress"> |
25 | | - <span class="console-info"> |
26 | | - {{ 'Password: ' }} |
27 | | - </span> |
28 | | - <input type="password" |
29 | | - [autofocus]="true" |
30 | | - [(ngModel)]="pass" |
31 | | - (keyup.enter)="checkPassword()" class="command ml-2" |
32 | | - placeholder="Enter your Panel password"> |
33 | | - </div> |
34 | | - </div> |
35 | | - </ng-container> |
36 | | - <ng-container *ngIf="authorize"> |
37 | | - <ng-container |
38 | | - *ngIf="!connectionError && agent.status === agentStatusEnum.ONLINE;else missingAgent"> |
39 | | - <div class="terminal f-flex flex-column" #contentWrapper> |
40 | | - <span class="font-size-lg mb-3"> |
41 | | - <i class="icon-keyboard"></i> Press <b>TAB</b> to use automation variables in the command |
42 | | - </span> |
43 | | - <ng-template #colContent> |
44 | | - <app-incident-variable-select |
45 | | - (variableSelected)="insertVariablePlaceholder($event)"></app-incident-variable-select> |
46 | | - </ng-template> |
| 5 | + <div class="utm-bottom-action" [ngClass]="{'h-450px': template === 'on-demand'}"> |
| 6 | + <div class="window-agent d-flex flex-column"> |
| 7 | + <!-- Header --> |
| 8 | + <div class="command-header py-3 d-flex justify-content-between align-items-center"> |
| 9 | + <span *ngIf="agent" |
| 10 | + [ngClass]="agent.status === agentStatusEnum.ONLINE ? 'text-success-800' : 'text-warning-800'" |
| 11 | + class="span-small-icon d-flex justify-content-start align-items-center ml-3"> |
| 12 | + <i [ngClass]="'icon-circle2'" class="mr-2"></i> |
| 13 | + {{ agent.hostname }} ({{ agent.os }}) |
| 14 | + </span> |
47 | 15 |
|
48 | | - <div class="output d-flex flex-grow-1 align-items-start justify-content-start flex-column"> |
49 | | - <span *ngFor="let message of messages" [innerHTML]="message | safe:'html'" |
50 | | - [ngClass]="{'ml-3': !message.startsWith(consoleSignal)}"></span> |
51 | | - </div> |
52 | | - <div class="d-flex justify-content-start align-items-start" *ngIf="!commandInProgress"> |
53 | | - <span class="console-info" |
54 | | - [ngbPopover]="colContent" [autoClose]="true" triggers="manual" #p=ngbPopover |
55 | | - [popoverClass]="'popover'" |
56 | | - container="body" placement="right"> |
57 | | - {{ consoleSignal }} |
58 | | - </span> |
59 | | - <input [(ngModel)]="command" |
60 | | - #commandInput |
61 | | - (keydown.tab)="p.open()" |
62 | | - (keyup.enter)="sendCommand()" class="command ml-2" |
63 | | - (keyup)="handleCommandHistory($event)" (keydown)="handleCommandHistory($event)" |
64 | | - placeholder="Enter command here"> |
65 | | - </div> |
66 | | - </div> |
67 | | - </ng-container> |
68 | | - <ng-template #missingAgent> |
69 | | - <div class="terminal d-flex flex-column align-items-center justify-content-center"> |
70 | | - <i class="icon-alignment-unalign" [ngStyle]="{'font-size':'135px'}"></i> |
71 | | - <h6>Agent is disconnected or missing</h6> |
72 | | - </div> |
73 | | - </ng-template> |
74 | | - </ng-container> |
| 16 | + <button *ngIf="template === 'default'" |
| 17 | + (click)="closeConsole()" |
| 18 | + aria-label="Close" |
| 19 | + class="close button-close" |
| 20 | + type="button"> |
| 21 | + <div class="close-icon"></div> |
| 22 | + </button> |
75 | 23 | </div> |
76 | 24 |
|
77 | | - </div> |
78 | | - </div> |
79 | | -</ng-container> |
80 | | - |
81 | | -<ng-container *ngIf="template === 'on-demand'"> |
82 | | - <div class=""> |
83 | | - <div class="utm-bottom-action"> |
84 | | - <div class="window-agent"> |
85 | | - <div class="command-header d-flex justify-content-between align-items-center "> |
86 | | - <span *ngIf="agent" |
87 | | - [ngClass]="agent.status === agentStatusEnum.ONLINE ? 'text-success-800':'text-warning-800'" |
88 | | - class="span-small-icon d-flex justify-content-start align-items-center ml-3"> |
89 | | - <i [ngClass]="'icon-circle2'" |
90 | | - class="mr-2"></i> |
91 | | - {{ agent.hostname }} ({{ agent.os }}) |
92 | | - </span> |
| 25 | + <!-- Password Input --> |
| 26 | + <ng-container *ngIf="!authorize"> |
| 27 | + <div class="terminal f-flex flex-column min-h-0 overflow-auto"> |
| 28 | + <div class="d-flex justify-content-start align-items-start" *ngIf="!commandInProgress"> |
| 29 | + <span class="console-info">{{ 'Password: ' }}</span> |
| 30 | + <input type="password" |
| 31 | + #passwordInput |
| 32 | + [(ngModel)]="pass" |
| 33 | + (keyup.enter)="checkPassword()" |
| 34 | + class="command ml-2" |
| 35 | + placeholder="Enter your Panel password"> |
| 36 | + </div> |
93 | 37 | </div> |
| 38 | + </ng-container> |
94 | 39 |
|
95 | | - <ng-container *ngIf="!authorize"> |
96 | | - <div class="terminal f-flex flex-column"> |
97 | | - <div class="d-flex justify-content-start align-items-start" *ngIf="!commandInProgress"> |
98 | | - <span class="console-info"> |
99 | | - {{ 'Password: ' }} |
100 | | - </span> |
101 | | - <input type="password" |
102 | | - [(ngModel)]="pass" |
103 | | - (keyup.enter)="checkPassword()" class="command ml-2" |
104 | | - placeholder="Enter your Panel password"> |
105 | | - </div> |
106 | | - </div> |
107 | | - </ng-container> |
108 | | - <ng-container *ngIf="authorize"> |
109 | | - <ng-container |
110 | | - *ngIf="!connectionError && agent && agent.status === agentStatusEnum.ONLINE;else missingAgent"> |
111 | | - <div class="terminal f-flex flex-column" #contentWrapper> |
| 40 | + <!-- Console Content --> |
| 41 | + <ng-container *ngIf="authorize"> |
| 42 | + <ng-container *ngIf="!connectionError && agent && agent.status === agentStatusEnum.ONLINE; else missingAgent"> |
| 43 | + <div class="terminal d-flex flex-column m-h-0"> |
112 | 44 | <span class="font-size-lg mb-3"> |
113 | 45 | <i class="icon-keyboard"></i> Press <b>TAB</b> to use automation variables in the command |
114 | 46 | </span> |
115 | | - <ng-template #colContent> |
116 | | - <app-incident-variable-select |
117 | | - (variableSelected)="insertVariablePlaceholder($event)"></app-incident-variable-select> |
118 | | - </ng-template> |
119 | 47 |
|
120 | | - <div class="output d-flex flex-grow-1 align-items-start justify-content-start flex-column"> |
121 | | - <span *ngFor="let message of messages" [innerHTML]="message | safe:'html'" |
122 | | - [ngClass]="{'ml-3': !message.startsWith(consoleSignal)}"></span> |
123 | | - </div> |
124 | | - <div class="d-flex justify-content-start align-items-start" *ngIf="!commandInProgress"> |
125 | | - <span class="console-info" |
126 | | - [ngbPopover]="colContent" [autoClose]="true" triggers="manual" #p=ngbPopover |
127 | | - [popoverClass]="'popover'" |
128 | | - container="body" placement="right"> |
129 | | - {{ consoleSignal }} |
130 | | - </span> |
131 | | - <input [(ngModel)]="command" |
132 | | - #commandInput |
133 | | - (keydown.tab)="p.open()" |
134 | | - (keyup.enter)="sendCommand()" class="command ml-2" |
135 | | - (keyup)="handleCommandHistory($event)" (keydown)="handleCommandHistory($event)" |
136 | | - placeholder="Enter command here"> |
137 | | - </div> |
| 48 | + <ng-template #colContent> |
| 49 | + <app-incident-variable-select |
| 50 | + (variableSelected)="insertVariablePlaceholder($event)"> |
| 51 | + </app-incident-variable-select> |
| 52 | + </ng-template> |
| 53 | + |
| 54 | + <div #contentWrapper class="output d-flex m-h-0 flex-grow-1 align-items-start justify-content-start flex-column"> |
| 55 | + <span *ngFor="let message of messages" |
| 56 | + [innerHTML]="message | safe:'html'" |
| 57 | + [ngClass]="{'ml-3': !message.startsWith(consoleSignal)}"> |
| 58 | + </span> |
138 | 59 | </div> |
139 | | - </ng-container> |
140 | | - <ng-template #missingAgent> |
141 | | - <div class="terminal d-flex flex-column align-items-center justify-content-center"> |
142 | | - <i class="icon-alignment-unalign" [ngStyle]="{'font-size':'135px'}"></i> |
143 | | - <h6>Agent is disconnected or missing</h6> |
| 60 | + |
| 61 | + <div class="d-flex justify-content-start align-items-start" *ngIf="!commandInProgress"> |
| 62 | + <span class="console-info" |
| 63 | + [ngbPopover]="colContent" |
| 64 | + [autoClose]="true" |
| 65 | + triggers="manual" |
| 66 | + #p="ngbPopover" |
| 67 | + [popoverClass]="'popover'" |
| 68 | + container="body" |
| 69 | + placement="right"> |
| 70 | + {{ consoleSignal }} |
| 71 | + </span> |
| 72 | + <input [(ngModel)]="command" |
| 73 | + #commandInput |
| 74 | + (keydown.tab)="p.open()" |
| 75 | + (keyup.enter)="sendCommand()" |
| 76 | + class="command ml-2" |
| 77 | + (keyup)="handleCommandHistory($event)" |
| 78 | + (keydown)="handleCommandHistory($event)" |
| 79 | + placeholder="Enter command here"> |
144 | 80 | </div> |
145 | | - </ng-template> |
| 81 | + </div> |
146 | 82 | </ng-container> |
147 | | - </div> |
148 | 83 |
|
| 84 | + <ng-template #missingAgent> |
| 85 | + <div class="terminal d-flex flex-column align-items-center justify-content-center"> |
| 86 | + <i class="icon-alignment-unalign" [ngStyle]="{'font-size':'135px'}"></i> |
| 87 | + <h6>Agent is disconnected or missing</h6> |
| 88 | + </div> |
| 89 | + </ng-template> |
| 90 | + </ng-container> |
149 | 91 | </div> |
150 | 92 | </div> |
151 | | -</ng-container> |
152 | | - |
| 93 | +</div> |
0 commit comments