Skip to content

Commit f150c6c

Browse files
authored
Add Traefik, Wallabag, Olivetin (#838)
* Add Traefik, Wallabag, Olivetin * allow subtitle override * add dummy data for olivetin, traefik, wallabag
1 parent 7909bd1 commit f150c6c

File tree

7 files changed

+326
-0
lines changed

7 files changed

+326
-0
lines changed

docs/customservices.md

+36
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ within Homer:
2828
- [Medusa](#medusa)
2929
- [Nextcloud](#nextcloud)
3030
- [OctoPrint / Moonraker](#octoprintmoonraker)
31+
- [Olivetin](#olivetin)
3132
- [OpenHAB](#openhab)
3233
- [OpenWeatherMap](#openweathermap)
3334
- [PaperlessNG](#paperlessng)
@@ -45,7 +46,9 @@ within Homer:
4546
- [Speedtest Tracker](#speedtesttracker)
4647
- [Tautulli](#tautulli)
4748
- [Tdarr](#tdarr)
49+
- [Traefik](#traefik)
4850
- [Uptime Kuma](#uptime-kuma)
51+
- [Wallabag](#wallabag)
4952
- [What's Up Docker](#whats-up-docker)
5053

5154
> [!IMPORTANT]
@@ -307,6 +310,17 @@ Moonraker's API mimmicks a few of OctoPrint's endpoints which makes these servic
307310
type: "OctoPrint"
308311
```
309312
313+
## Olivetin
314+
315+
This service displays a version string instead of a subtitle. Example configuration:
316+
317+
```yaml
318+
- name: Olivetin
319+
type: Olivetin
320+
logo: assets/tools/sample.png
321+
url: https://olivetin.example.com
322+
```
323+
310324
## OpenHAB
311325
312326
You need to set the type to OpenHAB, provide an api key and enable cors on OpenHAB.
@@ -594,6 +608,17 @@ for transcoding on your Tdarr instance as well as the number of errored items.
594608
checkInterval: 5000 # (Optional) Interval (in ms) for updating the queue & error counts
595609
```
596610

611+
## Traefik
612+
613+
This service displays a version string instead of a subtitle. Example configuration:
614+
615+
```yaml
616+
- name: Traefik
617+
type: Traefik
618+
logo: assets/tools/sample.png
619+
url: http://traefik.example.com
620+
```
621+
597622
## Uptime Kuma
598623

599624
Using the Uptime Kuma service you can display info about your instance uptime right on your Homer dashboard.
@@ -609,6 +634,17 @@ The following configuration is available for the UptimeKuma service. Needs v1.13
609634
type: "UptimeKuma"
610635
```
611636

637+
## Wallabag
638+
639+
This service displays a version string instead of a subtitle. Example configuration:
640+
641+
```yaml
642+
- name: Wallabag
643+
type: Wallabag
644+
logo: assets/tools/sample.png
645+
url: https://wallabag.example.com
646+
```
647+
612648
## What's up Docker
613649

614650
What's up Docker allow to display info about the number of container running and the number for which an update is available on your Homer dashboard.
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"Rest": "./api/",
3+
"ShowFooter": true,
4+
"ShowNavigation": true,
5+
"ShowNewVersions": true,
6+
"AvailableVersion": "none",
7+
"CurrentVersion": "2024.11.24",
8+
"PageTitle": "OliveTin",
9+
"SectionNavigationStyle": "sidebar",
10+
"DefaultIconForBack": "«",
11+
"SshFoundKey": "not found at /home/user/.ssh/id_rsa",
12+
"SshFoundConfig": "not found at /home/user/.ssh/config",
13+
"EnableCustomJs": false,
14+
"AuthLoginUrl": "",
15+
"AuthLocalLogin": false,
16+
"AuthOAuth2Providers": null,
17+
"AdditionalLinks": null
18+
}

dummy-data/traefik/api/version

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"Version": "3.1.7",
3+
"Codename": "comte",
4+
"startDate": "2024-11-20T05:55:46.259506879Z"
5+
}

dummy-data/wallabag/api/version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2.6.10"

src/components/services/Olivetin.vue

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
<template>
2+
<Generic :item="item">
3+
<template #content>
4+
<p class="title is-4">{{ item.name }}</p>
5+
<p class="subtitle is-6">
6+
<template v-if="item.subtitle">
7+
{{ item.subtitle }}
8+
</template>
9+
<template v-else-if="versionstring">
10+
Version {{ versionstring }}
11+
</template>
12+
</p>
13+
</template>
14+
<template #indicator>
15+
<div v-if="status" class="status" :class="status">
16+
{{ status }}
17+
</div>
18+
</template>
19+
</Generic>
20+
</template>
21+
22+
<script>
23+
import service from "@/mixins/service.js";
24+
import Generic from "./Generic.vue";
25+
26+
export default {
27+
name: "Olivetin",
28+
components: {
29+
Generic,
30+
},
31+
mixins: [service],
32+
props: {
33+
item: Object,
34+
},
35+
data: () => ({
36+
status: null,
37+
versionstring: null,
38+
}),
39+
created() {
40+
this.fetchStatus();
41+
},
42+
methods: {
43+
fetchStatus: async function () {
44+
this.fetch("/webUiSettings.json")
45+
.then((response) => {
46+
this.status = "online";
47+
this.versionstring = response.CurrentVersion;
48+
})
49+
.catch((e) => {
50+
this.status = "offline";
51+
console.log(e);
52+
});
53+
},
54+
},
55+
};
56+
</script>
57+
58+
<style scoped lang="scss">
59+
.status {
60+
font-size: 0.8rem;
61+
color: var(--text-title);
62+
white-space: nowrap;
63+
margin-left: 0.25rem;
64+
65+
&.online:before {
66+
background-color: #94e185;
67+
border-color: #78d965;
68+
box-shadow: 0 0 5px 1px #94e185;
69+
}
70+
71+
&.offline:before {
72+
background-color: #c9404d;
73+
border-color: #c42c3b;
74+
box-shadow: 0 0 5px 1px #c9404d;
75+
}
76+
77+
&:before {
78+
content: " ";
79+
display: inline-block;
80+
width: 7px;
81+
height: 7px;
82+
margin-right: 10px;
83+
border: 1px solid #000;
84+
border-radius: 7px;
85+
}
86+
}
87+
</style>

src/components/services/Traefik.vue

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
<template>
2+
<Generic :item="item">
3+
<template #content>
4+
<p class="title is-4">{{ item.name }}</p>
5+
<p class="subtitle is-6">
6+
<template v-if="item.subtitle">
7+
{{ item.subtitle }}
8+
</template>
9+
<template v-else-if="versionstring">
10+
Version {{ versionstring }}
11+
</template>
12+
</p>
13+
</template>
14+
<template #indicator>
15+
<div v-if="status" class="status" :class="status">
16+
{{ status }}
17+
</div>
18+
</template>
19+
</Generic>
20+
</template>
21+
22+
<script>
23+
import service from "@/mixins/service.js";
24+
import Generic from "./Generic.vue";
25+
26+
export default {
27+
name: "Traefik",
28+
components: {
29+
Generic,
30+
},
31+
mixins: [service],
32+
props: {
33+
item: Object,
34+
},
35+
data: () => ({
36+
fetchOk: null,
37+
versionstring: null,
38+
}),
39+
computed: {
40+
status: function () {
41+
return this.fetchOk ? "online" : "offline";
42+
},
43+
},
44+
created() {
45+
this.fetchStatus();
46+
},
47+
methods: {
48+
fetchStatus: async function () {
49+
this.fetch("/api/version")
50+
.then((response) => {
51+
this.fetchOk = true;
52+
this.versionstring = response.Version;
53+
})
54+
.catch((e) => {
55+
this.fetchOk = false;
56+
console.log(e);
57+
});
58+
},
59+
},
60+
};
61+
</script>
62+
63+
<style scoped lang="scss">
64+
.status {
65+
font-size: 0.8rem;
66+
color: var(--text-title);
67+
white-space: nowrap;
68+
margin-left: 0.25rem;
69+
70+
&.online:before {
71+
background-color: #94e185;
72+
border-color: #78d965;
73+
box-shadow: 0 0 5px 1px #94e185;
74+
}
75+
76+
&.offline:before {
77+
background-color: #c9404d;
78+
border-color: #c42c3b;
79+
box-shadow: 0 0 5px 1px #c9404d;
80+
}
81+
82+
&:before {
83+
content: " ";
84+
display: inline-block;
85+
width: 7px;
86+
height: 7px;
87+
margin-right: 10px;
88+
border: 1px solid #000;
89+
border-radius: 7px;
90+
}
91+
}
92+
</style>

src/components/services/Wallabag.vue

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
<template>
2+
<Generic :item="item">
3+
<template #content>
4+
<p class="title is-4">{{ item.name }}</p>
5+
<p class="subtitle is-6">
6+
<template v-if="item.subtitle">
7+
{{ item.subtitle }}
8+
</template>
9+
<template v-else-if="versionstring">
10+
Version {{ versionstring }}
11+
</template>
12+
</p>
13+
</template>
14+
<template #indicator>
15+
<div v-if="status" class="status" :class="status">
16+
{{ status }}
17+
</div>
18+
</template>
19+
</Generic>
20+
</template>
21+
22+
<script>
23+
import service from "@/mixins/service.js";
24+
import Generic from "./Generic.vue";
25+
26+
export default {
27+
name: "Wallabag",
28+
components: {
29+
Generic,
30+
},
31+
mixins: [service],
32+
props: {
33+
item: Object,
34+
},
35+
data: () => ({
36+
status: null,
37+
versionstring: null,
38+
}),
39+
created() {
40+
this.fetchStatus();
41+
},
42+
methods: {
43+
fetchStatus: async function () {
44+
this.fetch("/api/version")
45+
.then((response) => {
46+
this.status = "online";
47+
this.versionstring = response;
48+
})
49+
.catch((e) => {
50+
this.status = "offline";
51+
console.log(e);
52+
});
53+
},
54+
},
55+
};
56+
</script>
57+
58+
<style scoped lang="scss">
59+
.status {
60+
font-size: 0.8rem;
61+
color: var(--text-title);
62+
white-space: nowrap;
63+
margin-left: 0.25rem;
64+
65+
&.online:before {
66+
background-color: #94e185;
67+
border-color: #78d965;
68+
box-shadow: 0 0 5px 1px #94e185;
69+
}
70+
71+
&.offline:before {
72+
background-color: #c9404d;
73+
border-color: #c42c3b;
74+
box-shadow: 0 0 5px 1px #c9404d;
75+
}
76+
77+
&:before {
78+
content: " ";
79+
display: inline-block;
80+
width: 7px;
81+
height: 7px;
82+
margin-right: 10px;
83+
border: 1px solid #000;
84+
border-radius: 7px;
85+
}
86+
}
87+
</style>

0 commit comments

Comments
 (0)