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

[Composable template] Details panel + delete functionality #70814

Merged

Conversation

sebelga
Copy link
Contributor

@sebelga sebelga commented Jul 6, 2020

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:

  • Remove the ILM policy column
  • Add a "Data stream" column to indicate with a tick if there is a datastream
  • Change the name "Override" with "Content" to remove the need to add "Override" in each of the tabs of the details panel.
  • Add a badge to indicate that an index template is managed.

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.

Screenshot 2020-07-06 at 16 53 52

Screenshot 2020-07-06 at 16 54 05

@sebelga sebelga requested a review from a team as a code owner July 6, 2020 14:53
@sebelga sebelga added Feature:Index Management Index and index templates UI Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v7.9.0 v8.0.0 labels Jul 6, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui (Team:Elasticsearch UI)

@sebelga sebelga added the release_note:skip Skip the PR/issue when compiling release notes label Jul 6, 2020
Copy link
Contributor

@alisonelizabeth alisonelizabeth left a 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.

Screen Shot 2020-07-06 at 2 44 28 PM


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.',
Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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
Copy link
Contributor

Choose a reason for hiding this comment

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

i18n missing here

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana 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 object

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 12 times on tracked branches: https://github.com/elastic/kibana/issues/68400

[00:00:00]       │
[00:11:44]         └-: saved objects management
[00:11:44]           └-> "before all" hook
[00:11:44]           └-: saved objects edition page
[00:11:44]             └-> "before all" hook
[00:11:44]             └-> allows to update the saved object when submitting
[00:11:44]               └-> "before each" hook: global before each
[00:11:44]               └-> "before each" hook
[00:11:44]                 │ info [saved_objects_management/edit_saved_object] Loading "mappings.json"
[00:11:44]                 │ info [saved_objects_management/edit_saved_object] Loading "data.json"
[00:11:44]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] [.kibana] creating index, cause [api], templates [], shards [1]/[0]
[00:11:44]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana][0]]])." previous.health="YELLOW" reason="shards started [[.kibana][0]]"
[00:11:44]                 │ info [saved_objects_management/edit_saved_object] Created index ".kibana"
[00:11:44]                 │ debg [saved_objects_management/edit_saved_object] ".kibana" settings {"index":{"number_of_shards":"1","auto_expand_replicas":"0-1","number_of_replicas":"0"}}
[00:11:44]                 │ info [saved_objects_management/edit_saved_object] Indexed 4 docs into ".kibana"
[00:11:44]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] [.kibana/Lxqqug2sQPyvtH0A3QehEg] update_mapping [_doc]
[00:11:44]                 │ debg Migrating saved objects
[00:11:44]                 │ proc [kibana]   log   [19:20:19.836] [info][savedobjects-service] Creating index .kibana_2.
[00:11:44]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1]
[00:11:44]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] updating number_of_replicas to [0] for indices [.kibana_2]
[00:11:44]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana_2][0]]])." previous.health="YELLOW" reason="shards started [[.kibana_2][0]]"
[00:11:44]                 │ proc [kibana]   log   [19:20:19.889] [info][savedobjects-service] Reindexing .kibana to .kibana_1
[00:11:44]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1]
[00:11:44]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] updating number_of_replicas to [0] for indices [.kibana_1]
[00:11:44]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana_1][0]]])." previous.health="YELLOW" reason="shards started [[.kibana_1][0]]"
[00:11:44]                 │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] 3692 finished with response BulkByScrollResponse[took=29.9ms,timed_out=false,sliceId=null,updated=0,created=4,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:11:44]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] [.kibana/Lxqqug2sQPyvtH0A3QehEg] deleting index
[00:11:44]                 │ proc [kibana]   log   [19:20:20.218] [info][savedobjects-service] Migrating .kibana_1 saved objects to .kibana_2
[00:11:44]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] [.kibana_2/5uDP1F4QR_668KPxVtxqRA] update_mapping [_doc]
[00:11:44]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] [.kibana_2/5uDP1F4QR_668KPxVtxqRA] update_mapping [_doc]
[00:11:44]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] [.kibana_2/5uDP1F4QR_668KPxVtxqRA] update_mapping [_doc]
[00:11:44]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] [.kibana_2/5uDP1F4QR_668KPxVtxqRA] update_mapping [_doc]
[00:11:44]                 │ proc [kibana]   log   [19:20:20.337] [info][savedobjects-service] Pointing alias .kibana to .kibana_2.
[00:11:44]                 │ proc [kibana]   log   [19:20:20.368] [info][savedobjects-service] Finished in 534ms.
[00:11:44]                 │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC"}
[00:11:46]               │ debg navigating to settings url: http://localhost:6181/app/management
[00:11:46]               │ debg navigate to: http://localhost:6181/app/management
[00:11:46]               │ debg browser[INFO] http://localhost:6181/app/management?_t=1594063221890 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:11:46]               │
[00:11:46]               │ debg browser[INFO] http://localhost:6181/bundles/app/core/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:11:46]               │ debg ... sleep(700) start
[00:11:47]               │ debg ... sleep(700) end
[00:11:47]               │ debg returned from get, calling refresh
[00:11:48]               │ debg browser[INFO] http://localhost:6181/34341/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 452:106112 "INFO: 2020-07-06T19:20:23Z
[00:11:48]               │        Adding connection to http://localhost:6181/elasticsearch
[00:11:48]               │
[00:11:48]               │      "
[00:11:48]               │ERROR browser[SEVERE] http://localhost:6181/34341/bundles/core/core.entry.js 83:261771 TypeError: Failed to fetch
[00:11:48]               │          at Fetch._callee3$ (http://localhost:6181/34341/bundles/core/core.entry.js:34:105174)
[00:11:48]               │          at l (http://localhost:6181/34341/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:368:144815)
[00:11:48]               │          at Generator._invoke (http://localhost:6181/34341/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:368:144568)
[00:11:48]               │          at Generator.forEach.e.<computed> [as throw] (http://localhost:6181/34341/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:368:145172)
[00:11:48]               │          at fetch_asyncGeneratorStep (http://localhost:6181/34341/bundles/core/core.entry.js:34:99267)
[00:11:48]               │          at _throw (http://localhost:6181/34341/bundles/core/core.entry.js:34:99675)
[00:11:48]               │ debg browser[INFO] http://localhost:6181/app/management?_t=1594063221890 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:11:48]               │
[00:11:48]               │ debg browser[INFO] http://localhost:6181/bundles/app/core/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:11:48]               │ debg currentUrl = http://localhost:6181/app/management
[00:11:48]               │          appUrl = http://localhost:6181/app/management
[00:11:48]               │ debg TestSubjects.find(kibanaChrome)
[00:11:48]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:11:49]               │ debg browser[INFO] http://localhost:6181/34341/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 452:106112 "INFO: 2020-07-06T19:20:24Z
[00:11:49]               │        Adding connection to http://localhost:6181/elasticsearch
[00:11:49]               │
[00:11:49]               │      "
[00:11:49]               │ debg ... sleep(501) start
[00:11:49]               │ debg ... sleep(501) end
[00:11:49]               │ debg in navigateTo url = http://localhost:6181/app/management
[00:11:49]               │ debg TestSubjects.exists(statusPageContainer)
[00:11:49]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:11:52]               │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:11:53]               │ debg TestSubjects.click(objects)
[00:11:53]               │ debg Find.clickByCssSelector('[data-test-subj="objects"]') with timeout=10000
[00:11:53]               │ debg Find.findByCssSelector('[data-test-subj="objects"]') with timeout=10000
[00:11:53]               │ debg Find.existsByDisplayedByCssSelector('*[data-test-subj="savedObjectsTable"] .euiBasicTable-loading') with timeout=2500
[00:11:53]               │ debg --- retry.try error: Waiting
[00:11:53]               │ debg Find.existsByDisplayedByCssSelector('*[data-test-subj="savedObjectsTable"] .euiBasicTable-loading') with timeout=2500
[00:11:56]               │ debg --- retry.tryForTime error: *[data-test-subj="savedObjectsTable"] .euiBasicTable-loading is not displayed
[00:11:56]               │ debg Find.existsByDisplayedByCssSelector('*[data-test-subj="savedObjectsTable"] .euiBasicTable-loading') with timeout=2500
[00:11:59]               │ debg --- retry.tryForTime error: *[data-test-subj="savedObjectsTable"] .euiBasicTable-loading is not displayed
[00:11:59]               │ debg TestSubjects.find(savedObjectsTable)
[00:11:59]               │ debg Find.findByCssSelector('[data-test-subj="savedObjectsTable"]') with timeout=10000
[00:11:59]               │ debg navigateToUrl http://localhost:6181/app/management/kibana/objects/savedDashboards/i-exist
[00:11:59]               │ debg browser[INFO] http://localhost:6181/app/management/kibana/objects/savedDashboards/i-exist?_t=1594063235282 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:11:59]               │
[00:11:59]               │ debg browser[INFO] http://localhost:6181/bundles/app/core/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:12:00]               │ debg currentUrl = http://localhost:6181/app/management/kibana/objects/savedDashboards/i-exist
[00:12:00]               │          appUrl = http://localhost:6181/app/management/kibana/objects/savedDashboards/i-exist
[00:12:00]               │ debg TestSubjects.find(kibanaChrome)
[00:12:00]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:12:01]               │ debg TestSubjects.exists(savedObjectEditSave)
[00:12:01]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="savedObjectEditSave"]') with timeout=120000
[00:12:01]               │ debg browser[INFO] http://localhost:6181/34341/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 452:106112 "INFO: 2020-07-06T19:20:36Z
[00:12:01]               │        Adding connection to http://localhost:6181/elasticsearch
[00:12:01]               │
[00:12:01]               │      "
[00:12:01]               │ debg TestSubjects.getAttribute(savedObjects-editField-title, value)
[00:12:01]               │ debg TestSubjects.find(savedObjects-editField-title)
[00:12:01]               │ debg Find.findByCssSelector('[data-test-subj="savedObjects-editField-title"]') with timeout=10000
[00:12:01]               │ debg TestSubjects.setValue(savedObjects-editField-title, Edited Dashboard)
[00:12:01]               │ debg TestSubjects.click(savedObjects-editField-title)
[00:12:01]               │ debg Find.clickByCssSelector('[data-test-subj="savedObjects-editField-title"]') with timeout=10000
[00:12:01]               │ debg Find.findByCssSelector('[data-test-subj="savedObjects-editField-title"]') with timeout=10000
[00:12:01]               │ debg TestSubjects.setValue(savedObjects-editField-description, Some description)
[00:12:01]               │ debg TestSubjects.click(savedObjects-editField-description)
[00:12:01]               │ debg Find.clickByCssSelector('[data-test-subj="savedObjects-editField-description"]') with timeout=10000
[00:12:01]               │ debg Find.findByCssSelector('[data-test-subj="savedObjects-editField-description"]') with timeout=10000
[00:12:02]               │ debg TestSubjects.find(savedObjectEditSave)
[00:12:02]               │ debg Find.findByCssSelector('[data-test-subj="savedObjectEditSave"]') with timeout=10000
[00:12:02]               │ debg Find.existsByDisplayedByCssSelector('*[data-test-subj="savedObjectsTable"] .euiBasicTable-loading') with timeout=2500
[00:12:02]               │ debg --- retry.try error: Waiting
[00:12:03]               │ debg Find.existsByDisplayedByCssSelector('*[data-test-subj="savedObjectsTable"] .euiBasicTable-loading') with timeout=2500
[00:12:05]               │ debg --- retry.tryForTime error: *[data-test-subj="savedObjectsTable"] .euiBasicTable-loading is not displayed
[00:12:06]               │ debg TestSubjects.find(savedObjectsTable)
[00:12:06]               │ debg Find.findByCssSelector('[data-test-subj="savedObjectsTable"]') with timeout=10000
[00:12:06]               │ debg navigateToUrl http://localhost:6181/app/management/kibana/objects/savedDashboards/i-exist
[00:12:06]               │ debg currentUrl = http://localhost:6181/app/management/kibana/objects/savedDashboards/i-exist
[00:12:06]               │          appUrl = http://localhost:6181/app/management/kibana/objects/savedDashboards/i-exist
[00:12:06]               │ debg TestSubjects.find(kibanaChrome)
[00:12:06]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:12:07]               │ debg TestSubjects.getAttribute(savedObjects-editField-title, value)
[00:12:07]               │ debg TestSubjects.find(savedObjects-editField-title)
[00:12:07]               │ debg Find.findByCssSelector('[data-test-subj="savedObjects-editField-title"]') with timeout=10000
[00:12:07]               │ debg browser[INFO] http://localhost:6181/app/management/kibana/objects/savedDashboards/i-exist?_t=1594063241605 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:12:07]               │
[00:12:07]               │ debg browser[INFO] http://localhost:6181/bundles/app/core/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:12:07]               │ debg browser[INFO] http://localhost:6181/34341/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 452:106112 "INFO: 2020-07-06T19:20:42Z
[00:12:07]               │        Adding connection to http://localhost:6181/elasticsearch
[00:12:07]               │
[00:12:07]               │      "
[00:12:07]               │ debg TestSubjects.getAttribute(savedObjects-editField-description, value)
[00:12:07]               │ debg TestSubjects.find(savedObjects-editField-description)
[00:12:07]               │ debg Find.findByCssSelector('[data-test-subj="savedObjects-editField-description"]') with timeout=10000
[00:12:07]               └- ✓ pass  (21.2s) "saved objects management saved objects edition page allows to update the saved object when submitting"
[00:12:07]             └-> "after each" hook
[00:12:07]               │ info [saved_objects_management/edit_saved_object] Unloading indices from "mappings.json"
[00:12:07]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] [.kibana_2/5uDP1F4QR_668KPxVtxqRA] deleting index
[00:12:07]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] [.kibana_1/RSKux0IESMKiHP9olv8L_g] deleting index
[00:12:07]               │ info [saved_objects_management/edit_saved_object] Deleted existing index [".kibana_2",".kibana_1"]
[00:12:07]               │ info [saved_objects_management/edit_saved_object] Unloading indices from "data.json"
[00:12:07]             └-> allows to delete a saved object
[00:12:07]               └-> "before each" hook: global before each
[00:12:07]               └-> "before each" hook
[00:12:07]                 │ info [saved_objects_management/edit_saved_object] Loading "mappings.json"
[00:12:07]                 │ info [saved_objects_management/edit_saved_object] Loading "data.json"
[00:12:07]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] [.kibana] creating index, cause [api], templates [], shards [1]/[0]
[00:12:07]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana][0]]])." previous.health="YELLOW" reason="shards started [[.kibana][0]]"
[00:12:07]                 │ info [saved_objects_management/edit_saved_object] Created index ".kibana"
[00:12:07]                 │ debg [saved_objects_management/edit_saved_object] ".kibana" settings {"index":{"number_of_shards":"1","auto_expand_replicas":"0-1","number_of_replicas":"0"}}
[00:12:07]                 │ info [saved_objects_management/edit_saved_object] Indexed 4 docs into ".kibana"
[00:12:07]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] [.kibana/NEY1zrK3Q0-H_Ueak5sg5A] update_mapping [_doc]
[00:12:07]                 │ debg Migrating saved objects
[00:12:07]                 │ proc [kibana]   log   [19:20:43.273] [info][savedobjects-service] Creating index .kibana_2.
[00:12:07]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1]
[00:12:07]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] updating number_of_replicas to [0] for indices [.kibana_2]
[00:12:07]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana_2][0]]])." previous.health="YELLOW" reason="shards started [[.kibana_2][0]]"
[00:12:07]                 │ proc [kibana]   log   [19:20:43.328] [info][savedobjects-service] Reindexing .kibana to .kibana_1
[00:12:07]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1]
[00:12:07]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] updating number_of_replicas to [0] for indices [.kibana_1]
[00:12:07]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana_1][0]]])." previous.health="YELLOW" reason="shards started [[.kibana_1][0]]"
[00:12:08]                 │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] 3935 finished with response BulkByScrollResponse[took=20.1ms,timed_out=false,sliceId=null,updated=0,created=4,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:12:08]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] [.kibana/NEY1zrK3Q0-H_Ueak5sg5A] deleting index
[00:12:08]                 │ proc [kibana]   log   [19:20:43.650] [info][savedobjects-service] Migrating .kibana_1 saved objects to .kibana_2
[00:12:08]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] [.kibana_2/94PMA9p9S-Wl0Y6-jeuoSQ] update_mapping [_doc]
[00:12:08]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] [.kibana_2/94PMA9p9S-Wl0Y6-jeuoSQ] update_mapping [_doc]
[00:12:08]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] [.kibana_2/94PMA9p9S-Wl0Y6-jeuoSQ] update_mapping [_doc]
[00:12:08]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1594061536316078099] [.kibana_2/94PMA9p9S-Wl0Y6-jeuoSQ] update_mapping [_doc]
[00:12:08]                 │ proc [kibana]   log   [19:20:43.753] [info][savedobjects-service] Pointing alias .kibana to .kibana_2.
[00:12:08]                 │ proc [kibana]   log   [19:20:43.791] [info][savedobjects-service] Finished in 519ms.
[00:12:08]                 │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC"}
[00:12:09]               │ debg navigateToUrl http://localhost:6181/app/management/kibana/objects/savedDashboards/i-exist
[00:12:10]               │ debg currentUrl = http://localhost:6181/app/management/kibana/objects/savedDashboards/i-exist
[00:12:10]               │          appUrl = http://localhost:6181/app/management/kibana/objects/savedDashboards/i-exist
[00:12:10]               │ debg TestSubjects.find(kibanaChrome)
[00:12:10]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:12:10]               │ debg browser[INFO] http://localhost:6181/app/management/kibana/objects/savedDashboards/i-exist?_t=1594063245329 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:12:10]               │
[00:12:10]               │ debg browser[INFO] http://localhost:6181/bundles/app/core/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:12:11]               │ debg TestSubjects.find(savedObjectEditDelete)
[00:12:11]               │ debg Find.findByCssSelector('[data-test-subj="savedObjectEditDelete"]') with timeout=10000
[00:12:11]               │ debg browser[INFO] http://localhost:6181/34341/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 452:106112 "INFO: 2020-07-06T19:20:46Z
[00:12:11]               │        Adding connection to http://localhost:6181/elasticsearch
[00:12:11]               │
[00:12:11]               │      "
[00:12:11]               │ debg Clicking modal confirm
[00:12:11]               │ debg TestSubjects.exists(confirmModalTitleText)
[00:12:11]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="confirmModalTitleText"]') with timeout=2500
[00:12:11]               │ debg TestSubjects.click(confirmModalConfirmButton)
[00:12:11]               │ debg Find.clickByCssSelector('[data-test-subj="confirmModalConfirmButton"]') with timeout=10000
[00:12:11]               │ debg Find.findByCssSelector('[data-test-subj="confirmModalConfirmButton"]') with timeout=10000
[00:12:11]               │ debg TestSubjects.exists(confirmModalTitleText)
[00:12:11]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="confirmModalTitleText"]') with timeout=2500
[00:12:14]               │ debg browser[INFO] http://localhost:6181/34341/bundles/core/core.entry.js 83:262850 "Detected an unhandled Promise rejection.
[00:12:14]               │      TypeError: Cannot read property 'attributes' of undefined"
[00:12:14]               │ERROR browser[SEVERE] http://localhost:6181/34341/bundles/plugin/savedObjectsManagement/1.plugin.js 5:34045 Uncaught TypeError: Cannot read property 'attributes' of undefined
[00:12:14]               │ debg --- retry.tryForTime error: [data-test-subj="confirmModalTitleText"] is not displayed
[00:12:14]               │ debg Find.existsByDisplayedByCssSelector('*[data-test-subj="savedObjectsTable"] .euiBasicTable-loading') with timeout=2500
[00:12:17]               │ debg --- retry.tryForTime error: *[data-test-subj="savedObjectsTable"] .euiBasicTable-loading is not displayed
[00:12:17]               │ debg TestSubjects.find(savedObjectsTable)
[00:12:17]               │ debg Find.findByCssSelector('[data-test-subj="savedObjectsTable"]') with timeout=10000
[00:12:27]               │ info Taking screenshot "/dev/shm/workspace/kibana/test/functional/screenshots/failure/saved objects management saved objects edition page allows to delete a saved object.png"
[00:12:27]               │ info Current URL is: http://localhost:6181/app/management/kibana/objects/savedDashboards/i-exist
[00:12:27]               │ info Saving page source to: /dev/shm/workspace/kibana/test/functional/failure_debug/html/saved objects management saved objects edition page allows to delete a saved object.html
[00:12:27]               └- ✖ fail: "saved objects management saved objects edition page allows to delete a saved object"
[00:12:27]               │

Stack Trace

{ TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="savedObjectsTable"])
Wait timed out after 10024ms
    at /dev/shm/workspace/kibana/node_modules/selenium-webdriver/lib/webdriver.js:842:17
    at process._tickCallback (internal/process/next_tick.js:68:7) name: 'TimeoutError', remoteStacktrace: '' }

Build metrics

✅ unchanged

History

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

@sebelga
Copy link
Contributor Author

sebelga commented Jul 7, 2020

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.

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.

Great catch, I will see if I can reproduce it and see where it comes from. 👍

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.

You're right this is a bit confusing. I will add a system and cloud managed badge, and be able to filter them all out (managed, cloud-managed and system)

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.

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.

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?

Good point. I will add it as a separate line below "Components" and give it the full width.

What do you think about including the Managed badge in details panel as well?

Great idea. But then I'll go ahead and add the "System" and "Cloud-managed" badge too.

@sebelga sebelga merged commit 053b922 into elastic:master Jul 7, 2020
@sebelga sebelga deleted the feature/composable-template-details-delete-3 branch July 7, 2020 07:58
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jul 7, 2020
* 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)
  ...
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jul 7, 2020
* 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)
  ...
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jul 7, 2020
* 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)
  ...
Copy link
Contributor

@jrodewig jrodewig left a 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!

Comment on lines +119 to +128
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={
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Didn't the tooltip show up on your side? There is one for each letter

Screenshot 2020-07-08 at 10 33 56

<EuiDescriptionListTitle data-test-subj="componentsTitle">
<FormattedMessage
id="xpack.idxMgmt.templateDetails.summaryTab.componentsDescriptionListTitle"
defaultMessage="Components"
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok. I will then update the creation flow to match this. I thought it was verbose to have "Component template" everywhere, but let's be consistent.

Screenshot 2020-07-08 at 10 36 37

Comment on lines +164 to +177
{/* 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>
</>
)}
Copy link
Contributor

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.

Copy link
Contributor Author

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"
Copy link
Contributor

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.',
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Index Management Index and index templates UI release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v7.9.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants