Skip to content

Commit

Permalink
resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
homiexie committed Jan 16, 2020
2 parents 487d239 + 0d82e7d commit 4b74113
Show file tree
Hide file tree
Showing 26 changed files with 1,196 additions and 1,116 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -966,15 +966,16 @@ public List<ZoneLinkDto> getAllZoneLinkGroupByIdc() {

List<CiData> zoneData = queryCiData(uiProperties.getCiTypeIdOfZone(), defaultQueryObject().addEqualsFilter("data_center", idcGuid)).getContents();
List<String> zoneList = new ArrayList<>();
for (Object zone : zoneData) {
zoneList.add(idc.getData().get(CmdbConstants.GUID).toString());
for (CiData zone : zoneData) {
zoneList.add(zone.getData().get(CmdbConstants.GUID).toString());
}
if (zoneList.size() != 0) {
List<CiData> zoneLinkData = queryCiData(uiProperties.getCiTypeIdOfZoneLink(),
defaultQueryObject()
.addInFilter("network_zone_1", zoneList)
.addInFilter("network_zone_2", zoneList)
.setFiltersRelationship("or"))
QueryRequest setFiltersRelationship = defaultQueryObject()
.addInFilter("network_zone_1", zoneList)
.addInFilter("network_zone_2", zoneList)
.setFiltersRelationship("or");
setFiltersRelationship.getDialect().setShowCiHistory(true);
List<CiData> zoneLinkData = queryCiData(uiProperties.getCiTypeIdOfZoneLink(),setFiltersRelationship)
.getContents();
result.setLinkList(zoneLinkData);
}
Expand Down
1 change: 0 additions & 1 deletion cmdb-ui/bin/npm

This file was deleted.

1 change: 0 additions & 1 deletion cmdb-ui/bin/npx

This file was deleted.

4 changes: 2 additions & 2 deletions cmdb-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
"core-js": "^2.6.11",
"d3-graphviz": "^2.6.1",
"highlight.js": "^9.15.8",
"husky": "^1.3.1",
"less-loader": "^4.1.0",
"lint-staged": "^8.1.5",
"mermaid": "^8.1.0",
"moment": "^2.24.0",
"view-design": "^4.0.2",
Expand Down Expand Up @@ -70,6 +68,8 @@
"file-loader": "^1.1.4",
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.30.1",
"husky": "^4.0.7",
"lint-staged": "^9.5.0",
"node-notifier": "^5.1.2",
"node-sass": "^4.13.0",
"optimize-css-assets-webpack-plugin": "^3.2.0",
Expand Down
98 changes: 19 additions & 79 deletions cmdb-ui/src/api/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@ if (window.request) {
put: (url, ...params) => pluginErrorMessage(window.request.put(baseURL + url, ...params))
}
}

export const getMyMenus = () => req.get('/my-menus')

// admin
export const getAllUsers = () => req.get('/admin/users')
export const getAllRoles = () => req.get('/admin/roles')
export const getAllMenus = () => req.get('/admin/menus')
export const getAllPermissionEntryPoints = () => req.get('/admin/permission-entry-points')
export const getRolesByUser = username => req.get(`/admin/users/${username}/roles`)
export const getUsersByRole = roleName => req.get(`/admin/roles/${roleName}/users`)
export const getPermissionsByRole = roleName => req.get(`/admin/roles/${roleName}/permissions`)
Expand All @@ -27,9 +24,7 @@ export const addUsersToRole = (users, roleName) => req.post(`/admin/roles/${role
export const romoveUsersFromRole = (users, roleName) => req.delete(`/admin/roles/${roleName}/users`, { data: users })
export const addMenusToRole = (menuCodes, roleName) => req.post(`/admin/roles/${roleName}/menu-permissions`, menuCodes)
export const removeMenusFromRole = (menuCodes, roleName) =>
req.delete(`/admin/roles/${roleName}/menu-permissions`, {
data: menuCodes
})
req.delete(`/admin/roles/${roleName}/menu-permissions`, { data: menuCodes })
export const addDataPermissionAction = (roleName, ciTypeId, actionCode) =>
req.post(`/admin/roles/${roleName}/citypes/${ciTypeId}/actions/${actionCode}`)
export const removeDataPermissionAction = (roleName, ciTypeId, actionCode) =>
Expand All @@ -44,22 +39,16 @@ export const deleteRoleCiTypeCtrlAttributes = (roleCitypeId, data) =>
req.post(`/admin/role-citypes/${roleCitypeId}/ctrl-attributes/delete`, data)
export const editPassword = data => req.post('/admin/users/password/change', data)
export const resetPassword = data => req.post('/admin/users/password/reset', data)

// enum
export const getEnumCodesByCategoryId = (catTypeId, catId) =>
req.get(`/enum/category-types/${catTypeId}/categories/${catId}/codes`)

export const getEnumCategoriesByTypeId = catTypeId => req.get(`/enum/category-types/${catTypeId}/categories`)

// CI
export const updateCIRecord = (ciTypeId, data) => req.put(`/ci-types/${ciTypeId}/ci-data/${data.guid}`, data)
export const getRefCiTypeFrom = id => req.get(`/ci-types/${id}/references/by`)
export const getRefCiTypeTo = id => req.get(`/ci-types/${id}/references/to`)
export const getCiTypeAttr = id => req.get(`/ci-types/${id}/attributes`)
export const getSpecialConnector = () => req.get('/static-data/special-connector')

// CI design

export const implementCiType = (id, op) => req.post(`/ci-types/${id}/implement?operation=${op}`)
export const implementCiAttr = (ciTypeId, ciAttrId, op) =>
req.post(`/ci-types/${ciTypeId}/attributes/${ciAttrId}/implement?operation=${op}`)
Expand Down Expand Up @@ -87,14 +76,12 @@ export const createNewCIType = data => req.post(`/ci-types/create`, data)
export const createNewCIAttr = (id, data) => req.post(`/ci-types/${id}/attributes/create`, data)
export const updateCIAttr = (attrId, ciTypeId, data) => req.put(`/ci-types/${ciTypeId}/attributes/${attrId}`, data)
export const applyCIAttr = (ciTypeId, attrIds) => req.post(`/ci-types/${ciTypeId}/ci-type-attributes/apply`, attrIds)

export const swapCiTypeAttributePosition = (ciTypeId, attrId, targetAttrId) => {
return req.post(`/ci-types/${ciTypeId}/attributes/${attrId}/swap-position?target-attribute-id=${targetAttrId}`)
}
export const getAllInputTypes = () => req.get('/static-data/available-ci-type-attribute-input-types')
export const getEnumByCIType = id =>
req.get(`/enum/category-types/categories/query-by-multiple-types?ci-type-id=${id}&types=common-private`)
export const getCiTypes = data => req.get(`/ci-types?${data.key}=${data.value}`)
export const getAllIdcDesignData = () => req.get(`/ci-data/all-idc-design`)
export const getIdcDesignTreeByGuid = data => req.post(`/data-tree/query-idc-design-tree`, data)
export const getAllZoneLinkDesignGroupByIdcDesign = () => req.get(`/all-zone-link-design`)
Expand All @@ -121,95 +108,48 @@ export const getApplicationFrameworkDesignDataTree = guid =>
export const getDeployCiData = (data, payload) =>
req.post(`/deploy-designs/tabs/ci-data?code-id=${data.codeId}&system-guid=${data.systemGuid}`, payload)
export const getDeployDesignTabs = () => req.get(`/deploy-designs/tabs`)
export const previewDeployGraph = data => {
return req.post(`/process/definitions/preview`, data)
}
export const getAllDeployTreesFromSystemCi = guid => req.get(`/trees/all-deploy-trees/from-system?system-guid=${guid}`)
export const startProcessInstancesWithCiDataInbatch = data => {
return req.post(`/process/inbatch/instances`, data)
}
export const startProcessInstancesWithCiDataInbatch = data => req.post(`/process/inbatch/instances`, data)
export const getApplicationDeploymentDataTree = guid => req.get(`/data-tree/application-deployment?system-guid=${guid}`)
export const queryEnumCategories = data => req.post(`/enum/categories/query`, data)
export const queryEnumCodes = (catTypeId, catId, data) =>
req.post(`/enum/category-types/${catTypeId}/categories/${catId}/codes/query`, data)

export const getTableStatus = () => req.get('/static-data/available-ci-type-table-status')

// basic data page
export const getAllSystemEnumCodes = data => {
return req.post(`/enum/system/codes`, data)
}
export const getAllSystemEnumCodes = data => req.post(`/enum/system/codes`, data)
export const getSystemCategories = () => req.get(`/enum/system-categories`)

export const getAllNonSystemEnumCodes = data => {
return req.post(`/enum/non-system/codes`, data)
}
export const getAllNonSystemEnumCodes = data => req.post(`/enum/non-system/codes`, data)
export const getNonSystemCategories = () => req.get(`/enum/non-system-categories`)

export const getEffectiveStatus = () => req.get(`/static-data/effective-status`)
export const createEnumCode = data => {
return req.post(`/enum/category-types/0/categories/${data.catId}/codes/create`, data)
}
export const updateEnumCode = data => {
return req.post(`/enum/codes/update`, data)
}
export const updateEnumCode = data => req.post(`/enum/codes/update`, data)
export const getGroupListByCodeId = id => req.get(`/enum/categories/${id}/group-list`)
export const deleteEnumCodes = data => {
return req.post(`/enum/codes/delete`, data)
}
export const queryCiData = data => {
return req.post(`/ci-types/${data.id}/ci-data/query`, data.queryObject)
}
export const deleteEnumCodes = data => req.post(`/enum/codes/delete`, data)
export const queryCiData = data => req.post(`/ci-types/${data.id}/ci-data/query`, data.queryObject)
export const queryCiDataByType = data => {
return req.post(`/ci-types/${data.id}/ci-data/query-by-type`, data.queryObject)
}
export const getCiTypeAttributes = id => {
return req.get(`/ci-types/${id}/attributes`)
}
export const deleteCiDatas = data => {
return req.post(`/ci-types/${data.id}/ci-data/batch-delete`, data.deleteData)
}
export const createCiDatas = data => {
return req.post(`/ci-types/${data.id}/ci-data/batch-create`, data.createData)
}
export const updateCiDatas = data => {
return req.post(`/ci-types/${data.id}/ci-data/batch-update`, data.updateData)
}

export const getCiTypeAttributes = id => req.get(`/ci-types/${id}/attributes`)
export const deleteCiDatas = data => req.post(`/ci-types/${data.id}/ci-data/batch-delete`, data.deleteData)
export const createCiDatas = data => req.post(`/ci-types/${data.id}/ci-data/batch-create`, data.createData)
export const updateCiDatas = data => req.post(`/ci-types/${data.id}/ci-data/batch-update`, data.updateData)
export const operateCiState = (ciTypeId, guid, op) => {
const payload = [{ ciTypeId, guid }]
return req.post(`/ci/state/operate?operation=${op}`, payload)
}

// ci integrate query
export const getQueryNames = id => {
return req.get(`/intQuery/ciType/${id}/search`)
}
export const queryIntHeader = id => {
return req.get(`/intQuery/${id}/header`)
}
export const excuteIntQuery = (id, data) => {
return req.post(`/intQuery/${id}/execute`, data)
}

export const fetchIntQueryById = (ciTypeId, queryId) => {
return req.get(`/intQuery/ciType/${ciTypeId}/${queryId}`)
}
export const saveIntQuery = (ciTypeId, queryName, data) => {
return req.post(`/intQuery/ciType/${ciTypeId}/${queryName}/save`, data)
}
export const updateIntQuery = (queryId, data) => {
return req.post(`/intQuery/${queryId}/update`, data)
}
export const deleteIntQuery = (ciTypeId, queryId) => {
return req.post(`/intQuery/ciType/${ciTypeId}/${queryId}/delete`)
}
export const getQueryNames = id => req.get(`/intQuery/ciType/${id}/search`)
export const queryIntHeader = id => req.get(`/intQuery/${id}/header`)
export const excuteIntQuery = (id, data) => req.post(`/intQuery/${id}/execute`, data)
export const fetchIntQueryById = (ciTypeId, queryId) => req.get(`/intQuery/ciType/${ciTypeId}/${queryId}`)
export const saveIntQuery = (ciTypeId, queryName, data) =>
req.post(`/intQuery/ciType/${ciTypeId}/${queryName}/save`, data)
export const updateIntQuery = (queryId, data) => req.post(`/intQuery/${queryId}/update`, data)
export const deleteIntQuery = (ciTypeId, queryId) => req.post(`/intQuery/ciType/${ciTypeId}/${queryId}/delete`)
// filterRules
export const queryReferenceEnumCodes = data => req.post(`/referenceEnumCodes/${data.attrId}/query`, data.params)
export const queryReferenceCiData = data => req.post(`/referenceCiData/${data.attrId}/query`, data.queryObject)
// log
export const queryLogHeader = () => req.get('/log/queryHeader')
export const queryLog = data => req.post('/log/query', data)

// wecube api
export const getWecubeRoles = () => window.request.get('platform/v1/roles/retrieve')
Loading

0 comments on commit 4b74113

Please sign in to comment.