Skip to content

Commit

Permalink
Merge pull request #2101 from akto-api-security/threat_detection_ui_m…
Browse files Browse the repository at this point in the history
…odifications

Fixing filters
  • Loading branch information
notshivansh authored Feb 14, 2025
2 parents 5cb8c1c + 158cfd8 commit e9323b8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function SusDataTable({ currDateRange, rowClicked }) {
apiCollectionName: collectionsMap[x.apiCollectionId] || "-",
discoveredTs: func.prettifyEpoch(x.timestamp),
sourceIPComponent: x?.ip || "-",
type: x?.type || "rule-based"
type: x?.type || (x?.filterId==="High4XXAlertFilter" ? "Anomaly-Based": "Rule-based")
};
});
setLoading(false);
Expand Down Expand Up @@ -158,6 +158,15 @@ function SusDataTable({ currDateRange, rowClicked }) {
title: "URL",
choices: urlChoices,
},
{
key: 'type',
label: "Type",
title: "Type",
choices: [
{label: 'Rule based', value: 'Rule-based'},
{label: 'Anomaly', value: 'Anomaly-based'},
],
}
];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ function ThreatActorTable({ data, currDateRange, rowClicked }) {
const actorIp = data.actor;
const url = data.latestApiEndpoint

const navigateUrl = window.location.origin + "/dashboard/protection/threat-activity?filters=actor__"+actorIp + "&url__" + url;
window.open(navigateUrl, "_blank")
const filters = `actor__${actorIp}&url__${url}`;
const navigateUrl = `${window.location.origin}/dashboard/protection/threat-activity?filters=${encodeURIComponent(filters)}`;
window.open(navigateUrl, "_blank");
}

async function fetchData(sortKey, sortOrder, skip) {
Expand Down

0 comments on commit e9323b8

Please sign in to comment.