mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-05-26 22:37:27 +08:00
92 lines
3.9 KiB
Plaintext
92 lines
3.9 KiB
Plaintext
.row.widget-supervisor
|
|
header= t('')
|
|
table.table.table-hover
|
|
thead
|
|
tr
|
|
th= t('common.name')
|
|
th= t('common.command')
|
|
th= t('common.options')
|
|
th= t('common.status')
|
|
th
|
|
button.btn.btn-success.btn-xs.action-create(data-toggle='modal', data-target='#supervisor-dialog')
|
|
span.glyphicon.glyphicon-plus-sign
|
|
|
|
tbody
|
|
for program in account.pluggable.supervisor.programs
|
|
tr(data-id='#{program._id}')
|
|
td= program.name
|
|
td= program.command
|
|
td
|
|
if program.autostart
|
|
span(title='autostart=true').glyphicon.glyphicon-share-alt
|
|
|
|
|
if program.autorestart == 'true'
|
|
span(title='autorestart=true').glyphicon.glyphicon-repeat
|
|
|
|
|
else if program.autorestart == 'unexpected'
|
|
span(title='autorestart=unexpected').glyphicon.glyphicon-flash
|
|
|
|
|
if program.directory
|
|
span(title='directory') ~#{program.directory.match(/\/home\/[^\/]+(.*)/)[1]}
|
|
td(title= programs_status[program.program_name].info)= programs_status[program.program_name].status
|
|
td
|
|
if programs_status[program.program_name].status != 'running'
|
|
button.btn.btn-success.btn-xs.action-control(type='button', data-action='start')
|
|
span.glyphicon.glyphicon-play
|
|
if programs_status[program.program_name].status == 'running'
|
|
button.btn.btn-warning.btn-xs.action-control(type='button', data-action='restart')
|
|
span.glyphicon.glyphicon-repeat
|
|
button.btn.btn-danger.btn-xs.action-control(type='button', data-action='stop')
|
|
span.glyphicon.glyphicon-stop
|
|
button.btn.btn-info.btn-xs.action-edit(type='button')
|
|
span.glyphicon.glyphicon-edit
|
|
button.btn.btn-danger.btn-xs.action-remove(type='button')
|
|
span.glyphicon.glyphicon-trash
|
|
|
|
#supervisor-dialog.modal.fade(tabindex='-1', role='dialog', aria-hidden='true')
|
|
.modal-dialog
|
|
.modal-content
|
|
.modal-header
|
|
button.close(type='button', data-dismiss='modal', aria-hidden='true') ×
|
|
h3.modal-title
|
|
| #{t('')}
|
|
span.small.label-program-id
|
|
.modal-body
|
|
form.form-horizontal(role='form')
|
|
.form-group
|
|
label.col-sm-2.control-label= t('common.name')
|
|
.col-sm-10
|
|
input.form-control.input-name(type='text', name='name', placeholder='myapp')
|
|
.form-group
|
|
label.col-sm-2.control-label= t('common.command')
|
|
.col-sm-10
|
|
input.form-control.input-command(type='text', name='command', placeholder='node /home/jysperm/app.js')
|
|
.form-group
|
|
label.col-sm-2.control-label= t('common.directory')
|
|
.col-sm-10
|
|
input.form-control.input-directory(type='text', name='directory', placeholder='/home/jysperm')
|
|
.form-group
|
|
label.col-sm-2.control-label »
|
|
.checkbox.col-sm-10
|
|
label
|
|
input.input-autostart(type='checkbox', name='autostart', checked)
|
|
| #{t('common.autostart')}
|
|
.form-group
|
|
label.col-sm-2.control-label »
|
|
.controls.col-sm-10.input-autorestart
|
|
.radio
|
|
label
|
|
input(type='radio', name='autorestart', value='unexpected', checked)
|
|
| #{t('autorestart.unexpected')}
|
|
.radio
|
|
label
|
|
input(type='radio', name='autorestart', value='true')
|
|
| #{t('autorestart.true')}
|
|
.radio
|
|
label
|
|
input(type='radio', name='autorestart', value='false')
|
|
| #{t('autorestart.false')}
|
|
|
|
.modal-footer
|
|
button.btn.btn-success.action-submit(type='button')= t('common.save')
|