mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-04-23 03:10:30 +08:00
fix some frontend
This commit is contained in:
@@ -1,23 +1,13 @@
|
||||
$ ->
|
||||
$('#widget-ssh .btn-kill').click ->
|
||||
$('.widget-ssh .action-kill').click ->
|
||||
if window.confirm 'Are you sure?'
|
||||
$.post '/plugin/ssh/kill/', JSON.stringify
|
||||
request '/plugin/ssh/kill',
|
||||
pid: $(@).parents('tr').data 'id'
|
||||
.fail (jqXHR) ->
|
||||
if jqXHR.responseJSON?.error
|
||||
alert jqXHR.responseJSON.error
|
||||
else
|
||||
alert jqXHR.statusText
|
||||
.success ->
|
||||
, ->
|
||||
location.reload()
|
||||
|
||||
$('#widget-ssh .update-password button').click ->
|
||||
$.post '/plugin/ssh/update_password/', JSON.stringify
|
||||
password: $('#widget-ssh .update-password input').val()
|
||||
.fail (jqXHR) ->
|
||||
if jqXHR.responseJSON?.error
|
||||
alert jqXHR.responseJSON.error
|
||||
else
|
||||
alert jqXHR.statusText
|
||||
.success ->
|
||||
$('.widget-ssh .action-update-password').click ->
|
||||
request '/plugin/ssh/update_password',
|
||||
password: $('.widget-ssh .input-password').val()
|
||||
, ->
|
||||
location.reload()
|
||||
|
||||
Reference in New Issue
Block a user