Merge remote-tracking branch 'origin/main' into feature/1.6-cx

This commit is contained in:
ningyv
2025-03-06 11:31:29 +08:00
5 changed files with 24 additions and 4 deletions
@@ -894,5 +894,6 @@
"Kb8ad0af5": "There are interfaces using the current model. Please unbind them before deleting.",
"K60b54d0": "Edit (0) Model",
"Kbf48dc2d": "Are you sure you want to delete it?",
"K3d2324d0": "Deletion failed."
"K3d2324d0": "Deletion failed.",
"Kce2fcdbf": "No Permission"
}
@@ -916,5 +916,6 @@
"Kb8ad0af5": "現在のモデルを使用しているインターフェースがあります。削除する前に、まず解除してください。",
"K60b54d0": "編集 (0) モデル",
"Kbf48dc2d": "本当に削除しますか?",
"K3d2324d0": "削除に失敗しました。"
"K3d2324d0": "削除に失敗しました。",
"Kce2fcdbf": "権限がありません"
}
@@ -847,5 +847,6 @@
"Kb8ad0af5": "存在使用当前模型的接口,需要先解绑后才能删除",
"K60b54d0": "编辑 (0) 模型",
"Kbf48dc2d": "确定删除吗?",
"K3d2324d0": "删除失败"
"K3d2324d0": "删除失败",
"Kce2fcdbf": "暂无权限"
}
@@ -916,5 +916,6 @@
"Kb8ad0af5": "存在使用當前模型的介面,需先解除綁定後才能刪除。",
"K60b54d0": "編輯 (0) 模型",
"Kbf48dc2d": "確定要刪除嗎?",
"K3d2324d0": "刪除失敗。"
"K3d2324d0": "刪除失敗。",
"Kce2fcdbf": "暫無權限"
}
@@ -36,6 +36,10 @@ export const AIModelGuide = () => {
* rest 服务卡片点击事件
*/
const restCardClick = async () => {
const permission = checkAccess('system.workspace.service.edit', accessData)
if (!permission) {
return message.warning($t('暂无权限'))
}
modal.confirm({
title: $t('添加 Rest 服务'),
content: <RestAIDeploy ref={restAiDeployRef}></RestAIDeploy>,
@@ -58,6 +62,10 @@ export const AIModelGuide = () => {
* AI 模型配置弹窗
*/
const aiCardClick = () => {
const permission = checkAccess('system.devops.ai_provider.edit', accessData)
if (!permission) {
return message.warning($t('暂无权限'))
}
// 更新弹窗
const updateEntityData = (data: any) => {
entityData.current = data
@@ -130,6 +138,10 @@ export const AIModelGuide = () => {
* 本地部署 AI 并生成 API
*/
const localModelCardClick = async () => {
const permission = checkAccess('system.devops.ai_provider.edit', accessData)
if (!permission) {
return message.warning($t('暂无权限'))
}
if (!ollamaAddress) {
navigateTo('/aisetting?status=unconfigure')
return
@@ -156,6 +168,10 @@ export const AIModelGuide = () => {
}
const deployDeepSeek = async (e: any) => {
e.stopPropagation()
const permission = checkAccess('system.devops.ai_provider.edit', accessData)
if (!permission) {
return message.warning($t('暂无权限'))
}
if (!ollamaAddress) {
navigateTo('/aisetting?status=unconfigure')
return