refactor(pages): 精简部署源模型并重构详情页交互

将 Remote 网络策略收敛为 allow_insecure,去掉脱敏与无用字段;
Pages 详情拆为部署/设置 Tab,统一卡片样式与来源信息展示。
This commit is contained in:
ryan
2026-07-19 20:23:31 +08:00
parent f0b51a99b3
commit abe8fb8268
40 changed files with 1050 additions and 1314 deletions
+21 -16
View File
@@ -5568,6 +5568,12 @@ const docTemplate = `{
"description": "统计时间范围(小时)",
"name": "hours",
"in": "query"
},
{
"type": "integer",
"description": "趋势桶分钟数(1、5 或 60,默认 60)",
"name": "bucket_minutes",
"in": "query"
}
],
"responses": {
@@ -8815,7 +8821,7 @@ const docTemplate = `{
"SessionCookie": []
}
],
"description": "返回脱敏后的项目部署源配置与运行状态,需要管理员权限",
"description": "返回项目部署源配置与运行状态,需要管理员权限",
"produces": [
"application/json"
],
@@ -16874,6 +16880,9 @@ const docTemplate = `{
"observability.AccessLogOverview": {
"type": "object",
"properties": {
"bucket_minutes": {
"type": "integer"
},
"device_types": {
"type": "array",
"items": {
@@ -17822,6 +17831,9 @@ const docTemplate = `{
"pages.SourceUpdateInput": {
"type": "object",
"properties": {
"allow_insecure": {
"type": "boolean"
},
"asset_name": {
"type": "string"
},
@@ -17837,15 +17849,9 @@ const docTemplate = `{
"release_tag": {
"type": "string"
},
"remote_network_policy": {
"type": "string"
},
"remote_url": {
"type": "string"
},
"remote_url_set": {
"type": "boolean"
},
"repository_url": {
"type": "string"
},
@@ -17871,6 +17877,9 @@ const docTemplate = `{
"pages.SourceView": {
"type": "object",
"properties": {
"allow_insecure": {
"type": "boolean"
},
"asset_name": {
"type": "string"
},
@@ -17880,15 +17889,9 @@ const docTemplate = `{
"check_interval_minutes": {
"type": "integer"
},
"display_url": {
"type": "string"
},
"github_repository": {
"type": "string"
},
"has_remote_url": {
"type": "boolean"
},
"last_applied": {
"$ref": "#/definitions/pages.SourceRevisionView"
},
@@ -17913,7 +17916,7 @@ const docTemplate = `{
"release_tag": {
"type": "string"
},
"remote_network_policy": {
"remote_url": {
"type": "string"
},
"source_type": {
@@ -19895,7 +19898,8 @@ const docTemplate = `{
"ip_match",
"geo_match",
"pow",
"ua_check"
"ua_check",
"security_check"
],
"x-enum-varnames": [
"RuleNodeStart",
@@ -19904,7 +19908,8 @@ const docTemplate = `{
"RuleNodeIPMatch",
"RuleNodeGeoMatch",
"RuleNodePoW",
"RuleNodeUACheck"
"RuleNodeUACheck",
"RuleNodeSecurityCheck"
]
},
"waf.RulePosition": {
+21 -16
View File
@@ -5561,6 +5561,12 @@
"description": "统计时间范围(小时)",
"name": "hours",
"in": "query"
},
{
"type": "integer",
"description": "趋势桶分钟数(1、5 或 60,默认 60)",
"name": "bucket_minutes",
"in": "query"
}
],
"responses": {
@@ -8808,7 +8814,7 @@
"SessionCookie": []
}
],
"description": "返回脱敏后的项目部署源配置与运行状态,需要管理员权限",
"description": "返回项目部署源配置与运行状态,需要管理员权限",
"produces": [
"application/json"
],
@@ -16867,6 +16873,9 @@
"observability.AccessLogOverview": {
"type": "object",
"properties": {
"bucket_minutes": {
"type": "integer"
},
"device_types": {
"type": "array",
"items": {
@@ -17815,6 +17824,9 @@
"pages.SourceUpdateInput": {
"type": "object",
"properties": {
"allow_insecure": {
"type": "boolean"
},
"asset_name": {
"type": "string"
},
@@ -17830,15 +17842,9 @@
"release_tag": {
"type": "string"
},
"remote_network_policy": {
"type": "string"
},
"remote_url": {
"type": "string"
},
"remote_url_set": {
"type": "boolean"
},
"repository_url": {
"type": "string"
},
@@ -17864,6 +17870,9 @@
"pages.SourceView": {
"type": "object",
"properties": {
"allow_insecure": {
"type": "boolean"
},
"asset_name": {
"type": "string"
},
@@ -17873,15 +17882,9 @@
"check_interval_minutes": {
"type": "integer"
},
"display_url": {
"type": "string"
},
"github_repository": {
"type": "string"
},
"has_remote_url": {
"type": "boolean"
},
"last_applied": {
"$ref": "#/definitions/pages.SourceRevisionView"
},
@@ -17906,7 +17909,7 @@
"release_tag": {
"type": "string"
},
"remote_network_policy": {
"remote_url": {
"type": "string"
},
"source_type": {
@@ -19888,7 +19891,8 @@
"ip_match",
"geo_match",
"pow",
"ua_check"
"ua_check",
"security_check"
],
"x-enum-varnames": [
"RuleNodeStart",
@@ -19897,7 +19901,8 @@
"RuleNodeIPMatch",
"RuleNodeGeoMatch",
"RuleNodePoW",
"RuleNodeUACheck"
"RuleNodeUACheck",
"RuleNodeSecurityCheck"
]
},
"waf.RulePosition": {
+14 -10
View File
@@ -2017,6 +2017,8 @@ definitions:
type: object
observability.AccessLogOverview:
properties:
bucket_minutes:
type: integer
device_types:
items:
$ref: '#/definitions/observability.DistributionItem'
@@ -2637,6 +2639,8 @@ definitions:
type: object
pages.SourceUpdateInput:
properties:
allow_insecure:
type: boolean
asset_name:
type: string
auto_update_enabled:
@@ -2647,12 +2651,8 @@ definitions:
type: string
release_tag:
type: string
remote_network_policy:
type: string
remote_url:
type: string
remote_url_set:
type: boolean
repository_url:
type: string
source_type:
@@ -2669,18 +2669,16 @@ definitions:
type: object
pages.SourceView:
properties:
allow_insecure:
type: boolean
asset_name:
type: string
auto_update_enabled:
type: boolean
check_interval_minutes:
type: integer
display_url:
type: string
github_repository:
type: string
has_remote_url:
type: boolean
last_applied:
$ref: '#/definitions/pages.SourceRevisionView'
last_checked_at:
@@ -2697,7 +2695,7 @@ definitions:
type: string
release_tag:
type: string
remote_network_policy:
remote_url:
type: string
source_type:
type: string
@@ -4023,6 +4021,7 @@ definitions:
- geo_match
- pow
- ua_check
- security_check
type: string
x-enum-varnames:
- RuleNodeStart
@@ -4032,6 +4031,7 @@ definitions:
- RuleNodeGeoMatch
- RuleNodePoW
- RuleNodeUACheck
- RuleNodeSecurityCheck
waf.RulePosition:
properties:
x:
@@ -7522,6 +7522,10 @@ paths:
in: query
name: hours
type: integer
- description: 趋势桶分钟数(1、5 或 60,默认 60)
in: query
name: bucket_minutes
type: integer
produces:
- application/json
responses:
@@ -9430,7 +9434,7 @@ paths:
- openflare-pages
/api/v1/d/pages/{id}/source:
get:
description: 返回脱敏后的项目部署源配置与运行状态,需要管理员权限
description: 返回项目部署源配置与运行状态,需要管理员权限
parameters:
- description: 项目 ID
in: path