diff --git a/kibana.json b/opensearch_dashboards.json old mode 100755 new mode 100644 similarity index 51% rename from kibana.json rename to opensearch_dashboards.json index 39e3bba..f970427 --- a/kibana.json +++ b/opensearch_dashboards.json @@ -1,18 +1,18 @@ { "id": "kbnNetwork", - "version": "7.10.0", + "version": "1.0.0", + "opensearchDashboardsVersion": "opensearchDashboards", "server": false, "ui": true, "requiredPlugins": [ "visualizations", "data", "inspector", - "kibanaLegacy" - ], - "requiredBundles": [ - "kibanaUtils", + "opensearchDashboardsLegacy", + "opensearchDashboardsUtils", "visDefaultEditor", "share", "charts" - ] -} \ No newline at end of file + ], + "optionalPlugins": [] +} diff --git a/package.json b/package.json index 53da9d4..b21532e 100755 --- a/package.json +++ b/package.json @@ -2,9 +2,6 @@ "name": "kbn_network", "version": "7.10.0", "description": "Network plugin for visualizing networks", - "kibana": { - "version": "7.10.0" - }, "authors": [ "David Moreno Lumbreras " ], @@ -20,5 +17,10 @@ "moment": "^2.24.0", "vis-data": "^6.5.1", "vis-util": "^1.1.8" + }, + "scripts": { + "build": "yarn plugin-helpers build", + "plugin-helpers": "node ../../scripts/plugin_helpers", + "osd": "node ../../scripts/osd" } -} \ No newline at end of file +} diff --git a/public/components/field.tsx b/public/components/field.tsx index 5a7afc6..33892b0 100755 --- a/public/components/field.tsx +++ b/public/components/field.tsx @@ -21,7 +21,7 @@ import { get } from 'lodash'; import React, { useEffect, useState, useCallback } from 'react'; import { EuiComboBox, EuiComboBoxOptionOption, EuiFormRow } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; +import { i18n } from '@osd/i18n'; import { IndexPatternField } from '../../../../src/plugins/data/public'; import { ComboBoxGroupedOptions } from '../../../../src/plugins/vis_default_editor/public/utils'; diff --git a/public/components/field_column.tsx b/public/components/field_column.tsx index d50d202..2eb0582 100755 --- a/public/components/field_column.tsx +++ b/public/components/field_column.tsx @@ -19,7 +19,7 @@ import { clone } from 'lodash'; import React, { useEffect } from 'react'; -import { i18n } from '@kbn/i18n'; +import { i18n } from '@osd/i18n'; import { IndexPatternField } from '../../../../src/plugins/data/public'; import { EuiDraggable, EuiIconTip, EuiSpacer, EuiAccordion, EuiToolTip, EuiButtonIcon, EuiButtonIconProps } from '@elastic/eui'; diff --git a/public/components/kbn_network_vis_options.tsx b/public/components/kbn_network_vis_options.tsx index e120bc6..be8e3a5 100755 --- a/public/components/kbn_network_vis_options.tsx +++ b/public/components/kbn_network_vis_options.tsx @@ -19,8 +19,8 @@ import { some } from 'lodash'; import React, { useEffect } from 'react'; -import { i18n } from '@kbn/i18n'; -import { FormattedMessage } from '@kbn/i18n/react'; +import { i18n } from '@osd/i18n'; +import { FormattedMessage } from '@osd/i18n/react'; import { EuiButtonEmpty, EuiDragDropContext, euiDragDropReorder, EuiDroppable, EuiFlexGroup, EuiFlexItem, EuiFormErrorText, EuiIconTip, EuiPanel, EuiSpacer, EuiTitle } from '@elastic/eui'; import { IAggConfigs } from '../../../../src/plugins/data/public'; diff --git a/public/components/utils.ts b/public/components/utils.ts index a61130a..ac48c67 100755 --- a/public/components/utils.ts +++ b/public/components/utils.ts @@ -17,7 +17,7 @@ * under the License. */ -import { i18n } from '@kbn/i18n'; +import { i18n } from '@osd/i18n'; export enum AggTypes { SUM = 'sum', diff --git a/public/data_load/kibana_cloned_code/courier.ts b/public/data_load/kibana_cloned_code/courier.ts index e870c30..3dcdc9d 100755 --- a/public/data_load/kibana_cloned_code/courier.ts +++ b/public/data_load/kibana_cloned_code/courier.ts @@ -1,7 +1,7 @@ import { hasIn } from 'lodash'; -import { i18n } from '@kbn/i18n'; +import { i18n } from '@osd/i18n'; -import { calculateObjectHash } from '../../../../../src/plugins/kibana_utils/public'; +import { calculateObjectHash } from '../../../../../src/plugins/opensearch_dashboards_utils/public'; import { PersistedState } from '../../../../../src/plugins/visualizations/public'; import { Adapters } from '../../../../../src/plugins/inspector/public'; diff --git a/public/get_inner_angular.ts b/public/get_inner_angular.ts index f85239c..1580cc3 100755 --- a/public/get_inner_angular.ts +++ b/public/get_inner_angular.ts @@ -24,16 +24,16 @@ import angular from 'angular'; // required for `ngSanitize` angular module import 'angular-sanitize'; import 'angular-recursion'; -import { i18nDirective, i18nFilter, I18nProvider } from '@kbn/i18n/angular'; -import { CoreStart, IUiSettingsClient, PluginInitializerContext } from 'kibana/public'; +import { i18nDirective, i18nFilter, I18nProvider } from '@osd/i18n/angular'; +import { CoreStart, IUiSettingsClient, PluginInitializerContext } from '../../../src/core/public'; import { initAngularBootstrap, PaginateDirectiveProvider, PaginateControlsDirectiveProvider, PrivateProvider, watchMultiDecorator, - KbnAccessibleClickProvider, -} from '../../../src/plugins/kibana_legacy/public'; + OsdAccessibleClickProvider, +} from '../../../src/plugins/opensearch_dashboards_legacy/public'; initAngularBootstrap(); @@ -63,7 +63,7 @@ export function getInnerAngular(name = 'kibana/kbn_network_vis', core: CoreStart 'tableVisI18n', ]) .config(watchMultiDecorator) - .directive('kbnAccessibleClick', KbnAccessibleClickProvider); + .directive('osdAccessibleClick', OsdAccessibleClickProvider); } function createLocalPrivateModule() { diff --git a/public/index.ts b/public/index.ts index 39236c8..af837ee 100755 --- a/public/index.ts +++ b/public/index.ts @@ -17,7 +17,7 @@ * under the License. */ import './index.scss'; -import { PluginInitializerContext } from 'kibana/public'; +import { PluginInitializerContext } from 'opensearch-dashboards/public'; import { KbnNetworkPlugin as Plugin } from './plugin'; export function plugin(initializerContext: PluginInitializerContext) { diff --git a/public/kbn-network-vis.js b/public/kbn-network-vis.js index a0968d7..6d0fe15 100755 --- a/public/kbn-network-vis.js +++ b/public/kbn-network-vis.js @@ -17,7 +17,7 @@ * under the License. */ -import { i18n } from '@kbn/i18n'; +import { i18n } from '@osd/i18n'; import { AggGroupNames } from '../../../src/plugins/data/public'; import { Schemas } from '../../../src/plugins/vis_default_editor/public'; diff --git a/public/plugin.ts b/public/plugin.ts index 984933f..77d11ad 100755 --- a/public/plugin.ts +++ b/public/plugin.ts @@ -22,8 +22,8 @@ import { VisualizationsSetup } from '../../../src/plugins/visualizations/public' import { kbnNetworkVisTypeDefinition } from './kbn-network-vis'; import { DataPublicPluginStart } from '../../../src/plugins/data/public'; -import { setFormatService, setKibanaLegacy, setNotifications, setQueryService, setSearchService } from './services'; -import { KibanaLegacyStart } from '../../../src/plugins/kibana_legacy/public'; +import { setFormatService, setOpensearchDashboardsLegacy, setNotifications, setQueryService, setSearchService } from './services'; +import { OpensearchDashboardsLegacyStart } from '../../../src/plugins/opensearch_dashboards_legacy/public'; /** @internal */ @@ -34,7 +34,7 @@ export interface TablePluginSetupDependencies { /** @internal */ export interface TablePluginStartDependencies { data: DataPublicPluginStart; - kibanaLegacy: KibanaLegacyStart; + opensearchDashboardsLegacy: OpensearchDashboardsLegacyStart; } /** @internal */ @@ -56,9 +56,9 @@ export class KbnNetworkPlugin implements Plugin, void> { } - public start(core: CoreStart, { data, kibanaLegacy }: TablePluginStartDependencies) { + public start(core: CoreStart, { data, opensearchDashboardsLegacy }: TablePluginStartDependencies) { setFormatService(data.fieldFormats); - setKibanaLegacy(kibanaLegacy); + setOpensearchDashboardsLegacy(opensearchDashboardsLegacy); setNotifications(core.notifications); setQueryService(data.query); setSearchService(data.search); diff --git a/public/services.ts b/public/services.ts index 9661f19..db4a126 100755 --- a/public/services.ts +++ b/public/services.ts @@ -17,17 +17,17 @@ * under the License. */ -import { createGetterSetter } from '../../../src/plugins/kibana_utils/public'; +import { createGetterSetter } from '../../../src/plugins/opensearch_dashboards_utils/public'; import { NotificationsStart } from '../../../src/core/public'; import { DataPublicPluginStart } from '../../../src/plugins/data/public'; -import { KibanaLegacyStart } from '../../../src/plugins/kibana_legacy/public'; +import { OpensearchDashboardsLegacyStart } from '../../../src/plugins/opensearch_dashboards_legacy/public'; export const [getFormatService, setFormatService] = createGetterSetter< DataPublicPluginStart['fieldFormats'] >('table data.fieldFormats'); -export const [getKibanaLegacy, setKibanaLegacy] = createGetterSetter( - 'table kibanaLegacy' +export const [getOpensearchDashboardsLegacy, setOpensearchDashboardsLegacy] = createGetterSetter( + 'table opensearchDashboardsLegacy' ); export const [getNotifications, setNotifications] = createGetterSetter< diff --git a/public/vis_controller.ts b/public/vis_controller.ts index c63e2e6..96f1e39 100755 --- a/public/vis_controller.ts +++ b/public/vis_controller.ts @@ -22,7 +22,7 @@ import $ from 'jquery'; import { VisParams, ExprVis } from '../../../src/plugins/visualizations/public'; import { getAngularModule } from './get_inner_angular'; -import { getKibanaLegacy } from './services'; +import { getOpensearchDashboardsLegacy } from './services'; import { initTableVisLegacyModule } from './table_vis_legacy_module'; const innerAngularName = 'kibana/kbn_network_vis'; @@ -65,7 +65,7 @@ export function getKbnNetworkVisualizationController( } async render(esResponse: object, visParams: VisParams) { - getKibanaLegacy().loadFontAwesome(); + getOpensearchDashboardsLegacy().loadFontAwesome(); await this.initLocalAngular(); return new Promise(async (resolve, reject) => {