Annotations: Support filtering the target panels (#66325)

Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
This commit is contained in:
Ryan McKinley
2023-04-18 13:39:30 -07:00
committed by GitHub
parent a384194e15
commit 9452c0d718
32 changed files with 1042 additions and 235 deletions

View File

@@ -2016,8 +2016,8 @@ describe('DashboardModel', () => {
},
annotations: {
list: [
// @ts-expect-error
{
// @ts-expect-error
datasource: null,
},
{

View File

@@ -318,13 +318,11 @@ describe('DashboardModel', () => {
list: [
{
datasource: { uid: 'fake-uid', type: 'prometheus' },
showIn: 0,
name: 'Fake annotation',
type: 'dashboard',
iconColor: 'rgba(0, 211, 255, 1)',
enable: true,
hide: false,
builtIn: 0,
},
],
},

View File

@@ -46,13 +46,12 @@ export function createPanelJSONFixture(panelInput: Partial<Panel | GraphPanel |
}
export function createAnnotationJSONFixture(annotationInput: Partial<AnnotationQuery>): AnnotationQuery {
// @ts-expect-error
return {
builtIn: 0, // ??
datasource: {
type: 'foo',
uid: 'bar',
},
showIn: 2,
enable: true,
type: 'anno',
...annotationInput,