Skip to content

Commit

Permalink
[MRG] Merge pull request #433 from dfir-iris/develop
Browse files Browse the repository at this point in the history
Fixes for v2.4.5
  • Loading branch information
whikernel authored Mar 18, 2024
2 parents d917288 + 80a9d48 commit b7478a6
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,26 @@ def upgrade():
tables = ['ioc', 'case_assets', 'case_received_file', 'case_tasks', 'notes', 'cases_events']
for table in tables:
if not _table_has_column(table, 'modification_history'):
op.add_column(table,
sa.Column('modification_history', sa.JSON)
)
t_ua = sa.Table(
table,
sa.MetaData(),
sa.Column('modification_history', sa.JSON)
)
conn = op.get_bind()
conn.execute(t_ua.update().values(
modification_history={}
))
try:
op.add_column(table,
sa.Column('modification_history', sa.JSON)
)
t_ua = sa.Table(
table,
sa.MetaData(),
sa.Column('modification_history', sa.JSON)
)
conn = op.get_bind()
conn.execute(t_ua.update().values(
modification_history={}
))

# Commit the transaction
conn.commit()

except Exception as e:
print(f"Error adding column to {table}: {e}")
continue
pass


Expand Down
2 changes: 1 addition & 1 deletion source/app/static/assets/js/iris/case.tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ $(document).ready(function(){
"data": "task_open_date",
"render": function (data, type, row, meta) {
if (type === 'display' && data != null) {
return render_date(data);
return formatTime(data);
}
return data;
}
Expand Down
4 changes: 2 additions & 2 deletions source/app/static/assets/js/iris/case.timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ function buildEvent(event_data, compact, comments_map, tree, tesk, tmb, idx, rea
</div>
</div>
<div class="collapsed" id="dropa_${evt.event_id}" data-toggle="collapse" data-target="#drop_${evt.event_id}" aria-expanded="false" aria-controls="drop_${evt.event_id}" role="button" style="cursor: pointer;">
<span class="text-muted text-sm float-left mb--2"><small>${render_date(evt.event_date, true)}</small></span>
<span class="text-muted text-sm float-left mb--2"><small>${formatTime(evt.event_date, { day: '2-digit', month: '2-digit', year: 'numeric', hour: '2-digit', minute: '2-digit', second: '2-digit'})}</small></span>
<a class="text-dark text-sm ml-3" href="${shared_link}" onclick="edit_event(${evt.event_id});return false;">${title_parsed}</a>
</div>
</div>
Expand Down Expand Up @@ -791,7 +791,7 @@ function buildEvent(event_data, compact, comments_map, tree, tesk, tmb, idx, rea
<div class="bottom-hour mt-2">
<div class="row">
<div class="col d-flex">
<span class="text-muted text-sm align-self-end float-left mb--2"><small class="bottom-hour-i"><i class="flaticon-stopwatch mr-2"></i>${formatTime(evt.event_date)}${ori_date}</small></span>
<span class="text-muted text-sm align-self-end float-left mb--2"><small class="bottom-hour-i"><i class="flaticon-stopwatch mr-2"></i>${formatTime(evt.event_date, { day: '2-digit', month: '2-digit', year: 'numeric', hour: '2-digit', minute: '2-digit', second: '2-digit'})}${ori_date}</small></span>
</div>
<div class="col">
Expand Down
2 changes: 1 addition & 1 deletion source/app/static/assets/js/iris/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ function load_case_activity(){
}

entry = `<li class="feed-item ${api_flag}" title='${sanitizeHTML(title)}'>
<time class="date" datetime="${js_data[index].activity_date}">${js_data[index].activity_date}</time>
<time class="date" datetime="${js_data[index].activity_date}">${formatTime(js_data[index].activity_date)}</time>
<span class="text">${sanitizeHTML(js_data[index].name)} - ${sanitizeHTML(js_data[index].activity_desc)}</span>
</li>`
$('#case_activities').append(entry);
Expand Down
2 changes: 1 addition & 1 deletion source/app/static/assets/js/iris/overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ let OverviewTable = $("#overview_table").DataTable({
"data": "open_date",
"render": function (data, type, row, meta) {
if (type === 'display' && data != null) {
data = sanitizeHTML(data);
data = formatTime(data, { day: '2-digit', month: '2-digit', year: 'numeric' });
}
return data;
}
Expand Down

0 comments on commit b7478a6

Please sign in to comment.