-
Notifications
You must be signed in to change notification settings - Fork 25
feat: add error resolution ui #53
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
feat: add error resolution ui #53
Conversation
src/Resources/app/administration/src/core/service/api/swag-migration.api.service.ts
Show resolved
Hide resolved
7934044 to
787b1e1
Compare
787b1e1 to
d2efce6
Compare
72f605d to
bc33763
Compare
…or' into feat/add-error-resolution-ui
53a1fbf to
b335d35
Compare
b335d35 to
7b6c830
Compare
3f6d0dd to
ef8ff1c
Compare
…or' into feat/add-error-resolution-ui
...ag-migration-error-resolution-field/swag-migration-error-resolution-field-unhandled/index.ts
Outdated
Show resolved
Hide resolved
...omponent/swag-migration-error-resolution/swag-migration-error-resolution-log-filter/index.ts
Outdated
Show resolved
Hide resolved
...omponent/swag-migration-error-resolution/swag-migration-error-resolution-log-filter/index.ts
Show resolved
Hide resolved
MalteJanz
left a comment
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 not quite at the end 🙈 To be honest, there is quite a lot of frontend code in this PR and I'm wondering if we really need that much or can simplify stuff further.
I know some of it is needed, because we are also building a complex UI here, but there is also quite some code related to fetching and transforming data around.
...ion/component/swag-migration-error-resolution/swag-migration-error-resolution-modal/index.ts
Show resolved
Hide resolved
.../administration/src/module/swag-migration/service/swag-migration-error-resolution.service.ts
Outdated
Show resolved
Hide resolved
.../administration/src/module/swag-migration/service/swag-migration-error-resolution.service.ts
Outdated
Show resolved
Hide resolved
MalteJanz
left a comment
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.
Finally done with my code review, sorry that it took so long 😅 ✌️ .
And great job, this PR definitely wasn't a small task 💪 . Let's try to get it finally merged now, iterating further from that 🙂
...omponent/swag-migration-error-resolution/swag-migration-error-resolution-log-filter/index.ts
Outdated
Show resolved
Hide resolved
.../administration/src/module/swag-migration/service/swag-migration-error-resolution.service.ts
Outdated
Show resolved
Hide resolved
.../administration/src/module/swag-migration/service/swag-migration-error-resolution.service.ts
Outdated
Show resolved
Hide resolved
.../administration/src/module/swag-migration/service/swag-migration-error-resolution.service.ts
Outdated
Show resolved
Hide resolved
.../administration/src/module/swag-migration/service/swag-migration-error-resolution.service.ts
Outdated
Show resolved
Hide resolved
src/Resources/app/administration/src/module/swag-migration/snippet/de.json
Outdated
Show resolved
Hide resolved
src/Resources/app/administration/src/module/swag-migration/snippet/de.json
Outdated
Show resolved
Hide resolved
src/Resources/app/administration/src/module/swag-migration/snippet/de.json
Outdated
Show resolved
Hide resolved
src/Resources/app/administration/src/module/swag-migration/snippet/de.json
Outdated
Show resolved
Hide resolved
src/Resources/app/administration/src/module/swag-migration/snippet/en.json
Show resolved
Hide resolved
a05f7e7
into
feature/migration-logging-refactor
resolves #13015
related shopware/shopware#13587
Summary
Introduces the new ui to resolve user-fixable migration errors grouped by code/entity/field.
==> screen design
==> cloud version: settings > migration (please do not confirm "continue" 😄)
What changed
Note
Tests will follow in a seperate pr to make this not bigger as it already is (pr: #90)
Backend
src/Controller/HistoryControllerNew Endpoints:
GET
api/_action/migration/get-log-groups: Main endpoint to fetch grouped logs of the current migration run to resolve errors. It groups the logs by error code, entity name and field name. Also it gives the option to paginate, sort (by & direction) and filter the results by error code, status (resolved / unresolved), entity, and field name. Uses the newLogGroupingServicefor fetching the logs.POST
api/_action/migration/get-all-log-ids: For the error resolution modal I need a endpoint that gives me all Ids of logs groups by code, entity name and field name to select all logs of this group for bulck editing.src/Migration/History/LogGroupingServiceNew Service:
fixCountfor the ui where we display how many of the grouped errors have been resolved (e.g.12 / 500)levelCountsfor error type error/warning/info (e.g.Errors (12), Warning (30) ...)Administration
New components
swag-migration-error-resolution-step: Entry point for resolving migration issues. Lists grouped log items, offers filters and sorting, opens the resolution modalswag-migration-error-resolution-modal: Bulk resolution modal for selected group of errors. Lets the user choose a target log, input a fix value and create a fixswag-migration-error-resolution-details-modal: Shows the user the raw data of the logs convertedData and sourceData if availableswag-migration-error-resolution-log-filter: Filter panel for the main table. Provides code, enity, field and status select.swag-migration-error-resolution-field: Field wrapper that inspects the entity medadata to render the correct input type (subcomponents)swag-migration-error-resolution-field-relation: input for relation fields (to-one / to-many). User can either select one entity (id) or multipleswag-migration-error-resolution-field-scalar: input for scalar field (stirng / number / boolean / dates / json)swag-migration-error-resolution-field-unhandeled: fallback for unsuppoorted or unknown field types (e.g. if an unexpexted field got recognized and we have no metadata in the definitions for the field or the type of field is unsupported)New Service:
src/module/swag-migration/service/swag-migration-error-resolution.service.ts:Business logic for the error resolution with following responsibilities: