-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Composable template] Details panel + delete functionality #70814
[Composable template] Details panel + delete functionality #70814
Conversation
Pinging @elastic/es-ui (Team:Elasticsearch 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.
Great work @sebelga!
Tested locally. Everything worked as expected. I also tested the cloud functionality and verified it still works as expected following the steps in #43901.
I noticed the following react warning occasionally. I didn't spend a ton of time looking into it, but it didn't seem to happen consistently.
I also had a couple nits, but nothing blocking.
-
I mentioned this in the code - but I think we need to get a consensus on how to differentiate between "managed", "cloud-managed", and "system" templates. I could see it being a little confusing to the user. Also, the UX seems a little inconsistent. For example, we show a badge for "managed", but hide "system" templates and allow the user to filter by them.
-
I understand we're tight on real estate in the table, but it feels a little inconsistent that for the legacy and component templates we use the checkmarks for mappings/settings/aliases, but for composable templates we have the M/S/A component.
-
The
_meta
code block looks a little cramped in the details panel. What do you think if we stacked the details vertically, or would that cause the user to scroll? -
What do you think about including the
Managed
badge in details panel as well?
return i18n.translate( | ||
'xpack.idxMgmt.templateList.legacyTable.deleteManagedTemplateTooltip', | ||
{ | ||
defaultMessage: 'You cannot delete a managed template.', |
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.
I wonder if we should also update the copy here. I think this can be handled as part of the copy review process, but we probably need a way to distinguish between cloud-managed and managed.
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.
I agree that we want to distinguish. It looks like we already use cloud-managed
for SLM policies.
Here's my suggestion:
You cannot delete a cloud-managed template.
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 point, I made the change suggested @jrodewig 👍
| ||
{item._kbnMeta.isManaged ? ( | ||
<EuiBadge color="hollow" data-test-subj="isManagedBadge"> | ||
Managed |
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.
i18n missing here
💛 Build succeeded, but was flaky
Test FailuresKibana Pipeline / kibana-oss-agent / Chrome UI Functional Tests.test/functional/apps/saved_objects_management/edit_saved_object·ts.saved objects management saved objects edition page allows to delete a saved objectStandard Out
Stack Trace
Build metrics
History
To update your PR or re-run it, just comment with: |
Thanks for the review @alisonelizabeth ! I will merge the PR and address your concerns in my following PR along with other changes reviewed during the demo on the creation flow.
Great catch, I will see if I can reproduce it and see where it comes from. 👍
You're right this is a bit confusing. I will add a
Yes, we really don't have much space on the table if we want to support smaller screens. I will see what I can do. It seemed at the demo that the checkmarks were the preferred way to display this information.
Good point. I will add it as a separate line below "Components" and give it the full width.
Great idea. But then I'll go ahead and add the "System" and "Cloud-managed" badge too. |
* master: (53 commits) [Composable template] Details panel + delete functionality (elastic#70814) [Uptime] Ping list body scroll (elastic#70781) moving indexPattern.delete() to indexPatterns.delete(indexPattern) (elastic#70430) Adapt expected response of advanced settings feature control for cloud tests (elastic#70793) skip flaky suite (elastic#70885) skip flaky suite (elastic#67814) skip flaky suite (elastic#70906) Revert "reenable regression and classification functional tests (elastic#70661)" (elastic#70908) Added UI validation when creating a Webhook connector with invalid URL (elastic#70025) [Security Solution] Change default index pattern (elastic#70797) ServiceNow push to Incident generic implementation (supporting both Case specific and generic Alerts) (elastic#68464) add button link to ingest (elastic#70142) reenable regression and classification functional tests (elastic#70661) [Component templates] Form wizard (elastic#69732) [Ingest Manager] Copy changes (elastic#70828) Adding test user to maps functional tests - PR 1 (elastic#70649) [Ingest Manager] Support limiting integrations on an agent config (elastic#70542) skip flaky suite (elastic#70880) [Metrics UI] Fix a bug in Metric Threshold query filter construction (elastic#70672) upgrade caniuse-lite database (elastic#70833) ...
* master: (46 commits) [Composable template] Details panel + delete functionality (elastic#70814) [Uptime] Ping list body scroll (elastic#70781) moving indexPattern.delete() to indexPatterns.delete(indexPattern) (elastic#70430) Adapt expected response of advanced settings feature control for cloud tests (elastic#70793) skip flaky suite (elastic#70885) skip flaky suite (elastic#67814) skip flaky suite (elastic#70906) Revert "reenable regression and classification functional tests (elastic#70661)" (elastic#70908) Added UI validation when creating a Webhook connector with invalid URL (elastic#70025) [Security Solution] Change default index pattern (elastic#70797) ServiceNow push to Incident generic implementation (supporting both Case specific and generic Alerts) (elastic#68464) add button link to ingest (elastic#70142) reenable regression and classification functional tests (elastic#70661) [Component templates] Form wizard (elastic#69732) [Ingest Manager] Copy changes (elastic#70828) Adding test user to maps functional tests - PR 1 (elastic#70649) [Ingest Manager] Support limiting integrations on an agent config (elastic#70542) skip flaky suite (elastic#70880) [Metrics UI] Fix a bug in Metric Threshold query filter construction (elastic#70672) upgrade caniuse-lite database (elastic#70833) ...
* actions/feature: (46 commits) [Composable template] Details panel + delete functionality (elastic#70814) [Uptime] Ping list body scroll (elastic#70781) moving indexPattern.delete() to indexPatterns.delete(indexPattern) (elastic#70430) Adapt expected response of advanced settings feature control for cloud tests (elastic#70793) skip flaky suite (elastic#70885) skip flaky suite (elastic#67814) skip flaky suite (elastic#70906) Revert "reenable regression and classification functional tests (elastic#70661)" (elastic#70908) Added UI validation when creating a Webhook connector with invalid URL (elastic#70025) [Security Solution] Change default index pattern (elastic#70797) ServiceNow push to Incident generic implementation (supporting both Case specific and generic Alerts) (elastic#68464) add button link to ingest (elastic#70142) reenable regression and classification functional tests (elastic#70661) [Component templates] Form wizard (elastic#69732) [Ingest Manager] Copy changes (elastic#70828) Adding test user to maps functional tests - PR 1 (elastic#70649) [Ingest Manager] Support limiting integrations on an agent config (elastic#70542) skip flaky suite (elastic#70880) [Metrics UI] Fix a bug in Metric Threshold query filter construction (elastic#70672) upgrade caniuse-lite database (elastic#70833) ...
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.
Provided a post-merge copy review that you can incorporate into the follow-up PR. Thanks!
name: i18n.translate('xpack.idxMgmt.templateList.table.contentColumnTitle', { | ||
defaultMessage: 'Content', | ||
}), | ||
truncateText: true, | ||
render: (item: TemplateListItem) => ( | ||
<TemplateContentIndicator | ||
mappings={item.hasMappings} | ||
settings={item.hasSettings} | ||
aliases={item.hasAliases} | ||
contentWhenEmpty={ |
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.
Just a note:
I'm pretty familiar with index templates and it took me a while to figure out what M S A
meant in this context. I'd love to see this spelled out in some way, but even a tooltip might help.
Part of me wonders if this information needs to be surfaced at this level at all.
Not necessarily actionable or blocking. Just thoughts to consider.
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.
<EuiDescriptionListTitle data-test-subj="componentsTitle"> | ||
<FormattedMessage | ||
id="xpack.idxMgmt.templateDetails.summaryTab.componentsDescriptionListTitle" | ||
defaultMessage="Components" |
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.
I'd change this to Component templates
.
I consider components to be the actual mappings, settings, and aliases that get created on the target index/data stream.
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.
{/* Has data stream? (only for composable template) */} | ||
{isLegacy !== true && ( | ||
<> | ||
<EuiDescriptionListTitle> | ||
<FormattedMessage | ||
id="xpack.idxMgmt.templateDetails.summaryTab.dataStreamDescriptionListTitle" | ||
defaultMessage="Data stream" | ||
/> | ||
</EuiDescriptionListTitle> | ||
<EuiDescriptionListDescription> | ||
{hasDatastream ? i18nTexts.yes : i18nTexts.no} | ||
</EuiDescriptionListDescription> | ||
</> | ||
)} |
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.
Not a copy edit, but it would be great to see if an index template is in use for any matching data streams and list those data streams here.
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.
That'd be a great enhancement we could add, not sure we could squeeze it for 7.9
though. I thought we didn't have that information yet available on ES side. I'll check it out 👍
title={ | ||
<FormattedMessage | ||
id="xpack.idxMgmt.templateDetails.managedTemplateInfoTitle" | ||
defaultMessage="Editing a managed template is not permitted" |
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.
I'd add a period here.
Editing a managed template is not permitted.
return i18n.translate( | ||
'xpack.idxMgmt.templateList.legacyTable.deleteManagedTemplateTooltip', | ||
{ | ||
defaultMessage: 'You cannot delete a managed template.', |
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.
I agree that we want to distinguish. It looks like we already use cloud-managed
for SLM policies.
Here's my suggestion:
You cannot delete a cloud-managed template.
This PR adds the details flyout and delete functionality for composable templates.
This is basically the same functionality that we have with legacy index templates.
In this PR I've also made the changes discussed at the demo regarding the table:
Note In a following PR with the "Simulate template" functionality I will add a new tab to the details flyout with the preview of the template.