Skip to content

Commit

Permalink
Merge pull request #2046 from akto-api-security/hotfix/severity_change
Browse files Browse the repository at this point in the history
Revert severity colors
  • Loading branch information
notshivansh authored Feb 3, 2025
2 parents 9202c30 + 218ca2a commit 2432664
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@
}

.badge-wrapper-HIGH .Polaris-Badge {
background-color: #FA6156 !important;
color: #FFFBFB !important;
background-color: #FED3D1 !important;
color: #202223 !important;
font-weight: 550 !important;
}

Expand All @@ -217,7 +217,7 @@
}

.badge-wrapper-LOW .Polaris-Badge {
background-color: #A4E8F2;
background-color: #E4E5E7;
color: #202223 !important;
font-weight: 550 !important;
}
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ const convertToDataTypesData = (type, collectionsMap, countMap, subtypeToApiColl
avatarComp: <Thumbnail source={iconSource} size="small" />,
priorityVal: priorityText.length > 1 ? severityOrder[priorityText] : 0,
priorityText: priorityText,
priorityComp: priorityText.length > 1 ? <Badge status={transform.getColor(priorityText, true)}>{func.toSentenceCase(priorityText)}</Badge> : "-",
priorityComp: priorityText.length > 1 ?
<div key={type.name} className={`badge-wrapper-${priorityText}`}>
<Badge status={func.getHexColorForSeverity(priorityText)}>{func.toSentenceCase(priorityText)}</Badge>
</div> : "-",
categoriesArr: categoriesList,
categoryComp: categoriesList.length > 0 ? (
<ShowListInBadge
Expand Down Expand Up @@ -187,7 +190,7 @@ function AllSensitiveData() {
const convertToGraphData = (severityMap) => {
let dataArr = []
Object.keys(severityMap).forEach((x) => {
const color = transform.getColorForSensitiveData(x)
const color = func.getHexColorForSeverity(x)
let text = func.toSentenceCase(x)
const value = severityMap[x]
dataArr.push({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ const reportTransform = {
},
"High": {
"text": countMap.HIGH || 0,
"color": "#EF864C",
"color": func.getHexColorForSeverity("HIGH"),
"filterKey": "High"
},
"Medium": {
"text": countMap.MEDIUM || 0,
"color": "#F6C564",
"color": func.getHexColorForSeverity("MEDIUM"),
"filterKey": "Medium"
},
"Low": {
"text": countMap.LOW || 0,
"color": "#6FD1A6",
"color": func.getHexColorForSeverity("LOW"),
"filterKey": "Low"
}
}
Expand Down
6 changes: 3 additions & 3 deletions apps/dashboard/web/polaris_web/web/src/util/func.js
Original file line number Diff line number Diff line change
Expand Up @@ -1336,13 +1336,13 @@ mapCollectionIdToHostName(apiCollections){
case "CRITICAL":
return "#DF2909"
case "HIGH":
return "#FA6156"
return "#FED3D1"
case "MEDIUM":
return "#FFD79D"
case "LOW":
return "#A4E8F2"
return "#E4E5E7"
default:
return "#A4E8F2"
return "#E4E5E7"
}

},
Expand Down

0 comments on commit 2432664

Please sign in to comment.