mirror of https://github.com/veops/cmdb.git
Remove package-lock.json and remove some compile warnings
This commit is contained in:
parent
50f894a01d
commit
5f2a0d1a7b
|
@ -17,8 +17,8 @@ def init_cache():
|
|||
cis = CI.get_by(to_dict=False)
|
||||
for ci in cis:
|
||||
m = api.lib.cmdb.ci.CIManager()
|
||||
ci = m.get_ci_by_id_from_db(ci.id, need_children=False, use_master=False)
|
||||
ci_dict = m.get_ci_by_id_from_db(ci.id, need_children=False, use_master=False)
|
||||
if rd.get([ci.id]):
|
||||
return
|
||||
rd.delete(ci.id)
|
||||
rd.add({ci.id: json.dumps(ci)})
|
||||
rd.add({ci.id: json.dumps(ci_dict)})
|
||||
|
|
|
@ -1,29 +1,6 @@
|
|||
version: '3.4'
|
||||
|
||||
services:
|
||||
cmdb-api:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: api/Dockerfile
|
||||
image: cmdb-api:0.1
|
||||
container_name: cmdb-api
|
||||
command:
|
||||
- /bin/bash
|
||||
- -c
|
||||
- |
|
||||
cp api/settings.py.example api/settings.py
|
||||
sed -i 's#{user}:{password}@127.0.0.1:3306/{db}#cmdb:123456@mysql:3306/cmdb#g' api/settings.py
|
||||
sed -i 's/127.0.0.1/redis/g' api/settings.py
|
||||
gunicorn --workers=3 autoapp:app -b 0.0.0.0:5000 -D
|
||||
celery worker -A celery_worker.celery -E -Q cmdb_async --concurrency=1
|
||||
depends_on:
|
||||
- cmdb-db
|
||||
- cmdb-cache
|
||||
networks:
|
||||
new:
|
||||
aliases:
|
||||
- cmdb-api
|
||||
|
||||
cmdb-db:
|
||||
image: mysql:5.7
|
||||
container_name: cmdb-db
|
||||
|
@ -49,6 +26,27 @@ services:
|
|||
aliases:
|
||||
- redis
|
||||
|
||||
cmdb-api:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: api/Dockerfile
|
||||
image: cmdb-api:0.1
|
||||
container_name: cmdb-api
|
||||
command:
|
||||
- /bin/bash
|
||||
- -c
|
||||
- |
|
||||
gunicorn --workers=3 autoapp:app -b 0.0.0.0:5000 -D
|
||||
flask init-cache
|
||||
celery worker -A celery_worker.celery -E -Q cmdb_async --concurrency=1
|
||||
depends_on:
|
||||
- cmdb-db
|
||||
- cmdb-cache
|
||||
networks:
|
||||
new:
|
||||
aliases:
|
||||
- cmdb-api
|
||||
|
||||
cmdb-ui:
|
||||
build:
|
||||
context: ./ui
|
||||
|
@ -63,12 +61,10 @@ services:
|
|||
volumes:
|
||||
- ./docs/nginx.cmdb.conf.example:/etc/nginx/conf.d/nginx.cmdb.conf.example
|
||||
command:
|
||||
- /bin/bash
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
envsubst '$$CMDB_API_HOST $$NGINX_PORT' < /etc/nginx/conf.d/nginx.cmdb.conf.example > /etc/nginx/conf.d/cmdb.conf
|
||||
rm -f /etc/nginx/conf.d/default.conf
|
||||
curl http://cmdb-api:5000/api/v0.1/ci/flush
|
||||
nginx -g 'daemon off;'
|
||||
networks:
|
||||
- new
|
||||
|
|
|
@ -6,13 +6,11 @@ COPY . /data/apps/cmdb-ui
|
|||
|
||||
WORKDIR /data/apps/cmdb-ui
|
||||
|
||||
RUN sed -i 's#http://127.0.0.1:5000##g' .env && yarn install && yarn build
|
||||
RUN sed -i "s#http://127.0.0.1:5000##g" .env && yarn install && yarn build
|
||||
|
||||
|
||||
FROM nginx:latest
|
||||
FROM nginx:alpine
|
||||
|
||||
RUN apt-get update && apt-get install -y curl && apt-get clean
|
||||
|
||||
RUN mkdir /etc/nginx/html
|
||||
RUN mkdir /etc/nginx/html && rm -f /etc/nginx/conf.d/default.conf
|
||||
|
||||
COPY --from=builder /data/apps/cmdb-ui/dist /etc/nginx/html/
|
||||
|
|
|
@ -2,9 +2,14 @@ module.exports = {
|
|||
presets: [
|
||||
'@vue/app',
|
||||
[
|
||||
'@babel/preset-env',
|
||||
"@babel/preset-env",
|
||||
{
|
||||
'useBuiltIns': 'entry'
|
||||
"useBuiltIns": "usage", // "usage" | "entry" | false, defaults to false.
|
||||
"corejs": "3.1.2",
|
||||
"targets": {
|
||||
"esmodules": true,
|
||||
"ie": "11"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -12,15 +12,11 @@
|
|||
"postinstall": "opencollective-postinstall"
|
||||
},
|
||||
"dependencies": {
|
||||
"@antv/data-set": "^0.10.1",
|
||||
"@handsontable-pro/vue": "^3.1.1",
|
||||
"@handsontable/vue": "^4.1.0",
|
||||
"ant-design-vue": "^1.3.15",
|
||||
"@antv/data-set": "^0.10.2",
|
||||
"ant-design-vue": "^1.4.2",
|
||||
"axios": "^0.19.0",
|
||||
"core-js": "^2.6.5",
|
||||
"core-js": "^3.1.2",
|
||||
"enquire.js": "^2.1.6",
|
||||
"handsontable": "^7.1.1",
|
||||
"handsontable-pro": "^6.2.3",
|
||||
"js-cookie": "^2.2.0",
|
||||
"json2csv": "^4.5.2",
|
||||
"lodash.get": "^4.4.2",
|
||||
|
@ -38,33 +34,37 @@
|
|||
"vue-router": "^3.0.1",
|
||||
"vue-svg-component-runtime": "^1.0.1",
|
||||
"vuedraggable": "^2.23.0",
|
||||
"vuex": "^3.1.0",
|
||||
"vuex": "^3.1.1",
|
||||
"wangeditor": "^3.1.1",
|
||||
"xlsx": "latest"
|
||||
"xlsx": "latest",
|
||||
"@handsontable-pro/vue": "^3.1.1",
|
||||
"@handsontable/vue": "^4.1.1",
|
||||
"handsontable": "^7.2.2",
|
||||
"handsontable-pro": "^6.2.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ant-design/colors": "^3.1.0",
|
||||
"@babel/polyfill": "^7.2.5",
|
||||
"@vue/cli-plugin-babel": "^3.7.0",
|
||||
"@vue/cli-plugin-eslint": "^3.7.0",
|
||||
"@vue/cli-plugin-unit-jest": "^3.7.0",
|
||||
"@vue/cli-service": "^3.7.0",
|
||||
"@ant-design/colors": "^3.2.1",
|
||||
"@vue/cli-plugin-babel": "^4.0.4",
|
||||
"@vue/cli-plugin-eslint": "^4.0.4",
|
||||
"@vue/cli-plugin-router": "^4.0.4",
|
||||
"@vue/cli-plugin-unit-jest": "^4.0.4",
|
||||
"@vue/cli-plugin-vuex": "^4.0.4",
|
||||
"@vue/cli-service": "^4.0.4",
|
||||
"@vue/eslint-config-standard": "^4.0.0",
|
||||
"@vue/test-utils": "^1.0.0-beta.20",
|
||||
"babel-core": "7.0.0-bridge.0",
|
||||
"@vue/test-utils": "^1.0.0-beta.29",
|
||||
"babel-eslint": "^10.0.1",
|
||||
"babel-jest": "^23.6.0",
|
||||
"babel-plugin-import": "^1.11.0",
|
||||
"eslint": "^5.8.0",
|
||||
"babel-plugin-import": "^1.12.2",
|
||||
"babel-plugin-transform-remove-console": "^6.9.4",
|
||||
"eslint": "^5.16.0",
|
||||
"eslint-plugin-html": "^5.0.0",
|
||||
"eslint-plugin-vue": "^5.0.0",
|
||||
"less": "^3.8.1",
|
||||
"less-loader": "^4.1.0",
|
||||
"opencollective": "^1.0.3",
|
||||
"opencollective-postinstall": "^2.0.2",
|
||||
"eslint-plugin-vue": "^5.2.3",
|
||||
"less": "^3.0.4",
|
||||
"less-loader": "^5.0.0",
|
||||
"vue-template-compiler": "^2.6.10",
|
||||
"vue-svg-icon-loader": "^2.1.1",
|
||||
"vue-template-compiler": "^2.6.7",
|
||||
"webpack-theme-color-replacer": "^1.2.15"
|
||||
"webpack-theme-color-replacer": "^1.2.17",
|
||||
"opencollective": "^1.0.3",
|
||||
"opencollective-postinstall": "^2.0.2"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
|
|
|
@ -16,27 +16,23 @@ export default {
|
|||
props: { ciTypeAttrs: { type: Object, required: true } },
|
||||
data: function () {
|
||||
return {
|
||||
root: 'test-hot',
|
||||
dataTitle: []
|
||||
root: 'test-hot'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
hotSettings () {
|
||||
const whiteColumn = []
|
||||
const aliasList = []
|
||||
const dataTitle = []
|
||||
this.$props.ciTypeAttrs.attributes.forEach(item => {
|
||||
dataTitle.push(item.name)
|
||||
aliasList.push(item.alias)
|
||||
whiteColumn.push('')
|
||||
})
|
||||
this.dataTitle = dataTitle
|
||||
const dt = {
|
||||
data: [whiteColumn],
|
||||
startRows: 11,
|
||||
startCols: 6,
|
||||
minRows: 5,
|
||||
minCols: 4,
|
||||
minCols: 1,
|
||||
maxRows: 90,
|
||||
maxCols: 90,
|
||||
rowHeaders: true,
|
||||
|
@ -88,7 +84,7 @@ export default {
|
|||
methods: {
|
||||
getDataList () {
|
||||
const data = this.$refs.HTable.$data.hotInstance.getData()
|
||||
data.unshift(this.dataTitle)
|
||||
data.unshift(this.$refs.HTable.$data.hotInstance.getColHeader())
|
||||
return data
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue