diff --git a/app/controllers/ping_controller.rb b/app/controllers/ping_controller.rb new file mode 100644 index 000000000..8f5b11857 --- /dev/null +++ b/app/controllers/ping_controller.rb @@ -0,0 +1,11 @@ +class PingController < ApplicationController + + def index + if (ActiveRecord::Base.connected?) + render nothing: true, status: 200, content_type: "application/json" + else + render nothing: true, status: 500, content_type: "application/json" + end + end + +end diff --git a/app/views/administrateurs/sessions/new.html.haml b/app/views/administrateurs/sessions/new.html.haml index c764b561f..b560b422d 100644 --- a/app/views/administrateurs/sessions/new.html.haml +++ b/app/views/administrateurs/sessions/new.html.haml @@ -1,4 +1,5 @@ #form_login + %br = image_tag('logo-tps.png') %br %h2#login_admin Administration diff --git a/app/views/gestionnaires/sessions/new.html.haml b/app/views/gestionnaires/sessions/new.html.haml index 29a43cadc..3a96664d7 100644 --- a/app/views/gestionnaires/sessions/new.html.haml +++ b/app/views/gestionnaires/sessions/new.html.haml @@ -1,4 +1,5 @@ #form_login + %br = image_tag('logo-tps.png') %br %h2#gestionnaire_login Accompagnateur diff --git a/config/routes.rb b/config/routes.rb index 37caf1f5a..81964b8d6 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,7 @@ Rails.application.routes.draw do + get "/ping" => "ping#index", :constraints => {:ip => /127.0.0.1/} + devise_for :administrations, skip: [:password, :registrations] devise_for :administrateurs, controllers: {