defmodule Grafana.Panel.Embed do def api_host, do: Application.get_env(:grafana, :api_host) def username, do: Application.get_env(:grafana, :username) def password, do: Application.get_env(:grafana, :password) # model # defp build_src(uri, panel_id) do "#{api_host()}/dashboard-solo/db/#{uri}?panelId=#{panel_id}" end def get_html(uri, panel_id, width, height, border) do src = build_src uri, panel_id "" end def model(uri, panel_id, width, height, border) do src = build_src uri, panel_id %{src: src, width: width, height: height, frameborder: border} end end