diff --git a/dbm-ui/frontend/src/components/db-member-selector/index.vue b/dbm-ui/frontend/src/components/db-member-selector/index.vue index b4fe4867c1..d0188e148d 100644 --- a/dbm-ui/frontend/src/components/db-member-selector/index.vue +++ b/dbm-ui/frontend/src/components/db-member-selector/index.vue @@ -166,7 +166,7 @@ display: none; width: 20px; height: 20px; - margin-top: -15px; + margin-top: -10px; font-size: 12px; line-height: 20px; color: #979ba5; diff --git a/dbm-ui/frontend/src/components/render-table/columns/input/index.vue b/dbm-ui/frontend/src/components/render-table/columns/input/index.vue index 89605fff0c..2ebb74f831 100644 --- a/dbm-ui/frontend/src/components/render-table/columns/input/index.vue +++ b/dbm-ui/frontend/src/components/render-table/columns/input/index.vue @@ -22,6 +22,7 @@ 'is-clearable': clearable, }"> (), { + autoFocus: false, placeholder: '请输入', rules: undefined, disabled: false, @@ -109,6 +112,7 @@ }); const rootRef = ref(); + const inputRef = ref(); const isBlur = ref(true); const isPassword = computed(() => props.type === 'password'); @@ -216,6 +220,12 @@ window.changeConfirm = true; }; + onMounted(() => { + if (props.autoFocus) { + inputRef.value.focus(); + } + }); + defineExpose({ getValue() { return validator(modelValue.value) diff --git a/dbm-ui/frontend/src/locales/en.json b/dbm-ui/frontend/src/locales/en.json index b36c179bc5..a807753fc4 100644 --- a/dbm-ui/frontend/src/locales/en.json +++ b/dbm-ui/frontend/src/locales/en.json @@ -1655,5 +1655,6 @@ "Mongo分片集群": "", "sqlserver单节点版": "", "sqlserver主从版": "", + "排除业务": "", "这行勿动!新增翻译请在上一行添加!": "" } diff --git a/dbm-ui/frontend/src/locales/zh-cn.json b/dbm-ui/frontend/src/locales/zh-cn.json index d6a9f6fd0e..fdfe956c43 100644 --- a/dbm-ui/frontend/src/locales/zh-cn.json +++ b/dbm-ui/frontend/src/locales/zh-cn.json @@ -3889,5 +3889,6 @@ "1. 群聊添加群机器人: 蓝鲸审批助手": "1. 群聊添加群机器人: 蓝鲸审批助手", "2. 手动蓝鲸审批助手,获取会话ID": "2. 手动 {'@'}蓝鲸审批助手,获取会话ID", "3. 将获取到的会话ID粘贴到输入框,多个会话ID使用逗号分隔": "3. 将获取到的会话ID粘贴到输入框,多个会话ID使用逗号分隔", + "排除业务": "排除业务", "这行勿动!新增翻译请在上一行添加!": "" } diff --git a/dbm-ui/frontend/src/services/model/monitor/duty-rule.ts b/dbm-ui/frontend/src/services/model/monitor/duty-rule.ts index 2379865017..480f8eea5b 100644 --- a/dbm-ui/frontend/src/services/model/monitor/duty-rule.ts +++ b/dbm-ui/frontend/src/services/model/monitor/duty-rule.ts @@ -30,6 +30,20 @@ export interface DutyCustomItem { } export default class DutyRule { + biz_config: { + exclude?: number[]; + include?: number[]; + }; + biz_config_display: { + exclude?: { + bk_biz_id: number; + bk_biz_name: string; + }[]; + include?: { + bk_biz_id: number; + bk_biz_name: string; + }[]; + }; category: string; creator: string; create_at: string; @@ -52,16 +66,18 @@ export default class DutyRule { update_at: string; constructor(payload = {} as DutyRule) { - this.id = payload.id; + this.biz_config = payload.biz_config; + this.biz_config_display = payload.biz_config_display; this.creator = payload.creator; this.create_at = payload.create_at; this.category = payload.category; this.db_type = payload.db_type; this.duty_arranges = payload.duty_arranges; this.effective_time = payload.effective_time; + this.end_time = payload.end_time; + this.id = payload.id; this.is_enabled = payload.is_enabled; this.is_show_edit = false; - this.end_time = payload.end_time; this.name = payload.name; this.permission = payload.permission; this.priority = payload.priority; diff --git a/dbm-ui/frontend/src/views/duty-rule-manage/index/components/content/Index.vue b/dbm-ui/frontend/src/views/duty-rule-manage/index/components/content/Index.vue index 06f633e5ca..026c335fca 100644 --- a/dbm-ui/frontend/src/views/duty-rule-manage/index/components/content/Index.vue +++ b/dbm-ui/frontend/src/views/duty-rule-manage/index/components/content/Index.vue @@ -156,7 +156,7 @@ { label: t('状态'), field: 'status', - minWidth: 150, + width: 120, render: ({ data }: {data: DutyRuleModel}) => { const { label, theme } = statusMap[data.status as RuleStatus]; return {label}; @@ -189,6 +189,7 @@ resource={props.activeDbType}> { + if (data.biz_config_display.include) { + return data.biz_config_display.include.map((biz) => biz.bk_biz_name).join(' , ') + } + if (data.biz_config_display.exclude) { + return `${t('全部业务')} (${t('排除业务')} : ${data.biz_config_display.exclude.map((biz) => biz.bk_biz_name).join(' , ')}) ` + } + return t('全部业务') + }, + }, { label: t('轮值表'), field: 'duty_arranges', showOverflowTooltip: false, - width: 250, + width: 280, render: ({ data }: {data: DutyRuleModel}) => { let title = ''; if (data.status in statusMap) { @@ -331,7 +346,7 @@ fixed: 'right', showOverflowTooltip: false, field: '', - width: 180, + width: 120, render: ({ data }: {data: DutyRuleModel}) => (
{ let tag = null; const today = dayjs(new Date()).format('YYYY-MM-DD'); @@ -104,7 +104,7 @@ label: t('时段'), field: 'timeRange', showOverflowTooltip: true, - width: 200, + minWidth: 200, render: ({ data }: {data: RowData}) => data.timeRange.join(' , '), }, { diff --git a/dbm-ui/frontend/src/views/duty-rule-manage/index/components/edit-rule/CustomRotate.vue b/dbm-ui/frontend/src/views/duty-rule-manage/index/components/edit-rule/CustomRotate.vue index 6141a31406..b2e2e120cf 100644 --- a/dbm-ui/frontend/src/views/duty-rule-manage/index/components/edit-rule/CustomRotate.vue +++ b/dbm-ui/frontend/src/views/duty-rule-manage/index/components/edit-rule/CustomRotate.vue @@ -12,20 +12,34 @@ --> +