Skip to content

Commit f05598f

Browse files
committed
feat(System Management): Supports system variables
1 parent 4df0953 commit f05598f

File tree

7 files changed

+843
-3
lines changed

7 files changed

+843
-3
lines changed

frontend/src/api/variables.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { request } from '@/utils/request'
2+
3+
export const variablesApi = {
4+
save: (data: any) => request.post('/sys_variable/save', data),
5+
listAll: () => request.post('/sys_variable/listAll'),
6+
listPage: (pageNum: any, pageSize: any, data: any) =>
7+
request.post(`/sys_variable/listPage/${pageNum}/${pageSize}`, data),
8+
delete: (data: any) => request.post(`/sys_variable/delete`, data),
9+
}

frontend/src/i18n/en.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,23 @@
77
"AI Model Configuration": "AI Model Config",
88
"Details": "Details"
99
},
10+
"variables": {
11+
"system_variables": "System Variables",
12+
"system": "System",
13+
"search_variables": "Search Variables",
14+
"add_variable": "Add Variable",
15+
"variable_name": "Variable Name",
16+
"variable_type": "Variable Type",
17+
"variable_value": "Variable Value",
18+
"edit_variable": "Edit Variable",
19+
"no_variables_yet": "No Variables Yet",
20+
"please_enter_value": "Please Enter Value",
21+
"date": "Date",
22+
"start_date": "Start Date",
23+
"end_date": "End Date",
24+
"enter_variable_name": "Please Enter Variable Name",
25+
"enter_variable_value": "Please Enter Variable Value"
26+
},
1027
"parameter": {
1128
"export_notes": "Export notes",
1229
"import_notes": "Import notes",
@@ -868,4 +885,4 @@
868885
"to_doc": "View API",
869886
"trigger_limit": "Supports up to {0} API Keys"
870887
}
871-
}
888+
}

frontend/src/i18n/ko-KR.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,23 @@
77
"AI Model Configuration": "모델 구성",
88
"Details": "세부"
99
},
10+
"variables": {
11+
"system_variables": "시스템 변수",
12+
"system": "체계",
13+
"search_variables": "변수 검색",
14+
"add_variable": "변수 추가",
15+
"variable_name": "변수 이름",
16+
"variable_type": "변수 유형",
17+
"variable_value": "변수 값",
18+
"edit_variable": "변수 편집",
19+
"no_variables_yet": "아직 변수가 없습니다",
20+
"please_enter_value": "값을 입력하세요",
21+
"date": "날짜",
22+
"start_date": "시작일",
23+
"end_date": "종료일",
24+
"enter_variable_name": "변수 이름을 입력하세요",
25+
"enter_variable_value": "변수 값을 입력하세요"
26+
},
1027
"parameter": {
1128
"export_notes": "수출 참고사항",
1229
"import_notes": "수입 참고사항",
@@ -868,4 +885,4 @@
868885
"to_doc": "API 보기",
869886
"trigger_limit": "최대 {0}개의 API 키 생성 지원"
870887
}
871-
}
888+
}

frontend/src/i18n/zh-CN.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,23 @@
77
"AI Model Configuration": "模型配置",
88
"Details": "详情"
99
},
10+
"variables": {
11+
"system_variables": "系统变量",
12+
"system": "系统",
13+
"search_variables": "搜索变量",
14+
"add_variable": "添加变量",
15+
"variable_name": "变量名称",
16+
"variable_type": "变量类型",
17+
"variable_value": "变量值",
18+
"edit_variable": "编辑变量",
19+
"no_variables_yet": "暂无变量",
20+
"please_enter_value": "请输入数值",
21+
"date": "日期",
22+
"start_date": "开始日期",
23+
"end_date": "结束日期",
24+
"enter_variable_name": "请输入变量名称",
25+
"enter_variable_value": "请输入变量值"
26+
},
1027
"parameter": {
1128
"export_notes": "导出备注",
1229
"import_notes": "导入备注",

frontend/src/router/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import Model from '@/views/system/model/Model.vue'
1212
// import Embedded from '@/views/system/embedded/index.vue'
1313
// import SetAssistant from '@/views/system/embedded/iframe.vue'
1414
import SystemEmbedded from '@/views/system/embedded/Page.vue'
15+
import Variables from '@/views/system/variables/index.vue'
1516

1617
import assistantTest from '@/views/system/embedded/Test.vue'
1718
import assistant from '@/views/embedded/index.vue'
@@ -219,6 +220,12 @@ export const routes = [
219220
component: Parameter,
220221
meta: { title: t('parameter.parameter_configuration') },
221222
},
223+
{
224+
path: 'variables',
225+
name: 'variables',
226+
component: Variables,
227+
meta: { title: t('variables.system_variables') },
228+
},
222229
{
223230
path: 'authentication',
224231
name: 'authentication',

frontend/src/views/chat/QuickQuestion.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ const props = withDefaults(
149149
cursor: pointer;
150150
margin-left: 8px;
151151
&:hover {
152-
color: #189e7a;
152+
color: var(--ed-color-primary-15-d, #189e7a);
153153
background: #1f23291a;
154154
}
155155
}

0 commit comments

Comments
 (0)