Skip to content

Commit 378936b

Browse files
LeezQkongwy229maslow
authored
feat(web): add app detail info dialog (#843)
* feat(web): add app setting * feat(web): adjust statusBadge width * feat(web): add user information * feat(web): fix translation * refactor(web): move language switch outside * feat(web): add app detail info --------- Co-authored-by: kongwy229 <[email protected]> Co-authored-by: maslow <[email protected]>
1 parent 9548b35 commit 378936b

File tree

29 files changed

+782
-160
lines changed

29 files changed

+782
-160
lines changed

web/public/locales/en/translation.json

+37-6
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"Edit": "Edit ",
5555
"Generate": "generate",
5656
"InputTip": "please enter",
57-
"IsRequired": "is required",
57+
"IsRequired": " is required",
5858
"LimitSelect": "Please select at least one",
5959
"Logout": "Logout",
6060
"Name": "name",
@@ -137,8 +137,32 @@
137137
"Expire": "Expiration",
138138
"Setting": "Setting",
139139
"SystemSetting": "Application Settings",
140-
"UserSetting": "User Settings",
141-
"UpdateConfirm": "Update env will restart application, are you sure?"
140+
"UserSetting": "User Info",
141+
"UpdateConfirm": "Update env will restart application, are you sure?",
142+
"BaseInfo": "Basic Information",
143+
"DB": "Database",
144+
"Delete": "Delete",
145+
"Detail": "Rules details (experimental version)",
146+
"Disk": "Hard Disk",
147+
"Memory": "Memory",
148+
"Restart": "Restart",
149+
"network": "Outgoing capacity",
150+
"Close": "Close",
151+
"AppInfo": "Application Information",
152+
"Auth": "Real-name Authentication",
153+
"Code": "Code",
154+
"CodeTip": "Please enter a four-digit verification code",
155+
"ID": "ID",
156+
"IDTip": "Please enter a valid ID number",
157+
"Name": "Real name",
158+
"Registered": "Registered Time",
159+
"SendCode": "Send Code",
160+
"Tel": "Mobile number",
161+
"TelTip": "Please enter a valid Mobile phone number",
162+
"ToAuth": "Authenticate Now",
163+
"UserInfo": "User Information",
164+
"noAuth": "Not Authenticated",
165+
"showAuth": "Go to Auth"
142166
},
143167
"StoragePanel": {
144168
"All": "Total Capacity",
@@ -190,7 +214,8 @@
190214
"CurrentDomain": "Current domain: ",
191215
"RemoveHost": "Remove Host",
192216
"CancelHost": "Cancel Host",
193-
"InstantUpload": "Instant Upload"
217+
"InstantUpload": "Instant Upload",
218+
"parsing": "parsing"
194219
},
195220
"TriggerPanel": {
196221
"AddTrigger": "Add Trigger",
@@ -223,13 +248,19 @@
223248
"EditTip": "modified, unpublished",
224249
"NoInfo": "No information",
225250
"RefreshDataSuccess": "data refreshed",
226-
"Language": "Language",
227251
"database example": "database example",
228252
"update success": "update completed",
229253
"Take me home": "Take me home",
230254
"404Message": "We can't find that page",
231255
"403Message": "You don't have permission to access this page",
232256
"Bucket": {
233257
"StatusTip": "External access needs to set the bucket permission to readonly"
234-
}
258+
},
259+
"Restart": "Restart",
260+
"ShutDown": "ShutDown",
261+
"Charge": "Charge",
262+
"Back": "Return",
263+
"Personal Access Token": "Personal Access Token",
264+
"SwitchLanguage": "Switch Language",
265+
"Storage": "Storage"
235266
}

web/public/locales/zh-CN/translation.json

+34-4
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,32 @@
125125
"AppEnv": "环境变量",
126126
"AddAppEnv": "新增环境变量",
127127
"Expire": "过期时间",
128-
"UserSetting": "用户设置",
129-
"UpdateConfirm": "更新环境变量将重新启动应用,是否继续?"
128+
"UserSetting": "用户信息",
129+
"UpdateConfirm": "更新环境变量将重新启动应用,是否继续?",
130+
"AppInfo": "应用信息",
131+
"Restart": "重启应用",
132+
"Delete": "删除应用",
133+
"Close": "关闭应用",
134+
"BaseInfo": "基础信息",
135+
"Detail": "规则详情",
136+
"Memory": "内存",
137+
"Disk": "硬盘",
138+
"DB": "数据库",
139+
"network": "出网容量",
140+
"UserInfo": "用户信息",
141+
"Auth": "实名认证",
142+
"Tel": "手机号",
143+
"SendCode": "发送验证码",
144+
"Code": "验证码",
145+
"Name": "真实姓名",
146+
"ID": "身份证号",
147+
"ToAuth": "立即认证",
148+
"showAuth": "去认证",
149+
"noAuth": "未实名",
150+
"IDTip": "请输入有效的身份证号码",
151+
"CodeTip": "请输入四位数字验证码",
152+
"TelTip": "请输入有效的手机号码",
153+
"Registered": "注册时间"
130154
},
131155
"StoragePanel": {
132156
"CreateBucket": "创建 Bucket",
@@ -224,13 +248,19 @@
224248
"RefreshData": "刷新数据",
225249
"NoInfo": "暂无信息",
226250
"RefreshDataSuccess": "数据刷新成功",
227-
"Language": "语言",
228251
"database example": "database 示例",
229252
"update success": "更新成功",
230253
"Take me home": "返回首页",
231254
"404Message": "找不到当前内容",
232255
"403Message": "当前用户没有权限",
233256
"Bucket": {
234257
"StatusTip": "外部访问需要将 bucket 权限设置为 readonly"
235-
}
258+
},
259+
"Restart": "重启应用",
260+
"ShutDown": "关闭应用",
261+
"Charge": "余额充值",
262+
"Back": "返回",
263+
"Personal Access Token": "访问凭证 (PAT)",
264+
"SwitchLanguage": "切换语言",
265+
"Storage": "云存储"
236266
}

web/public/locales/zh/translation.json

+35-4
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,31 @@
138138
"Setting": "设置",
139139
"SystemSetting": "应用设置",
140140
"UserSetting": "用户设置",
141-
"UpdateConfirm": "更新环境变量将重新启动应用,是否继续?"
141+
"UpdateConfirm": "更新环境变量将重新启动应用,是否继续?",
142+
"AppInfo": "应用信息",
143+
"BaseInfo": "基础信息",
144+
"Detail": "规则详情",
145+
"Memory": "内存",
146+
"Disk": "硬盘",
147+
"DB": "数据库",
148+
"network": "出网容量",
149+
"Close": "关闭应用",
150+
"Delete": "删除应用",
151+
"Restart": "重启应用",
152+
"UserInfo": "用户信息",
153+
"Auth": "实名认证",
154+
"Tel": "手机号",
155+
"SendCode": "发送验证码",
156+
"Code": "验证码",
157+
"Name": "真实姓名",
158+
"ID": "身份证号",
159+
"ToAuth": "立即认证",
160+
"showAuth": "去认证",
161+
"noAuth": "未实名",
162+
"IDTip": "请输入有效的身份证号码",
163+
"CodeTip": "请输入四位数字验证码",
164+
"TelTip": "请输入有效的手机号码",
165+
"Registered": "注册时间"
142166
},
143167
"StoragePanel": {
144168
"All": "总容量",
@@ -190,7 +214,8 @@
190214
"CurrentDomain": "当前域名: ",
191215
"CancelHost": "取消托管",
192216
"Inaccessible": "无法访问",
193-
"InstantUpload": "立即上传"
217+
"InstantUpload": "立即上传",
218+
"RemoveHost": "取消静态托管"
194219
},
195220
"TriggerPanel": {
196221
"AddTrigger": "新建触发器",
@@ -223,13 +248,19 @@
223248
"EditTip": "已修改,未发布",
224249
"NoInfo": "暂无信息",
225250
"RefreshDataSuccess": "数据刷新成功",
226-
"Language": "语言",
227251
"database example": "database 示例",
228252
"update success": "更新成功",
229253
"Take me home": "返回首页",
230254
"404Message": "找不到当前内容",
231255
"403Message": "当前用户没有权限",
232256
"Bucket": {
233257
"StatusTip": "外部访问需要将 bucket 权限设置为 readonly"
234-
}
258+
},
259+
"Restart": "重启应用",
260+
"ShutDown": "关闭应用",
261+
"Charge": "余额充值",
262+
"Back": "返回",
263+
"Personal Access Token": "访问凭证 (PAT)",
264+
"SwitchLanguage": "切换语言",
265+
"Storage": "云存储"
235266
}

web/src/apis/typing.d.ts

+63-27
Original file line numberDiff line numberDiff line change
@@ -2,103 +2,139 @@ export type TApplication = {
22
id: string;
33
name: string;
44
appid: string;
5-
regionName: string;
6-
bundleName: string;
7-
runtimeName: string;
5+
regionId: string;
6+
runtimeId: string;
7+
tags: any[];
88
state: string;
99
phase: string;
10-
tags: any[];
1110
createdAt: string;
1211
updatedAt: string;
12+
lockedAt: string;
1313
createdBy: string;
1414
bundle: TBundle;
15-
runtime: Runtime;
16-
configuration: Configuration;
17-
domain: Domain;
18-
storage: Storage;
19-
tls: boolean;
20-
develop_token: string;
15+
runtime: TRuntime;
16+
configuration: TConfiguration;
17+
domain: TDomain;
18+
storage: TStorage;
2119
port: number;
20+
develop_token: string;
21+
tls: boolean;
22+
function_debug_token: string;
2223
host: string;
2324
origin: string;
2425
};
2526

2627
export type TBundle = {
2728
id: string;
29+
appid: string;
2830
name: string;
2931
displayName: string;
30-
regionName: string;
32+
resource: TResource;
33+
price: number;
34+
createdAt: string;
35+
updatedAt: string;
36+
};
37+
38+
export type TResource = {
3139
limitCPU: number;
3240
limitMemory: number;
3341
requestCPU: number;
3442
requestMemory: number;
3543
databaseCapacity: number;
3644
storageCapacity: number;
3745
networkTrafficOutbound: number;
38-
priority: number;
39-
state: string;
40-
price: number;
4146
};
4247

43-
export type Runtime = {
48+
export type TRuntime = {
4449
id: string;
4550
name: string;
4651
type: string;
47-
image: Image;
52+
image: TImage;
53+
state: string;
4854
version: string;
4955
latest: boolean;
5056
};
5157

52-
export type Image = {
58+
export type TImage = {
5359
main: string;
5460
init: string;
5561
sidecar: any;
5662
};
5763

58-
export type Configuration = {
64+
export type TConfiguration = {
5965
id: string;
6066
appid: string;
61-
environments: Environment[];
67+
environments: TEnvironment[];
6268
dependencies: any[];
6369
createdAt: string;
6470
updatedAt: string;
6571
};
6672

67-
export type Environment = {
73+
export type TEnvironment = {
6874
name: string;
6975
value: string;
7076
};
7177

72-
export type Domain = {
78+
export type TDomain = {
7379
id: string;
7480
appid: string;
75-
bucketName: string;
7681
domain: string;
7782
state: string;
7883
phase: string;
84+
lockedAt: string;
7985
createdAt: string;
8086
updatedAt: string;
81-
lockedAt: string;
8287
};
8388

84-
export type Storage = {
89+
export type TStorage = {
90+
credentials: TCredentials;
8591
id: string;
8692
appid: string;
8793
accessKey: string;
8894
secretKey: string;
95+
state: string;
96+
phase: string;
97+
lockedAt: string;
8998
createdAt: string;
9099
updatedAt: string;
91-
credentials: Credentials;
92100
};
93101

94-
export type Credentials = {
102+
export type TCredentials = {
95103
endpoint: string;
96104
accessKeyId: string;
97105
secretAccessKey: string;
98106
sessionToken: string;
99107
expiration: string;
100108
};
101109

110+
export type TRegion = {
111+
id: string;
112+
name: string;
113+
displayName: string;
114+
state: string;
115+
bundles: TBundle[];
116+
};
117+
118+
export type TBundle = {
119+
id: string;
120+
name: string;
121+
displayName: string;
122+
price: number;
123+
priority: number;
124+
state: string;
125+
resource: TResource;
126+
};
127+
128+
export type TResource = {
129+
limitCPU: number;
130+
limitMemory: number;
131+
requestCPU: number;
132+
requestMemory: number;
133+
databaseCapacity: number;
134+
storageCapacity: number;
135+
networkTrafficOutbound: number;
136+
};
137+
102138
export type TBucket = {
103139
id: string;
104140
appid: string;
@@ -110,7 +146,7 @@ export type TBucket = {
110146
lockedAt: string;
111147
createdAt: string;
112148
updatedAt: string;
113-
domain: Domain;
149+
domain: TDomain;
114150
websiteHosting: TWebsiteHosting;
115151
};
116152

0 commit comments

Comments
 (0)