3 <div class="card" :class="item.class">
4 <a :href="item.url" :target="item.target" rel="noreferrer">
5 <div class="card-content">
7 <div v-if="item.logo" class="media-left">
8 <figure class="image is-48x48">
9 <img :src="item.logo" :alt="`${item.name} logo`" />
12 <div v-if="item.icon" class="media-left">
13 <figure class="image is-48x48">
14 <i style="font-size: 35px" :class="['fa-fw', item.icon]"></i>
17 <div class="media-content">
18 <p class="title is-4">{{ item.name }}</p>
19 <p class="subtitle is-6">{{ item.subtitle }}</p>
24 class="notif activity"
26 >{{ activity }}</strong
30 class="notif warnings"
32 >{{ warnings }}</strong
34 <strong v-if="errors > 0" class="notif errors" title="Error">{{
40 title="Connection error to Sonarr API, check url and apikey in config.yml"
45 <div class="tag" :class="item.tagstyle" v-if="item.tag">
46 <strong class="tag-text">#{{ item.tag }}</strong>
68 created: function () {
72 fetchConfig: function () {
73 fetch(`${this.item.url}/api/health`, {
74 credentials: "include",
75 headers: { "X-Api-Key": `${this.item.apikey}` },
78 if (response.status != 200) {
79 throw new Error(response.statusText);
81 return response.json();
86 for (var i = 0; i < health.length; i++) {
87 if (health[i].type == "warning") {
89 } else if (health[i].type == "error") {
96 this.serverError = true;
98 fetch(`${this.item.url}/api/queue`, {
99 credentials: "include",
100 headers: { "X-Api-Key": `${this.item.apikey}` },
102 .then((response) => {
103 if (response.status != 200) {
104 throw new Error(response.statusText);
106 return response.json();
110 for (var i = 0; i < queue.length; i++) {
111 if (queue[i].series) {
118 this.serverError = true;
125 <style scoped lang="scss">
132 font-family: sans-serif;
137 padding-right: 0.35em;
138 padding-left: 0.35em;
140 padding-bottom: 0.2em;
141 border-radius: 0.25em;
147 background-color: #4fb5d6;
151 background-color: #d08d2e;
155 background-color: #e51111;