mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-25 14:25:23 +00:00
perf: 优化同步
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
<template>
|
||||
<GenericCreateUpdatePage
|
||||
v-bind="$data"
|
||||
/>
|
||||
<GenericCreateUpdatePage v-bind="$data" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<GenericListTable :table-config="tableConfig" :header-actions="headerActions" />
|
||||
<GenericListTable :header-actions="headerActions" :table-config="tableConfig" />
|
||||
</template>
|
||||
|
||||
<script type="text/jsx">
|
||||
@@ -19,7 +19,10 @@ export default {
|
||||
app: 'xpack',
|
||||
resource: 'strategy'
|
||||
},
|
||||
columns: ['name', 'priority', 'strategy_rules', 'strategy_actions', 'actions', 'user_actions'],
|
||||
columns: [
|
||||
'name', 'priority', 'strategy_rules',
|
||||
'strategy_actions', 'actions', 'user_actions'
|
||||
],
|
||||
columnsMeta: {
|
||||
name: {
|
||||
formatter: DetailFormatter,
|
||||
|
@@ -24,8 +24,11 @@ export default {
|
||||
fields: [
|
||||
[this.$t('common.Basic'), ['name']],
|
||||
[this.$t('xpack.Cloud.CloudSource'), ['account', 'regions']],
|
||||
[this.$t('xpack.Cloud.SaveSetting'), ['hostname_strategy', 'ip_network_segment_group', 'sync_ip_type', 'is_always_update']],
|
||||
[this.$t('common.Strategy'), ['strategy']],
|
||||
[this.$t('xpack.Cloud.SaveSetting'), [
|
||||
'hostname_strategy', 'ip_network_segment_group',
|
||||
'sync_ip_type', 'is_always_update'
|
||||
]],
|
||||
[this.$t('common.Actions'), ['strategy']],
|
||||
[this.$t('xpack.Timer'), ['is_periodic', 'crontab', 'interval']],
|
||||
[this.$t('common.Other'), ['comment']]
|
||||
],
|
||||
|
@@ -1,14 +1,16 @@
|
||||
<template>
|
||||
<Dialog
|
||||
:close-on-click-modal="false"
|
||||
:destroy-on-close="true"
|
||||
:show-buttons="false"
|
||||
:close-on-click-modal="false"
|
||||
:title="$tc('common.Strategy')"
|
||||
width="80%"
|
||||
v-bind="$attrs"
|
||||
width="80%"
|
||||
v-on="$listeners"
|
||||
>
|
||||
<GenericCreateUpdateForm v-bind="$data" />
|
||||
<IBox>
|
||||
<GenericCreateUpdateForm v-bind="$data" />
|
||||
</IBox>
|
||||
</Dialog>
|
||||
</template>
|
||||
|
||||
@@ -17,10 +19,11 @@ import GenericCreateUpdateForm from '@/layout/components/GenericCreateUpdateForm
|
||||
import Dialog from '@/components/Dialog/index.vue'
|
||||
import RuleInput from '@/views/assets/Cloud/Strategy/components/RuleInput'
|
||||
import ActionInput from '@/views/assets/Cloud/Strategy/components/ActionInput'
|
||||
import IBox from '@/components/IBox/index.vue'
|
||||
|
||||
export default {
|
||||
name: 'AttrDialog',
|
||||
components: { Dialog, GenericCreateUpdateForm },
|
||||
components: { Dialog, GenericCreateUpdateForm, IBox },
|
||||
props: {
|
||||
value: {
|
||||
type: Object,
|
||||
|
@@ -4,12 +4,14 @@
|
||||
<DataTable :config="tableConfig" />
|
||||
<AttrDialog
|
||||
v-if="visible"
|
||||
:table-config="tableConfig"
|
||||
:value="attrValue"
|
||||
:visible.sync="visible"
|
||||
:table-config="tableConfig"
|
||||
@confirm="onAttrDialogConfirm"
|
||||
/>
|
||||
<el-button type="primary" size="mini" @click="handleCreate">{{ this.$t('common.New') }}</el-button>
|
||||
<el-button size="mini" type="primary" @click="handleCreate">
|
||||
{{ this.$t('common.New') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -73,7 +75,10 @@ export default {
|
||||
ajax: {
|
||||
transformOption: (item) => {
|
||||
this.strategy[item.id] = {
|
||||
name: item.name, priority: item.priority, strategy_rules: item.strategy_rules, strategy_actions: item.strategy_actions
|
||||
name: item.name,
|
||||
priority: item.priority,
|
||||
strategy_rules: item.strategy_rules,
|
||||
strategy_actions: item.strategy_actions
|
||||
}
|
||||
return { label: item.name, value: item.id }
|
||||
}
|
||||
|
Reference in New Issue
Block a user