Commit 2f7ba215 by Ryan McKinley Committed by GitHub

Docs: add basic docs for QueryResultMetaNotice (#23410)

* add basic docs

* fix typo

* use link not url
parent 06122935
......@@ -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>
)}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment