mirror of https://github.com/MISP/MISP
chg: [upload_stix] Visual improvement with descriptions added
- More information on the different options to handle galaxies and clusters while importing STIX 2 content - More information on the debugging optionspull/9305/head
parent
d04e191e19
commit
35ea184c2d
|
@ -2501,6 +2501,16 @@ class EventsController extends AppController
|
||||||
foreach ($distributionLevels as $key => $value) {
|
foreach ($distributionLevels as $key => $value) {
|
||||||
$fieldDesc['distribution'][$key] = $this->Event->distributionDescriptions[$key]['formdesc'];
|
$fieldDesc['distribution'][$key] = $this->Event->distributionDescriptions[$key]['formdesc'];
|
||||||
}
|
}
|
||||||
|
$debugOptions = $this->Event->debugOptions;
|
||||||
|
$this->set('debugOptions', $debugOptions);
|
||||||
|
foreach ($debugOptions as $key => $value) {
|
||||||
|
$fieldDesc['debug'][$key] = $this->Event->debugDescriptions[$key];
|
||||||
|
}
|
||||||
|
$galaxiesOptions = $this->Event->galaxiesOptions;
|
||||||
|
$this->set('galaxiesOptions', $galaxiesOptions);
|
||||||
|
foreach ($galaxiesOptions as $key => $value) {
|
||||||
|
$fieldDesc['galaxies_handling'][$key] = $this->Event->galaxiesOptionsDescriptions[$key];
|
||||||
|
}
|
||||||
$this->set('sharingGroups', $sgs);
|
$this->set('sharingGroups', $sgs);
|
||||||
$this->set('fieldDesc', $fieldDesc);
|
$this->set('fieldDesc', $fieldDesc);
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,6 +63,11 @@ class Event extends AppModel
|
||||||
2 => array('desc' => '*Complete* means that the event\'s creation is complete', 'formdesc' => 'The event creator considers the analysis complete')
|
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 = [
|
public $distributionDescriptions = [
|
||||||
self::DISTRIBUTION_ORGANISATION => [
|
self::DISTRIBUTION_ORGANISATION => [
|
||||||
'desc' => 'This field determines the current distribution of the event',
|
'desc' => 'This field determines the current distribution of the event',
|
||||||
|
@ -86,6 +91,16 @@ 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 = [
|
public $distributionLevels = [
|
||||||
self::DISTRIBUTION_ORGANISATION => 'Your organisation only',
|
self::DISTRIBUTION_ORGANISATION => 'Your organisation only',
|
||||||
self::DISTRIBUTION_COMMUNITY => 'This community only',
|
self::DISTRIBUTION_COMMUNITY => 'This community only',
|
||||||
|
@ -94,6 +109,11 @@ class Event extends AppModel
|
||||||
self::DISTRIBUTION_SHARING_GROUP => 'Sharing group',
|
self::DISTRIBUTION_SHARING_GROUP => 'Sharing group',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
public $galaxiesOptions = array(
|
||||||
|
0 => 'As MISP standard format',
|
||||||
|
1 => 'As tag names'
|
||||||
|
);
|
||||||
|
|
||||||
public $analysisLevels = array(
|
public $analysisLevels = array(
|
||||||
0 => 'Initial', 1 => 'Ongoing', 2 => 'Completed'
|
0 => 'Initial', 1 => 'Ongoing', 2 => 'Completed'
|
||||||
);
|
);
|
||||||
|
|
|
@ -52,17 +52,39 @@
|
||||||
'label' => __('Include the original imported file as attachment')
|
'label' => __('Include the original imported file as attachment')
|
||||||
));
|
));
|
||||||
if ($me['Role']['perm_site_admin'] || $me['Role']['perm_galaxy_editor']) {
|
if ($me['Role']['perm_site_admin'] || $me['Role']['perm_galaxy_editor']) {
|
||||||
|
$galaxiesFormInfo = $this-> element(
|
||||||
|
'genericElements/Form/formInfo',
|
||||||
|
[
|
||||||
|
'field' => [
|
||||||
|
'field' => 'galaxies_handling'
|
||||||
|
],
|
||||||
|
'modelForForm' => 'Event',
|
||||||
|
'fieldDesc' => $fieldDesc['galaxies_handling']
|
||||||
|
]
|
||||||
|
);
|
||||||
echo '<div class="input clear"></div>';
|
echo '<div class="input clear"></div>';
|
||||||
echo $this->Form->input('galaxies_parsing', array(
|
echo $this->Form->input('galaxies_handling', array(
|
||||||
'checked' => false,
|
'options' => array($galaxiesOptions),
|
||||||
'label' => __('Use Galaxies 2.0')
|
'label' => __('How to handle Galaxies and Clusters') . $galaxiesFormInfo,
|
||||||
|
'selected' => 0
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
if ($me['Role']['perm_site_admin']) {
|
if ($me['Role']['perm_site_admin'] && Configure::read('debug') > 0) {
|
||||||
|
$debugFormInfo = $this->element(
|
||||||
|
'genericElements/Form/formInfo',
|
||||||
|
[
|
||||||
|
'field' => [
|
||||||
|
'field' => 'debug'
|
||||||
|
],
|
||||||
|
'modelForForm' => 'Event',
|
||||||
|
'fieldDesc' => $fieldDesc['debug'],
|
||||||
|
]
|
||||||
|
);
|
||||||
echo '<div class="input clear"></div>';
|
echo '<div class="input clear"></div>';
|
||||||
echo $this->Form->input('debug', array(
|
echo $this->Form->input('debug', array(
|
||||||
'checked' => true,
|
'options' => array($debugOptions),
|
||||||
'label' => __('Advanced conversion debugging')
|
'label' => __('Debugging option') . $debugFormInfo,
|
||||||
|
'selected' => 0
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue