mirror of https://github.com/bastienwirtz/homer
add service matrix, view status and version
parent
b11bee7d64
commit
2a290004b7
|
@ -25,6 +25,7 @@ within Homer:
|
||||||
- [Immich](#immich)
|
- [Immich](#immich)
|
||||||
- [Jellystat](#jellystat)
|
- [Jellystat](#jellystat)
|
||||||
- [Lidarr, Prowlarr, Sonarr, Readarr and Radarr](#lidarr-prowlarr-sonarr-readarr-and-radarr)
|
- [Lidarr, Prowlarr, Sonarr, Readarr and Radarr](#lidarr-prowlarr-sonarr-readarr-and-radarr)
|
||||||
|
- [Matrix](#matrix)
|
||||||
- [Mealie](#mealie)
|
- [Mealie](#mealie)
|
||||||
- [Medusa](#medusa)
|
- [Medusa](#medusa)
|
||||||
- [Nextcloud](#nextcloud)
|
- [Nextcloud](#nextcloud)
|
||||||
|
@ -276,6 +277,18 @@ If you are using an older version of Radarr or Sonarr which don't support the ne
|
||||||
legacyApi: true
|
legacyApi: true
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Matrix
|
||||||
|
|
||||||
|
This service displays a version string instead of a subtitle. The indicator
|
||||||
|
shows if Matrix Server is online, offline
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: "Matrix - Server"
|
||||||
|
type: "Matrix"
|
||||||
|
logo: "assets/tools/sample.png"
|
||||||
|
url: "http://matrix.example.com"
|
||||||
|
```
|
||||||
|
|
||||||
## Mealie
|
## Mealie
|
||||||
|
|
||||||
First off make sure to remove an existing `subtitle` as it will take precedence if set.
|
First off make sure to remove an existing `subtitle` as it will take precedence if set.
|
||||||
|
|
|
@ -0,0 +1,92 @@
|
||||||
|
<template>
|
||||||
|
<Generic :item="item">
|
||||||
|
<template #content>
|
||||||
|
<p class="title is-4">{{ item.name }}</p>
|
||||||
|
<p class="subtitle is-6">
|
||||||
|
<template v-if="item.subtitle">
|
||||||
|
{{ item.subtitle }}
|
||||||
|
</template>
|
||||||
|
<template v-else-if="versionstring">
|
||||||
|
Version {{ versionstring }}
|
||||||
|
</template>
|
||||||
|
</p>
|
||||||
|
</template>
|
||||||
|
<template #indicator>
|
||||||
|
<div v-if="status" class="status" :class="status">
|
||||||
|
{{ status }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</Generic>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import service from "@/mixins/service.js";
|
||||||
|
import Generic from "./Generic.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Matrix",
|
||||||
|
components: {
|
||||||
|
Generic,
|
||||||
|
},
|
||||||
|
mixins: [service],
|
||||||
|
props: {
|
||||||
|
item: Object,
|
||||||
|
},
|
||||||
|
data: () => ({
|
||||||
|
fetchOk: null,
|
||||||
|
versionstring: null,
|
||||||
|
}),
|
||||||
|
computed: {
|
||||||
|
status: function () {
|
||||||
|
return this.fetchOk ? "online" : "offline";
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.fetchStatus();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
fetchStatus: async function () {
|
||||||
|
this.fetch("_matrix/federation/v1/version")
|
||||||
|
.then((response) => {
|
||||||
|
this.fetchOk = true;
|
||||||
|
this.versionstring = response.server.version;
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
this.fetchOk = false;
|
||||||
|
console.log(e);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.status {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
color: var(--text-title);
|
||||||
|
white-space: nowrap;
|
||||||
|
margin-left: 0.25rem;
|
||||||
|
|
||||||
|
&.online:before {
|
||||||
|
background-color: #94e185;
|
||||||
|
border-color: #78d965;
|
||||||
|
box-shadow: 0 0 5px 1px #94e185;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.offline:before {
|
||||||
|
background-color: #c9404d;
|
||||||
|
border-color: #c42c3b;
|
||||||
|
box-shadow: 0 0 5px 1px #c9404d;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
content: " ";
|
||||||
|
display: inline-block;
|
||||||
|
width: 7px;
|
||||||
|
height: 7px;
|
||||||
|
margin-right: 10px;
|
||||||
|
border: 1px solid #000;
|
||||||
|
border-radius: 7px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in New Issue