Skip to content

Commit

Permalink
Merge branch 'master' into stable_v2
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiesun committed Feb 20, 2016
2 parents 77d99cf + 04038f8 commit 0d4191c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
4 changes: 4 additions & 0 deletions scripts/trshell
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ install_with_lmysql()
read -p "mysql root password [radroot]: " mysql_root_password
mysql_root_password=${mysql_root_password:-radroot}

read -p "mysql max memary [512M,1G,4G](default none): " mysql_max_mem
mysql_max_mem=${mysql_max_mem:-""}

read -p "toughradius web port [1816]: " web_port
web_port=${web_port:-1816}

Expand Down Expand Up @@ -84,6 +87,7 @@ raddb:
expose:
- "3306"
environment:
- MYSQL_MAX_MEM=$mysql_max_mem
- MYSQL_USER=$mysql_user
- MYSQL_PASSWORD=$mysql_password
- MYSQL_DATABASE=$mysql_database
Expand Down
2 changes: 1 addition & 1 deletion toughradius/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python
#coding=utf-8

__version__ = '2.0.2'
__version__ = '2.0.3'
__license__ = 'AGPL'
6 changes: 0 additions & 6 deletions toughradius/common/initdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,7 @@ def init_db(db):
params = [
('system_name', u'管理系统名称', u'ToughRADIUS管理控制台'),
('system_ticket_expire_days', u'上网日志保留天数', '90'),
('customer_system_name', u'自助服务系统名称', u'ToughRADIUS自助服务中心'),
('customer_system_url', u"自助服务系统地址", u"http://forum.toughradius.net"),
('is_debug', u'DEBUG模式', u'0'),
('customer_qrcode', u'微信公众号二维码图片(宽度230px)', u'http://img.toughradius.net/toughforum/jamiesun/1421820686.jpg!230'),
('customer_service_phone', u'客户服务电话', u'000000'),
('customer_service_qq', u'客户服务QQ号码', u'000000'),
('rcard_order_url', u'充值卡订购网站地址', u'http://www.tmall.com'),
('expire_notify_days', '到期提醒提前天数', u'7'),
('expire_notify_interval', '到期提醒提前间隔(分钟)', u'1440'),
('expire_notify_tpl', '到期提醒邮件模板', u'账号到期通知\n尊敬的会员您好:\n您的账号#account#即将在#expire#到期,请及时续费!'),
Expand Down
5 changes: 3 additions & 2 deletions toughradius/manage/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,8 @@ class TrOnline(DeclarativeBase):

id = Column(u'id', INTEGER(), primary_key=True, nullable=False,doc=u"在线id")
account_number = Column(u'account_number', Unicode(length=32), nullable=False, index=True, doc=u"上网账号")
nas_addr = Column(u'nas_addr', Unicode(length=32), nullable=False, doc=u"bas地址")
acct_session_id = Column(u'acct_session_id', Unicode(length=64), nullable=False,doc=u"会话id")
nas_addr = Column(u'nas_addr', Unicode(length=32), nullable=False,index=True, doc=u"bas地址")
acct_session_id = Column(u'acct_session_id', Unicode(length=64),index=True, nullable=False,doc=u"会话id")
acct_start_time = Column(u'acct_start_time', Unicode(length=19), nullable=False,doc=u"会话开始时间")
framed_ipaddr = Column(u'framed_ipaddr', Unicode(length=32), nullable=False,doc=u"IP地址")
mac_addr = Column(u'mac_addr', Unicode(length=32), nullable=False,doc=u"mac地址")
Expand All @@ -366,6 +366,7 @@ class TrOnline(DeclarativeBase):
input_total = Column(u'input_total', INTEGER(),doc=u"上行流量(kb)")
output_total = Column(u'output_total', INTEGER(),doc=u"下行流量(kb)")
start_source = Column(u'start_source', SMALLINT(), nullable=False,doc=u"记账开始来源")
UniqueConstraint('nas_addr', 'acct_session_id', name='unique_nas_session')


class TrAcceptLog(DeclarativeBase):
Expand Down

0 comments on commit 0d4191c

Please sign in to comment.