diff --git a/ui/app/scripts/controllers/admin/AdminCaseTemplatesCtrl.js b/ui/app/scripts/controllers/admin/AdminCaseTemplatesCtrl.js index 4d85ae349a..f5eb7d03a9 100644 --- a/ui/app/scripts/controllers/admin/AdminCaseTemplatesCtrl.js +++ b/ui/app/scripts/controllers/admin/AdminCaseTemplatesCtrl.js @@ -2,7 +2,7 @@ 'use strict'; angular.module('theHiveControllers').controller('AdminCaseTemplatesCtrl', - function($scope, $uibModal, TemplateSrv, NotificationSrv, UtilsSrv, ListSrv, MetricsCacheSrv, CustomFieldsCacheSrv) { + function($scope, $uibModal, TemplateSrv, NotificationSrv, UtilsSrv, ListSrv, MetricsCacheSrv, CustomFieldsCacheSrv, UserSrv, UserInfoSrv) { $scope.task = ''; $scope.tags = []; $scope.templates = []; @@ -11,6 +11,8 @@ $scope.templateCustomFields = []; $scope.templateIndex = -1; + $scope.getUserInfo = UserInfoSrv; + /** * Convert the template custom fields definition to a list of ordered field names * to be used for drag&drop sorting feature @@ -143,6 +145,9 @@ }, task: function() { return task; + }, + users: function() { + return UserSrv.list({status: 'Ok'}); } } }); @@ -232,9 +237,10 @@ }; }) - .controller('AdminCaseTemplateTasksCtrl', function($scope, $uibModalInstance, action, task) { + .controller('AdminCaseTemplateTasksCtrl', function($scope, $uibModalInstance, action, task, users) { $scope.task = task || {}; $scope.action = action; + $scope.users = users; $scope.cancel = function() { $uibModalInstance.dismiss(); diff --git a/ui/app/views/partials/admin/case-template/custom-fields.html b/ui/app/views/partials/admin/case-template/custom-fields.html new file mode 100644 index 0000000000..7ca3ee934f --- /dev/null +++ b/ui/app/views/partials/admin/case-template/custom-fields.html @@ -0,0 +1,42 @@ +

+ Custom fields ({{keys(template.customFields).length}}) + + + + Add custom field + + + + +

+ +
+
+
+ + + + + + + {{fields[m].name}} + + +  Delete + +
+
+

{{description}}

+

+ No description specified +

+
+
+
+
+ No custom fields have been added +
diff --git a/ui/app/views/partials/admin/case-template/details.html b/ui/app/views/partials/admin/case-template/details.html new file mode 100644 index 0000000000..6e7c948556 --- /dev/null +++ b/ui/app/views/partials/admin/case-template/details.html @@ -0,0 +1,57 @@ +

Case basic information

+
+ +
+ +

This name should be unique

+
+
+ +
+ +
+ +

This is used to prefix the case name

+
+
+
+ +
+ + + + +

This will be the default case severity

+
+
+
+ +
+ + + +

This will be the default case TLP

+
+
+
+ +
+ +

These will be the default case tags

+
+
+
+ +
+ +

The case description is required.

+
+
diff --git a/ui/app/views/partials/admin/case-template/metrics.html b/ui/app/views/partials/admin/case-template/metrics.html new file mode 100644 index 0000000000..51db83f29a --- /dev/null +++ b/ui/app/views/partials/admin/case-template/metrics.html @@ -0,0 +1,40 @@ +

+ Metrics ({{template.metricNames.length || 0}}) + + + + + Add metric + + + + +

+ +
+
+
+ + + + {{metrics[m].title}} + + +  Delete + +
+
+

{{description}}

+

+ No description specified +

+
+
+
+
+ No metrics have been added +
diff --git a/ui/app/views/partials/admin/case-template/tasks.html b/ui/app/views/partials/admin/case-template/tasks.html new file mode 100644 index 0000000000..a0815f46bf --- /dev/null +++ b/ui/app/views/partials/admin/case-template/tasks.html @@ -0,0 +1,39 @@ +

+ Tasks ({{template.tasks.length || 0}}) + + + Add task +

+
+
+
+ + + + + + + + + {{t.title}} + (Assigned to {{getUserInfo.get(t.owner) | getField:'name'}}) + + + +  Edit + + +  Delete + +
+
+

+

+ No description specified +

+
+
+
+
+ No tasks have been specified +
diff --git a/ui/app/views/partials/admin/case-templates.html b/ui/app/views/partials/admin/case-templates.html index 09c7060e93..4bf3174d93 100644 --- a/ui/app/views/partials/admin/case-templates.html +++ b/ui/app/views/partials/admin/case-templates.html @@ -6,10 +6,11 @@

Case template management

-
+ New template + -

Current templates

+

Current templates

diff --git a/ui/app/views/partials/admin/case-templates.task.html b/ui/app/views/partials/admin/case-templates.task.html index c77ed42eb5..662abd1426 100644 --- a/ui/app/views/partials/admin/case-templates.task.html +++ b/ui/app/views/partials/admin/case-templates.task.html @@ -9,7 +9,6 @@
-

This is the task name

@@ -17,7 +16,15 @@
-

This is the task description

+

Task's default description

+
+ + +
+ +
+