summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2024-03-31 11:03:24 +0800
committerGitHub <noreply@github.com>2024-03-31 03:03:24 +0000
commit6d34ce25b16cdfd6e2e364aebe546e3c2fbb76c6 (patch)
tree27e4c5f4991d3d4fc8b35456c9f19a49ad275e64 /templates
parent82ffd91607ba03907ebad31ec9a38555b153a331 (diff)
downloadgitea-6d34ce25b16cdfd6e2e364aebe546e3c2fbb76c6.tar.gz
gitea-6d34ce25b16cdfd6e2e364aebe546e3c2fbb76c6.zip
Do not allow different storage configurations to point to the same directory (#30169)
Replace #29171
Diffstat (limited to 'templates')
-rw-r--r--templates/admin/dashboard.tmpl2
-rw-r--r--templates/admin/navbar.tmpl18
-rw-r--r--templates/admin/self_check.tmpl62
3 files changed, 51 insertions, 31 deletions
diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl
index bfd2ee6670..589fc5048a 100644
--- a/templates/admin/dashboard.tmpl
+++ b/templates/admin/dashboard.tmpl
@@ -6,7 +6,7 @@
</div>
{{end}}
<h4 class="ui top attached header">
- {{ctx.Locale.Tr "admin.dashboard.operations"}}
+ {{ctx.Locale.Tr "admin.dashboard.maintenance_operations"}}
</h4>
<div class="ui attached table segment">
<form method="post" action="{{AppSubUrl}}/admin">
diff --git a/templates/admin/navbar.tmpl b/templates/admin/navbar.tmpl
index d01a6ab964..1b3b9d6efc 100644
--- a/templates/admin/navbar.tmpl
+++ b/templates/admin/navbar.tmpl
@@ -1,12 +1,18 @@
<div class="flex-container-nav">
<div class="ui fluid vertical menu">
<div class="header item">{{ctx.Locale.Tr "admin.settings"}}</div>
- <a class="{{if .PageIsAdminDashboard}}active {{end}}item" href="{{AppSubUrl}}/admin">
- {{ctx.Locale.Tr "admin.dashboard"}}
- </a>
- <a class="{{if .PageIsAdminSelfCheck}}active {{end}}item" href="{{AppSubUrl}}/admin/self_check">
- {{ctx.Locale.Tr "admin.self_check"}}
- </a>
+
+ <details class="item toggleable-item" {{if or .PageIsAdminDashboard .PageIsAdminSelfCheck}}open{{end}}>
+ <summary>{{ctx.Locale.Tr "admin.maintenance"}}</summary>
+ <div class="menu">
+ <a class="{{if .PageIsAdminDashboard}}active {{end}}item" href="{{AppSubUrl}}/admin">
+ {{ctx.Locale.Tr "admin.dashboard"}}
+ </a>
+ <a class="{{if .PageIsAdminSelfCheck}}active {{end}}item" href="{{AppSubUrl}}/admin/self_check">
+ {{ctx.Locale.Tr "admin.self_check"}}
+ </a>
+ </div>
+ </details>
<details class="item toggleable-item" {{if or .PageIsAdminUsers .PageIsAdminEmails .PageIsAdminOrganizations .PageIsAdminAuthentications}}open{{end}}>
<summary>{{ctx.Locale.Tr "admin.identity_access"}}</summary>
<div class="menu">
diff --git a/templates/admin/self_check.tmpl b/templates/admin/self_check.tmpl
index 94c4673a49..c100ffd504 100644
--- a/templates/admin/self_check.tmpl
+++ b/templates/admin/self_check.tmpl
@@ -4,33 +4,47 @@
<h4 class="ui top attached header">
{{ctx.Locale.Tr "admin.self_check"}}
</h4>
+
+ {{if .DeprecatedWarnings}}
<div class="ui attached segment">
- {{if .DatabaseCheckHasProblems}}
- {{if .DatabaseType.IsMySQL}}
- <div class="tw-p-2">{{ctx.Locale.Tr "admin.self_check.database_fix_mysql"}}</div>
- {{else if .DatabaseType.IsMSSQL}}
- <div class="tw-p-2">{{ctx.Locale.Tr "admin.self_check.database_fix_mssql"}}</div>
- {{end}}
- {{if .DatabaseCheckCollationMismatch}}
- <div class="ui red message">{{ctx.Locale.Tr "admin.self_check.database_collation_mismatch" .DatabaseCheckResult.ExpectedCollation}}</div>
- {{end}}
- {{if .DatabaseCheckCollationCaseInsensitive}}
- <div class="ui warning message">{{ctx.Locale.Tr "admin.self_check.database_collation_case_insensitive" .DatabaseCheckResult.DatabaseCollation}}</div>
- {{end}}
- {{if .DatabaseCheckInconsistentCollationColumns}}
- <div class="ui red message">
- {{ctx.Locale.Tr "admin.self_check.database_inconsistent_collation_columns" .DatabaseCheckResult.DatabaseCollation}}
- <ul class="tw-w-full">
- {{range .DatabaseCheckInconsistentCollationColumns}}
- <li>{{.}}</li>
- {{end}}
- </ul>
- </div>
- {{end}}
- {{else}}
- <div class="tw-p-2">{{ctx.Locale.Tr "admin.self_check.no_problem_found"}}</div>
+ <div class="ui warning message">
+ <div>{{ctx.Locale.Tr "admin.self_check.startup_warnings"}}</div>
+ <ul class="tw-w-full">{{range .DeprecatedWarnings}}<li>{{.}}</li>{{end}}</ul>
+ </div>
+ </div>
+ {{end}}
+
+ {{if .DatabaseCheckHasProblems}}
+ <div class="ui attached segment">
+ {{if .DatabaseType.IsMySQL}}
+ <div class="tw-p-2">{{ctx.Locale.Tr "admin.self_check.database_fix_mysql"}}</div>
+ {{else if .DatabaseType.IsMSSQL}}
+ <div class="tw-p-2">{{ctx.Locale.Tr "admin.self_check.database_fix_mssql"}}</div>
+ {{end}}
+ {{if .DatabaseCheckCollationMismatch}}
+ <div class="ui red message">{{ctx.Locale.Tr "admin.self_check.database_collation_mismatch" .DatabaseCheckResult.ExpectedCollation}}</div>
{{end}}
+ {{if .DatabaseCheckCollationCaseInsensitive}}
+ <div class="ui warning message">{{ctx.Locale.Tr "admin.self_check.database_collation_case_insensitive" .DatabaseCheckResult.DatabaseCollation}}</div>
+ {{end}}
+ {{if .DatabaseCheckInconsistentCollationColumns}}
+ <div class="ui red message">
+ {{ctx.Locale.Tr "admin.self_check.database_inconsistent_collation_columns" .DatabaseCheckResult.DatabaseCollation}}
+ <ul class="tw-w-full">
+ {{range .DatabaseCheckInconsistentCollationColumns}}
+ <li>{{.}}</li>
+ {{end}}
+ </ul>
+ </div>
+ {{end}}
+ </div>
+ {{end}}
+
+ {{if and (not .DeprecatedWarnings) (not .DatabaseCheckHasProblems)}}
+ <div class="ui attached segment">
+ {{ctx.Locale.Tr "admin.self_check.no_problem_found"}}
</div>
+ {{end}}
</div>
{{template "admin/layout_footer" .}}