aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/components/services
diff options
context:
space:
mode:
authorBastien Wirtz <bastien.wirtz@gmail.com>2022-02-10 22:07:00 +0100
committerBastien Wirtz <bastien.wirtz@gmail.com>2022-02-10 22:07:00 +0100
commit893690cf95eda1233a094e0d1b63011ff740989e (patch)
tree280dcf3b57349bfff6a7d6d5cc6b9936b3b749ac /src/components/services
parentdec7e466b981ba48390e4771ba0f4e54a311c181 (diff)
downloadhomer-893690cf95eda1233a094e0d1b63011ff740989e.tar.gz
homer-893690cf95eda1233a094e0d1b63011ff740989e.tar.zst
homer-893690cf95eda1233a094e0d1b63011ff740989e.zip
Lint fixesv22.02.1
Diffstat (limited to 'src/components/services')
-rw-r--r--src/components/services/Prowlarr.vue24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/components/services/Prowlarr.vue b/src/components/services/Prowlarr.vue
index c122ca0..abaa0f0 100644
--- a/src/components/services/Prowlarr.vue
+++ b/src/components/services/Prowlarr.vue
@@ -21,8 +21,8 @@
21</template> 21</template>
22 22
23<script> 23<script>
24import service from "@/mixins/service.js" 24import service from "@/mixins/service.js";
25import Generic from "./Generic.vue" 25import Generic from "./Generic.vue";
26 26
27export default { 27export default {
28 name: "Prowlarr", 28 name: "Prowlarr",
@@ -38,32 +38,32 @@ export default {
38 warnings: null, 38 warnings: null,
39 errors: null, 39 errors: null,
40 serverError: false, 40 serverError: false,
41 } 41 };
42 }, 42 },
43 created: function () { 43 created: function () {
44 this.fetchConfig() 44 this.fetchConfig();
45 }, 45 },
46 methods: { 46 methods: {
47 fetchConfig: function () { 47 fetchConfig: function () {
48 this.fetch(`/api/v1/health?apikey=${this.item.apikey}`) 48 this.fetch(`/api/v1/health?apikey=${this.item.apikey}`)
49 .then((health) => { 49 .then((health) => {
50 this.warnings = 0 50 this.warnings = 0;
51 this.errors = 0 51 this.errors = 0;
52 for (var i = 0; i < health.length; i++) { 52 for (var i = 0; i < health.length; i++) {
53 if (health[i].type == "warning") { 53 if (health[i].type == "warning") {
54 this.warnings++ 54 this.warnings++;
55 } else if (health[i].type == "error") { 55 } else if (health[i].type == "error") {
56 this.errors++ 56 this.errors++;
57 } 57 }
58 } 58 }
59 }) 59 })
60 .catch((e) => { 60 .catch((e) => {
61 console.error(e) 61 console.error(e);
62 this.serverError = true 62 this.serverError = true;
63 }) 63 });
64 }, 64 },
65 }, 65 },
66} 66};
67</script> 67</script>
68 68
69<style scoped lang="scss"> 69<style scoped lang="scss">