yeti
yeti copied to clipboard
mongoengine: remove references to deleted nodes
Description
Just need to delete a saved investigation as I was just testing.
Environment
| Question | Answer |
|---|---|
| Git commit | commit 27ae09f83b0165c36c78297708b4a2e75c9a2dad |
| OS version | Debian stretch |
| Browser | Chrome 57.0.2987.133 (64-bit) |
Steps to Reproduce
- Add new investigation via new malware
- Attempt to delete the test investigation
Expected behavior
To be able to remove the investication
Actual behavior
There's no button or link or anything that allows removing an investigation.
This should already be possible. When you go to the investigation page (not the graph - by clicking on the name of the investigation), you should have a red button "Delete":

Could you confirm this is the case ?
It is not...I do not have a delete button. After deleting the Malware, now I get an error: On Wed, 2017-04-05 at 04:17 -0700, Gael Muller wrote:
This should already be possible. When you go to the investigation page (not the graph - by clicking on the name of the investigation), you should have a red button "Delete":
Could you confirm this is the case ? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
More information. Is there a way I can just start over and delete everything?

We need to fix the fact that deleting a node breaks the investigation.
Since you cannot access the delete button, you can use the API to delete the investigation:
http -j DELETE http://YETI_URL/api/investigation/INVESTIGATION_ID
Or, directly in the mongo shell:
mongo
> use yeti
> db.investigation.remove({'_id': ObjectId('INVESTIGATION_ID')})
WriteResult({ "nRemoved" : 1 })
Thanks..I ended up just dropping the entire investigation table and readding it. On Thu, 2017-04-20 at 06:45 -0700, Gael Muller wrote:
We need to fix the fact that deleting a node breaks the investigation. Since you cannot access the delete button, you can use the API to delete the investigation: http -j DELETE http://YETI_URL/api/investigation/INVESTIGATION_ID Or, directly in the mongo shell: mongo
use yeti db.investigation.remove({'_id': ObjectId('INVESTIGATION_ID')}) WriteResult({ "nRemoved" : 1 }) — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
How can we go about this? Just delete the node and remove it from any investigations it's in?
this can be closed i think, this is solved now