特殊页面改为自定义页面

This commit is contained in:
GoEdgeLab
2022-03-31 14:53:07 +08:00
parent 99e2069316
commit 773660ad4a
10 changed files with 11 additions and 11 deletions

View File

@@ -108,7 +108,7 @@ func InitGroup(parent *actionutils.ParentAction, groupId int64, menuItem string)
"isOn": configInfoResp.HasCompressionConfig,
},
{
"name": "特殊页面",
"name": "自定义页面",
"url": urlPrefix + "/pages?groupId=" + types.String(groupId),
"isActive": menuItem == "pages",
"isOn": configInfoResp.HasPagesConfig,

View File

@@ -132,7 +132,7 @@ func (this *LocationHelper) createMenus(serverIdString string, locationIdString
"isOn": locationConfig != nil && locationConfig.Web != nil && locationConfig.Web.Compression != nil && locationConfig.Web.Compression.IsPrior,
})
menuItems = append(menuItems, maps.Map{
"name": "特殊页面",
"name": "自定义页面",
"url": "/servers/server/settings/locations/pages?serverId=" + serverIdString + "&locationId=" + locationIdString,
"isActive": secondMenuItem == "pages",
"isOn": locationConfig != nil && locationConfig.Web != nil && (len(locationConfig.Web.Pages) > 0 || (locationConfig.Web.Shutdown != nil && locationConfig.Web.Shutdown.IsPrior)),

View File

@@ -36,7 +36,7 @@ func (this *IndexAction) RunPost(params struct {
ShutdownJSON string
Must *actions.Must
}) {
defer this.CreateLogInfo("修改Web %d 的特殊页面设置", params.WebId)
defer this.CreateLogInfo("修改Web %d 的自定义页面设置", params.WebId)
// TODO 检查配置

View File

@@ -80,7 +80,7 @@ func (this *CreatePopupAction) RunPost(params struct {
this.Data["page"] = pageConfig
// 日志
defer this.CreateLog(oplogs.LevelInfo, "创建特殊页面 %d", pageId)
defer this.CreateLog(oplogs.LevelInfo, "创建自定义页面 %d", pageId)
this.Success()
}

View File

@@ -55,7 +55,7 @@ func (this *UpdatePopupAction) RunPost(params struct {
Must *actions.Must
}) {
// 日志
defer this.CreateLog(oplogs.LevelInfo, "修改特殊页面 %d", params.PageId)
defer this.CreateLog(oplogs.LevelInfo, "修改自定义页面 %d", params.PageId)
params.Must.
Field("status", params.Status).

View File

@@ -333,7 +333,7 @@ func (this *ServerHelper) createSettingsMenu(secondMenuItem string, serverIdStri
"isOn": serverConfig.Web != nil && serverConfig.Web.Compression != nil && serverConfig.Web.Compression.IsOn,
})
menuItems = append(menuItems, maps.Map{
"name": "特殊页面",
"name": "自定义页面",
"url": "/servers/server/settings/pages?serverId=" + serverIdString,
"isActive": secondMenuItem == "pages",
"isOn": serverConfig.Web != nil && (len(serverConfig.Web.Pages) > 0 || (serverConfig.Web.Shutdown != nil && serverConfig.Web.Shutdown.IsOn)),

View File

@@ -71,7 +71,7 @@ Vue.component("http-location-labels", {
<!-- 请求脚本 -->
<http-location-labels-label v-if="location.web != null && location.web.requestScripts != null && ((location.web.requestScripts.initGroup != null && location.web.requestScripts.initGroup.isPrior) || (location.web.requestScripts.requestGroup != null && location.web.requestScripts.requestGroup.isPrior))" :href="url('/requestScripts')">请求脚本</http-location-labels-label>
<!-- 特殊页面 -->
<!-- 自定义页面 -->
<div v-if="location.web != null && location.web.pages != null && location.web.pages.length > 0">
<div v-for="page in location.web.pages" :key="page.id"><http-location-labels-label :href="url('/pages')">PAGE [状态码{{page.status[0]}}] -&gt; {{page.url}}</http-location-labels-label></div>
</div>

View File

@@ -92,7 +92,7 @@ Vue.component("http-pages-and-shutdown-box", {
<input type="hidden" name="shutdownJSON" :value="JSON.stringify(shutdownConfig)"/>
<table class="ui table selectable definition">
<tr>
<td class="title">特殊页面</td>
<td class="title">自定义页面</td>
<td>
<div v-if="pages.length > 0">
<div class="ui label small basic" v-for="(page,index) in pages">
@@ -103,7 +103,7 @@ Vue.component("http-pages-and-shutdown-box", {
<div>
<button class="ui button small" type="button" @click.prevent="addPage()">+</button>
</div>
<p class="comment">根据响应状态码返回一些特殊页面比如404500等错误页面。</p>
<p class="comment">根据响应状态码返回一些自定义页面比如404500等错误页面。</p>
</td>
</tr>
<tr>

View File

@@ -1,5 +1,5 @@
{$layout "layout_popup"}
<h3>添加特殊页面</h3>
<h3>添加自定义页面</h3>
<form method="post" class="ui form" data-tea-action="$" data-tea-success="success">
<table class="ui table selectable definition">
<tr>

View File

@@ -1,5 +1,5 @@
{$layout "layout_popup"}
<h3>修改特殊页面</h3>
<h3>修改自定义页面</h3>
<form method="post" class="ui form" data-tea-action="$" data-tea-success="success">
<input type="hidden" name="pageId" :value="pageConfig.id"/>
<table class="ui table selectable definition">