From 76a46c3507b5c0daef7edcb165e949dea4968e2f Mon Sep 17 00:00:00 2001
From: Colin <mcclurec@gmail.com>
Date: Wed, 11 Aug 2021 15:38:24 -0700
Subject: Update Ping.vue

---
 src/components/services/Ping.vue | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'src/components/services/Ping.vue')

diff --git a/src/components/services/Ping.vue b/src/components/services/Ping.vue
index 8a9b7a4..e693af4 100644
--- a/src/components/services/Ping.vue
+++ b/src/components/services/Ping.vue
@@ -50,7 +50,11 @@ export default {
   methods: {
     fetchStatus: async function () {
       const url = `${this.item.url}`;
-      fetch(url, { method: "HEAD", cache: "no-cache" })
+      fetch(url, {
+        method: "HEAD",
+        cache: "no-cache",
+        credentials: "include",
+      })
         .then((response) => {
           if (!response.ok) {
             throw Error(response.statusText);
-- 
cgit v1.2.3


From 2ca4faad9cb336ac8904bbc775fdcc2a12731b90 Mon Sep 17 00:00:00 2001
From: Bastien Wirtz <bastien.wirtz@gmail.com>
Date: Wed, 6 Oct 2021 22:55:09 +0200
Subject: Extendable base service for easier development.

---
 src/components/services/Ping.vue | 49 ++++++++++------------------------------
 1 file changed, 12 insertions(+), 37 deletions(-)

(limited to 'src/components/services/Ping.vue')

diff --git a/src/components/services/Ping.vue b/src/components/services/Ping.vue
index e693af4..6fd3ec5 100644
--- a/src/components/services/Ping.vue
+++ b/src/components/services/Ping.vue
@@ -1,46 +1,24 @@
 <template>
-  <div>
-    <div class="card" :class="item.class">
-      <a :href="item.url" :target="item.target" rel="noreferrer">
-        <div class="card-content">
-          <div class="media">
-            <div v-if="item.logo" class="media-left">
-              <figure class="image is-48x48">
-                <img :src="item.logo" :alt="`${item.name} logo`" />
-              </figure>
-            </div>
-            <div v-if="item.icon" class="media-left">
-              <figure class="image is-48x48">
-                <i style="font-size: 35px" :class="['fa-fw', item.icon]"></i>
-              </figure>
-            </div>
-            <div class="media-content">
-              <p class="title is-4">{{ item.name }}</p>
-              <p class="subtitle is-6">
-                <template v-if="item.subtitle">
-                  {{ item.subtitle }}
-                </template>
-              </p>
-            </div>
-            <div v-if="status" class="status" :class="status">
-              {{ status }}
-            </div>
-          </div>
-          <div class="tag" :class="item.tagstyle" v-if="item.tag">
-            <strong class="tag-text">#{{ item.tag }}</strong>
-          </div>
-        </div>
-      </a>
-    </div>
-  </div>
+  <Generic :item="item">
+    <template #indicator>
+      <div v-if="status" class="status" :class="status">
+        {{ status }}
+      </div>
+    </template>
+  </Generic>
 </template>
 
 <script>
+import Generic from "./Generic.vue";
+
 export default {
   name: "Ping",
   props: {
     item: Object,
   },
+  components: {
+    Generic,
+  },
   data: () => ({
     status: null,
   }),
@@ -70,9 +48,6 @@ export default {
 </script>
 
 <style scoped lang="scss">
-.media-left img {
-  max-height: 100%;
-}
 .status {
   font-size: 0.8rem;
   color: var(--text-title);
-- 
cgit v1.2.3

