Skip to content

Commit

Permalink
Dynamically update vega spec to show VisLayers (#3145)
Browse files Browse the repository at this point in the history
* Dynamically update vega spec to show VisLayers

Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>

* Clean up changes from rebase

Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>

* Create and set augment vis loader in visualization start()

Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>

* Fix test; add placeholder scheme

Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>

* Fix null x axis NPE

Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>

* remove adding timestamps that are out of bounds; add test cases for it

Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>

* Remove unnecessary if block

Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>

* Export PluginResource in vis_augmenter/public

Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>

* Add comments

Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>

* Fix conflict from rebasing

Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>

* Make vega parser flags more fine-grained

Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>

* Clean up few tests; simplify helper fn

Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>

* Remove visTypeVega from visAugmenter reqd plugins; other minor cleanup

Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>

---------

Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
  • Loading branch information
ohltyler authored Mar 30, 2023
1 parent c8af939 commit 8a2cc69
Show file tree
Hide file tree
Showing 24 changed files with 1,933 additions and 464 deletions.
2 changes: 1 addition & 1 deletion src/plugins/vis_augmenter/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Contains interfaces and type definitions used for allowing external plugins to augment Visualizations. Registers the relevant saved object types and expression functions.
Contains interfaces, type definitions, helper functions, and services used for allowing external plugins to augment Visualizations. Registers the relevant saved object types and expression functions.
13 changes: 13 additions & 0 deletions src/plugins/vis_augmenter/public/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

export const VIS_LAYER_COLUMN_TYPE = 'vis_layer';
// TODO: replace with a value imported from OUI
export const EVENT_COLOR = 'red';
export const HOVER_PARAM = 'HOVER';
export const EVENT_MARK_SIZE = 100;
export const EVENT_MARK_SIZE_ENLARGED = 140;
export const EVENT_MARK_SHAPE = 'triangle-up';
export const EVENT_TIMELINE_HEIGHT = 25;
19 changes: 12 additions & 7 deletions src/plugins/vis_augmenter/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,19 @@ export function plugin(initializerContext: PluginInitializerContext) {
export { VisAugmenterSetup, VisAugmenterStart };

export {
createSavedAugmentVisLoader,
createAugmentVisSavedObject,
SavedAugmentVisLoader,
SavedObjectOpenSearchDashboardsServicesWithAugmentVis,
} from './saved_augment_vis';

export { VisLayer, VisLayers, VisLayerTypes, VisLayerErrorTypes, VisLayerError } from './types';
VisLayer,
VisLayers,
VisLayerTypes,
VisLayerErrorTypes,
VisLayerError,
PluginResource,
PointInTimeEvent,
PointInTimeEventsVisLayer,
isPointInTimeEventsVisLayer,
} from './types';

export * from './expressions';
export * from './utils';
export * from './constants';
export * from './vega';
export * from './saved_augment_vis';
Loading

0 comments on commit 8a2cc69

Please sign in to comment.