Skip to content

Commit

Permalink
chore: merge from master
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzhw8 committed Sep 12, 2023
2 parents 8a37f79 + 31c2031 commit 3241d0f
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 1 deletion.
4 changes: 4 additions & 0 deletions dbm-ui/backend/ticket/builders/kafka/kafka_apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class KafkaApplyDetailSerializer(BigDataApplyDetailsSerializer):
"port": 9200,
"password": "password",
"partition_num": 2,
"no_security": 0,
"nodes": {
"zookeeper": [
{
Expand Down Expand Up @@ -70,6 +71,9 @@ class KafkaApplyDetailSerializer(BigDataApplyDetailsSerializer):
}
"""

no_security = serializers.IntegerField(
help_text=_("无认证开关, 1表示无认证。0表示认证,默认0"), min_value=0, max_value=1, required=False, default=0
)
replication_num = serializers.IntegerField(
help_text=_("副本数量"),
)
Expand Down
3 changes: 3 additions & 0 deletions dbm-ui/frontend/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1410,6 +1410,9 @@
"扩容任务进行中": "The expansion task is in progress",
"实例重启任务进行中": "The instance restart task is in progress",
"启用任务进行中": "Enable task in progress",
"不开启": "Off",
"开启": "On",
"开启认证": "Turn on authentication",
"删除任务进行中": "Delete task in progress",
"管理": "Manage",
"输入需符合正则_regx": "The input must conform to the regular pattern: {regx}",
Expand Down
5 changes: 4 additions & 1 deletion dbm-ui/frontend/src/locales/zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -1416,6 +1416,9 @@
"启用任务进行中": "启用任务进行中",
"禁用任务进行中": "禁用任务进行中",
"删除任务进行中": "删除任务进行中",
"开启认证": "开启认证",
"开启": "开启",
"不开启": "不开启",
"实例重启任务进行中": "实例重启任务进行中",
"挂载点name重复": "挂载点({name})重复",
"Proxy规格": "Proxy 规格",
Expand Down Expand Up @@ -2055,4 +2058,4 @@
"主机将被落到空闲机,如需要可再次导入": "主机将被落到空闲机,如需要可再次导入",
"保存并执行": "保存并执行",
"这行勿动!新增翻译请在上一行添加!": ""
}
}
10 changes: 10 additions & 0 deletions dbm-ui/frontend/src/views/kafka-manage/apply/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,15 @@
{{ $t('需小于等于broker数量') }}
</span>
</BkFormItem>
<BkFormItem
:label="$t('开启认证')"
property="no_security">
<BkCheckbox
v-model="formData.details.no_security"
:false-label="1"
style="vertical-align: middle;"
:true-label="0" />
</BkFormItem>
<BkFormItem
:label="$t('备注')"
property="remark">
Expand Down Expand Up @@ -353,6 +362,7 @@
partition_num: 1,
retention_hours: 1,
replication_num: 1,
no_security: 0,
},
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@
</span>
</div>
</template>
<div class="ticket-details__item">
<span class="ticket-details__item-label">{{ $t('开启认证') }}:</span>
<span
v-overflow-tips
class="ticket-details__item-value">{{ security }}</span>
</div>
<div class="ticket-details__item">
<span class="ticket-details__item-label">{{ $t('备注') }}:</span>
<span
Expand Down Expand Up @@ -151,6 +157,7 @@

const zookeeperSpec = computed(() => props.ticketDetails?.details?.resource_spec?.zookeeper || {});
const brokerSpec = computed(() => props.ticketDetails?.details?.resource_spec?.broker || {});
const security = computed(() => (props.ticketDetails?.no_security === 0 ? t('开启') : t('不开启')));

/**
* 获取服务器数量
Expand Down

0 comments on commit 3241d0f

Please sign in to comment.