fix merge conflict

This commit is contained in:
pycook 2023-08-21 11:55:49 +08:00
commit 9e2bf3d1f0
14 changed files with 30 additions and 29 deletions

View File

@ -49,7 +49,6 @@ class AuditCRUD(object):
@staticmethod @staticmethod
def get_current_operate_uid(uid=None): def get_current_operate_uid(uid=None):
user_id = uid or (getattr(current_user, 'uid', None)) or getattr(current_user, 'user_id', None) user_id = uid or (getattr(current_user, 'uid', None)) or getattr(current_user, 'user_id', None)
if has_request_context() and request.headers.get('X-User-Id'): if has_request_context() and request.headers.get('X-User-Id'):

View File

@ -287,7 +287,7 @@ export default {
item.description += str item.description += str
} else { } else {
const str = ` ${key} : ${oldVal} 改为 ${newVal} ` const str = ` ${key} : ${oldVal} 改为 ${newVal} `
item.description += ` ${key} : ${oldVal} 改为 ${newVal} ` item.description += str
} }
} }
} }

View File

@ -238,7 +238,7 @@ export default {
item.changeDescription += str item.changeDescription += str
} else { } else {
const str = ` ${key} : ${oldVal} 改为 ${newVal} ` const str = ` ${key} : ${oldVal} 改为 ${newVal} `
item.changeDescription += ` ${key} : ${oldVal} 改为 ${newVal} ` item.changeDescription += str
} }
} }
} }

View File

@ -286,7 +286,7 @@ export default {
item.changeDescription += str item.changeDescription += str
} else { } else {
const str = ` ${key} : ${oldVal} 改为 ${newVal} ` const str = ` ${key} : ${oldVal} 改为 ${newVal} `
item.changeDescription += ` ${key} : ${oldVal} 改为 ${newVal} ` item.changeDescription += str
} }
} }
} }

View File

@ -550,7 +550,7 @@ export default {
.then(() => { .then(() => {
successNum += 1 successNum += 1
}) })
.catch((err) => { .catch(() => {
errorNum += 1 errorNum += 1
}) })
.finally(() => { .finally(() => {
@ -584,7 +584,7 @@ export default {
.then(() => { .then(() => {
successNum += 1 successNum += 1
}) })
.catch((err) => { .catch(() => {
errorNum += 1 errorNum += 1
}) })
.finally(() => { .finally(() => {
@ -685,7 +685,7 @@ export default {
}, },
onEnd: (params) => { onEnd: (params) => {
// 由于开启了虚拟滚动newIndex和oldIndex是虚拟的 // 由于开启了虚拟滚动newIndex和oldIndex是虚拟的
const { newIndex, oldIndex, from, to } = params const { newIndex, oldIndex } = params
// 从tableDragClassName拿到colid // 从tableDragClassName拿到colid
const fromColid = this.tableDragClassName[oldIndex] const fromColid = this.tableDragClassName[oldIndex]
const toColid = this.tableDragClassName[newIndex] const toColid = this.tableDragClassName[newIndex]

View File

@ -31,7 +31,7 @@
</template> </template>
<script> <script>
import { getDiscovery, deleteDiscovery, downloadADR } from '../../api/discovery' import { getDiscovery, deleteDiscovery } from '../../api/discovery'
import DiscoveryCard from './discoveryCard.vue' import DiscoveryCard from './discoveryCard.vue'
import EditDrawer from './editDrawer.vue' import EditDrawer from './editDrawer.vue'
export default { export default {

View File

@ -66,7 +66,7 @@ import ModelRelationTable from './modules/modelRelationTable.vue'
import { searchResourceType } from '@/modules/acl/api/resource' import { searchResourceType } from '@/modules/acl/api/resource'
import { getCITypeGroupsConfig } from '@/modules/cmdb/api/ciTypeGroup' import { getCITypeGroupsConfig } from '@/modules/cmdb/api/ciTypeGroup'
import { getCITypes } from '@/modules/cmdb/api/CIType' import { getCITypes } from '@/modules/cmdb/api/CIType'
import { createRelation, deleteRelation, getCITypeChildren, getRelationTypes } from '@/modules/cmdb/api/CITypeRelation' import { createRelation, deleteRelation, getRelationTypes } from '@/modules/cmdb/api/CITypeRelation'
export default { export default {
name: 'Index', name: 'Index',
components: { components: {

View File

@ -60,7 +60,7 @@
</vxe-column> </vxe-column>
<vxe-column field="type_id" title="模型" width="150px"> <vxe-column field="type_id" title="模型" width="150px">
<template #default="{ row }"> <template #default="{ row }">
{{ row.operate_type === '删除模型' ? row.change.alias : row.type_id}} {{ row.operate_type === '删除模型' ? row.change.alias : row.type_id }}
</template> </template>
</vxe-column> </vxe-column>
<vxe-column field="changeDescription" title="描述"> <vxe-column field="changeDescription" title="描述">

View File

@ -594,7 +594,7 @@ export default {
this.calcColumns() this.calcColumns()
if (refreshType === 'refreshNumber') { if (refreshType === 'refreshNumber') {
const promises = this.treeKeys.map((key, index) => { this.treeKeys.map((key, index) => {
statisticsCIRelation({ statisticsCIRelation({
root_ids: key.split('%')[0], root_ids: key.split('%')[0],
level: this.treeKeys.length - index, level: this.treeKeys.length - index,

View File

@ -18,7 +18,11 @@
属性说明 属性说明
</span> </span>
</span> </span>
<a-button size="small" icon="plus" type="primary" @click="$refs.create.handleOpen(true, 'create')" <a-button
size="small"
icon="plus"
type="primary"
@click="$refs.create.handleOpen(true, 'create')"
>新建</a-button >新建</a-button
> >
</div> </div>

View File

@ -802,7 +802,6 @@
import { mapState } from 'vuex' import { mapState } from 'vuex'
import { getDepartmentName, getDirectorName } from '@/utils/util' import { getDepartmentName, getDirectorName } from '@/utils/util'
import Bus from '../companyStructure/eventBus/bus' import Bus from '../companyStructure/eventBus/bus'
import appConfig from '@/config/app'
import Sortable from 'sortablejs' import Sortable from 'sortablejs'
import XEUtils from 'xe-utils' import XEUtils from 'xe-utils'
import { ops_move_icon as OpsMoveIcon } from '@/core/icons' import { ops_move_icon as OpsMoveIcon } from '@/core/icons'
@ -1179,7 +1178,7 @@ export default {
}, },
onEnd: (params) => { onEnd: (params) => {
// 由于开启了虚拟滚动newIndex和oldIndex是虚拟的 // 由于开启了虚拟滚动newIndex和oldIndex是虚拟的
const { newIndex, oldIndex, from, to } = params const { newIndex, oldIndex } = params
// 从tableDragClassName拿到colid // 从tableDragClassName拿到colid
const fromColid = this.tableDragClassName[oldIndex] const fromColid = this.tableDragClassName[oldIndex]
const toColid = this.tableDragClassName[newIndex] const toColid = this.tableDragClassName[newIndex]

View File

@ -117,7 +117,7 @@ export default {
const loginParams = { ...values } const loginParams = { ...values }
delete loginParams.username delete loginParams.username
loginParams[!state.loginType ? 'email' : 'username'] = values.username loginParams[!state.loginType ? 'email' : 'username'] = values.username
loginParams.password = appConfig.useEncryption?md5(values.password):values.password loginParams.password = appConfig.useEncryption ? md5(values.password) : values.password
Login(loginParams) Login(loginParams)
.then((res) => this.loginSuccess(res)) .then((res) => this.loginSuccess(res))
.finally(() => { .finally(() => {

View File

@ -30,7 +30,7 @@ services:
- redis - redis
cmdb-api: cmdb-api:
image: registry.cn-hangzhou.aliyuncs.com/veops/cmdb-api:3.0 image: registry.cn-hangzhou.aliyuncs.com/veops/cmdb-api:2.3.1
# build: # build:
# context: . # context: .
# target: cmdb-api # target: cmdb-api
@ -44,14 +44,13 @@ services:
- | - |
sed -i "s#USE_ACL = False#USE_ACL = True#g" settings.py sed -i "s#USE_ACL = False#USE_ACL = True#g" settings.py
/wait /wait
sleep 5
gunicorn --workers=3 autoapp:app -b 0.0.0.0:5000 -D gunicorn --workers=3 autoapp:app -b 0.0.0.0:5000 -D
flask cmdb-init-cache flask cmdb-init-cache
flask cmdb-init-acl flask cmdb-init-acl
nohup flask cmdb-counter > counter.log 2>&1 & nohup flask cmdb-counter > counter.log 2>&1 &
celery worker -A celery_worker.celery -E -Q one_cmdb_async --concurrency=2 -D celery -A celery_worker.celery worker -E -Q one_cmdb_async --concurrency=2 -D
celery worker -A celery_worker.celery -E -Q acl_async --concurrency=2 celery -A celery_worker.celery worker -E -Q acl_async --concurrency=2
depends_on: depends_on:
- cmdb-db - cmdb-db
- cmdb-cache - cmdb-cache
@ -61,7 +60,7 @@ services:
- cmdb-api - cmdb-api
cmdb-ui: cmdb-ui:
image: registry.cn-hangzhou.aliyuncs.com/veops/cmdb-ui:3.0 image: registry.cn-hangzhou.aliyuncs.com/veops/cmdb-ui:2.3.1
# build: # build:
# context: . # context: .
# target: cmdb-ui # target: cmdb-ui