mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-06-18 01:47:07 +08:00
finish php-fpm change status
This commit is contained in:
@@ -29,3 +29,17 @@ $ ->
|
||||
if reply.status is 400
|
||||
error = reply.responseJSON.error
|
||||
ErrorHandle.flushInfo 'alert', error
|
||||
|
||||
fpm = $ '#php-fpm'
|
||||
fpm.on 'click', (e) ->
|
||||
e.preventDefault()
|
||||
enable = if fpm.hasClass 'btn-success' then true else false
|
||||
$.post '/plugin/phpfpm/switch/', {
|
||||
enable: enable
|
||||
}
|
||||
.success ->
|
||||
location.reload()
|
||||
.fail (reply) ->
|
||||
if reply.status is 400
|
||||
error = reply.responseJSON.error
|
||||
ErrorHandle.flushInfo 'alert', error
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
header PHP-FPM
|
||||
if isEnable
|
||||
button.btn.btn-danger 关闭
|
||||
button.btn.btn-danger#php-fpm 关闭
|
||||
else
|
||||
button.btn.btn-success 运行
|
||||
button.btn.btn-success#php-fpm 运行
|
||||
|
||||
Reference in New Issue
Block a user