12 Commits

Author SHA1 Message Date
dependabot[bot]
1696f3b85c Bump twisted from 19.2.1 to 22.10.0
Bumps [twisted](https://github.com/twisted/twisted) from 19.2.1 to 22.10.0.
- [Release notes](https://github.com/twisted/twisted/releases)
- [Changelog](https://github.com/twisted/twisted/blob/trunk/NEWS.rst)
- [Commits](https://github.com/twisted/twisted/compare/twisted-19.2.1...twisted-22.10.0)

---
updated-dependencies:
- dependency-name: twisted
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-04 19:35:04 +00:00
何全
bfb0dfa8b8 Update README.md 2019-09-17 14:18:08 +08:00
何全
3ed598a975 Update README.md 2019-09-17 14:17:22 +08:00
何全
3ff0a9e787 Update README.md 2019-09-16 17:01:27 +08:00
何全
b4ee175111 v0.5.2 修改k8s 容器webssh bug 2019-08-28 15:51:39 +08:00
何全
9a15bac824 v0.5.1 增加API文档 2019-08-09 11:00:55 +08:00
何全
ccc2409730 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	requirements.txt
2019-08-06 15:16:41 +08:00
何全
58eb0d0a2d v0.5 SQL执行 板块 2019-08-06 15:11:13 +08:00
何全
1eff1bb5cd Merge pull request #2 from hequan2017/dependabot/pip/parso-0.5.0
Bump parso from 0.2.1 to 0.5.0
2019-07-09 17:56:39 +08:00
何全
e97993605e Merge pull request #3 from hequan2017/dependabot/pip/django-2.2.3
Bump django from 2.2.2 to 2.2.3
2019-07-09 17:56:29 +08:00
dependabot[bot]
d378331b5d Bump parso from 0.2.1 to 0.5.0
Bumps [parso](https://github.com/davidhalter/parso) from 0.2.1 to 0.5.0.
- [Release notes](https://github.com/davidhalter/parso/releases)
- [Changelog](https://github.com/davidhalter/parso/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/davidhalter/parso/compare/v0.2.1...v0.5.0)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-09 09:44:38 +00:00
dependabot[bot]
e5e4a45595 Bump django from 2.2.2 to 2.2.3
Bumps [django](https://github.com/django/django) from 2.2.2 to 2.2.3.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/2.2.2...2.2.3)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-09 09:44:38 +00:00
6 changed files with 47 additions and 21 deletions

View File

@@ -14,8 +14,6 @@
> 支持 RESTful 和 GraphQL
> vue 前端地址 <https://github.com/hequan2017/seal-vue> 持续开发中
> 作者会在周末进行开发、更新。
> 支持 k8s webssh 管理 pod! sql执行 !
@@ -40,7 +38,7 @@
* pod webssh (已完成, 通过调用 k8s api 进行执行命令)
* 三期: mysql sql语句审核(已完成)
* sql检测执行
* 四期:正在开发中  重构前端 https://github.com/hequan2017/seal-d2-admin
## DEMO
@@ -51,6 +49,7 @@
> api文档地址 : http://129.28.156.219:8001/api/docs/
> vue 前端地址1 <https://github.com/hequan2017/seal-vue> 持续开发中
![列表](document/demo/1.jpg)
![添加](document/demo/2.jpg)
@@ -157,6 +156,7 @@ APISERVER = 'https://192.168.100.111:6443'
> 进入项目 cd seal
> sql/bin/config/config.toml 里面可以设置备份服务器,详情可以 github搜索 goInception
```
chmod +x sql/bin/soar

View File

@@ -67,6 +67,7 @@ class EchoConsumer(WebsocketConsumer):
def disconnect(self, close_code):
try:
async_to_sync(self.channel_layer.group_discard)(self.scope['user'].username, self.channel_name)
self.container_stream.write_stdin('exit\r') ## 必须加这个,防止 网页关闭,但是 容器没有退出
except Exception as e:
# 这里是为了配合 seal-vue 使用,实际项目,请删除下面这一行
async_to_sync(self.channel_layer.group_discard)("admin", self.channel_name)

View File

@@ -35,8 +35,7 @@ daphne==2.3.0
decorator==4.3.0
defusedxml==0.6.0
dill==0.2.9
Django==2.2.2
django-adminlte-ui==1.1.0
Django==2.2.4
django-bootstrap3==11.0.0
django-bootstrap4==0.0.7
django-celery-beat==1.4.0
@@ -50,16 +49,6 @@ django-timezone-field==3.0
djangorestframework==3.9.2
docutils==0.14
dramatiq==1.5.0
Flask==1.0.3
Flask-Admin==1.5.3
Flask-AppBuilder==1.12.3
Flask-Babel==0.12.2
Flask-Caching==1.3.3
Flask-Login==0.4.1
Flask-OpenID==1.2.5
Flask-SQLAlchemy==2.4.0
flask-swagger==0.2.13
Flask-WTF==0.14.2
flower==0.9.3
funcsigs==1.0.0
future==0.16.0
@@ -147,7 +136,7 @@ text-unidecode==1.2
thrift==0.11.0
tornado==5.1.1
traitlets==4.3.2
Twisted==19.2.1
Twisted==22.10.0
txaio==18.8.1
tzlocal==1.5.1
unicodecsv==0.14.1
@@ -162,3 +151,4 @@ Werkzeug==0.14.1
WTForms==2.2.1
zope.deprecation==4.4.0
zope.interface==4.6.0
django-rest-swagger

View File

@@ -31,7 +31,6 @@ ALLOWED_HOSTS = ['*']
# Application definition
INSTALLED_APPS = [
'adminlteui',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
@@ -51,6 +50,7 @@ INSTALLED_APPS = [
'django_filters',
'graphene_django',
'channels',
'rest_framework_swagger',
]
GRAPHENE = {
@@ -268,3 +268,34 @@ CHANNEL_LAYERS = {
# 配置ASGI
ASGI_APPLICATION = "seal.routing.application"
SWAGGER_SETTINGS = {
# 基础样式
# 'SECURITY_DEFINITIONS': {
# "basic": {
# 'type': 'basic'
# }
# },
'USE_SESSION_AUTH': True,
'SECURITY_DEFINITIONS': {
'api_key': {
'type': 'apiKey',
'in': 'header',
'name': 'authorization'
}
},
# 如果需要登录才能够查看接口文档, 登录的链接使用restframework自带的.
# 'LOGIN_URL': '/api/v1/login/',
# 'LOGOUT_URL': 'rest_framework:logout',
# 'DOC_EXPANSION': None,
# 'SHOW_REQUEST_HEADERS':True,
# 'USE_SESSION_AUTH': True,
# 'DOC_EXPANSION': 'list',
# 接口文档中方法列表以首字母升序排列
'APIS_SORTER': 'alpha',
# 如果支持json提交, 则接口文档中包含json输入框
'JSON_EDITOR': True,
# 方法列表字母排序
'OPERATIONS_SORTER': 'alpha',
'VALIDATOR_URL': None,
}

View File

@@ -6,6 +6,9 @@ from rest_framework.authtoken import views
from rest_framework.documentation import include_docs_urls
from graphene_django.views import GraphQLView
from seal.schema import schema
from rest_framework_swagger.views import get_swagger_view
schema_view = get_swagger_view(title='海豹 API 文档')
API_TITLE = '海豹 API 文档'
API_DESCRIPTION = '海豹 API 文档'
@@ -20,6 +23,7 @@ urlpatterns = [
path('api/token', views.obtain_auth_token),
path('api/docs/', include_docs_urls(title=API_TITLE, description=API_DESCRIPTION, authentication_classes=[],
permission_classes=[])),
path('api/docs2/', schema_view, name="docs"),
path('graphql/', GraphQLView.as_view(graphiql=True, schema=schema)),
path('sql/', include('sql.urls', namespace='sql')),

View File

@@ -38,10 +38,10 @@ log-rotate = true
[inc]
backup_host="192.168.100.200"
backup_port=3308
backup_user="root"
backup_password="123456"
#backup_host="192.168.100.50"
#backup_port=3306
#backup_user="root"
#backup_password="123456"
enable_nullable = true
enable_drop_table = false