Admin protetto, dashboard KPI e aggiornamenti sito marketing.

Login admin con cambio password, metriche server (CPU/RAM/disco/banda), grafici e statistiche streaming; sezione piani ridimensionata.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-26 18:18:47 +02:00
parent 3d3420cc4a
commit 3a5649f482
26 changed files with 983 additions and 55 deletions

View File

@@ -0,0 +1,21 @@
class CreateAdminAccounts < ActiveRecord::Migration[7.2]
def up
create_table :admin_accounts, id: :uuid, default: -> { "gen_random_uuid()" } do |t|
t.string :username, null: false
t.string :password_digest, null: false
t.timestamps
end
add_index :admin_accounts, :username, unique: true
password_digest = BCrypt::Password.create("admin")
execute <<~SQL.squish
INSERT INTO admin_accounts (id, username, password_digest, created_at, updated_at)
VALUES (gen_random_uuid(), 'admin', #{connection.quote(password_digest)}, NOW(), NOW())
SQL
end
def down
drop_table :admin_accounts
end
end