Skip to content

Commit

Permalink
fix: support of non numeric instances id (#254)
Browse files Browse the repository at this point in the history
* fix: support of non numeric instances id

* fixes
  • Loading branch information
pedrofaria authored Nov 1, 2023
1 parent 8aa71d6 commit 88940fe
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 16 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 1.22.1
* Full support for non numeric instances id

## 1.22.0
* Fix arm64 node dependencies
* Fix live view for non numeric instance ids
Expand Down
16 changes: 11 additions & 5 deletions public/src/pages/live.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
v-bind:class="{'tbl-row': true, active: car.carID === showLaps}"
>
<td>{{carId+1}}</td>
<td>{{car.currentDriver ? car.currentDriver.name : car.carID}}</td>
<td>{{car.currentDriver ? car.currentDriver.name.toUpperCase() : car.carID}}</td>
<td>{{car.raceNumber}}</td>
<td>{{car.carModel}}</td>
<td>{{car.nrLaps}}</td>
Expand Down Expand Up @@ -124,7 +124,7 @@ export default {
components: {layout},
data() {
return {
id: "0",
id: "",
showLaps: null,
showLapsCar: null,
data: {
Expand Down Expand Up @@ -175,7 +175,7 @@ export default {
}
if (this.showLaps !== null) {
this.setShowLaps(this.showLaps);
this.setShowLaps(this.showLaps, true);
}
})
.catch(e => {
Expand All @@ -188,9 +188,15 @@ export default {
this.refreshList();
}, 10000);
},
setShowLaps(carID) {
setShowLaps(carID, refresh) {
if (refresh === undefined && this.showLaps === carID) {
this.showLaps = null;
this.showLapsCar = null;
return;
}
this.showLaps = carID;
this.showLapsCar = this.data.live.cars[carID]
this.showLapsCar = this.data.live.cars[carID];
},
lastLap(laps) {
if (laps === undefined || laps.length === 0) {
Expand Down
12 changes: 2 additions & 10 deletions public/src/pages/logs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,13 @@ export default {
components: {layout, end},
data() {
return {
id: 0,
id: "",
servername: "",
logs: ""
};
},
/*watch: {
logs() {
// vue needs some time to render the textareas content
setTimeout(() => {
this.$refs.output.scrollTop = this.$refs.output.scrollHeight;
}, 200);
}
},*/
mounted() {
this.id = parseInt(this.$route.query.id);
this.id = this.$route.query.id;
this.loadServer();
this.loadLogs();
},
Expand Down
2 changes: 1 addition & 1 deletion public/src/pages/server.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default {
data() {
return {
activeTab: 0,
id: 0,
id: "",
servername: "Server name (by accweb)",
configurationJson: null,
settingsJson: null,
Expand Down

0 comments on commit 88940fe

Please sign in to comment.