diff --git a/.gitignore b/.gitignore index 047877ae..92e7803a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ hugo/public vendor/ terraboard +dist/ diff --git a/static/terraboard-vuejs/src/components/Charts.vue b/static/terraboard-vuejs/src/components/Charts.vue index 4d62eba7..543493d4 100644 --- a/static/terraboard-vuejs/src/components/Charts.vue +++ b/static/terraboard-vuejs/src/components/Charts.vue @@ -100,7 +100,7 @@ const chartOptionsLocked = router.push({name: "Search", query: { tf_version: this.pieTfVersions.labels[valueIndex] }}); }, fetchResourceTypes(): void { - const url = `http://localhost:8080/api/resource/types/count`; + const url = `/api/resource/types/count`; axios.get(url) .then((response) => { response.data.forEach((value: any, i: number) => { @@ -152,7 +152,7 @@ const chartOptionsLocked = }); }, fetchVersions(): void { - const url = `http://localhost:8080/api/lineages/tfversion/count?orderBy=version`; + const url = `/api/lineages/tfversion/count?orderBy=version`; axios.get(url) .then((response) => { response.data.forEach((value: any, i: number) => { @@ -204,7 +204,7 @@ const chartOptionsLocked = }); }, fetchLocks(): void { - const url = `http://localhost:8080/api/locks`; + const url = `/api/locks`; axios.get(url) .then((response) => { this.locks = response.data; @@ -259,7 +259,7 @@ const chartOptionsLocked = this.fetchResourceTypes(); this.fetchVersions(); - const url = `http://localhost:8080/api/lineages/stats?page=1`; + const url = `/api/lineages/stats?page=1`; axios.get(url) .then((response) => { this.statesTotal = response.data.total; diff --git a/static/terraboard-vuejs/src/components/Footer.vue b/static/terraboard-vuejs/src/components/Footer.vue index 349046d8..bbfdfe18 100644 --- a/static/terraboard-vuejs/src/components/Footer.vue +++ b/static/terraboard-vuejs/src/components/Footer.vue @@ -24,7 +24,7 @@ import axios from "axios"; }, methods: { fetchVersion(): void { - const url = `http://localhost:8080/api/version`; + const url = `/api/version`; axios.get(url) .then((response) => { this.version = response.data.version; diff --git a/static/terraboard-vuejs/src/components/Navbar.vue b/static/terraboard-vuejs/src/components/Navbar.vue index dd5f4ac9..3b268362 100644 --- a/static/terraboard-vuejs/src/components/Navbar.vue +++ b/static/terraboard-vuejs/src/components/Navbar.vue @@ -101,7 +101,7 @@ import router from "../router"; this.$refs.quickAccess.clear() }, fetchStates() { - const url = `http://localhost:8080/api/lineages/stats` + const url = `/api/lineages/stats` axios.get(url) .then((response) => { // handle success diff --git a/static/terraboard-vuejs/src/components/StatesList.vue b/static/terraboard-vuejs/src/components/StatesList.vue index da416e95..5168859e 100644 --- a/static/terraboard-vuejs/src/components/StatesList.vue +++ b/static/terraboard-vuejs/src/components/StatesList.vue @@ -70,7 +70,7 @@ Chart.register( CategoryScale, LineElement, LineController, LinearScale, PointEl }, methods: { fetchLocks(): void { - const url = `http://localhost:8080/api/locks`; + const url = `/api/locks`; axios.get(url) .then((response) => { this.locksStatus = response.data; @@ -95,7 +95,7 @@ Chart.register( CategoryScale, LineElement, LineController, LinearScale, PointEl return false; }, getActivity(idx: number, lineage: string, elementId: string): void { - const url = `http://localhost:8080/api/lineages/` + lineage + `/activity`; + const url = `/api/lineages/` + lineage + `/activity`; axios.get(url) .then((response) => { let states = response.data; @@ -193,7 +193,7 @@ Chart.register( CategoryScale, LineElement, LineController, LinearScale, PointEl this.itemsInPage = Math.min(this.itemsPerPage * this.page, this.results.total); }, fetchStats(page: number): void { - const url = `http://localhost:8080/api/lineages/stats?page=`+page; + const url = `/api/lineages/stats?page=`+page; axios.get(url) .then((response) => { this.updatePager(response); diff --git a/static/terraboard-vuejs/src/views/Search.vue b/static/terraboard-vuejs/src/views/Search.vue index c1b8ec08..bb962a03 100644 --- a/static/terraboard-vuejs/src/views/Search.vue +++ b/static/terraboard-vuejs/src/views/Search.vue @@ -187,7 +187,7 @@ import router from "../router"; this.doSearch(); }, fetchTfVersions() { - const url = `http://localhost:8080/api/tf_versions`; + const url = `/api/tf_versions`; axios .get(url) .then((response) => { @@ -207,7 +207,7 @@ import router from "../router"; }); }, fetchResourceTypes() { - const url = `http://localhost:8080/api/resource/types`; + const url = `/api/resource/types`; axios .get(url) .then((response) => { @@ -227,7 +227,7 @@ import router from "../router"; }); }, fetchResourceIDs() { - const url = `http://localhost:8080/api/resource/names`; + const url = `/api/resource/names`; axios .get(url) .then((response) => { @@ -247,7 +247,7 @@ import router from "../router"; }); }, fetchAttributeKeys() { - const url = `http://localhost:8080/api/attribute/keys`; + const url = `/api/attribute/keys`; axios .get(url) .then((response) => { @@ -296,7 +296,7 @@ import router from "../router"; .join("&"); router.push({ name: "Search", query: params }); - const url = `http://localhost:8080/api/search/attribute?` + query; + const url = `/api/search/attribute?` + query; axios .get(url) .then((response) => { diff --git a/static/terraboard-vuejs/src/views/State.vue b/static/terraboard-vuejs/src/views/State.vue index 6a481e69..79c56bc5 100644 --- a/static/terraboard-vuejs/src/views/State.vue +++ b/static/terraboard-vuejs/src/views/State.vue @@ -200,7 +200,7 @@ import StatesCompare from "../components/StatesCompare.vue"; }, methods: { fetchLocks(): void { - const url = `http://localhost:8080/api/locks`; + const url = `/api/locks`; axios .get(url) .then((response) => { @@ -221,7 +221,7 @@ import StatesCompare from "../components/StatesCompare.vue"; }, getVersions(): void { const url = - `http://localhost:8080/api/lineages/` + this.url.lineage + `/activity`; + `/api/lineages/` + this.url.lineage + `/activity`; axios .get(url) .then((response) => { @@ -281,7 +281,7 @@ import StatesCompare from "../components/StatesCompare.vue"; versionId = ""; } const url = - "http://localhost:8080/api/lineages/" + + "/api/lineages/" + this.url.lineage + "?versionid=" + versionId + @@ -323,7 +323,7 @@ import StatesCompare from "../components/StatesCompare.vue"; this.display.compare = true; const url = - `http://localhost:8080/api/lineages/` + + `/api/lineages/` + this.url.lineage + "/compare?from=" + this.selectedVersion +