mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-03 12:20:28 +08:00
增加忽略相似消息周期设置
This commit is contained in:
@@ -69,6 +69,8 @@ func (this *CreatePopupAction) RunPost(params struct {
|
||||
RateMinutes int32
|
||||
RateCount int32
|
||||
|
||||
HashLife int32
|
||||
|
||||
Description string
|
||||
|
||||
Must *actions.Must
|
||||
@@ -251,6 +253,7 @@ func (this *CreatePopupAction) RunPost(params struct {
|
||||
ParamsJSON: optionsJSON,
|
||||
Description: params.Description,
|
||||
RateJSON: rateJSON,
|
||||
HashLife: params.HashLife,
|
||||
})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
|
||||
@@ -60,6 +60,7 @@ func (this *InstanceAction) RunGet(params struct {
|
||||
"description": instance.Description,
|
||||
"params": mediaParams,
|
||||
"rate": rateConfig,
|
||||
"hashLife": instance.HashLife,
|
||||
}
|
||||
|
||||
this.Show()
|
||||
|
||||
@@ -60,6 +60,7 @@ func (this *UpdateAction) RunGet(params struct {
|
||||
"description": instance.Description,
|
||||
"params": mediaParams,
|
||||
"rate": rateConfig,
|
||||
"hashLife": instance.HashLife,
|
||||
}
|
||||
|
||||
this.Show()
|
||||
@@ -118,6 +119,8 @@ func (this *UpdateAction) RunPost(params struct {
|
||||
RateMinutes int32
|
||||
RateCount int32
|
||||
|
||||
HashLife int32
|
||||
|
||||
Must *actions.Must
|
||||
CSRF *actionutils.CSRF
|
||||
}) {
|
||||
@@ -301,6 +304,7 @@ func (this *UpdateAction) RunPost(params struct {
|
||||
ParamsJSON: optionsJSON,
|
||||
Description: params.Description,
|
||||
RateJSON: rateJSON,
|
||||
HashLife: params.HashLife,
|
||||
IsOn: params.IsOn,
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
@@ -360,16 +360,31 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="comment">用来限制此媒介的发送频率。</p>
|
||||
<p class="comment">用来限制此媒介的发送频率,防止短时间内消息数量过载。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>忽略相似消息周期</td>
|
||||
<td>
|
||||
<div class="ui input right labeled">
|
||||
<input type="text" name="hashLife" style="width: 5em" maxlength="4"/>
|
||||
<span class="ui label">秒</span>
|
||||
</div>
|
||||
<p class="comment">可以在这个时间内忽略相似消息,防止短时间内消息数量过载。默认60秒。</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>备注</td>
|
||||
<td>
|
||||
<textarea rows="3" name="description" maxlength="100"></textarea>
|
||||
</td>
|
||||
<td colspan="2"><more-options-indicator></more-options-indicator></td>
|
||||
</tr>
|
||||
<tbody v-show="moreOptionsVisible">
|
||||
<tr>
|
||||
<td>备注</td>
|
||||
<td>
|
||||
<textarea rows="3" name="description" maxlength="100"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<submit-btn></submit-btn>
|
||||
|
||||
@@ -234,11 +234,19 @@
|
||||
<span v-else>{{instance.rate.count}}次/{{instance.rate.minutes}}分钟</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>忽略相似消息周期</td>
|
||||
<td>
|
||||
<span v-if="instance.hashLife > 0">{{instance.hashLife}}秒</span>
|
||||
<span v-else-if="instance.hashLife == 0" class="disabled">使用默认</span>
|
||||
<span v-else class="disabled">没有设置</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>备注</td>
|
||||
<td>
|
||||
<span v-if="instance.description.length > 0">{{instance.description}}</span>
|
||||
<span v-else class="disabled">-</span>
|
||||
<span v-else class="disabled">没有设置</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -363,6 +363,16 @@
|
||||
<p class="comment">用来限制此媒介的发送频率。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>忽略相似消息周期</td>
|
||||
<td>
|
||||
<div class="ui input right labeled">
|
||||
<input type="text" name="hashLife" style="width: 5em" maxlength="4" v-model="instance.hashLife"/>
|
||||
<span class="ui label">秒</span>
|
||||
</div>
|
||||
<p class="comment">可以在这个时间内忽略相似消息,防止短时间内消息数量过载。不填或者为0,表示默认为60秒。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>备注</td>
|
||||
<td>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<tr>
|
||||
<td>媒介</td>
|
||||
<td>
|
||||
{{recipient.instance.name}}
|
||||
{{recipient.instance.name}} <link-icon v-if="recipient.instance.id > 0" :href="'/admins/recipients/instances/instance?instanceId=' + recipient.instance.id"></link-icon>
|
||||
<p class="comment">{{recipient.instance.description}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user