Adding Buttons to the interface

I created the Canopy Height Model using the dsm and dtm that was downloaded from webodm… now i wanted to add a button as shown below:

Just like the View 3D Model leads to Map View Screen, i want the button to run a (say sh file i use to process CHM). Inside TaskListItem.jsx, I added the button. But I dont know where the View 3D Model button gets its href from as below:

addActionButton(" View 3D Model", “btn-primary”, “fa fa-cube”, () => {
location.href = /3d/project/${task.project}/task/${task.id}/;
});

Is it possible to run our own link of html on clickEvent of this button?

Hey @bipulneupane that path is defined here https://github.com/OpenDroneMap/WebODM/blob/master/app/urls.py#L14 and loads a Django view.

IMO a better approach in this case however would be to create an API endpoint in https://github.com/OpenDroneMap/WebODM/blob/master/app/api/tasks.py#L62 and then use an AJAX call to do the processing.

http://docs.webodm.org/#task
http://www.django-rest-framework.org/