Skip to content

Commit 43f07a0

Browse files
authored
feat(front): add configurable status page URL for error handling and layout (#660)
## 📝 Description Makes status page URL configurable via environment variable with default value of https://status.semaphore.io/ instead of constructing it from domain. Updated templates. Check this [task](renderedtext/tasks#8781). ## ✅ Checklist - [x] I have tested this change - [x] ~This change requires documentation update~ N/A
1 parent 9b846c6 commit 43f07a0

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

front/config/runtime.exs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,3 +183,7 @@ config :front,
183183
System.get_env("SINGLE_TENANT") == "true"
184184

185185
config :front, :edition, edition
186+
187+
config :front,
188+
:status_page_url,
189+
System.get_env("STATUS_PAGE_URL") || "https://status.semaphore.io/"

front/lib/front_web/templates/error/500.html.eex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<div class="mw6 center br3 shadow-1 pv5 bg-white ph3">
5757
<h1 class="fw3 lh-solid mb3" style="font-size: 112px">500</h1>
5858
<h2 class="f4 fw5 black-80 mb0">There’s a problem with Semaphore</h2>
59-
<p class="f4 black-80 mb3=0">Try again or check <a href="https://status.<%= Application.fetch_env!(:front, :domain) %>" class="link black-50 hover-black-80">Semaphore Status →</a></p>
59+
<p class="f4 black-80 mb3=0">Try again or check <a href="<%= Application.fetch_env!(:front, :status_page_url) %>" class="link black-50 hover-black-80">Semaphore Status →</a></p>
6060
</div>
6161
</div>
6262

front/lib/front_web/templates/layout/_page_header.html.eex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
<%= support_requests_card(@conn, @layout_model) %>
128128
<%= render FrontWeb.LayoutView, "page_header/_menu_card.html",
129129
options: [target: "_blank", rel: "noopener"],
130-
card_url: "https://status.#{Application.fetch_env!(:front, :domain)}",
130+
card_url: Application.fetch_env!(:front, :status_page_url),
131131
card_title: "Status",
132132
card_description: "Live system health",
133133
tooltip: false %>

0 commit comments

Comments
 (0)