mirror of
https://github.com/valitydev/Cortex-Analyzers.git
synced 2024-11-06 00:55:17 +00:00
small fix to render category name in templates
This commit is contained in:
parent
a47a060763
commit
944afb608d
@ -62,9 +62,12 @@ class AbuseIPDBAnalyzer(Analyzer):
|
||||
if 'reports' in response["data"]:
|
||||
categories_strings = []
|
||||
for item in response["data"]["reports"]:
|
||||
item['categories_strings'] = []
|
||||
for category in item["categories"]:
|
||||
if self.extract_abuse_ipdb_category(category) not in categories_strings:
|
||||
categories_strings.append(self.extract_abuse_ipdb_category(category))
|
||||
category_as_str = self.extract_abuse_ipdb_category(category)
|
||||
item['categories_strings'].append(category_as_str)
|
||||
if category_as_str not in categories_strings:
|
||||
categories_strings.append(category_as_str)
|
||||
response['categories_strings'] = categories_strings
|
||||
|
||||
self.report({'values': response_list})
|
||||
|
@ -12,7 +12,6 @@
|
||||
<th>Country</th>
|
||||
<th>Whitelisted</th>
|
||||
<th>Categories</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -24,9 +23,8 @@
|
||||
<td>{{r.reporterCountryName}}</td>
|
||||
<td>{{content.values[0].data.isWhitelisted}}</td>
|
||||
<td>
|
||||
<span ng-repeat="c in r.categories"><span class="label label-primary">{{c}}</span> </span>
|
||||
<span ng-repeat="c in r.categories_strings"><span class="label label-primary">{{c}}</span> </span>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
Loading…
Reference in New Issue
Block a user