Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
goshimmer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iota-imt
goshimmer
Commits
848eea43
Unverified
Commit
848eea43
authored
4 years ago
by
Levente Pap
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix crashing local dashboard with explorer (#682)
parent
ad45b495
No related branches found
No related tags found
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
plugins/dashboard/frontend/src/app/components/SyncBeaconPayload.tsx
+7
-0
7 additions, 0 deletions
...shboard/frontend/src/app/components/SyncBeaconPayload.tsx
plugins/dashboard/packrd/packed-packr.go
+19
-45
19 additions, 45 deletions
plugins/dashboard/packrd/packed-packr.go
with
26 additions
and
45 deletions
plugins/dashboard/frontend/src/app/components/SyncBeaconPayload.tsx
+
7
−
0
View file @
848eea43
...
@@ -3,6 +3,7 @@ import Row from "react-bootstrap/Row";
...
@@ -3,6 +3,7 @@ import Row from "react-bootstrap/Row";
import
Col
from
"
react-bootstrap/Col
"
;
import
Col
from
"
react-bootstrap/Col
"
;
import
{
inject
,
observer
}
from
"
mobx-react
"
;
import
{
inject
,
observer
}
from
"
mobx-react
"
;
import
{
ExplorerStore
}
from
"
app/stores/ExplorerStore
"
;
import
{
ExplorerStore
}
from
"
app/stores/ExplorerStore
"
;
import
{
SyncBeaconPayload
as
beaconPayload
}
from
"
app/misc/Payload
"
;
import
ListGroup
from
"
react-bootstrap/ListGroup
"
;
import
ListGroup
from
"
react-bootstrap/ListGroup
"
;
import
*
as
dateformat
from
'
dateformat
'
;
import
*
as
dateformat
from
'
dateformat
'
;
...
@@ -16,6 +17,12 @@ export class SyncBeaconPayload extends React.Component<Props, any> {
...
@@ -16,6 +17,12 @@ export class SyncBeaconPayload extends React.Component<Props, any> {
render
()
{
render
()
{
let
{
payload
}
=
this
.
props
.
explorerStore
;
let
{
payload
}
=
this
.
props
.
explorerStore
;
// TODO: this is just a quick fix. other payloads not having `sent_time` field causing a crash
// for example, when you open a data message and payload is not a sync beacon anymore, but react
// tries to rerender this component...
if
(
!
(
payload
instanceof
beaconPayload
))
{
return
[]
}
return
(
return
(
payload
&&
payload
&&
<
React
.
Fragment
>
<
React
.
Fragment
>
...
...
This diff is collapsed.
Click to expand it.
plugins/dashboard/packrd/packed-packr.go
+
19
−
45
View file @
848eea43
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment