Merge branch 'dev' of github.com:jumpserver/jumpserver into dev

pull/188/head
ibuler 2016-04-01 12:12:34 +08:00
commit de594aebd5
3 changed files with 9 additions and 9 deletions

View File

@ -4,10 +4,10 @@
#欢迎使用Jumpserver
**Jumpserver** 是一款由python编写开源的跳板机(堡垒机)系统实现了跳板机应有的功能。基于ssh协议来管理客户端无需安装agent。
支持常见系统:
1. redhat centos
2. debian
3. suse ubuntu
4. freebsd
1. CentOS, RedHat, Fedora, Amazon Linux
2. Debian
3. SUSE, Ubuntu
4. FreeBSD
5. 其他ssh协议硬件设备
###截图:

View File

@ -80,12 +80,12 @@ class PreSetup(object):
self.ip = ''
self.key = ''.join(random.choice(string.ascii_lowercase + string.digits) \
for _ in range(16))
self.dist = platform.dist()[0].lower()
self.version = platform.dist()[1]
self.dist = platform.linux_distribution(supported_dists=['system'])[0].lower()
self.version = platform.linux_distribution(supported_dists=['system'])[1]
@property
def _is_redhat(self):
if self.dist == "centos" or self.dist == "redhat" or self.dist == "fedora":
if self.dist == "centos" or self.dist == "redhat" or self.dist == "fedora" or self.dist == "amazon linux ami":
return True
@property
@ -105,7 +105,7 @@ class PreSetup(object):
def check_platform(self):
if not (self._is_redhat or self._is_ubuntu):
print(u"支持的平台: CentOS, RedHat, Fedora, Debian, Ubuntu, 暂不支持其他平台安装.")
print(u"支持的平台: CentOS, RedHat, Fedora, Debian, Ubuntu, Amazon Linux, 暂不支持其他平台安装.")
exit()
@staticmethod

View File

@ -109,7 +109,7 @@
timely: 2,
theme: "yellow_right_effect",
rules: {
check_name: [/^\w{2,20}$/, '大小写字母数字和下划线,2-20位'],
check_name: [/^(\w|\-){2,20}$/, '大小写字母、数字、中划线和下划线,2-20位'],
check_port: [/^\d{1,5}$/, '端口号不正确'],
either: function(){
return $('#password').val() == ''