diff --git a/README.md b/README.md index 32f2a81..5008480 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ RootPanel 是一个 PaaS 开发框架,提供了用户系统、计费和订单 RootPanel 具有良好的设计,高度的可定制性,支持多语言和多时区,以及非常高的单元测试覆盖率。 +RootPanel 的文档位于 [Github Wiki](https://github.com/jysperm/RootPanel/wiki). + ## 安装 稳定版本 @@ -17,7 +19,7 @@ RootPanel 具有良好的设计,高度的可定制性,支持多语言和多 试运行和开发推荐使用 [Vagrant box](https://vagrantcloud.com/jysperm/boxes/rootpanel) -详细安装说明:[INSTALL.md](https://github.com/jysperm/RootPanel/blob/master/INSTALL.md) +详细安装步骤:[INSTALL.md](https://github.com/jysperm/RootPanel/blob/master/INSTALL.md) ## 配置文件示例 diff --git a/bin/reconfigure.coffee b/bin/reconfigure.coffee index 1626f6d..e3b0fed 100644 --- a/bin/reconfigure.coffee +++ b/bin/reconfigure.coffee @@ -58,6 +58,7 @@ Account.find available_plugins = _.union config.plugin.available_extensions, config.plugin.available_services async.eachSeries available_plugins, (plugin_name, callback) -> + console.log "Running reconfigure for #{plugin_name}..." filename = "#{__dirname}/../plugin/#{plugin_name}/reconfigure.coffee" unless fs.existsSync filename diff --git a/migration/system/v0.7.1.md b/migration/system/v0.7.1.md index 16384c1..9567209 100644 --- a/migration/system/v0.7.1.md +++ b/migration/system/v0.7.1.md @@ -1,5 +1,6 @@ ## Core + apt-get install supervisor npm install coffee-script -g vi /etc/rc.local diff --git a/migration/system/v0.8.0.md b/migration/system/v0.8.0.md index 2bdac2a..624e37e 100644 --- a/migration/system/v0.8.0.md +++ b/migration/system/v0.8.0.md @@ -14,3 +14,10 @@ user = rpadmin service supervisor restart + +## shadowsocks + + rm /etc/shadowsocks/*.json + mv /etc/supervisor/conf.d/rpadmin.conf rpadmin.conf + rm /etc/supervisor/conf.d/*.conf + mv rpadmin.conf /etc/supervisor/conf.d/rpadmin.conf diff --git a/plugin/shadowsocks/index.coffee b/plugin/shadowsocks/index.coffee index 06b9836..76420ec 100644 --- a/plugin/shadowsocks/index.coffee +++ b/plugin/shadowsocks/index.coffee @@ -72,7 +72,7 @@ exports.registerServiceHook 'disable', app.express.use '/plugin/shadowsocks', require './router' -if config.plugins.shadowsocks.monitor_cycle +if config.plugins.shadowsocks?.monitor_cycle exports.registerHook 'app.started', action: -> setInterval shadowsocks.monitoring, config.plugins.shadowsocks.monitor_cycle diff --git a/plugin/shadowsocks/shadowsocks.coffee b/plugin/shadowsocks/shadowsocks.coffee index 7072dca..02f5aae 100644 --- a/plugin/shadowsocks/shadowsocks.coffee +++ b/plugin/shadowsocks/shadowsocks.coffee @@ -6,7 +6,7 @@ supervisor = require '../supervisor/supervisor' ShadowsocksPlugin = require './index' -BILLING_BUCKET = config.plugins.shadowsocks.billing_bucket +BILLING_BUCKET = config.plugins.shadowsocks?.billing_bucket ? 100 * 1024 * 1024 exports.initSupervisor = (callback) -> supervisor.programsStatus (program_status) -> diff --git a/plugin/shadowsocks/test/shadowsocks.test.coffee b/plugin/shadowsocks/test/shadowsocks.test.coffee index 518d728..e92e007 100644 --- a/plugin/shadowsocks/test/shadowsocks.test.coffee +++ b/plugin/shadowsocks/test/shadowsocks.test.coffee @@ -41,6 +41,7 @@ done err it 'POST join_plan', (done) -> + @timeout 10000 agent.post '/billing/join_plan' .send csrf_token: csrf_token diff --git a/plugin/shadowsocks/view/widget.jade b/plugin/shadowsocks/view/widget.jade index ce89c8f..286b578 100644 --- a/plugin/shadowsocks/view/widget.jade +++ b/plugin/shadowsocks/view/widget.jade @@ -17,7 +17,10 @@ span.input-group-addon= t('method') select.input-method.form-control(style='-webkit-appearance: none;') for method in config.plugins.shadowsocks.available_ciphers - option= method + if account.pluggable.shadowsocks.method == method + option(selected='selected')= method + else + option= method span.input-group-btn button.btn.btn-default.action-switch-method(type='button')= t('common.change')