-
Notifications
You must be signed in to change notification settings - Fork 147
Data model visualization #4739 #5004
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
Closed
Closed
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
f1a4e07
Data model visualization task completed.
2984df4
1. Download button has been removed
20536ba
1. Facets implementing has been started
e1d7f61
1. UrlQueryParameter facet has been implemented with details for savi…
2c98305
1. Details has been removed from View
8d9444d
Implement all changes except the tabbed mode delegate and the removal…
182e619
Changing the logic of determining of entity systemicity
cd9dfe4
Tabbed mod 1/2 support has been added
2b83c5f
Fix for a potential bug when working with multiple dataStore s that c…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
...atools-flowui/src/main/java/io/jmix/datatoolsflowui/view/datadiagram/DataDiagramView.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| package io.jmix.datatoolsflowui.view.datadiagram; | ||
|
|
||
| import com.vaadin.flow.router.Route; | ||
| import com.vaadin.flow.server.streams.DownloadHandler; | ||
| import com.vaadin.flow.server.streams.DownloadResponse; | ||
| import io.jmix.datatools.datamodel.DataModelSupport; | ||
| import io.jmix.flowui.component.image.JmixImage; | ||
| import io.jmix.flowui.view.*; | ||
| import org.springframework.beans.factory.annotation.Autowired; | ||
|
|
||
| import java.io.ByteArrayInputStream; | ||
|
|
||
| @Route(value = "datatl/data-diagram", layout = DefaultMainViewParent.class) | ||
| @ViewController(id = "datatl_dataDiagramView") | ||
| @ViewDescriptor(path = "data-diagram-view.xml") | ||
| public class DataDiagramView extends StandardView { | ||
|
|
||
| @Autowired | ||
| protected DataModelSupport dataModelSupport; | ||
|
|
||
| @ViewComponent | ||
| private JmixImage<Object> diagramImage; | ||
|
|
||
| @Subscribe | ||
| public void onBeforeShow(final BeforeShowEvent event) { | ||
| generateDiagram(); | ||
| } | ||
|
|
||
| public void generateDiagram() { | ||
| // hack to passing filtered entities list to this view that open in a neighboring tab | ||
| byte[] rawResult = dataModelSupport.filteredModelsCount() == dataModelSupport.getDataModelProvider().modelsCount() | ||
| ? dataModelSupport.generateDiagram() | ||
| : dataModelSupport.generateFilteredDiagram(); | ||
|
|
||
| DownloadHandler downloadHandler = DownloadHandler.fromInputStream(e -> | ||
| new DownloadResponse( | ||
| new ByteArrayInputStream(rawResult), | ||
| "data-model-er-diagram.png", | ||
| null, | ||
| rawResult.length)); | ||
|
|
||
| diagramImage.setSrc(downloadHandler); | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
You cannot directly mention bean from another module. Also, it doesn't prevent this bean creation if a user creates a bean with another name