Merge branch 'master' of github.com:veops/cmdb into dev_ui

This commit is contained in:
wang-liang0615 2023-09-05 15:22:18 +08:00
commit 6758b994f8
5 changed files with 15 additions and 17 deletions

View File

@ -4,7 +4,7 @@
[![UI](https://img.shields.io/badge/UI-Ant%20Design%20Pro%20Vue-brightgreen)](https://github.com/sendya/ant-design-pro-vue)
[![API](https://img.shields.io/badge/API-Flask-brightgreen)](https://github.com/pallets/flask)
[English](README_en.md) / [中文](README.md)
[English](docs/README_en.md) / [中文](README.md)
- 在线体验: <a href="https://cmdb.veops.cn" target="_blank">CMDB</a>
- username: demo 或者 admin

View File

@ -38,8 +38,8 @@ from api.lib.decorator import kwargs_required
from api.lib.perm.acl.acl import ACLManager
from api.lib.perm.acl.acl import is_app_admin
from api.lib.perm.acl.acl import validate_permission
from api.lib.utils import handle_arg_list
from api.lib.utils import Lock
from api.lib.utils import handle_arg_list
from api.models.cmdb import AutoDiscoveryCI
from api.models.cmdb import CI
from api.models.cmdb import CIRelation
@ -290,7 +290,7 @@ class CIManager(object):
_is_admin=False,
**ci_dict):
"""
add ci
:param ci_type_name:
:param exist_policy: replace or reject or need
:param _no_attribute_policy: ignore or reject
@ -479,10 +479,7 @@ class CIManager(object):
unique_key = AttributeCache.get(ci_type.unique_id)
value_table = TableMap(attr=unique_key).table
v = (value_table.get_by(attr_id=unique_key.id,
value=unique_value,
to_dict=False,
first=True) or
v = (value_table.get_by(attr_id=unique_key.id, value=unique_value, to_dict=False, first=True) or
abort(404, ErrFormat.not_found))
ci = CI.get_by_id(v.ci_id) or abort(404, ErrFormat.ci_not_found.format("id={}".format(v.ci_id)))

View File

@ -19,6 +19,7 @@ def build_api_key(path, params):
_secret = "".join([path, secret, values]).encode("utf-8")
params["_secret"] = hashlib.sha1(_secret).hexdigest()
params["_key"] = key
return params

View File

@ -3,7 +3,7 @@ FROM node:16.0.0-alpine AS builder
LABEL description="cmdb-ui"
COPY cmdb-ui /data/apps/cmdb-ui
COPY ../cmdb-ui /data/apps/cmdb-ui
WORKDIR /data/apps/cmdb-ui
@ -22,7 +22,7 @@ FROM python:3.8-alpine AS cmdb-api
LABEL description="Python3.8,cmdb"
COPY cmdb-api /data/apps/cmdb
COPY ../cmdb-api /data/apps/cmdb
WORKDIR /data/apps/cmdb

View File

@ -1,10 +1,10 @@
![维易CMDB](docs/images/logo.png)
![维易CMDB](images/logo.png)
[![License](https://img.shields.io/badge/License-AGPLv3-brightgreen)](https://github.com/veops/cmdb/blob/master/LICENSE)
[![UI](https://img.shields.io/badge/UI-Ant%20Design%20Pro%20Vue-brightgreen)](https://github.com/sendya/ant-design-pro-vue)
[![API](https://img.shields.io/badge/API-Flask-brightgreen)](https://github.com/pallets/flask)
[English](README_en.md) / [中文](README.md)
[English](README_en.md) / [中文](../README.md)
## DEMO ONLINE
@ -18,7 +18,7 @@
### Technical Architecture
<img src=docs/images/view.jpg />
<img src=images/view.jpg />
### Document
@ -51,9 +51,9 @@
### System Overview
- Service Tree
![1](docs/images/0.png "首页展示")
![1](images/0.png "首页展示")
[View more screenshots](docs/screenshot.md)
[View more screenshots](screenshot.md)
### More Features
@ -73,9 +73,9 @@
- password: 123456
### [Local Setup](docs/local_en.md)
### [Local Setup](local_en.md)
### [Installation with Makefile](docs/makefile_en.md)
### [Installation with Makefile](makefile_en.md)
## Contributing
@ -89,4 +89,4 @@
_**Welcome to pay attention to our public account, click to contact us, join WeChat, QQ operation and maintenance group, and get more product and industry related information**_
![QQgroup](docs/images/qrcode_for_gzh.jpg)
![QQgroup](images/qrcode_for_gzh.jpg)