mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-01-12 22:27:09 +08:00
rename pay to financicals
This commit is contained in:
@@ -54,7 +54,8 @@
|
||||
"email": "Email",
|
||||
"password": "Password",
|
||||
"logout": "Logout",
|
||||
"preferences": "Preferences"
|
||||
"preferences": "Preferences",
|
||||
"financials": "Financials"
|
||||
},
|
||||
"panel": {
|
||||
"": "Panel",
|
||||
@@ -124,11 +125,8 @@
|
||||
"current_email": "Current Email",
|
||||
"new_email": "New Email"
|
||||
},
|
||||
"panel": {
|
||||
"financials": "Financials"
|
||||
},
|
||||
"pay": {
|
||||
"pay_log": "Pay History",
|
||||
"financials": {
|
||||
"payment_log": "Payment History",
|
||||
"pay_method": "Pay Method",
|
||||
"billing_log": "Billing History"
|
||||
},
|
||||
|
||||
@@ -54,7 +54,8 @@
|
||||
"email": "邮箱",
|
||||
"password": "密码",
|
||||
"logout": "注销",
|
||||
"preferences": "首选项"
|
||||
"preferences": "首选项",
|
||||
"financials": "财务"
|
||||
},
|
||||
"panel": {
|
||||
"": "管理面板",
|
||||
@@ -124,11 +125,8 @@
|
||||
"current_email": "当前邮箱",
|
||||
"new_email": "新邮箱"
|
||||
},
|
||||
"panel": {
|
||||
"financials": "财务"
|
||||
},
|
||||
"pay": {
|
||||
"pay_log": "充值记录",
|
||||
"financials": {
|
||||
"payment_log": "充值记录",
|
||||
"pay_method": "方式",
|
||||
"billing_log": "扣费记录"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{express, async, _} = app.libs
|
||||
{requireAdminAuthenticate} = app.middleware
|
||||
{Account, Ticket, Financials, CouponCode} = app.models
|
||||
{config} = app
|
||||
{config, pluggable} = app
|
||||
|
||||
module.exports = exports = express.Router()
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ module.exports = exports = express.Router()
|
||||
|
||||
exports.use requireAuthenticate
|
||||
|
||||
exports.get '/pay', (req, res) ->
|
||||
exports.get '/financials', (req, res) ->
|
||||
LIMIT = 10
|
||||
|
||||
async.parallel
|
||||
@@ -45,7 +45,7 @@ exports.get '/pay', (req, res) ->
|
||||
Financials.find
|
||||
account_id: req.account._id
|
||||
type:
|
||||
$in: ['billing']
|
||||
$in: ['billing', 'usage_billing']
|
||||
, null,
|
||||
sort:
|
||||
created_at: -1
|
||||
@@ -53,7 +53,7 @@ exports.get '/pay', (req, res) ->
|
||||
, callback
|
||||
|
||||
, (err, result) ->
|
||||
res.render 'panel/pay', result
|
||||
res.render 'panel/financials', result
|
||||
|
||||
exports.get '/', (req, res) ->
|
||||
billing.triggerBilling req.account, (account) ->
|
||||
|
||||
@@ -10,10 +10,10 @@ append header
|
||||
|
||||
block main
|
||||
.row
|
||||
header= t('view.panel.financials')
|
||||
header= t('account.financials')
|
||||
p #{t('plan.balance')}: #{account.billing.balance.toFixed(2)} #{t('plan.currency.' + config.billing.currency)}
|
||||
p
|
||||
a(href= '/panel/pay/').btn.btn-success= t('common.charge')
|
||||
a(href= '/panel/financials/').btn.btn-success= t('common.charge')
|
||||
|
||||
.row
|
||||
header= t('plan.')
|
||||
|
||||
@@ -5,19 +5,19 @@ prepend header
|
||||
|
||||
block main
|
||||
.row
|
||||
header= t('common.charge')
|
||||
header= t('account.financials')
|
||||
|
||||
for payment_method in payment_methods
|
||||
!= payment_method
|
||||
|
||||
.row
|
||||
header= t('view.pay.pay_log')
|
||||
header= t('view.financials.payment_log')
|
||||
table.table.table-hover
|
||||
thead
|
||||
tr
|
||||
th= t('common.time')
|
||||
th= t('common.amount')
|
||||
th= t('view.pay.pay_method')
|
||||
th= t('view.financials.pay_method')
|
||||
tbody
|
||||
for item in deposit_log
|
||||
tr
|
||||
@@ -29,7 +29,7 @@ block main
|
||||
td #{item.payload.type} #{item.payload.order_id}
|
||||
|
||||
.row
|
||||
header= t('view.pay.billing_log')
|
||||
header= t('view.financials.billing_log')
|
||||
table.table.table-hover
|
||||
thead
|
||||
tr
|
||||
@@ -41,6 +41,9 @@ block main
|
||||
tr
|
||||
td= moment(item.created_at).format('YYYY-MM-DD HH:mm:ss')
|
||||
td
|
||||
each info, plan_name in item.payload
|
||||
p #{plan_name}: #{info.billing_unit_count} unit before #{info.last_billing_at}
|
||||
if item.type == 'billing'
|
||||
each info, plan_name in item.payload
|
||||
p #{plan_name}: #{info.billing_unit_count} unit before #{info.last_billing_at}
|
||||
else if item.type == 'usage_billing' && item.payload.service == 'shadowsocks'
|
||||
p #{item.payload.service}: #{item.payload.traffic_mb.toFixed(1)} MB
|
||||
td #{item.amount.toFixed(2)} CNY
|
||||
@@ -6,7 +6,7 @@ exports = module.exports = class RPVhostPlugin extends pluggable.Plugin
|
||||
@type: 'extension'
|
||||
|
||||
exports.registerHook 'plugin.wiki.pages',
|
||||
t_category: 'plugins.rpvhost.site_name'
|
||||
t_category: 'plugins.rpvhost.'
|
||||
t_title: 'Terms.md'
|
||||
language: 'zh_CN'
|
||||
content_markdown: fs.readFileSync("#{__dirname}/wiki/Terms.md").toString()
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"site_name": "RP Virtual Hosting",
|
||||
"": "RP Virtual Hosting",
|
||||
"greenshadow": "GreenShadow",
|
||||
"taobao": "Taobao",
|
||||
"official_blog": "Official Blog",
|
||||
"view": {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"site_name": "RP 主机",
|
||||
"": "RP 主机",
|
||||
"greenshadow": "GreenShadow",
|
||||
"taobao": "淘宝",
|
||||
"official_blog": "官方博客",
|
||||
"view": {
|
||||
|
||||
@@ -189,7 +189,8 @@ exports.updateConfigure = (callback) ->
|
||||
filename = "/etc/shadowsocks/#{method}.json"
|
||||
ShadowsocksPlugin.writeConfigFile filename, configure, {mode: 0o755}, ->
|
||||
supervisor.updateProgram {}, {program_name: "shadowsocks-#{method}"}, ->
|
||||
callback()
|
||||
supervisor.programControl {}, {program_name: "shadowsocks-#{method}"}, 'restart', ->
|
||||
callback()
|
||||
|
||||
, ->
|
||||
callback()
|
||||
@@ -236,7 +237,7 @@ exports.monitoring = ->
|
||||
amount: -amount
|
||||
payload:
|
||||
service: 'shadowsocks'
|
||||
traffic_mb: (billing_bucket * BILLING_BUCKET) / 1000 * 1000
|
||||
traffic_mb: (billing_bucket * BILLING_BUCKET) / (1000 * 1000)
|
||||
, ->
|
||||
callback()
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
.row
|
||||
header= t('')
|
||||
table.table.table-hover
|
||||
tbody
|
||||
tr
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module.exports =
|
||||
web:
|
||||
t_name: 'plugins.rpvhost.site_name'
|
||||
t_name: 'plugins.rpvhost.'
|
||||
url: 'http://rp.rpvhost.net'
|
||||
listen: '/home/rpadmin/rootpanel.sock'
|
||||
repo: 'jysperm/RootPanel'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module.exports =
|
||||
web:
|
||||
t_name: 'plugins.rpvhost.site_name'
|
||||
t_name: 'plugins.rpvhost.'
|
||||
url: 'http://rp.rpvhost.net'
|
||||
listen: '/home/rpadmin/rootpanel.sock'
|
||||
repo: 'jysperm/RootPanel'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module.exports =
|
||||
web:
|
||||
t_name: 'plugins.rpvhost.site_name'
|
||||
t_name: 'plugins.rpvhost.greenshadow'
|
||||
url: 'http://greenshadow.net'
|
||||
listen: '/home/rpadmin/rootpanel.sock'
|
||||
repo: 'jysperm/RootPanel'
|
||||
|
||||
Reference in New Issue
Block a user