mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 02:09:32 -04:00
remove type dependency between index_management and fleet (#89699)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
391ab72be1
commit
4380c49d38
6 changed files with 9 additions and 12 deletions
|
@ -71,7 +71,7 @@ describe('Data Streams tab', () => {
|
||||||
|
|
||||||
test('when Fleet is enabled, links to Fleet', async () => {
|
test('when Fleet is enabled, links to Fleet', async () => {
|
||||||
testBed = await setup({
|
testBed = await setup({
|
||||||
plugins: { fleet: { hi: 'ok' } },
|
plugins: { isFleetEnabled: true },
|
||||||
});
|
});
|
||||||
|
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
|
|
|
@ -8,9 +8,8 @@ import React, { createContext, useContext } from 'react';
|
||||||
import { ScopedHistory } from 'kibana/public';
|
import { ScopedHistory } from 'kibana/public';
|
||||||
import { ManagementAppMountParams } from 'src/plugins/management/public';
|
import { ManagementAppMountParams } from 'src/plugins/management/public';
|
||||||
import { UsageCollectionSetup } from 'src/plugins/usage_collection/public';
|
import { UsageCollectionSetup } from 'src/plugins/usage_collection/public';
|
||||||
import { CoreSetup, CoreStart } from '../../../../../src/core/public';
|
|
||||||
|
|
||||||
import { FleetSetup } from '../../../fleet/public';
|
import { CoreSetup, CoreStart } from '../../../../../src/core/public';
|
||||||
import { UiMetricService, NotificationService, HttpService } from './services';
|
import { UiMetricService, NotificationService, HttpService } from './services';
|
||||||
import { ExtensionsService } from '../services';
|
import { ExtensionsService } from '../services';
|
||||||
import { SharePluginStart } from '../../../../../src/plugins/share/public';
|
import { SharePluginStart } from '../../../../../src/plugins/share/public';
|
||||||
|
@ -24,7 +23,7 @@ export interface AppDependencies {
|
||||||
};
|
};
|
||||||
plugins: {
|
plugins: {
|
||||||
usageCollection: UsageCollectionSetup;
|
usageCollection: UsageCollectionSetup;
|
||||||
fleet?: FleetSetup;
|
isFleetEnabled: boolean;
|
||||||
};
|
};
|
||||||
services: {
|
services: {
|
||||||
uiMetricService: UiMetricService;
|
uiMetricService: UiMetricService;
|
||||||
|
|
|
@ -9,7 +9,6 @@ import { CoreSetup } from 'src/core/public';
|
||||||
import { ManagementAppMountParams } from 'src/plugins/management/public/';
|
import { ManagementAppMountParams } from 'src/plugins/management/public/';
|
||||||
import { UsageCollectionSetup } from 'src/plugins/usage_collection/public';
|
import { UsageCollectionSetup } from 'src/plugins/usage_collection/public';
|
||||||
|
|
||||||
import { FleetSetup } from '../../../fleet/public';
|
|
||||||
import { UIM_APP_NAME } from '../../common/constants';
|
import { UIM_APP_NAME } from '../../common/constants';
|
||||||
import { PLUGIN } from '../../common/constants/plugin';
|
import { PLUGIN } from '../../common/constants/plugin';
|
||||||
import { ExtensionsService } from '../services';
|
import { ExtensionsService } from '../services';
|
||||||
|
@ -50,7 +49,7 @@ export async function mountManagementSection(
|
||||||
usageCollection: UsageCollectionSetup,
|
usageCollection: UsageCollectionSetup,
|
||||||
params: ManagementAppMountParams,
|
params: ManagementAppMountParams,
|
||||||
extensionsService: ExtensionsService,
|
extensionsService: ExtensionsService,
|
||||||
fleet?: FleetSetup
|
isFleetEnabled: boolean
|
||||||
) {
|
) {
|
||||||
const { element, setBreadcrumbs, history } = params;
|
const { element, setBreadcrumbs, history } = params;
|
||||||
const [core, startDependencies] = await coreSetup.getStartServices();
|
const [core, startDependencies] = await coreSetup.getStartServices();
|
||||||
|
@ -80,7 +79,7 @@ export async function mountManagementSection(
|
||||||
},
|
},
|
||||||
plugins: {
|
plugins: {
|
||||||
usageCollection,
|
usageCollection,
|
||||||
fleet,
|
isFleetEnabled,
|
||||||
},
|
},
|
||||||
services: { httpService, notificationService, uiMetricService, extensionsService },
|
services: { httpService, notificationService, uiMetricService, extensionsService },
|
||||||
history,
|
history,
|
||||||
|
|
|
@ -52,7 +52,7 @@ export const DataStreamList: React.FunctionComponent<RouteComponentProps<MatchPa
|
||||||
|
|
||||||
const {
|
const {
|
||||||
core: { getUrlForApp },
|
core: { getUrlForApp },
|
||||||
plugins: { fleet },
|
plugins: { isFleetEnabled },
|
||||||
} = useAppContext();
|
} = useAppContext();
|
||||||
|
|
||||||
const [isIncludeStatsChecked, setIsIncludeStatsChecked] = useState(false);
|
const [isIncludeStatsChecked, setIsIncludeStatsChecked] = useState(false);
|
||||||
|
@ -203,7 +203,7 @@ export const DataStreamList: React.FunctionComponent<RouteComponentProps<MatchPa
|
||||||
defaultMessage="Data streams store time-series data across multiple indices."
|
defaultMessage="Data streams store time-series data across multiple indices."
|
||||||
/>
|
/>
|
||||||
{' ' /* We need this space to separate these two sentences. */}
|
{' ' /* We need this space to separate these two sentences. */}
|
||||||
{fleet ? (
|
{isFleetEnabled ? (
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id="xpack.idxMgmt.dataStreamList.emptyPrompt.noDataStreamsCtaIngestManagerMessage"
|
id="xpack.idxMgmt.dataStreamList.emptyPrompt.noDataStreamsCtaIngestManagerMessage"
|
||||||
defaultMessage="Get started with data streams in {link}."
|
defaultMessage="Get started with data streams in {link}."
|
||||||
|
|
|
@ -41,7 +41,7 @@ export class IndexMgmtUIPlugin {
|
||||||
usageCollection,
|
usageCollection,
|
||||||
params,
|
params,
|
||||||
this.extensionsService,
|
this.extensionsService,
|
||||||
fleet
|
Boolean(fleet)
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ExtensionsSetup } from './services';
|
import { ExtensionsSetup } from './services';
|
||||||
import { FleetSetup } from '../../fleet/public';
|
|
||||||
import { UsageCollectionSetup } from '../../../../src/plugins/usage_collection/public';
|
import { UsageCollectionSetup } from '../../../../src/plugins/usage_collection/public';
|
||||||
import { ManagementSetup } from '../../../../src/plugins/management/public';
|
import { ManagementSetup } from '../../../../src/plugins/management/public';
|
||||||
import { SharePluginStart } from '../../../../src/plugins/share/public';
|
import { SharePluginStart } from '../../../../src/plugins/share/public';
|
||||||
|
@ -15,7 +14,7 @@ export interface IndexManagementPluginSetup {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SetupDependencies {
|
export interface SetupDependencies {
|
||||||
fleet?: FleetSetup;
|
fleet?: unknown;
|
||||||
usageCollection: UsageCollectionSetup;
|
usageCollection: UsageCollectionSetup;
|
||||||
management: ManagementSetup;
|
management: ManagementSetup;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue