mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-06-19 15:41:32 +08:00
finish change ssh password
This commit is contained in:
@@ -7,4 +7,25 @@ $ ->
|
||||
prehead = if button.hasClass 'btn-success' then '' else 'un'
|
||||
$.post "/plan/#{prehead}subscribe/", {
|
||||
plan: button.parent().data 'type'
|
||||
}
|
||||
}
|
||||
.success ->
|
||||
location.reload()
|
||||
.fail (reply) ->
|
||||
if reply.status is 400
|
||||
error = reply.responseJSON.error
|
||||
ErrorHandle.flushInfo 'alert', error
|
||||
|
||||
ssh = $ '#ssh-input'
|
||||
ssh.find 'button'
|
||||
.on 'click', (e) ->
|
||||
e.preventDefault()
|
||||
$.post '/plugin/ssh/update_passwd/', {
|
||||
passwd: ssh.find('input').val()
|
||||
}
|
||||
.success ->
|
||||
ErrorHandle.flushInfo 'success', '修改成功', ->
|
||||
location.reload t_resources
|
||||
.fail (reply) ->
|
||||
if reply.status is 400
|
||||
error = reply.responseJSON.error
|
||||
ErrorHandle.flushInfo 'alert', error
|
||||
|
||||
@@ -4,7 +4,7 @@ header SSH
|
||||
.panel-heading
|
||||
h3.panel-title 设置 SSH 密码
|
||||
.panel-body
|
||||
.input-group
|
||||
.input-group#ssh-input
|
||||
input.form-control(type='password')
|
||||
span.input-group-btn
|
||||
button.btn.btn-default(type='button') 提交
|
||||
|
||||
Reference in New Issue
Block a user