Tidy up homepage and navigation

This commit is contained in:
Dan Milne
2025-11-09 20:58:13 +11:00
parent c9e2992fe0
commit 1f4428348d
56 changed files with 2822 additions and 955 deletions

View File

@@ -11,6 +11,14 @@ Rails.application.routes.draw do
# Admin user management (admin only)
resources :users, only: [:index, :show, :edit, :update]
# DSN management (admin only)
resources :dsns do
member do
post :disable
post :enable
end
end
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
# Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500.
@@ -20,24 +28,22 @@ Rails.application.routes.draw do
# WAF API
namespace :api, defaults: { format: :json } do
# Event ingestion (PRIMARY method - includes rule updates in response)
post ":project_id/events", to: "events#create"
post "events", to: "events#create"
# Rule synchronization (SECONDARY - for admin/debugging only)
# Note: Agents should use event responses for rule synchronization
get ":public_key/rules/version", to: "rules#version"
get ":public_key/rules", to: "rules#index"
get "rules/version", to: "rules#version"
get "rules", to: "rules#index"
end
# Root path - projects dashboard
root "projects#index"
# Analytics dashboard
get "analytics", to: "analytics#index"
# Project management
resources :projects, only: [:index, :new, :create, :show, :edit, :update] do
resources :events, only: [:index]
member do
get :analytics
end
end
# Root path - analytics dashboard
root "analytics#index"
# Event management
resources :events, only: [:index]
# Network range management
resources :network_ranges, only: [:index, :show, :new, :create, :edit, :update, :destroy] do