Skip to content

Commit c791b9d

Browse files
committed
fix(ui): ci details - remove unused ITSM requests
1 parent b614808 commit c791b9d

4 files changed

Lines changed: 24 additions & 258 deletions

File tree

cmdb-ui/src/modules/cmdb/api/history.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -58,23 +58,6 @@ export function getCiTriggersByCiId(ci_id, params) {
5858
})
5959
}
6060

61-
export function getCiRelatedTickets(params) {
62-
return axios({
63-
url: `/itsm/v1/process_ticket/get_tickets_by`,
64-
method: 'POST',
65-
data: params,
66-
isShowMessage: false
67-
})
68-
}
69-
70-
export function judgeItsmInstalled() {
71-
return axios({
72-
url: `/itsm/v1/process_ticket/itsm_existed`,
73-
method: 'GET',
74-
isShowMessage: false
75-
})
76-
}
77-
7861
export function getCIsBaseline(params) {
7962
return axios({
8063
url: `/v0.1/ci/baseline`,
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<template>
2+
<a-empty
3+
:image-style="{
4+
height: '200px',
5+
}"
6+
:style="{ paddingTop: '10%' }"
7+
>
8+
<img slot="image" :src="require('@/modules/cmdb/assets/itsm_uninstalled.png')" />
9+
<span slot="description"> {{ $t('cmdb.history.itsmUninstalled') }} </span>
10+
<a-button href="https://veops.cn/apply" target="_blank" type="primary">
11+
{{ $t('cmdb.history.applyItsm') }}
12+
</a-button>
13+
</a-empty>
14+
</template>
15+
16+
<script>
17+
export default {
18+
name: 'RelatedItsm',
19+
}
20+
</script>

cmdb-ui/src/modules/cmdb/views/ci/modules/ciDetailRelatedItsmTable.vue

Lines changed: 0 additions & 225 deletions
This file was deleted.

cmdb-ui/src/modules/cmdb/views/ci/modules/ciDetailTab.vue

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@
189189
<a-tab-pane key="tab_5">
190190
<span slot="tab"><ops-icon type="itsm-association" />{{ $t('cmdb.ci.relITSM') }}</span>
191191
<div :style="{ padding: '24px', height: '100%' }">
192-
<RelatedItsmTable ref="relatedITSMTable" :ci_id="ci._id" :ciHistory="ciHistory" :itsmInstalled="itsmInstalled" :attrList="attrList" />
192+
<RelatedItsm ref="relatedITSM" />
193193
</div>
194194
</a-tab-pane>
195195
</a-tabs>
@@ -209,7 +209,7 @@
209209
<script>
210210
import _ from 'lodash'
211211
import { getCITypeGroupById, getCITypes } from '@/modules/cmdb/api/CIType'
212-
import { getCIHistory, judgeItsmInstalled } from '@/modules/cmdb/api/history'
212+
import { getCIHistory } from '@/modules/cmdb/api/history'
213213
import { getCIById, searchCI } from '@/modules/cmdb/api/ci'
214214
215215
import RelationMixin from './ciDetailMixin/relationMixin.js'
@@ -220,7 +220,7 @@ import CIDetailAttrContent from './ciDetailAttrContent.vue'
220220
import CIRelationTable from './ciDetailComponent/ciRelationTable.vue'
221221
import CIDetailRelation from './ciDetailRelation.vue'
222222
import TriggerTable from '../../operation_history/modules/triggerTable.vue'
223-
import RelatedItsmTable from './ciDetailRelatedItsmTable.vue'
223+
import RelatedItsm from './ciDetailRelatedItsm.vue'
224224
import CIRollbackForm from './ciRollbackForm.vue'
225225
import OperateTypeTag from '../../operation_history/components/OperateTypeTag.vue'
226226
@@ -231,7 +231,7 @@ export default {
231231
CIDetailAttrContent,
232232
CIDetailRelation,
233233
TriggerTable,
234-
RelatedItsmTable,
234+
RelatedItsm,
235235
CIRollbackForm,
236236
CIDetailTitle,
237237
CIDetailTableTitle,
@@ -263,7 +263,6 @@ export default {
263263
ciId: null,
264264
ci_types: [],
265265
hasPermission: true,
266-
itsmInstalled: true,
267266
tableHeight: this.attributeHistoryTableHeight || (this.$store.state.windowHeight - 130),
268267
initQueryLoading: true,
269268
ciHistoryStatsList: [
@@ -334,7 +333,6 @@ export default {
334333
this.ciId = ciId
335334
336335
await this.getCI()
337-
await this.judgeItsmInstalled()
338336
if (this.hasPermission) {
339337
this.getAttributes()
340338
this.getCIHistory()
@@ -430,16 +428,6 @@ export default {
430428
this.hasPermission = false
431429
}
432430
})
433-
.catch((e) => {
434-
if (e.response.status === 404) {
435-
this.itsmInstalled = false
436-
}
437-
})
438-
},
439-
async judgeItsmInstalled() {
440-
await judgeItsmInstalled().catch((e) => {
441-
this.itsmInstalled = false
442-
})
443431
},
444432
445433
getCIHistory() {

0 commit comments

Comments
 (0)