diff --git a/templates/jlog/web_terminal.html b/templates/jlog/web_terminal.html index 5589b59c3..420249a10 100644 --- a/templates/jlog/web_terminal.html +++ b/templates/jlog/web_terminal.html @@ -117,7 +117,7 @@ $('.terminal').css('width', window.innerWidth-25); console.log(window.innerWidth); console.log(window.innerWidth-10); - var rows = Math.floor(window.innerHeight/rowHeight) - 1; + var rows = Math.floor(window.innerHeight/rowHeight) - 2; var cols = Math.floor(window.innerWidth/colWidth) - 1; return {rows: rows, cols: cols}; diff --git a/templates/jperm/perm_role_add.html b/templates/jperm/perm_role_add.html index 18df339e9..59ec3b3b6 100644 --- a/templates/jperm/perm_role_add.html +++ b/templates/jperm/perm_role_add.html @@ -93,7 +93,7 @@ $('#roleForm').validator({ theme: "yellow_right_effect", rules: { check_name: [/(?!^root$)^[\w.]{2,20}$/i, '大小写字母数字和下划线小数点,2-20位,并且非root'], - check_begin: [/^[\-]+BEGIN RSA PRIVATE KEY[\-]+/gm, 'RSA Key填写有误,请检查'], + check_begin: [/^[\-]+BEGIN R|DSA PRIVATE KEY[\-]+/gm, 'RSA|DSA Key填写有误,请检查'] }, @@ -108,7 +108,7 @@ $('#roleForm').validator({ rule: "check_begin", ok: "", empty: true - }, + } }, valid: function(form) { diff --git a/templates/jperm/role_sudo.j2 b/templates/jperm/role_sudo.j2 index 642a30a66..a37276771 100644 --- a/templates/jperm/role_sudo.j2 +++ b/templates/jperm/role_sudo.j2 @@ -36,7 +36,7 @@ add_role_chosen() { check_syntax(){ - visudo -c -f $1 + /usr/sbin/visudo -c -f $1 } cp $real_file $tmp_file && add_cmd_alias $tmp_file && add_role_chosen $tmp_file || exit 1