-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Uptime] Migrate client to New Platform (#55086)
* Move uptime legacy server to plugins directory. * Re-add feature registration code. * Move uptime legacy server to plugins directory. * Re-add feature registration code. * Move all files. * WIP fixing things. * WIP fixing things. * WIP fixing things. * Finished fixing server. * Fix alert type registration glitch. * Remove obsolete file. * Fix unwanted revisions, uncomment previously un-migrated code, delete accidentally-merged files. * More cleanup. * Fix all non-maps unit tests. * Get functional tests working. * Delete misplaced file. * Add uptime CODEOWNERS entry. * Get map working in Uptime app on NP. * Update CODEOWNERS to remove legacy entry. * Update server imports. * Delete and clean up unused or redundant code/comments. * Move new files from legacy to NP to fix merge error. * Fix broken import. * Delete obsolete test snapshots. * Clean up imports and types, delete obsolete code. * Clean up redundant common imports. * Delete obsolete translation keys. * Add additional explicit typing to plugin class. * Combine redundant common imports. * Delete unneeded optionalPlugin entry. * Revert "Combine redundant common imports." This reverts commit 159e66c. * Update a translation description. * Revert "Clean up redundant common imports." This reverts commit 8794013. * Remove new common index file and revert imports from only common to more specific paths. * Fix broken imports in `~/x-pack/test`. * Move new file from legacy to NP location. Co-authored-by: Elastic Machine <[email protected]>
- Loading branch information
1 parent
8bb67f2
commit 05f0d0a
Showing
480 changed files
with
331 additions
and
401 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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
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
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
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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
File renamed without changes.
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
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,72 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
import { LegacyCoreStart, AppMountParameters } from 'src/core/public'; | ||
import { CoreSetup, CoreStart, Plugin, PluginInitializerContext } from 'kibana/public'; | ||
import { UMFrontendLibs } from '../lib/lib'; | ||
import { PLUGIN } from '../../common/constants'; | ||
import { FeatureCatalogueCategory } from '../../../../../src/plugins/home/public'; | ||
import { getKibanaFrameworkAdapter } from '../lib/adapters/framework/new_platform_adapter'; | ||
import { HomePublicPluginSetup } from '../../../../../src/plugins/home/public'; | ||
import { EmbeddableStart } from '../../../../../src/plugins/embeddable/public'; | ||
import { TriggersAndActionsUIPublicPluginSetup } from '../../../triggers_actions_ui/public'; | ||
import { DataPublicPluginSetup } from '../../../../../src/plugins/data/public'; | ||
|
||
export interface StartObject { | ||
core: LegacyCoreStart; | ||
plugins: any; | ||
} | ||
|
||
export interface ClientPluginsSetup { | ||
data: DataPublicPluginSetup; | ||
home: HomePublicPluginSetup; | ||
triggers_actions_ui: TriggersAndActionsUIPublicPluginSetup; | ||
} | ||
|
||
export interface ClientPluginsStart { | ||
embeddable: EmbeddableStart; | ||
} | ||
|
||
export class UptimePlugin implements Plugin<void, void, ClientPluginsSetup, ClientPluginsStart> { | ||
constructor(_context: PluginInitializerContext) {} | ||
|
||
public async setup( | ||
core: CoreSetup<ClientPluginsStart, unknown>, | ||
plugins: ClientPluginsSetup | ||
): Promise<void> { | ||
if (plugins.home) { | ||
plugins.home.featureCatalogue.register({ | ||
id: PLUGIN.ID, | ||
title: PLUGIN.TITLE, | ||
description: PLUGIN.DESCRIPTION, | ||
icon: 'uptimeApp', | ||
path: '/app/uptime#/', | ||
showOnHomePage: true, | ||
category: FeatureCatalogueCategory.DATA, | ||
}); | ||
} | ||
|
||
core.application.register({ | ||
appRoute: '/app/uptime#/', | ||
id: PLUGIN.ID, | ||
euiIconType: 'uptimeApp', | ||
order: 8900, | ||
title: PLUGIN.TITLE, | ||
async mount(params: AppMountParameters) { | ||
const [coreStart, corePlugins] = await core.getStartServices(); | ||
const { element } = params; | ||
const libs: UMFrontendLibs = { | ||
framework: getKibanaFrameworkAdapter(coreStart, plugins, corePlugins), | ||
}; | ||
libs.framework.render(element); | ||
return () => {}; | ||
}, | ||
}); | ||
} | ||
|
||
public start(_start: CoreStart, _plugins: {}): void {} | ||
|
||
public stop(): void {} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.