refactor: change agent cloud data permission to cloud variables only

- Rename permission from '查看云端数据' to '查看云端变量'
- Remove cloud constants API and page for agents
- Add cloud variable records API for agents (stream type)
- Add agent cloud-variables page with full variable details
- Add agent cloud-variable records page (read-only)
- Update navigation from cloud-data to cloud-variables
- Update i18n keys: cloudData -> cloudVariables
- Backend returns var_type, default_value, max_records etc.
- Records page supports dynamic columns and date filtering
This commit is contained in:
2026-05-11 08:05:40 +08:00
parent 6dcb5cde02
commit 3cea807353
8 changed files with 871 additions and 406 deletions
+39 -17
View File
@@ -924,7 +924,7 @@
"maxApiCalls": "API调用次数/月",
"maxApiCallsPlaceholder": "-1表示不限",
"allowAgent": "代理权限",
"allowCloudData": "云端数据",
"allowCloudData": "云端变量",
"allowDynamicCode": "云端函数",
"allowEmail": "邮件功能",
"allowExtension": "扩展接口",
@@ -1242,7 +1242,7 @@
"cardsCount": "生成卡密",
"childAgentsCount": "下级代理",
"canCreateAgent": "创建代理权限",
"canViewCloudData": "云端数据权限",
"canViewCloudData": "查看云端变量权限",
"balance": "余额",
"totalConsumption": "消费",
"createdAt": "注册时间",
@@ -2888,27 +2888,49 @@
"generateNow": "立即生成"
}
},
"cloudData": {
"title": "云端数据",
"description": "查看云端变量和常量数据(只读)",
"variables": "云端变量",
"constants": "云端常量",
"applications": "应用数量",
"dataList": "数据列表",
"readOnlyHint": "只读模式,数据不可编辑",
"allApps": "全部应用",
"cloudVariables": {
"title": "云端变量",
"description": "查看云端变量数据(只读)",
"totalVariables": "变量总数",
"appScopeVariables": "应用级变量",
"userScopeVariables": "用户级变量",
"appCount": "应用数量",
"noVariables": "暂无云端变量数据",
"noConstants": "暂无云端常量数据",
"appScope": "应用级",
"userScope": "用户级",
"statusActive": "启用",
"statusInactive": "禁用",
"readOnlyNote": "只读模式 - 当前数据仅供查看,无法进行编辑操作",
"viewRecords": "查看记录",
"application": "应用",
"scope": "作用域",
"types": {
"integer": "整数",
"decimal": "小数",
"string": "字符串",
"binary": "二进制",
"stream": "列表"
},
"columns": {
"name": "名",
"application": "应用",
"key": "变量名",
"defaultValue": "默认值",
"type": "类型",
"scope": "作用域",
"value": "",
"application": "应用",
"status": "状态",
"createdAt": "创建时间"
},
"records": {
"title": "变量记录",
"description": "变量 {key} 的记录列表",
"totalRecords": "记录总数",
"maxRecordsLabel": "最大记录数",
"unlimited": "无限制",
"user": "用户",
"data": "数据",
"createdAt": "创建时间",
"searchPlaceholder": "搜索记录...",
"startDate": "开始日期",
"endDate": "结束日期"
}
}
},
@@ -2933,7 +2955,7 @@
"apiCalls": "{count}次/月 API调用",
"unlimitedApiCalls": "无限API调用",
"agent": "代理权限",
"cloudData": "云端数据功能",
"cloudData": "云端变量功能",
"dynamicCode": "云端函数功能",
"email": "邮件功能",
"extension": "扩展接口功能",