remove services and preview

This commit is contained in:
jysperm
2014-08-18 10:43:49 +08:00
parent 24ef5b7999
commit 20c6716f5b
19 changed files with 14 additions and 82 deletions

View File

@@ -10,7 +10,8 @@
vi /etc/hosts
apt-get install nodejs git mongodb nginx postfix redis-server
apt-get install python g++ make screen git wget zip unzip iftop unrar-free axel vim emacs subversion subversion-tools curl tmux mercurial htop iptraf nethogs
apt-get install python g++ make screen git wget zip unzip iftop vim curl htop iptraf nethogs
apt-get intalll axel unrar-free emacs subversion subversion-tools tmux mercurial
apt-get install libcurl4-openssl-dev
apt-get install ntp quota quotatool
@@ -107,6 +108,11 @@
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# ShadowSocks
add-apt-repository 'deb http://shadowsocks.org/debian wheezy main'
apt-get install shadowsocks
### Runtime
apt-get install golang golang-go.tools

View File

@@ -2,6 +2,7 @@ module.exports =
web:
url: 'http://rp3.rpvhost.net'
listen: 3000
listen: '/home/rpadmin/rootpanel.sock'
account:
cookie_time: 30 * 24 * 3600 * 1000
@@ -30,14 +31,17 @@ module.exports =
us1:
domain: 'us1.rpvhost.net'
location: 'Linode Fremont, CA, USA'
readme: ''
jp1:
domain: 'jp1.rpvhost.net'
location: 'Linode Tokyo, JP'
readme: ''
rp3:
domain: 'rp3.rpvhost.net'
ss:
domain: 'ss.rpvhost.net'
location: 'Linode Fremont, CA, USA'
readme: 'ShadowSocks Only'
mongodb:
user: 'rpadmin'

View File

@@ -9,17 +9,6 @@ monitor = require '../../plugin/linux/monitor'
module.exports = exports = express.Router()
exports.get '/services', renderAccount, (req, res) ->
async.map config.plugin.availablePlugin, (item, callback) ->
p = plugin.get item
p.service.preview (html) ->
callback null, html
, (err, result) ->
res.render 'public/services',
plans: _.values(config.plans)
services: result
exports.get '/monitor', renderAccount, requireAuthenticate, (req, res) ->
async.parallel
resources_usage: (callback) ->

View File

@@ -1,25 +0,0 @@
extends ../layout
prepend head
title 服务支持 | #{t('app.name')}
block main
.row
header 套餐列表
table.table.table-hover
thead
tr
th 套餐
th 价格
th 服务支持
th 资源限制
tbody
for plan in plans
tr
td= plan.t_name
td #{plan.price} CNY
td= plan.services.join(', ')
td= plan.t_resources
for service in services
.row!= service

View File

@@ -47,7 +47,3 @@ module.exports =
, (err, html) ->
throw err if err
callback html
preview: (callback) ->
jade.renderFile path.join(__dirname, 'view/preview.jade'), {}, (err, html) ->
callback html

View File

@@ -1,4 +1,4 @@
extends ../layout
extends ../../../core/view/layout
prepend head
title 服务器状态 | #{t('app.name')}

View File

@@ -1,2 +0,0 @@
header Linux
p Linux 是 RP 主机的基础服务,负责进行资源限制。

View File

@@ -39,7 +39,3 @@ module.exports =
return i.user == account.username and i.command == "memcached #{MEMCACHED_FLAGS} -s /home/#{account.username}/memcached.sock"
callback if process then true else false
preview: (callback) ->
jade.renderFile path.join(__dirname, 'view/preview.jade'), {}, (err, html) ->
callback html

View File

@@ -1,2 +0,0 @@
header Memcached
p Memcached 提供了基于内存的高速缓存。

View File

@@ -59,7 +59,3 @@ module.exports =
callback null, _.reduce dbs, (memo, db) ->
return memo + db.sizeOnDisk / 1024 / 1024
, 0
preview: (callback) ->
jade.renderFile path.join(__dirname, 'view/preview.jade'), {}, (err, html) ->
callback html

View File

@@ -1,2 +0,0 @@
header MongoDB
p MongoDB 是世界上最流行的非关系型数据库之一。

View File

@@ -52,7 +52,3 @@ module.exports =
callback null, _.reduce rows, (memo, db) ->
return memo + db.size
, 0
preview: (callback) ->
jade.renderFile path.join(__dirname, 'view/preview.jade'), {}, (err, html) ->
callback html

View File

@@ -1,2 +0,0 @@
header MySQL
p MySQL 是世界上最流行的关系型数据库之一。

View File

@@ -80,7 +80,3 @@ module.exports =
, (err, html) ->
throw err if err
callback html
preview: (callback) ->
jade.renderFile path.join(__dirname, 'view/preview.jade'), {}, (err, html) ->
callback html

View File

@@ -1,2 +0,0 @@
header Nginx
p Nginx 提供了自定义系统 80 端口上的 Nginx 的配置的功能。

View File

@@ -37,7 +37,3 @@ module.exports =
else
child_process.exec "sudo rm /etc/php5/fpm/pool.d/#{account.username}.conf", ->
restartPhpfpm()
preview: (callback) ->
jade.renderFile path.join(__dirname, 'view/preview.jade'), {}, (err, html) ->
callback html

View File

@@ -1,2 +0,0 @@
header PHP-FPM
p PHP-FPM 提供了运行 PHP 程序的能力。

View File

@@ -37,7 +37,3 @@ module.exports =
return i.user == account.username and i.command.trim() == 'redis-server *:0'
callback if process then true else false
preview: (callback) ->
jade.renderFile path.join(__dirname, 'view/preview.jade'), {}, (err, html) ->
callback html

View File

@@ -1,2 +0,0 @@
header Redis
p Redis 提供了更灵活的缓存方案。