-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into max-signals-warning
- Loading branch information
Showing
46 changed files
with
1,034 additions
and
3,984 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ | |
}, | ||
{ | ||
"name": "endpoint", | ||
"version": "8.7.1" | ||
"version": "8.8.0" | ||
}, | ||
{ | ||
"name": "fleet_server", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 0 additions & 35 deletions
35
x-pack/plugins/cloud_security_posture/public/common/utils/get_cvsscore_color.test.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
x-pack/plugins/cloud_security_posture/public/common/utils/get_vulnerabiltity_colors.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { euiThemeVars } from '@kbn/ui-theme'; | ||
import { getCvsScoreColor, getSeverityStatusColor } from './get_vulnerability_colors'; | ||
|
||
describe('getCvsScoreColor', () => { | ||
it('returns correct color for low severity score', () => { | ||
expect(getCvsScoreColor(1.5)).toBe(euiThemeVars.euiColorVis0); | ||
}); | ||
|
||
it('returns correct color for medium severity score', () => { | ||
expect(getCvsScoreColor(5.5)).toBe(euiThemeVars.euiColorVis7); | ||
}); | ||
|
||
it('returns correct color for high severity score', () => { | ||
expect(getCvsScoreColor(7.9)).toBe(euiThemeVars.euiColorVis9); | ||
}); | ||
|
||
it('returns correct color for critical severity score', () => { | ||
expect(getCvsScoreColor(10.0)).toBe(euiThemeVars.euiColorDanger); | ||
}); | ||
|
||
it('returns correct color for low severity score for undefined value', () => { | ||
expect(getCvsScoreColor(-0.2)).toBe(euiThemeVars.euiColorVis0); | ||
}); | ||
}); | ||
|
||
describe('getSeverityStatusColor', () => { | ||
it('should return the correct color for LOW severity', () => { | ||
expect(getSeverityStatusColor('LOW')).toBe(euiThemeVars.euiColorVis0); | ||
}); | ||
|
||
it('should return the correct color for MEDIUM severity', () => { | ||
expect(getSeverityStatusColor('MEDIUM')).toBe(euiThemeVars.euiColorVis7); | ||
}); | ||
|
||
it('should return the correct color for HIGH severity', () => { | ||
expect(getSeverityStatusColor('HIGH')).toBe(euiThemeVars.euiColorVis9); | ||
}); | ||
|
||
it('should return the correct color for CRITICAL severity', () => { | ||
expect(getSeverityStatusColor('CRITICAL')).toBe(euiThemeVars.euiColorDanger); | ||
}); | ||
|
||
it('should return #aaa for an unknown severity', () => { | ||
expect(getSeverityStatusColor('UNKNOWN')).toBe('#aaa'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.