Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit available spaces to 1 for risk engine #167110

Merged
merged 18 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
* 2.0.
*/

export const MAX_SPACES_COUNT = 2;
export const MAX_SPACES_COUNT = 1;
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ export const UPDATE_PANEL_GO_TO_DISMISS = i18n.translate(
export const getMaxSpaceTitle = (maxSpaces: number) =>
i18n.translate('xpack.securitySolution.riskScore.maxSpacePanel.title', {
defaultMessage:
'Entity Risk Scoring in the current version can run in {maxSpaces} Kibana spaces.',
'Entity Risk Scoring in the current version can run in {maxSpaces, plural, =1 {# Kibana space} other {# Kibana spaces}}',
values: { maxSpaces },
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ describe('RiskEngineDataClient', () => {
namespace: 'default',
});
expect(status).toEqual({
isMaxAmountOfRiskEnginesReached: false,
isMaxAmountOfRiskEnginesReached: true,
riskEngineStatus: 'ENABLED',
legacyRiskEngineStatus: 'NOT_INSTALLED',
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,9 +373,8 @@ export default ({ getService }: FtrProviderContext) => {
});

describe('status api', () => {
it('should disable / enable risk engige', async () => {
it('should disable / enable risk engine', async () => {
const status1 = await riskEngineRoutes.getStatus();
await riskEngineRoutes.init();

expect(status1.body).to.eql({
risk_engine_status: 'NOT_INSTALLED',
Expand All @@ -390,7 +389,7 @@ export default ({ getService }: FtrProviderContext) => {
expect(status2.body).to.eql({
risk_engine_status: 'ENABLED',
legacy_risk_engine_status: 'NOT_INSTALLED',
is_max_amount_of_risk_engines_reached: false,
is_max_amount_of_risk_engines_reached: true,
});

await riskEngineRoutes.disable();
Expand All @@ -408,7 +407,7 @@ export default ({ getService }: FtrProviderContext) => {
expect(status4.body).to.eql({
risk_engine_status: 'ENABLED',
legacy_risk_engine_status: 'NOT_INSTALLED',
is_max_amount_of_risk_engines_reached: false,
is_max_amount_of_risk_engines_reached: true,
});
});

Expand All @@ -429,7 +428,7 @@ export default ({ getService }: FtrProviderContext) => {
expect(status2.body).to.eql({
risk_engine_status: 'ENABLED',
legacy_risk_engine_status: 'NOT_INSTALLED',
is_max_amount_of_risk_engines_reached: false,
is_max_amount_of_risk_engines_reached: true,
});
});
});
Expand Down