Skip to content

[*] remove redundant Source Name from Tables Overview dashboard, fixes #1134#1160

Merged
pashagolub merged 6 commits intocybertec-postgresql:masterfrom
Mohamed-Elfardy:fix/remove-redundant-source-name-issue-1134
Feb 4, 2026
Merged

[*] remove redundant Source Name from Tables Overview dashboard, fixes #1134#1160
pashagolub merged 6 commits intocybertec-postgresql:masterfrom
Mohamed-Elfardy:fix/remove-redundant-source-name-issue-1134

Conversation

@Mohamed-Elfardy
Copy link
Copy Markdown
Contributor

@Mohamed-Elfardy Mohamed-Elfardy commented Feb 2, 2026

Fixes : #1134
This PR removes the redundant dbname / "Source Name" field from dashboards
that only accept a single dbname value to be more clarify.

The change is limited to single-db dashboards (e.g. tables-overview.json).

Global dashboards that may display multiple databases are intentionally left unchanged.
If there are other single-db dashboards should be updated, please let me know.

@coveralls
Copy link
Copy Markdown

coveralls commented Feb 2, 2026

Pull Request Test Coverage Report for Build 21663884968

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 76.132%

Totals Coverage Status
Change from base Build 21638311375: 0.0%
Covered Lines: 4102
Relevant Lines: 5388

💛 - Coveralls

@0xgouda 0xgouda self-assigned this Feb 2, 2026
@0xgouda 0xgouda added the dashboards Grafana dashboards related label Feb 2, 2026
@0xgouda
Copy link
Copy Markdown
Collaborator

0xgouda commented Feb 2, 2026

It's not removed; you just removed the aliasing. You'd also need not to query it in the panels.

image

@Mohamed-Elfardy
Copy link
Copy Markdown
Contributor Author

Mohamed-Elfardy commented Feb 2, 2026

Just to confirm my understanding : for single-db dashboards, should the dbname column be removed entirely from the panels, relying on the dashboard context instead , right ?

"format": "table",
"rawQuery": true,
"rawSql": "select\n x.*,\n (data->>'seconds_since_last_vacuum')::int8 as last_vacuum,\n (data->>'seconds_since_last_analyze')::int8 as last_analyze\nfrom (\nSELECT\n dbname,\n tag_data->>'table_full_name' as table_full_name,\n max((data->>'total_relation_size_b')::int8) as total_relation_size,\n max((data->>'table_size_b')::int8) as data_size\nFROM\n table_stats\nWHERE\n $__timeFilter(time)\n AND dbname = '$dbname'\nGROUP BY 1, 2\nORDER BY 3 DESC NULLS LAST\nLIMIT $top\n) x\njoin lateral (select data from table_stats where dbname = x.dbname and tag_data->>'table_full_name' = x.table_full_name and $__timeFilter(time) order by time desc limit 1) y on true",
"rawSql": "select\n x.*,\n (data->>'seconds_since_last_vacuum')::int8 as last_vacuum,\n (data->>'seconds_since_last_analyze')::int8 as last_analyze\nfrom (\nSELECT\n tag_data->>'table_full_name' as table_full_name,\n max((data->>'total_relation_size_b')::int8) as total_relation_size,\n max((data->>'table_size_b')::int8) as data_size\nFROM\n table_stats\nWHERE\n $__timeFilter(time)\n AND dbname = '$dbname'\nGROUP BY 1 \nORDER BY 3 DESC NULLS LAST\nLIMIT $top\n) x\njoin lateral (select data from table_stats where dbname = '$dbname' and tag_data->>'table_full_name' = x.table_full_name and $__timeFilter(time) order by time desc limit 1) y on true",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why haven't you updated the ORDER BY here?

Please ensure that ORDER BY clauses are updated accordingly in all panels.

@0xgouda
Copy link
Copy Markdown
Collaborator

0xgouda commented Feb 3, 2026

Plus: resize the panels after removing the Source Name column and make them align left.

also add insepct option to Table name column.

@Mohamed-Elfardy
Copy link
Copy Markdown
Contributor Author

Mohamed-Elfardy commented Feb 4, 2026

and make them align left.

Screenshot 2026-02-04 014846

I changed the default alignment to left for the panel.
Is this acceptable, or would you prefer keeping the default as auto and only setting left alignment via column overrides
( like in this screen )?

@Mohamed-Elfardy
Copy link
Copy Markdown
Contributor Author

also add insepct option to Table name column.

I enabled inspect via a field override on the Table Name column. Should this be done via overrides, or by setting the default inspect option to true?

@0xgouda
Copy link
Copy Markdown
Collaborator

0xgouda commented Feb 4, 2026

I enabled inspect via a field override on the Table Name column. Should this be done via overrides, or by setting the default inspect option to true?

It should be an override since we want it for the Table Name field only, good job!

@0xgouda 0xgouda changed the title Remove redundant Source Name field from single-db dashboards [*] remove redundant Source Name from Tables Overview dashboard, fixes #1134 Feb 4, 2026
@0xgouda 0xgouda requested a review from pashagolub February 4, 2026 08:19
@0xgouda 0xgouda force-pushed the fix/remove-redundant-source-name-issue-1134 branch from f165406 to 3ba4de5 Compare February 4, 2026 08:19
@Mohamed-Elfardy
Copy link
Copy Markdown
Contributor Author

It should be an override since we want it for the Table Name field only, good job!

got it , is there any suggested additions, please let me know

Copy link
Copy Markdown
Collaborator

@pashagolub pashagolub left a comment

Choose a reason for hiding this comment

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

LGTM!

@pashagolub pashagolub merged commit 05cb931 into cybertec-postgresql:master Feb 4, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dashboards Grafana dashboards related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove Redundant Source Name field

4 participants