Skip to content

Commit 2eb3082

Browse files
committed
Support the DevicesEndpoint
1 parent c317bd5 commit 2eb3082

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

lib/nerves_hub/prom_ex.ex

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@ defmodule NervesHub.PromEx do
99
# PromEx built in plugins
1010
Plugins.Application,
1111
Plugins.Beam,
12-
{Plugins.Phoenix, endpoint: NervesHubWeb.Endpoint, router: NervesHubWeb.Router},
12+
{
13+
PromEx.Plugins.Phoenix,
14+
endpoints: [
15+
{NervesHubWeb.Endpoint, routers: [NervesHubWeb.Router]},
16+
# DeviceEndpoint doesn't use a Router, but we need to pass to PromEx
17+
{NervesHubWeb.DeviceEndpoint, routers: [NervesHubWeb.Router]}
18+
]
19+
},
1320
Plugins.PhoenixLiveView,
1421
Plugins.Ecto,
1522
Plugins.Oban
@@ -27,7 +34,6 @@ defmodule NervesHub.PromEx do
2734
def dashboards do
2835
[
2936
# PromEx built in Grafana dashboards
30-
{:prom_ex, "application.json"},
3137
{:prom_ex, "beam.json"},
3238
{:nerves_hub, "grafana/phoenix.json"},
3339
{:nerves_hub, "grafana/phoenix_live_view.json"},

mix.exs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@ defmodule NervesHub.MixProject do
9898
{:phoenix_test, "0.3.1", only: :test, runtime: false},
9999
{:plug, "~> 1.7"},
100100
{:postgrex, "~> 0.14"},
101-
{:prom_ex, "~> 1.10",
102-
git: "https://github.com/joshk/prom_ex", ref: "plug_cowboy-should-be-optional"},
101+
{:prom_ex, "~> 1.10", git: "https://github.com/joshk/prom_ex", ref: "updated-with-prs"},
103102
{:scrivener_ecto, "~> 2.7"},
104103
{:scrivener_html, git: "https://github.com/nerves-hub/scrivener_html", branch: "phx-1.5"},
105104
{:sentry, "~> 10.0"},

mix.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"plug": {:hex, :plug, "1.16.1", "40c74619c12f82736d2214557dedec2e9762029b2438d6d175c5074c933edc9d", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "a13ff6b9006b03d7e33874945b2755253841b238c34071ed85b0e86057f8cddc"},
7070
"plug_crypto": {:hex, :plug_crypto, "2.1.0", "f44309c2b06d249c27c8d3f65cfe08158ade08418cf540fd4f72d4d6863abb7b", [:mix], [], "hexpm", "131216a4b030b8f8ce0f26038bc4421ae60e4bb95c5cf5395e1421437824c4fa"},
7171
"postgrex": {:hex, :postgrex, "0.19.1", "73b498508b69aded53907fe48a1fee811be34cc720e69ef4ccd568c8715495ea", [:mix], [{:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "8bac7885a18f381e091ec6caf41bda7bb8c77912bb0e9285212829afe5d8a8f8"},
72-
"prom_ex": {:git, "https://github.com/joshk/prom_ex", "e53b32d136568d3a34f5b2cc4370072b2d96da49", [ref: "plug_cowboy-should-be-optional"]},
72+
"prom_ex": {:git, "https://github.com/joshk/prom_ex", "6d11c1e8ad66d5851197e97e2b36287fabaa50e4", [ref: "updated-with-prs"]},
7373
"ranch": {:hex, :ranch, "2.1.0", "2261f9ed9574dcfcc444106b9f6da155e6e540b2f82ba3d42b339b93673b72a3", [:make, :rebar3], [], "hexpm", "244ee3fa2a6175270d8e1fc59024fd9dbc76294a321057de8f803b1479e76916"},
7474
"recon": {:hex, :recon, "2.5.6", "9052588e83bfedfd9b72e1034532aee2a5369d9d9343b61aeb7fbce761010741", [:mix, :rebar3], [], "hexpm", "96c6799792d735cc0f0fd0f86267e9d351e63339cbe03df9d162010cefc26bb0"},
7575
"scrivener": {:hex, :scrivener, "2.7.2", "1d913c965ec352650a7f864ad7fd8d80462f76a32f33d57d1e48bc5e9d40aba2", [:mix], [], "hexpm", "7866a0ec4d40274efbee1db8bead13a995ea4926ecd8203345af8f90d2b620d9"},

0 commit comments

Comments
 (0)