From bb116a68dde888d91b900741c7b22295ebb175d4 Mon Sep 17 00:00:00 2001 From: Xavier J Date: Fri, 27 May 2016 10:15:19 +0200 Subject: [PATCH 1/2] Fix connexion view --- app/views/administrateurs/sessions/new.html.haml | 1 + app/views/gestionnaires/sessions/new.html.haml | 1 + 2 files changed, 2 insertions(+) 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 From 16ca40754277b6f9594967c786feefd253d1a56b Mon Sep 17 00:00:00 2001 From: Guillaume Lazzara Date: Wed, 1 Jun 2016 15:07:27 +0200 Subject: [PATCH 2/2] Add ping route --- app/controllers/ping_controller.rb | 11 +++++++++++ config/routes.rb | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 app/controllers/ping_controller.rb 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/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: {