Adding Functionality to Delete Individual Positions via Web Interface

Verton24 days ago

Hello Traccar!

I’m running Traccar Server (version 6.6-alpine) in a Docker container with PostgreSQL as the database. I’d like to enhance the web interface to allow deleting individual position points directly, but I’m not sure how to proceed.

Here’s my current workflow:

I select a user in the web interface (my interface is in other language, so buttons names may be others).
In the user dialog, I click "Replay," choose a date, and hit "Show" to display the user’s GPS points on the map.
I click a specific point, which opens a dialog with a trash bin icon (delete), but it’s disabled.
Clicking "More Details" takes me to the position’s page (e.g., http://192.168.50.53:8082/position/56327).
To delete the point, I manually extract the ID (e.g., 56327) and run a SQL query in pgAdmin: DELETE FROM public.tc_positions WHERE id IN (56327);.

I’d love to streamline this by enabling the trash bin icon in the position dialog to delete the selected point directly from the web interface. Is there an existing setting to activate this, or do I need to modify the source code? If it’s the latter, could someone guide me on:

Which file(s) to edit in the traccar-web repository (e.g., the component handling the position dialog)?
How to implement the delete action (maybe via an API call to /api/positions)?
Steps to rebuild and integrate the modified web app into my Docker setup?

Any code examples or pointers would be greatly appreciated! Thanks in advance for your help.

Best regards, Verton.

Anton Tananaev23 days ago

Deleting individual positions is already implemented.

Verton23 days ago

Anton, thank you for reply.

But how to do it?
Trash bin icon in the position dialog window is not active.
trcr.png

Is there any documentation for this feature?
Maybe I need to adjust some settings to enable this feature?

Anton Tananaev23 days ago

It's not released yet.

Verton23 days ago

Ok, so back to my initial questions.

Which file(s) to edit in the traccar (or traccar-web) repository (e.g., the component handling the position dialog)?
How to implement the delete action (maybe via an API call to /api/positions)?
Steps to rebuild and integrate the modified web app into my Docker setup?

Any code examples or pointers would be greatly appreciated!
Give me a tip where to at least look, then I will figure it out.

Thanks in advance for your help!

Verton19 days ago

Any updates?
Maybe you can just show me where to start from?

Anton Tananaev19 days ago

Not sure what you mean by where to start. This is already implemented in master. You can just compile from source. We have documentation for that.

Verton19 days ago

Ok, so, please, could you focus me on related part of documentation?

Anton Tananaev19 days ago