mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-03-30 15:05:38 +08:00
在管理面板上显示套餐信息
This commit is contained in:
@@ -5,11 +5,12 @@ passwd_salt: '53673f434686b535a6cec7b73a60ce045477f066f30eded55a9b972ccafddb2a'
|
||||
email: 'jysperm@gmail.com'
|
||||
signup_at: ISODate('2013-02-22T03:03:37.312Z')
|
||||
|
||||
group: ['root', 'stduser']
|
||||
group: ['root']
|
||||
setting:
|
||||
language: 'zh_CN'
|
||||
QQ: '184300584'
|
||||
attribute:
|
||||
plans: ['all']
|
||||
amount: 100
|
||||
|
||||
tokens: [
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
_ = require 'underscore'
|
||||
|
||||
config = require '../config'
|
||||
|
||||
mAccount = require '../model/account'
|
||||
|
||||
module.exports =
|
||||
@@ -10,5 +14,13 @@ module.exports =
|
||||
unless account
|
||||
return res.redirect '/account/login/'
|
||||
|
||||
plans = []
|
||||
|
||||
for name, info of config.plans
|
||||
plans.push _.extend info,
|
||||
name: name
|
||||
isEnable: name in account.attribure.plans
|
||||
|
||||
res.render 'panel',
|
||||
account: account
|
||||
plans: plans
|
||||
|
||||
@@ -19,12 +19,23 @@ module.exports =
|
||||
|
||||
plans:
|
||||
all:
|
||||
t_name: '所有服务(默认)'
|
||||
t_service: '支持所有服务'
|
||||
t_resources: '磁盘: 520MB, 内存: 27MB, 流量: 37GB'
|
||||
service: ['memcached', 'mongodb', 'mysql', 'nginx', 'phpfpm', 'pptp', 'shadowsocks', 'ssh']
|
||||
resources:
|
||||
storage: 520
|
||||
transfer: 39
|
||||
memory: 27
|
||||
|
||||
shadowsocks:
|
||||
t_name: 'ShadowSocks'
|
||||
t_service: '仅 ShadowSocks'
|
||||
t_resources: '流量: 100GB'
|
||||
service: ['shadowsocks']
|
||||
resources:
|
||||
transfer: 100
|
||||
|
||||
db:
|
||||
type: 'mongo'
|
||||
server: 'localhost'
|
||||
|
||||
@@ -3,6 +3,12 @@
|
||||
"name": "RootPanel",
|
||||
"description": "一个插件化的 Linux 虚拟主机管理系统。"
|
||||
},
|
||||
"plans": {
|
||||
"all": {
|
||||
"name": "所有服务(默认)",
|
||||
"description": "该套餐包含所有的服务"
|
||||
}
|
||||
},
|
||||
"common": {
|
||||
"error": "错误"
|
||||
},
|
||||
@@ -30,6 +36,9 @@
|
||||
"create_reply": "创建回复",
|
||||
"ticket_list": "工单列表"
|
||||
},
|
||||
"plan": {
|
||||
"": "套餐"
|
||||
},
|
||||
"admin": {
|
||||
"admin_panel": "管理员面板"
|
||||
},
|
||||
@@ -42,5 +51,8 @@
|
||||
"already_signup": "已有帐号?",
|
||||
"no_account": "还没有账户?"
|
||||
}
|
||||
},
|
||||
"plugins": {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,8 @@ exports.register = (username, email, passwd, callback = null) ->
|
||||
signup: new Date()
|
||||
group: []
|
||||
setting: {}
|
||||
attribure: {}
|
||||
attribure:
|
||||
plnas: []
|
||||
tokens: []
|
||||
, {}, callback
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
extends layout
|
||||
|
||||
prepend head
|
||||
title #{t('panel.panel')} | #{t('app.name')}
|
||||
title #{t('panel.')} | #{t('app.name')}
|
||||
|
||||
append head
|
||||
link(rel='stylesheet', href='/style/panel/panel.css')
|
||||
@@ -21,4 +21,21 @@ block content
|
||||
| #{t('ticket.')}
|
||||
|
||||
.col-md-9
|
||||
h2 Panel
|
||||
.row
|
||||
header 概况
|
||||
|
||||
.row
|
||||
header= t('plan.')
|
||||
table.table.table-hover
|
||||
tbody
|
||||
for plan in plans
|
||||
tr
|
||||
td= plan.t_name
|
||||
td= plan.t_service
|
||||
td= plan.t_resources
|
||||
td
|
||||
if plan.isEnable
|
||||
button.btn.btn-danger.btn-sm 退订
|
||||
else
|
||||
button.btn.btn-success.btn-sm 订购
|
||||
|
||||
|
||||
Reference in New Issue
Block a user