mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-03-26 07:44:10 +08:00
supervisor framework
This commit is contained in:
15
plugin/supervisor/index.coffee
Normal file
15
plugin/supervisor/index.coffee
Normal file
@@ -0,0 +1,15 @@
|
||||
{pluggable} = app
|
||||
|
||||
module.exports = pluggable.createHelpers exports =
|
||||
name: 'supervisor'
|
||||
type: 'service'
|
||||
dependencies: ['linux']
|
||||
|
||||
exports.registerHook 'view.panel.scripts',
|
||||
path: '/plugin/linux/script/panel.css'
|
||||
|
||||
exports.registerHook 'view.panel.widgets',
|
||||
generator: (req, callback) ->
|
||||
exports.render 'widget', req, {}, callback
|
||||
|
||||
app.express.use '/plugin/supervisor', require './router'
|
||||
3
plugin/supervisor/locale/zh_CN.json
Normal file
3
plugin/supervisor/locale/zh_CN.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"": "Supervisor"
|
||||
}
|
||||
12
plugin/supervisor/router.coffee
Normal file
12
plugin/supervisor/router.coffee
Normal file
@@ -0,0 +1,12 @@
|
||||
{express} = app.libs
|
||||
{requireInService} = app.middleware
|
||||
|
||||
module.exports = exports = express.Router()
|
||||
|
||||
exports.use requireInService 'supervisor'
|
||||
|
||||
exports.post '/update_program', (req, res) ->
|
||||
|
||||
exports.get '/program_config', (req, res) ->
|
||||
|
||||
exports.post '/program_control', (req, res) ->
|
||||
0
plugin/supervisor/static/script/panel.coffee
Normal file
0
plugin/supervisor/static/script/panel.coffee
Normal file
0
plugin/supervisor/supervisor.coffee
Normal file
0
plugin/supervisor/supervisor.coffee
Normal file
0
plugin/supervisor/tempalte/program.conf
Normal file
0
plugin/supervisor/tempalte/program.conf
Normal file
7
plugin/supervisor/test/supervisor.test.coffee
Normal file
7
plugin/supervisor/test/supervisor.test.coffee
Normal file
@@ -0,0 +1,7 @@
|
||||
describe 'plugin/supervisor', ->
|
||||
describe 'router', ->
|
||||
it 'POST update_program'
|
||||
|
||||
it 'GET program_config'
|
||||
|
||||
it 'POST program_control'
|
||||
0
plugin/supervisor/view/widget.jade
Normal file
0
plugin/supervisor/view/widget.jade
Normal file
@@ -15,7 +15,7 @@ module.exports =
|
||||
|
||||
plugin:
|
||||
available_extensions: ['bitcoin', 'wiki', 'rpvhost']
|
||||
available_services: ['linux']
|
||||
available_services: ['linux', 'supervisor']
|
||||
|
||||
billing:
|
||||
currency: 'CNY'
|
||||
@@ -35,7 +35,7 @@ module.exports =
|
||||
unit: 24 * 3600 * 1000
|
||||
price: 10 / 30
|
||||
|
||||
services: ['ssh', 'linux']
|
||||
services: ['supervisor', 'linux']
|
||||
|
||||
resources:
|
||||
cpu: 144
|
||||
|
||||
Reference in New Issue
Block a user