37
37
}"
38
38
@mouseenter ="
39
39
cursorLocation = `the current epoch: ${
40
- currentResult.currentEpoch
40
+ currentResult? .currentEpoch || 'N/A'
41
41
} and the slot number is ${n.slotNumber === 0 ? 'N/A' : n.slotNumber}`
42
42
"
43
43
@mouseleave =" cursorLocation = ''"
47
47
<div class =" justified-part" >
48
48
<div class =" Finalized-row" >
49
49
<div
50
- v-for =" n in currentResult?.justifiedEpochStatus[0 ]"
50
+ v-for =" n in currentResult?.justifiedEpochStatus?.[0] || [ ]"
51
51
:key =" n"
52
52
class =" Finalized-square"
53
53
:class =" {
56
56
red: n.slotStatus == 'missed',
57
57
}"
58
58
@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}`
60
62
"
61
63
@mouseleave =" cursorLocation = ''"
62
64
></div >
63
65
</div >
64
66
<div class =" Finalized-row" >
65
67
<div
66
- v-for =" n in currentResult?.preJustifiedEpochStatus[0 ]"
68
+ v-for =" n in currentResult?.preJustifiedEpochStatus?.[0] || [ ]"
67
69
:key =" n"
68
70
class =" Finalized-square"
69
71
:class =" {
72
74
red: n.slotStatus == 'missed',
73
75
}"
74
76
@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}`
76
80
"
77
81
@mouseleave =" cursorLocation = ''"
78
82
></div >
81
85
<div class =" Finalized-part" >
82
86
<div class =" Finalized-row" >
83
87
<div
84
- v-for =" n in currentResult?.finalizedEpochStatus[0 ]"
88
+ v-for =" n in currentResult?.finalizedEpochStatus?.[0] || [ ]"
85
89
:key =" n"
86
90
class =" Finalized-square"
87
91
:class =" {
90
94
red: n.slotStatus == 'missed',
91
95
}"
92
96
@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}`
94
100
"
95
101
@mouseleave =" cursorLocation = ''"
96
102
></div >
@@ -109,6 +115,7 @@ import { useServices } from "@/store/services";
109
115
import ControlService from " @/store/ControlService" ;
110
116
import NoData from " ./NoData.vue" ;
111
117
import { useSetups } from " @/store/setups" ;
118
+ import { useRouter } from " vue-router" ;
112
119
113
120
export default {
114
121
components: {
@@ -197,6 +204,8 @@ export default {
197
204
this .installedServicesController === " consensus and Prometheus"
198
205
) {
199
206
return false ;
207
+ } else if (this .proposedBlock === undefined ) {
208
+ return true ;
200
209
} else if (this .consensusClientIsOff === true ) {
201
210
return false ;
202
211
} else if (this .prometheusIsOff === true ) {
@@ -259,6 +268,14 @@ export default {
259
268
deep: true ,
260
269
},
261
270
},
271
+
272
+ created () {
273
+ const router = useRouter ();
274
+ if (! this .proposedBlock ) {
275
+ router .push (" /node" );
276
+ }
277
+ },
278
+
262
279
mounted () {
263
280
this .refreshTimer ();
264
281
},
0 commit comments