mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
21 lines
486 B
TypeScript
21 lines
486 B
TypeScript
|
|
import { VisualizationSuggestionsBuilder } from '@grafana/data';
|
||
|
|
import { PanelOptions } from './models.gen';
|
||
|
|
|
||
|
|
export class DashListSuggestionsSupplier {
|
||
|
|
getSuggestionsForData(builder: VisualizationSuggestionsBuilder) {
|
||
|
|
const { dataSummary } = builder;
|
||
|
|
|
||
|
|
if (dataSummary.hasData) {
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
|
||
|
|
const list = builder.getListAppender<PanelOptions, {}>({
|
||
|
|
name: 'Dashboard list',
|
||
|
|
pluginId: 'dashlist',
|
||
|
|
options: {},
|
||
|
|
});
|
||
|
|
|
||
|
|
list.append({});
|
||
|
|
}
|
||
|
|
}
|