From 5b38385f7e4a13d4297313193edd6b9666344ee5 Mon Sep 17 00:00:00 2001 From: pycook Date: Wed, 1 Apr 2020 21:20:47 +0800 Subject: [PATCH 1/3] release version 2.1 --- Dockerfile | 2 +- docker-compose.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index ef5528e..cf4195b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,7 +26,7 @@ COPY cmdb-api /data/apps/cmdb WORKDIR /data/apps/cmdb -RUN apk add --no-cache tzdata gcc musl-dev libffi-dev +RUN apk add --no-cache tzdata gcc musl-dev libffi-dev openldap-dev ENV TZ=Asia/Shanghai diff --git a/docker-compose.yml b/docker-compose.yml index b6ab5ce..3038861 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -54,7 +54,7 @@ services: - cmdb-search cmdb-api: - image: registry.cn-qingdao.aliyuncs.com/pycook/cmdb-api:2.1 + image: registry.cn-qingdao.aliyuncs.com/pycook/cmdb-api:2.2 # build: # context: . # target: cmdb-api @@ -74,7 +74,7 @@ services: gunicorn --workers=3 autoapp:app -b 0.0.0.0:5000 -D flask init-cache flask init-acl - + celery worker -A celery_worker.celery -E -Q cmdb_async --concurrency=1 depends_on: - cmdb-db @@ -86,7 +86,7 @@ services: - cmdb-api cmdb-ui: - image: registry.cn-qingdao.aliyuncs.com/pycook/cmdb-ui:2.1 + image: registry.cn-qingdao.aliyuncs.com/pycook/cmdb-ui:2.2 # build: # context: . # target: cmdb-ui From 75c48a08073d0427941a3124ed305216d0bbdfb6 Mon Sep 17 00:00:00 2001 From: pycook Date: Wed, 1 Apr 2020 21:40:51 +0800 Subject: [PATCH 2/3] Fix: spelling mistakes --- cmdb-api/api/lib/cmdb/history.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmdb-api/api/lib/cmdb/history.py b/cmdb-api/api/lib/cmdb/history.py index f8394c0..006e9f8 100644 --- a/cmdb-api/api/lib/cmdb/history.py +++ b/cmdb-api/api/lib/cmdb/history.py @@ -1,4 +1,4 @@ -# -*- coding:utf-8 -*- +# -*- coding:utf-8 -*- import json @@ -83,7 +83,7 @@ class AttributeHistoryManger(object): username = UserCache.get(record.uid).nickname or UserCache.get(record.uid).username timestamp = record.created_at.strftime("%Y-%m-%d %H:%M:%S") - attr_history = AttributeHistory.get_By(record_id=record_id, to_dict=False) + attr_history = AttributeHistory.get_by(record_id=record_id, to_dict=False) rel_history = CIRelationHistory.get_by(record_id=record_id, to_dict=False) attr_dict, rel_dict = dict(), {"add": [], "delete": []} From 29fa17a0b81b80680976c78069650aec0ba962ad Mon Sep 17 00:00:00 2001 From: pycook Date: Fri, 10 Apr 2020 17:22:33 +0800 Subject: [PATCH 3/3] update readme --- README.md | 4 ++++ README_cn.md | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/README.md b/README.md index 3b7aadf..86f26b6 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,10 @@ As far as possible to achieve more universal configuration and management of IT ---- ## Overview +### Documents +- [Design document](https://zhuanlan.zhihu.com/p/98453732) +- [API document](https://github.com/pycook/cmdb/tree/master/docs) +- [Tree view practice](https://mp.weixin.qq.com/s/EflmmJ-qdUkddTx2hRt3pA) The CMDB is a universal project that can define and manage almost all IT resources, even every resource as long as you want to, which treat all IT resources as resource objects. Objects has both attributes and relationship. diff --git a/README_cn.md b/README_cn.md index 3e7cb48..11e0d45 100644 --- a/README_cn.md +++ b/README_cn.md @@ -22,6 +22,11 @@ Overview ---- +### 相关文档 +- [设计文档](https://zhuanlan.zhihu.com/p/98453732) +- [API文档](https://github.com/pycook/cmdb/tree/master/docs) +- [树形视图实践](https://mp.weixin.qq.com/s/EflmmJ-qdUkddTx2hRt3pA) + ### 3种类型视图 1. 资源视图 - 模型的实例数据, 用户可订阅 2. 树形视图 - 模型按字段分级, 用树形图方式展示, 用户可订阅