mirror of https://github.com/veops/cmdb.git
Merge branch 'master' of https://github.com/fxiang21/cmdb
This commit is contained in:
commit
0472017b29
|
@ -2,9 +2,7 @@
|
|||
.idea
|
||||
.vscode
|
||||
migrates
|
||||
*/logs/*
|
||||
config.cfg
|
||||
logs/*
|
||||
*.log
|
||||
*_packed.js
|
||||
*_packed.css
|
||||
|
|
|
@ -19,9 +19,9 @@
|
|||
|
||||
Overview
|
||||
----
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
环境和依赖
|
||||
----
|
||||
|
@ -50,9 +50,11 @@ cp api/settings.py.example api/settings.py
|
|||
- 可以将docs/cmdb.sql导入到数据库里,登录用户和密码都是:admin
|
||||
|
||||
- 启动服务
|
||||
- 后端: ```pipenv run flask run```
|
||||
- 后端: ```pipenv run flask run -h 0.0.0.0```
|
||||
- 前端: ```cd ui && yarn run serve```
|
||||
|
||||
- 浏览器打开: [http://127.0.0.1:8000](http://127.0.0.1:8000)
|
||||
- 如果是非本机访问, 要修改**ui/.env**里**VUE_APP_API_BASE_URL**里的IP地址为后端服务的ip地址
|
||||
|
||||
docker运行
|
||||
----
|
||||
|
|
|
@ -129,7 +129,9 @@ class AttributeValueManager(object):
|
|||
operate_type = OperateType.ADD if existed_attr is None else OperateType.UPDATE
|
||||
|
||||
value_list = handle_arg_list(value) if attr.is_list else [value]
|
||||
|
||||
if not isinstance(value, list):
|
||||
value_list = [value]
|
||||
|
||||
for v in value_list:
|
||||
v = self._validate(attr, v, value_table, ci_id)
|
||||
if not v and attr.value_type != Attribute.TEXT:
|
||||
|
|
Loading…
Reference in New Issue