mirror of https://github.com/MISP/MISP
chg: [internal] Move field description to controller
parent
d6c0514644
commit
67b393ea7b
|
@ -2501,15 +2501,31 @@ class EventsController extends AppController
|
|||
foreach ($distributionLevels as $key => $value) {
|
||||
$fieldDesc['distribution'][$key] = $this->Event->distributionDescriptions[$key]['formdesc'];
|
||||
}
|
||||
$debugOptions = $this->Event->debugOptions;
|
||||
|
||||
$debugOptions = [
|
||||
0 => __('Standard debugging'),
|
||||
1 => __('Advanced debugging'),
|
||||
];
|
||||
$debugDescriptions = [
|
||||
0 => __('The critical errors are logged in the usual log file.'),
|
||||
1 => __('All the errors and warnings are logged in the usual log file.'),
|
||||
];
|
||||
$galaxiesOptions = [
|
||||
0 => __('As MISP standard format'),
|
||||
1 => __('As tag names'),
|
||||
];
|
||||
$galaxiesOptionsDescriptions = [
|
||||
0 => __('Galaxies and Clusters are passed as MISP standard format. New generic Galaxies and Clusters are created when there is no match with existing ones.'),
|
||||
1 => __('Galaxies are passed as tags and there is only a simple search with existing galaxy tag names.'),
|
||||
];
|
||||
|
||||
$this->set('debugOptions', $debugOptions);
|
||||
foreach ($debugOptions as $key => $value) {
|
||||
$fieldDesc['debug'][$key] = $this->Event->debugDescriptions[$key];
|
||||
$fieldDesc['debug'][$key] = $debugDescriptions[$key];
|
||||
}
|
||||
$galaxiesOptions = $this->Event->galaxiesOptions;
|
||||
$this->set('galaxiesOptions', $galaxiesOptions);
|
||||
foreach ($galaxiesOptions as $key => $value) {
|
||||
$fieldDesc['galaxies_handling'][$key] = $this->Event->galaxiesOptionsDescriptions[$key];
|
||||
$fieldDesc['galaxies_handling'][$key] = $galaxiesOptionsDescriptions[$key];
|
||||
}
|
||||
$this->set('sharingGroups', $sgs);
|
||||
$this->set('fieldDesc', $fieldDesc);
|
||||
|
|
|
@ -63,11 +63,6 @@ class Event extends AppModel
|
|||
2 => array('desc' => '*Complete* means that the event\'s creation is complete', 'formdesc' => 'The event creator considers the analysis complete')
|
||||
);
|
||||
|
||||
public $debugDescriptions = array(
|
||||
0 => 'The critical errors are logged in the usual log file.',
|
||||
1 => 'All the errors and warnings are logged in the usual log file.'
|
||||
);
|
||||
|
||||
public $distributionDescriptions = [
|
||||
self::DISTRIBUTION_ORGANISATION => [
|
||||
'desc' => 'This field determines the current distribution of the event',
|
||||
|
@ -91,16 +86,6 @@ class Event extends AppModel
|
|||
],
|
||||
];
|
||||
|
||||
public $galaxiesOptionsDescriptions = array(
|
||||
0 => 'Galaxies and Clusters are passed as MISP standard format. New generic Galaxies and Clusters are created when there is no match with existing ones.',
|
||||
1 => 'Galaxies are passed as tags and there is only a simple search with existing galaxy tag names.'
|
||||
);
|
||||
|
||||
public $debugOptions = array(
|
||||
0 => 'Standard debugging',
|
||||
1 => 'Advanced debugging'
|
||||
);
|
||||
|
||||
public $distributionLevels = [
|
||||
self::DISTRIBUTION_ORGANISATION => 'Your organisation only',
|
||||
self::DISTRIBUTION_COMMUNITY => 'This community only',
|
||||
|
@ -109,11 +94,6 @@ class Event extends AppModel
|
|||
self::DISTRIBUTION_SHARING_GROUP => 'Sharing group',
|
||||
];
|
||||
|
||||
public $galaxiesOptions = array(
|
||||
0 => 'As MISP standard format',
|
||||
1 => 'As tag names'
|
||||
);
|
||||
|
||||
public $analysisLevels = array(
|
||||
0 => 'Initial', 1 => 'Ongoing', 2 => 'Completed'
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue