diff --git a/README.md b/README.md index 5805573bf..bc6dfdd2f 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ JumpServer 采纳分布式架构,支持多机房跨区域部署,支持横向 改变世界,从一点点开始 ... +> 如需进一步了解 JumpServer 开源项目,推荐阅读 [JumpServer 的初心和使命](https://mp.weixin.qq.com/s/S6q_2rP_9MwaVwyqLQnXzA) ### 特色优势 @@ -32,6 +33,21 @@ JumpServer 采纳分布式架构,支持多机房跨区域部署,支持横向 - 多租户: 一套系统,多个子公司和部门同时使用; - 多应用支持: 数据库,Windows远程应用,Kubernetes。 +### UI 展示 + +![UI展示](https://www.jumpserver.org/images/screenshot/1.png) + +### 在线体验 + +- 环境地址: +- 用户名:test +- 密码:test01 + +| :warning: 注意 | +| :--------------------------- | +| 该环境仅作体验目的使用,我们会定时清理、重置数据! | +| 请勿修改体验环境用户的密码! | +| 请勿在环境中添加业务生产环境地址、用户名密码等敏感信息! | ### 快速开始 @@ -45,6 +61,8 @@ JumpServer 采纳分布式架构,支持多机房跨区域部署,支持横向 - [Luna](https://github.com/jumpserver/luna) JumpServer Web Terminal 项目 - [KoKo](https://github.com/jumpserver/koko) JumpServer 字符协议 Connector 项目,替代原来 Python 版本的 [Coco](https://github.com/jumpserver/coco) - [Lion](https://github.com/jumpserver/lion-release) JumpServer 图形协议 Connector 项目,依赖 [Apache Guacamole](https://guacamole.apache.org/) +- [Clients](https://github.com/jumpserver/clients) JumpServer 客户端 项目 +- [Installer](https://github.com/jumpserver/installer) JumpServer 安装包 项目 ### 社区 @@ -108,7 +126,7 @@ JumpServer是一款安全产品,请参考 [基本安全建议](https://docs.ju ### License & Copyright -Copyright (c) 2014-2020 飞致云 FIT2CLOUD, All rights reserved. +Copyright (c) 2014-2021 飞致云 FIT2CLOUD, All rights reserved. Licensed under The GNU General Public License version 2 (GPLv2) (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/README_EN.md b/README_EN.md index f1706a3b9..b9dbbff3a 100644 --- a/README_EN.md +++ b/README_EN.md @@ -85,7 +85,7 @@ If you find a security problem, please contact us directly: - 400-052-0755 ### License & Copyright -Copyright (c) 2014-2019 Beijing Duizhan Tech, Inc., All rights reserved. +Copyright (c) 2014-2021 Beijing Duizhan Tech, Inc., All rights reserved. Licensed under The GNU General Public License version 2 (GPLv2) (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/apps/assets/serializers/asset.py b/apps/assets/serializers/asset.py index aeef79152..f387df071 100644 --- a/apps/assets/serializers/asset.py +++ b/apps/assets/serializers/asset.py @@ -71,7 +71,7 @@ class AssetSerializer(BulkOrgResourceModelSerializer): """ class Meta: model = Asset - fields_mini = ['id', 'hostname', 'ip'] + fields_mini = ['id', 'hostname', 'ip', 'platform', 'protocols'] fields_small = fields_mini + [ 'protocol', 'port', 'protocols', 'is_active', 'public_ip', 'number', 'vendor', 'model', 'sn', 'cpu_model', 'cpu_count', diff --git a/apps/notifications/ws.py b/apps/notifications/ws.py index cbbb25d2d..45cbb6d00 100644 --- a/apps/notifications/ws.py +++ b/apps/notifications/ws.py @@ -1,6 +1,6 @@ import threading import json - +from redis.exceptions import ConnectionError from channels.generic.websocket import JsonWebsocketConsumer from common.utils import get_logger @@ -12,13 +12,14 @@ logger = get_logger(__name__) class SiteMsgWebsocket(JsonWebsocketConsumer): - disconnected = False refresh_every_seconds = 10 + chan = None def connect(self): user = self.scope["user"] if user.is_authenticated: self.accept() + self.chan = new_site_msg_chan.subscribe() thread = threading.Thread(target=self.unread_site_msg_count) thread.start() @@ -48,9 +49,8 @@ class SiteMsgWebsocket(JsonWebsocketConsumer): user_id = str(self.scope["user"].id) self.send_unread_msg_count() - while not self.disconnected: - subscribe = new_site_msg_chan.subscribe() - for message in subscribe.listen(): + try: + for message in self.chan.listen(): if message['type'] != 'message': continue try: @@ -64,7 +64,10 @@ class SiteMsgWebsocket(JsonWebsocketConsumer): self.send_unread_msg_count() except json.JSONDecoder as e: logger.debug('Decode json error: ', e) + except ConnectionError: + logger.debug('Redis chan closed') def disconnect(self, close_code): - self.disconnected = True + if self.chan is not None: + self.chan.close() self.close() diff --git a/apps/users/serializers/user.py b/apps/users/serializers/user.py index a9d55375d..d4abf8d34 100644 --- a/apps/users/serializers/user.py +++ b/apps/users/serializers/user.py @@ -127,7 +127,7 @@ class UserSerializer(CommonBulkSerializerMixin, serializers.ModelSerializer): def validate_password(self, password): from ..utils import check_password_rules password_strategy = self.initial_data.get('password_strategy') - if self.instance is None and password_strategy != self.PasswordStrategy.custom: + if self.instance is None and password_strategy != PasswordStrategy.custom: # 创建用户,使用邮件设置密码 return if self.instance and not password: diff --git a/utils/check_celery.sh b/utils/check_celery.sh index dce8edb45..4673e0918 100644 --- a/utils/check_celery.sh +++ b/utils/check_celery.sh @@ -1,6 +1,6 @@ #!/bin/bash -if [[ "$(ps axu | grep 'celery' | grep -v 'grep' | grep -cv 'defunct')" == "5" ]];then +if [[ "$(ps axu | grep 'celery' | grep -v 'grep' | grep -cv 'defunct')" -gt "2" ]];then exit 0 else exit 1