Skip to content

Commit

Permalink
timeliner wip + dask logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Davide Arcuri committed Jan 19, 2024
1 parent 7267545 commit fcd59a1
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
## Changelog

<details open>
<summary><b>OROCHI 2.0.2 [WIP]</b></summary>

* Paginate analysis results in tree
</details>

<details>
<summary><b>OROCHI 2.0.1 [2024/01/18]</b></summary>

* Add tree visualization for other plugin
Expand Down
4 changes: 4 additions & 0 deletions compose/local/dask/daskworkerinit.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import logging
import os
import sys

import django

logger = logging.getLogger("distributed.utils_perf")
logger.setLevel(logging.ERROR)

os.environ["DATABASE_URL"] = "postgres://{}:{}@{}:{}/{}".format(
os.environ["POSTGRES_USER"],
os.environ["POSTGRES_PASSWORD"],
Expand Down
13 changes: 13 additions & 0 deletions orochi/website/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,18 +618,31 @@ def analysis(request):
elif res.result == RESULT_STATUS_SUCCESS:
try:
index = f"{res.dump.index}_{res.plugin.name.lower()}"

# GET COLUMNS FROM ELASTIC
mappings = es_client.indices.get_mapping(index=index)
columns = [
x
for x in mappings[index]["mappings"]["properties"]
if x not in SYSTEM_COLUMNS
]

# IF PLUGIN HAS REPORT SHOW REPORT COLUMN
if (
res.plugin.vt_check
or res.plugin.regipy_check
or res.plugin.clamav_check
):
columns += ["reports"]

# TIMELINER HAS SOME CUSTOM RENDERED COLUMS
if res.plugin.name.lower() == "timeliner.timeliner":
columns += ["Date", "Type", "row_color"]
columns = [
x for x in columns if x not in COLOR_TIMELINER.keys()
]

# DEFAULT COLUMN ADDED
columns += ["hashes", "color", "actions"]
except elasticsearch.NotFoundError:
continue
Expand Down
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.0.1"
__version__ = "2.0.2"

0 comments on commit fcd59a1

Please sign in to comment.