5 <strong v-if="activity > 0" class="notif activity" title="Activity">
8 <strong v-if="warnings > 0" class="notif warnings" title="Warning">
11 <strong v-if="errors > 0" class="notif errors" title="Error">
17 title="Connection error to Sonarr API, check url and apikey in config.yml"
27 import service from "@/mixins/service.js";
28 import Generic from "./Generic.vue";
30 const V3_API = "/api/v3";
31 const LEGACY_API = "/api";
44 return this.item.legacyApi ? LEGACY_API : V3_API;
55 created: function () {
59 fetchConfig: function () {
60 this.fetch(`${this.apiPath}/health?apikey=${this.item.apikey}`)
64 for (var i = 0; i < health.length; i++) {
65 if (health[i].type == "warning") {
67 } else if (health[i].type == "error") {
74 this.serverError = true;
76 this.fetch(`${this.apiPath}/queue?apikey=${this.item.apikey}`)
79 if (this.item.legacyApi) {
80 for (var i = 0; i < queue.length; i++) {
81 if (queue[i].series) {
86 this.activity = queue.totalRecords;
91 this.serverError = true;
98 <style scoped lang="scss">
102 font-family: sans-serif;
107 display: inline-block;
108 padding: 0.2em 0.35em;
109 border-radius: 0.25em;
115 background-color: #4fb5d6;
119 background-color: #d08d2e;
123 background-color: #e51111;