* remove obsolete legacy server deps * licensePreRoutingFactory uses licensing plugin rather than legacy xpack * move schemas to dir in routes * use NP license check method for license check * store license data in plugin for passing to check * create server plugin files in NP plugin dir * remove dependency on legacy xpack plugin * add sample data links first step * move all server dirs from legacy to np dir * fix requiredPlugin spaces name and update import routes * delete unnecessary files and add sample data links * update license and privilege check tests * add routeInit types
43 lines
1.3 KiB
TypeScript
43 lines
1.3 KiB
TypeScript
/*
|
|
* 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 { UsageCollectionSetup } from 'src/plugins/usage_collection/server';
|
|
import { HomeServerPluginSetup } from 'src/plugins/home/server';
|
|
import { IRouter } from 'src/core/server';
|
|
import { CloudSetup } from '../../cloud/server';
|
|
import { SecurityPluginSetup } from '../../security/server';
|
|
import { PluginSetupContract as FeaturesPluginSetup } from '../../features/server';
|
|
import { LicensingPluginSetup } from '../../licensing/server';
|
|
import { SpacesPluginSetup } from '../../spaces/server';
|
|
|
|
export interface LicenseCheckResult {
|
|
isAvailable: boolean;
|
|
isActive: boolean;
|
|
isEnabled: boolean;
|
|
isSecurityDisabled: boolean;
|
|
status?: string;
|
|
type?: string;
|
|
}
|
|
|
|
export interface SystemRouteDeps {
|
|
cloud: CloudSetup;
|
|
spacesPlugin: SpacesPluginSetup;
|
|
}
|
|
|
|
export interface PluginsSetup {
|
|
cloud: CloudSetup;
|
|
features: FeaturesPluginSetup;
|
|
home: HomeServerPluginSetup;
|
|
licensing: LicensingPluginSetup;
|
|
security: SecurityPluginSetup;
|
|
spaces: SpacesPluginSetup;
|
|
usageCollection: UsageCollectionSetup;
|
|
}
|
|
|
|
export interface RouteInitialization {
|
|
router: IRouter;
|
|
getLicenseCheckResults: () => LicenseCheckResult;
|
|
}
|