mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Reporting] Allow reporting capabilities on gold with the new reporting roles (#129374)
* set min license level to gold
* remove use of standard license
* update tests to check for gold level license
* accept gold license in feature registration
* Revert "remove use of standard license"
This reverts commit 684f8f500c
.
* refactor LICENSE_TYPE_STANDARD to LICENSE_TYPE_CLOUD_STANDARD
* also update canvas to use gold min
* updated canvas features snapshot
* remember to save files!
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
0790fd01d9
commit
edf6e21941
13 changed files with 23 additions and 22 deletions
|
@ -173,7 +173,7 @@ it(`Calls on Reporting whether to include Generate PDF as a sub-feature`, () =>
|
|||
"reporting",
|
||||
],
|
||||
},
|
||||
"minimumLicense": "platinum",
|
||||
"minimumLicense": "gold",
|
||||
"name": "Generate PDF reports",
|
||||
"savedObject": Object {
|
||||
"all": Array [],
|
||||
|
|
|
@ -65,7 +65,7 @@ export function getCanvasFeature(plugins: { reporting?: ReportingSetup }): Kiban
|
|||
}),
|
||||
includeIn: 'all',
|
||||
management: { insightsAndAlerting: ['reporting'] },
|
||||
minimumLicense: 'platinum',
|
||||
minimumLicense: 'gold',
|
||||
savedObject: { all: [], read: [] },
|
||||
api: ['generateReport'],
|
||||
ui: ['generatePdf'],
|
||||
|
|
|
@ -309,7 +309,7 @@ Array [
|
|||
"reporting",
|
||||
],
|
||||
},
|
||||
"minimumLicense": "platinum",
|
||||
"minimumLicense": "gold",
|
||||
"name": "Generate PDF or PNG reports",
|
||||
"savedObject": Object {
|
||||
"all": Array [],
|
||||
|
@ -401,7 +401,7 @@ Array [
|
|||
"reporting",
|
||||
],
|
||||
},
|
||||
"minimumLicense": "platinum",
|
||||
"minimumLicense": "gold",
|
||||
"name": "Generate PDF or PNG reports",
|
||||
"savedObject": Object {
|
||||
"all": Array [],
|
||||
|
|
|
@ -39,6 +39,7 @@ const validLicenseSchema = schema.oneOf([
|
|||
const validSubFeaturePrivilegeLicensesSchema = schema.oneOf([
|
||||
schema.literal('platinum'),
|
||||
schema.literal('enterprise'),
|
||||
schema.literal('gold'),
|
||||
schema.literal('trial'),
|
||||
]);
|
||||
|
||||
|
|
|
@ -514,7 +514,7 @@ const reportingFeatures: {
|
|||
}
|
||||
),
|
||||
includeIn: 'all',
|
||||
minimumLicense: 'platinum',
|
||||
minimumLicense: 'gold',
|
||||
savedObject: { all: [], read: [] },
|
||||
management: { insightsAndAlerting: ['reporting'] },
|
||||
api: ['generateReport'],
|
||||
|
@ -550,7 +550,7 @@ const reportingFeatures: {
|
|||
}
|
||||
),
|
||||
includeIn: 'all',
|
||||
minimumLicense: 'platinum',
|
||||
minimumLicense: 'gold',
|
||||
savedObject: { all: [], read: [] },
|
||||
management: { insightsAndAlerting: ['reporting'] },
|
||||
api: ['generateReport'],
|
||||
|
|
|
@ -67,7 +67,7 @@ export const DEPRECATED_JOB_TYPES = [CSV_JOB_TYPE_DEPRECATED];
|
|||
// Licenses
|
||||
export const LICENSE_TYPE_TRIAL = 'trial';
|
||||
export const LICENSE_TYPE_BASIC = 'basic';
|
||||
export const LICENSE_TYPE_STANDARD = 'standard';
|
||||
export const LICENSE_TYPE_CLOUD_STANDARD = 'standard';
|
||||
export const LICENSE_TYPE_GOLD = 'gold';
|
||||
export const LICENSE_TYPE_PLATINUM = 'platinum';
|
||||
export const LICENSE_TYPE_ENTERPRISE = 'enterprise';
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
LICENSE_TYPE_ENTERPRISE,
|
||||
LICENSE_TYPE_GOLD,
|
||||
LICENSE_TYPE_PLATINUM,
|
||||
LICENSE_TYPE_STANDARD,
|
||||
LICENSE_TYPE_CLOUD_STANDARD,
|
||||
LICENSE_TYPE_TRIAL,
|
||||
} from '../../../common/constants';
|
||||
import { CreateJobFn, ExportTypeDefinition, RunTaskFn } from '../../types';
|
||||
|
@ -32,7 +32,7 @@ export const getExportType = (): ExportTypeDefinition<
|
|||
validLicenses: [
|
||||
LICENSE_TYPE_TRIAL,
|
||||
LICENSE_TYPE_BASIC,
|
||||
LICENSE_TYPE_STANDARD,
|
||||
LICENSE_TYPE_CLOUD_STANDARD,
|
||||
LICENSE_TYPE_GOLD,
|
||||
LICENSE_TYPE_PLATINUM,
|
||||
LICENSE_TYPE_ENTERPRISE,
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
LICENSE_TYPE_ENTERPRISE,
|
||||
LICENSE_TYPE_GOLD,
|
||||
LICENSE_TYPE_PLATINUM,
|
||||
LICENSE_TYPE_STANDARD,
|
||||
LICENSE_TYPE_CLOUD_STANDARD,
|
||||
LICENSE_TYPE_TRIAL,
|
||||
} from '../../../common/constants';
|
||||
import { ExportTypeDefinition } from '../../types';
|
||||
|
@ -33,7 +33,7 @@ export const getExportType = (): ExportTypeDefinition<null, ImmediateExecuteFn>
|
|||
validLicenses: [
|
||||
LICENSE_TYPE_TRIAL,
|
||||
LICENSE_TYPE_BASIC,
|
||||
LICENSE_TYPE_STANDARD,
|
||||
LICENSE_TYPE_CLOUD_STANDARD,
|
||||
LICENSE_TYPE_GOLD,
|
||||
LICENSE_TYPE_PLATINUM,
|
||||
LICENSE_TYPE_ENTERPRISE,
|
||||
|
|
|
@ -9,7 +9,7 @@ import {
|
|||
LICENSE_TYPE_ENTERPRISE,
|
||||
LICENSE_TYPE_GOLD,
|
||||
LICENSE_TYPE_PLATINUM,
|
||||
LICENSE_TYPE_STANDARD,
|
||||
LICENSE_TYPE_CLOUD_STANDARD,
|
||||
LICENSE_TYPE_TRIAL,
|
||||
PNG_JOB_TYPE as jobType,
|
||||
} from '../../../common/constants';
|
||||
|
@ -31,7 +31,7 @@ export const getExportType = (): ExportTypeDefinition<
|
|||
runTaskFnFactory,
|
||||
validLicenses: [
|
||||
LICENSE_TYPE_TRIAL,
|
||||
LICENSE_TYPE_STANDARD,
|
||||
LICENSE_TYPE_CLOUD_STANDARD,
|
||||
LICENSE_TYPE_GOLD,
|
||||
LICENSE_TYPE_PLATINUM,
|
||||
LICENSE_TYPE_ENTERPRISE,
|
||||
|
|
|
@ -9,7 +9,7 @@ import {
|
|||
LICENSE_TYPE_ENTERPRISE,
|
||||
LICENSE_TYPE_GOLD,
|
||||
LICENSE_TYPE_PLATINUM,
|
||||
LICENSE_TYPE_STANDARD,
|
||||
LICENSE_TYPE_CLOUD_STANDARD,
|
||||
LICENSE_TYPE_TRIAL,
|
||||
PNG_JOB_TYPE_V2 as jobType,
|
||||
} from '../../../common/constants';
|
||||
|
@ -31,7 +31,7 @@ export const getExportType = (): ExportTypeDefinition<
|
|||
runTaskFnFactory,
|
||||
validLicenses: [
|
||||
LICENSE_TYPE_TRIAL,
|
||||
LICENSE_TYPE_STANDARD,
|
||||
LICENSE_TYPE_CLOUD_STANDARD,
|
||||
LICENSE_TYPE_GOLD,
|
||||
LICENSE_TYPE_PLATINUM,
|
||||
LICENSE_TYPE_ENTERPRISE,
|
||||
|
|
|
@ -9,7 +9,7 @@ import {
|
|||
LICENSE_TYPE_ENTERPRISE,
|
||||
LICENSE_TYPE_GOLD,
|
||||
LICENSE_TYPE_PLATINUM,
|
||||
LICENSE_TYPE_STANDARD,
|
||||
LICENSE_TYPE_CLOUD_STANDARD,
|
||||
LICENSE_TYPE_TRIAL,
|
||||
PDF_JOB_TYPE as jobType,
|
||||
} from '../../../common/constants';
|
||||
|
@ -31,7 +31,7 @@ export const getExportType = (): ExportTypeDefinition<
|
|||
runTaskFnFactory,
|
||||
validLicenses: [
|
||||
LICENSE_TYPE_TRIAL,
|
||||
LICENSE_TYPE_STANDARD,
|
||||
LICENSE_TYPE_CLOUD_STANDARD,
|
||||
LICENSE_TYPE_GOLD,
|
||||
LICENSE_TYPE_PLATINUM,
|
||||
LICENSE_TYPE_ENTERPRISE,
|
||||
|
|
|
@ -9,7 +9,7 @@ import {
|
|||
LICENSE_TYPE_ENTERPRISE,
|
||||
LICENSE_TYPE_GOLD,
|
||||
LICENSE_TYPE_PLATINUM,
|
||||
LICENSE_TYPE_STANDARD,
|
||||
LICENSE_TYPE_CLOUD_STANDARD,
|
||||
LICENSE_TYPE_TRIAL,
|
||||
PDF_JOB_TYPE_V2 as jobType,
|
||||
} from '../../../common/constants';
|
||||
|
@ -31,7 +31,7 @@ export const getExportType = (): ExportTypeDefinition<
|
|||
runTaskFnFactory,
|
||||
validLicenses: [
|
||||
LICENSE_TYPE_TRIAL,
|
||||
LICENSE_TYPE_STANDARD,
|
||||
LICENSE_TYPE_CLOUD_STANDARD,
|
||||
LICENSE_TYPE_GOLD,
|
||||
LICENSE_TYPE_PLATINUM,
|
||||
LICENSE_TYPE_ENTERPRISE,
|
||||
|
|
|
@ -23,7 +23,7 @@ import {
|
|||
const exportTypesRegistry = getExportTypesRegistry();
|
||||
|
||||
const getLicenseMock =
|
||||
(licenseType = 'platinum') =>
|
||||
(licenseType = 'gold') =>
|
||||
() => {
|
||||
return Promise.resolve({
|
||||
isAvailable: () => true,
|
||||
|
@ -96,12 +96,12 @@ describe('license checks', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('with platinum license', () => {
|
||||
describe('with gold license', () => {
|
||||
let usageStats: any;
|
||||
beforeAll(async () => {
|
||||
const collector = getReportingUsageCollector(
|
||||
usageCollectionSetup,
|
||||
getLicenseMock('platinum'),
|
||||
getLicenseMock('gold'),
|
||||
exportTypesRegistry,
|
||||
function isReady() {
|
||||
return Promise.resolve(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue