Skip to content

Commit

Permalink
AuthUser StatisticsInfo Html & fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyoko-Jeremie committed Aug 21, 2023
1 parent 821d843 commit a6e830c
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 8 deletions.
90 changes: 89 additions & 1 deletion html/state.html
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ <h3 style="color: palevioletred; padding: 0 1em;">No Data Come From Server.</h3>
<td>
<a href="javascript:void(0)"
v-on:click="sendCommand(
'/op?_targetMode=client'
'/op?_targetMode=listen'
+ '&endAllConnect=0'
+ '&_target=' + u.index)"
style="margin-right: 1em;"
Expand Down Expand Up @@ -455,6 +455,79 @@ <h3 style="color: palevioletred; padding: 0 1em;">No Data Come From Server.</h3>
</tfoot>
</table>
<br/>

<table style="border: black 3px dashed;" v-if="AuthIndex.length > 0">
<thead>
<tr>
<th colspan="10" style="text-align: center;">
Auth User Info
</th>
</tr>
<tr>
<th>ID</th>
<th>UserName</th>
<th>Password</th>
<th>AuthBase64</th>
<th>running</th>
<th>closeConnect</th>
<th>data</th>
<th>speedMax</th>
<th>speed</th>
<th>detail</th>
<!-- <th></th>-->
</tr>
</thead>
<tbody>

<tr v-for="u in AuthIndex">
<td>{{u.id}}</td>
<td>{{u.user}}</td>
<td>{{u.pwd}}</td>
<td>{{u.base64}}</td>
<td>{{u.sessionsCount}}</td>
<td>
<a href="javascript:void(0)"
v-on:click="sendCommand(
'/op?_targetMode=authUser'
+ '&endAllConnect=0'
+ '&_target=' + u.id)"
style="margin-right: 1em;"
>
CloseConnect
</a>
</td>
<td>{{formatData(u)}}</td>
<td>{{formatSpeedMax(u)}}</td>
<td>{{formatSpeed(u)}}</td>
<td>
<a target="_blank"
v-bind:href="'perState.html?backend='+backend+'&targetMode=authUser&target='+u.index"
>detail</a>
</td>
<!-- <td></td>-->
</tr>

</tbody>
<tfoot>
<tr>
<td colspan="11">
<span class="table-info-cell">
↑ {{dataCount2String(reduceField(AuthIndex, 'byteUpLast'))}}
↓ {{dataCount2String(reduceField(AuthIndex, 'byteDownLast'))}}
</span>
<span class="table-info-cell">
↑Max {{speed2String(reduceField(AuthIndex, 'byteUpChangeMax'))}}
↓Max {{speed2String(reduceField(AuthIndex, 'byteDownChangeMax'))}}
</span>
<span class="table-info-cell">
↑ {{speed2String(reduceField(AuthIndex, 'byteUpChange'))}}
↓ {{speed2String(reduceField(AuthIndex, 'byteDownChange'))}}
</span>
</td>
</tr>
</tfoot>
</table>
<br/>
---------------------------------------------------------------------------------------------
<br/>
<h5>Fast Issue Resolve</h5>
Expand Down Expand Up @@ -697,6 +770,7 @@ <h5>Fast Issue Resolve</h5>
UpstreamIndex: [],
ClientIndex: [],
ListenIndex: [],
AuthIndex: [],
get backend() {
var s = getSearchParams('backend');
if (s) {
Expand Down Expand Up @@ -821,6 +895,20 @@ <h5>Fast Issue Resolve</h5>
} else {
app.ListenIndex = [];
}
if (_.isArray(T.AuthIndex)) {
app.AuthIndex = T.AuthIndex.map(N => {
N.byteInfo = 'true';
N.lastUseUpstreamIndex = _.parseInt(N.lastUseUpstreamIndex);
if (N.AuthUser) {
N.user = N.AuthUser.user || "";
N.pwd = N.AuthUser.pwd || "";
N.base64 = N.AuthUser.base64 || "";
}
return N;
});
} else {
app.AuthIndex = [];
}

app.lastConnectComeTime = T.pool.lastConnectComeTime;
app.lastConnectComeTimeAgo = _.parseInt(T.pool.lastConnectComeTimeAgo);
Expand Down
14 changes: 7 additions & 7 deletions html/stateBootstrap.html
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ <h3 class="alert alert-danger" style="margin-bottom: 0;">{{tableState.NoDataCome
</div>
<br/>

<div class="container-fluid" v-if="AuthIndex.length>0">
<div class="container-fluid" v-if="AuthIndex.length > 0">
<table style="border: black 3px dashed;">
<thead>
<tr>
Expand Down Expand Up @@ -609,16 +609,16 @@ <h3 class="alert alert-danger" style="margin-bottom: 0;">{{tableState.NoDataCome
<tr>
<td colspan="11">
<span class="table-info-cell">
↑ {{dataCount2String(reduceField(ListenIndex, 'byteUpLast'))}}
↓ {{dataCount2String(reduceField(ListenIndex, 'byteDownLast'))}}
↑ {{dataCount2String(reduceField(AuthIndex, 'byteUpLast'))}}
↓ {{dataCount2String(reduceField(AuthIndex, 'byteDownLast'))}}
</span>
<span class="table-info-cell">
↑Max {{speed2String(reduceField(ListenIndex, 'byteUpChangeMax'))}}
↓Max {{speed2String(reduceField(ListenIndex, 'byteDownChangeMax'))}}
↑Max {{speed2String(reduceField(AuthIndex, 'byteUpChangeMax'))}}
↓Max {{speed2String(reduceField(AuthIndex, 'byteDownChangeMax'))}}
</span>
<span class="table-info-cell">
↑ {{speed2String(reduceField(ListenIndex, 'byteUpChange'))}}
↓ {{speed2String(reduceField(ListenIndex, 'byteDownChange'))}}
↑ {{speed2String(reduceField(AuthIndex, 'byteUpChange'))}}
↓ {{speed2String(reduceField(AuthIndex, 'byteDownChange'))}}
</span>
</td>
</tr>
Expand Down

0 comments on commit a6e830c

Please sign in to comment.