From 3faeac7e9fc3601283c58e2d585e00f346250e10 Mon Sep 17 00:00:00 2001 From: Robin Schneider Date: Fri, 8 Oct 2021 17:42:23 +0200 Subject: Added custom fontawesome icon color option with link property --- docs/configuration.md | 2 ++ public/assets/config.yml.dist | 2 ++ src/assets/app.scss | 1 + src/assets/defaults.yml | 2 ++ 4 files changed, 7 insertions(+) diff --git a/docs/configuration.md b/docs/configuration.md index d90981a..e1630af 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -47,6 +47,7 @@ colors: text-title: "#303030" text-subtitle: "#424242" card-shadow: rgba(0, 0, 0, 0.1) + link: "#3273dc" link-hover: "#363636" background-image: "assets/your/light/bg.png" dark: @@ -60,6 +61,7 @@ colors: text-title: "#fafafa" text-subtitle: "#f5f5f5" card-shadow: rgba(0, 0, 0, 0.4) + link: "#3273dc" link-hover: "#ffdd57" background-image: "assets/your/dark/bg.png" diff --git a/public/assets/config.yml.dist b/public/assets/config.yml.dist index 65c5098..acdd32c 100644 --- a/public/assets/config.yml.dist +++ b/public/assets/config.yml.dist @@ -24,6 +24,7 @@ colors: text-title: "#303030" text-subtitle: "#424242" card-shadow: rgba(0, 0, 0, 0.1) + link: "#3273dc" link-hover: "#363636" dark: highlight-primary: "#3367d6" @@ -36,6 +37,7 @@ colors: text-title: "#fafafa" text-subtitle: "#f5f5f5" card-shadow: rgba(0, 0, 0, 0.4) + link: "#3273dc" link-hover: "#ffdd57" # Optional message diff --git a/src/assets/app.scss b/src/assets/app.scss index f2dfb37..c709282 100644 --- a/src/assets/app.scss +++ b/src/assets/app.scss @@ -31,6 +31,7 @@ body { transition: background-color cubic-bezier(0.165, 0.84, 0.44, 1) 300ms; a { + color: var(--link); &:hover { color: var(--link-hover); } diff --git a/src/assets/defaults.yml b/src/assets/defaults.yml index f011346..7d3a863 100644 --- a/src/assets/defaults.yml +++ b/src/assets/defaults.yml @@ -23,6 +23,7 @@ colors: text-title: "#303030" text-subtitle: "#424242" card-shadow: rgba(0, 0, 0, 0.1) + link: "#3273dc" link-hover: "#363636" background-image: "" dark: @@ -36,6 +37,7 @@ colors: text-title: "#fafafa" text-subtitle: "#f5f5f5" card-shadow: rgba(0, 0, 0, 0.4) + link: "#3273dc" link-hover: "#ffdd57" background-image: "" -- cgit v1.2.3 From 8d9cfa98bdeb88445f2f33d630998ac9b1f0dcd7 Mon Sep 17 00:00:00 2001 From: Artur Bauer Date: Sun, 10 Oct 2021 22:14:33 +0200 Subject: Add Prometheus custom component --- src/components/services/Prometheus.vue | 167 +++++++++++++++++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 src/components/services/Prometheus.vue diff --git a/src/components/services/Prometheus.vue b/src/components/services/Prometheus.vue new file mode 100644 index 0000000..25e9ddd --- /dev/null +++ b/src/components/services/Prometheus.vue @@ -0,0 +1,167 @@ + + + + + -- cgit v1.2.3 From 277dafafa958c970af1a36783cb9e03da2944717 Mon Sep 17 00:00:00 2001 From: Artur Bauer Date: Sun, 10 Oct 2021 22:20:34 +0200 Subject: Update docs --- docs/customservices.md | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/docs/customservices.md b/docs/customservices.md index ef84948..548af96 100644 --- a/docs/customservices.md +++ b/docs/customservices.md @@ -6,16 +6,15 @@ within Homer. If you experiencing any issue, please have a look to the [troubleshooting](troubleshooting.md) page. - ## Common options ```yaml -- name: "My Service" - logo: "assets/tools/sample.png" - url: "http://my-service-link" - endpoint: "http://my-service-endpoint" # Optional: alternative base URL used to fetch service data is necessary. +- name: 'My Service' + logo: 'assets/tools/sample.png' + url: 'http://my-service-link' + endpoint: 'http://my-service-endpoint' # Optional: alternative base URL used to fetch service data is necessary. useCredentials: false # Optional: Override global proxy.useCredentials configuration. - type: "" + type: '' ``` ⚠️🚧 `endpoint` & `useCredentials` new options are not yet supported by all custom services (but will be very soon). @@ -93,3 +92,15 @@ For Ping you need to set the type to Ping and provide a url. subtitle: "Bookmark example" tag: "app" url: "https://www.reddit.com/r/selfhosted/" ``` + +## Prometheus + +For Prometheus you need to set the type to Prometheus and provide a url. + +```yaml +- name: "Prometheus" + type: Prometheus + logo: "assets/tools/sample.png" + url: "http://192.168.0.151/" + # subtitle: "Monitor data server" +``` -- cgit v1.2.3 From 80ba98cf661801956f773bdfd0b0ded1b2f80487 Mon Sep 17 00:00:00 2001 From: Artur Bauer Date: Mon, 11 Oct 2021 18:38:13 +0200 Subject: Code review fixes --- docs/customservices.md | 11 ++-- src/components/services/Prometheus.vue | 96 +++++++++++++--------------------- 2 files changed, 42 insertions(+), 65 deletions(-) diff --git a/docs/customservices.md b/docs/customservices.md index 548af96..7a151d1 100644 --- a/docs/customservices.md +++ b/docs/customservices.md @@ -6,15 +6,16 @@ within Homer. If you experiencing any issue, please have a look to the [troubleshooting](troubleshooting.md) page. + ## Common options ```yaml -- name: 'My Service' - logo: 'assets/tools/sample.png' - url: 'http://my-service-link' - endpoint: 'http://my-service-endpoint' # Optional: alternative base URL used to fetch service data is necessary. +- name: "My Service" + logo: "assets/tools/sample.png" + url: "http://my-service-link" + endpoint: "http://my-service-endpoint" # Optional: alternative base URL used to fetch service data is necessary. useCredentials: false # Optional: Override global proxy.useCredentials configuration. - type: '' + type: "" ``` ⚠️🚧 `endpoint` & `useCredentials` new options are not yet supported by all custom services (but will be very soon). diff --git a/src/components/services/Prometheus.vue b/src/components/services/Prometheus.vue index 25e9ddd..6efcb34 100644 --- a/src/components/services/Prometheus.vue +++ b/src/components/services/Prometheus.vue @@ -1,57 +1,41 @@