Skip to content

Commit

Permalink
Removed unused comments
Browse files Browse the repository at this point in the history
Fixed use of legacy server components
  • Loading branch information
jloleysens committed Nov 11, 2019
1 parent 88f3394 commit 9777874
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
9 changes: 7 additions & 2 deletions x-pack/legacy/plugins/upgrade_assistant/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,16 @@ export function upgradeAssistant(kibana: any) {
const instance = plugin({} as any);
instance.setup({} as any, {
__LEGACY: {
route: server.route.bind(server),
// Legacy objects
events: server.events,
usage: server.usage,
savedObjects: server.savedObjects,

// Legacy functions
log: server.log.bind(server),
events: server.events.bind(server),
route: server.route.bind(server),

// Legacy plugins
plugins: {
elasticsearch: server.plugins.elasticsearch,
xpack_main: server.plugins.xpack_main,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ const START_UPGRADE_STEP = (isCloudEnabled: boolean) => ({
export const StepsUI: StatelessComponent<
UpgradeAssistantTabProps & ReactIntl.InjectedIntlProps
> = ({ checkupData, setSelectedTabIndex, intl }) => {
// Uncomment when START_UPGRADE_STEP is in use!
// const { isCloudEnabled } = useAppContext();
const checkupDataTyped = (checkupData! as unknown) as { [checkupType: string]: any[] };
const countByType = Object.keys(checkupDataTyped).reduce(
(counts, checkupType) => {
Expand All @@ -106,7 +104,8 @@ export const StepsUI: StatelessComponent<
{} as { [checkupType: string]: number }
);

const { http, XSRF } = useAppContext();
// Uncomment when START_UPGRADE_STEP is in use!
const { http, XSRF /* , isCloudEnabled */ } = useAppContext();

return (
<EuiSteps
Expand Down Expand Up @@ -272,6 +271,7 @@ export const StepsUI: StatelessComponent<

// Swap in START_UPGRADE_STEP on the last minor release.
WAIT_FOR_RELEASE_STEP,
// START_UPGRADE_STEP(isCloudEnabled),
]}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/
import { Plugin, CoreSetup, CoreStart } from 'src/core/server';
import { ServerShim } from './types';
import { UpgradeAssistantTelemetryServer } from '../../common/types';
import { credentialStoreFactory } from './lib/reindexing/credential_store';
import { makeUpgradeAssistantUsageCollector } from './lib/telemetry';
import { registerClusterCheckupRoutes } from './routes/cluster_checkup';
Expand Down

0 comments on commit 9777874

Please sign in to comment.