Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
midoks committed Jan 10, 2025
1 parent 84ceef4 commit e0fea93
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/rsyncd/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ def lsyncdAdd():
import base64

args = getArgs()
data = checkArgs(args, ['ip', 'conn_type', 'path', 'delay', 'period'])
data = checkArgs(args, ['ip', 'conn_type', 'path', 'delay', 'period', 'bwlimit'])
if not data[0]:
return data[1]

Expand Down
11 changes: 9 additions & 2 deletions plugins/rsyncd/js/rsyncd.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ function createSendTask(name = ''){
period_minute_n = "selected";
}

var bwlimit = "1024";
var delay = "3";
if ('rsync' in data){
bwlimit = data['rsync']['bwlimit'];
delay = data['rsync']['delay'];
}


var layerID = layer.open({
type: 1,
Expand Down Expand Up @@ -146,9 +153,9 @@ function createSendTask(name = ''){
<div class='line'>\
<span class='tname'>限速</span>\
<div class='info-r c4'>\
<input class='bt-input-text' type='number' name='bwlimit' min='0' value='1024' style='width:100px' /> KB\
<input class='bt-input-text' type='number' name='"+bwlimit+"' min='0' value='1024' style='width:100px' /> KB\
<span data-toggle='tooltip' data-placement='top' title='【限速】限制数据同步任务的速度,防止因同步数据导致带宽跑高' class='bt-ico-ask' style='cursor: pointer;'>?</span>\
<span style='margin-left: 29px;margin-right: 10px;'>延迟</span><input class='bt-input-text' min='0' type='number' name='delay' value='3' style='width:100px' /> 秒\
<span style='margin-left: 29px;margin-right: 10px;'>延迟</span><input class='bt-input-text' min='0' type='number' name='delay' value='"+delay+"' style='width:100px' /> 秒\
<span data-toggle='tooltip' data-placement='top' title='【延迟】在延迟时间周期内仅记录不同步,到达周期后一次性同步数据,以节省开销' class='bt-ico-ask' style='cursor: pointer;'>?</span>\
</div>\
</div>\
Expand Down

0 comments on commit e0fea93

Please sign in to comment.