Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
98f0655d
Commit
98f0655d
authored
9 years ago
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix rule and role bug
parent
3f000b9d
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
76 additions
and
110 deletions
+76
-110
log_api.py
jlog/log_api.py
+2
-2
views.py
jperm/views.py
+0
-0
run_websocket.py
run_websocket.py
+1
-0
asset_list.html
templates/jasset/asset_list.html
+4
-4
idc_list.html
templates/jasset/idc_list.html
+1
-1
log_online.html
templates/jlog/log_online.html
+4
-4
perm_role_add.html
templates/jperm/perm_role_add.html
+11
-11
perm_role_edit.html
templates/jperm/perm_role_edit.html
+2
-2
perm_role_list.html
templates/jperm/perm_role_list.html
+1
-1
perm_role_push.html
templates/jperm/perm_role_push.html
+30
-32
perm_rule_add.html
templates/jperm/perm_rule_add.html
+5
-6
perm_rule_edit.html
templates/jperm/perm_rule_edit.html
+5
-36
nav.html
templates/nav.html
+2
-4
setting.html
templates/setting.html
+8
-7
No files found.
jlog/log_api.py
View file @
98f0655d
...
...
@@ -46,12 +46,12 @@ def scriptToJSON(scriptf, timing=None):
ret
=
[]
with
closing
(
scriptf
):
print
"#
%
s #"
%
scriptf
.
readline
()
# ignore first header line from script file
scriptf
.
readline
()
# ignore first header line from script file
offset
=
0
for
t
in
timing
:
dt
=
scriptf
.
read
(
t
[
1
])
data
=
escapeString
(
dt
)
print
(
'###### (
%
s,
%
s)'
%
(
t
[
1
],
repr
(
data
)))
#
print ('###### (%s, %s)' % (t[1], repr(data)))
offset
+=
t
[
0
]
ret
.
append
((
data
,
offset
))
return
dumps
(
ret
)
...
...
This diff is collapsed.
Click to expand it.
jperm/views.py
View file @
98f0655d
This diff is collapsed.
Click to expand it.
run_websocket.py
View file @
98f0655d
...
...
@@ -250,6 +250,7 @@ class WebTerminalHandler(tornado.websocket.WebSocketHandler):
if
asset
:
roles
=
user_have_perm
(
self
.
user
,
asset
)
logger
.
debug
(
roles
)
logger
.
debug
(
'rolename:
%
s'
%
role_name
)
login_role
=
''
for
role
in
roles
:
if
role
.
name
==
role_name
:
...
...
This diff is collapsed.
Click to expand it.
templates/jasset/asset_list.html
View file @
98f0655d
...
...
@@ -31,7 +31,7 @@
<div
class=
"col-sm-7"
style=
"padding-left: 0px"
>
<label>
<select
name=
"idc"
class=
"form-control m-b"
onchange=
"change_info()"
>
<option
value=
""
>
IDC
机房
</option>
<option
value=
""
>
机房
</option>
{% for idc in idc_all %}
{% ifequal idc.name idc_name %}
<option
value=
"{{idc.name}}"
selected
>
{{ idc.name }}
</option>
...
...
@@ -57,7 +57,7 @@
<label>
<select
name=
"asset_type"
class=
"form-control m-b"
onchange=
"change_info()"
>
<option
value=
""
>
所有
类型
</option>
<option
value=
""
>
资产
类型
</option>
{% for type in asset_types %}
{% ifequal type.0|int2str asset_type %}
<option
value=
"{{ type.0 }}"
selected
>
{{ type.1 }}
</option>
...
...
@@ -70,7 +70,7 @@
<label>
<select
name=
"status"
class=
"form-control m-b"
onchange=
"change_info()"
>
<option
value=
""
>
所有
状态
</option>
<option
value=
""
>
资产
状态
</option>
{% for s in asset_status %}
{% ifequal s.0|int2str status %}
<option
value=
"{{ s.0 }}"
selected
>
{{ s.1 }}
</option>
...
...
@@ -215,7 +215,7 @@
maxmin
:
true
,
shade
:
false
,
area
:
[
'628px'
,
'452px'
],
content
:
new_url
content
:
new_url
+
data
});
//window.open(new_url + data, '', 'location=no, resizeable=no, height=410, width=625, top=89px, left=99px,toolbar=no,menubar=no,scrollbars=auto,status=no');
}
else
if
(
dataArray
.
length
==
'1'
&&
data
==
'error'
){
...
...
This diff is collapsed.
Click to expand it.
templates/jasset/idc_list.html
View file @
98f0655d
...
...
@@ -29,7 +29,7 @@
</div>
<div
class=
"ibox-content"
>
<div
class=
""
>
<a
target=
"_blank"
href=
"/jasset/idc_add"
class=
"btn btn-sm btn-primary "
>
添加
IDC
</a>
<a
target=
"_blank"
href=
"/jasset/idc_add"
class=
"btn btn-sm btn-primary "
>
添加
机房
</a>
<input
type=
"button"
id=
"del_check"
class=
"btn btn-danger btn-sm"
name=
"del_button"
value=
"删除所选"
/>
<form
id=
"search_form"
method=
"get"
action=
""
class=
"pull-right mail-search"
>
<div
class=
"input-group"
>
...
...
This diff is collapsed.
Click to expand it.
templates/jlog/log_online.html
View file @
98f0655d
...
...
@@ -97,7 +97,7 @@
<td
class=
"text-center"
>
{{ post.login_type }}
</td>
<td
class=
"text-center"
><a
href=
"/jlog/history/?id={{ post.id }}"
class=
"log_command"
>
统计
</a></td>
<td
class=
"text-center"
><a
class=
"monitor"
file_path=
"{{ post.log_path }}"
>
监控
</a></td>
<td
class=
"text-center"
><input
type=
"button"
id=
"cut"
class=
"btn btn-danger btn-xs"
name=
"cut"
value=
"阻断"
onclick=
'cut("{{ post.pid }}", "{{ post.
remote_ip
}}")'
/></td>
<td
class=
"text-center"
><input
type=
"button"
id=
"cut"
class=
"btn btn-danger btn-xs"
name=
"cut"
value=
"阻断"
onclick=
'cut("{{ post.pid }}", "{{ post.
login_type
}}")'
/></td>
<td
class=
"text-center"
id=
"start_time"
>
{{ post.start_time|date:"Y-m-d H:i:s" }}
</td>
</tr>
{% endfor %}
...
...
@@ -189,9 +189,9 @@
});
});
function
cut
(
num
,
host
){
console
.
log
(
host
);
if
(
host
==
'W
eb'
){
function
cut
(
num
,
login_type
){
console
.
log
(
login_type
);
if
(
login_type
==
'w
eb'
){
var
g_url
=
'{{ web_kill_uri }}'
+
'?id='
+
num
;
}
else
{
var
g_url
=
"/jlog/log_kill/?id="
+
num
;
...
...
This diff is collapsed.
Click to expand it.
templates/jperm/perm_role_add.html
View file @
98f0655d
...
...
@@ -56,11 +56,11 @@
</div>
<div
class=
"hr-line-dashed"
></div>
<div
class=
"form-group"
>
<label
for=
"sudo"
class=
"col-sm-2 control-label"
>
角色Sudo命令
<
span
class=
"red-fonts"
>
*
</span><
/label>
<label
for=
"sudo"
class=
"col-sm-2 control-label"
>
角色Sudo命令
</label>
<div
class=
"col-sm-8"
id=
"sudo_name"
>
<select
name=
"sudo_name"
data-placeholder=
"请选择Sudo别名"
class=
"chosen-select form-control m-b"
multiple
tabindex=
"2"
>
{% for sudo in sudos %}
<option
>
{{ sudo.name }}
</option>
<option
value=
"{{ sudo.id }}"
>
{{ sudo.name }}
</option>
{% endfor %}
</select>
</div>
...
...
@@ -93,9 +93,9 @@ $('#roleForm').validator({
theme
:
"yellow_right_effect"
,
rules
:
{
check_name
:
[
/^
\w{2,20}
$/
,
'大小写字母数字和下划线,2-20位'
],
either
:
function
(){
return
$
(
'#role_password'
).
val
()
==
''
}
{
#
either
:
function
(){
#
}
{
#
return
$
(
'#role_password'
).
val
()
==
''
#
}
{
#
}
#
}
},
fields
:
{
...
...
@@ -105,12 +105,12 @@ $('#roleForm').validator({
ok
:
""
,
msg
:
{
required
:
"角色名称必填"
}
},
"role_key"
:
{
rule
:
"required(either)"
,
tip
:
"输入密钥"
,
ok
:
""
,
msg
:
{
required
:
"密码和密钥必填一个!"
}
}
{
#
"role_key"
:
{
#
}
{
#
rule
:
"required(either)"
,
#
}
{
#
tip
:
"输入密钥"
,
#
}
{
#
ok
:
""
,
#
}
{
#
msg
:
{
required
:
"密码和密钥必填一个!"
}
#
}
{
#
}
#
}
},
valid
:
function
(
form
)
{
form
.
submit
();
...
...
This diff is collapsed.
Click to expand it.
templates/jperm/perm_role_edit.html
View file @
98f0655d
...
...
@@ -60,8 +60,8 @@
<label
for=
"sudo"
class=
"col-sm-2 control-label"
>
角色Sudo命令
<span
class=
"red-fonts"
>
*
</span></label>
<div
class=
"col-sm-8"
id=
"sudo_name"
>
<select
name=
"sudo_name"
data-placeholder=
"请选择Sudo别名"
class=
"chosen-select form-control m-b"
multiple
tabindex=
"2"
>
{% for sudo in
role_sudos
%}
<option
selected
>
{{ sudo.name }}
</option>
{% for sudo in
sudo_all
%}
<option
value=
"{{ sudo.id }}"
{%
if
sudo
in
role_sudos
%}
selected
{%
endif
%}
>
{{ sudo.name }}
</option>
{% endfor %}
</select>
</div>
...
...
This diff is collapsed.
Click to expand it.
templates/jperm/perm_role_list.html
View file @
98f0655d
...
...
@@ -33,7 +33,7 @@
<div
class=
"ibox-content"
>
<div
class=
""
>
<a
href=
"/jperm/role/perm_role_add/"
class=
"btn btn-sm btn-primary "
>
添加角色
</a>
<a
href=
"/jperm/role/perm_role_push/"
class=
"btn btn-sm btn-
primary
"
>
推送角色
</a>
<a
href=
"/jperm/role/perm_role_push/"
class=
"btn btn-sm btn-
danger
"
>
推送角色
</a>
<form
id=
"search_form"
method=
"get"
action=
""
class=
"pull-right mail-search"
>
<div
class=
"input-group"
>
<input
type=
"text"
class=
"form-control input-sm"
id=
"search_input"
name=
"search"
placeholder=
"Search"
>
...
...
This diff is collapsed.
Click to expand it.
templates/jperm/perm_role_push.html
View file @
98f0655d
...
...
@@ -26,7 +26,7 @@
</div>
</div>
<div
class=
"ibox-content"
>
<form
method=
"post"
id=
"
user
Form"
class=
"form-horizontal"
action=
""
>
<form
method=
"post"
id=
"
push
Form"
class=
"form-horizontal"
action=
""
>
{% if error %}
<div
class=
"alert alert-warning text-center"
>
{{ error }}
</div>
{% endif %}
...
...
@@ -34,9 +34,9 @@
<div
class=
"alert alert-success text-center"
>
{{ msg }}
</div>
{% endif %}
<div
class=
"form-group"
>
<label
for=
"asset"
class=
"col-sm-2 control-label"
>
资产
<
span
class=
"red-fonts"
>
*
</span><
/label>
<label
for=
"asset"
class=
"col-sm-2 control-label"
>
资产
</label>
<div
class=
"col-sm-8"
>
<select
name=
"assets"
data-placeholder=
"请选择资产"
class=
"chosen-select form-control m-b"
multiple
tabindex=
"2"
>
<select
name=
"assets"
id=
"assets"
data-placeholder=
"请选择资产"
class=
"chosen-select form-control m-b"
multiple
tabindex=
"2"
>
{% for asset in assets %}
<option
value=
"{{ asset.ip }}"
>
{{ asset.ip }}
</option>
{% endfor %}
...
...
@@ -45,7 +45,7 @@
</div>
<div
class=
"hr-line-dashed"
></div>
<div
class=
"form-group"
>
<label
for=
"assetgroup"
class=
"col-sm-2 control-label"
>
资产组
<
span
class=
"red-fonts"
>
*
</span><
/label>
<label
for=
"assetgroup"
class=
"col-sm-2 control-label"
>
资产组
</label>
<div
class=
"col-sm-8"
>
<select
name=
"asset_groups"
data-placeholder=
"请选择资产组"
class=
"chosen-select form-control m-b"
multiple
tabindex=
"2"
>
{% for asset_group in asset_groups %}
...
...
@@ -68,11 +68,11 @@
<div
class=
"hr-line-dashed"
></div>
<div
class=
"row"
>
<div
class=
"form-group"
>
<label
for=
"j_group"
class=
"col-sm-2 control-label"
>
使用
秘
钥
</label>
<label
for=
"j_group"
class=
"col-sm-2 control-label"
>
使用
密
钥
</label>
<div
class=
"col-sm-1"
>
<div
class=
"radio i-checks"
>
<label>
<input
type=
"checkbox"
value=
"1"
id=
"use_publicKey"
name=
"use_publicKey"
>
<input
type=
"checkbox"
value=
"1"
id=
"use_publicKey"
name=
"use_publicKey"
checked
>
</label>
</div>
</div>
...
...
@@ -111,37 +111,35 @@
{% endblock %}
{% block self_footer_js %}
<script>
$
(
document
).
ready
(
function
(){
$
(
"input.role"
).
click
(
function
(){
if
(
$
(
"input.role[value=GA]"
).
is
(
":checked"
)){
$
(
"#admin_groups"
).
css
(
"display"
,
'none'
);
$
(
'#pushForm'
).
validator
({
timely
:
2
,
theme
:
"yellow_right_effect"
,
rules
:
{
check_name
:
[
/^
\w{2,20}
$/
,
'大小写字母数字和下划线,2-20位'
],
check_asset
:
function
(){
return
$
(
'#assets'
).
val
()
==
null
}
else
{
$
(
"#admin_groups"
).
css
(
"display"
,
'block'
);
}
});
$
(
'#use_password'
).
click
(
function
(){
if
(
$
(
this
).
is
(
':checked'
)){
$
(
'#admin_account_password'
).
css
(
'display'
,
'block'
)
},
fields
:
{
"asset_groups"
:
{
rule
:
"required(check_asset)"
,
tip
:
"输入资产组"
,
ok
:
""
,
msg
:
{
required
:
"资产和资产组必选一个!"
}
},
"roles"
:
{
rule
:
"required"
,
tip
:
"请选择角色"
,
ok
:
""
,
msg
:
{
required
:
"必须选择角色"
}
}
else
{
$
(
'#admin_account_password'
).
css
(
'display'
,
'none'
)
},
valid
:
function
(
form
)
{
form
.
submit
();
}
});
});
$
(
'#use_publicKey'
).
click
(
function
(){
if
(
$
(
this
).
is
(
':checked'
)){
$
(
'#admin_account_publicKey'
).
css
(
'display'
,
'block'
)
}
else
{
$
(
'#admin_account_publicKey'
).
css
(
'display'
,
'none'
)
}
});
});
var
config
=
{
'.chosen-select'
:
{},
...
...
This diff is collapsed.
Click to expand it.
templates/jperm/perm_rule_add.html
View file @
98f0655d
...
...
@@ -44,9 +44,8 @@
<label
for=
"user"
class=
"col-sm-2 control-label"
>
用户
</label>
<div
class=
"col-sm-8"
>
<select
name=
"user"
id=
"user"
data-placeholder=
"用户名"
class=
"chosen-select form-control m-b"
multiple
tabindex=
"2"
>
{% for user in users %}
<option>
{{ user.name }}
</option>
<option
value=
"{{ user.id }}"
>
{{ user.name }}
</option>
{% endfor %}
</select>
<span
class=
"help-block m-b-none"
>
用户和用户组必选一个
</span>
...
...
@@ -58,7 +57,7 @@
<select
name=
"usergroup"
id=
"usergroup"
data-placeholder=
"请选择用户组"
class=
"chosen-select form-control m-b"
multiple
tabindex=
"2"
>
{% for user_group in user_groups %}
<option
value=
"{{ user_group.
name
}}"
>
{{ user_group.name }}
</option>
<option
value=
"{{ user_group.
id
}}"
>
{{ user_group.name }}
</option>
{% endfor %}
</select>
</div>
...
...
@@ -69,7 +68,7 @@
<div
class=
"col-sm-8"
>
<select
name=
"asset"
id=
"asset"
data-placeholder=
"请选择资产"
class=
"chosen-select form-control m-b"
multiple
tabindex=
"2"
>
{% for asset in assets %}
<option
value=
"{{ asset.i
p
}}"
>
{{ asset.ip }}
</option>
<option
value=
"{{ asset.i
d
}}"
>
{{ asset.ip }}
</option>
{% endfor %}
</select>
<span
class=
"help-block m-b-none"
>
资产和资产组必选一个
</span>
...
...
@@ -80,7 +79,7 @@
<div
class=
"col-sm-8"
>
<select
name=
"assetgroup"
data-placeholder=
"请选择资产组"
class=
"chosen-select form-control m-b"
multiple
tabindex=
"2"
>
{% for asset_group in asset_groups %}
<option
value=
"{{ asset_group.
name
}}"
>
{{ asset_group.name }}
</option>
<option
value=
"{{ asset_group.
id
}}"
>
{{ asset_group.name }}
</option>
{% endfor %}
</select>
</div>
...
...
@@ -91,7 +90,7 @@
<div
class=
"col-sm-8"
id=
"role_name"
>
<select
name=
"role"
data-placeholder=
"请选择角色"
class=
"chosen-select form-control m-b"
multiple
tabindex=
"2"
>
{% for role in roles %}
<option
value=
"{{ role.
name
}}"
>
{{ role.name }}
</option>
<option
value=
"{{ role.
id
}}"
>
{{ role.name }}
</option>
{% endfor %}
</select>
</div>
...
...
This diff is collapsed.
Click to expand it.
templates/jperm/perm_rule_edit.html
View file @
98f0655d
...
...
@@ -45,7 +45,7 @@
<div
class=
"col-sm-8"
>
<select
name=
"user"
data-placeholder=
"用户名"
class=
"chosen-select form-control m-b"
multiple
tabindex=
"2"
>
{% for user in users %}
<option
value=
"{{ user.
name
}}"
{%
if
user
in
users_select
%}
selected
{%
endif
%}
>
{{ user.name }}
</option>
<option
value=
"{{ user.
id
}}"
{%
if
user
in
users_select
%}
selected
{%
endif
%}
>
{{ user.name }}
</option>
{% endfor %}
</select>
</div>
...
...
@@ -56,7 +56,7 @@
<div
class=
"col-sm-8"
>
<select
name=
"usergroup"
data-placeholder=
"请选择用户组"
class=
"chosen-select form-control m-b"
multiple
tabindex=
"2"
>
{% for user_group in user_groups %}
<option
value=
"{{ user_group.
name }}"
{%
if
user_group
in
users
_groups_select
%}
selected
{%
endif
%}
>
{{ user_group.name }}
</option>
<option
value=
"{{ user_group.
id }}"
{%
if
user_group
in
user
_groups_select
%}
selected
{%
endif
%}
>
{{ user_group.name }}
</option>
{% endfor %}
</select>
</div>
...
...
@@ -67,7 +67,7 @@
<div
class=
"col-sm-8"
>
<select
name=
"asset"
data-placeholder=
"请选择资产"
class=
"chosen-select form-control m-b"
multiple
tabindex=
"2"
>
{% for asset in assets %}
<option
value=
"{{ asset.i
p
}}"
{%
if
asset
in
assets_select
%}
selected
{%
endif
%}
>
{{ asset.ip }}
</option>
<option
value=
"{{ asset.i
d
}}"
{%
if
asset
in
assets_select
%}
selected
{%
endif
%}
>
{{ asset.ip }}
</option>
{% endfor %}
</select>
</div>
...
...
@@ -78,7 +78,7 @@
<div
class=
"col-sm-8"
>
<select
name=
"assetgroup"
data-placeholder=
"请选择资产组"
class=
"chosen-select form-control m-b"
multiple
tabindex=
"2"
>
{% for asset_group in asset_groups %}
<option
value=
"{{ asset_group.
name
}}"
{%
if
asset_group
in
asset_groups_select
%}
selected
{%
endif
%}
>
{{ asset_group.name }}
</option>
<option
value=
"{{ asset_group.
id
}}"
{%
if
asset_group
in
asset_groups_select
%}
selected
{%
endif
%}
>
{{ asset_group.name }}
</option>
{% endfor %}
</select>
</div>
...
...
@@ -89,7 +89,7 @@
<div
class=
"col-sm-8"
>
<select
name=
"role"
data-placeholder=
"请选择角色"
class=
"chosen-select form-control m-b"
multiple
tabindex=
"2"
>
{% for role in roles %}
<option
value=
"{{ role.
name
}}"
{%
if
role
in
roles_select
%}
selected
{%
endif
%}
>
{{ role.name }}
</option>
<option
value=
"{{ role.
id
}}"
{%
if
role
in
roles_select
%}
selected
{%
endif
%}
>
{{ role.name }}
</option>
{% endfor %}
</select>
</div>
...
...
@@ -118,37 +118,6 @@
{% endblock %}
{% block self_footer_js %}
<script>
$
(
document
).
ready
(
function
(){
$
(
"input.role"
).
click
(
function
(){
if
(
$
(
"input.role[value=GA]"
).
is
(
":checked"
)){
$
(
"#admin_groups"
).
css
(
"display"
,
'none'
);
}
else
{
$
(
"#admin_groups"
).
css
(
"display"
,
'block'
);
}
});
$
(
'#use_password'
).
click
(
function
(){
if
(
$
(
this
).
is
(
':checked'
)){
$
(
'#admin_account_password'
).
css
(
'display'
,
'block'
)
}
else
{
$
(
'#admin_account_password'
).
css
(
'display'
,
'none'
)
}
});
$
(
'#use_publicKey'
).
click
(
function
(){
if
(
$
(
this
).
is
(
':checked'
)){
$
(
'#admin_account_publicKey'
).
css
(
'display'
,
'block'
)
}
else
{
$
(
'#admin_account_publicKey'
).
css
(
'display'
,
'none'
)
}
});
});
var
config
=
{
'.chosen-select'
:
{},
...
...
This diff is collapsed.
Click to expand it.
templates/nav.html
View file @
98f0655d
...
...
@@ -28,14 +28,12 @@
<a
href=
"/jperm/rule/"
>
授权规则
</a>
</li>
<li
class=
"
sudo_list sudo_edit sudo_add cmd_list cmd_edit cmd_add sudo_detail
"
>
<li
class=
"
role
"
>
<a
href=
"/jperm/role/"
>
系统角色
</a>
</li>
<li
class=
"sudo
_list sudo_edit sudo_add cmd_list cmd_edit cmd_add sudo_detail
"
>
<li
class=
"sudo"
>
<a
href=
"/jperm/sudo/"
>
Sudo命令
</a>
</li>
<li
class=
"apply_show online"
><a
href=
"/jperm/apply_show/online/"
>
权限审批
</a></li>
<li
class=
"apply_show online"
><a
href=
"/jperm/log/"
>
授权记录
</a></li>
</ul>
</li>
...
...
This diff is collapsed.
Click to expand it.
templates/setting.html
View file @
98f0655d
...
...
@@ -45,25 +45,26 @@
<div
class=
"alert alert-success text-center"
>
{{ msg }}
</div>
{% endif %}
<div
class=
"form-group"
>
<label
for=
"username"
class=
"col-sm-2 control-label"
>
默认
用户名
<span
class=
"red-fonts"
>
*
</span></label>
<label
for=
"username"
class=
"col-sm-2 control-label"
>
默认
管理用户
<span
class=
"red-fonts"
>
*
</span></label>
<input
name=
"setting"
value=
"default"
style=
"display: none"
>
<div
class=
"col-sm-8"
>
<input
id=
"username"
name=
"username"
placeholder=
"Username"
type=
"text"
value=
"{{ setting_default.field1 }}"
class=
"form-control"
>
<span
class=
"help-block m-b-none"
>
该用户为root或用户NOPASS:ALL sudo权限的用户
</span>
</div>
</div>
<div
class=
"hr-line-dashed"
></div>
<div
class=
"form-group"
>
<label
for=
"
port"
class=
"col-sm-2 control-label"
>
默认ssh端口
<span
class=
"red-fonts"
>
*
</span>
</label>
<label
for=
"
key"
class=
"col-sm-2 control-label"
>
默认密码
</label>
<div
class=
"col-sm-8"
>
<input
id=
"port"
name=
"port"
placeholder=
"Port"
type=
"text"
value=
"{{ setting_default.field2 }}"
class=
"form-control"
>
<input
id=
"password"
name=
"password"
placeholder=
"Password"
type=
"password"
class=
"form-control"
>
<span
class=
"help-block m-b-none"
>
如果不修改密码,请留空
</span>
</div>
</div>
<div
class=
"hr-line-dashed"
></div>
<div
class=
"form-group"
>
<label
for=
"
key"
class=
"col-sm-2 control-label"
>
默认密码
</label>
<label
for=
"
port"
class=
"col-sm-2 control-label"
>
默认ssh端口
<span
class=
"red-fonts"
>
*
</span>
</label>
<div
class=
"col-sm-8"
>
<input
id=
"password"
name=
"password"
placeholder=
"Password"
type=
"password"
class=
"form-control"
>
<span
class=
"help-block m-b-none"
>
如果不修改密码,请留空
</span>
<input
id=
"port"
name=
"port"
placeholder=
"Port"
type=
"text"
value=
"{{ setting_default.field2 }}"
class=
"form-control"
>
</div>
</div>
<div
class=
"hr-line-dashed"
></div>
...
...
@@ -118,7 +119,7 @@
fields
:
{
"username"
:
{
rule
:
"required;check_name"
,
tip
:
"输入用户名"
,
tip
:
"输入
管理
用户名"
,
ok
:
""
,
msg
:
{
required
:
"用户名称必填"
}
},
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment