mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Docs: add basic docs for QueryResultMetaNotice (#23410)
* add basic docs * fix typo * use link not url
This commit is contained in:
parent
0612293543
commit
2f7ba21593
@ -45,10 +45,29 @@ export interface QueryResultMetaStat extends FieldConfig {
|
||||
value: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* QueryResultMetaNotice is a structure that provides user notices for query result data
|
||||
*/
|
||||
export interface QueryResultMetaNotice {
|
||||
/**
|
||||
* Specify the notice severity
|
||||
*/
|
||||
severity: 'info' | 'warning' | 'error';
|
||||
|
||||
/**
|
||||
* Notice descriptive text
|
||||
*/
|
||||
text: string;
|
||||
url?: string;
|
||||
|
||||
/**
|
||||
* An optional link that may be displayed in the UI.
|
||||
* This value may be an absolute URL or relative to grafana root
|
||||
*/
|
||||
link?: string;
|
||||
|
||||
/**
|
||||
* Optionally suggest an appropriate tab for the panel inspector
|
||||
*/
|
||||
inspect?: 'meta' | 'error' | 'data' | 'stats';
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,7 @@ export class PanelHeader extends Component<Props, State> {
|
||||
<span className="fa fa-info-circle" style={{ marginRight: '8px', cursor: 'pointer' }} />
|
||||
</div>
|
||||
) : (
|
||||
<a className="panel-info-notice" href={notice.url} target="_blank">
|
||||
<a className="panel-info-notice" href={notice.link} target="_blank">
|
||||
<span className="fa fa-info-circle" style={{ marginRight: '8px', cursor: 'pointer' }} />
|
||||
</a>
|
||||
)}
|
||||
|
Loading…
Reference in New Issue
Block a user