Skip to content

Commit

Permalink
v1.16.1
Browse files Browse the repository at this point in the history
  • Loading branch information
simonprev committed May 1, 2023
1 parent ec8fabf commit a2b017b
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 30 deletions.
6 changes: 5 additions & 1 deletion lib/accent/telemetry_ui/ecto_psql_extras.ex
Expand Up @@ -97,7 +97,11 @@ defmodule Accent.TelemetryUI.EctoPSQLExtras do
defp memory_unit(:KB), do: 1024

defimpl TelemetryUI.Web.Component do
def render(metric, _assigns) do
def to_image(_metric, _, _assigns) do
raise("not implemented")
end

def to_html(metric, _assigns) do
{:safe,
"""
<details class="relative flex flex-col bg-white dark:bg-black/40 text-slate dark:text-white p-3 pt-2 shadow">
Expand Down
1 change: 1 addition & 0 deletions lib/accent/telemetry_ui/telemetry_ui.ex
Expand Up @@ -240,6 +240,7 @@ defmodule Accent.TelemetryUI do
primary_color: "#28cb87",
title: "Accent metrics",
share_key: "012345678912345",
share_path: "/metrics-public",
logo: """
<svg
viewBox="0 0 480 480"
Expand Down
4 changes: 3 additions & 1 deletion lib/web/router.ex
Expand Up @@ -50,6 +50,8 @@ defmodule Accent.Router do
end
end

get("/metrics-public", TelemetryUI.Web.Share, [])

scope "/" do
pipe_through(:metrics)
get("/metrics", TelemetryUI.Web, [], assigns: %{telemetry_ui_allowed: true})
Expand Down Expand Up @@ -95,6 +97,6 @@ defmodule Accent.Router do

# Catch all route to serve the webapp from static dir
get("/", WebAppController, [])
get("/app*path", WebAppController, [])
get("/app/*path", WebAppController, [])
end
end
8 changes: 4 additions & 4 deletions mix.exs
@@ -1,7 +1,7 @@
defmodule Accent.Mixfile do
use Mix.Project

@version "1.16.0"
@version "1.16.1"

def project do
[
Expand Down Expand Up @@ -45,8 +45,8 @@ defmodule Accent.Mixfile do
{:canary, "~> 1.1.0"},
{:corsica, "~> 1.0"},
{:plug_cowboy, "~> 2.0"},
{:cowboy, "~> 2.0", override: true},
{:plug, "1.10.4", override: true},
{:cowboy, "~> 2.0"},
{:plug, "~> 1.10"},
{:plug_canonical_host, "~> 2.0"},

# Database
Expand Down Expand Up @@ -102,7 +102,7 @@ defmodule Accent.Mixfile do
{:new_relic_agent, "~> 1.27"},
{:new_relic_absinthe, "~> 0.0"},
{:telemetry, "~> 1.0", override: true},
{:telemetry_ui, "~> 2.0"},
{:telemetry_ui, "~> 3.0"},
{:ecto_psql_extras, "~> 0.7"},

# Mock testing
Expand Down

0 comments on commit a2b017b

Please sign in to comment.