Correlations: Add GetCorrelation(s) HTTP APIs (#52517)

* Correlations: Get Single correlations

* Correlations: Get all correlations for given source ds

* Correlations: Get all correlations

* add tests

* add DB indices

* fix lint errors

* remove skip from tests

* use DatasourceService in test
This commit is contained in:
Giordano Ricci
2022-08-11 16:58:11 +01:00
committed by GitHub
parent 8813cbfb62
commit c1b30c56c9
10 changed files with 917 additions and 3 deletions
@@ -15,7 +15,14 @@ func addCorrelationsMigrations(mg *Migrator) {
{Name: "label", Type: DB_Text, Nullable: false},
{Name: "description", Type: DB_Text, Nullable: false},
},
Indices: []*Index{
{Cols: []string{"uid"}},
{Cols: []string{"source_uid"}},
},
}
mg.AddMigration("create correlation table v1", NewAddTableMigration(correlationsV1))
mg.AddMigration("add index correlations.uid", NewAddIndexMigration(correlationsV1, correlationsV1.Indices[0]))
mg.AddMigration("add index correlations.source_uid", NewAddIndexMigration(correlationsV1, correlationsV1.Indices[1]))
}