Skip to content

Commit

Permalink
Add few comments
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Ohlsen <[email protected]>
  • Loading branch information
ohltyler committed Feb 9, 2023
1 parent 3e9df58 commit c881755
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,10 @@ export class VisualizeEmbeddable
const abortController = this.abortController;

let exprVisLayers = {} as ExprVisLayers;
// TODO: final eligibility will be defined as part of a separate effort.
// This includes not fetching any layers / not showing any layers, when in the
// edit context of the vis
// See https://github.com/opensearch-project/OpenSearch-Dashboards/issues/3268
if (isEligibleForVisLayers(this.vis)) {
exprVisLayers = await this.fetchVisLayers(expressionParams, abortController);
}
Expand Down Expand Up @@ -485,7 +489,8 @@ export class VisualizeEmbeddable

/**
* Collects any VisLayers from plugin expressions functions
* by fetching all AugmentVisSavedObjects that match the vis ID
* by fetching all AugmentVisSavedObjects that match the vis
* saved object ID
*/
fetchVisLayers = async (
expressionParams: IExpressionLoaderParams,
Expand All @@ -498,6 +503,8 @@ export class VisualizeEmbeddable
);
if (!isEmpty(augmentVisSavedObjs) && !abortController.signal.aborted) {
const visLayersPipeline = buildPipelineFromAugmentVisSavedObjs(augmentVisSavedObjs);
// The initial input for the pipeline will just be an empty arr of VisLayers. As plugin
// expression functions are ran, they will incrementally append their generated VisLayers to it.
const visLayersPipelineInput = {
type: 'vis_layers',
layers: [] as VisLayers,
Expand Down

0 comments on commit c881755

Please sign in to comment.