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 () => {
|
||||
testBed = await setup({
|
||||
plugins: { fleet: { hi: 'ok' } },
|
||||
plugins: { isFleetEnabled: true },
|
||||
});
|
||||
|
||||
await act(async () => {
|
||||
|
|
|
@ -8,9 +8,8 @@ import React, { createContext, useContext } from 'react';
|
|||
import { ScopedHistory } from 'kibana/public';
|
||||
import { ManagementAppMountParams } from 'src/plugins/management/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 { ExtensionsService } from '../services';
|
||||
import { SharePluginStart } from '../../../../../src/plugins/share/public';
|
||||
|
@ -24,7 +23,7 @@ export interface AppDependencies {
|
|||
};
|
||||
plugins: {
|
||||
usageCollection: UsageCollectionSetup;
|
||||
fleet?: FleetSetup;
|
||||
isFleetEnabled: boolean;
|
||||
};
|
||||
services: {
|
||||
uiMetricService: UiMetricService;
|
||||
|
|
|
@ -9,7 +9,6 @@ import { CoreSetup } from 'src/core/public';
|
|||
import { ManagementAppMountParams } from 'src/plugins/management/public/';
|
||||
import { UsageCollectionSetup } from 'src/plugins/usage_collection/public';
|
||||
|
||||
import { FleetSetup } from '../../../fleet/public';
|
||||
import { UIM_APP_NAME } from '../../common/constants';
|
||||
import { PLUGIN } from '../../common/constants/plugin';
|
||||
import { ExtensionsService } from '../services';
|
||||
|
@ -50,7 +49,7 @@ export async function mountManagementSection(
|
|||
usageCollection: UsageCollectionSetup,
|
||||
params: ManagementAppMountParams,
|
||||
extensionsService: ExtensionsService,
|
||||
fleet?: FleetSetup
|
||||
isFleetEnabled: boolean
|
||||
) {
|
||||
const { element, setBreadcrumbs, history } = params;
|
||||
const [core, startDependencies] = await coreSetup.getStartServices();
|
||||
|
@ -80,7 +79,7 @@ export async function mountManagementSection(
|
|||
},
|
||||
plugins: {
|
||||
usageCollection,
|
||||
fleet,
|
||||
isFleetEnabled,
|
||||
},
|
||||
services: { httpService, notificationService, uiMetricService, extensionsService },
|
||||
history,
|
||||
|
|
|
@ -52,7 +52,7 @@ export const DataStreamList: React.FunctionComponent<RouteComponentProps<MatchPa
|
|||
|
||||
const {
|
||||
core: { getUrlForApp },
|
||||
plugins: { fleet },
|
||||
plugins: { isFleetEnabled },
|
||||
} = useAppContext();
|
||||
|
||||
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."
|
||||
/>
|
||||
{' ' /* We need this space to separate these two sentences. */}
|
||||
{fleet ? (
|
||||
{isFleetEnabled ? (
|
||||
<FormattedMessage
|
||||
id="xpack.idxMgmt.dataStreamList.emptyPrompt.noDataStreamsCtaIngestManagerMessage"
|
||||
defaultMessage="Get started with data streams in {link}."
|
||||
|
|
|
@ -41,7 +41,7 @@ export class IndexMgmtUIPlugin {
|
|||
usageCollection,
|
||||
params,
|
||||
this.extensionsService,
|
||||
fleet
|
||||
Boolean(fleet)
|
||||
);
|
||||
},
|
||||
});
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
*/
|
||||
|
||||
import { ExtensionsSetup } from './services';
|
||||
import { FleetSetup } from '../../fleet/public';
|
||||
import { UsageCollectionSetup } from '../../../../src/plugins/usage_collection/public';
|
||||
import { ManagementSetup } from '../../../../src/plugins/management/public';
|
||||
import { SharePluginStart } from '../../../../src/plugins/share/public';
|
||||
|
@ -15,7 +14,7 @@ export interface IndexManagementPluginSetup {
|
|||
}
|
||||
|
||||
export interface SetupDependencies {
|
||||
fleet?: FleetSetup;
|
||||
fleet?: unknown;
|
||||
usageCollection: UsageCollectionSetup;
|
||||
management: ManagementSetup;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue