mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-03-26 22:16:28 +08:00
nginx 向导 UI
This commit is contained in:
@@ -31,6 +31,24 @@ $ ->
|
||||
.success ->
|
||||
location.reload()
|
||||
|
||||
$('#nginx-modal .radio input').click ->
|
||||
console.log $(@).val()
|
||||
options = ['root', 'proxy', 'uwsgi']
|
||||
|
||||
mapping_table =
|
||||
fastcgi: ['root']
|
||||
proxy: ['proxy']
|
||||
uwsgi: ['uwsgi']
|
||||
static: ['root']
|
||||
|
||||
options_to_show = mapping_table[$(@).val()]
|
||||
|
||||
for item in options
|
||||
if item in options_to_show
|
||||
$("#nginx-modal .option-#{item}").removeClass 'hide'
|
||||
else
|
||||
$("#nginx-modal .option-#{item}").addClass 'hide'
|
||||
|
||||
# refactored above
|
||||
|
||||
service = $ '#service'
|
||||
|
||||
@@ -68,6 +68,20 @@ table.table.table-hover
|
||||
input(type='radio', name='site-type', value='static')
|
||||
| static (静态文件)
|
||||
|
||||
h3 选项
|
||||
.form-group.option-root.hide
|
||||
label.col-sm-2.control-label 根目录
|
||||
.col-sm-10
|
||||
input.form-control(type='text', placeholder='/home/#{account.username}/web')
|
||||
.form-group.option-proxy.hide
|
||||
label.col-sm-2.control-label 源地址
|
||||
.col-sm-10
|
||||
input.form-control(type='text', placeholder='http://127.0.0.1')
|
||||
.form-group.option-uwsgi.hide
|
||||
label.col-sm-2.control-label 源地址
|
||||
.col-sm-10
|
||||
input.form-control(type='text', placeholder='/home/#{account.username}/uwsgi.sock')
|
||||
|
||||
.tab-pane#nginx-type-json
|
||||
form(role='form')
|
||||
textarea.form-control(rows='18')
|
||||
|
||||
Reference in New Issue
Block a user