diff options
author | DJ Mountney <david@twkie.net> | 2016-05-10 02:21:22 +0300 |
---|---|---|
committer | DJ Mountney <david@twkie.net> | 2016-05-10 18:46:02 +0300 |
commit | 160ef66d1bbbbc593516c7575d6b02ddb019c000 (patch) | |
tree | 95d2b3e09d56a2237da09c48281201d5ab8d73bf /app/views/admin/health_check | |
parent | 9898f9b4e6b80edaa914675edfa9b229498b31fe (diff) |
Add health_check access token, and enforce on the health_check endpoint
Also added a health check page to the admin section for resetting the token.
Diffstat (limited to 'app/views/admin/health_check')
-rw-r--r-- | app/views/admin/health_check/show.html.haml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/app/views/admin/health_check/show.html.haml b/app/views/admin/health_check/show.html.haml new file mode 100644 index 00000000000..70e5d04e356 --- /dev/null +++ b/app/views/admin/health_check/show.html.haml @@ -0,0 +1,40 @@ +- page_title "Health Check" + +%h3.page-title + Health Check +%p.light + Health information can be reteived as plain text, json, or xml using: + %ul + %li + %code= "/health_check?token=#{current_application_settings.health_check_access_token}" + %li + %code= "/health_check.json?token=#{current_application_settings.health_check_access_token}" + %li + %code= "/health_check.xml?token=#{current_application_settings.health_check_access_token}" + +.bs-callout.clearfix + .pull-left + %p + You can reset the health check access token by pressing the button below. + %p + = button_to reset_health_check_token_admin_application_settings_path, + method: :put, class: 'btn btn-default', + data: { confirm: 'Are you sure you want to reset the health check token?' } do + = icon('refresh') + Reset health check access token + +%hr +.panel.panel-default + .panel-heading + Current Status: + - if @errors.blank? + = icon('circle', class: 'cgreen') + Healthy + - else + = icon('warning', class: 'cred') + Unhealthy + .panel-body + - if @errors.blank? + No Health Problems Detected + - else + = @errors |