Show the correct status of the artefact deletion in DLM
When the user deletes one or more artefact(s) in the DLM, currently the "red trashbin" icon is shown next to the artefact menu whatever the HTTP return status:
-
In case of success, the NSI WS returns code 200 ("OK") and more details in the response body's "ErrorMessage" tag.
<?xml version="1.0" encoding="utf-8"?> <message:Error xmlns:common="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/common" xmlns:message="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/message"> <message:ErrorMessage code="200"> <common:Text xml:lang="en">Deleted : Codelist OECD:CL_JENS (v1.0). Deleted artefact</common:Text> </message:ErrorMessage> </message:Error>
-
In case of failure, the NSI WS returns code 409 ("Conflict") and failure explanations in the response body's "ErrorMessage" tag.
<?xml version="1.0" encoding="utf-8"?> <message:Error xmlns:common="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/common" xmlns:message="http://www.sdmx.org/resources/sdmxml/schemas/v2_1/message"> <message:ErrorMessage code="160"> <common:Text xml:lang="en">Not Deleted : Data Structure Definition OECD.EDU:EDU_NEAC (v2.0), because it is being used by : - Dataflow OECD.EDU:EDU_NEAC@EAG_ATTAINMENT (v2.0) - Dataflow OECD.EDU:EDU_NEAC@EAG_LFS (v2.0)</common:Text> </message:ErrorMessage> </message:Error>
Instead of showing this status-independent "red trashbin" icon, the DLM should behave as follow (using the below examples as text templates):
-
when delete is successful for the/some/all artefact(s):
° remove the item(s) from the list, but show a popup indicating that the delete(s) was/were successful and add the (concatenated) ErrorMessage(s) content for information:
-
when delete is not successful for the/some/all artefact(s):
° display a red crossed bin icon like [MUI-icon: DeleteForever] next to (each) concerned artefact action menu with a mouse-over popup allowing to see again the error message, e.g.:
Notes:
Popups for successful deletions only close when the users clicks on its "close" icon or when the user does any other action in the DLM.