about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-12-13 13:42:10 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-12-13 13:42:10 +0100
commit76ec90799352603406728cb51b4e70913413f2bd (patch)
treeb6ab2aa6e04d99c89f0a8ac6442170ca539ba6b8 /config
parent668013265c3153383088d9dd53970ae837c1d405 (diff)
Improved admin UI
Diffstat (limited to 'config')
-rw-r--r--config/navigation.rb11
-rw-r--r--config/routes.rb5
2 files changed, 14 insertions, 2 deletions
diff --git a/config/navigation.rb b/config/navigation.rb
new file mode 100644
index 000000000..1b6615ed0
--- /dev/null
+++ b/config/navigation.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+SimpleNavigation::Configuration.run do |navigation|
+  navigation.items do |primary|
+    primary.item :accounts, safe_join([fa_icon('users fw'), 'Accounts']), admin_accounts_url
+    primary.item :pubsubhubbubs, safe_join([fa_icon('paper-plane-o fw'), 'PubSubHubbub']), admin_pubsubhubbub_index_url
+    primary.item :domain_blocks, safe_join([fa_icon('lock fw'), 'Domain Blocks']), admin_domain_blocks_url
+    primary.item :sidekiq, safe_join([fa_icon('diamond fw'), 'Sidekiq']), sidekiq_url
+    primary.item :pghero, safe_join([fa_icon('database fw'), 'PgHero']), pghero_url
+  end
+end
diff --git a/config/routes.rb b/config/routes.rb
index cde84d3bc..2d70bdcea 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -6,8 +6,8 @@ Rails.application.routes.draw do
   mount ActionCable.server, at: 'cable'
 
   authenticate :user, lambda { |u| u.admin? } do
-    mount Sidekiq::Web, at: 'sidekiq'
-    mount PgHero::Engine, at: 'pghero'
+    mount Sidekiq::Web, at: 'sidekiq', as: :sidekiq
+    mount PgHero::Engine, at: 'pghero', as: :pghero
   end
 
   use_doorkeeper do
@@ -46,6 +46,7 @@ Rails.application.routes.draw do
 
   namespace :admin do
     resources :pubsubhubbub, only: [:index]
+    resources :domain_blocks, only: [:index, :create]
 
     resources :accounts, only: [:index, :show, :update] do
       member do