Feature #1015
closed
Content with result codes
Added by Radek Tomiška almost 7 years ago.
Updated over 6 years ago.
Description
Each module can contain result codes (e.g. 'CoreResultCode'). Codes are localized on FE and used through the app.
Create content (page) with list of codes on FE:
- expose new GET endpoint in 'ModuleController' - <server>/modules/{moduleId}/result-codes. Available under 'MODULE_READ' permission
- create new link in 'Documentation' column in BE modules table (Setting > Modules > Modules (backend) ) - 'Result codes'
- after link is clicked, then modal or new content will be shown with localized module's result codes in the 'Basic.Table'. Columns - status (number), code, message (flash message can be used). Table will be sorted by status number and then by code. Filter by code can be added (optional).
- Check result codes localization and add localization, if missing.
- Description updated (diff)
- Status changed from New to In Progress
Implementation in branch rkucera/1015-modules-result-codes
New endpoint on backend which is returning list of result codes for module by moduleId.
On frontend I implemented modal window which show result codes for each modul. It's a button in documentation column on be-modules tab as Radek wrote. Probably will be better use some kind of link or diffrent style of button, I am not sure that current solution fit into design :)
Need to implement sorting by status number and then by code.
- % Done changed from 0 to 80
Implemented default sorting by code number a then by code. Modal window contains filter by code and whole implementation is in separate file.
On BE I edited previously created endpoint, so now it accepts searchparameters which is for filtering.
I have only one issue with design of the modal window, I am using large version of modal but still is to small, because code and message columns are large. Solution will be probably limit the column width for some of them.
- Status changed from In Progress to Needs feedback
- Assignee changed from Roman Kučera to Radek Tomiška
Added localization for result codes. Remove some duplicate localization on core module which I found.
Design of modal window is fixed to. When all messages is loaded from localization the flash message automatically fit in column.
I should probably write documentation how to support result codes in module (override method in SomemoduleModuleDescriptor.java otherwise endpoint will return empty list for modul)
- Status changed from Needs feedback to In Progress
- Assignee changed from Radek Tomiška to Roman Kučera
- Target version set to Jade (8.1.0)
- % Done changed from 80 to 90
This feature is really nice, it works and code looks nice. I did test, review and refactoring:
- change filter to text
- change design - using OperationResult component
- 'module' variable was removed - it's keyword for javascript, so just for sure
- close button added to modal detail
- FE component api was simplified
I merged it into develop. Could you add integration tests and documentation (idea with developer tutorial is great.)). Then this ticket can be closed.
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
- Related to Defect #1754: Parameters are not propagate to flash messages added
Also available in: Atom
PDF