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

[Cloud Posture]add support for sorting benchmark page #126983

Merged
merged 7 commits into from
Mar 10, 2022

Conversation

CohenIdo
Copy link
Contributor

@CohenIdo CohenIdo commented Mar 6, 2022

Resolves: #126983
Add support for sort benchmarks in cloud security posture plugin

To test it create different agent policies, for each one of the set different name,
then use the next curl commands:

curl --location --request GET 'http://localhost:5601/api/csp/benchmarks?sort_field=name' \
--header 'Authorization: Basic ZWxhc3RpYzpjaGFuZ2VtZQ==' \
--header 'kbn-xsrf;'

@CohenIdo CohenIdo added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting v8.2.0 Team:Cloud Security Cloud Security team related labels Mar 6, 2022
@CohenIdo CohenIdo requested a review from a team as a code owner March 6, 2022 12:55
@CohenIdo CohenIdo linked an issue Mar 6, 2022 that may be closed by this pull request
@CohenIdo CohenIdo requested review from kfirpeled and ari-aviran March 6, 2022 12:58
@CohenIdo CohenIdo changed the title add support for sorting benchmark page [Cloud Posture]add support for sorting benchmark page Mar 7, 2022
@CohenIdo CohenIdo requested a review from a team as a code owner March 9, 2022 08:33
Copy link
Contributor

@kfirpeled kfirpeled left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sort by policy_id don't work

Copy link
Contributor

@kfirpeled kfirpeled left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@@ -197,6 +221,14 @@ export const benchmarksInputSchema = rt.object({
* The number of objects to include in each page
*/
per_page: rt.number({ defaultValue: DEFAULT_BENCHMARKS_PER_PAGE, min: 0 }),
/**
* The field to use for sorting the found objects.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please refer to which fields can be sorted and which are not

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@CohenIdo CohenIdo merged commit 74659af into elastic:main Mar 10, 2022
jloleysens added a commit to jloleysens/kibana that referenced this pull request Mar 10, 2022
…move-pdf-generation-to-screenshotting

* 'main' of github.com:elastic/kibana: (62 commits)
  [Lens] Drop partial buckets option (elastic#127153)
  chore(NA): remove unused translation xpack.ml.management.jobsSpacesList.objectNoun from fr-FR (elastic#127457)
  Add data to user details page (elastic#127019)
  [Fleet] Make upload and registry package info consistent (elastic#126915)
  [Reporting] Capture browser errors (elastic#127135)
  Initial readme commit with some stub articles (elastic#127420)
  skip flaky suite (elastic#121482)
  skip flaky suite (elastic#127416)
  Tests to ensure Kibana is handling multi-space import of saved objects correctly (elastic#127229)
  [Aggs] remove toAngularJson (elastic#127267)
  [i18n] Integrate 8.2.0 Translations (elastic#127309)
  [Security Solution] [Endpoint] Creates generic policy tab artifact component to be used for all of our artifacts (elastic#126685)
  [Kibana React] Fix Page Template `solutionNav` propagation (elastic#127140)
  [Cases] Export getRelatedCases API from cases client (elastic#127065)
  [Cloud Posture]add support for sorting benchmark page (elastic#126983)
  [User experience] Fix filters for the app (elastic#127295)
  [Fleet] Fix timeserie dimension mapping (elastic#127328)
  [data view mgmt] fix data view name wrap (elastic#127319)
  [kbn/optimizer] extract string diffing logic (elastic#127394)
  [ResponseOps] Add pagination and sorting to the alerts search strategy (elastic#126813)
  ...

# Conflicts:
#	x-pack/plugins/screenshotting/common/errors.ts
#	x-pack/plugins/screenshotting/common/index.ts
#	x-pack/plugins/screenshotting/server/screenshots/observable.ts
@CohenIdo CohenIdo deleted the benchmarkSorting branch November 21, 2022 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Cloud Security Cloud Security team related v8.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Cloud Posture] Benchmarks page endpoint should support sorting
3 participants