From fb78c1b6d7833bd8a905c3e88b2e06e6f7176204 Mon Sep 17 00:00:00 2001 From: Nabil Adouani Date: Wed, 12 Sep 2018 14:35:18 +0200 Subject: [PATCH] #124 Display PAP in analyzers and responders admin pages --- www/src/app/core/directives/tlp/tlp.directive.js | 13 ++++++++----- .../components/analyzers/analyzers-list.html | 12 ++++++++---- .../components/responders/responders-list.html | 12 ++++++++---- www/src/app/pages/jobs/components/job.details.html | 2 +- 4 files changed, 25 insertions(+), 14 deletions(-) diff --git a/www/src/app/core/directives/tlp/tlp.directive.js b/www/src/app/core/directives/tlp/tlp.directive.js index 247ad9793..642b38b8e 100644 --- a/www/src/app/core/directives/tlp/tlp.directive.js +++ b/www/src/app/core/directives/tlp/tlp.directive.js @@ -5,7 +5,7 @@ import _ from 'lodash/core'; import tpl from './tlp.html'; import './tlp.scss'; -export default function(app) { +export default function (app) { app.directive('tlp', tlp); function tlp(Tlps) { @@ -14,7 +14,8 @@ export default function(app) { return { templateUrl: tpl, scope: { - value: '=' + value: '=', + namespace: '@' }, replace: true, link: linkFn @@ -26,12 +27,14 @@ export default function(app) { scope.tlpClass = 'label-none'; scope.tlp = 'None'; } else { - const temp = (_.find(Tlps, { value: v }) || {}).key; + const temp = (_.find(Tlps, { + value: v + }) || {}).key; scope.tlpClass = `label-${(temp || '').toLowerCase()}`; - scope.tlp = `TLP:${temp}`; + scope.tlp = `${scope.namespace || 'TLP'}:${temp}`; } }); } } -} +} \ No newline at end of file diff --git a/www/src/app/pages/admin/organizations/components/analyzers/analyzers-list.html b/www/src/app/pages/admin/organizations/components/analyzers/analyzers-list.html index 4747c314a..7764ef11b 100644 --- a/www/src/app/pages/admin/organizations/components/analyzers/analyzers-list.html +++ b/www/src/app/pages/admin/organizations/components/analyzers/analyzers-list.html @@ -42,8 +42,9 @@

Analyzer
-
Max TLP
-
Rate Limit
+
Max TLP
+
Max PAP
+
Rate Limit
@@ -66,10 +67,13 @@

{{definition.description}}
-
+
-
+
+ +
+
{{$ctrl.activeAnalyzers[def].rate}} per {{$ctrl.activeAnalyzers[def].rateUnit}} diff --git a/www/src/app/pages/admin/organizations/components/responders/responders-list.html b/www/src/app/pages/admin/organizations/components/responders/responders-list.html index 9d5207dbb..ca8bc39a0 100644 --- a/www/src/app/pages/admin/organizations/components/responders/responders-list.html +++ b/www/src/app/pages/admin/organizations/components/responders/responders-list.html @@ -47,8 +47,9 @@

Responders
-
Max TLP
-
Rate Limit
+
Max TLP
+
Max PAP
+
Rate Limit
@@ -70,10 +71,13 @@

{{definition.description}}
-
+
-
+
+ +
+
{{$ctrl.activeResponders[def].rate}} per {{$ctrl.activeResponders[def].rateUnit}} diff --git a/www/src/app/pages/jobs/components/job.details.html b/www/src/app/pages/jobs/components/job.details.html index c46acb089..75674573c 100644 --- a/www/src/app/pages/jobs/components/job.details.html +++ b/www/src/app/pages/jobs/components/job.details.html @@ -31,7 +31,7 @@ PAP

- +