question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[core] Better control over dashboard widgets

See original GitHub issue

Dashboards are generally fairly rigid in their implementation which is good if you just want to pick up the good defaults but bad if you want to customize them for any reason.

Ideally, the API should allow for:

  • Adjusting period per-widget (which the dashboard’s periodOverride allows respecting)
  • Controlling what widgets are added
  • Controlling what metrics are used
  • Controlling positioning/sizing of widgets
  • Controlling addition of annotations

This may include how widgets are added for custom monitoring, which always uses a calculated width.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
christophercarneycommented, Jul 20, 2022

+1, I agree that the widgets rendered could use a bit more control. This library is amazing and easy to start using because it is opinionated but as a user I should have granular control over what is rendered and how (if I want to).

Rather than release a comprehensive widget control solution does it make sense to try and break it down into smaller deliverables? I think the prevailing sentiment amongst myself and other users of the library is that when it renders widgets that are not useful (for your usecase) it adds unnecessary noise to your overall dashboard.

Could a reasonable first step be to simply allow a user to prevent a certain widget from being rendered all. Then move to exposing the widgets in a way users can customize them, then exposing formatting, etc

0reactions
djdawson3commented, Sep 7, 2022

Hi there,

I realize that a broader discussion on this has been opened recently, but I’m curious if the author would also be open to a short-term fix to support this functionality as I’m trying to change some configurations related to the different dashboards (e.g. different suffix than “-Summary”, different period configurations, etc.).

I looked through the code and it seems that the problem is that the DefaultDashboardFactory constructor is creating dashboards in the constructor and then assigning them to their respective fields which are exposed via methods defined by the IDashboardFactory interface:

  • dashboard -> createdDashboard()
  • summaryDashboard -> createdSummaryDashboard()
  • alarmDashboard -> createdAlarmDashboard()

This means that even if I provide my own dashboard factory, I can’t actually customize the dashboards very much because the call to super() is going to immediately create dashboards which I have no control over other than what is already provided by existing props.

Instead, could we defer creation of these dashboards until a there’s a createDashboard(), createSummaryDashboard() , or createAlarmDashboard() call and instead store necessary information (e.g. rendering preference, start/period overrides, etc.) as class fields? This would allow clients to at least customize some of the content.

What do you think? Is this a reasonable suggestion?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dashboard - CORE Help Center
The Dashboard contains a series of widgets that extract information from your company database and present it in the best format on different ......
Read more >
Dashboard & Widget portal development with Syncfusion is ...
In designer, you can design the dashboards by drag and drop the widgets(syncfusion controls). Also, you can embed the created Bold BI dashboard...
Read more >
Working with Dashboard Widgets
From the Dashboards view, you can drill-down into a widget to access tabular information about the devices corresponding to the widget.
Read more >
Coralogix Dashboard and Widgets
The right widgets and dashboards are perfect for detecting abnormal activity or keeping an eye on your business KPIs. Widgets can be saved ......
Read more >
Access to Underlying Widgets in ASP.NET Core
Most dashboard items use DevExtreme UI widgets to visualize data. Use the DashboardControl's API to access these widgets and customize their ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found