Skip to content

Commit

Permalink
Add RuleFormV2 feature flag to APM
Browse files Browse the repository at this point in the history
  • Loading branch information
Zacqary committed Mar 25, 2024
1 parent 18f0464 commit 6b53b0e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export enum ApmFeatureFlagName {
SourcemapApiAvailable = 'sourcemapApiAvailable',
StorageExplorerAvailable = 'storageExplorerAvailable',
ProfilingIntegrationAvailable = 'profilingIntegrationAvailable',
RuleFormV2Enabled = 'ruleFormV2Enabled',
}

const apmFeatureFlagMap = {
Expand Down Expand Up @@ -52,6 +53,10 @@ const apmFeatureFlagMap = {
default: false,
type: t.boolean,
},
[ApmFeatureFlagName.RuleFormV2Enabled]: {
default: false,
type: t.boolean,
},
};

type ApmFeatureFlagMap = typeof apmFeatureFlagMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ const mockConfig: ConfigSchema = {
sourcemapApiAvailable: true,
storageExplorerAvailable: true,
profilingIntegrationAvailable: false,
ruleFormV2Enabled: false,
},
serverless: { enabled: false },
};
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/observability_solution/apm/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export interface ConfigSchema {
sourcemapApiAvailable: boolean;
storageExplorerAvailable: boolean;
profilingIntegrationAvailable: boolean;
ruleFormV2Enabled: boolean;
};
serverless: {
enabled: boolean;
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/observability_solution/apm/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ const configSchema = schema.object({
* enabling this feature flag.
*/
profilingIntegrationAvailable: schema.boolean({ defaultValue: false }),
ruleFormV2Enabled: schema.boolean({ defaultValue: false }),
}),
serverless: schema.object({
enabled: offeringBasedSchema({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import { usePluginContext } from '../../hooks/use_plugin_context';
export function HeaderMenu(): React.ReactElement | null {
const { http, theme } = useKibana().services;

const { appMountParameters } = usePluginContext();

const { appMountParameters, experimentalFeatures } = usePluginContext();
console.log('EXPERIMENTAL', experimentalFeatures);
return (
<HeaderMenuPortal
setHeaderActionMenu={appMountParameters?.setHeaderActionMenu!}
Expand Down

0 comments on commit 6b53b0e

Please sign in to comment.