Conversation
💚 Build Succeeded |
|
Pinging @elastic/kibana-app |
💔 Build Failed |
|
@kertal Changes can be reviewed, but I'm planning to clean up the naming a bit tomorrow. |
💚 Build Succeeded |
💚 Build Succeeded |
kertal
left a comment
There was a problem hiding this comment.
Code LGTM 🏆 , added just tiny remarks and ideas as comments
x-pack/legacy/plugins/graph/public/components/graph_listing.tsx
Outdated
Show resolved
Hide resolved
| export interface SerializedField extends Omit<WorkspaceField, 'icon'> { | ||
| iconClass: string; | ||
| } | ||
|
|
There was a problem hiding this comment.
Just an idea for future simplification: you could just use 1 interface for SerializedTemplate|UrlTemplate, SerializedField|WorkspaceField, by e.g. using a helper function for settings the encoder or icon when needed, so no assignment when deserializing would be necessary.
| export type WorkspaceOptions = Partial<{ | ||
| indexName: string; | ||
| vertex_fields: WorkspaceField[]; | ||
| nodeLabeller: (newNodes: WorkspaceNode[]) => void; |
There was a problem hiding this comment.
When continue with refactoring the code nodeLabeller could be renamed to 'nodeLabeler' and vertex_fields -> vertextFields
| * Flatten grouped nodes and return a flat array of nodes | ||
| * @param nodes List of nodes probably containing grouped nodes | ||
| */ | ||
| returnUnpackedGroupeds(nodes: WorkspaceNode[]): WorkspaceNode[]; |
There was a problem hiding this comment.
Out of scope, but just a note for future refactoring, I think
returnUnpackedGroupeds -> returnUnpackedGroupeds
💚 Build Succeeded |
…-to-np-ready * 'master' of github.com:elastic/kibana: Upgrade EUI to 13.8.1 (elastic#45052) [ML] Add multi metric job wizard test (elastic#45279) [SIEM] Inject/apply KQL changed in refresh button (elastic#45065) [Graph] Type persistence (elastic#44985) Functional tests: convert more test/services to TS (elastic#45176)
…ditor * 'master' of github.com:elastic/kibana: (76 commits) Upgrade EUI to 13.8.1 (elastic#45052) [ML] Add multi metric job wizard test (elastic#45279) [SIEM] Inject/apply KQL changed in refresh button (elastic#45065) [Graph] Type persistence (elastic#44985) Functional tests: convert more test/services to TS (elastic#45176) [ML] Fixes display of matching modules in index data visualizer (elastic#45261) [Console] Update indentation behaviour (elastic#45249) Convert value provided to PhraseValueInput to string to catch Exception (elastic#45259) [Region Map] Fix loading default vector map and base layer setting (elastic#43858) [ML] Fixing empty time range when cloning jobs (elastic#45286) [ML] Fixing wizard validation delay (elastic#45265) [Logs UI] Interpret finished analysis jobs as healthy (elastic#45268) [Console] SQL template with triple quote in completion (elastic#45248) [ML] Data Frames: Cards as links (elastic#45254) fix(code/frontend): should show updating instead of cloning when updating (elastic#45238) fix(code/frontend): fix document search result from (elastic#45236) disable another flaky suite (elastic#45323) (elastic#45330) disable flaky suite (elastic#45105) skip flaky suite (elastic#43069) skip flaky suite (elastic#45089) ...
Summary
Move logic to load and save workspaces to typescript and provide types for persisted and runtime business objects.
This PR shouldn't change any functionality. It's a preparation to move over the UI elements of the Graph bar to React.
Some types has been carried over from #44587 because they are also needed here.
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers