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

[Uptime] Settings threshold validation #65454

Merged
merged 7 commits into from
May 10, 2020

Conversation

shahzad31
Copy link
Contributor

Summary

Fixes #65381

Prevent user from adding negative values in certificate expiration and ge threshold.

@botelastic botelastic bot added the Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability label May 6, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

@shahzad31 shahzad31 self-assigned this May 6, 2020
@shahzad31 shahzad31 added release_note:skip Skip the PR/issue when compiling release notes v7.8.0 v8.0.0 labels May 6, 2020
@shahzad31 shahzad31 marked this pull request as ready for review May 6, 2020 11:37
@shahzad31 shahzad31 requested a review from a team as a code owner May 6, 2020 11:37
Copy link
Contributor

@justinkambic justinkambic left a comment

Choose a reason for hiding this comment

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

Client code looks good. We probably want to update the server to validate against this case as well and return an error if it receives a bad request. I can still save invalid settings values for these fields by posting to the API directly.

image

});

export const VALID_STR = i18n.translate('xpack.uptime.settings.invalid.error', {
defaultMessage: 'Not a valid value.',
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this should say "Must be greater than 0."

@shahzad31
Copy link
Contributor Author

@justinkambic added validation on API

Copy link
Contributor

@justinkambic justinkambic left a comment

Choose a reason for hiding this comment

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

LGTM WFG

I tested this for both values, validation is working great. Thanks!

image

image

@shahzad31
Copy link
Contributor Author

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

user doesn't have permission to update head repository

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

@shahzad31 shahzad31 merged commit ef1800b into elastic:master May 10, 2020
@shahzad31 shahzad31 deleted the settings-validation branch May 10, 2020 14:39
gmmorris added a commit to gmmorris/kibana that referenced this pull request May 11, 2020
* master: (58 commits)
  [Drilldowns][chore] import dashboard url generator from plugin contract (elastic#64628)
  fix double flyouts in add panel flow (elastic#65861)
  Point 7.x to 7.9.0 in .backportrc.json
  Mount ui/new_platform applications in same div structure as Core (elastic#63930)
  [Uptime] Settings threshold validation (elastic#65454)
  Fix edit alert flyout to update initialAlert after edit (elastic#65359)
  Fix anomalies display on focused APM service map (elastic#65882)
  [SIEM][Detection Engine] Increases the template limit for ECS mappings
  [SIEM][CASE] Moves functional tests from "legacyEs" to "Es" (elastic#65851)
  [Metrics UI] Fix p95/p99 charts and alerting error (elastic#65579)
  [ML] Add job timing stats to anomaly jobs (elastic#65696)
  restore index pattern management data-test-subj's (elastic#64697)
  [Discover] Prevent whitespace wrapping of doc table header (elastic#52861)
  [SIEM] Fixes a CSS issue with Timeline field truncation (elastic#65789)
  Skipping failing tests. elastic#65867 elastic#65866 elastic#65865
  [Discover] Deangularize the hits counter and create a react component (elastic#65631)
  Tsvb less update (elastic#65467)
  [TSVB] Remove remaining lodash.set usage (elastic#65846)
  [Uptime] Add `a11y` tests (elastic#65514)
  [Uptime] Enable loading on monitor list (elastic#65670)
  ...
shahzad31 added a commit to shahzad31/kibana that referenced this pull request May 12, 2020
shahzad31 added a commit to shahzad31/kibana that referenced this pull request May 12, 2020
@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label May 12, 2020
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.8.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Uptime] Add validation for < 1 values in TLS expiration fields
4 participants