-
Notifications
You must be signed in to change notification settings - Fork 148
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
base: master
Are you sure you want to change the base?
Conversation
Unimplemented features: 1. Permissions for view 2. Download button 3. Mermaid 4. Separation by Data store 5. JavaDocs 6. Locales
2. Locales creation is completed (need to check) 3. DataStore verification has been completed, no edits are required.
2. Displaying system entities ability has been added 3. Is nullable, Is mandatory fields has been centered 4. Similar to Base64 algorithm encoding for PlantUML has been added
…ng filter filed input (need to discuss) 2. Search by like 3. RegExp support for search 4. Displaying intermediate tables for many-to-many relationships (LINKED_TABLE.LINKED_COLUMN) 5. Timeouts for ping diagram server
|
Known issues:
|
|
|
||
| io.jmix.datatools.datamodel.app/EngineType=Engine type | ||
| io.jmix.datatools.datamodel.app/EngineType.MERMAID=Mermaid | ||
| io.jmix.datatools.datamodel.app/EngineType.PLANTUML=Plantuml |
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.
Looks like it's called PlantUML
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.
Done
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.
Is it?
| io.jmix.datatools.datamodel.entity/AttributeModel=Модель атрибутов | ||
| io.jmix.datatools.datamodel.entity/AttributeModel.attributeName=Название атрибута | ||
| io.jmix.datatools.datamodel.entity/AttributeModel.columnName=Название колонки | ||
| io.jmix.datatools.datamodel.entity/AttributeModel.dbType=БД тип |
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.
Тип БД
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.
Done
| io.jmix.datatools.datamodel.entity/AttributeModel.javaType=Java тип | ||
|
|
||
| io.jmix.datatools.datamodel.entity/EntityModel.attributes=Атрибуты | ||
| io.jmix.datatools.datamodel.entity/EntityModel.id=Идентификатор |
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.
Usually, ID doesn't require translation.
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.
Done
| io.jmix.datatools.datamodel.entity/AttributeModel.dbType=БД тип | ||
| io.jmix.datatools.datamodel.entity/AttributeModel.id=Идентификатор | ||
| io.jmix.datatools.datamodel.entity/AttributeModel.isMandatory=Обязательный? | ||
| io.jmix.datatools.datamodel.entity/AttributeModel.isNullable=Нулевой? |
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.
Any other options for translation?
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.
Done
| * limitations under the License. | ||
| */ | ||
|
|
||
| @NonNullApi |
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.
No need for entity package, because you can get/set nulls for any attribute.
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.
Done
| } | ||
|
|
||
| dataModelManager.setFilteredModels(entityModelsDl.getContainer().getItems()); | ||
| UI.getCurrent().getPage().open("datatl/data-diagram"); |
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.
- Add a comment, that you use
UI.getCurrent().getPage().openintentionally to open a new browser tab. - May need some
delegatehere so that a TabbedMode can open a new application tab instead.
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.
As for the DataTools add-on, everything is ready. All that remains is to implement mutual support from the private repository.
| try { | ||
| pattern = Pattern.compile(userInput, Pattern.CASE_INSENSITIVE); | ||
| } catch (PatternSyntaxException pse) { | ||
| entityNameFilter.setErrorMessage("Regular expression syntax is invalid"); |
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.
MUST be a localized message!
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.
Done
|
|
||
| protected void applyLoadContextWithFiltering(List<String> findedEntityNames) { | ||
| if (findedEntityNames.isEmpty()) { | ||
| entityNameFilter.setErrorMessage("Entities not found"); |
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.
MUST be a localized message!
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.
Done
| @@ -0,0 +1,75 @@ | |||
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | |||
| <view xmlns="http://jmix.io/schema/flowui/view" | |||
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.
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.
Done
| <layout alignItems="STRETCH" | ||
| expand="contentBox" | ||
| classNames="jmix-data-model-list-view-layout"> | ||
| <hbox id="buttonsPanel" classNames="buttons-panel"> |
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.
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.
Done
2. Flex-grow has been fixed
… of the search button
…ould appear when rendering a diagram
|
|
||
| io.jmix.datatools.datamodel.app/EngineType=Engine type | ||
| io.jmix.datatools.datamodel.app/EngineType.MERMAID=Mermaid | ||
| io.jmix.datatools.datamodel.app/EngineType.PLANTUML=Plantuml |
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.
Is it?
| * in a Base64-like format for further sending as a URL parameter | ||
| */ | ||
| public interface TransferProgressNotifier { | ||
| public interface PlantUMLEncoder { |
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.
PlantUmlEncoder
|
|
||
| Registration addTransferProgressListener(TransferProgressListener listener); | ||
| /** | ||
| * Provides encoding in a base64-like format |
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.
Format JavaDoc (everywhere).
- Missing blank line before params
- Missing dots
See: https://www.oracle.com/technical-resources/articles/java/javadoc-tool.html
| * limitations under the License. | ||
| */ | ||
|
|
||
| @Internal |
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.
Internal looks redundunt.
|
|
||
| import java.nio.charset.StandardCharsets; | ||
|
|
||
| public class PlantUMLEncoderImpl implements PlantUMLEncoder { |
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.
PlantUmlEncoderImpl
| } | ||
|
|
||
| @Subscribe("entityModelsDataGrid") | ||
| public void onEntityModelsDataGridItemClick(final ItemClickEvent<EntityModel> event) { |
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.
DataGrid provides the Selection listener. You must use it instead. Currently removing selection doesn't clear attributes
| } | ||
| } | ||
|
|
||
| private class EntityNameUrlQueryParametersBinder extends AbstractUrlQueryParametersBinder { |
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.
System checkbox also must be included into URL query params
| @Subscribe | ||
| public void onInit(final InitEvent event) { | ||
| entityNameFilterQueryParameters.registerBinder(new EntityNameUrlQueryParametersBinder()); | ||
| setDataStoreNames(); |
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.
dataStoreNames can be initialized in the load delegate, before they are used
| } | ||
|
|
||
| @Subscribe("entityNameFilter") | ||
| public void onEntityNameFilterComponentValueChange(final AbstractField.ComponentValueChangeEvent<TypedTextField<String>, String> event) { |
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.
- It's better to subscribe to `TypedValueChange``
Strings.isNullOrEmpty(event.getValue())
| protected void initEntityNameFilterTooltip() { | ||
| JmixButton helperButton = createHelperButton(); | ||
| Tooltip tooltip = entityNameFilter.getTooltip(); | ||
| helperButton.addClickListener(e -> tooltip.setOpened(!tooltip.isOpened())); |
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.
Still unclear why we handle button clicks if tooltip is shown by hover


See: #4739