Debian Codegraph @

src/app/components/wifi-table/wifi-table.component.html

raw symbols SCIP
1 <div class="table-responsive">
2 <table class="table table-dark table-sm">
3 <thead>
4 <tr>
5 <th width="1%" sortable-column="rssi" sort-direction="asc">RSSI</th>
6 <th sortable-column="mac">BSSID</th>
7 <th sortable-column="hostname">ESSID</th>
8 <th sortable-column="vendor">Vendor</th>
9 <th sortable-column="encryption" style="text-align:center">Encryption</th>
10
11 <th width="1%" *ngIf="hopping" sortable-column="channel">Ch</th>
12 <th width="1%" *ngIf="!hopping">
13 <button type="button" class="btn btn-dark btn-sm" (click)="api.cmd('wifi.recon.channel clear')"
14 placement="right" ngbTooltip="Restore channel hopping.">
15 <i class="fas fa-broadcast-tower"></i>
16 </button>
17 </th>
18
19 <th width="1%" sortable-column="clients">Clients</th>
20 <th sortable-column="sent">Sent</th>
21 <th sortable-column="received">Recvd</th>
22 <th sortable-column="last_seen">Seen</th>
23 </tr>
24 </thead>
25 <tbody>
26
27 <tr *ngIf="aps && aps.length == 0">
28 <td colspan="11" align="center">
29 <i>empty</i>
30 </td>
31 </tr>
32
33 <ng-container *ngFor="let ap of aps | search: omnibar.query">
34 <tr
35 *ngIf="(!currAP || currAP.mac == ap.mac) && (!wifi || !wifi.state.channels.length || wifi.state.channels.includes(ap.channel))"
36 [class.alive]="ap | alive:1000">
37 <td>
38 <ui-signal-indicator [signalstrength]="ap.rssi"></ui-signal-indicator>
39 </td>
40 <td>
41 <div ngbDropdown [open]="visibleMenu == ap.mac">
42 <button class="btn btn-sm btn-dark btn-action" ngbDropdownToggle
43 (click)="visibleMenu = (visibleMenu == ap.mac ? null : ap.mac)">
44 {{ ap.mac | uppercase }}
45 </button>
46 <div ngbDropdownMenu class="menu-dropdown">
47 <ul>
48 <li>
49 <a (click)="visibleMenu = null; clipboard.copy(ap.mac.toUpperCase())">Copy</a>
50 </li>
51 <li>
52 <a (click)="api.cmd('wifi.assoc ' + ap.mac); visibleMenu = null;">Associate</a>
53 </li>
54 <li *ngIf="ap.clients.length > 0">
55 <a (click)="api.cmd('wifi.deauth ' + ap.mac); visibleMenu = null;">Deauthenticate Clients</a>
56 </li>
57 <li>
58 <a (click)="setAlias(ap); visibleMenu = null;">Set Alias</a>
59 </li>
60 </ul>
61 </div>
62 </div>
63 </td>
64
65 <td [class.empty]="ap.hostname === '<hidden>'">
66 {{ ap.hostname }}
67 <span *ngIf="ap.alias" class="badge badge-pill badge-secondary" style="margin-left:5px">{{ ap.alias
68 }}</span>
69 </td>
70
71 <td [class.empty]="!ap.vendor">
72 {{ ap.vendor ? ap.vendor : 'unknown' }}
73 </td>
74
75 <td align="center" class="nowrap">
76 <i *ngIf="ap.encryption === 'OPEN'" class="fas fa-unlock empty" placement="top"
77 ngbTooltip="Open Network"></i>
78
79 <span>
80 <span style="cursor:pointer;" *ngIf="ap.handshake" (click)="downloadHandshakeFor(ap)">
81 <i style=" color: red; margin-right: 5px"
82 ngbTooltip="WPA key material captured to {{ handshakeFileFor(ap) }}" class="fas fa-key">
83 </i>
84 </span>
85 <span *ngIf="ap.encryption !== 'OPEN'" ngbTooltip="{{ ap.cipher }}, {{ ap.authentication}}">
86 {{ ap.encryption }}
87 </span>
88 </span>
89
90 <div ngbDropdown *ngIf="(ap.wps | json) != '{}'" [open]="visibleWPS == ap.mac" placement="left"
91 style="display: inline">
92 <button ngbDropdownToggle class="btn btn-sm badge badge-secondary btn-action drop-small btn-tiny"
93 (click)="visibleWPS = (visibleWPS == ap.mac ? null : ap.mac)">
94 WPS
95 </button>
96
97 <div ngbDropdownMenu class="menu-dropdown">
98 <table class="table table-sm table-dark">
99 <tbody>
100 <tr *ngFor="let item of ap.wps | keyvalue">
101 <th>{{ item.key }}</th>
102 <td>{{ item.value }}</td>
103 </tr>
104 </tbody>
105 </table>
106 </div>
107 </div>
108
109 </td>
110
111 <td *ngIf="hopping" align="center">
112 <button type="button" class="btn btn-dark btn-sm btn-action"
113 (click)="api.cmd('wifi.recon.channel ' + ap.channel)" ngbTooltip="Stay on channel {{ ap.channel }}.">
114 {{ ap.channel }}
115 </button>
116 </td>
117 <td *ngIf="!hopping" align="center">
118 {{ ap.channel }}
119 </td>
120
121 <td [class.empty]="ap.clients.length == 0" align="center">
122 <span *ngIf="ap.clients.length == 0">0</span>
123 <span *ngIf="ap.clients.length > 0">
124 <span style="cursor:pointer;" class="badge badge-danger" (click)="currAP = (currAP ? null : ap)">
125 {{ ap.clients.length }}
126 <i *ngIf="!currAP" class="fas fa-angle-right"></i>
127 <i *ngIf="currAP && currAP.mac == ap.mac" class="fas fa-angle-down"></i>
128 </span>
129 </span>
130 </td>
131
132 <td [class.empty]="!ap.sent">{{ ap.sent | size }}</td>
133 <td [class.empty]="!ap.received">{{ ap.received | size }}</td>
134 <td class="time">{{ ap.last_seen | date: 'HH:mm:ss' }}</td>
135
136 </tr>
137 </ng-container>
138 </tbody>
139 </table>
140
141 <table *ngIf="currAP" class="table table-sm table-dark">
142 <thead>
143 <tr>
144 <th style="width:1%">RSSI</th>
145 <th style="width:1%">MAC</th>
146 <th>Vendor</th>
147 <th>Sent</th>
148 <th>Recvd</th>
149 <th style="width:1%" class="nowrap">First Seen</th>
150 <th style="width:1%" class="nowrap">Last Seen</th>
151 </tr>
152 </thead>
153 <tbody>
154 <tr *ngIf="currAP.clients.length == 0">
155 <td colspan="2" align="center">
156 <i>empty</i>
157 </td>
158 </tr>
159
160 <tr *ngFor="let client of currAP.clients | search: omnibar.query">
161 <td>
162 <ui-signal-indicator [signalstrength]="client.rssi"></ui-signal-indicator>
163 </td>
164 <td class="nowrap">
165 <span ngbDropdown [open]="visibleClientMenu == client.mac">
166 <button class="btn btn-sm btn-dark btn-action" ngbDropdownToggle
167 (click)="visibleClientMenu = (visibleClientMenu == client.mac ? null : client.mac)">
168 {{ client.mac | uppercase }}
169 </button>
170 <div ngbDropdownMenu class="menu-dropdown">
171 <ul>
172 <li>
173 <a (click)="visibleMenu = null; clipboard.copy(client.mac.toUpperCase())">Copy</a>
174 </li>
175 <li>
176 <a (click)="setAlias(client); visibleClientMenu = null;">Set Alias</a>
177 </li>
178 <li>
179 <a (click)="api.cmd('wifi.deauth ' + client.mac); visibleClientMenu = null;">Deauthenticate</a>
180 </li>
181 </ul>
182 </div>
183 </span>
184
185 <span *ngIf="client.alias" (click)="setAlias(client)" class="badge badge-pill badge-secondary"
186 style="margin-left: 5px; cursor:pointer">
187 {{ client.alias }}
188 </span>
189 </td>
190 <td [class.empty]="!client.vendor">
191 {{ client.vendor ? client.vendor : 'unknown' }}
192 </td>
193 <td class="nowrap" [class.empty]="!client.sent">{{ client.sent | size }}</td>
194 <td class="nowrap" [class.empty]="!client.received">{{ client.received | size }}</td>
195 <td>
196 {{ client.first_seen | date: 'HH:mm:ss' }}
197 </td>
198 <td>
199 {{ client.last_seen | date: 'HH:mm:ss' }}
200 </td>
201 </tr>
202 </tbody>
203 </table>
204 </div>
205
206 <div id="inputModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="inputModalTitle">
207 <div class="modal-dialog" role="document">
208 <div class="modal-content">
209 <div class="modal-header">
210 <div class="modal-title">
211 <h5 id="inputModalTitle"></h5>
212 </div>
213 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
214 <span aria-hidden="true">&times;</span>
215 </button>
216 </div>
217 <div class="modal-body">
218 <form (ngSubmit)="doSetAlias()">
219 <div class="form-group row">
220 <div class="col">
221 <input type="text" class="form-control param-input" id="in" value="">
222 <input type="hidden" id="inhost" value="">
223 </div>
224 </div>
225 <div class="text-right">
226 <button type="submit" class="btn btn-dark">Ok</button>
227 </div>
228 </form>
229 </div>
230 </div>
231 </div>
232 </div>