From 4ffec85e9be576b799c264d547c4ea56d8b19575 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Fri, 28 Mar 2025 11:43:48 +0800 Subject: [PATCH] refactor: Optimization of operation menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1054069 --user=王孝刚 【操作日志】-操作菜单优化建议 https://www.tapd.cn/57709429/s/1677900 --- apps/application/views/application_views.py | 4 ---- apps/application/views/chat_views.py | 2 ++ apps/locales/en_US/LC_MESSAGES/django.po | 17 +++++++++++---- apps/locales/zh_CN/LC_MESSAGES/django.po | 23 ++++++++++++++------- apps/locales/zh_Hant/LC_MESSAGES/django.po | 23 ++++++++++++++------- ui/src/views/operate-log/index.vue | 11 +++++++++- 6 files changed, 57 insertions(+), 23 deletions(-) diff --git a/apps/application/views/application_views.py b/apps/application/views/application_views.py index dc7a96dac..f16041d1d 100644 --- a/apps/application/views/application_views.py +++ b/apps/application/views/application_views.py @@ -644,8 +644,6 @@ class Application(APIView): dynamic_tag=keywords.get( 'application_id'))], compare=CompareConstants.AND)) - @log(menu='Application', operate="speech to text", - get_operation_object=lambda r, k: get_application_operation_object(k.get('application_id'))) def post(self, request: Request, application_id: str): return result.success( ApplicationSerializer.Operate(data={'application_id': application_id, 'user_id': request.user.id}) @@ -668,8 +666,6 @@ class Application(APIView): dynamic_tag=keywords.get( 'application_id'))], compare=CompareConstants.AND)) - @log(menu='Application', operate="text to speech", - get_operation_object=lambda r, k: get_application_operation_object(k.get('application_id'))) def post(self, request: Request, application_id: str): byte_data = ApplicationSerializer.Operate( data={'application_id': application_id, 'user_id': request.user.id}).text_to_speech( diff --git a/apps/application/views/chat_views.py b/apps/application/views/chat_views.py index 8e5ffe509..25b493fdf 100644 --- a/apps/application/views/chat_views.py +++ b/apps/application/views/chat_views.py @@ -60,6 +60,8 @@ class ChatView(APIView): [lambda r, keywords: Permission(group=Group.APPLICATION, operate=Operate.USE, dynamic_tag=keywords.get('application_id'))]) ) + @log(menu='Conversation Log', operate="Export conversation", + get_operation_object=lambda r, k: get_application_operation_object(k.get('application_id'))) def post(self, request: Request, application_id: str): return ChatSerializers.Query( data={**query_params_to_single_dict(request.query_params), 'application_id': application_id, diff --git a/apps/locales/en_US/LC_MESSAGES/django.po b/apps/locales/en_US/LC_MESSAGES/django.po index a31eff157..faf837bf7 100644 --- a/apps/locales/en_US/LC_MESSAGES/django.po +++ b/apps/locales/en_US/LC_MESSAGES/django.po @@ -234,7 +234,7 @@ msgstr "" #: apps/xpack/serializers/channel/chat_manage.py:298 msgid "Thinking, please wait a moment!" -msgstr "" +msgstr "Thinking, please wait a moment......" #: apps/xpack/serializers/channel/ding_talk.py:19 #: apps/xpack/serializers/channel/wechat.py:89 @@ -1210,7 +1210,7 @@ msgstr "Details" #: apps/xpack/views/application_setting_views.py:23 #| msgid "Modification time" msgid "Modify Application Settings" -msgstr "" +msgstr "Modify Application Display Settings" #: apps/xpack/views/application_setting_views.py:24 #: apps/xpack/views/application_setting_views.py:40 @@ -4478,7 +4478,7 @@ msgstr "" #: community/apps/dataset/views/dataset.py:184 #: community/apps/dataset/views/dataset.py:185 msgid "Export knowledge base containing images" -msgstr "" +msgstr "Export ZIP Knowledge Base" #: community/apps/dataset/views/dataset.py:199 msgid "Delete knowledge base" @@ -7448,7 +7448,7 @@ msgid "Operate Time" msgstr "Operate time" msgid "System Settings/API Key" -msgstr "System Settings/API Key" +msgstr "System API Key" msgid "Appearance Settings" msgstr "Appearance Settings" @@ -7463,4 +7463,13 @@ msgid "Paragraph" msgstr "" msgid "Batch generate related" +msgstr "Paragraph generate related problems" + +msgid "Application access" +msgstr "" + +msgid "Add internal function" +msgstr "" + +msgid "Batch generate related documents" msgstr "Batch generate related problems" \ No newline at end of file diff --git a/apps/locales/zh_CN/LC_MESSAGES/django.po b/apps/locales/zh_CN/LC_MESSAGES/django.po index 76e6b9977..a707090d7 100644 --- a/apps/locales/zh_CN/LC_MESSAGES/django.po +++ b/apps/locales/zh_CN/LC_MESSAGES/django.po @@ -234,7 +234,7 @@ msgstr "AI 回复: " #: apps/xpack/serializers/channel/chat_manage.py:298 msgid "Thinking, please wait a moment!" -msgstr "正在思考中,请稍后!" +msgstr "正在思考中,请稍后......" #: apps/xpack/serializers/channel/ding_talk.py:19 #: apps/xpack/serializers/channel/wechat.py:89 @@ -1229,7 +1229,7 @@ msgstr "详情" #: apps/xpack/views/application_setting_views.py:23 #| msgid "Pro/Modify Application Settings" msgid "Modify Application Settings" -msgstr "修改应用设置" +msgstr "修改应用显示设置" #: apps/xpack/views/application_setting_views.py:24 #: apps/xpack/views/application_setting_views.py:40 @@ -4515,7 +4515,7 @@ msgstr "导出知识库" #: community/apps/dataset/views/dataset.py:184 #: community/apps/dataset/views/dataset.py:185 msgid "Export knowledge base containing images" -msgstr "导出包含图片的知识库" +msgstr "导出ZIP知识库" #: community/apps/dataset/views/dataset.py:199 msgid "Delete knowledge base" @@ -4606,12 +4606,12 @@ msgstr "批量取消任务" #: community/apps/dataset/views/document.py:279 #: community/apps/dataset/views/document.py:280 msgid "Refresh document vector library" -msgstr "刷新文档向量库" +msgstr "文档向量化" #: community/apps/dataset/views/document.py:300 #: community/apps/dataset/views/document.py:301 msgid "Batch refresh document vector library" -msgstr "批量刷新文档向量库" +msgstr "批量文档向量化" #: community/apps/dataset/views/document.py:319 #: community/apps/dataset/views/document.py:320 @@ -7611,7 +7611,7 @@ msgid "Operate Time" msgstr "操作时间" msgid "System Settings/API Key" -msgstr "系统设置/API Key" +msgstr "系统 API Key" msgid "Appearance Settings" msgstr "外观设置" @@ -7626,4 +7626,13 @@ msgid "Paragraph" msgstr "段落" msgid "Batch generate related" -msgstr "批量生成相关问题" \ No newline at end of file +msgstr "分段生成问题" + +msgid "Application access" +msgstr "应用接入" + +msgid "Add internal function" +msgstr "添加内部函数" + +msgid "Batch generate related documents" +msgstr "批量生成问题" diff --git a/apps/locales/zh_Hant/LC_MESSAGES/django.po b/apps/locales/zh_Hant/LC_MESSAGES/django.po index 0a7373636..e3100d0a7 100644 --- a/apps/locales/zh_Hant/LC_MESSAGES/django.po +++ b/apps/locales/zh_Hant/LC_MESSAGES/django.po @@ -235,7 +235,7 @@ msgstr "AI 回覆: " #: apps/xpack/serializers/channel/chat_manage.py:298 msgid "Thinking, please wait a moment!" -msgstr "正在思考,請稍等!" +msgstr "正在思考中,請稍等......" #: apps/xpack/serializers/channel/ding_talk.py:19 #: apps/xpack/serializers/channel/wechat.py:89 @@ -1231,7 +1231,7 @@ msgstr "詳情" #: apps/xpack/views/application_setting_views.py:23 #| msgid "Pro/Modify Application Settings" msgid "Modify Application Settings" -msgstr "修改應用設置" +msgstr "修改應用显示設置" #: apps/xpack/views/application_setting_views.py:24 #: apps/xpack/views/application_setting_views.py:40 @@ -4524,7 +4524,7 @@ msgstr "導出知識庫" #: community/apps/dataset/views/dataset.py:184 #: community/apps/dataset/views/dataset.py:185 msgid "Export knowledge base containing images" -msgstr "導出包含圖片的知識庫" +msgstr "導出ZIP知識庫" #: community/apps/dataset/views/dataset.py:199 msgid "Delete knowledge base" @@ -4615,12 +4615,12 @@ msgstr "批量取消任務" #: community/apps/dataset/views/document.py:279 #: community/apps/dataset/views/document.py:280 msgid "Refresh document vector library" -msgstr "刷新文檔向量庫" +msgstr "文檔向量化" #: community/apps/dataset/views/document.py:300 #: community/apps/dataset/views/document.py:301 msgid "Batch refresh document vector library" -msgstr "批量刷新文檔向量庫" +msgstr "批量文檔向量化" #: community/apps/dataset/views/document.py:319 #: community/apps/dataset/views/document.py:320 @@ -7621,7 +7621,7 @@ msgid "Operate Time" msgstr "操作時間" msgid "System Settings/API Key" -msgstr "系統設置/API Key" +msgstr "系統 API Key" msgid "Appearance Settings" msgstr "外觀設置" @@ -7636,4 +7636,13 @@ msgid "Paragraph" msgstr "段落" msgid "Batch generate related" -msgstr "批量生成相關问题" \ No newline at end of file +msgstr "分段生成问题" + +msgid "Application access" +msgstr "應用接入" + +msgid "Add internal function" +msgstr "添加內部函數" + +msgid "Batch generate related documents" +msgstr "批量生成问题" \ No newline at end of file diff --git a/ui/src/views/operate-log/index.vue b/ui/src/views/operate-log/index.vue index 10ce24450..dc2503cfe 100644 --- a/ui/src/views/operate-log/index.vue +++ b/ui/src/views/operate-log/index.vue @@ -129,7 +129,16 @@ - + + +