Skip to content

Commit 2111e64

Browse files
authored
Fix: Amsterdam error handling (#1948)
1 parent 6b06c06 commit 2111e64

File tree

2 files changed

+44
-8
lines changed

2 files changed

+44
-8
lines changed

launcher/public/output.css

+20-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:wght@100;200;300;400;500;600;700;800;900&display=swap");
22

33
/*
4-
! tailwindcss v3.4.6 | MIT License | https://tailwindcss.com
4+
! tailwindcss v3.4.4 | MIT License | https://tailwindcss.com
55
*/
66

77
/*
@@ -807,6 +807,10 @@ video {
807807
top: -90px;
808808
}
809809

810+
.bottom-0{
811+
bottom: 0px;
812+
}
813+
810814
.bottom-0\.5{
811815
bottom: 0.125rem;
812816
}
@@ -2378,6 +2382,11 @@ video {
23782382
flex: none;
23792383
}
23802384

2385+
.flex-shrink{
2386+
-ms-flex-negative: 1;
2387+
flex-shrink: 1;
2388+
}
2389+
23812390
.flex-shrink-0{
23822391
-ms-flex-negative: 0;
23832392
flex-shrink: 0;
@@ -2699,6 +2708,11 @@ video {
26992708
flex-direction: column;
27002709
}
27012710

2711+
.flex-wrap{
2712+
-ms-flex-wrap: wrap;
2713+
flex-wrap: wrap;
2714+
}
2715+
27022716
.place-content-center{
27032717
place-content: center;
27042718
}
@@ -5330,6 +5344,11 @@ html body {
53305344
left: 2px;
53315345
}
53325346

5347+
.after\:top-0::after{
5348+
content: var(--tw-content);
5349+
top: 0px;
5350+
}
5351+
53335352
.after\:top-0\.5::after{
53345353
content: var(--tw-content);
53355354
top: 0.125rem;

launcher/src/components/UI/the-control/AmsterdamComponent.vue

+24-7
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
}"
3838
@mouseenter="
3939
cursorLocation = `the current epoch: ${
40-
currentResult.currentEpoch
40+
currentResult?.currentEpoch || 'N/A'
4141
} and the slot number is ${n.slotNumber === 0 ? 'N/A' : n.slotNumber}`
4242
"
4343
@mouseleave="cursorLocation = ''"
@@ -47,7 +47,7 @@
4747
<div class="justified-part">
4848
<div class="Finalized-row">
4949
<div
50-
v-for="n in currentResult?.justifiedEpochStatus[0]"
50+
v-for="n in currentResult?.justifiedEpochStatus?.[0] || []"
5151
:key="n"
5252
class="Finalized-square"
5353
:class="{
@@ -56,14 +56,16 @@
5656
red: n.slotStatus == 'missed',
5757
}"
5858
@mouseenter="
59-
cursorLocation = `the justified epoch: ${currentResult.currentJustifiedEpoch} and the slot number is ${n.slotNumber}`
59+
cursorLocation = `the justified epoch: ${
60+
currentResult?.currentJustifiedEpoch || 'N/A'
61+
} and the slot number is ${n.slotNumber}`
6062
"
6163
@mouseleave="cursorLocation = ''"
6264
></div>
6365
</div>
6466
<div class="Finalized-row">
6567
<div
66-
v-for="n in currentResult?.preJustifiedEpochStatus[0]"
68+
v-for="n in currentResult?.preJustifiedEpochStatus?.[0] || []"
6769
:key="n"
6870
class="Finalized-square"
6971
:class="{
@@ -72,7 +74,9 @@
7274
red: n.slotStatus == 'missed',
7375
}"
7476
@mouseenter="
75-
cursorLocation = `the previous justified epoch: ${currentResult.previousJustifiedEpoch} and the slot number is ${n.slotNumber}`
77+
cursorLocation = `the previous justified epoch: ${
78+
currentResult?.previousJustifiedEpoch || 'N/A'
79+
} and the slot number is ${n.slotNumber}`
7680
"
7781
@mouseleave="cursorLocation = ''"
7882
></div>
@@ -81,7 +85,7 @@
8185
<div class="Finalized-part">
8286
<div class="Finalized-row">
8387
<div
84-
v-for="n in currentResult?.finalizedEpochStatus[0]"
88+
v-for="n in currentResult?.finalizedEpochStatus?.[0] || []"
8589
:key="n"
8690
class="Finalized-square"
8791
:class="{
@@ -90,7 +94,9 @@
9094
red: n.slotStatus == 'missed',
9195
}"
9296
@mouseenter="
93-
cursorLocation = `the Finalized epoch: ${currentResult.finalizedEpoch} and the slot number is ${n.slotNumber}`
97+
cursorLocation = `the Finalized epoch: ${
98+
currentResult?.finalizedEpoch || 'N/A'
99+
} and the slot number is ${n.slotNumber}`
94100
"
95101
@mouseleave="cursorLocation = ''"
96102
></div>
@@ -109,6 +115,7 @@ import { useServices } from "@/store/services";
109115
import ControlService from "@/store/ControlService";
110116
import NoData from "./NoData.vue";
111117
import { useSetups } from "@/store/setups";
118+
import { useRouter } from "vue-router";
112119
113120
export default {
114121
components: {
@@ -197,6 +204,8 @@ export default {
197204
this.installedServicesController === "consensus and Prometheus"
198205
) {
199206
return false;
207+
} else if (this.proposedBlock === undefined) {
208+
return true;
200209
} else if (this.consensusClientIsOff === true) {
201210
return false;
202211
} else if (this.prometheusIsOff === true) {
@@ -259,6 +268,14 @@ export default {
259268
deep: true,
260269
},
261270
},
271+
272+
created() {
273+
const router = useRouter();
274+
if (!this.proposedBlock) {
275+
router.push("/node");
276+
}
277+
},
278+
262279
mounted() {
263280
this.refreshTimer();
264281
},

0 commit comments

Comments
 (0)