summaryrefslogtreecommitdiffstats
path: root/templates/repo/home.tmpl
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2022-01-27 10:30:51 +0200
committerGitHub <noreply@github.com>2022-01-27 10:30:51 +0200
commit8038610a4279862a87e630e4f1d1077c510f9d15 (patch)
tree802489f8ddde899e76643ea157f9020f12ca1490 /templates/repo/home.tmpl
parent2649eddcf0bb1190abab49c9d79ce19bfcf19e87 (diff)
downloadgitea-8038610a4279862a87e630e4f1d1077c510f9d15.tar.gz
gitea-8038610a4279862a87e630e4f1d1077c510f9d15.zip
Automatically pause queue if index service is unavailable (#15066)
* Handle keyword search error when issue indexer service is not available * Implement automatic disabling and resume of code indexer queue
Diffstat (limited to 'templates/repo/home.tmpl')
-rw-r--r--templates/repo/home.tmpl9
1 files changed, 6 insertions, 3 deletions
diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl
index 9924ae547d..6d525c24da 100644
--- a/templates/repo/home.tmpl
+++ b/templates/repo/home.tmpl
@@ -13,9 +13,12 @@
<div class="ui repo-search">
<form class="ui form ignore-dirty" action="{{.RepoLink}}/search" method="get">
<div class="field">
- <div class="ui action input">
- <input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "repo.search.search_repo"}}">
- <button class="ui icon button" type="submit">
+ <div class="ui action input{{if .CodeIndexerUnavailable }} disabled left icon tooltip{{end}}"{{if .CodeIndexerUnavailable }} data-content="{{.i18n.Tr "repo.search.code_search_unavailable"}}"{{end}}>
+ <input name="q" value="{{.Keyword}}"{{if .CodeIndexerUnavailable }} disabled{{end}} placeholder="{{.i18n.Tr "repo.search.search_repo"}}">
+ {{if .CodeIndexerUnavailable }}
+ <i class="icon df ac jc">{{svg "octicon-alert"}}</i>
+ {{end}}
+ <button class="ui icon button"{{if .CodeIndexerUnavailable }} disabled{{end}} type="submit">
{{svg "octicon-search"}}
</button>
</div>