mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-16 05:30:27 +08:00
可以修改单个用户的带宽算法
This commit is contained in:
@@ -68,6 +68,7 @@ func (this *UpdateAction) RunGet(params struct {
|
||||
"mobile": user.Mobile,
|
||||
"isOn": user.IsOn,
|
||||
"countAccessKeys": countAccessKeys,
|
||||
"bandwidthAlgo": user.BandwidthAlgo,
|
||||
|
||||
// 实名认证
|
||||
"hasNewIndividualIdentity": hasNewIndividualIdentity,
|
||||
@@ -98,6 +99,7 @@ func (this *UpdateAction) RunPost(params struct {
|
||||
Remark string
|
||||
IsOn bool
|
||||
ClusterId int64
|
||||
BandwidthAlgo string
|
||||
|
||||
// OTP
|
||||
OtpOn bool
|
||||
@@ -159,6 +161,7 @@ func (this *UpdateAction) RunPost(params struct {
|
||||
Remark: params.Remark,
|
||||
IsOn: params.IsOn,
|
||||
NodeClusterId: params.ClusterId,
|
||||
BandwidthAlgo: params.BandwidthAlgo,
|
||||
})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
|
||||
@@ -109,6 +109,7 @@ func (this *UserAction) RunGet(params struct {
|
||||
"isVerified": user.IsVerified,
|
||||
"registeredIP": user.RegisteredIP,
|
||||
"registeredRegion": registeredRegion,
|
||||
"bandwidthAlgo": user.BandwidthAlgo,
|
||||
|
||||
// 实名认证
|
||||
"hasNewIndividualIdentity": hasNewIndividualIdentity,
|
||||
|
||||
@@ -80,6 +80,18 @@
|
||||
<textarea rows="3" name="remark" v-model="user.remark"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>带宽算法</td>
|
||||
<td>
|
||||
<select class="ui dropdown auto-width" name="bandwidthAlgo" v-model="user.bandwidthAlgo">
|
||||
<option value="">[使用默认]</option>
|
||||
<option value="secondly">峰值带宽</option>
|
||||
<option value="avg">平均带宽</option>
|
||||
</select>
|
||||
<p class="comment" v-if="user.bandwidthAlgo == 'secondly'">按在计时时间段内(5分钟)最高带宽峰值计算,比如5分钟内最高的某个时间点带宽为100Mbps,那么就认为此时间段内的峰值带宽为100Mbps。</p>
|
||||
<p class="comment" v-if="user.bandwidthAlgo == 'avg'">按在计时时间段内(5分钟)平均带宽计算,即此时间段内的总流量除以时间段的秒数,比如5分钟(300秒)内总流量600MB,那么带宽即为<code-label>600MB * 8bit/300s = 16Mbps</code-label>;通常平均带宽算法要比峰值带宽要少很多。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>启用当前用户</td>
|
||||
<td>
|
||||
|
||||
@@ -71,6 +71,16 @@
|
||||
<span v-else class="disabled">没有设置。</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>带宽算法</td>
|
||||
<td>
|
||||
<span v-if="user.bandwidthAlgo.length > 0">
|
||||
<span v-if="user.bandwidthAlgo == 'secondly'">峰值带宽</span>
|
||||
<span v-if="user.bandwidthAlgo == 'avg'">平均带宽</span>
|
||||
</span>
|
||||
<span v-else class="disabled">使用默认。</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>注册IP</td>
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user