-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…352) Signed-off-by: Joshua Li <[email protected]> Co-authored-by: Eric Wei <[email protected]> Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Co-authored-by: Derek Ho <[email protected]>
- Loading branch information
1 parent
4ddf822
commit 6047bff
Showing
109 changed files
with
5,975 additions
and
1,467 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { SavedObjectAttributes } from '../../../../src/core/types'; | ||
import { SavedVisualization } from './explorer'; | ||
|
||
export const VISUALIZATION_SAVED_OBJECT = 'observability-visualization'; | ||
export const OBSERVABILTY_SAVED_OBJECTS = [VISUALIZATION_SAVED_OBJECT] as const; | ||
export const SAVED_OBJECT_VERSION = 1; | ||
|
||
export interface VisualizationSavedObjectAttributes extends SavedObjectAttributes { | ||
title: string; | ||
description: string; | ||
version: number; | ||
createdTimeMs: number; | ||
savedVisualization: SavedVisualization; | ||
} |
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,41 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { | ||
HttpStart, | ||
IUiSettingsClient, | ||
NotificationsStart, | ||
SavedObjectsClientContract, | ||
ToastInput, | ||
} from '../../../../src/core/public'; | ||
import { createGetterSetter } from '../../../../src/plugins/opensearch_dashboards_utils/common'; | ||
import PPLService from '../../public/services/requests/ppl'; | ||
import { QueryManager } from '../query_manager'; | ||
|
||
let uiSettings: IUiSettingsClient; | ||
let notifications: NotificationsStart; | ||
|
||
export const uiSettingsService = { | ||
init: (client: IUiSettingsClient, notificationsStart: NotificationsStart) => { | ||
uiSettings = client; | ||
notifications = notificationsStart; | ||
}, | ||
get: (key: string, defaultOverride?: any) => { | ||
return uiSettings?.get(key, defaultOverride) || ''; | ||
}, | ||
set: (key: string, value: any) => { | ||
return uiSettings?.set(key, value) || Promise.reject('uiSettings client not initialized.'); | ||
}, | ||
addToast: (toast: ToastInput) => { | ||
return notifications.toasts.add(toast); | ||
}, | ||
}; | ||
|
||
export const [getPPLService, setPPLService] = createGetterSetter<PPLService>('PPLService'); | ||
export const [getOSDHttp, setOSDHttp] = createGetterSetter<HttpStart>('http'); | ||
export const [getOSDSavedObjectsClient, setOSDSavedObjectsClient] = createGetterSetter< | ||
SavedObjectsClientContract | ||
>('SavedObjectsClient'); | ||
export const [getQueryManager, setQueryManager] = createGetterSetter<QueryManager>('QueryManager'); |
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 was deleted.
Oops, something went wrong.
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.