Transform the dashboard into a single-pane-of-glass command center that blends operational metrics with business context from Gaiia subscriber data. - Extend insight schema with multi-source support (snmp, gaiia, system) - Add Oban workers for automated insight generation (device health, system, gaiia) - New Dashboard context with health score computation and site summaries - Rewrite dashboard LiveView with health overview, alert/insight feeds, site grid - Add source filter pills for insights with URL state management - Add metrics bar to site detail pages (device count, alerts, subscribers, MRR) - Add subscriber/MRR context to alert list site links - Add subscriber badges to device list site headers - Real-time PubSub updates for alerts on dashboard
15 lines
573 B
Elixir
15 lines
573 B
Elixir
defmodule Towerops.Repo.Migrations.AddSourceToPreseemInsights do
|
|
use Ecto.Migration
|
|
|
|
def change do
|
|
alter table(:preseem_insights) do
|
|
add :source, :string, null: false, default: "preseem"
|
|
add :site_id, references(:sites, type: :binary_id, on_delete: :nilify_all)
|
|
add :agent_token_id, references(:agent_tokens, type: :binary_id, on_delete: :nilify_all)
|
|
end
|
|
|
|
create index(:preseem_insights, [:organization_id, :source, :status])
|
|
create index(:preseem_insights, [:site_id])
|
|
create index(:preseem_insights, [:agent_token_id])
|
|
end
|
|
end
|