# Backport
This will backport the following commits from `main` to `8.6`:
- [[Fix][Infrastructure UI] Incorrect payload in time range when landing
on the Hosts View
(#147390)](https://github.com/elastic/kibana/pull/147390)
<!--- Backport version: 8.9.7 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT
[{"author":{"name":"jennypavlova","email":"dzheni.pavlova@elastic.co"},"sourceCommit":{"committedDate":"2022-12-13T09:43:15Z","message":"[Fix][Infrastructure
UI] Incorrect payload in time range when landing on the Hosts View
(#147390)\n\nCloses #146581 \r\n\r\n## Summary\r\n\r\nThis PR fixes the
initial `from` date range calculation. The idea is to\r\nconvert first
the initial range of minutes to milliseconds. Then in\r\norder to get
the date of `CALCULATED_DATE_RANGE_TO` - (the calculated\r\ninitial
range in milliseconds) and call `getTime()` to receive the\r\ncalculated
`from` date as timestamp.\r\n\r\nTo test that you can open the host page
without the time range in the\r\nURL. Then check the `from` value as in
the screenshot attached to the\r\nstory and you can use an [Unix
timestamp\r\nconverter](https://www.unixtimestamp.com/) to verify that
the\r\ncalculation is
correct","sha":"29841da10b140d8bb0e24d5af4c55e64b6f473c9","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Team:Infra
Monitoring
UI","backport:prev-minor","v8.7.0"],"number":147390,"url":"https://github.com/elastic/kibana/pull/147390","mergeCommit":{"message":"[Fix][Infrastructure
UI] Incorrect payload in time range when landing on the Hosts View
(#147390)\n\nCloses #146581 \r\n\r\n## Summary\r\n\r\nThis PR fixes the
initial `from` date range calculation. The idea is to\r\nconvert first
the initial range of minutes to milliseconds. Then in\r\norder to get
the date of `CALCULATED_DATE_RANGE_TO` - (the calculated\r\ninitial
range in milliseconds) and call `getTime()` to receive the\r\ncalculated
`from` date as timestamp.\r\n\r\nTo test that you can open the host page
without the time range in the\r\nURL. Then check the `from` value as in
the screenshot attached to the\r\nstory and you can use an [Unix
timestamp\r\nconverter](https://www.unixtimestamp.com/) to verify that
the\r\ncalculation is
correct","sha":"29841da10b140d8bb0e24d5af4c55e64b6f473c9"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/147390","number":147390,"mergeCommit":{"message":"[Fix][Infrastructure
UI] Incorrect payload in time range when landing on the Hosts View
(#147390)\n\nCloses #146581 \r\n\r\n## Summary\r\n\r\nThis PR fixes the
initial `from` date range calculation. The idea is to\r\nconvert first
the initial range of minutes to milliseconds. Then in\r\norder to get
the date of `CALCULATED_DATE_RANGE_TO` - (the calculated\r\ninitial
range in milliseconds) and call `getTime()` to receive the\r\ncalculated
`from` date as timestamp.\r\n\r\nTo test that you can open the host page
without the time range in the\r\nURL. Then check the `from` value as in
the screenshot attached to the\r\nstory and you can use an [Unix
timestamp\r\nconverter](https://www.unixtimestamp.com/) to verify that
the\r\ncalculation is
correct","sha":"29841da10b140d8bb0e24d5af4c55e64b6f473c9"}}]}]
BACKPORT-->
Co-authored-by: jennypavlova <dzheni.pavlova@elastic.co>
# Backport
This will backport the following commits from `main` to `8.6`:
- [[Infrastructure UI] Improve metrics settings error handling
(#146272)](https://github.com/elastic/kibana/pull/146272)
<!--- Backport version: 8.9.7 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Marco Antonio
Ghiani","email":"marcoantonio.ghiani01@gmail.com"},"sourceCommit":{"committedDate":"2022-11-30T10:54:37Z","message":"[Infrastructure
UI] Improve metrics settings error handling (#146272)\n\nCloses
[#145238](https://github.com/elastic/kibana/issues/145238)\r\n\r\n##
Summary\r\n\r\nThese changes add validation to the Metric Indices passed
into the\r\nMetrics settings page.\r\nNew validation is added both in
the UI and in the endpoint, performing\r\nthe following checks:\r\n-
Index pattern is not an empty string\r\n- Index pattern does not contain
empty spaces (start, middle, end) (the\r\npattern is not trimmed)\r\n-
Index pattern does not contain empty entries, comma-separated
values\r\nshould have an acceptable value.\r\n\r\nIn case the value is
not valid, the UI will render an appropriate error\r\nmessage.\r\nIf the
`PATCH /api/metrics/source/{sourceId}` request to update the\r\nvalue is
manually sent with an invalid value, the server will respond\r\nwith a
400 status code and an error message.\r\n\r\nAlso, for retro
compatibility and to not block the user when the\r\nconfiguration can't
be successfully retrieved, in case of internal error\r\nthe `GET
/api/metrics/source/{sourceId}` will return a 404 and on the\r\nUI,
instead of rendering a blank page, the user will see the empty
form\r\nand will be able to re-insert the right values.\r\n\r\n##
Testing\r\n\r\nNavigate to `Inventory`-> Click on `Settings` on the
topbar -> Start\r\nwriting different metric indices in the Metric
Indices field.\r\n\r\n### Editing Metric Indices
validation\r\n\r\n\r\nhttps://user-images.githubusercontent.com/34506779/203763021-0f4d8926-ffa4-448a-a038-696732158f4e.mov\r\n\r\n###
Missing/Broken configuration
response\r\n\r\n\r\nhttps://user-images.githubusercontent.com/34506779/203763120-ffc91cd3-9bf4-43da-a04f-5561ceabf591.mov\r\n\r\nCo-authored-by:
Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"ddcbf73284d48b1f1f6eb9322f6f108f312f8e02","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Metrics
UI","Team:Infra Monitoring
UI","release_note:skip","backport:all-open","v8.7.0"],"number":146272,"url":"https://github.com/elastic/kibana/pull/146272","mergeCommit":{"message":"[Infrastructure
UI] Improve metrics settings error handling (#146272)\n\nCloses
[#145238](https://github.com/elastic/kibana/issues/145238)\r\n\r\n##
Summary\r\n\r\nThese changes add validation to the Metric Indices passed
into the\r\nMetrics settings page.\r\nNew validation is added both in
the UI and in the endpoint, performing\r\nthe following checks:\r\n-
Index pattern is not an empty string\r\n- Index pattern does not contain
empty spaces (start, middle, end) (the\r\npattern is not trimmed)\r\n-
Index pattern does not contain empty entries, comma-separated
values\r\nshould have an acceptable value.\r\n\r\nIn case the value is
not valid, the UI will render an appropriate error\r\nmessage.\r\nIf the
`PATCH /api/metrics/source/{sourceId}` request to update the\r\nvalue is
manually sent with an invalid value, the server will respond\r\nwith a
400 status code and an error message.\r\n\r\nAlso, for retro
compatibility and to not block the user when the\r\nconfiguration can't
be successfully retrieved, in case of internal error\r\nthe `GET
/api/metrics/source/{sourceId}` will return a 404 and on the\r\nUI,
instead of rendering a blank page, the user will see the empty
form\r\nand will be able to re-insert the right values.\r\n\r\n##
Testing\r\n\r\nNavigate to `Inventory`-> Click on `Settings` on the
topbar -> Start\r\nwriting different metric indices in the Metric
Indices field.\r\n\r\n### Editing Metric Indices
validation\r\n\r\n\r\nhttps://user-images.githubusercontent.com/34506779/203763021-0f4d8926-ffa4-448a-a038-696732158f4e.mov\r\n\r\n###
Missing/Broken configuration
response\r\n\r\n\r\nhttps://user-images.githubusercontent.com/34506779/203763120-ffc91cd3-9bf4-43da-a04f-5561ceabf591.mov\r\n\r\nCo-authored-by:
Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"ddcbf73284d48b1f1f6eb9322f6f108f312f8e02"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/146272","number":146272,"mergeCommit":{"message":"[Infrastructure
UI] Improve metrics settings error handling (#146272)\n\nCloses
[#145238](https://github.com/elastic/kibana/issues/145238)\r\n\r\n##
Summary\r\n\r\nThese changes add validation to the Metric Indices passed
into the\r\nMetrics settings page.\r\nNew validation is added both in
the UI and in the endpoint, performing\r\nthe following checks:\r\n-
Index pattern is not an empty string\r\n- Index pattern does not contain
empty spaces (start, middle, end) (the\r\npattern is not trimmed)\r\n-
Index pattern does not contain empty entries, comma-separated
values\r\nshould have an acceptable value.\r\n\r\nIn case the value is
not valid, the UI will render an appropriate error\r\nmessage.\r\nIf the
`PATCH /api/metrics/source/{sourceId}` request to update the\r\nvalue is
manually sent with an invalid value, the server will respond\r\nwith a
400 status code and an error message.\r\n\r\nAlso, for retro
compatibility and to not block the user when the\r\nconfiguration can't
be successfully retrieved, in case of internal error\r\nthe `GET
/api/metrics/source/{sourceId}` will return a 404 and on the\r\nUI,
instead of rendering a blank page, the user will see the empty
form\r\nand will be able to re-insert the right values.\r\n\r\n##
Testing\r\n\r\nNavigate to `Inventory`-> Click on `Settings` on the
topbar -> Start\r\nwriting different metric indices in the Metric
Indices field.\r\n\r\n### Editing Metric Indices
validation\r\n\r\n\r\nhttps://user-images.githubusercontent.com/34506779/203763021-0f4d8926-ffa4-448a-a038-696732158f4e.mov\r\n\r\n###
Missing/Broken configuration
response\r\n\r\n\r\nhttps://user-images.githubusercontent.com/34506779/203763120-ffc91cd3-9bf4-43da-a04f-5561ceabf591.mov\r\n\r\nCo-authored-by:
Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"ddcbf73284d48b1f1f6eb9322f6f108f312f8e02"}}]}]
BACKPORT-->
Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani01@gmail.com>
# Backport
This will backport the following commits from `main` to `8.6`:
- [Fixes issue in sorting using TX and RX columns
(#145994)](https://github.com/elastic/kibana/pull/145994)
<!--- Backport version: 8.9.7 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT
[{"author":{"name":"mohamedhamed-ahmed","email":"eng_mohamedhamed@hotmail.com"},"sourceCommit":{"committedDate":"2022-11-29T09:41:18Z","message":"Fixes
issue in sorting using TX and RX columns (#145994)\n\n##
Summary\r\ncloses #142667\r\nMore details about the issue can be
found\r\n[here](https://github.com/elastic/kibana/issues/142667)\r\n\r\n##
Problem \r\n\r\nThe problem here is the use of bucket script in the
query which doesn't\r\nreturn a single metric value and thus can't be
used for pipeline\r\naggregation.\r\n```\r\nbucket_script: {\r\n
buckets_path: {\r\n value: 'rx_avg',\r\n period: 'rx_period>period',\r\n
},\r\n script: {\r\n source: 'params.value / (params.period /
1000)',\r\n lang: 'painless',\r\n },\r\n gap_policy: 'skip'\r\n
}\r\n```\r\n\r\n## Proposed Solutions:\r\n\r\n1.
Using\r\n[Runtime](https://www.elastic.co/guide/en/elasticsearch/reference/current/runtime.html)\r\nfield
as below:\r\n```\r\n\"runtime_mappings\": {\r\n \"rx_bytes_per_period\":
{\r\n \"type\": \"long\",\r\n \"script\": {\r\n \"source\": \"\"\"\r\n
emit(doc['host.network.ingress.bytes'].size()==0 ? -1 :
(doc['host.network.ingress.bytes'].value/doc['metricset.period'].value));\r\n
\"\"\"\r\n }\r\n }\r\n }\r\n```\r\n\r\n2.
Using\r\n[Scripted_Metric](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-scripted-metric-aggregation.html):\r\n\r\n```\r\nscripted_metric\":
{\r\n \"init_script\": \"state.bytes_per_period = []\",\r\n
\"map_script\":
\"state.bytes_per_period.add(doc['host.network.ingress.bytes'].value/(doc['metricset.period'].value/1000))\",\r\n
\"combine_script\": \"double avg_bytes_per_period = 0; for (t in
state.bytes_per_period) { avg_bytes_per_period += t } return
avg_bytes_per_period/state.bytes_per_period.size()\",\r\n
\"reduce_script\": \"double result = 0; for (a in states) { result += a)
} return result/states.size()\"\r\n }\r\n```\r\n\r\n##
Conclusion\r\n\r\nI decided to go with the runtime field as its a bit
more concise and\r\neasier to understand and performance wise it was
slightly faster than\r\nthe scripted metric in most times.\r\n\r\n###
Testing\r\n\r\nNavigate to `Observability` -> `Overview` -> `Hosts
Table` try to filter\r\nwith Rx and Tx
columns","sha":"6e4f22d12dfc18ceff35b9bd0f6038b7fbf5ec7b","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Infra
Monitoring UI","Feature:Observability
Overview","backport:prev-minor","v8.7.0"],"number":145994,"url":"https://github.com/elastic/kibana/pull/145994","mergeCommit":{"message":"Fixes
issue in sorting using TX and RX columns (#145994)\n\n##
Summary\r\ncloses #142667\r\nMore details about the issue can be
found\r\n[here](https://github.com/elastic/kibana/issues/142667)\r\n\r\n##
Problem \r\n\r\nThe problem here is the use of bucket script in the
query which doesn't\r\nreturn a single metric value and thus can't be
used for pipeline\r\naggregation.\r\n```\r\nbucket_script: {\r\n
buckets_path: {\r\n value: 'rx_avg',\r\n period: 'rx_period>period',\r\n
},\r\n script: {\r\n source: 'params.value / (params.period /
1000)',\r\n lang: 'painless',\r\n },\r\n gap_policy: 'skip'\r\n
}\r\n```\r\n\r\n## Proposed Solutions:\r\n\r\n1.
Using\r\n[Runtime](https://www.elastic.co/guide/en/elasticsearch/reference/current/runtime.html)\r\nfield
as below:\r\n```\r\n\"runtime_mappings\": {\r\n \"rx_bytes_per_period\":
{\r\n \"type\": \"long\",\r\n \"script\": {\r\n \"source\": \"\"\"\r\n
emit(doc['host.network.ingress.bytes'].size()==0 ? -1 :
(doc['host.network.ingress.bytes'].value/doc['metricset.period'].value));\r\n
\"\"\"\r\n }\r\n }\r\n }\r\n```\r\n\r\n2.
Using\r\n[Scripted_Metric](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-scripted-metric-aggregation.html):\r\n\r\n```\r\nscripted_metric\":
{\r\n \"init_script\": \"state.bytes_per_period = []\",\r\n
\"map_script\":
\"state.bytes_per_period.add(doc['host.network.ingress.bytes'].value/(doc['metricset.period'].value/1000))\",\r\n
\"combine_script\": \"double avg_bytes_per_period = 0; for (t in
state.bytes_per_period) { avg_bytes_per_period += t } return
avg_bytes_per_period/state.bytes_per_period.size()\",\r\n
\"reduce_script\": \"double result = 0; for (a in states) { result += a)
} return result/states.size()\"\r\n }\r\n```\r\n\r\n##
Conclusion\r\n\r\nI decided to go with the runtime field as its a bit
more concise and\r\neasier to understand and performance wise it was
slightly faster than\r\nthe scripted metric in most times.\r\n\r\n###
Testing\r\n\r\nNavigate to `Observability` -> `Overview` -> `Hosts
Table` try to filter\r\nwith Rx and Tx
columns","sha":"6e4f22d12dfc18ceff35b9bd0f6038b7fbf5ec7b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/145994","number":145994,"mergeCommit":{"message":"Fixes
issue in sorting using TX and RX columns (#145994)\n\n##
Summary\r\ncloses #142667\r\nMore details about the issue can be
found\r\n[here](https://github.com/elastic/kibana/issues/142667)\r\n\r\n##
Problem \r\n\r\nThe problem here is the use of bucket script in the
query which doesn't\r\nreturn a single metric value and thus can't be
used for pipeline\r\naggregation.\r\n```\r\nbucket_script: {\r\n
buckets_path: {\r\n value: 'rx_avg',\r\n period: 'rx_period>period',\r\n
},\r\n script: {\r\n source: 'params.value / (params.period /
1000)',\r\n lang: 'painless',\r\n },\r\n gap_policy: 'skip'\r\n
}\r\n```\r\n\r\n## Proposed Solutions:\r\n\r\n1.
Using\r\n[Runtime](https://www.elastic.co/guide/en/elasticsearch/reference/current/runtime.html)\r\nfield
as below:\r\n```\r\n\"runtime_mappings\": {\r\n \"rx_bytes_per_period\":
{\r\n \"type\": \"long\",\r\n \"script\": {\r\n \"source\": \"\"\"\r\n
emit(doc['host.network.ingress.bytes'].size()==0 ? -1 :
(doc['host.network.ingress.bytes'].value/doc['metricset.period'].value));\r\n
\"\"\"\r\n }\r\n }\r\n }\r\n```\r\n\r\n2.
Using\r\n[Scripted_Metric](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-scripted-metric-aggregation.html):\r\n\r\n```\r\nscripted_metric\":
{\r\n \"init_script\": \"state.bytes_per_period = []\",\r\n
\"map_script\":
\"state.bytes_per_period.add(doc['host.network.ingress.bytes'].value/(doc['metricset.period'].value/1000))\",\r\n
\"combine_script\": \"double avg_bytes_per_period = 0; for (t in
state.bytes_per_period) { avg_bytes_per_period += t } return
avg_bytes_per_period/state.bytes_per_period.size()\",\r\n
\"reduce_script\": \"double result = 0; for (a in states) { result += a)
} return result/states.size()\"\r\n }\r\n```\r\n\r\n##
Conclusion\r\n\r\nI decided to go with the runtime field as its a bit
more concise and\r\neasier to understand and performance wise it was
slightly faster than\r\nthe scripted metric in most times.\r\n\r\n###
Testing\r\n\r\nNavigate to `Observability` -> `Overview` -> `Hosts
Table` try to filter\r\nwith Rx and Tx
columns","sha":"6e4f22d12dfc18ceff35b9bd0f6038b7fbf5ec7b"}}]}]
BACKPORT-->
Co-authored-by: mohamedhamed-ahmed <eng_mohamedhamed@hotmail.com>
# Backport
This will backport the following commits from `main` to `8.6`:
- [[Infrastructure UI] Navigate to node detail page without refresh
(#145742)](https://github.com/elastic/kibana/pull/145742)
<!--- Backport version: 8.9.7 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Marco Antonio
Ghiani","email":"marcoantonio.ghiani01@gmail.com"},"sourceCommit":{"committedDate":"2022-11-21T11:19:31Z","message":"[Infrastructure
UI] Navigate to node detail page without refresh (#145742)\n\nCloses
[#110219](https://github.com/elastic/kibana/issues/110219)\r\n\r\n##
Summary\r\n\r\nThis change fixes the forced page refresh when opening
the node detail\r\nfrom the inventory page.\r\n\r\nThis happened due to
the property `href` rendering a native anchor tag\r\nwhich interpreted
the navigation to the detail view as a completely new\r\npage,
refreshing the whole Kibana view.\r\n\r\nSpreading the properties
returned by
the\r\n[useLinkProps](2b2843fc27/x-pack/plugins/observability/public/hooks/use_link_props.ts)\r\nassure
the button receives the `onClick` handler and properly navigate\r\nto
the detail without forcing a refresh.\r\n\r\n## Testing\r\n\r\nNavigate
to `Inventory`-> `Click any available node` -> `\"Open as page\"\r\non
top-right corner of the
popover`\r\n\r\n\r\n\r\n\r\nhttps://user-images.githubusercontent.com/34506779/202741947-d809327b-4e1c-4e38-a0ac-cab768d299c2.mov\r\n\r\nCo-authored-by:
Marco Antonio Ghiani
<marcoantonio.ghiani@elastic.co>","sha":"12b010ce22f6221dfb43adfa83e7e49ecce89a55","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Metrics
UI","Team:Infra Monitoring
UI","release_note:skip","backport:all-open","v8.7.0"],"number":145742,"url":"https://github.com/elastic/kibana/pull/145742","mergeCommit":{"message":"[Infrastructure
UI] Navigate to node detail page without refresh (#145742)\n\nCloses
[#110219](https://github.com/elastic/kibana/issues/110219)\r\n\r\n##
Summary\r\n\r\nThis change fixes the forced page refresh when opening
the node detail\r\nfrom the inventory page.\r\n\r\nThis happened due to
the property `href` rendering a native anchor tag\r\nwhich interpreted
the navigation to the detail view as a completely new\r\npage,
refreshing the whole Kibana view.\r\n\r\nSpreading the properties
returned by
the\r\n[useLinkProps](2b2843fc27/x-pack/plugins/observability/public/hooks/use_link_props.ts)\r\nassure
the button receives the `onClick` handler and properly navigate\r\nto
the detail without forcing a refresh.\r\n\r\n## Testing\r\n\r\nNavigate
to `Inventory`-> `Click any available node` -> `\"Open as page\"\r\non
top-right corner of the
popover`\r\n\r\n\r\n\r\n\r\nhttps://user-images.githubusercontent.com/34506779/202741947-d809327b-4e1c-4e38-a0ac-cab768d299c2.mov\r\n\r\nCo-authored-by:
Marco Antonio Ghiani
<marcoantonio.ghiani@elastic.co>","sha":"12b010ce22f6221dfb43adfa83e7e49ecce89a55"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/145742","number":145742,"mergeCommit":{"message":"[Infrastructure
UI] Navigate to node detail page without refresh (#145742)\n\nCloses
[#110219](https://github.com/elastic/kibana/issues/110219)\r\n\r\n##
Summary\r\n\r\nThis change fixes the forced page refresh when opening
the node detail\r\nfrom the inventory page.\r\n\r\nThis happened due to
the property `href` rendering a native anchor tag\r\nwhich interpreted
the navigation to the detail view as a completely new\r\npage,
refreshing the whole Kibana view.\r\n\r\nSpreading the properties
returned by
the\r\n[useLinkProps](2b2843fc27/x-pack/plugins/observability/public/hooks/use_link_props.ts)\r\nassure
the button receives the `onClick` handler and properly navigate\r\nto
the detail without forcing a refresh.\r\n\r\n## Testing\r\n\r\nNavigate
to `Inventory`-> `Click any available node` -> `\"Open as page\"\r\non
top-right corner of the
popover`\r\n\r\n\r\n\r\n\r\nhttps://user-images.githubusercontent.com/34506779/202741947-d809327b-4e1c-4e38-a0ac-cab768d299c2.mov\r\n\r\nCo-authored-by:
Marco Antonio Ghiani
<marcoantonio.ghiani@elastic.co>","sha":"12b010ce22f6221dfb43adfa83e7e49ecce89a55"}}]}]
BACKPORT-->
Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani01@gmail.com>
Closes#144637
## Summary
This PR fixes the formatting issue on the host view page. To keep it
consistent with the inventory page the formatters used there are
extended and used on the Host View.
I kept the 'N/A' fallback for missing values similar to the APM tables
as I think it looks better in the table ( the inventory formatter will
return an empty string in that case but it is also used for the tooltips
and there maybe it makes sense to leave it empty)
### Testing
Open the Host View and check the formatting of the values of the table:
<img width="2440" alt="image"
src="https://user-images.githubusercontent.com/14139027/201635976-ea2d5a65-b678-4484-a8f5-d6ee07278eb7.png">
## Summary
Closes https://github.com/elastic/kibana/issues/143725,
https://github.com/elastic/kibana/issues/143726
This PR reads the context variables indexed in Alerts-As-Data for
`Infrastructure Rules` and adds it to context when alerts are recovered.
Also, the context variables are now flattened before being indexed in
AAD for both of the `Infrastructure Rules`.
## The context newly added for recovered alerts with this PR
- `cloud.*`
- `host.*`
- Excluding:
- `host.cpu.*`
- `host.disk.*`
- `host.network.*`
- `orchestrator.*`
- `container.*`
- `labels.*`
- `tags`
### 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
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Closes https://github.com/elastic/kibana/issues/143727
When Inventory rule is created for `Kubernetes Pods` as node type, the
`context.container` will contain an array of containers. For other node
types, the `context.container` will contain single container
information. This is to cover the use case where Kubernetes pod has more
than one container.
## Manual testing
### 1. Create rule for `Kubernetes Pods`
- Create Inventory rule for `Kubernetes Pods`
- Select a connector to schedule action
- Add `{{context}}` in the action template
- Wait for alerts to be generated
- Observe `context.container` lists all containers
<img width="803" alt="Screenshot 2022-11-04 at 10 55 19"
src="https://user-images.githubusercontent.com/69037875/199945124-08590d1e-50ed-4b41-a256-8b16548dbdbd.png">
### 2. Create rule for `Hosts`
- Create Inventory rule for `Hosts`
- Select a connector to schedule action
- Add `{{context}}` in the action template
- Wait for alerts to be generated
- Observe `context.container` contains single container
<img width="520" alt="Screenshot 2022-11-04 at 10 59 31"
src="https://user-images.githubusercontent.com/69037875/199945890-a38a695a-61bc-49cb-9eb4-6fa806f4bdc9.png">
### 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
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
* Updated EUI to version 67.1.2. Updated instaces of ButtonColor from EUI to EuiButtonColor.
* Updated to EuiCard instances that utilize the betaBadgeProps object to return an empty string instead of undefined when the label is unavailable
* Removed two instances of the deprecated internetExplorerOnly() mixin
* Updated two instances of the ButtonColor import to EuiButtonColor as is was renamed in PR #6150
* Updated snapshots in Jest Test Suite #1 to account for EuiButton and EuiCard Emotion conversions. Updated snapshots for EuiTooltip as it now contains the new EuiToolTipAnchor component that replaced the tooltip anchor styles
* Updated snapshots in Jest Test Suite #2 to account forEuiButton, EuiDescriptionList, EuiButtonIcon, and EuiBadge Emotion conversions.
* Updated snapshots in Jest Test Suite #3 to account for EuiDescriptionList, EuiButton, and EuiBadge Emotion conversions. Updated snapshots for EuiTooltip as if now contains the new EuiTooltipAnchor component that replaced the tooltop anchor styles
* Updated snapshots in Jest Test Suite #4 to account for EuiButton Emotion conversion.
* Updated snapshots in Jest Test Suite #5 to account for EuiButton Emotion conversion.
* Updated snapshots in Jest Test Suite #8 to account for EuiButtonIcon and EuiButton Emotion conversions. Updated snapshots for EuiTooltip as it now contains the new EuiTooltipAnchor component that replaced the tooltip anchor styles.
* Updated snapshots in Jest Test Suite #9 to account for EuiFlyout and EuiButton Emotion conversions.
* Updated snapshots in Jest Test Suite #10 to account for EuiButton, EuiBadge, EuiButtonIcon, and EuiCard Emotion conversions. Updated snapshots for EuiToolTtip as it now contains the new EuiTooltipAnchor component that replaced the tooltip anchor styles
* Updated instances of EuiButtonIconColor to use EuiButtonIconProps['color'] as it was removed in PR #6150
* Updated tests that target EuiButton to simulate click events to target a generic button to prevent undefined click event errors
* Updated snapshots in Jest Test Suite #1 to account for EuiButton and EuiCard Emotion conversions
* Added the EuiFlyout mixins and variables to Lens Sass file as EuiFlyout has been converted to Emotion and the Sass styles are no longer available in EUI
* Added the EuiCallOutTypes variable to Step Progress Sass file as EuiCallOut has been converted to Emotion and the Sass styles are no longer available in EUI
* Updated snapshots in Jest Test Suite #2 to account for recent Emotion conversions.
Updated snapshots in server_status.test.tsx to render EuiBadge before checking the snapshots to reduce the snapshot churn caused by Emotion.
Updated tests that target EuiButton to simulate click events to target a generic button to prevent undefined click event errors
* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'
* Added imports for the added flyout mixin. Removed references to EuiCallOut mixin as the component has been converted to Emotion and is no longer available for use.
* Updated unit tests and snapshots in Jest Test Suite #10.
Updated snaphshots to account for EuiBadge, EuiDescriptionList, EuiFlyout, and EuiCard Emotion conversions. Updated snapshots for EuiTooltip as it now contains the new EuiTooltipAnchor component that replaced the tooltip anchor styles.
Updated tests that target EuiButton to simulate click events to target a generic button element to prevent undefined click event errors
* Updated unit tests in Jest Test Suite #11 that target EuiButton to simulate click events to target a generic button to prevent undefined click event errors
* Updated unit tests in Jest Test Suite #12 by updating tests that target EuiButton to simulate click events. Instead, these tests now target a generic button element to prevent undefined click event errors
* Updated unit tests in Jest Test Suite #1 by updating tests that target EuiButton to simulate click events. Instead, these tests now target a generic button element to prevent undefined click event errors
* Updated unit tests in Jest Test Suite #2 by updating tests that use EuiButton to simulate click events. Instead, these test have been updated to target a button element to prevent undefined click event errors.
* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'
* Updated reference to mixins Sass file.
Updated snapshots for Jest Test Suite #5 to account for EuiButton Emotion conversion. Updated unit tests that target EuiButton to simulate click events. These tests have been updated to target a button element to prevent undefined click event errors
* Updated unit tests in Jest Test Suites 3, 7, 8, 13, and 14.
Updated snapshot to account for EuiButton Emotion conversion.
Updated tests that target EuiButton to simulate click events. These tests now target a generic button element to prevent undefined click event errors.
Updated a few snapshots by adding .render() before checking the snapshot. This will prevent large snapshots coming from recent Emotion conversions
* Updated snapshots in Jest Test Suite #10 to account for the recent EuiButton Emotion conversion
* Updated unit tests in Jest Test Suite #2 by editing tests that target EuiButton to simulate click events. These tests now target a button element in order to prevent undefinde click event errors
* Updated snapshots in Jest Test Suite #10 to account for EuiButton and EuiDescriptionList Emotion conversions
* Updated test cases in Jest Test Suites 3, 7, and 8. Updated snapshots to account for EuiButton and EuiPagination Emotion conversions.
Updated tests that target EuiButton to simulate click events. These tests now target a button element to prevent undefined click errors
* Updated test cases in Jest Test Suite 14. Updated snapshots to account for EuiButton Emotion conversion. Opted to use .render() when updating a few snapshots to reduce the large length of snapshots caused by Emotion
* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'
* Revised a change to betaBadgeProps to ensure that the label is available. If not, the value for the badge with be set to undefined.
* Resolved two linting errors
* Resolved two linting errors
* Updated Jest unit tests in various suites.
Updated snapshots to account for EuiButton Emotion conversion. Updated snapshots for EuiTooltip as it now contains the new EuiTooltipAnchor component that replaced the tooltip anchor styles.
* Updated EuiFlyout in query_flyout.tsx to remove the onClick function from maskProps as it is no longer available. Updated this flyout to use ownFocus and not to close when the overlay mask is clicked.
* Removed the use of EuiButtonIconColor in favor of EuiButtonIconProps['color']
* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'
* Updated Cypress test looking for strict equality on EuiPaginationButton class names to match a substring of the Emotion generated class name
* Removed unneeded debugging code. Updated snapshots for various test suites to account for the recent EuiButton Emotion conversion
* Updated a few EuiButton, EuiButtonEmpty, and EuiText components that set the color as ghost. The ghost color mode has been deprecated as of PR #6150. These components now are wrapped in EuiThemeProvider with a dark colorMode to create the previous ghost color.
* Resolved TS error with EuiCard betaBadgeProps
* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'
* Remove references to now-removed EuiFlyout CSS classes/vars
* Remove now-removed euiBadge className references
- Convert directly to EuiBadge instead of using CSS
- Remove confusing and now-possibly-irrelevant CSS badge overrides - left/right icons are now set via JSX and not via flex-direction
* Pre-emptively fix various euiOverlayMask CSS overrides
- this data attr isn't technically in yet but will be once https://github.com/elastic/eui/pull/6289 merges
- at the very least this isn't breaking any more than it currently already is!
* Update to v67.1.3
* v67.1.4
* Resolved test failing test case in Security/Manage/Blocklist. The test did not remove focus from the last combo box in the form, which didn't allow the disbaled attribute to be removed from the flyout submit button. I've updated the mock file for Blocklist to return focus to the first form element in the flyout to allow the disabled attribute to be removed.
* Updated snapshots to account for the recent EuiText Emotion conversion
* Fix Log's custom tooltips relying on EuiTooltip classNames that no longer exist
* Fix Vega vis custom tooltips relying on EuiTooltip classNames that no longer exist
- this one is trickier than Log's as it's not using React, so we need to use Emotion's Global to set a static className
* Convert remaining vega_vis.scss to Emotion
- as an example of how other global + non global styles could be handled in the future
* Fix references to removed `euiPaginationButton-isActive` className
- use aria-current attribute instead
* Added missing EuiFlyoutAnimation keyframes for EuiFlyout. This resolved test that failed because they used onAnimationEnd because the FlyoutAnimation could not be found.
* Reolved Jest Tests in suites 1 and 5. Updated snapshots to account for the recent EuiButton Emotion conversion. Updated snapshots for EuiToolTip as it now contains the new EuiToolTipAnchor component that replaced the tooltip anchor styles.
* iterate on rules_list.test.tsx
* bump eui to v67.1.5
* Updatde snapshots for jest test suites to account for the recent EuiButton, EuiOverlayMask, EuiTooltip, and EuiBadge Emotion conversions
* Resolved failing security test by updating the target element for CONNECTOR_TITLE. EuiCard has recently been converted to Emotion and the card title is no longer wrapper in a span.
* Resolved failing test case in Runtime Fields. The modify runtime field test was failing because the combobox responsbible for adding and updating scripts was not appearing. The textbox did not appear because the shared setFieldScript function targets and toggles the script textbox when opening the flyout. When a runtime field is being modified, the toggle is already active and using the shared function will trigger the toggle again (losing access to the script textbox).
Also resolved an issue that prevented the warning EuiCallout to appear when changing the type of a runtime field from its original type. Resolved this by adding an enter keypress at the end of setFieldType function to confirm the type selection, thus triggering the EuiCallout
* Resolved two tests that were failing in Lens. These test were failing because they were checking for equality in class names that no longer exist within EuiButtonGroup as it was recently converted to Emotion. These tests were updated to check for a substring of the new and longer class name
* Quick fix in test case failing because of misspelling in data-test-sub
* Updated snapshot for Jest test case as EuiButton as recently been converted to Emotion
* Removed console.log statement. Oops!
* Resolved a failing test case in Lens. They were failing because they were checking for equality in class names that no longer exist within EuiButtonGroup as it was recently converted to Emotion. These tests were updated to check for a substring of the new and longer class name.
Updated a Security test case by giving a target button the data-test-subj attribute for easier querying
* Removed reference to EuiFlyout mixin as it has been converted to Emotion. Updated the reference to an interal copy of EuiFlyout styles
* Corrected spelling error in EuiFlyout animation in Lens app
* Update EUI with latest backport
* Update button snapshots
* fix another button snapshot
* More snapshot fixes
* [EuiButton][Security] Fix button relying on now-removed `euiButton__text` CSS
- replace removed CSS with `eui-textTruncate` util instead
- combine/DRY out unnecessary span - was affecting min-width of truncation util
+ increase screenshot diff limit - this was smaller than updating the actual baseline screenshots for whatever reason (likely render diff between local and CI)
* Fix remaining Jest tests affected by Emotion conversions
- because Emotion creates its own wrapper, `.first()` can no longer be used - prefer `.last()` instead
* Fix Jest test affected by EuiButton Emotion conversion + removed modifier class
- targeting the native DOM node + filtering by disabled true/false gets us back to the 'correct' lengths
* Fix + improve flyout test
- `.last()` changes to account for EuiButton Emotion conversion is needed, but the last onClose assertion still fails due to us having modified inputs, and the confirm modal being displayed
- split test into two separate tests - one testing the onClose call, and the other testing the confirm modal
* derpin
* Skip rules_list Jest suite
* Update new EuiButton snapshot
* Upgraded EUI version to 67.1.7
* [EuiCard] Update snapshots
* [EuiPopover] Update snapshots
* [QA] Fix missing Vega warn/error message colors
;_;
* [CI] Auto-commit changed files from 'node scripts/generate codeowners'
* Fix Lens kbnToolbarButton regressions
- Caused by flattening of EUI button CSS specificity
- background-color was previously relying on isDisabled CSS specificity to override its #fff color
- `text` color modifier & `!important` is no longer needed and overrides Emotion CSS flatly
- isDisabled class is no longer needed - euiButton no longer sets `pointer-events: none` on disabled buttons (fixes tooltip bug in webkit as well)
* Backport EUI 67.1.8 fixes
* Update EuiCard snapshots
* Fix EuiModal form wrapper causing overflow issues
- see https://elastic.github.io/eui/#/layout/modal#forms-in-a-modal
* Workaround for `.kbnOverlayMountWrapper` mount point causing overflow issues
- not sure what all is using this modal service to be honest, but the wrapper is causing issues with the modal layout, this fixes overflow issues but will not fix any mask-image issues as a result
* more snapshot updates
* EuiButton - added textProps to EuiButton to prevent very long button names from spilling over outside of the container
* EuiButton - Update EuiButton related snapshots. Updated tests that target EuiButton directly to use a data-telementary-id for more specific element querying required by Emotion
* QA - Removed unnecessary comment in code
* Temporary fix for EuiCard[selectable][layout=horizontal] instances on security solutions' rule page
* Temporary fix for EuiCard[selectable][layout=horizontal] instances on osquery live query and canvas's datasource selector
* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'
* Fix CSS specificity, where canvas's solutionToolbarButton's background-color now takes precedence over EuiButton's primary styles
* Removed update to search_marker_tooltip that removed the euiTooltip styles and replaced then with Emotion styling. Added EuiTooltip Sass styles for the component to rely on to test for a styling bug that is causing the tooltip and the tooltip arrow to be out of sync with each other.
* Lint Sass file
* Lint Sass file
* Removed overflow:hidden style from .vgaVis_view as it was causing euiScrollStyles not to present the scroll bars in Vega Vis
* Remove typo from EuiButton textProps object. 'className' should not have been included in the actual class name
* Revert tooltip Sass
This reverts commit 20e6ead571, a5cd2de901, and c605cbd7b9
* Fix Emotion tooltip arrows
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Constance Chen <constance.chen@elastic.co>
Co-authored-by: Chandler Prall <chandler.prall@elastic.co>
* Register rule data client with alerting
* wip
* get summarized alerts
* cleanup
* Adding queries
* Adding unit tests
* Adding condition to queries in order to limit number of alerts returned
* Fixing runtime mapping script
* Removing runtime mappings
* Adding function to persistence and lifecycle wrappers
* Adding functional test
* Updating README
* Adding comments
* lte to lt
* Revert "lte to lt"
This reverts commit bbc2604a00.
* lte to lt
* Fixing test
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Add unified search to hosts table
* Add saved query support
* Adjust error handling
* Minor refactoring and unit tests
* Revert changes to translations
* CR fixes
* remove lens, add snapshot api
* add no data
* Add cpu type
* [WIP] Add eui basic table and columns
* [WIP] Add cpu cores and os
* [WIP] Mapping data to the eui basic table format
* Add Memory Total
* Refactor host mapping and add types
* Scale up memory usage percentage
* Make os optional in the model
* Text cells formatting
* Change os.type to os.name
* Move snapshot nodes mapping to a hook and test it
* Add translation
* Add fixed range and cleanup
* Fix diskLatency field name
* Remove not existing showQueryBar prop from SearchBar and set time range values
* Use last path
* Test last path change
* Type imports
* Change the way lastPath.os is set
* Type import
* Sorting columns
* Use EuiInMemoryTable pagination and sorting and change mapping
* Set sorting to true and remove the default cpuCores field sorting option
* Update types
* Add mapping for the metric values used in hosts table
* Shorthand props
* Os from path - replace lodash and remove not needed null handling
* Fix types
* Remove type export
* Change metrics mapping
Co-authored-by: neptunian <sandra.gonzales@elastic.co>
* remove lens, add snapshot api
* add no data
* Add cpu type
* [WIP] Add eui basic table and columns
* [WIP] Add cpu cores and os
* [WIP] Mapping data to the eui basic table format
* Add Memory Total
* Refactor host mapping and add types
* Scale up memory usage percentage
* Make os optional in the model
* Text cells formatting
* Change os.type to os.name
* Move snapshot nodes mapping to a hook and test it
* Add translation
* Add fixed range and cleanup
* Fix diskLatency field name
* Remove not existing showQueryBar prop from SearchBar and set time range values
* Use last path
* Test last path change
* Type imports
* Change the way lastPath.os is set
* Type import
Co-authored-by: Jenny <dzheni.pavlova@elastic.co>
* use data views plugin
* remove unneeded dependency
* use data views plugin
* fix type
* type fix
* supply dataViews as depedency
* supply dataViews as depeden
* Bump `elastic/elasticsearch` to `8.4.0-canary.1`
* fixing package violations
* some xpack violations
* remove more unused ts-expect-error
* started muting errors
* start adapting watcher
* fix more usages
* fix more usages
* fixing more usages
* just one more
* more usages
* infra usages
* moar types
* fix unit test
* adapt more usages
* fixes in FTR tests
* try to fix kbn/es-types
* last fixes?
* [WIP] Implement No Data message
* Implement refetch
* Render lens component and hide when there is no data
* Add onLoading hook and conditional rendering
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [Infra] Make nav react to Hosts view enabled flag changing (#140996)
* Move comment to more relevant location
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Fix Legend Options and Node Map layout on mobile view
* Fix Number of Color bar on mobile
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Use breadcrumbs to set page title intead of DocumentTitle
* Remove document title component and use breadcrumbs - Logs Page
* Remove no longer needed document title translations
* Use docTitle.change in error page and remove document title component
* Add document title check to the functional tests
* Move test to check title after load
* test: Title change
* Remove unnecessary docTitle type
* Add error page tests
* Update snapshot
* Functional tests: Wait for loading the header before checking the title
* Change test to use react testing library
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Bumping EUI to version 64.0.1.
* Updating snapshot tests for two directories.
* Deprecate basic usages of getBreakpoint
- in favor of useCurrentEuiBreakpoint
* [Fleet] Deprecate isWithinMaxBreakpoint
- in favor of hook
* [DataViz] Update DataVisualizerTable to use window breakpoint vs table resize observer
- since getBreakpoint is now deprecated, we're only looking at the current EUI breakpoint (based off window width)
* [KibanaThemeProvider] Allow apps to modify the default EUI theme
- Setup for custom xl+ breakpoint sizes used by APM and Synthetics
* [APM] Update useBreakpoints hook with EUI breakpoint deprecations
- since getBreakpoint is no longer an usable util
- EUI's new breakpoint hooks already use/debounce window resize events, so we now get to skip all that custom logic by simply making custom EUI breakpoint overrides and using EUI breakpoint hooks
- remove returned `breakpoint` and `width` keys - they weren't actually being used anywhere in APM that I could see and were causing type errors.
- If someone wants to access them, they can use `useCurrentEuiBreakpoint` and `useWindowSize` individually instead
* [UX] Update useBreakpoints hook copied from APM
- basically the exact same logic, they just also need the xxl and xxxl breakpoints
* [Synthetics] Remove `useBreakpoints` in favor of new EUI breakpoint hooks
+ add xxl and xxxl breakpoints to Synthetics EUI themes
- `useBreakpoints`: - as far as I can tell, all attached APIs are basically the same APIs that EUI provides OOTB:
- up -> `useIsWithinMinBreakpoint`
- down -> `useIsWithinMaxBreakpoint`
- between -> `useIsWithinBreakpoints`
- debouncedWidth - not used, but could just use `useWindowSize` directly instead
- note: i'm confused by the `xl` override/conflation with `xxl`, but left the default xl breakpoint size as-is and assumed that all usage instances of 'xl' actually wanted 'xxl'
* v64.0.2 - add missing backports and several new fixes
* v64.0.3
* Fix type error from breakpoint deprecation
- functionally doesn't matter since the array doesn't include undefined, so basically just silence TS complaining about it
* Updating additional snapshots after bump to EUI 64.0.3
* Adding RUM Jest snapshot update.
* Adding Timeout to Fleet token generation test.
* Revert "[DataViz] Update DataVisualizerTable to use window breakpoint vs table resize observer"
This reverts commit 4e60ce281d.
* [DataViz] Remove getBreakpoint usage
- by replacing the breakpoint logic/switch with custom breakpoint sizes and names
- since the table size can be within panels that don't match `window.innerWidth`, we can't use EUI's breakpoint utils here
* Restoring a needed hook for breakpoints.
* Fix broken side navs on uptime/apm/ux/synthetics
- because of their new custom xxl/xxxl breakpoints, the `isLargerBreakpoint` logic was broken on the shared solution nav. switching to a min breakpoint bound fixes the issue and futureproofs the solution nav for all apps that add larger breakpoints than xl
* Fix snapshots/unit tests from previous commits
* Bumping EUI to 64.0.4 backport.
* [PR feedback] Separate DataVisualizerTable more clearly from EUI breakpoints
- per discussion with Quynh and Walter, there's some confusion around the breakpoints that the table is using. Since the table is width is not always the width of the browser window, it cannot use EUI's breakpoint hooks, and should instead use its own custom map of table-specific breakpoints to make that separation clearer
* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'
Co-authored-by: Constance Chen <constance.chen@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Update all usages of EuiPageTemplate to EuiPageTemplate_Deprecated
* EuiPageContent_Deprecated as EuiPageContent
* EuiPageContentBody_Deprecated as EuiPageContentBody
* EuiPageContentHeader_Deprecated as EuiPageContentHeader
* EuiPageContentHeaderSection_Deprecated as EuiPageContentHeaderSection
* EuiPageSideBar_Deprecated as EuiPageSideBar
* EuiPageContent__Deprecated to EuiPageContent_Deprecated
* Fix rogue semi-colons
* WIP: NoDataConfigPage & NoDataPage converted to new template
- `withSolutionNav` not yet handled
* WIP: KibanaPageTemplateInner converted to use new template
- Pushes existing `pageHeader` prompts onto created EuiPageTemplate.PageHeader
- Uses `isEmptyState` to push `pageHeader` props to EuiPageTemplate.EmptyPrompt instead (if `children` are not supplied)
* WIP: `withSolutionNav` now renders the sidebar content properly
- Collapsing isn’t working (minWidth isn’t updating)
* Fixing stickiness of sidebar
* [Security] Fixed SecuritySolutionTemplateWrapper’s usage
- Moved `bottomBar` to EuiPageTemplate.BottomBar (now contained in just the page contents)
- Change EuiPanel children wrapper with EuiPageTemplate.Section
* [O11y] Wrap `children` with EuiPageTemplate.Section
* Fix getting_started usage
* WIP: Fixing types
* Removing `template` pass through
* Set EUI to 63.0.0
* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'
* More import fixes
* Sidebar component update
* Expand `KibanaPageTemplate` to all namespaced EUI counterparts
- Updated `docs/tutorials` mdx page
- Fixed SolutionNav prop types
* Updated the tutorial mdx page
* [Stack Management] Updated app layout to new template
- Some temporary props applied for BWC until all other pages can be converted
- Converted `API Keys` page’s layout (and especially prompt usags) to new paradigm
* Fix circular dep
* Fix new circular dependency
- copying and pasting types from KibanaPageTemplateProps, but ah well
* [Security Solution] Remove `template` prop - no longer a prop on Kibana/EuiPageTemplate
* [O11y] Allow customizing EuiPageTemplate.Section wrapper
- converts pageBodyProps
- fixes non-centered loading template
* [Enterprise Search] Update page templates
- fix layouts by auto-wrapping an EuiPageSection for padding, while adding a `customPageSections` prop for more custom sections/layouts
- re-center 404 errors
- update tests
* Update KibanaPageTemplate tests
* Update snapshots
* Fix FTR test with removed EUI classNames
* Fix FTR tests with changed kbn classNames
* Update failing dashboard snapshots
- drop shadow changed slightly in EUI
* Fix failing Security Cypress test
* [O11y] Fix Inventory page using deprecated CSS hooks
* [O11y][Uptime] Fix missing bottom bars
- Modifies ObservabilityPageTemplate to accept a `bottomBar` prop (a la the old EuiPageTemplate behavior)
NOTE: This opinionated page layout structure is starting to feel like it could be potentially limiting / have all the same pitfalls the previous EuiPageTemplate did. If so, consider something closer to the Enterprise Search page template conversion (`customPageSections`).
- Misc cleanup: Use `KibanaPageTemplate` over `EuiPageTemplate`
* [O11y] Fix route template typing
- Since theObservabilityPageTemplate is using the new Eui/KibanaPageTemplate, its child templates and types need to be updated accordingly
* Fix broken minWidth behavior
- was an EUI issue that required a patch release
+ update snapshots
* [Security Solution] Type fixes, restore empty state
- Fix empty state logic removed in a previous commit
- bogarts KibanaPageTemplate's `isEmptyState` prop instead of using `template="noData"`
- extend template wrappers to past ...rest to underlying Kibana/EuiPageTemplate
+ replace EuiPageTemplate with KibanaPageTemplate for consistency
* Fix failing synthetics selector
* Grab EUI v63.0.6
- for deprecation tags and section tag support
* Fix Kibana Overview plugin layout
- needs to use KibanaPageTemplate.Section to get padding back
- use `bottomBorder` prop over horizontal rules
- restore previous page color via panelled=false
* Convert Home plugin to new KibanaPageTemplate
- use KibanaPageTemplate.Section instead to preserve page width/paddings
- use `bottomBorder` instead of `EuiHorizontalRule`
- NOTE: This causes margins to decrease slightly from xxl to xl (largest padding available for EuiPageSection) - this can be restored by CSS overrides if desired
- update CSS to preserve previous looks, + convert to logical properties
* [O11y] Fix non-centered empty/loading states
* [O11y] Restore subdued background on various empty state prompts
* [O11y] Fix all instances of views that require a scrollable full-height child
+ restore comment for inventory view
* [O11y][ux] Fix broken sidebar
- The entire app was missing a wrapping EuiProvider, and as such breakpoint utils were not working, and the sidebar was missing
+ misc cleanup
- remove unnecessary fragment
- remove role="main" attr - now that EuiPageTemplate sets a `main` tag, they'll conflict
- add isEmptyState to center loading component
* [APM Cypress tests] harden flaky test
* [APM Cypress tests] Fix failing Cypress test, again
Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
* deletes unused utils file
* just some fix while I see it
* creating empty packages
* moving all the things
* package build success
* start fixing usages
* fix the scoped history type issue
* export internal utils
* add default for mock
* fix test import
* fix external import
* start fixing external usages
* more usages
* more usages
* more usages
* More usages
* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'
* fix integration test imports
* fix more test types
* remove public/utils from the core bundle
* trying to import from the package
* updating README's
* remove unused test types from mock package
* cleanup test types
* use import type
* add author to packages
* more import type
* remove dead path from some config
* remove src/core/utils/index.ts (and pray)
* update tsdoc
* fix new file usage
* fix paths
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
* inital empty hosts page and navigation item
* lens table and unified search
* add data view id
* cleanup
* clear searchs session when unmounting
* cleanup
* add some basic error handling for Data View
* change back loading text for now because of breaking test