Skip to content

Commit

Permalink
Move credential saved object to data source plugin (opensearch-projec…
Browse files Browse the repository at this point in the history
…t#2062)

Signed-off-by: Louis Chu <clingzhi@amazon.com>

Move credential saved object to data source plugin
Resolve follow up comments on UI

Signed-off-by: Kristen Tian <tyarong@amazon.com>
  • Loading branch information
noCharger authored and kristenTian committed Sep 14, 2022
1 parent fb29ee5 commit 409e606
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 85 deletions.
7 changes: 0 additions & 7 deletions src/plugins/credential_management/.i18nrc.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "credentialManagement",
"version": "opensearchDashboards",
"server": true,
"server": false,
"ui": true,
"requiredPlugins": ["management"],
"requiredBundles": ["opensearchDashboardsReact"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@
* SPDX-License-Identifier: Apache-2.0
*/

// @ts-ignore
import { euiColorAccent } from '@elastic/eui/dist/eui_theme_light.json';
import React from 'react';
import * as H from 'history';
import { History } from 'history';

import { EuiButton } from '@elastic/eui';
import { FormattedMessage } from '@osd/i18n/react';

interface Props {
history: H.History;
history: History;
}

export const CreateButton = ({ history }: Props) => {
Expand Down
16 changes: 0 additions & 16 deletions src/plugins/credential_management/server/index.ts

This file was deleted.

40 changes: 0 additions & 40 deletions src/plugins/credential_management/server/plugin.ts

This file was deleted.

This file was deleted.

9 changes: 0 additions & 9 deletions src/plugins/credential_management/server/types.ts

This file was deleted.

7 changes: 6 additions & 1 deletion src/plugins/data_source/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import { PluginInitializerContext, CoreSetup, CoreStart, Plugin, Logger } from 'src/core/server';
import { dataSource } from './saved_objects';
import { dataSource, credential } from './saved_objects';

import { DataSourcePluginSetup, DataSourcePluginStart } from './types';

Expand All @@ -17,6 +17,11 @@ export class DataSourcePlugin implements Plugin<DataSourcePluginSetup, DataSourc

public setup(core: CoreSetup) {
this.logger.debug('data_source: Setup');

// Register credential saved object type
core.savedObjects.registerType(credential);

// Register data source saved object type
core.savedObjects.registerType(dataSource);

return {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { SavedObjectsType } from 'opensearch-dashboards/server';

export const credentialSavedObjectType: SavedObjectsType = {
export const credential: SavedObjectsType = {
name: 'credential',
hidden: false,
namespaceType: 'agnostic',
Expand Down
1 change: 1 addition & 0 deletions src/plugins/data_source/server/saved_objects/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
* SPDX-License-Identifier: Apache-2.0
*/

export { credential } from './credential_saved_objects_type';
export { dataSource } from './data_source';

0 comments on commit 409e606

Please sign in to comment.