Skip to content

Commit

Permalink
Fix broken badge hyperping
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuelfaure committed Jul 29, 2024
1 parent 8c6f785 commit e6c35b1
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#homepage #section-developers {
#hyperping-badge {
background-image: none;
}
}
26 changes: 24 additions & 2 deletions app/views/api_entreprise/pages/home/_section_developers.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,30 @@
<h3 class="fr-h4 fr-card__title">
<a href="https://status.entreprise.api.gouv.fr/"><%= t('.status_link') %></a>
</h3>
<p class="fr-card__desc"><iframe src="https://status.entreprise.api.gouv.fr/embed-status/light-sm" width="180" height="61" style="border: none;" title="Statutss des API - widget directement connecté à Instatus">
</iframe></p>
<div class="fr-card__desc" id="hyperping-badge"></div>
<script src="https://hyperping.io/badge.js" async></script>
<script>
window.onload = function () {
Hyperping.init({
"statuspage": "https://status.entreprise.api.gouv.fr",
"border": "none",
"borderColor": "#E4E6F0",
"uptime": false,
"dot": true,
"dotSize": 10,
"isNeutral": false,
"dotOk": "#2BAC76",
"dotIncident": "#FFAF36",
"dotOutage": "#E95858",
"dotMaintenance": "#0070F3",
"dotNeutral": "#0070F3",
"operational": "Systèmes fonctionnels",
"incident": "Incident en cours",
"outage": "Hors-service",
"maintenance": "En maintenance"
});
}
</script>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions config/initializers/cors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
Rails.application.config.middleware.insert_before 0, Rack::Cors do
allow do
origins 'localhost:8080'
origins 'https://status.entreprise.api.gouv.fr/'

resource '*',
headers: :any,
Expand Down

0 comments on commit e6c35b1

Please sign in to comment.