Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dashboard): zero line when no data found #1480

Merged
merged 17 commits into from
Jan 21, 2025

Conversation

soleksy-splunk
Copy link
Contributor

@soleksy-splunk soleksy-splunk commented Nov 24, 2024

Issue number:
https://splunk.atlassian.net/browse/ADDON-76195

PR Type

What kind of change does this PR introduce?

  • Feature
  • Bug Fix
  • Refactoring (no functional or API changes)
  • Documentation Update
  • Maintenance (dependency updates, CI, etc.)

Summary

Zero line is displayed when no data found for all dashboard charts, except those in resource tab.

Pros:

  • zero line chart displayed instead of information 'No data found"

Cons:

  • it definitely will generate some costs due to it making some computations to generate default zero data, but comparing to general search operations it should be negligible, as even for whole previous year it generates event every 5 min and locally it takes about 0,12 sec, plus query is cached to 10 min, so if there aren't real time queries it shouldn't generate more computations even after page refreshes.

Sum up:
Comparing to data search this operation shouldn't be a problem.

Some info regarding Smart Sources (https://splunkui.splunk.com/Packages/dashboard-docs/Smartsources ).

enableSmartSourceDS: true,

it is a feature that enables referencing already finished search jobs and its results inside next searches (here it is used to verify if there are any results for table data, if not then default values are applied if there are next code is ignored).

Changes

For data charts where "No data found" message is displayed there is displayed chart with zero line, simulating none of the events to appear.

User experience

Please describe the user experience before and after this change. Screenshots are welcome for additional context.

Overview before changes:

Screenshot 2024-11-24 at 22 23 02

Overview after changes:

Screenshot 2024-11-24 at 22 19 24

Data Ingestion tab before changes:

Screenshot 2024-11-24 at 22 23 34

Data Ingestion tab after changes:

Screenshot 2024-11-24 at 22 19 53

Error tab before changes:

Screenshot 2024-11-24 at 22 25 07

Error tab after changes:

Screenshot 2024-11-24 at 22 21 08

Tables for errors is filled with 0 data when data volume found but number of events got no data.

Screenshot 2025-01-20 at 11 05 49

Resource consumption tab after changes remains the same:

Screenshot 2024-11-24 at 22 21 44

Checklist

If an item doesn't apply to your changes, leave it unchecked.

ui/src/pages/Dashboard/consts.ts Outdated Show resolved Hide resolved
ui/src/pages/Dashboard/Overview.tsx Outdated Show resolved Hide resolved
@soleksy-splunk soleksy-splunk force-pushed the feat(dashboard)--zero-line-when-no-data-found branch from 278b327 to 2cdd407 Compare January 10, 2025 20:12
@soleksy-splunk soleksy-splunk marked this pull request as ready for review January 20, 2025 09:56
@soleksy-splunk soleksy-splunk requested review from a team as code owners January 20, 2025 09:56
Copy link
Contributor

@vtsvetkov-splunk vtsvetkov-splunk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (I have no understanding of the magic symbol combination). Could you add more context to the description what changed high level? I see you enabled smart search. It would be nice to see the reasoning, what the pros and cons of this. Would it work slower/faster; cost more/less

ui/src/pages/Dashboard/consts.ts Outdated Show resolved Hide resolved
@soleksy-splunk soleksy-splunk force-pushed the feat(dashboard)--zero-line-when-no-data-found branch from 9354164 to 937ec0e Compare January 21, 2025 13:17
@soleksy-splunk
Copy link
Contributor Author

LGTM (I have no understanding of the magic symbol combination). Could you add more context to the description what changed high level? I see you enabled smart search. It would be nice to see the reasoning, what the pros and cons of this. Would it work slower/faster; cost more/less

I added some more descriptions, let me know if thats enough.

Generally the benefit is it looks a bit better but cons are only some potential cost, which should be close to 0, as those are static computations in the end.

@soleksy-splunk soleksy-splunk merged commit d1cad41 into develop Jan 21, 2025
122 checks passed
@soleksy-splunk soleksy-splunk deleted the feat(dashboard)--zero-line-when-no-data-found branch January 21, 2025 14:28
@github-actions github-actions bot locked and limited conversation to collaborators Jan 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants