From f1698d14619e9cc3ec99e8851d0695b2e8f96699 Mon Sep 17 00:00:00 2001 From: pabois <pierreandre.boissinot@noesya.coop> Date: Mon, 9 May 2022 14:11:06 +0200 Subject: [PATCH] display number of enqueued tasks --- app/views/admin/application/_nav.html.erb | 7 +++++++ config/locales/en.yml | 1 + config/locales/fr.yml | 1 + db/schema.rb | 19 +------------------ 4 files changed, 10 insertions(+), 18 deletions(-) diff --git a/app/views/admin/application/_nav.html.erb b/app/views/admin/application/_nav.html.erb index 8843006cb..ae1ae913b 100644 --- a/app/views/admin/application/_nav.html.erb +++ b/app/views/admin/application/_nav.html.erb @@ -5,7 +5,14 @@ <% end %> <%= render_navigation context: :admin %> + <footer class="small my-5"> + <hr> + <div class="sidebar-header"> + <p class="small"> + <%= t('admin.number_of_enqueued_tasks', tasks: Delayed::Job.all.length) %> + </p> + </div> <hr> <%= link_to 'API', api_root_path, class: 'sidebar-link' %> <% diff --git a/config/locales/en.yml b/config/locales/en.yml index 413c3e8cf..013fe4bf7 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -47,6 +47,7 @@ en: sentence_without_link: Value inherited sentence_html: Value inherited from %{link} status: Inherited value + number_of_enqueued_tasks: "Number of enqueued tasks: %{tasks}" password_hint: Leave blank if you do not wish to change the password. successfully_created_html: "<i>%{model}</i> was successfully created." successfully_destroyed_html: "<i>%{model}</i> was successfully destroyed." diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 1e8778ab4..ad8733416 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -47,6 +47,7 @@ fr: sentence_without_link: Valeur héritée sentence_html: Valeur héritée de %{link} status: Valeur héritée + number_of_enqueued_tasks: "Nombre de tâches à traiter : %{tasks}" password_hint: Laissez vide si vous ne souhaitez pas modifier le mot de passe. successfully_created_html: "<i>%{model}</i> a bien été créé(e)." successfully_destroyed_html: "<i>%{model}</i> a bien été détruit(e)." diff --git a/db/schema.rb b/db/schema.rb index 4c5f75e29..7b136e975 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -490,23 +490,6 @@ ActiveRecord::Schema.define(version: 2022_05_05_131539) do t.index ["university_id"], name: "index_education_schools_on_university_id" end - create_table "external_organizations", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| - t.string "title" - t.text "description" - t.string "address" - t.string "zipcode" - t.string "city" - t.string "country" - t.string "website" - t.string "phone" - t.string "mail" - t.boolean "active" - t.string "sirene" - t.integer "kind" - t.datetime "created_at", precision: 6, null: false - t.datetime "updated_at", precision: 6, null: false - end - create_table "languages", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| t.string "name" t.string "iso_code" @@ -697,8 +680,8 @@ ActiveRecord::Schema.define(version: 2022_05_05_131539) do t.string "linkedin" t.boolean "is_alumnus", default: false t.text "description_short" - t.string "name" t.boolean "is_author" + t.string "name" t.index ["university_id"], name: "index_university_people_on_university_id" t.index ["user_id"], name: "index_university_people_on_user_id" end -- GitLab