From 09416286bf17f37354c73c5891f70478604818a3 Mon Sep 17 00:00:00 2001 From: ibuler Date: Tue, 29 Dec 2015 13:09:05 +0800 Subject: [PATCH 1/5] fix install port bug --- install/install.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/install.py b/install/install.py index 725eca728..0ada544b1 100755 --- a/install/install.py +++ b/install/install.py @@ -109,7 +109,7 @@ class PreSetup(object): def _test_db_conn(self): try: - MySQLdb.connect(host=self.db_host, port=self.db_port, + MySQLdb.connect(host=self.db_host, port=int(self.db_port), user=self.db_user, passwd=self.db_pass, db=self.db) color_print('连接数据库成功', 'green') return True @@ -157,7 +157,7 @@ class PreSetup(object): self._setup_mysql() else: db_host = raw_input('请输入数据库服务器IP [127.0.0.1]: ') - db_port = int(raw_input('请输入数据库服务器端口 [3306]: ')) + db_port = raw_input('请输入数据库服务器端口 [3306]: ') db_user = raw_input('请输入数据库服务器用户 [root]: ') db_pass = raw_input('请输入数据库服务器密码: ') db = raw_input('请输入使用的数据库 [jumpserver]: ') From e776c3c5f9db378e3e6b9a68c4f493eb2bc695f9 Mon Sep 17 00:00:00 2001 From: ibuler Date: Tue, 29 Dec 2015 22:54:55 +0800 Subject: [PATCH 2/5] Update README.md --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3cca1b740..448ce6711 100644 --- a/README.md +++ b/README.md @@ -36,9 +36,10 @@ Web批量执行命令 ### 文档 * [访问wiki](https://github.com/ibuler/jumpserver/wiki) -* [快速安装](https://github.com/ibuler/jumpserver/wiki/快速安装) -* [名词解释](https://github.com/ibuler/jumpserver/wiki/名称解释) -* [快速开始](https://github.com/ibuler/jumpserver/wiki/快速开始) +* [快速安装](https://github.com/ibuler/jumpserver/wiki/Quickinstall) +* [名词解释](https://github.com/ibuler/jumpserver/wiki/Termexplain) +* [快速开始](https://github.com/ibuler/jumpserver/wiki/Quickstart) +* [FAQ](https://github.com/ibuler/jumpserver/wiki/FAQs) ### 特点 From 86cc963673b54fd433889db1456d3c049bf0146a Mon Sep 17 00:00:00 2001 From: ibuler Date: Wed, 30 Dec 2015 12:11:39 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=9B=B4=E6=8D=A2alert=E6=88=91layer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/juser/change_info.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/juser/change_info.html b/templates/juser/change_info.html index 376ae54b8..7c55b674a 100644 --- a/templates/juser/change_info.html +++ b/templates/juser/change_info.html @@ -113,12 +113,12 @@ $('#userForm').validator({ $("document").ready(function() { $("#regen_ssh_key").click(function () { - alert('申请已提交,请等待,请勿重复提交'); + layer.alert('申请已提交,请等待,请勿重复提交'); $.get( $(this).attr('value'), {}, function(data){ - alert(data) + layer.alert(data) } ) }) From 2fa1d7a95b083c24d3903cea1ed6e3bc3f8b974d Mon Sep 17 00:00:00 2001 From: ibuler Date: Wed, 30 Dec 2015 12:36:34 +0800 Subject: [PATCH 4/5] =?UTF-8?q?fix=20connect.py=20=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- connect.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/connect.py b/connect.py index e38dfa751..18c84dee7 100755 --- a/connect.py +++ b/connect.py @@ -527,7 +527,7 @@ class Nav(object): user_asset_search = user_asset_all self.search_result = dict(zip(range(len(user_asset_search)), user_asset_search)) - color_print('[%-3s] %-12s %-15s %-5s %-10s %s' % ('ID', u'主机名', 'IP', u'端口', u'系统用户', u'备注'), 'title') + color_print('[%-3s] %-12s %-15s %-5s %-10s %s' % ('ID', '主机名', 'IP', '端口', '系统用户', '备注'), 'title') for index, asset in self.search_result.items(): # 获取该资产信息 asset_info = get_asset_info(asset) @@ -734,7 +734,7 @@ def main(): 主程序 """ if not login_user: # 判断用户是否存在 - color_print(u'没有该用户,或许你是以root运行的 No that user.', exits=True) + color_print('没有该用户,或许你是以root运行的 No that user.', exits=True) gid_pattern = re.compile(r'^g\d+$') nav = Nav(login_user) From 7be7772af6ac16ee0ac7c89a9f7faffcef3d760a Mon Sep 17 00:00:00 2001 From: ibuler Date: Wed, 30 Dec 2015 15:38:28 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8E=88=E6=9D=83?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=98=BE=E7=A4=BAip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jperm/views.py | 2 +- templates/jperm/perm_rule_edit.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jperm/views.py b/jperm/views.py index 33dce420b..db05783bd 100644 --- a/jperm/views.py +++ b/jperm/views.py @@ -539,7 +539,7 @@ def perm_role_push(request): if not failed_asset: msg = u'系统用户 %s 推送成功[ %s ]' % (role.name, ','.join(success_asset.keys())) else: - error = u'系统用户 %s 推送失败 [ %s ], 推送成功 [ %s ]' % (role.name, + error = u'系统用户 %s 推送失败 [ %s ], 推送成功 [ %s ] 进入系统用户详情,查看失败原因' % (role.name, ','.join(failed_asset.keys()), ','.join(success_asset.keys())) return my_render('jperm/perm_role_push.html', locals(), request) diff --git a/templates/jperm/perm_rule_edit.html b/templates/jperm/perm_rule_edit.html index 334692e04..0c5f27d5b 100644 --- a/templates/jperm/perm_rule_edit.html +++ b/templates/jperm/perm_rule_edit.html @@ -67,7 +67,7 @@
资产和资产组必选一个