mirror of
https://github.com/veops/cmdb.git
synced 2025-09-20 04:19:20 +08:00
feat(ui): auto-discovery pool adds refresh button
This commit is contained in:
@@ -36,7 +36,7 @@
|
|||||||
<div class="discovery-ci-header">
|
<div class="discovery-ci-header">
|
||||||
<a-input-search
|
<a-input-search
|
||||||
:placeholder="$t('cmdb.components.pleaseSearch')"
|
:placeholder="$t('cmdb.components.pleaseSearch')"
|
||||||
:style="{ width: '200px', marginRight: '20px' }"
|
:style="{ width: '200px' }"
|
||||||
@search="handleSearch"
|
@search="handleSearch"
|
||||||
allowClear
|
allowClear
|
||||||
/>
|
/>
|
||||||
@@ -46,6 +46,15 @@
|
|||||||
<span @click="batchDelete">{{ $t('delete') }}</span>
|
<span @click="batchDelete">{{ $t('delete') }}</span>
|
||||||
<span>{{ $t('cmdb.ci.selectRows', { rows: selectedCount }) }}</span>
|
<span>{{ $t('cmdb.ci.selectRows', { rows: selectedCount }) }}</span>
|
||||||
</span>
|
</span>
|
||||||
|
<a-button
|
||||||
|
type="primary"
|
||||||
|
class="ops-button-ghost"
|
||||||
|
ghost
|
||||||
|
@click="getAdc()"
|
||||||
|
>
|
||||||
|
<ops-icon type="veops-refresh" />
|
||||||
|
{{ $t('refresh') }}
|
||||||
|
</a-button>
|
||||||
<a-button
|
<a-button
|
||||||
type="primary"
|
type="primary"
|
||||||
ghost
|
ghost
|
||||||
@@ -68,6 +77,7 @@
|
|||||||
:height="tableHeight"
|
:height="tableHeight"
|
||||||
:scroll-y="{ enabled: true, gt: 50 }"
|
:scroll-y="{ enabled: true, gt: 50 }"
|
||||||
:scroll-x="{ enabled: true, gt: 0 }"
|
:scroll-x="{ enabled: true, gt: 0 }"
|
||||||
|
:loading="loading"
|
||||||
@checkbox-change="onSelectChange"
|
@checkbox-change="onSelectChange"
|
||||||
@checkbox-all="onSelectChange"
|
@checkbox-all="onSelectChange"
|
||||||
@checkbox-range-end="onSelectChange"
|
@checkbox-range-end="onSelectChange"
|
||||||
@@ -222,6 +232,7 @@ export default {
|
|||||||
logTextArray: [],
|
logTextArray: [],
|
||||||
acceptByFilters: [],
|
acceptByFilters: [],
|
||||||
selectedCount: 0,
|
selectedCount: 0,
|
||||||
|
loading: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -289,6 +300,7 @@ export default {
|
|||||||
this.$refs.xTable.getVxetableRef().clearSort()
|
this.$refs.xTable.getVxetableRef().clearSort()
|
||||||
},
|
},
|
||||||
getAdc(isInit) {
|
getAdc(isInit) {
|
||||||
|
this.loading = true
|
||||||
getAdc({
|
getAdc({
|
||||||
type_id: this.currentType,
|
type_id: this.currentType,
|
||||||
page_size: 100000,
|
page_size: 100000,
|
||||||
@@ -320,6 +332,9 @@ export default {
|
|||||||
xTable.refreshColumn()
|
xTable.refreshColumn()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
getColumns(data, attrList) {
|
getColumns(data, attrList) {
|
||||||
const width = document.getElementById('discovery-ci').clientWidth - 50
|
const width = document.getElementById('discovery-ci').clientWidth - 50
|
||||||
@@ -470,6 +485,7 @@ export default {
|
|||||||
.discovery-ci-header {
|
.discovery-ci-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
column-gap: 20px;
|
||||||
padding-top: 18px;
|
padding-top: 18px;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user