From 733b6f4b61dca4cce690686c983aae85497970b7 Mon Sep 17 00:00:00 2001 From: Joel Collins Date: Tue, 14 Jan 2020 14:26:59 +0000 Subject: [PATCH] Fixed snapshot loader --- src/components/viewComponents/connectComponents/hostCard.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/viewComponents/connectComponents/hostCard.vue b/src/components/viewComponents/connectComponents/hostCard.vue index ed14ac92..d7f429a2 100644 --- a/src/components/viewComponents/connectComponents/hostCard.vue +++ b/src/components/viewComponents/connectComponents/hostCard.vue @@ -75,6 +75,7 @@ export default { data: function() { return { + snapshotRule: "/api/v2/streams/snapshot", snapshotSrc: "", snapshotAvailable: false, polling: null @@ -86,7 +87,7 @@ export default { return `http://${this.hostname}:${this.port}/routes`; }, snapshotURL: function() { - return `http://${this.hostname}:${this.port}/api/v2/streams/snapshot`; + return `http://${this.hostname}:${this.port}${this.snapshotRule}`; } }, @@ -112,7 +113,7 @@ export default { .get(this.routesURL) .then(response => { // If the host has a snapshot route available - if ("/api/v1/snapshot" in response.data) { + if (this.snapshotRule in response.data) { // Tell the view that a snapshot is available this.snapshotAvailable = true; // Update the snapshot URL