[Cases] Add Generic Page attachment type for cases#224308
[Cases] Add Generic Page attachment type for cases#224308dominiqueclarke wants to merge 27 commits intoelastic:mainfrom
Conversation
…ke/kibana into feat/cases-link-attachment
…ke/kibana into feat/cases-link-attachment
|
/ci |
|
/ci |
|
/ci |
|
/ci |
|
/ci |
…ke/kibana into feat/cases-page-attachment
|
/ci |
1 similar comment
|
/ci |
4d3ada9 to
d81aec3
Compare
|
/ci |
|
/ci |
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
async chunk count
ESLint disabled line counts
References to deprecated APIs
Total ESLint disabled count
History
|
|
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
| security, | ||
| userProfile, | ||
| }: GetCurrentUserProfileArgs): Promise<UserProfile> => { | ||
| return security.userProfiles.getCurrent({ dataPath: 'avatar' }); |
There was a problem hiding this comment.
I was getting a reference error when developing against security, and security.userProfiles was marked as deprecated with the suggestion to use userProfile instead.
| </Routes> | ||
| </HashRouter> | ||
| </DashboardMountContext.Provider> | ||
| <KibanaContextProvider |
There was a problem hiding this comment.
Needed to render the Add to Case modal
| "dataViewEditor", | ||
| "alerting", | ||
| "actions", | ||
| "dashboard", |
There was a problem hiding this comment.
@dominiqueclarke Are we sure about this? I checked when this dependency was introduced and looks like it was introduced here
There was a problem hiding this comment.
I checked with the Triggers Action team to confirm it's not in use. It was previously in use, but then some refactoring happened that removed the need for the dependency, but they forgot to remove it.
There was a problem hiding this comment.
That's good news, because I faced a cycle dependency issue when I tried to add the cases plugin as a dependency of the dashboard plugin as part of this issue.
| const attachmentViewProps: PersistableStateAttachmentViewProps<PageAttachmentPersistedState> = { | ||
| persistableStateAttachmentTypeId: PAGE_ATTACHMENT_TYPE, | ||
| persistableStateAttachmentState: { | ||
| pathname: '/test/path', |
There was a problem hiding this comment.
Why pathname is not part of url?
| persistableStateAttachmentState: { | ||
| pathname: '/test/path', | ||
| type: PAGE_ATTACHMENT_TYPE, | ||
| url: { |
There was a problem hiding this comment.
should we handle external url or is it only kibana link?
|
Closed in favor of #225295 |
Summary
This PR defines a generic "page" attachment type which can be used to attach any page in Kibana to a case.
This PR defines the base schema, with more features to be developed in the future.
Overview
The goal is to create an attachment type that is generic enough to use across Kibana, but useful enough to facilitate meaningful analysis during an investigation. As part of the goal, we are targeting the following features as part of the attachment.
Only bullet point 1 is included in this PR.
Background
This idea originally spawned from a desire to develop a Dashboard link attachment type. As we considered the Dashboards use-case, we wanted to expand to allow our attachment to support any link. Further, as we considered the value of this attachment type, we wanted to enrich the link with more helpful information such as a screenshot, screen context, and summary.
Because this idea spawned from a Dashboard link, Dashboards is the first place we implemented this. However, if the Dashboard team is not satisfied with the UX or dev implementation, we are happy to remove this feature for now in favor or merging just the attachment schema.
Technical details
internal_attachmentsfolder, alongside the new page attachment (Source of a lot of file changessecurity.userProfilesforuserProfile. (Also a large source of file changes)Testing
Appendix