mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[SLO] update default feature flag value for slo management (#216919)
## Summary update default feature flag value for slo management, persist flag state to callout
This commit is contained in:
parent
0c5fa84659
commit
8999324ed5
5 changed files with 10 additions and 21 deletions
|
@ -378,7 +378,6 @@ export default function ({ getService }: PluginFunctionalProviderContext) {
|
|||
'xpack.apm.featureFlags.ruleFormV2Enabled (boolean?)',
|
||||
'xpack.observability.unsafe.ruleFormV2.enabled (boolean?)',
|
||||
'xpack.slo.experimental.ruleFormV2.enabled (boolean?)',
|
||||
'xpack.slo.experimental.management.enabled (boolean?)',
|
||||
/**/
|
||||
];
|
||||
// We don't assert that actualExposedConfigKeys and expectedExposedConfigKeys are equal, because test failure messages with large
|
||||
|
|
|
@ -16,9 +16,6 @@ export const configSchema = schema.object({
|
|||
ruleFormV2: schema.object({
|
||||
enabled: schema.boolean({ defaultValue: false }),
|
||||
}),
|
||||
management: schema.object({
|
||||
enabled: schema.boolean({ defaultValue: false }),
|
||||
}),
|
||||
})
|
||||
),
|
||||
});
|
||||
|
|
|
@ -140,9 +140,9 @@ export const renderApp = ({
|
|||
};
|
||||
|
||||
function App() {
|
||||
const { isServerless, experimentalFeatures } = usePluginContext();
|
||||
const { isServerless } = usePluginContext();
|
||||
|
||||
const routes = getRoutes(isServerless, experimentalFeatures);
|
||||
const routes = getRoutes(isServerless);
|
||||
|
||||
return (
|
||||
<Routes enableExecutionContextTracking={true}>
|
||||
|
|
|
@ -44,7 +44,6 @@ export class SLOPlugin
|
|||
{
|
||||
private readonly appUpdater$ = new BehaviorSubject<AppUpdater>(() => ({}));
|
||||
private experimentalFeatures: ExperimentalFeatures = {
|
||||
management: { enabled: false },
|
||||
ruleFormV2: { enabled: false },
|
||||
};
|
||||
|
||||
|
|
|
@ -20,12 +20,10 @@ import {
|
|||
SLO_SETTINGS_PATH,
|
||||
} from '../../common/locators/paths';
|
||||
import { SloSettingsPage } from '../pages/slo_settings/slo_settings';
|
||||
import { ExperimentalFeatures } from '../../common/config';
|
||||
import { SloManagementPage } from '../pages/slo_management/slo_management_page';
|
||||
|
||||
export const getRoutes = (
|
||||
isServerless?: boolean,
|
||||
experimentalFeatures?: ExperimentalFeatures
|
||||
isServerless?: boolean
|
||||
): {
|
||||
[key: string]: {
|
||||
handler: () => React.ReactElement;
|
||||
|
@ -73,17 +71,13 @@ export const getRoutes = (
|
|||
},
|
||||
}
|
||||
: {}),
|
||||
...(!!experimentalFeatures?.management.enabled
|
||||
? {
|
||||
[SLOS_MANAGEMENT_PATH]: {
|
||||
handler: () => {
|
||||
return <SloManagementPage />;
|
||||
},
|
||||
params: {},
|
||||
exact: true,
|
||||
},
|
||||
}
|
||||
: {}),
|
||||
[SLOS_MANAGEMENT_PATH]: {
|
||||
handler: () => {
|
||||
return <SloManagementPage />;
|
||||
},
|
||||
params: {},
|
||||
exact: true,
|
||||
},
|
||||
[SLO_DETAIL_PATH]: {
|
||||
handler: () => {
|
||||
return <SloDetailsPage />;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue