From d1b7db49175eb4fbfefd276a09788533afae0d1f Mon Sep 17 00:00:00 2001 From: Angela Chuang <6295984+angorayc@users.noreply.github.com> Date: Fri, 27 Jan 2023 14:30:12 +0000 Subject: [PATCH] [SecuritySolution] Query risk score without time range (#149682) ## Summary Issue: https://github.com/elastic/security-team/issues/5817 Steps to verify: 1. visit app/security/entity_analytics 2. Inspect host risk score donut chart and user risk score donut chart 3. There should be no time range in their requests. Screenshot 2023-01-27 at 12 21 01 ### Checklist Delete any items that are not applicable to this PR. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --- .../risk_scores/__snapshots__/risk_score_donut.test.ts.snap | 4 ++-- .../lens_attributes/common/risk_scores/risk_score_donut.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/risk_scores/__snapshots__/risk_score_donut.test.ts.snap b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/risk_scores/__snapshots__/risk_score_donut.test.ts.snap index 5bf935430d2bd..8b3d9adf080a9 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/risk_scores/__snapshots__/risk_score_donut.test.ts.snap +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/risk_scores/__snapshots__/risk_score_donut.test.ts.snap @@ -11,10 +11,10 @@ Object { "fieldAttrs": Object {}, "fieldFormats": Object {}, "id": "d594baeb-5eca-480c-8885-ba79eaf41372", - "name": "ml_host_risk_score_latest_mockSpaceId", + "name": "ml_host_risk_score_latest_mockSpaceId_no_timestamp", "runtimeFieldMap": Object {}, "sourceFilters": Array [], - "timeFieldName": "@timestamp", + "timeFieldName": "", "title": "ml_host_risk_score_latest_mockSpaceId", }, }, diff --git a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/risk_scores/risk_score_donut.ts b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/risk_scores/risk_score_donut.ts index 9aad237e66c88..c33057ca69ec7 100644 --- a/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/risk_scores/risk_score_donut.ts +++ b/x-pack/plugins/security_solution/public/common/components/visualization_actions/lens_attributes/common/risk_scores/risk_score_donut.ts @@ -132,13 +132,13 @@ export const getRiskScoreDonutAttributes: GetLensAttributes = ( [internalReferenceId]: { id: internalReferenceId, title: `ml_${stackByField}_risk_score_latest_${extraOptions.spaceId}`, - timeFieldName: '@timestamp', + timeFieldName: '', sourceFilters: [], fieldFormats: {}, runtimeFieldMap: {}, fieldAttrs: {}, allowNoIndex: false, - name: `ml_${stackByField}_risk_score_latest_${extraOptions.spaceId}`, + name: `ml_${stackByField}_risk_score_latest_${extraOptions.spaceId}_no_timestamp`, }, }, },