-
Notifications
You must be signed in to change notification settings - Fork 917
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a
VisAugmenter
stats API (#4006)
* Update augment-vis saved obj mappings Signed-off-by: Tyler Ohlsen <[email protected]> * Finish implementation; add tests; update attributes Signed-off-by: Tyler Ohlsen <[email protected]> * remove log Signed-off-by: Tyler Ohlsen <[email protected]> --------- Signed-off-by: Tyler Ohlsen <[email protected]>
- Loading branch information
Showing
17 changed files
with
582 additions
and
39 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
src/plugins/vis_augmenter/common/augment_vis_saved_object_attributes.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { SavedObjectAttributes } from 'opensearch-dashboards/server'; | ||
|
||
export interface AugmentVisSavedObjectAttributes extends SavedObjectAttributes { | ||
id: string; | ||
title: string; | ||
description?: string; | ||
originPlugin: string; | ||
pluginResource: { | ||
type: string; | ||
id: string; | ||
}; | ||
visLayerExpressionFn: { | ||
type: string; | ||
name: string; | ||
}; | ||
version: number; | ||
// Following fields are optional since they will get set/removed during the extraction/injection | ||
// of the vis reference | ||
visName?: string; | ||
visId?: string; | ||
visReference?: { | ||
id: string; | ||
name: string; | ||
}; | ||
// Error may be populated if there is some issue when parsing the attribute values | ||
error?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
export const APP_PATH = { | ||
STATS: '/stats', | ||
}; | ||
export const APP_API = '/api/vis_augmenter'; | ||
|
||
// used for limiting results received from the stats API | ||
export const PER_PAGE_REQUEST_NUMBER = 50; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
export * from './constants'; | ||
export { AugmentVisSavedObjectAttributes } from './augment_vis_saved_object_attributes'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.