diff --git a/assets/tailwind.config.js b/assets/tailwind.config.js
index 49d9b55..fdb2bc4 100644
--- a/assets/tailwind.config.js
+++ b/assets/tailwind.config.js
@@ -347,6 +347,38 @@ module.exports = {
},
{ values }
)
+ }),
+ plugin(function ({ matchComponents, theme }) {
+ let iconsDir = path.join(__dirname, './vendor/simple-icons')
+ let values = {}
+
+ fs.readdirSync(iconsDir).forEach((file) => {
+ let name = path.basename(file, '.svg')
+ values[name] = { name, fullPath: path.join(iconsDir, file) }
+ })
+
+ matchComponents(
+ {
+ si: ({ name, fullPath }) => {
+ let content = fs
+ .readFileSync(fullPath)
+ .toString()
+ .replace(/\r?\n|\r/g, '')
+ return {
+ [`--si-${name}`]: `url('data:image/svg+xml;utf8,${content}')`,
+ '-webkit-mask': `var(--si-${name})`,
+ mask: `var(--si-${name})`,
+ 'mask-repeat': 'no-repeat',
+ 'background-color': 'currentColor',
+ 'vertical-align': 'middle',
+ display: 'inline-block',
+ width: theme('spacing.5'),
+ height: theme('spacing.5')
+ }
+ }
+ },
+ { values }
+ )
})
]
}
diff --git a/assets/vendor/simple-icons/discord.svg b/assets/vendor/simple-icons/discord.svg
new file mode 100644
index 0000000..9d7796b
--- /dev/null
+++ b/assets/vendor/simple-icons/discord.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/vendor/simple-icons/github.svg b/assets/vendor/simple-icons/github.svg
new file mode 100644
index 0000000..2334976
--- /dev/null
+++ b/assets/vendor/simple-icons/github.svg
@@ -0,0 +1 @@
+
diff --git a/lib/pinchflat_web/components/core_components.ex b/lib/pinchflat_web/components/core_components.ex
index e66e236..518d465 100644
--- a/lib/pinchflat_web/components/core_components.ex
+++ b/lib/pinchflat_web/components/core_components.ex
@@ -700,7 +700,7 @@ defmodule PinchflatWeb.CoreComponents do
attr :class, :string, default: nil
attr :rest, :global
- def icon(%{name: "hero-" <> _} = assigns) do
+ def icon(assigns) do
~H"""
"""
diff --git a/lib/pinchflat_web/components/layouts.ex b/lib/pinchflat_web/components/layouts.ex
index 2dacac2..7312c30 100644
--- a/lib/pinchflat_web/components/layouts.ex
+++ b/lib/pinchflat_web/components/layouts.ex
@@ -15,11 +15,12 @@ defmodule PinchflatWeb.Layouts do
attr :text, :string, required: true
attr :href, :any, required: true
attr :target, :any, default: "_self"
+ attr :icon_class, :string, default: ""
def sidebar_item(assigns) do
~H"""
- <.sidebar_link icon={@icon} text={@text} href={@href} target={@target} />
+ <.sidebar_link icon={@icon} text={@text} href={@href} target={@target} icon_class={@icon_class} />
"""
end
@@ -89,6 +90,7 @@ defmodule PinchflatWeb.Layouts do
attr :href, :any, required: true
attr :target, :any, default: "_self"
attr :class, :string, default: ""
+ attr :icon_class, :string, default: ""
def sidebar_link(assigns) do
~H"""
@@ -103,7 +105,7 @@ defmodule PinchflatWeb.Layouts do
@class
]}
>
- <.icon :if={@icon} name={@icon} /> {@text}
+ <.icon :if={@icon} name={@icon} class={@icon_class} /> {@text}
"""
end
diff --git a/lib/pinchflat_web/components/layouts/partials/sidebar.html.heex b/lib/pinchflat_web/components/layouts/partials/sidebar.html.heex
index e5e5b39..6e5758b 100644
--- a/lib/pinchflat_web/components/layouts/partials/sidebar.html.heex
+++ b/lib/pinchflat_web/components/layouts/partials/sidebar.html.heex
@@ -47,8 +47,9 @@
text="Docs"
target="_blank"
href="https://github.com/kieraneglin/pinchflat/wiki"
+ icon_class="scale-110"
/>
- <.sidebar_item icon="hero-cog" text="Github" target="_blank" href="https://github.com/kieraneglin/pinchflat" />
+ <.sidebar_item icon="si-github" text="Github" target="_blank" href="https://github.com/kieraneglin/pinchflat" />
- <.icon name="hero-currency-dollar" /> Donate
+ <.icon name="hero-currency-dollar" class="scale-110" /> Donate
diff --git a/priv/grafana/application.json b/priv/grafana/application.json
index 6a1f580..1cc05d4 100644
--- a/priv/grafana/application.json
+++ b/priv/grafana/application.json
@@ -18,11 +18,7 @@
"limit": 100,
"name": "PromEx service start",
"showIn": 0,
- "tags": [
- "prom_ex",
- "pinchflat",
- "start"
- ],
+ "tags": ["prom_ex", "pinchflat", "start"],
"type": "tags"
},
{
@@ -33,11 +29,7 @@
"limit": 100,
"name": "PromEx service stop",
"showIn": 0,
- "tags": [
- "prom_ex",
- "pinchflat",
- "stop"
- ],
+ "tags": ["prom_ex", "pinchflat", "stop"],
"type": "tags"
}
]
@@ -108,9 +100,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "last"
- ],
+ "calcs": ["last"],
"fields": "",
"values": false
},
@@ -314,9 +304,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "last"
- ],
+ "calcs": ["last"],
"fields": "/^name$/",
"values": false
},
@@ -370,9 +358,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "last"
- ],
+ "calcs": ["last"],
"fields": "/^sha$/",
"values": false
},
@@ -426,9 +412,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "last"
- ],
+ "calcs": ["last"],
"fields": "/^author$/",
"values": false
},
@@ -482,9 +466,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "last"
- ],
+ "calcs": ["last"],
"fields": "/^version$/",
"values": false
},
@@ -538,9 +520,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "last"
- ],
+ "calcs": ["last"],
"fields": "/^modules$/",
"values": false
},
@@ -618,17 +598,10 @@
"to": "now"
},
"timepicker": {
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m"
- ]
+ "refresh_intervals": ["5s", "10s", "30s", "1m", "5m"]
},
"timezone": "",
"title": "Pinchflat - PromEx Application Dashboard",
"uid": "7DBBC471C5775585391E8F24D1E62319",
"version": 1
}
-
diff --git a/priv/grafana/beam.json b/priv/grafana/beam.json
index 4833357..d35d0f0 100644
--- a/priv/grafana/beam.json
+++ b/priv/grafana/beam.json
@@ -18,11 +18,7 @@
"limit": 100,
"name": "PromEx service start",
"showIn": 0,
- "tags": [
- "prom_ex",
- "pinchflat",
- "start"
- ],
+ "tags": ["prom_ex", "pinchflat", "start"],
"type": "tags"
},
{
@@ -33,11 +29,7 @@
"limit": 100,
"name": "PromEx service stop",
"showIn": 0,
- "tags": [
- "prom_ex",
- "pinchflat",
- "stop"
- ],
+ "tags": ["prom_ex", "pinchflat", "stop"],
"type": "tags"
}
]
@@ -122,9 +114,7 @@
"justifyMode": "center",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "last"
- ],
+ "calcs": ["last"],
"fields": "",
"values": false
},
@@ -336,9 +326,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "",
"values": false
},
@@ -400,9 +388,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "last"
- ],
+ "calcs": ["last"],
"fields": "",
"values": false
},
@@ -650,9 +636,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "last"
- ],
+ "calcs": ["last"],
"fields": "",
"values": false
},
@@ -714,9 +698,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "last"
- ],
+ "calcs": ["last"],
"fields": "",
"values": false
},
@@ -919,9 +901,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "last"
- ],
+ "calcs": ["last"],
"fields": "",
"values": false
},
@@ -983,9 +963,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "last"
- ],
+ "calcs": ["last"],
"fields": "",
"values": false
},
@@ -2341,17 +2319,10 @@
"to": "now"
},
"timepicker": {
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m"
- ]
+ "refresh_intervals": ["5s", "10s", "30s", "1m", "5m"]
},
"timezone": "",
"title": "Pinchflat - PromEx Beam Dashboard",
"uid": "14B578642B07F5DEA133D4DE6A6AAD0A",
"version": 1
}
-
diff --git a/priv/grafana/ecto.json b/priv/grafana/ecto.json
index 4a7d9f8..dc60a69 100644
--- a/priv/grafana/ecto.json
+++ b/priv/grafana/ecto.json
@@ -18,11 +18,7 @@
"limit": 100,
"name": "PromEx service start",
"showIn": 0,
- "tags": [
- "prom_ex",
- "pinchflat",
- "start"
- ],
+ "tags": ["prom_ex", "pinchflat", "start"],
"type": "tags"
},
{
@@ -33,11 +29,7 @@
"limit": 100,
"name": "PromEx service stop",
"showIn": 0,
- "tags": [
- "prom_ex",
- "pinchflat",
- "stop"
- ],
+ "tags": ["prom_ex", "pinchflat", "stop"],
"type": "tags"
}
]
@@ -121,9 +113,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "",
"values": false
},
@@ -177,9 +167,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "",
"values": false
},
@@ -233,9 +221,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "",
"values": false
},
@@ -289,9 +275,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "",
"values": false
},
@@ -345,9 +329,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "last"
- ],
+ "calcs": ["last"],
"fields": "/^repo$/",
"values": false
},
@@ -407,9 +389,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "last"
- ],
+ "calcs": ["last"],
"fields": "/^database_host$/",
"values": false
},
@@ -469,9 +449,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "last"
- ],
+ "calcs": ["last"],
"fields": "/^database_name$/",
"values": false
},
@@ -531,9 +509,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "last"
- ],
+ "calcs": ["last"],
"fields": "/init_pool_size/",
"values": false
},
@@ -593,9 +569,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "last"
- ],
+ "calcs": ["last"],
"fields": "/init_timeout_duration/",
"values": false
},
@@ -1264,17 +1238,10 @@
"to": "now"
},
"timepicker": {
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m"
- ]
+ "refresh_intervals": ["5s", "10s", "30s", "1m", "5m"]
},
"timezone": "",
"title": "Pinchflat - PromEx Ecto Dashboard",
"uid": "449823C137E6C016E4480ADDA42E94EE",
"version": 1
}
-
diff --git a/priv/grafana/oban.json b/priv/grafana/oban.json
index 4b127ba..bf6c843 100644
--- a/priv/grafana/oban.json
+++ b/priv/grafana/oban.json
@@ -18,11 +18,7 @@
"limit": 100,
"name": "PromEx service start",
"showIn": 0,
- "tags": [
- "prom_ex",
- "pinchflat",
- "start"
- ],
+ "tags": ["prom_ex", "pinchflat", "start"],
"type": "tags"
},
{
@@ -33,11 +29,7 @@
"limit": 100,
"name": "PromEx service stop",
"showIn": 0,
- "tags": [
- "prom_ex",
- "pinchflat",
- "stop"
- ],
+ "tags": ["prom_ex", "pinchflat", "stop"],
"type": "tags"
}
]
@@ -236,9 +228,7 @@
"displayMode": "lcd",
"orientation": "horizontal",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "",
"values": false
},
@@ -433,9 +423,7 @@
"justifyMode": "center",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "",
"values": false
},
@@ -490,9 +478,7 @@
"justifyMode": "center",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "",
"values": false
},
@@ -547,9 +533,7 @@
"justifyMode": "center",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "",
"values": false
},
@@ -2351,9 +2335,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "",
"values": false
},
@@ -2411,9 +2393,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "",
"values": false
},
@@ -2471,9 +2451,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "",
"values": false
},
@@ -2531,9 +2509,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "",
"values": false
},
@@ -2881,17 +2857,10 @@
"to": "now"
},
"timepicker": {
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m"
- ]
+ "refresh_intervals": ["5s", "10s", "30s", "1m", "5m"]
},
"timezone": "",
"title": "Pinchflat - PromEx Oban Dashboard",
"uid": "AF9058A0496CA7FF8D4FA747EEDC7AF3",
"version": 1
}
-
diff --git a/priv/grafana/phoenix.json b/priv/grafana/phoenix.json
index 88889a4..95dfa63 100644
--- a/priv/grafana/phoenix.json
+++ b/priv/grafana/phoenix.json
@@ -18,11 +18,7 @@
"limit": 100,
"name": "PromEx service start",
"showIn": 0,
- "tags": [
- "prom_ex",
- "pinchflat",
- "start"
- ],
+ "tags": ["prom_ex", "pinchflat", "start"],
"type": "tags"
},
{
@@ -33,11 +29,7 @@
"limit": 100,
"name": "PromEx service stop",
"showIn": 0,
- "tags": [
- "prom_ex",
- "pinchflat",
- "stop"
- ],
+ "tags": ["prom_ex", "pinchflat", "stop"],
"type": "tags"
}
]
@@ -121,9 +113,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "last"
- ],
+ "calcs": ["last"],
"fields": "/^endpoint$/",
"values": false
},
@@ -183,9 +173,7 @@
"justifyMode": "center",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "last"
- ],
+ "calcs": ["last"],
"fields": "/^port$/",
"values": false
},
@@ -246,9 +234,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "/^url$/",
"values": false
},
@@ -316,9 +302,7 @@
"justifyMode": "center",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "",
"values": false
},
@@ -380,9 +364,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "",
"values": false
},
@@ -436,9 +418,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "",
"values": false
},
@@ -492,9 +472,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "",
"values": false
},
@@ -561,9 +539,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "",
"values": false
},
@@ -626,9 +602,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "",
"values": false
},
@@ -682,9 +656,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "",
"values": false
},
@@ -738,9 +710,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "",
"values": false
},
@@ -1999,17 +1969,10 @@
"to": "now"
},
"timepicker": {
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m"
- ]
+ "refresh_intervals": ["5s", "10s", "30s", "1m", "5m"]
},
"timezone": "",
"title": "Pinchflat - PromEx Phoenix Dashboard",
"uid": "970297EC2ACFCF6777A4D3444B63C036",
"version": 1
}
-
diff --git a/priv/grafana/phoenix_live_view.json b/priv/grafana/phoenix_live_view.json
index bfb6834..edef6f7 100644
--- a/priv/grafana/phoenix_live_view.json
+++ b/priv/grafana/phoenix_live_view.json
@@ -18,11 +18,7 @@
"limit": 100,
"name": "PromEx service start",
"showIn": 0,
- "tags": [
- "prom_ex",
- "pinchflat",
- "start"
- ],
+ "tags": ["prom_ex", "pinchflat", "start"],
"type": "tags"
},
{
@@ -33,11 +29,7 @@
"limit": 100,
"name": "PromEx service stop",
"showIn": 0,
- "tags": [
- "prom_ex",
- "pinchflat",
- "stop"
- ],
+ "tags": ["prom_ex", "pinchflat", "stop"],
"type": "tags"
}
]
@@ -130,9 +122,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "",
"values": false
},
@@ -187,9 +177,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "",
"values": false
},
@@ -252,9 +240,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "",
"values": false
},
@@ -309,9 +295,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "/^Value$/",
"values": false
},
@@ -374,9 +358,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "",
"values": false
},
@@ -431,9 +413,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "",
"values": false
},
@@ -496,9 +476,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "",
"values": false
},
@@ -553,9 +531,7 @@
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
+ "calcs": ["lastNotNull"],
"fields": "/^Value$/",
"values": false
},
@@ -1395,17 +1371,10 @@
"to": "now"
},
"timepicker": {
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m"
- ]
+ "refresh_intervals": ["5s", "10s", "30s", "1m", "5m"]
},
"timezone": "",
"title": "Pinchflat - PromEx PhoenixLiveView Dashboard",
"uid": "57C5565313BA3CBE98CC2A2F8C18248F",
"version": 1
}
-