Skip to content

Commit

Permalink
Fix: Amsterdam error handling (#1948)
Browse files Browse the repository at this point in the history
  • Loading branch information
mabasian authored Jul 17, 2024
1 parent 6b06c06 commit 2111e64
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 8 deletions.
21 changes: 20 additions & 1 deletion launcher/public/output.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:wght@100;200;300;400;500;600;700;800;900&display=swap");

/*
! tailwindcss v3.4.6 | MIT License | https://tailwindcss.com
! tailwindcss v3.4.4 | MIT License | https://tailwindcss.com
*/

/*
Expand Down Expand Up @@ -807,6 +807,10 @@ video {
top: -90px;
}

.bottom-0{
bottom: 0px;
}

.bottom-0\.5{
bottom: 0.125rem;
}
Expand Down Expand Up @@ -2378,6 +2382,11 @@ video {
flex: none;
}

.flex-shrink{
-ms-flex-negative: 1;
flex-shrink: 1;
}

.flex-shrink-0{
-ms-flex-negative: 0;
flex-shrink: 0;
Expand Down Expand Up @@ -2699,6 +2708,11 @@ video {
flex-direction: column;
}

.flex-wrap{
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}

.place-content-center{
place-content: center;
}
Expand Down Expand Up @@ -5330,6 +5344,11 @@ html body {
left: 2px;
}

.after\:top-0::after{
content: var(--tw-content);
top: 0px;
}

.after\:top-0\.5::after{
content: var(--tw-content);
top: 0.125rem;
Expand Down
31 changes: 24 additions & 7 deletions launcher/src/components/UI/the-control/AmsterdamComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
}"
@mouseenter="
cursorLocation = `the current epoch: ${
currentResult.currentEpoch
currentResult?.currentEpoch || 'N/A'
} and the slot number is ${n.slotNumber === 0 ? 'N/A' : n.slotNumber}`
"
@mouseleave="cursorLocation = ''"
Expand All @@ -47,7 +47,7 @@
<div class="justified-part">
<div class="Finalized-row">
<div
v-for="n in currentResult?.justifiedEpochStatus[0]"
v-for="n in currentResult?.justifiedEpochStatus?.[0] || []"
:key="n"
class="Finalized-square"
:class="{
Expand All @@ -56,14 +56,16 @@
red: n.slotStatus == 'missed',
}"
@mouseenter="
cursorLocation = `the justified epoch: ${currentResult.currentJustifiedEpoch} and the slot number is ${n.slotNumber}`
cursorLocation = `the justified epoch: ${
currentResult?.currentJustifiedEpoch || 'N/A'
} and the slot number is ${n.slotNumber}`
"
@mouseleave="cursorLocation = ''"
></div>
</div>
<div class="Finalized-row">
<div
v-for="n in currentResult?.preJustifiedEpochStatus[0]"
v-for="n in currentResult?.preJustifiedEpochStatus?.[0] || []"
:key="n"
class="Finalized-square"
:class="{
Expand All @@ -72,7 +74,9 @@
red: n.slotStatus == 'missed',
}"
@mouseenter="
cursorLocation = `the previous justified epoch: ${currentResult.previousJustifiedEpoch} and the slot number is ${n.slotNumber}`
cursorLocation = `the previous justified epoch: ${
currentResult?.previousJustifiedEpoch || 'N/A'
} and the slot number is ${n.slotNumber}`
"
@mouseleave="cursorLocation = ''"
></div>
Expand All @@ -81,7 +85,7 @@
<div class="Finalized-part">
<div class="Finalized-row">
<div
v-for="n in currentResult?.finalizedEpochStatus[0]"
v-for="n in currentResult?.finalizedEpochStatus?.[0] || []"
:key="n"
class="Finalized-square"
:class="{
Expand All @@ -90,7 +94,9 @@
red: n.slotStatus == 'missed',
}"
@mouseenter="
cursorLocation = `the Finalized epoch: ${currentResult.finalizedEpoch} and the slot number is ${n.slotNumber}`
cursorLocation = `the Finalized epoch: ${
currentResult?.finalizedEpoch || 'N/A'
} and the slot number is ${n.slotNumber}`
"
@mouseleave="cursorLocation = ''"
></div>
Expand All @@ -109,6 +115,7 @@ import { useServices } from "@/store/services";
import ControlService from "@/store/ControlService";
import NoData from "./NoData.vue";
import { useSetups } from "@/store/setups";
import { useRouter } from "vue-router";
export default {
components: {
Expand Down Expand Up @@ -197,6 +204,8 @@ export default {
this.installedServicesController === "consensus and Prometheus"
) {
return false;
} else if (this.proposedBlock === undefined) {
return true;
} else if (this.consensusClientIsOff === true) {
return false;
} else if (this.prometheusIsOff === true) {
Expand Down Expand Up @@ -259,6 +268,14 @@ export default {
deep: true,
},
},
created() {
const router = useRouter();
if (!this.proposedBlock) {
router.push("/node");
}
},
mounted() {
this.refreshTimer();
},
Expand Down

0 comments on commit 2111e64

Please sign in to comment.