Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/daas/src/i18n/langs/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ export default {
application_true: 'Yes',
application_false: 'No',
application_create: 'Create a client',
application_client_id_placeholder: 'Can be left empty, system will auto-generate',
//api 监控
api_monitor_total_totalCount: 'Total number of APIs',
api_monitor_total_warningApiCount: 'Total API Access',
Expand Down
1 change: 1 addition & 0 deletions apps/daas/src/i18n/langs/zh-CN.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ export default {
application_true: '是',
application_false: '否',
application_create: '创建客户端',
application_client_id_placeholder: '可留空,系统将自动生成',
//api 监控
api_monitor_total_totalCount: 'API总数',
api_monitor_total_warningApiCount: 'API访问总数',
Expand Down
1 change: 1 addition & 0 deletions apps/daas/src/i18n/langs/zh-TW.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ export default {
application_true: '是',
application_false: '否',
application_create: '創建客戶端',
application_client_id_placeholder: '可留空,系統將自動生成',
//api 监控
api_monitor_total_totalCount: 'API總數',
api_monitor_total_warningApiCount: 'API訪問總數',
Expand Down
10 changes: 10 additions & 0 deletions apps/daas/src/views/api-page/Applications.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@
<ElFormItem :label="$t('application_header_client_name')" required prop="clientName">
<ElInput v-model="createForm.clientName"></ElInput>
</ElFormItem>
<ElFormItem :label="$t('application_header_id')" prop="clientId">
<ElInput v-model="createForm.clientId" size="mini" :placeholder="$t('application_client_id_placeholder')"></ElInput>
</ElFormItem>
<ElFormItem :label="$t('application_header_grant_type')" required prop="grantTypes">
<ElSelect v-model="createForm.grantTypes" multiple>
<ElOption label="Implicit" value="implicit"></ElOption>
Expand Down Expand Up @@ -159,6 +162,7 @@ export default {
roles: [],
createForm: {
clientName: '',
clientId: '',
grantTypes: [],
clientSecret: '',
scopes: [],
Expand Down Expand Up @@ -195,6 +199,7 @@ export default {
})
this.createForm = {
clientName: '',
clientId: '',
grantTypes: ['implicit', 'client_credentials'],
clientSecret: '',
scopes: [],
Expand Down Expand Up @@ -239,6 +244,11 @@ export default {
params.redirectUris = params.redirectUrisStr?.split(',') || []
delete params['redirectUrisStr']

// 如果clientId为空,则不传递该字段
if (!params.clientId || params.clientId.trim() === '') {
delete params['clientId']
}

this.$refs.form.validate((valid) => {
if (valid) {
applicationApi[method](params).then(() => {
Expand Down
Loading