-
Notifications
You must be signed in to change notification settings - Fork 916
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Data connection saved-object type for external connections (#7925)
* Add Data connection saved-object type for external connections Signed-off-by: Megha Goyal <[email protected]> * Changeset file for PR #7925 created/updated --------- Signed-off-by: Megha Goyal <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit 3caaa9d) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
880634f
commit da22b32
Showing
6 changed files
with
72 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
feat: | ||
- Introduce a data-connection saved-object type for external data connections ([#7925](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7925)) |
28 changes: 28 additions & 0 deletions
28
src/plugins/data_source/common/data_connections/data_connection_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,28 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { SavedObjectAttributes } from 'src/core/types'; | ||
|
||
export const DATA_CONNECTION_SAVED_OBJECT_TYPE = 'data-connection'; | ||
|
||
/** | ||
* Represents the attributes of a data connection saved object. | ||
* @property connectionId: The name of the data connection. | ||
* @property type: The type of the data connection based on enum DataConnectionType | ||
* @property meta: Additional metadata associated with the data connection. | ||
*/ | ||
export interface DataConnectionSavedObjectAttributes extends SavedObjectAttributes { | ||
connectionId: string; | ||
type: DataConnectionType; | ||
meta?: string; | ||
} | ||
|
||
export enum DataConnectionType { | ||
CloudWatch = 'AWS CloudWatch', | ||
SecurityLake = 'AWS Security Lake', | ||
NA = 'None', | ||
} | ||
|
||
export const DATA_CONNECTION_ID_LENGTH_LIMIT = 32; |
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,6 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
export * from './data_connection_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
32 changes: 32 additions & 0 deletions
32
src/plugins/data_source/server/saved_objects/data_connection.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 { SavedObjectsType } from 'opensearch-dashboards/server'; | ||
|
||
export const dataConnection: SavedObjectsType = { | ||
name: 'data-connection', | ||
namespaceType: 'agnostic', | ||
hidden: false, | ||
management: { | ||
icon: 'apps', | ||
defaultSearchField: 'connectionId', | ||
importableAndExportable: true, | ||
}, | ||
mappings: { | ||
dynamic: false, | ||
properties: { | ||
connectionId: { | ||
type: 'text', | ||
}, | ||
type: { | ||
type: 'text', | ||
}, | ||
meta: { | ||
type: 'text', | ||
}, | ||
}, | ||
}, | ||
migrations: {}, | ||
}; |
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