This is an automated email from the ASF dual-hosted git repository. xxyu pushed a commit to branch kylin5 in repository https://gitbox.apache.org/repos/asf/kylin.git
commit dedbb2403143a81947a9af484c12964c6deca7ad Author: Qian Xia <lauraxiaq...@gmail.com> AuthorDate: Wed Apr 12 18:19:19 2023 +0800 KYLIN-5510 support modify the model description --- .../studio/StudioModel/ModelList/ModelRenameModal/locales.js | 3 ++- .../studio/StudioModel/ModelList/ModelRenameModal/rename.vue | 10 ++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/kystudio/src/components/studio/StudioModel/ModelList/ModelRenameModal/locales.js b/kystudio/src/components/studio/StudioModel/ModelList/ModelRenameModal/locales.js index 8f0372bd3f..e9c83d4a7b 100644 --- a/kystudio/src/components/studio/StudioModel/ModelList/ModelRenameModal/locales.js +++ b/kystudio/src/components/studio/StudioModel/ModelList/ModelRenameModal/locales.js @@ -2,6 +2,7 @@ export default { 'en': { modelRename: 'Model Rename', modelName: 'New Name', - updateSuccessful: 'Successfully updated the model name' + updateSuccessful: 'Successfully updated', + modelDescription: 'Description' } } diff --git a/kystudio/src/components/studio/StudioModel/ModelList/ModelRenameModal/rename.vue b/kystudio/src/components/studio/StudioModel/ModelList/ModelRenameModal/rename.vue index 0ddfcd9bf4..c837b82dc0 100644 --- a/kystudio/src/components/studio/StudioModel/ModelList/ModelRenameModal/rename.vue +++ b/kystudio/src/components/studio/StudioModel/ModelList/ModelRenameModal/rename.vue @@ -5,6 +5,9 @@ <el-form-item :label="$t('modelName')" prop="newName"> <el-input v-focus="isShow" v-model="modelEdit.newName" auto-complete="off" size="medium"></el-input> </el-form-item> + <el-form-item :label="$t('modelDescription')" prop="description"> + <el-input type="textarea" v-model.trim="modelEdit.description"></el-input> + </el-form-item> </el-form> <div slot="footer" class="dialog-footer ky-no-br-space"> <el-button @click="closeModal" size="medium">{{$t('kylinLang.common.cancel')}}</el-button> @@ -51,7 +54,8 @@ export default class ModelRenameModal extends Vue { btnLoading = false modelEdit = { - newName: '' + newName: '', + description: '' } rules = { newName: [ @@ -61,6 +65,7 @@ @Watch('modelDesc') initModelName () { this.modelEdit.newName = this.modelDesc.alias + this.modelEdit.description = this.modelDesc.description } checkName (rule, value, callback) { if (!NamedRegex.test(value)) { @@ -77,6 +82,7 @@ setTimeout(() => { this.callback && this.callback({isSubmit, newName: name}) this.modelEdit.newName = '' + this.modelEdit.description = '' this.resetModalForm() }, 200) } @@ -84,7 +90,7 @@ this.$refs.renameForm.validate((valid) => { if (!valid) { return } this.btnLoading = true - this.renameModel({model: this.modelDesc.uuid, new_model_name: this.modelEdit.newName, project: this.currentSelectedProject}).then(() => { + this.renameModel({model: this.modelDesc.uuid, new_model_name: this.modelEdit.newName, description: this.modelEdit.description, project: this.currentSelectedProject}).then(() => { this.btnLoading = false kylinMessage(this.$t('updateSuccessful')) this.closeModal(true, this.modelEdit.newName)