Skip to content

Commit

Permalink
fix(frontend): set role=button on plans explorer's carets
Browse files Browse the repository at this point in the history
feat(frontend): use UTC fomat for plan's date
fix(frontend): remove localhost URLs
  • Loading branch information
hbollon committed Aug 25, 2021
1 parent 91ac1eb commit 5cd7969
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions static/terraboard-vuejs/src/views/PlansExplorer.vue
Expand Up @@ -24,12 +24,14 @@
<label id="navigate" v-if="results.length != 0">
<span
class="fas fa-caret-left"
role="button"
v-on:click="refreshList(pager.prevPage)"
v-if="pager.prevPage"
></span>
{{ pager.startItems }}-{{ pager.itemsInPage }}/{{ results.total }}
<span
class="fas fa-caret-right"
role="button"
v-on:click="refreshList(pager.nextPage)"
v-if="pager.nextPage"
></span>
Expand Down Expand Up @@ -113,10 +115,10 @@ import router from "../router";
this.clearPath();
},
formatDate(date: string): string {
return new Date(date).toLocaleString();
return new Date(date).toUTCString();
},
fetchStates() {
const url = `http://localhost:8080/api/lineages/stats`
const url = `/api/lineages/stats`
axios.get(url)
.then((response) => {
// handle success
Expand Down Expand Up @@ -159,7 +161,7 @@ import router from "../router";
.join("&");
router.push({ name: "Plans", query: params });
const url = `http://localhost:8080/api/plans?` + query;
const url = `/api/plans?` + query;
axios
.get(url)
.then((response) => {
Expand Down
6 changes: 3 additions & 3 deletions static/terraboard-vuejs/src/views/State.vue
Expand Up @@ -262,7 +262,7 @@ import StatePlan from "../components/StatePlan.vue";
this.display.plan = true;
},
formatDate(date: string): string {
return new Date(date).toLocaleString();
return new Date(date).toUTCString();
},
fetchLocks(): void {
const url = `/api/locks`;
Expand All @@ -285,7 +285,7 @@ import StatePlan from "../components/StatePlan.vue";
});
},
fetchLatestPlans(limit: number): void {
const url = `http://localhost:8080/api/plans?limit=`+limit+`&lineage=`+this.url.lineage;
const url = `/api/plans?limit=`+limit+`&lineage=`+this.url.lineage;
axios
.get(url)
.then((response) => {
Expand All @@ -301,7 +301,7 @@ import StatePlan from "../components/StatePlan.vue";
}
});
if (planFinded === false) {
const url = `http://localhost:8080/api/plans?lineage=`+this.url.lineage;
const url = `/api/plans?lineage=`+this.url.lineage;
axios
.get(url)
.then((response) => {
Expand Down

0 comments on commit 5cd7969

Please sign in to comment.