Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove localhost from URLs #196

Merged
merged 2 commits into from Aug 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
@@ -1,3 +1,4 @@
hugo/public
vendor/
terraboard
dist/
8 changes: 4 additions & 4 deletions static/terraboard-vuejs/src/components/Charts.vue
Expand Up @@ -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) => {
Expand Down Expand Up @@ -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) => {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion static/terraboard-vuejs/src/components/Footer.vue
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion static/terraboard-vuejs/src/components/Navbar.vue
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions static/terraboard-vuejs/src/components/StatesList.vue
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
10 changes: 5 additions & 5 deletions static/terraboard-vuejs/src/views/Search.vue
Expand Up @@ -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) => {
Expand All @@ -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) => {
Expand All @@ -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) => {
Expand All @@ -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) => {
Expand Down Expand Up @@ -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) => {
Expand Down
8 changes: 4 additions & 4 deletions static/terraboard-vuejs/src/views/State.vue
Expand Up @@ -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) => {
Expand All @@ -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) => {
Expand Down Expand Up @@ -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 +
Expand Down Expand Up @@ -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 +
Expand Down