mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Table: Fix no data
message alignment and table selector name (#77700)
* on multiple queries show no data message aligned + set a default table name for empty series * simplify style * check if there are fields
This commit is contained in:
parent
f7c4909553
commit
f6c5b80cca
@ -31,7 +31,7 @@ export function getFrameDisplayName(frame: DataFrame, index?: number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// list all the
|
// list all the
|
||||||
if (index === undefined) {
|
if (index === undefined && frame.fields.length > 0) {
|
||||||
return frame.fields
|
return frame.fields
|
||||||
.filter((f) => f.type !== FieldType.time)
|
.filter((f) => f.type !== FieldType.time)
|
||||||
.map((f) => getFieldDisplayName(f, frame))
|
.map((f) => getFieldDisplayName(f, frame))
|
||||||
|
@ -372,7 +372,7 @@ export const Table = memo((props: Props) => {
|
|||||||
</CustomScrollbar>
|
</CustomScrollbar>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div style={{ height: height - headerHeight }} className={tableStyles.noData}>
|
<div style={{ height: height - headerHeight, width }} className={tableStyles.noData}>
|
||||||
No data
|
No data
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
Loading…
Reference in New Issue
Block a user