mirror of
https://github.com/netfun2000/hipudding-teslamate.git
synced 2026-02-27 09:44:28 +08:00
* feat: update to Phenix HTML 4.1 * fix: updating to the new Gettext.Backend approach * chore: update pot files ro locale version 45.0.0 * fix: downgrade cloack back to 1.1.2 * revert: merge of mix.lock * fix: new syntax for field name generation for phx-feedback-for * Revert "fix: new syntax for field name generation for phx-feedback-for" This reverts commit 4d95e4f1c9367d2d5c606ced2190ab23edcb971b. * fix: downgrade floki back to 0.35.2 * Revert "fix: downgrade floki back to 0.35.2" This reverts commit a4f0b6bf4b32099d89003c3d20f72333d510e109. * fix: ensure floki nil is handled * style: linter findings * Revert "fix: ensure floki nil is handled" * fix: new syntax for field name generation for phx-feedback-for * debug: floki paramter error * Revert "debug: floki paramter error" This reverts commit 61920267edf5186b593920bde7d87e8b30af55aa. * fix: Remove unnecessary code in settings_test.exs which breaks floki 0.36+
20 lines
478 B
Elixir
20 lines
478 B
Elixir
defmodule TeslaMateWeb.LayoutView do
|
|
use TeslaMateWeb, :view
|
|
|
|
import Phoenix.Component
|
|
use PhoenixHTMLHelpers
|
|
|
|
dashboards =
|
|
for dashboard_path <- Path.wildcard("grafana/dashboards/*.json") do
|
|
@external_resource Path.relative_to_cwd(dashboard_path)
|
|
|
|
dashboard_path
|
|
|> File.read!()
|
|
|> Jason.decode!()
|
|
|> Map.take(["title", "uid"])
|
|
end
|
|
|
|
@dashboards Enum.sort_by(dashboards, & &1["title"])
|
|
defp list_dashboards, do: @dashboards
|
|
end
|