-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Surface data stream stats, index template, and ILM policy in the UI #75107
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
Surface data stream stats, index template, and ILM policy in the UI #75107
Conversation
- Extract out DataHealth component for use in both Data Streams and Indices tabs. - Refactor detail panel to use data structure & algo to build component. - Refactor detail panel to use i18n.translate instead of FormattedMessage.
… panel. - Add 'Include stats' switch. - Add humanizeTimeStamp service, localized to data streams.
|
Pinging @elastic/es-ui (Team:Elasticsearch UI) |
|
@elasticmachine merge upstream |
1 similar comment
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
alisonelizabeth
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job @cjcenizal! LGTM. Tested locally. I left a few non-blocking comments.
| @@ -0,0 +1,22 @@ | |||
| # Index Management UI | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this!
|
|
||
| const clickIncludeStatsSwitch = () => { | ||
| const { find } = testBed; | ||
| find('includeStatsSwitch').simulate('click'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit] The test lib does provide toggleEuiSwitch, which checks for the existence of the element before simulating click.
https://github.com/elastic/kibana/blob/master/src/test_utils/public/testbed/testbed.ts#L246
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I'll convert this to use toggleEuiSwitch.
| }), | ||
| content: | ||
| ilmPolicyName ?? | ||
| i18n.translate('xpack.idxMgmt.dataStreamDetailPanel.ilmPolicyContentNoneMessage', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this need i18n?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not 😄 I'll remove it. Good spot!
| import { RouteDependencies } from '../../../types'; | ||
| import { addBasePath } from '../index'; | ||
|
|
||
| // Require the template format version (V1 or V2) to be provided as Query param |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong comment? 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, right
| // type, and then remove it. | ||
| expect(dataStream.storageSize).to.be.ok(); | ||
| expect(typeof dataStream.storageSize).to.be('string'); | ||
| delete dataStream.storageSize; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain why storageSize needs to be deleted? Never mind I understand now based on your comment above. It does feel a little strange to delete it though in a test. Could you do something like this instead?
const { storageSize, ....response } = dataStream;
and assert against response?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea! Will do.
|
|
||
| import moment from 'moment'; | ||
|
|
||
| export const humanizeTimeStamp = (timeStamp?: number): string => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should timeStamp be required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great spot! Will fix.
…kibana into data-streams/related-entities
|
@alisonelizabeth I ended up rendering "None" instead of a dash for when data is missing. I think this will be more useful for screen readers and for other locales. |
💚 Build SucceededBuild metrics@kbn/optimizer bundle module count
async chunks size
page load bundle size
History
To update your PR or re-run it, just comment with: |
…75107) (#75713) * Add Index Management README and quick testing steps for data streams. * Surface data stream health in Data Streams tab (table and detail panel). - Extract out DataHealth component for use in both Data Streams and Indices tabs. - Refactor detail panel to use data structure & algo to build component. - Refactor detail panel to use i18n.translate instead of FormattedMessage. * Render index template name and index lifecycle policy name in the detail panel. * Render storage size and max timestamp information in table and detail panel. - Add 'Include stats' switch. - Add humanizeTimeStamp service, localized to data streams.

Release note
The Data Streams tab in Index Management now allows users to view additional information for data streams:
Testing
To test this PR, create a data stream and then view it in the UI: