File tree 2 files changed +104
-0
lines changed
2 files changed +104
-0
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ within Homer:
50
50
- [ Tdarr] ( #tdarr )
51
51
- [ Traefik] ( #traefik )
52
52
- [ Uptime Kuma] ( #uptime-kuma )
53
+ - [ Vaultwarden] ( #vaultwarden )
53
54
- [ Wallabag] ( #wallabag )
54
55
- [ What's Up Docker] ( #whats-up-docker )
55
56
@@ -670,6 +671,17 @@ The following configuration is available for the UptimeKuma service. Needs v1.13
670
671
slug: "myCustomDashboard" # Defaults to "default" if not provided.
671
672
type: "UptimeKuma"
672
673
` ` `
674
+ # # Vaultwarden
675
+
676
+ This service displays a version string instead of a subtitle. The indicator
677
+ shows if Vaultwarden is online, offline
678
+
679
+ ` ` ` yaml
680
+ - name: "Vaultwarden - Server"
681
+ type: "Vaultwarden"
682
+ logo: "assets/tools/sample.png"
683
+ url: "http://vaultwarden.example.com"
684
+ ` ` `
673
685
674
686
# # Wallabag
675
687
Original file line number Diff line number Diff line change
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: " Vaultwarden" ,
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;
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 >
You can’t perform that action at this time.
0 commit comments