Skip to content

Commit

Permalink
poc for timeline visualization
Browse files Browse the repository at this point in the history
Signed-off-by: Bandini Bhopi <bandinib@amazon.com>
  • Loading branch information
bandinib-amzn committed Mar 4, 2024
1 parent 7f16083 commit 1401fcd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/plugins/vis_type_timeline/opensearch_dashboards.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"opensearchDashboardsVersion": "opensearchDashboards",
"server": true,
"ui": true,
"requiredPlugins": ["visualizations", "data", "expressions"],
"requiredPlugins": ["visualizations", "data", "expressions", "dataSource"],
"requiredBundles": ["opensearchDashboardsUtils", "opensearchDashboardsReact", "visDefaultEditor"]
}
8 changes: 6 additions & 2 deletions src/plugins/vis_type_timeline/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import { RecursiveReadonly } from '@osd/utility-types';
import { deepFreeze } from '@osd/std';

import { PluginStart } from '../../data/server';
import { CoreSetup, PluginInitializerContext } from '../../../core/server';
import { CoreSetup, PluginInitializerContext, DataSourcePluginSetup } from '../../../core/server';
import { configSchema } from '../config';
import loadFunctions from './lib/load_functions';
import { functionsRoute } from './routes/functions';
Expand All @@ -51,13 +51,17 @@ export interface TimelinePluginStartDeps {
data: PluginStart;
}

interface TimelinePluginSsetupDeps {
dataSource: DataSourcePluginSetup;
}

/**
* Represents Timeline Plugin instance that will be managed by the OpenSearch Dashboards plugin system.
*/
export class Plugin {
constructor(private readonly initializerContext: PluginInitializerContext) {}

public async setup(core: CoreSetup): void {
public async setup(core: CoreSetup, plugins: TimelinePluginSsetupDeps): void {
const config = await this.initializerContext.config
.create<TypeOf<typeof configSchema>>()
.pipe(first())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,6 @@ export default function buildRequest(config, tlConfig, scriptedFields, timeout)

return {
params: request,
dataSourceId: 'f620c970-ca12-11ee-ab29-99c0b09e473b', // Added for testing. This should come as query string parameter.
};
}

0 comments on commit 1401fcd

Please sign in to comment.