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) ### 特点 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) 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]: ') 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 @@