| 1 | <div class="omnibar collapse" [class.show]="api.settings.omnibar" id="omniCollapse"> |
| 2 | |
| 3 | <div *ngIf="withCmd" class="row"> |
| 4 | |
| 5 | <div *ngIf="rest.state.replaying" class="col-md-12"> |
| 6 | <div class="input-group input-group-sm"> |
| 7 | |
| 8 | <button |
| 9 | *ngIf="rest.state.replaying" |
| 10 | type="button" |
| 11 | class="btn btn-dark btn-sm" |
| 12 | placement="right" |
| 13 | ngbTooltip="{{ api.isPaused() ? 'Continue' : 'Pause' }} replay." |
| 14 | (click)="api.paused = !api.paused"> |
| 15 | <i *ngIf="api.isPaused()" class="fas fa-play"></i> |
| 16 | <i *ngIf="!api.isPaused()" class="fas fa-pause"></i> |
| 17 | </button> |
| 18 | |
| 19 | <button |
| 20 | type="button" |
| 21 | class="btn btn-dark btn-sm" |
| 22 | placement="right" |
| 23 | ngbTooltip="Stop replay." |
| 24 | (click)="stopReplaying()"> |
| 25 | <i class="fas fa-stop"></i> |
| 26 | </button> |
| 27 | |
| 28 | <button class="btn btn-dark btn-sm" ngbTooltip="Replaying {{ api.session.polled_at | date:'short' }}"> |
| 29 | {{ curReplaytime() | rectime }} |
| 30 | </button> |
| 31 | |
| 32 | <input |
| 33 | type="range" |
| 34 | id="replayRange" |
| 35 | class="custom-range" |
| 36 | (change)="setReplayFrame($event.target.value)" |
| 37 | min="0" |
| 38 | max="{{ rest.state.rec_frames }}" |
| 39 | value="{{ rest.state.rec_cur_frame }}"> |
| 40 | |
| 41 | <button class="btn btn-dark btn-sm"> |
| 42 | {{ rest.state.rec_time | rectime }} |
| 43 | </button> |
| 44 | |
| 45 | </div> |
| 46 | </div> |
| 47 | |
| 48 | <div class="col-md-12" *ngIf="!rest.state.replaying"> |
| 49 | <div class="input-group input-group-sm"> |
| 50 | |
| 51 | <button |
| 52 | *ngIf="rest.state.recording" |
| 53 | type="button" |
| 54 | class="btn btn-dark btn-sm" |
| 55 | ngbTooltip="Stop recording the session." |
| 56 | placement="right" |
| 57 | (click)="stopRecording()"> |
| 58 | <i class="fas fa-stop"></i> |
| 59 | {{ rest.state.rec_time | rectime }} |
| 60 | </button> |
| 61 | |
| 62 | <button *ngIf="rest.state.loading" class="btn btn-sm btn-dark" disabled> |
| 63 | loading ... |
| 64 | </button> |
| 65 | |
| 66 | <div ngbDropdown *ngIf="withLimit && !rest.state.recording && !rest.state.replaying && !rest.state.loading"> |
| 67 | <button ngbDropdownToggle |
| 68 | ngbTooltip="Record or replay the session." |
| 69 | placement="right" |
| 70 | class="btn btn-dark btn-sm"> |
| 71 | <i class="fas fa-video"></i> |
| 72 | </button> |
| 73 | |
| 74 | <div ngbDropdownMenu class="menu-dropdown"> |
| 75 | <ul> |
| 76 | <li> |
| 77 | <a (click)="showRecordModal()"> |
| 78 | <i class="fas fa-circle" style="color: darkred"></i> Record Session |
| 79 | </a> |
| 80 | </li> |
| 81 | <li> |
| 82 | <a (click)="showReplayModal()"> |
| 83 | <i class="fas fa-folder-open"></i> Replay |
| 84 | </a> |
| 85 | </li> |
| 86 | </ul> |
| 87 | </div> |
| 88 | </div> |
| 89 | |
| 90 | <button |
| 91 | type="button" |
| 92 | class="btn btn-dark btn-sm" |
| 93 | ngbTooltip="{{ api.isPaused() ? 'Resume API polling.' : 'Pause API polling and freeze the UI for editing.' }}" |
| 94 | placement="right" |
| 95 | (click)="api.paused = !api.paused"> |
| 96 | <i *ngIf="api.isPaused()" class="fas fa-play"></i> |
| 97 | <span *ngIf="!api.isPaused()"> |
| 98 | {{ api.ping }}ms |
| 99 | </span> |
| 100 | </button> |
| 101 | |
| 102 | <button |
| 103 | *ngIf="clearCmd" |
| 104 | type="button" |
| 105 | class="btn btn-dark btn-sm" |
| 106 | ngbTooltip="Clear records from the current view." |
| 107 | placement="right" |
| 108 | (click)="onClearClicked()"> |
| 109 | <i class="fas fa-trash-alt"></i> |
| 110 | </button> |
| 111 | |
| 112 | <ng-container *ngIf="withLimit"> |
| 113 | <select |
| 114 | (change)="api.settings.events = $event.target.value" |
| 115 | placement="right" |
| 116 | ngbTooltip="Set how many events to display."> |
| 117 | <option value="15" [selected]="api.settings.events == 15">15</option> |
| 118 | <option value="25" [selected]="api.settings.events == 25">25</option> |
| 119 | <option value="50" [selected]="api.settings.events == 50">50</option> |
| 120 | <option value="100" [selected]="api.settings.events == 100">100</option> |
| 121 | <option value="500" [selected]="api.settings.events == 500">500</option> |
| 122 | </select> |
| 123 | </ng-container> |
| 124 | |
| 125 | <ng-container *ngIf="withIfaces"> |
| 126 | <span |
| 127 | *ngIf="ifaces.length == 0" |
| 128 | ngbTooltip="No compatible interfaces found. Disconnect from any network the wireless interface you want to use for scanning." |
| 129 | placement="right" |
| 130 | class="badge badge-warning" |
| 131 | style="margin: 3px; padding-top:7px"> |
| 132 | <i class="fas fa-exclamation-triangle"></i> |
| 133 | </span> |
| 134 | <select |
| 135 | id="wifiiface" |
| 136 | *ngIf="ifaces.length > 0" |
| 137 | [disabled]="api.module('wifi').running" |
| 138 | (change)="onSetWifiInterface($event.target.value)" |
| 139 | ngbTooltip="Change the wifi.interface parameter."> |
| 140 | <option |
| 141 | *ngFor="let iface of ifaces" |
| 142 | value="{{ iface.name }}" |
| 143 | [selected]="isWifiIface(iface)" |
| 144 | >{{ iface.name }}</option> |
| 145 | </select> |
| 146 | </ng-container> |
| 147 | |
| 148 | <span *ngFor="let mod of modules | keyvalue"> |
| 149 | <button |
| 150 | type="button" |
| 151 | class="btn btn-dark btn-sm" |
| 152 | ngbTooltip="{{(enabled[mod.key] ? 'Stop ' : 'Start ') + mod.key + ' module.'}}" |
| 153 | placement="right" |
| 154 | (click)="onModuleToggleClicked(mod)"> |
| 155 | <i *ngIf="enabled[mod.key]" class="fas fa-stop"></i> |
| 156 | <i *ngIf="!enabled[mod.key]" class="fas fa-play"></i> |
| 157 | </button> |
| 158 | </span> |
| 159 | |
| 160 | <div class="input-group-prepend"> |
| 161 | <span class="input-group-text"> |
| 162 | <i class="fas fa-terminal"></i> |
| 163 | </span> |
| 164 | </div> |
| 165 | <input [ngbTypeahead]="searchCommand" [(ngModel)]="cmd" id="cmd" (keyup.enter)="onCmd()" type="text" class="form-control" placeholder="Command bar ..." aria-label="Command bar ..."/> |
| 166 | |
| 167 | <button |
| 168 | type="button" |
| 169 | class="btn btn-dark btn-sm" |
| 170 | ngbTooltip="Hide Omnibar" |
| 171 | placement="left" |
| 172 | (click)="api.settings.omnibar = false"> |
| 173 | <i class="far fa-caret-square-up"></i> |
| 174 | </button> |
| 175 | </div> |
| 176 | </div> |
| 177 | </div> |
| 178 | |
| 179 | <div class="row"> |
| 180 | <div class="col-md-12"> |
| 181 | <div class="input-group input-group-sm"> |
| 182 | <input [(ngModel)]="svc.query" type="text" class="form-control" placeholder="Search ..." aria-label="Search"/> |
| 183 | </div> |
| 184 | </div> |
| 185 | </div> |
| 186 | |
| 187 | </div> |
| 188 | |
| 189 | <div id="recordModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="recordModalTitle"> |
| 190 | <div class="modal-dialog" role="document"> |
| 191 | <div class="modal-content"> |
| 192 | <div class="modal-header"> |
| 193 | <div class="modal-title"> |
| 194 | <h5 id="recordModalTitle">Record File</h5> |
| 195 | </div> |
| 196 | <button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
| 197 | <span aria-hidden="true">×</span> |
| 198 | </button> |
| 199 | </div> |
| 200 | <div class="modal-body"> |
| 201 | <form (ngSubmit)="doRecord()"> |
| 202 | <div class="form-group row"> |
| 203 | <div class="col"> |
| 204 | <input type="text" class="form-control" id="recordFile" value=""> |
| 205 | </div> |
| 206 | </div> |
| 207 | <div class="text-right"> |
| 208 | <button type="submit" class="btn btn-dark">Start Recording</button> |
| 209 | </div> |
| 210 | </form> |
| 211 | </div> |
| 212 | </div> |
| 213 | </div> |
| 214 | </div> |
| 215 | |
| 216 | <div id="loadingModal" class="modal fade" data-backdrop="static" data-keyboard="false" tabindex="-1" role="dialog" aria-labelledby="loadingModalTitle"> |
| 217 | <div class="modal-dialog" role="document"> |
| 218 | <div class="modal-content"> |
| 219 | <div class="modal-body"> |
| 220 | Loading session from {{ rest.state.rec_filename.split('/').pop() }} ... |
| 221 | <br> |
| 222 | <br/> |
| 223 | <ngb-progressbar |
| 224 | type="success" |
| 225 | [value]="rest.state.load_progress" |
| 226 | [striped]="true" |
| 227 | [animated]="true"> |
| 228 | <i>{{ rest.state.load_progress | number:'1.0-0' }}%</i> |
| 229 | </ngb-progressbar> |
| 230 | </div> |
| 231 | </div> |
| 232 | </div> |
| 233 | </div> |
| 234 | |
| 235 | <div id="replayModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="replayModalTitle"> |
| 236 | <div class="modal-dialog" role="document"> |
| 237 | <div class="modal-content"> |
| 238 | <div class="modal-header"> |
| 239 | <div class="modal-title"> |
| 240 | <h5 id="replayModalTitle">Replay Session File</h5> |
| 241 | </div> |
| 242 | <button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
| 243 | <span aria-hidden="true">×</span> |
| 244 | </button> |
| 245 | </div> |
| 246 | <div class="modal-body"> |
| 247 | <form (ngSubmit)="doReplay()"> |
| 248 | <div class="form-group row"> |
| 249 | <div class="col"> |
| 250 | <input type="text" class="form-control" id="replayFile" value=""> |
| 251 | </div> |
| 252 | </div> |
| 253 | <div class="text-right"> |
| 254 | <button type="submit" class="btn btn-dark">Replay</button> |
| 255 | </div> |
| 256 | </form> |
| 257 | </div> |
| 258 | </div> |
| 259 | </div> |
| 260 | </div> |
| 261 |