* Fix missing agent flyout on package policy page
Handle query string changes if user clicks "add agent" link in toast
content while still on the package policy listing page.
Closes#103266
* Unbind history listener in useEffect
When setting the environment variable KBN_PATH_CONF in Windows, paths
containing special characters will be expanded and interpreted, instead
of being treated as a string. This wraps `%KBN_PATH_CONF%` in quotes to
prevent this.
Testing:
1) set "KBN_PATH_CONF=C:\With space\special()%$characters\kibana\config"
2) bin\kibana*.bat should run
* continue to support shardIndices template variable
* add unit test for large shard size alert
* change template variables in CCR rule
* add CCR rule unit test
* fix internationalization
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Fixes indeterminism with cypress by moving the `cy.intercept('PATCH', '/api/timeline').as('updateTimeline');` above where the click is happening.
Backport to 7.14.0 to hopefully stabilize it better as well.
You can make the indeterminism deterministic by adding (for testing only), a `cy.wait(5000)` like so:
```ts
// Keep clicking on the disable all button until the first element of all the elements are no longer checked.
// In cases where the click handler is not present on the page just yet, this will cause the button to be clicked
// multiple times until it sees that the click took effect. You could go through the whole list but I just check
// for the first to be unchecked and then assume the click was successful
cy.root()
.pipe(($el) => {
$el.find(TIMELINE_ROW_RENDERERS_DISABLE_ALL_BTN).trigger('click');
return $el.find(TIMELINE_ROW_RENDERERS_MODAL_ITEMS_CHECKBOX).first();
})
.should('not.be.checked');
cy.wait(5000); // <--- Temp addition for testing to ensure our intercept works above this. If the intercept is below this then we see the same indetermism behavior but deterministically.
```
### Checklist
- [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
* remove total count for events table on hosts and details page
* hide events count when analyzing an event
* fix unit tests
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Closes#98611
## Summary
Add alerts table in Observability =>
![image](https://user-images.githubusercontent.com/189600/123854490-c68ddf00-d8ec-11eb-897e-2217249d5fba.png)
### Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.
When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:
| Risk | Probability | Severity | Mitigation/Notes |
|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces—unexpected behavior in non-default Kibana Space. | Low | High | Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces. |
| Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. | High | Low | Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure. |
| Code should gracefully handle cases when feature X or plugin Y are disabled. | Medium | High | Unit tests will verify that any feature flag or plugin combination still results in our service operational. |
| [See more potential risk examples](https://github.com/elastic/kibana/blob/master/RISK_MATRIX.mdx) |
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
* Add CCS Cypress test runner
* Split flow for CCS Cypress tests
* Make esArchiver load data onto the remote cluster
* Add CCS specific rules with customizable remote name
* Allow overriding @kbn/dev-utils's CA_CERT_PATH
* Add CCS related docs
Co-authored-by: Gloria Hornero <snootchie.boochies@gmail.com>
* adding kuery bar to search transactions metrics
* addressig PR comments
* fixing api test
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [ML] Fixing missing data visualizer links
* adding index dataviz links
* fixing permission
* re-enabling tests
* fixing typo
* adding check for non time based index
* catching possible error when getting index pattern
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
If any of Elasticsearch or Kibana urls uses https, then `node` aborts with:
> Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes
> TLS connections and HTTPS requests insecure by disabling certificate verification.
Investigation proved that cy.exec injects `NODE_TLS_REJECT_UNAUTHORIZED=0` regardless
of how `NODE_TLS_REJECT_UNAUTHORIZED` or `CYPRESS_NODE_TLS_REJECT_UNAUTHORIZED` are
defined in the environment.
1. Use `node --no-warnings`
Gun too big, could hide other issues worthy of a failure
2. Explicitly pass NODE_TLS_REJECT_UNAUTHORIZED=1
This commit implements option 2.
```
describe('Env checks', () => {
it('CYPRESS_NODE_TLS_REJECT_UNAUTHORIZED is undefined', () => {
expect(Cypress.env('NODE_TLS_REJECT_UNAUTHORIZED')).to.equal(undefined);
});
it('NODE_TLS_REJECT_UNAUTHORIZED is undefined', () => {
expect(process.env.NODE_TLS_REJECT_UNAUTHORIZED).to.equal(undefined);
});
it('cy.exec environment is sane', () => {
const NODE_TLS_REJECT_UNAUTHORIZED =
Cypress.env('NODE_TLS_REJECT_UNAUTHORIZED') === '0' ? '0' : '1';
cy.exec('set', { env: { NODE_TLS_REJECT_UNAUTHORIZED } })
.its('stdout')
.should(($elem) => {
expect($elem).to.not.contain('NODE_TLS_REJECT_UNAUTHORIZED=0')
});
});
});
```
The activity feed tried to render a link to a source for activity items like
"New user joined organization". This couldn't be done and the page crashed.
This PR accounts for this case by rendering an item with no link for such cases.
This was already fixed before in ent-search in https://github.com/elastic/ent-search/pull/2574
But we didn't port the PR, because we thought there is no need to port a part
of Standard auth functionality. Turned out there is.
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Adds jest unit tests for APM Latency Correlations code.
Writing the tests surfaced some minor glitches fixed as part of this PR:
- Fixes a typo in the name for the fetchTransactionDurationPercentiles() function.
- Avoids adding a @timestamp filter if neither start/end are set as parameters for getQueryWithParams().
- Adds a check to only push to ranges arrays if it's length is already greater than 0.
- Makes the check against from more strict otherwise it wouldn't be added as an attribute if 0.
- Fixes progress calculation for field/value pair fetching.
- Removes leading 0 from fractions since an ES update got merged.
- Removes deprecated use of track_total_hits.