Skip to content

Commit

Permalink
disable data quality dashboard results persistence
Browse files Browse the repository at this point in the history
  • Loading branch information
semd committed Jan 24, 2024
1 parent 4a136f4 commit cca0dfe
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 14 deletions.
15 changes: 8 additions & 7 deletions x-pack/plugins/ecs_data_quality_dashboard/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,14 @@ export class EcsDataQualityDashboardPlugin
public setup(core: CoreSetup, plugins: PluginSetupDependencies) {
this.logger.debug('ecsDataQualityDashboard: Setup');

this.resultsDataStream.install({
esClient: core
.getStartServices()
.then(([{ elasticsearch }]) => elasticsearch.client.asInternalUser),
logger: this.logger,
pluginStop$: this.pluginStop$,
});
// TODO: Uncomment https://github.com/elastic/kibana/pull/173185#issuecomment-1908034302
// this.resultsDataStream.install({
// esClient: core
// .getStartServices()
// .then(([{ elasticsearch }]) => elasticsearch.client.asInternalUser),
// logger: this.logger,
// pluginStop$: this.pluginStop$,
// });

core.http.registerRouteHandlerContext<
DataQualityDashboardRequestHandlerContext,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ const searchResponse = {
Record<string, { buckets: LatestAggResponseBucket[] }>
>;

describe('getResultsRoute route', () => {
// TODO: https://github.com/elastic/kibana/pull/173185#issuecomment-1908034302
describe.skip('getResultsRoute route', () => {
let server: ReturnType<typeof serverMock.create>;
let { context } = requestContextMock.createTools();
let logger: MockedLogger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ export const getResultsRoute = (
validate: { request: { query: buildRouteValidation(GetResultQuery) } },
},
async (context, request, response) => {
// TODO: https://github.com/elastic/kibana/pull/173185#issuecomment-1908034302
return response.ok({ body: [] });

// eslint-disable-next-line no-unreachable
const services = await context.resolve(['core', 'dataQualityDashboard']);
const resp = buildResponse(response);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import type {
} from '@elastic/elasticsearch/lib/api/types';
import { resultBody, resultDocument } from './results.mock';

describe('postResultsRoute route', () => {
// TODO: https://github.com/elastic/kibana/pull/173185#issuecomment-1908034302
describe.skip('postResultsRoute route', () => {
let server: ReturnType<typeof serverMock.create>;
let { context } = requestContextMock.createTools();
let logger: MockedLogger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ export const postResultsRoute = (
.addVersion(
{
version: INTERNAL_API_VERSION,
validate: {
request: {
body: buildRouteValidation(PostResultBody),
},
},
validate: { request: { body: buildRouteValidation(PostResultBody) } },
},
async (context, request, response) => {
// TODO: https://github.com/elastic/kibana/pull/173185#issuecomment-1908034302
return response.ok({ body: { result: 'noop' } });

// eslint-disable-next-line no-unreachable
const services = await context.resolve(['core', 'dataQualityDashboard']);
const resp = buildResponse(response);

Expand Down

0 comments on commit cca0dfe

Please sign in to comment.