mirror of https://github.com/MISP/MISP
chg: [psr-2] Changed view files to space indentation instead of tabs
- *sniff sniff*pull/3707/head
parent
a81894f14c
commit
58997b9ac1
|
@ -1,121 +1,121 @@
|
|||
<div class="attributes <?php if (!isset($ajax) || !$ajax) echo 'form';?>">
|
||||
<?php
|
||||
$url_params = $action == 'add' ? 'add/' . $event_id : 'edit/' . $attribute['Attribute']['id'];
|
||||
echo $this->Form->create('Attribute', array('id', 'url' => '/attributes/' . $url_params));
|
||||
$url_params = $action == 'add' ? 'add/' . $event_id : 'edit/' . $attribute['Attribute']['id'];
|
||||
echo $this->Form->create('Attribute', array('id', 'url' => '/attributes/' . $url_params));
|
||||
?>
|
||||
<fieldset>
|
||||
<legend><?php echo $action == 'add' ? __('Add Attribute') : __('Edit Attribute'); ?></legend>
|
||||
<div id="formWarning" class="message ajaxMessage"></div>
|
||||
<div id="compositeWarning" class="message <?php echo !empty($ajax) ? 'ajaxMessage' : '';?>" style="display:none;">Did you consider adding an object instead of a composite attribute?</div>
|
||||
<div class="add_attribute_fields">
|
||||
<?php
|
||||
echo $this->Form->hidden('event_id');
|
||||
echo $this->Form->input('category', array(
|
||||
'empty' => __('(choose one)'),
|
||||
'label' => __('Category ') . $this->element('formInfo', array('type' => 'category')),
|
||||
));
|
||||
echo $this->Form->input('type', array(
|
||||
'empty' => __('(first choose category)'),
|
||||
'label' => __('Type ') . $this->element('formInfo', array('type' => 'type')),
|
||||
));
|
||||
<fieldset>
|
||||
<legend><?php echo $action == 'add' ? __('Add Attribute') : __('Edit Attribute'); ?></legend>
|
||||
<div id="formWarning" class="message ajaxMessage"></div>
|
||||
<div id="compositeWarning" class="message <?php echo !empty($ajax) ? 'ajaxMessage' : '';?>" style="display:none;">Did you consider adding an object instead of a composite attribute?</div>
|
||||
<div class="add_attribute_fields">
|
||||
<?php
|
||||
echo $this->Form->hidden('event_id');
|
||||
echo $this->Form->input('category', array(
|
||||
'empty' => __('(choose one)'),
|
||||
'label' => __('Category ') . $this->element('formInfo', array('type' => 'category')),
|
||||
));
|
||||
echo $this->Form->input('type', array(
|
||||
'empty' => __('(first choose category)'),
|
||||
'label' => __('Type ') . $this->element('formInfo', array('type' => 'type')),
|
||||
));
|
||||
|
||||
$initialDistribution = 5;
|
||||
if (Configure::read('MISP.default_attribute_distribution') != null) {
|
||||
if (Configure::read('MISP.default_attribute_distribution') === 'event') {
|
||||
$initialDistribution = 5;
|
||||
} else {
|
||||
$initialDistribution = Configure::read('MISP.default_attribute_distribution');
|
||||
}
|
||||
}
|
||||
$initialDistribution = 5;
|
||||
if (Configure::read('MISP.default_attribute_distribution') != null) {
|
||||
if (Configure::read('MISP.default_attribute_distribution') === 'event') {
|
||||
$initialDistribution = 5;
|
||||
} else {
|
||||
$initialDistribution = Configure::read('MISP.default_attribute_distribution');
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
<?php
|
||||
$distArray = array(
|
||||
'options' => array($distributionLevels),
|
||||
'label' => __('Distribution ') . $this->element('formInfo', array('type' => 'distribution')),
|
||||
);
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
<?php
|
||||
$distArray = array(
|
||||
'options' => array($distributionLevels),
|
||||
'label' => __('Distribution ') . $this->element('formInfo', array('type' => 'distribution')),
|
||||
);
|
||||
|
||||
if ($action == 'add') {
|
||||
$distArray['selected'] = $initialDistribution;
|
||||
}
|
||||
if ($action == 'add') {
|
||||
$distArray['selected'] = $initialDistribution;
|
||||
}
|
||||
|
||||
echo $this->Form->input('distribution', $distArray);
|
||||
?>
|
||||
<div id="SGContainer" style="display:none;">
|
||||
<?php
|
||||
if (!empty($sharingGroups)) {
|
||||
echo $this->Form->input('sharing_group_id', array(
|
||||
'options' => array($sharingGroups),
|
||||
'label' => __('Sharing Group'),
|
||||
));
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->input('value', array(
|
||||
'type' => 'textarea',
|
||||
'error' => array('escape' => false),
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge'
|
||||
));
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
<?php
|
||||
echo $this->Form->input('comment', array(
|
||||
'type' => 'text',
|
||||
'label' => __('Contextual Comment'),
|
||||
'error' => array('escape' => false),
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge'
|
||||
));
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
<?php
|
||||
echo $this->Form->input('to_ids', array(
|
||||
'label' => __('for Intrusion Detection System'),
|
||||
));
|
||||
echo $this->Form->input('batch_import', array(
|
||||
'type' => 'checkbox'
|
||||
));
|
||||
?>
|
||||
</div>
|
||||
</fieldset>
|
||||
<p id="notice_message" style="display:none;"></p>
|
||||
<?php if ($ajax): ?>
|
||||
<div class="overlay_spacing">
|
||||
<span id="submitButton" class="btn btn-primary" style="margin-bottom:5px;float:left;" title="<?php echo __('Submit'); ?>" role="button" tabindex="0" aria-label="<?php echo __('Submit'); ?>" onClick="submitPopoverForm('<?php echo $action == 'add' ? $event_id : $attribute['Attribute']['id'];?>', '<?php echo $action; ?>')"><?php echo __('Submit'); ?></span>
|
||||
<span class="btn btn-inverse" style="float:right;" title="<?php echo __('Cancel'); ?>" role="button" tabindex="0" aria-label="<?php echo __('Cancel'); ?>" id="cancel_attribute_add"><?php echo __('Cancel'); ?></span>
|
||||
</div>
|
||||
<?php
|
||||
else:
|
||||
?>
|
||||
<?php
|
||||
echo $this->Form->button('Submit', array('class' => 'btn btn-primary'));
|
||||
endif;
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
echo $this->Form->input('distribution', $distArray);
|
||||
?>
|
||||
<div id="SGContainer" style="display:none;">
|
||||
<?php
|
||||
if (!empty($sharingGroups)) {
|
||||
echo $this->Form->input('sharing_group_id', array(
|
||||
'options' => array($sharingGroups),
|
||||
'label' => __('Sharing Group'),
|
||||
));
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->input('value', array(
|
||||
'type' => 'textarea',
|
||||
'error' => array('escape' => false),
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge'
|
||||
));
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
<?php
|
||||
echo $this->Form->input('comment', array(
|
||||
'type' => 'text',
|
||||
'label' => __('Contextual Comment'),
|
||||
'error' => array('escape' => false),
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge'
|
||||
));
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
<?php
|
||||
echo $this->Form->input('to_ids', array(
|
||||
'label' => __('for Intrusion Detection System'),
|
||||
));
|
||||
echo $this->Form->input('batch_import', array(
|
||||
'type' => 'checkbox'
|
||||
));
|
||||
?>
|
||||
</div>
|
||||
</fieldset>
|
||||
<p id="notice_message" style="display:none;"></p>
|
||||
<?php if ($ajax): ?>
|
||||
<div class="overlay_spacing">
|
||||
<span id="submitButton" class="btn btn-primary" style="margin-bottom:5px;float:left;" title="<?php echo __('Submit'); ?>" role="button" tabindex="0" aria-label="<?php echo __('Submit'); ?>" onClick="submitPopoverForm('<?php echo $action == 'add' ? $event_id : $attribute['Attribute']['id'];?>', '<?php echo $action; ?>')"><?php echo __('Submit'); ?></span>
|
||||
<span class="btn btn-inverse" style="float:right;" title="<?php echo __('Cancel'); ?>" role="button" tabindex="0" aria-label="<?php echo __('Cancel'); ?>" id="cancel_attribute_add"><?php echo __('Cancel'); ?></span>
|
||||
</div>
|
||||
<?php
|
||||
else:
|
||||
?>
|
||||
<?php
|
||||
echo $this->Form->button('Submit', array('class' => 'btn btn-primary'));
|
||||
endif;
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
if (!$ajax) {
|
||||
$event['Event']['id'] = $event_id;
|
||||
$event['Event']['published'] = $published;
|
||||
echo $this->element('side_menu', array('menuList' => 'event', 'menuItem' => 'addAttribute', 'event' => $event));
|
||||
}
|
||||
if (!$ajax) {
|
||||
$event['Event']['id'] = $event_id;
|
||||
$event['Event']['published'] = $published;
|
||||
echo $this->element('side_menu', array('menuList' => 'event', 'menuItem' => 'addAttribute', 'event' => $event));
|
||||
}
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
var notice_list_triggers = <?php echo $notice_list_triggers; ?>;
|
||||
var fieldsArray = new Array('AttributeCategory', 'AttributeType', 'AttributeValue', 'AttributeDistribution', 'AttributeComment', 'AttributeToIds', 'AttributeBatchImport', 'AttributeSharingGroupId');
|
||||
<?php
|
||||
$formInfoTypes = array('distribution' => 'Distribution', 'category' => 'Category', 'type' => 'Type');
|
||||
echo 'var formInfoFields = ' . json_encode($formInfoTypes) . PHP_EOL;
|
||||
foreach ($formInfoTypes as $formInfoType => $humanisedName) {
|
||||
echo 'var ' . $formInfoType . 'FormInfoValues = {' . PHP_EOL;
|
||||
foreach ($info[$formInfoType] as $key => $formInfoData) {
|
||||
echo '"' . $key . '": "<span class=\"blue bold\">' . h($formInfoData['key']) . '</span>: ' . h($formInfoData['desc']) . '<br />",' . PHP_EOL;
|
||||
}
|
||||
echo '}' . PHP_EOL;
|
||||
}
|
||||
$formInfoTypes = array('distribution' => 'Distribution', 'category' => 'Category', 'type' => 'Type');
|
||||
echo 'var formInfoFields = ' . json_encode($formInfoTypes) . PHP_EOL;
|
||||
foreach ($formInfoTypes as $formInfoType => $humanisedName) {
|
||||
echo 'var ' . $formInfoType . 'FormInfoValues = {' . PHP_EOL;
|
||||
foreach ($info[$formInfoType] as $key => $formInfoData) {
|
||||
echo '"' . $key . '": "<span class=\"blue bold\">' . h($formInfoData['key']) . '</span>: ' . h($formInfoData['desc']) . '<br />",' . PHP_EOL;
|
||||
}
|
||||
echo '}' . PHP_EOL;
|
||||
}
|
||||
?>
|
||||
|
||||
//
|
||||
|
@ -123,62 +123,62 @@ var fieldsArray = new Array('AttributeCategory', 'AttributeType', 'AttributeValu
|
|||
//
|
||||
var category_type_mapping = new Array();
|
||||
<?php
|
||||
foreach ($categoryDefinitions as $category => $def) {
|
||||
echo "category_type_mapping['" . addslashes($category) . "'] = {";
|
||||
$first = true;
|
||||
foreach ($def['types'] as $type) {
|
||||
if ($first) $first = false;
|
||||
else echo ', ';
|
||||
echo "'" . addslashes($type) . "' : '" . addslashes($type) . "'";
|
||||
}
|
||||
echo "}; \n";
|
||||
}
|
||||
foreach ($categoryDefinitions as $category => $def) {
|
||||
echo "category_type_mapping['" . addslashes($category) . "'] = {";
|
||||
$first = true;
|
||||
foreach ($def['types'] as $type) {
|
||||
if ($first) $first = false;
|
||||
else echo ', ';
|
||||
echo "'" . addslashes($type) . "' : '" . addslashes($type) . "'";
|
||||
}
|
||||
echo "}; \n";
|
||||
}
|
||||
?>
|
||||
|
||||
var composite_types = <?php echo json_encode($compositeTypes); ?>;
|
||||
|
||||
$(document).ready(function() {
|
||||
<?php
|
||||
if ($action == 'edit'):
|
||||
?>
|
||||
checkNoticeList('attribute');
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
initPopoverContent('Attribute');
|
||||
$('#AttributeDistribution').change(function() {
|
||||
if ($('#AttributeDistribution').val() == 4) $('#SGContainer').show();
|
||||
else $('#SGContainer').hide();
|
||||
});
|
||||
<?php
|
||||
if ($action == 'edit'):
|
||||
?>
|
||||
checkNoticeList('attribute');
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
initPopoverContent('Attribute');
|
||||
$('#AttributeDistribution').change(function() {
|
||||
if ($('#AttributeDistribution').val() == 4) $('#SGContainer').show();
|
||||
else $('#SGContainer').hide();
|
||||
});
|
||||
|
||||
$("#AttributeCategory").on('change', function(e) {
|
||||
formCategoryChanged('Attribute');
|
||||
if ($(this).val() === 'Internal reference') {
|
||||
$("#AttributeDistribution").val('0');
|
||||
$('#SGContainer').hide();
|
||||
}
|
||||
});
|
||||
$("#AttributeCategory").on('change', function(e) {
|
||||
formCategoryChanged('Attribute');
|
||||
if ($(this).val() === 'Internal reference') {
|
||||
$("#AttributeDistribution").val('0');
|
||||
$('#SGContainer').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$("#AttributeCategory, #AttributeType").change(function() {
|
||||
checkNoticeList('attribute');
|
||||
});
|
||||
$("#AttributeCategory, #AttributeType").change(function() {
|
||||
checkNoticeList('attribute');
|
||||
});
|
||||
|
||||
$("#AttributeCategory, #AttributeType, #AttributeDistribution").change(function() {
|
||||
var start = $("#AttributeType").val();
|
||||
initPopoverContent('Attribute');
|
||||
$("#AttributeType").val(start);
|
||||
if ($.inArray(start, composite_types) > -1) {
|
||||
$('#compositeWarning').show();
|
||||
} else {
|
||||
$('#compositeWarning').hide();
|
||||
}
|
||||
});
|
||||
<?php if ($ajax): ?>
|
||||
$('#cancel_attribute_add').click(function() {
|
||||
cancelPopoverForm();
|
||||
});
|
||||
$("#AttributeCategory, #AttributeType, #AttributeDistribution").change(function() {
|
||||
var start = $("#AttributeType").val();
|
||||
initPopoverContent('Attribute');
|
||||
$("#AttributeType").val(start);
|
||||
if ($.inArray(start, composite_types) > -1) {
|
||||
$('#compositeWarning').show();
|
||||
} else {
|
||||
$('#compositeWarning').hide();
|
||||
}
|
||||
});
|
||||
<?php if ($ajax): ?>
|
||||
$('#cancel_attribute_add').click(function() {
|
||||
cancelPopoverForm();
|
||||
});
|
||||
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
});
|
||||
</script>
|
||||
<?php echo $this->Js->writeBuffer(); // Write cached scripts
|
||||
|
|
|
@ -1,148 +1,148 @@
|
|||
<div class="attributes form">
|
||||
<?php echo $this->Form->create('Attribute', array('enctype' => 'multipart/form-data','onSubmit' => 'document.getElementById("AttributeMalware").removeAttribute("disabled");'));?>
|
||||
<fieldset>
|
||||
<legend><?php echo __('Add Attachment(s)'); ?></legend>
|
||||
<?php
|
||||
echo $this->Form->hidden('event_id');
|
||||
echo $this->Form->input('category', array(
|
||||
'default' => 'Payload delivery',
|
||||
'label' => __('Category ') . $this->element('formInfo', array('type' => 'category'))
|
||||
));
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
<?php
|
||||
$initialDistribution = 5;
|
||||
if (Configure::read('MISP.default_attribute_distribution') != null) {
|
||||
if (Configure::read('MISP.default_attribute_distribution') === 'event') {
|
||||
$initialDistribution = 5;
|
||||
} else {
|
||||
$initialDistribution = Configure::read('MISP.default_attribute_distribution');
|
||||
}
|
||||
}
|
||||
echo $this->Form->input('distribution', array(
|
||||
'options' => $distributionLevels,
|
||||
'label' => __('Distribution ') . $this->element('formInfo', array('type' => 'distribution')),
|
||||
'selected' => $initialDistribution,
|
||||
));
|
||||
?>
|
||||
<div id="SGContainer" style="display:none;">
|
||||
<?php
|
||||
if (!empty($sharingGroups)) {
|
||||
echo $this->Form->input('sharing_group_id', array(
|
||||
'options' => array($sharingGroups),
|
||||
'label' => __('Sharing Group'),
|
||||
));
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->input('comment', array(
|
||||
'type' => 'text',
|
||||
'label' => __('Contextual Comment'),
|
||||
'error' => array('escape' => false),
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge'
|
||||
));
|
||||
//'before' => $this->Html->div('forminfo', isset($attrDescriptions['distribution']['formdesc']) ? $attrDescriptions['distribution']['formdesc'] : $attrDescriptions['distribution']['desc']),));
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
<div class="input">
|
||||
<?php
|
||||
echo $this->Form->input('values.', array(
|
||||
'error' => array('escape' => false),
|
||||
'type' => 'file',
|
||||
'multiple' => true
|
||||
));
|
||||
?>
|
||||
</div>
|
||||
<div class="input clear"></div>
|
||||
<?php
|
||||
echo $this->Form->input('malware', array(
|
||||
'type' => 'checkbox',
|
||||
'checked' => false,
|
||||
'data-content' => isset($attrDescriptions['signature']['formdesc']) ? $attrDescriptions['signature']['formdesc'] : $attrDescriptions['signature']['desc'],
|
||||
'label' => __('Is a malware sample (encrypt and hash)')
|
||||
));
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
<?php
|
||||
echo $this->Form->input('advanced', array(
|
||||
'type' => 'checkbox',
|
||||
'checked' => false,
|
||||
'data-content' => isset($attrDescriptions['signature']['formdesc']) ? $attrDescriptions['signature']['formdesc'] : $attrDescriptions['signature']['desc'],
|
||||
'label' => __('Advanced extraction (if installed)'),
|
||||
));
|
||||
?>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><?php echo __('Add Attachment(s)'); ?></legend>
|
||||
<?php
|
||||
echo $this->Form->hidden('event_id');
|
||||
echo $this->Form->input('category', array(
|
||||
'default' => 'Payload delivery',
|
||||
'label' => __('Category ') . $this->element('formInfo', array('type' => 'category'))
|
||||
));
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
<?php
|
||||
$initialDistribution = 5;
|
||||
if (Configure::read('MISP.default_attribute_distribution') != null) {
|
||||
if (Configure::read('MISP.default_attribute_distribution') === 'event') {
|
||||
$initialDistribution = 5;
|
||||
} else {
|
||||
$initialDistribution = Configure::read('MISP.default_attribute_distribution');
|
||||
}
|
||||
}
|
||||
echo $this->Form->input('distribution', array(
|
||||
'options' => $distributionLevels,
|
||||
'label' => __('Distribution ') . $this->element('formInfo', array('type' => 'distribution')),
|
||||
'selected' => $initialDistribution,
|
||||
));
|
||||
?>
|
||||
<div id="SGContainer" style="display:none;">
|
||||
<?php
|
||||
if (!empty($sharingGroups)) {
|
||||
echo $this->Form->input('sharing_group_id', array(
|
||||
'options' => array($sharingGroups),
|
||||
'label' => __('Sharing Group'),
|
||||
));
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->input('comment', array(
|
||||
'type' => 'text',
|
||||
'label' => __('Contextual Comment'),
|
||||
'error' => array('escape' => false),
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge'
|
||||
));
|
||||
//'before' => $this->Html->div('forminfo', isset($attrDescriptions['distribution']['formdesc']) ? $attrDescriptions['distribution']['formdesc'] : $attrDescriptions['distribution']['desc']),));
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
<div class="input">
|
||||
<?php
|
||||
echo $this->Form->input('values.', array(
|
||||
'error' => array('escape' => false),
|
||||
'type' => 'file',
|
||||
'multiple' => true
|
||||
));
|
||||
?>
|
||||
</div>
|
||||
<div class="input clear"></div>
|
||||
<?php
|
||||
echo $this->Form->input('malware', array(
|
||||
'type' => 'checkbox',
|
||||
'checked' => false,
|
||||
'data-content' => isset($attrDescriptions['signature']['formdesc']) ? $attrDescriptions['signature']['formdesc'] : $attrDescriptions['signature']['desc'],
|
||||
'label' => __('Is a malware sample (encrypt and hash)')
|
||||
));
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
<?php
|
||||
echo $this->Form->input('advanced', array(
|
||||
'type' => 'checkbox',
|
||||
'checked' => false,
|
||||
'data-content' => isset($attrDescriptions['signature']['formdesc']) ? $attrDescriptions['signature']['formdesc'] : $attrDescriptions['signature']['desc'],
|
||||
'label' => __('Advanced extraction (if installed)'),
|
||||
));
|
||||
?>
|
||||
</fieldset>
|
||||
<?php
|
||||
echo $this->Form->button('Upload', array('class' => 'btn btn-primary'));
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
$event['Event']['id'] = $this->request->data['Attribute']['event_id'];
|
||||
$event['Event']['published'] = $published;
|
||||
echo $this->element('side_menu', array('menuList' => 'event', 'menuItem' => 'addAttachment', 'event' => $event));
|
||||
$event['Event']['id'] = $this->request->data['Attribute']['event_id'];
|
||||
$event['Event']['published'] = $published;
|
||||
echo $this->element('side_menu', array('menuList' => 'event', 'menuItem' => 'addAttachment', 'event' => $event));
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<?php
|
||||
$formInfoTypes = array('distribution' => 'Distribution', 'category' => 'Category');
|
||||
echo 'var formInfoFields = ' . json_encode($formInfoTypes) . PHP_EOL;
|
||||
foreach ($formInfoTypes as $formInfoType => $humanisedName) {
|
||||
echo 'var ' . $formInfoType . 'FormInfoValues = {' . PHP_EOL;
|
||||
foreach ($info[$formInfoType] as $key => $formInfoData) {
|
||||
echo '"' . $key . '": "<span class=\"blue bold\">' . h($formInfoData['key']) . '</span>: ' . h($formInfoData['desc']) . '<br />",' . PHP_EOL;
|
||||
}
|
||||
echo '}' . PHP_EOL;
|
||||
}
|
||||
$formInfoTypes = array('distribution' => 'Distribution', 'category' => 'Category');
|
||||
echo 'var formInfoFields = ' . json_encode($formInfoTypes) . PHP_EOL;
|
||||
foreach ($formInfoTypes as $formInfoType => $humanisedName) {
|
||||
echo 'var ' . $formInfoType . 'FormInfoValues = {' . PHP_EOL;
|
||||
foreach ($info[$formInfoType] as $key => $formInfoData) {
|
||||
echo '"' . $key . '": "<span class=\"blue bold\">' . h($formInfoData['key']) . '</span>: ' . h($formInfoData['desc']) . '<br />",' . PHP_EOL;
|
||||
}
|
||||
echo '}' . PHP_EOL;
|
||||
}
|
||||
?>
|
||||
|
||||
var formZipTypeValues = new Array();
|
||||
<?php
|
||||
foreach ($categoryDefinitions as $category => $def) {
|
||||
$types = $def['types'];
|
||||
$alreadySet = false;
|
||||
foreach ($types as $type) {
|
||||
if (in_array($type, $zippedDefinitions) && !$alreadySet) {
|
||||
$alreadySet = true;
|
||||
echo "formZipTypeValues['$category'] = \"true\";\n";
|
||||
}
|
||||
}
|
||||
if (!$alreadySet) {
|
||||
echo "formZipTypeValues['$category'] = \"false\";\n";
|
||||
}
|
||||
}
|
||||
foreach ($categoryDefinitions as $category => $def) {
|
||||
$types = $def['types'];
|
||||
$alreadySet = false;
|
||||
foreach ($types as $type) {
|
||||
if (in_array($type, $zippedDefinitions) && !$alreadySet) {
|
||||
$alreadySet = true;
|
||||
echo "formZipTypeValues['$category'] = \"true\";\n";
|
||||
}
|
||||
}
|
||||
if (!$alreadySet) {
|
||||
echo "formZipTypeValues['$category'] = \"false\";\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
var formAttTypeValues = new Array();
|
||||
<?php
|
||||
foreach ($categoryDefinitions as $category => $def) {
|
||||
$types = $def['types'];
|
||||
$alreadySet = false;
|
||||
foreach ($types as $type) {
|
||||
if (in_array($type, $uploadDefinitions) && !$alreadySet) {
|
||||
$alreadySet = true;
|
||||
echo "formAttTypeValues['$category'] = \"true\";\n";
|
||||
}
|
||||
}
|
||||
if (!$alreadySet) {
|
||||
echo "formAttTypeValues['$category'] = \"false\";\n";
|
||||
}
|
||||
}
|
||||
foreach ($categoryDefinitions as $category => $def) {
|
||||
$types = $def['types'];
|
||||
$alreadySet = false;
|
||||
foreach ($types as $type) {
|
||||
if (in_array($type, $uploadDefinitions) && !$alreadySet) {
|
||||
$alreadySet = true;
|
||||
echo "formAttTypeValues['$category'] = \"true\";\n";
|
||||
}
|
||||
}
|
||||
if (!$alreadySet) {
|
||||
echo "formAttTypeValues['$category'] = \"false\";\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
$(document).ready(function() {
|
||||
initPopoverContent('Attribute');
|
||||
$('#AttributeCategory').change(function() {
|
||||
malwareCheckboxSetter("Attribute");
|
||||
});
|
||||
$('#AttributeDistribution').change(function() {
|
||||
if ($('#AttributeDistribution').val() == 4) $('#SGContainer').show();
|
||||
else $('#SGContainer').hide();
|
||||
});
|
||||
initPopoverContent('Attribute');
|
||||
$('#AttributeCategory').change(function() {
|
||||
malwareCheckboxSetter("Attribute");
|
||||
});
|
||||
$('#AttributeDistribution').change(function() {
|
||||
if ($('#AttributeDistribution').val() == 4) $('#SGContainer').show();
|
||||
else $('#SGContainer').hide();
|
||||
});
|
||||
|
||||
$("#AttributeCategory, #AttributeDistribution").change(function() {
|
||||
initPopoverContent('Attribute');
|
||||
});
|
||||
$("#AttributeCategory, #AttributeDistribution").change(function() {
|
||||
initPopoverContent('Attribute');
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
<div class="attributes form">
|
||||
<?php echo $this->Form->create('Attribute', array('enctype' => 'multipart/form-data'));?>
|
||||
<fieldset>
|
||||
<legend><?php echo __('Import ThreatConnect CSV file'); ?></legend>
|
||||
<?php
|
||||
echo $this->Form->hidden('event_id');
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
<div class="input">
|
||||
<?php
|
||||
echo $this->Form->file('value', array(
|
||||
'error' => array('escape' => false),
|
||||
));
|
||||
?>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><?php echo __('Import ThreatConnect CSV file'); ?></legend>
|
||||
<?php
|
||||
echo $this->Form->hidden('event_id');
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
<div class="input">
|
||||
<?php
|
||||
echo $this->Form->file('value', array(
|
||||
'error' => array('escape' => false),
|
||||
));
|
||||
?>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php
|
||||
echo $this->Form->button('Upload', array('class' => 'btn btn-primary'));
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
$event['Event']['id'] = $this->request->data['Attribute']['event_id'];
|
||||
$event['Event']['published'] = $published;
|
||||
echo $this->element('side_menu', array('menuList' => 'event', 'menuItem' => 'addThreatConnect', 'event' => $event));
|
||||
$event['Event']['id'] = $this->request->data['Attribute']['event_id'];
|
||||
$event['Event']['published'] = $published;
|
||||
echo $this->element('side_menu', array('menuList' => 'event', 'menuItem' => 'addThreatConnect', 'event' => $event));
|
||||
?>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
$mayModify = (($isAclModify && $event['Event']['user_id'] == $me['id'] && $event['Event']['orgc_id'] == $me['org_id']) || ($isAclModifyOrg && $event['Event']['orgc_id'] == $me['org_id']));
|
||||
echo $this->element('ajaxAttributeTags', array('attributeId' => $attributeId, 'attributeTags' => $attributeTags, 'tagAccess' => ($isSiteAdmin || $mayModify || $me['org_id'] == $event['Event']['org_id'])));
|
||||
$mayModify = (($isAclModify && $event['Event']['user_id'] == $me['id'] && $event['Event']['orgc_id'] == $me['org_id']) || ($isAclModifyOrg && $event['Event']['orgc_id'] == $me['org_id']));
|
||||
echo $this->element('ajaxAttributeTags', array('attributeId' => $attributeId, 'attributeTags' => $attributeTags, 'tagAccess' => ($isSiteAdmin || $mayModify || $me['org_id'] == $event['Event']['org_id'])));
|
||||
?>
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
<div class="confirmation">
|
||||
<?php
|
||||
echo $this->Form->create('Attribute', array('style' => 'margin:0px;', 'id' => 'PromptForm'));
|
||||
if ($hard) $hard = '/true';
|
||||
echo $this->Form->create('Attribute', array('style' => 'margin:0px;', 'id' => 'PromptForm'));
|
||||
if ($hard) $hard = '/true';
|
||||
?>
|
||||
<legend><?php echo __('Attribute Deletion'); ?></legend>
|
||||
<div style="padding-left:5px;padding-right:5px;padding-bottom:5px;">
|
||||
<?php
|
||||
$hard_message = __('Are you sure you want to hard-delete Attribute #%s? The Attribute will be permanently deleted and unrecoverable. Also, this will prevent the deletion to be propagated to other instances.', h($id));
|
||||
$soft_message = __('Are you sure you want to soft-delete Attribute #%s? The Attribute will only be soft deleted, meaning that it is not completely purged. Click on Include deleted attributes and delete the soft deleted attribute if you want to permanently remove it.', h($id));
|
||||
$hard_message = __('Are you sure you want to hard-delete Attribute #%s? The Attribute will be permanently deleted and unrecoverable. Also, this will prevent the deletion to be propagated to other instances.', h($id));
|
||||
$soft_message = __('Are you sure you want to soft-delete Attribute #%s? The Attribute will only be soft deleted, meaning that it is not completely purged. Click on Include deleted attributes and delete the soft deleted attribute if you want to permanently remove it.', h($id));
|
||||
?>
|
||||
<p><?php echo $hard ? $hard_message : $soft_message; ?></p>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align:top">
|
||||
<span id="PromptYesButton" title="<?php echo __('Delete'); ?>" role="button" tabindex="0" aria-label="<?php echo __('Delete'); ?>" class="btn btn-primary" onClick="submitDeletion(<?php echo $event_id; ?>, 'delete', 'attributes', '<?php echo $id . $hard;?>')"><?php echo __('Yes'); ?></span>
|
||||
</td>
|
||||
<td style="width:540px;">
|
||||
</td>
|
||||
<td style="vertical-align:top;">
|
||||
<span class="btn btn-inverse" title="<?php echo __('No'); ?>" role="button" tabindex="0" aria-label="<?php echo __('No'); ?>" id="PromptNoButton" onClick="cancelPrompt();"><?php echo __('No'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align:top">
|
||||
<span id="PromptYesButton" title="<?php echo __('Delete'); ?>" role="button" tabindex="0" aria-label="<?php echo __('Delete'); ?>" class="btn btn-primary" onClick="submitDeletion(<?php echo $event_id; ?>, 'delete', 'attributes', '<?php echo $id . $hard;?>')"><?php echo __('Yes'); ?></span>
|
||||
</td>
|
||||
<td style="width:540px;">
|
||||
</td>
|
||||
<td style="vertical-align:top;">
|
||||
<span class="btn btn-inverse" title="<?php echo __('No'); ?>" role="button" tabindex="0" aria-label="<?php echo __('No'); ?>" id="PromptNoButton" onClick="cancelPrompt();"><?php echo __('No'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
<?php
|
||||
echo $this->Form->create('Attribute', array('class' => 'inline-form inline-field-form', 'id' => 'Attribute_' . $object['id'] . '_category_form', 'url' => '/attributes/editField/' . $object['id']));
|
||||
echo $this->Form->create('Attribute', array('class' => 'inline-form inline-field-form', 'id' => 'Attribute_' . $object['id'] . '_category_form', 'url' => '/attributes/editField/' . $object['id']));
|
||||
?>
|
||||
<div class='inline-input inline-input-container'>
|
||||
<div class="inline-input-accept inline-input-button inline-input-passive"><span class = "icon-ok" role="button" tabindex="0" aria-label="<?php echo __('Accept change'); ?>"></span></div>
|
||||
<div class="inline-input-decline inline-input-button inline-input-passive"><span class = "icon-remove" role="button" tabindex="0" aria-label="<?php echo __('Discard change'); ?>"></span></div>
|
||||
<?php
|
||||
echo $this->Form->input('category', array(
|
||||
'options' => array(array_combine($typeCategory[$object['type']], $typeCategory[$object['type']])),
|
||||
'label' => false,
|
||||
'selected' => $object['category'],
|
||||
'error' => array('escape' => false),
|
||||
'class' => 'inline-input',
|
||||
'id' => 'Attribute_' . $object['id'] . '_category_field',
|
||||
'div' => false
|
||||
));
|
||||
echo $this->Form->end();
|
||||
echo $this->Form->input('category', array(
|
||||
'options' => array(array_combine($typeCategory[$object['type']], $typeCategory[$object['type']])),
|
||||
'label' => false,
|
||||
'selected' => $object['category'],
|
||||
'error' => array('escape' => false),
|
||||
'class' => 'inline-input',
|
||||
'id' => 'Attribute_' . $object['id'] . '_category_field',
|
||||
'div' => false
|
||||
));
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
<?php
|
||||
echo $this->Form->create('Attribute', array('class' => 'inline-form inline-field-form', 'id' => 'Attribute_' . $object['id'] . '_comment_form', 'url' => '/attributes/editField/' . $object['id']));
|
||||
echo $this->Form->create('Attribute', array('class' => 'inline-form inline-field-form', 'id' => 'Attribute_' . $object['id'] . '_comment_form', 'url' => '/attributes/editField/' . $object['id']));
|
||||
?>
|
||||
<div class='inline-input inline-input-container'>
|
||||
<div class="inline-input-accept inline-input-button inline-input-passive"><span class = "icon-ok" role="button" tabindex="0" aria-label="<?php echo __('Accept change'); ?>"></span></div>
|
||||
<div class="inline-input-decline inline-input-button inline-input-passive"><span class = "icon-remove" role="button" tabindex="0" aria-label="<?php echo __('Discard change'); ?>"></span></div>
|
||||
<?php
|
||||
echo $this->Form->input('comment', array(
|
||||
'type' => 'textarea',
|
||||
'label' => false,
|
||||
'value' => $object['comment'],
|
||||
'error' => array('escape' => false),
|
||||
'class' => 'inline-input',
|
||||
'id' => 'Attribute' . '_' . $object['id'] . '_comment_field',
|
||||
'div' => false
|
||||
));
|
||||
echo $this->Form->end();
|
||||
<div class='inline-input inline-input-container'>
|
||||
<div class="inline-input-accept inline-input-button inline-input-passive"><span class = "icon-ok" role="button" tabindex="0" aria-label="<?php echo __('Accept change'); ?>"></span></div>
|
||||
<div class="inline-input-decline inline-input-button inline-input-passive"><span class = "icon-remove" role="button" tabindex="0" aria-label="<?php echo __('Discard change'); ?>"></span></div>
|
||||
<?php
|
||||
echo $this->Form->input('comment', array(
|
||||
'type' => 'textarea',
|
||||
'label' => false,
|
||||
'value' => $object['comment'],
|
||||
'error' => array('escape' => false),
|
||||
'class' => 'inline-input',
|
||||
'id' => 'Attribute' . '_' . $object['id'] . '_comment_field',
|
||||
'div' => false
|
||||
));
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
<?php
|
||||
echo $this->Form->create('Attribute', array('class' => 'inline-form inline-field-form', 'id' => 'Attribute_' . $object['id'] . '_distribution_form', 'url' => '/attributes/editField/' . $object['id']));
|
||||
echo $this->Form->create('Attribute', array('class' => 'inline-form inline-field-form', 'id' => 'Attribute_' . $object['id'] . '_distribution_form', 'url' => '/attributes/editField/' . $object['id']));
|
||||
?>
|
||||
<div class='inline-input inline-input-container'>
|
||||
<div class="inline-input-accept inline-input-button inline-input-passive"><span class = "icon-ok" role="button" tabindex="0" aria-label="<?php echo __('Accept change'); ?>"></span></div>
|
||||
<div class="inline-input-decline inline-input-button inline-input-passive"><span class = "icon-remove" role="button" tabindex="0" aria-label="<?php echo __('Discard change'); ?>"></span></div>
|
||||
<?php
|
||||
echo $this->Form->input('distribution', array(
|
||||
'options' => array($distributionLevels),
|
||||
'label' => false,
|
||||
'selected' => $object['distribution'],
|
||||
'error' => array('escape' => false),
|
||||
'class' => 'inline-input',
|
||||
'id' => 'Attribute_' . $object['id'] . '_distribution_field',
|
||||
'div' => false
|
||||
));
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
<div class="inline-input-accept inline-input-button inline-input-passive"><span class = "icon-ok" role="button" tabindex="0" aria-label="<?php echo __('Accept change'); ?>"></span></div>
|
||||
<div class="inline-input-decline inline-input-button inline-input-passive"><span class = "icon-remove" role="button" tabindex="0" aria-label="<?php echo __('Discard change'); ?>"></span></div>
|
||||
<?php
|
||||
echo $this->Form->input('distribution', array(
|
||||
'options' => array($distributionLevels),
|
||||
'label' => false,
|
||||
'selected' => $object['distribution'],
|
||||
'error' => array('escape' => false),
|
||||
'class' => 'inline-input',
|
||||
'id' => 'Attribute_' . $object['id'] . '_distribution_field',
|
||||
'div' => false
|
||||
));
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
|
|
|
@ -1,72 +1,72 @@
|
|||
<div class="attributes">
|
||||
<?php
|
||||
echo $this->Form->create('Attribute', array('url' => '/attributes/editSelected/' . $id));
|
||||
echo $this->Form->create('Attribute', array('url' => '/attributes/editSelected/' . $id));
|
||||
?>
|
||||
<fieldset>
|
||||
<legend><?php echo __('Mass Edit Attributes'); ?></legend>
|
||||
<div id="formWarning" class="message ajaxMessage"></div>
|
||||
<div class="add_attribute_fields">
|
||||
<?php
|
||||
echo $this->Form->hidden('event_id', array('value' => $id));
|
||||
echo $this->Form->input('attribute_ids', array('style' => 'display:none;', 'label' => false));
|
||||
$distributionLevels[] = __('Do not alter current settings');
|
||||
echo $this->Form->input('distribution', array(
|
||||
'options' => array($distributionLevels),
|
||||
'label' => __('Distribution'),
|
||||
'selected' => 6,
|
||||
));
|
||||
?>
|
||||
<div id="SGContainer" style="display:none;">
|
||||
<?php
|
||||
if (!empty($sgs)) {
|
||||
echo $this->Form->input('sharing_group_id', array(
|
||||
'options' => array($sgs),
|
||||
'label' => __('Sharing Group'),
|
||||
));
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->input('to_ids', array(
|
||||
'options' => array(__('No'), __('Yes'), __('Do not alter current settings')),
|
||||
'data-content' => isset($attrDescriptions['signature']['formdesc']) ? $attrDescriptions['signature']['formdesc'] : $attrDescriptions['signature']['desc'],
|
||||
'label' => __('For Intrusion Detection System'),
|
||||
'selected' => 2,
|
||||
));
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
<fieldset>
|
||||
<legend><?php echo __('Mass Edit Attributes'); ?></legend>
|
||||
<div id="formWarning" class="message ajaxMessage"></div>
|
||||
<div class="add_attribute_fields">
|
||||
<?php
|
||||
echo $this->Form->hidden('event_id', array('value' => $id));
|
||||
echo $this->Form->input('attribute_ids', array('style' => 'display:none;', 'label' => false));
|
||||
$distributionLevels[] = __('Do not alter current settings');
|
||||
echo $this->Form->input('distribution', array(
|
||||
'options' => array($distributionLevels),
|
||||
'label' => __('Distribution'),
|
||||
'selected' => 6,
|
||||
));
|
||||
?>
|
||||
<div id="SGContainer" style="display:none;">
|
||||
<?php
|
||||
if (!empty($sgs)) {
|
||||
echo $this->Form->input('sharing_group_id', array(
|
||||
'options' => array($sgs),
|
||||
'label' => __('Sharing Group'),
|
||||
));
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->input('to_ids', array(
|
||||
'options' => array(__('No'), __('Yes'), __('Do not alter current settings')),
|
||||
'data-content' => isset($attrDescriptions['signature']['formdesc']) ? $attrDescriptions['signature']['formdesc'] : $attrDescriptions['signature']['desc'],
|
||||
'label' => __('For Intrusion Detection System'),
|
||||
'selected' => 2,
|
||||
));
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
|
||||
<div class="input clear"></div>
|
||||
<?php
|
||||
echo $this->Form->input('comment', array(
|
||||
'type' => 'textarea',
|
||||
'placeholder' => __('Leave this field empty to leave the comment field of the selected attributes unaltered.'),
|
||||
'label' => __('Contextual Comment'),
|
||||
'error' => array('escape' => false),
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge'
|
||||
));
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<p style="color:red;font-weight:bold;display:none;" id="warning-message"><?php echo __('Warning: You are about to share data that is of a classified nature (Attribution / targeting data). Make sure that you are authorised to share this.'); ?></p>
|
||||
<div class="overlay_spacing">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align:top">
|
||||
<span id="submitButton" class="btn btn-primary" title="<?php echo __('Submit'); ?>" role="button" tabindex="0" aria-label="<?php echo __('Submit'); ?>" onClick="submitPopoverForm('<?php echo $id;?>', 'massEdit')"><?php echo __('Submit'); ?></span>
|
||||
</td>
|
||||
<td style="width:540px;"> </td>
|
||||
<td style="vertical-align:top;">
|
||||
<span class="btn btn-inverse" title="<?php echo __('Cancel'); ?>" role="button" tabindex="0" aria-label="<?php echo __('Cancel'); ?>" id="cancel_attribute_add"><?php echo __('Cancel'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
<?php
|
||||
echo $this->Form->input('comment', array(
|
||||
'type' => 'textarea',
|
||||
'placeholder' => __('Leave this field empty to leave the comment field of the selected attributes unaltered.'),
|
||||
'label' => __('Contextual Comment'),
|
||||
'error' => array('escape' => false),
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge'
|
||||
));
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<p style="color:red;font-weight:bold;display:none;" id="warning-message"><?php echo __('Warning: You are about to share data that is of a classified nature (Attribution / targeting data). Make sure that you are authorised to share this.'); ?></p>
|
||||
<div class="overlay_spacing">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align:top">
|
||||
<span id="submitButton" class="btn btn-primary" title="<?php echo __('Submit'); ?>" role="button" tabindex="0" aria-label="<?php echo __('Submit'); ?>" onClick="submitPopoverForm('<?php echo $id;?>', 'massEdit')"><?php echo __('Submit'); ?></span>
|
||||
</td>
|
||||
<td style="width:540px;"> </td>
|
||||
<td style="vertical-align:top;">
|
||||
<span class="btn btn-inverse" title="<?php echo __('Cancel'); ?>" role="button" tabindex="0" aria-label="<?php echo __('Cancel'); ?>" id="cancel_attribute_add"><?php echo __('Cancel'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
@ -78,64 +78,64 @@ var formInfoValues = new Array();
|
|||
var fieldsArrayAttribute = new Array('AttributeDistribution', 'AttributeComment', 'AttributeToIds');
|
||||
<?php
|
||||
foreach ($distributionDescriptions as $type => $def) {
|
||||
$info = isset($def['formdesc']) ? $def['formdesc'] : $def['desc'];
|
||||
echo "formInfoValues['" . addslashes($type) . "'] = \"" . addslashes($info) . "\";\n"; // as we output JS code we need to add slashes
|
||||
$info = isset($def['formdesc']) ? $def['formdesc'] : $def['desc'];
|
||||
echo "formInfoValues['" . addslashes($type) . "'] = \"" . addslashes($info) . "\";\n"; // as we output JS code we need to add slashes
|
||||
}
|
||||
?>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#AttributeDistribution').change(function() {
|
||||
if ($('#AttributeDistribution').val() == 4) $('#SGContainer').show();
|
||||
else $('#SGContainer').hide();
|
||||
});
|
||||
$('#AttributeDistribution').change(function() {
|
||||
if ($('#AttributeDistribution').val() == 4) $('#SGContainer').show();
|
||||
else $('#SGContainer').hide();
|
||||
});
|
||||
|
||||
$('#AttributeAttributeIds').attr('value', getSelected());
|
||||
$('#AttributeAttributeIds').attr('value', getSelected());
|
||||
|
||||
$("#Attribute, #AttributeDistribution").on('mouseover', function(e) {
|
||||
var $e = $(e.target);
|
||||
if ($e.is('option')) {
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
$('#'+e.currentTarget.id).popover({
|
||||
trigger: 'focus',
|
||||
placement: 'right',
|
||||
container: 'body',
|
||||
content: formInfoValues[$e.val()],
|
||||
}).popover('show');
|
||||
}
|
||||
});
|
||||
$("#Attribute, #AttributeDistribution").on('mouseover', function(e) {
|
||||
var $e = $(e.target);
|
||||
if ($e.is('option')) {
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
$('#'+e.currentTarget.id).popover({
|
||||
trigger: 'focus',
|
||||
placement: 'right',
|
||||
container: 'body',
|
||||
content: formInfoValues[$e.val()],
|
||||
}).popover('show');
|
||||
}
|
||||
});
|
||||
|
||||
$("input, label").on('mouseleave', function(e) {
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
});
|
||||
$("input, label").on('mouseleave', function(e) {
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
});
|
||||
|
||||
$("input, label").on('mouseover', function(e) {
|
||||
var $e = $(e.target);
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
$('#'+e.currentTarget.id).popover({
|
||||
trigger: 'focus',
|
||||
placement: 'right',
|
||||
container: 'body',
|
||||
}).popover('show');
|
||||
});
|
||||
$("input, label").on('mouseover', function(e) {
|
||||
var $e = $(e.target);
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
$('#'+e.currentTarget.id).popover({
|
||||
trigger: 'focus',
|
||||
placement: 'right',
|
||||
container: 'body',
|
||||
}).popover('show');
|
||||
});
|
||||
|
||||
// workaround for browsers like IE and Chrome that do now have an onmouseover on the 'options' of a select.
|
||||
// disadvangate is that user needs to click on the item to see the tooltip.
|
||||
// no solutions exist, except to generate the select completely using html.
|
||||
$("#Attribute, #AttributeDistribution").on('change', function(e) {
|
||||
var $e = $(e.target);
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
$('#'+e.currentTarget.id).popover({
|
||||
trigger: 'focus',
|
||||
placement: 'right',
|
||||
container: 'body',
|
||||
content: formInfoValues[$e.val()],
|
||||
}).popover('show');
|
||||
});
|
||||
$('#cancel_attribute_add').click(function() {
|
||||
$('#gray_out').fadeOut();
|
||||
$('#popover_form').fadeOut();
|
||||
});
|
||||
// workaround for browsers like IE and Chrome that do now have an onmouseover on the 'options' of a select.
|
||||
// disadvangate is that user needs to click on the item to see the tooltip.
|
||||
// no solutions exist, except to generate the select completely using html.
|
||||
$("#Attribute, #AttributeDistribution").on('change', function(e) {
|
||||
var $e = $(e.target);
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
$('#'+e.currentTarget.id).popover({
|
||||
trigger: 'focus',
|
||||
placement: 'right',
|
||||
container: 'body',
|
||||
content: formInfoValues[$e.val()],
|
||||
}).popover('show');
|
||||
});
|
||||
$('#cancel_attribute_add').click(function() {
|
||||
$('#gray_out').fadeOut();
|
||||
$('#popover_form').fadeOut();
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
<?php
|
||||
echo $this->Form->create('Attribute', array('class' => 'inline-form inline-field-form', 'id' => 'Attribute' . '_' . $object['id'] . '_to_ids_form', 'url' => '/attributes/editField/' . $object['id']));
|
||||
echo $this->Form->create('Attribute', array('class' => 'inline-form inline-field-form', 'id' => 'Attribute' . '_' . $object['id'] . '_to_ids_form', 'url' => '/attributes/editField/' . $object['id']));
|
||||
?>
|
||||
<div class='inline-input inline-input-container'>
|
||||
<div class="inline-input-accept inline-input-button inline-input-passive"><span class = "icon-ok" role="button" tabindex="0" aria-label="<?php echo __('Accept change'); ?>"></span></div>
|
||||
<div class="inline-input-decline inline-input-button inline-input-passive"><span class = "icon-remove" role="button" tabindex="0" aria-label="<?php echo __('Discard change'); ?>"></span></div>
|
||||
<div class='inline-input inline-input-container'>
|
||||
<div class="inline-input-accept inline-input-button inline-input-passive"><span class = "icon-ok" role="button" tabindex="0" aria-label="<?php echo __('Accept change'); ?>"></span></div>
|
||||
<div class="inline-input-decline inline-input-button inline-input-passive"><span class = "icon-remove" role="button" tabindex="0" aria-label="<?php echo __('Discard change'); ?>"></span></div>
|
||||
<?php
|
||||
$current = 0;
|
||||
if ($object['to_ids']) $current = 1;
|
||||
echo $this->Form->input('to_ids', array(
|
||||
'options' => array(0 => 'No', 1 => 'Yes'),
|
||||
'label' => false,
|
||||
'selected' => $current,
|
||||
'class' => 'inline-input',
|
||||
'id' => 'Attribute' . '_' . $object['id'] . '_to_ids_field',
|
||||
'div' => false
|
||||
));
|
||||
echo $this->Form->end();
|
||||
$current = 0;
|
||||
if ($object['to_ids']) $current = 1;
|
||||
echo $this->Form->input('to_ids', array(
|
||||
'options' => array(0 => 'No', 1 => 'Yes'),
|
||||
'label' => false,
|
||||
'selected' => $current,
|
||||
'class' => 'inline-input',
|
||||
'id' => 'Attribute' . '_' . $object['id'] . '_to_ids_field',
|
||||
'div' => false
|
||||
));
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
<?php
|
||||
echo $this->Form->create('Attribute', array('class' => 'inline-form inline-field-form', 'id' => 'Attribute_' . $object['id'] . '_type_form', 'url' => '/attributes/editField/' . $object['id']));
|
||||
echo $this->Form->create('Attribute', array('class' => 'inline-form inline-field-form', 'id' => 'Attribute_' . $object['id'] . '_type_form', 'url' => '/attributes/editField/' . $object['id']));
|
||||
?>
|
||||
<div class='inline-input inline-input-container'>
|
||||
<div class="inline-input-accept inline-input-button inline-input-passive"><span class = "icon-ok" role="button" tabindex="0" aria-label="<?php echo __('Accept change'); ?>"></span></div>
|
||||
<div class="inline-input-decline inline-input-button inline-input-passive"><span class = "icon-remove" role="button" tabindex="0" aria-label="<?php echo __('Discard change'); ?>"></span></div>
|
||||
<div class="inline-input-accept inline-input-button inline-input-passive"><span class = "icon-ok" role="button" tabindex="0" aria-label="<?php echo __('Accept change'); ?>"></span></div>
|
||||
<div class="inline-input-decline inline-input-button inline-input-passive"><span class = "icon-remove" role="button" tabindex="0" aria-label="<?php echo __('Discard change'); ?>"></span></div>
|
||||
<?php
|
||||
echo $this->Form->input('type', array(
|
||||
'options' => array(array_combine($categoryDefinitions[$object['category']]['types'], $categoryDefinitions[$object['category']]['types'])),
|
||||
'label' => false,
|
||||
'selected' => $object['type'],
|
||||
'error' => array('escape' => false),
|
||||
'class' => 'inline-input',
|
||||
'id' => 'Attribute_' . $object['id'] . '_type_field',
|
||||
'div' => false
|
||||
));
|
||||
echo $this->Form->end();
|
||||
echo $this->Form->input('type', array(
|
||||
'options' => array(array_combine($categoryDefinitions[$object['category']]['types'], $categoryDefinitions[$object['category']]['types'])),
|
||||
'label' => false,
|
||||
'selected' => $object['type'],
|
||||
'error' => array('escape' => false),
|
||||
'class' => 'inline-input',
|
||||
'id' => 'Attribute_' . $object['id'] . '_type_field',
|
||||
'div' => false
|
||||
));
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
|
||||
<?php
|
||||
echo $this->Form->create('Attribute', array('class' => 'inline-form inline-field-form', 'url' => '/attributes/editField/' . $object['id'], 'id' => 'Attribute_' . $object['id'] . '_value_form', 'default' => false));
|
||||
echo $this->Form->create('Attribute', array('class' => 'inline-form inline-field-form', 'url' => '/attributes/editField/' . $object['id'], 'id' => 'Attribute_' . $object['id'] . '_value_form', 'default' => false));
|
||||
?>
|
||||
<div class='inline-input inline-input-container'>
|
||||
<div class="inline-input-accept inline-input-button inline-input-passive"><span class = "icon-ok" role="button" tabindex="0" aria-label="<?php echo __('Accept change'); ?>"></span></div>
|
||||
<div class="inline-input-decline inline-input-button inline-input-passive"><span class = "icon-remove" role="button" tabindex="0" aria-label="<?php echo __('Discard change'); ?>"></span></div>
|
||||
<div class='inline-input inline-input-container'>
|
||||
<div class="inline-input-accept inline-input-button inline-input-passive"><span class = "icon-ok" role="button" tabindex="0" aria-label="<?php echo __('Accept change'); ?>"></span></div>
|
||||
<div class="inline-input-decline inline-input-button inline-input-passive"><span class = "icon-remove" role="button" tabindex="0" aria-label="<?php echo __('Discard change'); ?>"></span></div>
|
||||
<?php
|
||||
echo $this->Form->input('value', array(
|
||||
'type' => 'textarea',
|
||||
'label' => false,
|
||||
'value' => $object['value'],
|
||||
'error' => array('escape' => false),
|
||||
'class' => 'inline-input',
|
||||
'id' => 'Attribute_' . $object['id'] . '_value_field',
|
||||
'div' => false
|
||||
));
|
||||
echo $this->Form->input('value', array(
|
||||
'type' => 'textarea',
|
||||
'label' => false,
|
||||
'value' => $object['value'],
|
||||
'error' => array('escape' => false),
|
||||
'class' => 'inline-input',
|
||||
'id' => 'Attribute_' . $object['id'] . '_value_field',
|
||||
'div' => false
|
||||
));
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
<div class="confirmation">
|
||||
<?php
|
||||
echo $this->Form->create('Attribute', array('style' => 'margin:0px;', 'id' => 'PromptForm'));
|
||||
echo $this->Form->create('Attribute', array('style' => 'margin:0px;', 'id' => 'PromptForm'));
|
||||
?>
|
||||
<legend><?php echo __('Attribute Restoration'); ?></legend>
|
||||
<div style="padding-left:5px;padding-right:5px;padding-bottom:5px;">
|
||||
<p><?php echo __('Are you sure you want to undelete Attribute #%s?', h($id)); ?></p>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align:top">
|
||||
<span id="PromptYesButton" class="btn btn-primary" title="<?php echo __('Submit'); ?>" role="button" tabindex="0" aria-label="<?php echo __('Submit'); ?>" onClick="submitDeletion(<?php echo $event_id; ?>, 'restore', 'attributes', <?php echo $id;?>)"><?php echo __('Yes'); ?></span>
|
||||
</td>
|
||||
<td style="width:540px;">
|
||||
</td>
|
||||
<td style="vertical-align:top;">
|
||||
<span class="btn btn-inverse" id="PromptNoButton" title="<?php echo __('Cancel'); ?>" role="button" tabindex="0" aria-label="<?php echo __('Cancel'); ?>" onClick="cancelPrompt();"><?php echo __('No'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align:top">
|
||||
<span id="PromptYesButton" class="btn btn-primary" title="<?php echo __('Submit'); ?>" role="button" tabindex="0" aria-label="<?php echo __('Submit'); ?>" onClick="submitDeletion(<?php echo $event_id; ?>, 'restore', 'attributes', <?php echo $id;?>)"><?php echo __('Yes'); ?></span>
|
||||
</td>
|
||||
<td style="width:540px;">
|
||||
</td>
|
||||
<td style="vertical-align:top;">
|
||||
<span class="btn btn-inverse" id="PromptNoButton" title="<?php echo __('Cancel'); ?>" role="button" tabindex="0" aria-label="<?php echo __('Cancel'); ?>" onClick="cancelPrompt();"><?php echo __('No'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
<?php
|
||||
echo nl2br(h($value)) . ' ';
|
||||
echo nl2br(h($value)) . ' ';
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
foreach ($results as &$r):
|
||||
foreach ($r as $k => &$v):
|
||||
foreach ($results as &$r):
|
||||
foreach ($r as $k => &$v):
|
||||
?>
|
||||
<span class="bold blue"><?php echo h($k);?></span>: <span class="red">
|
||||
<?php echo is_array($v) ? implode('<br />', h($v)) : h($v); ?>
|
||||
</span><br />
|
||||
<span class="bold blue"><?php echo h($k);?></span>: <span class="red">
|
||||
<?php echo is_array($v) ? implode('<br />', h($v)) : h($v); ?>
|
||||
</span><br />
|
||||
<?php
|
||||
endforeach;
|
||||
endforeach;
|
||||
endforeach;
|
||||
endforeach;
|
||||
?>
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
<div class="confirmation">
|
||||
<?php
|
||||
echo $this->Form->create($model, array('style' => 'margin:0px;', 'id' => 'PromptForm', 'url' => '/' . strtolower($model) . 's/removeTag/' . $id . '/' . $tag_id));
|
||||
$action = "removeObjectTag('" . $model . "', '" . h($id) . "', '" . h($tag_id) . "');";
|
||||
?>
|
||||
<legend><?php echo __('Remove Tag'); ?></legend>
|
||||
<div style="padding-left:5px;padding-right:5px;padding-bottom:5px;">
|
||||
<p><?php echo __('Remove tag '); ?> (<?php echo h($tag_id); ?>) <?php echo __('from '); ?> <?php echo ucfirst(h($model)); ?> (<?php echo h($id); ?>)?</p>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align:top">
|
||||
<span id="PromptYesButton" class="btn btn-primary" title="<?php echo __('Remove'); ?>" role="button" tabindex="0" aria-label="<?php echo __('Remove'); ?>" onClick="<?php echo $action; ?>"><?php echo __('Yes'); ?></span>
|
||||
</td>
|
||||
<td style="width:540px;">
|
||||
</td>
|
||||
<td style="vertical-align:top;">
|
||||
<span class="btn btn-inverse" id="PromptNoButton" title="<?php echo __('Cancel'); ?>" role="button" tabindex="0" aria-label="<?php echo __('Cancel'); ?>" onClick="cancelPrompt();"><?php echo __('No'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
<?php
|
||||
echo $this->Form->create($model, array('style' => 'margin:0px;', 'id' => 'PromptForm', 'url' => '/' . strtolower($model) . 's/removeTag/' . $id . '/' . $tag_id));
|
||||
$action = "removeObjectTag('" . $model . "', '" . h($id) . "', '" . h($tag_id) . "');";
|
||||
?>
|
||||
<legend><?php echo __('Remove Tag'); ?></legend>
|
||||
<div style="padding-left:5px;padding-right:5px;padding-bottom:5px;">
|
||||
<p><?php echo __('Remove tag '); ?> (<?php echo h($tag_id); ?>) <?php echo __('from '); ?> <?php echo ucfirst(h($model)); ?> (<?php echo h($id); ?>)?</p>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align:top">
|
||||
<span id="PromptYesButton" class="btn btn-primary" title="<?php echo __('Remove'); ?>" role="button" tabindex="0" aria-label="<?php echo __('Remove'); ?>" onClick="<?php echo $action; ?>"><?php echo __('Yes'); ?></span>
|
||||
</td>
|
||||
<td style="width:540px;">
|
||||
</td>
|
||||
<td style="vertical-align:top;">
|
||||
<span class="btn btn-inverse" id="PromptNoButton" title="<?php echo __('Cancel'); ?>" role="button" tabindex="0" aria-label="<?php echo __('Cancel'); ?>" onClick="cancelPrompt();"><?php echo __('No'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
|
|
|
@ -1,33 +1,33 @@
|
|||
<div class="confirmation">
|
||||
<?php
|
||||
echo $this->Form->create('Attribute', array('style' => 'margin:0px;', 'id' => 'PromptForm', 'url' => '/attributes/toggleCorrelation/' . $attribute['Attribute']['id']));
|
||||
$extraTitle = "";
|
||||
?>
|
||||
<legend><?php echo __('Toggle Correlation %s ', $attribute['Attribute']['disable_correlation'] ? __('on') : __('off'));?></legend>
|
||||
<div style="padding-left:5px;padding-right:5px;padding-bottom:5px;">
|
||||
<p>
|
||||
<?php
|
||||
if ($attribute['Attribute']['disable_correlation']) {
|
||||
echo __('Re-enable the correlation for this attribute.');
|
||||
} else {
|
||||
echo __('This will remove all correlations that already exist for this attribute and prevents any attributes to be related as long as this setting is disabled. Make sure you understand the downsides of disabling correlations.');
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align:top">
|
||||
<span id="PromptYesButton" title="<?php echo __('Toggle correlation for attribute'); ?>" role="button" tabindex="0" aria-label="<?php echo __('Toggle correlation for attribute'); ?>" class="btn btn-primary" onClick="toggleCorrelation(<?php echo h($attribute['Attribute']['id']); ?>);"><?php echo __('Yes'); ?></span>
|
||||
</td>
|
||||
<td style="width:540px;">
|
||||
</td>
|
||||
<td style="vertical-align:top;">
|
||||
<span class="btn btn-inverse" title="<?php echo __('Cancel'); ?>" role="button" tabindex="0" aria-label="<?php echo __('Cancel'); ?>" id="PromptNoButton" onClick="cancelPrompt();"><?php echo __('No'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
<?php
|
||||
echo $this->Form->create('Attribute', array('style' => 'margin:0px;', 'id' => 'PromptForm', 'url' => '/attributes/toggleCorrelation/' . $attribute['Attribute']['id']));
|
||||
$extraTitle = "";
|
||||
?>
|
||||
<legend><?php echo __('Toggle Correlation %s ', $attribute['Attribute']['disable_correlation'] ? __('on') : __('off'));?></legend>
|
||||
<div style="padding-left:5px;padding-right:5px;padding-bottom:5px;">
|
||||
<p>
|
||||
<?php
|
||||
if ($attribute['Attribute']['disable_correlation']) {
|
||||
echo __('Re-enable the correlation for this attribute.');
|
||||
} else {
|
||||
echo __('This will remove all correlations that already exist for this attribute and prevents any attributes to be related as long as this setting is disabled. Make sure you understand the downsides of disabling correlations.');
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align:top">
|
||||
<span id="PromptYesButton" title="<?php echo __('Toggle correlation for attribute'); ?>" role="button" tabindex="0" aria-label="<?php echo __('Toggle correlation for attribute'); ?>" class="btn btn-primary" onClick="toggleCorrelation(<?php echo h($attribute['Attribute']['id']); ?>);"><?php echo __('Yes'); ?></span>
|
||||
</td>
|
||||
<td style="width:540px;">
|
||||
</td>
|
||||
<td style="vertical-align:top;">
|
||||
<span class="btn btn-inverse" title="<?php echo __('Cancel'); ?>" role="button" tabindex="0" aria-label="<?php echo __('Cancel'); ?>" id="PromptNoButton" onClick="cancelPrompt();"><?php echo __('No'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
|
|
|
@ -1,54 +1,54 @@
|
|||
<div class="event index">
|
||||
<h2><?php echo __('Alternate Search Results'); ?></h2>
|
||||
<p><?php echo __('This is a list of events that match the given search criteria sorted according to the percentage of matched attributes that are marked as IDS signatures (blue = IDS matches, red = non IDS matches).'); ?></p>
|
||||
<table class="table table-striped table-hover table-condensed">
|
||||
<tr>
|
||||
<th><?php echo __('Event id'); ?></th>
|
||||
<th><?php echo __('Org'); ?></th>
|
||||
<th><?php echo __('Event info'); ?></th>
|
||||
<th><?php echo __('Event date'); ?></th>
|
||||
<th><?php echo __('Event graph'); ?></th>
|
||||
<th><?php echo __('Matches'); ?></th>
|
||||
<th><?php echo __('Attribute Count'); ?></th>
|
||||
<h2><?php echo __('Alternate Search Results'); ?></h2>
|
||||
<p><?php echo __('This is a list of events that match the given search criteria sorted according to the percentage of matched attributes that are marked as IDS signatures (blue = IDS matches, red = non IDS matches).'); ?></p>
|
||||
<table class="table table-striped table-hover table-condensed">
|
||||
<tr>
|
||||
<th><?php echo __('Event id'); ?></th>
|
||||
<th><?php echo __('Org'); ?></th>
|
||||
<th><?php echo __('Event info'); ?></th>
|
||||
<th><?php echo __('Event date'); ?></th>
|
||||
<th><?php echo __('Event graph'); ?></th>
|
||||
<th><?php echo __('Matches'); ?></th>
|
||||
<th><?php echo __('Attribute Count'); ?></th>
|
||||
|
||||
</tr>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
foreach ($events as $event) {
|
||||
?>
|
||||
<tr>
|
||||
<td class="short"><a href="<?php echo $baseurl;?>/events/view/<?php echo h($event['Event']['id']); ?>"><?php echo h($event['Event']['id']); ?></a></td>
|
||||
<td class="short">
|
||||
<?php
|
||||
echo $this->OrgImg->getOrgImg(array('name' => $event['Event']['Orgc']['name'], 'id' => $event['Event']['Orgc']['id'], 'size' => 24));
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
if (strlen(h($event['Event']['info'])) > 63) {
|
||||
echo substr(h($event['Event']['info']), 0, 60) . '...';
|
||||
} else echo h($event['Event']['info']);
|
||||
?>
|
||||
</td>
|
||||
<td class="short"><?php echo h($event['Event']['date']); ?></td>
|
||||
<?php
|
||||
$to_ids = 100 * h($event['to_ids']) / (h($event['to_ids']) + h($event['no_ids']));
|
||||
?>
|
||||
<td>
|
||||
<div class="progress" style="width:300px;">
|
||||
<div class="bar bar-info" style="width:<?php echo $to_ids . '%'; ?>"></div>
|
||||
<div class="bar bar-danger" style="width:<?php echo 100-$to_ids . '%'; ?>"></div>
|
||||
<span style="position:absolute;width:300px;color:white;display: block;text-align:center;"><?php echo intval($to_ids) . '%'; ?></span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="short"><?php echo h($event['to_ids']) + h($event['no_ids']) ?></td>
|
||||
<td class="short"><?php echo h($event['Event']['attribute_count']) ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<?php
|
||||
foreach ($events as $event) {
|
||||
?>
|
||||
<tr>
|
||||
<td class="short"><a href="<?php echo $baseurl;?>/events/view/<?php echo h($event['Event']['id']); ?>"><?php echo h($event['Event']['id']); ?></a></td>
|
||||
<td class="short">
|
||||
<?php
|
||||
echo $this->OrgImg->getOrgImg(array('name' => $event['Event']['Orgc']['name'], 'id' => $event['Event']['Orgc']['id'], 'size' => 24));
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
if (strlen(h($event['Event']['info'])) > 63) {
|
||||
echo substr(h($event['Event']['info']), 0, 60) . '...';
|
||||
} else echo h($event['Event']['info']);
|
||||
?>
|
||||
</td>
|
||||
<td class="short"><?php echo h($event['Event']['date']); ?></td>
|
||||
<?php
|
||||
$to_ids = 100 * h($event['to_ids']) / (h($event['to_ids']) + h($event['no_ids']));
|
||||
?>
|
||||
<td>
|
||||
<div class="progress" style="width:300px;">
|
||||
<div class="bar bar-info" style="width:<?php echo $to_ids . '%'; ?>"></div>
|
||||
<div class="bar bar-danger" style="width:<?php echo 100-$to_ids . '%'; ?>"></div>
|
||||
<span style="position:absolute;width:300px;color:white;display: block;text-align:center;"><?php echo intval($to_ids) . '%'; ?></span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="short"><?php echo h($event['to_ids']) + h($event['no_ids']) ?></td>
|
||||
<td class="short"><?php echo h($event['Event']['attribute_count']) ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->element('side_menu', array('menuList' => 'event-collection', 'menuItem' => 'searchAttributes'));
|
||||
echo $this->element('side_menu', array('menuList' => 'event-collection', 'menuItem' => 'searchAttributes'));
|
||||
?>
|
||||
|
|
|
@ -2,53 +2,53 @@
|
|||
<?php
|
||||
echo $this->Form->create('Attribute', array('id', 'url' => '/attributes/attributeReplace/' . $event_id));
|
||||
?>
|
||||
<fieldset>
|
||||
<legend><?php echo __('Attribute Replace Tool'); ?></legend>
|
||||
<div class="add_attribute_fields">
|
||||
<p><?php echo __("Choose a category and a type, then paste a list of IOCs that match the selection into the field below. This will delete all of the attributes not found in the new inserted list, whilst creating the attributes that are in the new list but don't exist as attributes. Found matches will be left untouched."); ?></p>
|
||||
<?php
|
||||
echo $this->Form->hidden('event_id');
|
||||
echo $this->Form->input('category', array(
|
||||
'empty' => __('(choose one)')
|
||||
));
|
||||
echo $this->Form->input('type', array(
|
||||
'empty' => __('(first choose category)')
|
||||
));
|
||||
echo $this->Form->input('to_ids', array(
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Mark all new attributes as to IDS'),
|
||||
));
|
||||
echo $this->Form->input('value', array(
|
||||
'type' => 'textarea',
|
||||
'error' => array('escape' => false),
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge',
|
||||
'label' => __('Values')
|
||||
));
|
||||
$this->Js->get('#AttributeCategory')->event('change', 'formCategoryChanged("#AttributeCategory")');
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<p style="color:red;font-weight:bold;display:none;" id="warning-message"><?php echo __('Warning: You are about to share data that is of a classified nature (Attribution / targeting data). Make sure that you are authorised to share this.'); ?></p>
|
||||
<div class="overlay_spacing">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align:top">
|
||||
<span id="submitButton" class="btn btn-primary" title="<?php echo __('Replace attributes'); ?>" role="button" tabindex="0" aria-label="<?php echo __('Replaceattributes'); ?>" onClick="submitPopoverForm('<?php echo $event_id;?>', 'replaceAttributes')"><?php echo __('Submit'); ?></span>
|
||||
</td>
|
||||
<td style="width:540px;">
|
||||
<p style="color:red;font-weight:bold;display:none;text-align:center" id="warning-message"><?php echo __('Warning: You are about to share data that is of a classified nature (Attribution / targeting data). Make sure that you are authorised to share this.'); ?></p>
|
||||
</td>
|
||||
<td style="vertical-align:top;">
|
||||
<span class="btn btn-inverse" id="cancel_attribute_add" title="<?php echo __('Cancel'); ?>" role="button" tabindex="0" aria-label="<?php echo __('Cancel'); ?>"><?php echo __('Cancel'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
<fieldset>
|
||||
<legend><?php echo __('Attribute Replace Tool'); ?></legend>
|
||||
<div class="add_attribute_fields">
|
||||
<p><?php echo __("Choose a category and a type, then paste a list of IOCs that match the selection into the field below. This will delete all of the attributes not found in the new inserted list, whilst creating the attributes that are in the new list but don't exist as attributes. Found matches will be left untouched."); ?></p>
|
||||
<?php
|
||||
echo $this->Form->hidden('event_id');
|
||||
echo $this->Form->input('category', array(
|
||||
'empty' => __('(choose one)')
|
||||
));
|
||||
echo $this->Form->input('type', array(
|
||||
'empty' => __('(first choose category)')
|
||||
));
|
||||
echo $this->Form->input('to_ids', array(
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Mark all new attributes as to IDS'),
|
||||
));
|
||||
echo $this->Form->input('value', array(
|
||||
'type' => 'textarea',
|
||||
'error' => array('escape' => false),
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge',
|
||||
'label' => __('Values')
|
||||
));
|
||||
$this->Js->get('#AttributeCategory')->event('change', 'formCategoryChanged("#AttributeCategory")');
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<p style="color:red;font-weight:bold;display:none;" id="warning-message"><?php echo __('Warning: You are about to share data that is of a classified nature (Attribution / targeting data). Make sure that you are authorised to share this.'); ?></p>
|
||||
<div class="overlay_spacing">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align:top">
|
||||
<span id="submitButton" class="btn btn-primary" title="<?php echo __('Replace attributes'); ?>" role="button" tabindex="0" aria-label="<?php echo __('Replaceattributes'); ?>" onClick="submitPopoverForm('<?php echo $event_id;?>', 'replaceAttributes')"><?php echo __('Submit'); ?></span>
|
||||
</td>
|
||||
<td style="width:540px;">
|
||||
<p style="color:red;font-weight:bold;display:none;text-align:center" id="warning-message"><?php echo __('Warning: You are about to share data that is of a classified nature (Attribution / targeting data). Make sure that you are authorised to share this.'); ?></p>
|
||||
</td>
|
||||
<td style="vertical-align:top;">
|
||||
<span class="btn btn-inverse" id="cancel_attribute_add" title="<?php echo __('Cancel'); ?>" role="button" tabindex="0" aria-label="<?php echo __('Cancel'); ?>"><?php echo __('Cancel'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
@ -58,26 +58,26 @@ echo $this->Form->create('Attribute', array('id', 'url' => '/attributes/attribut
|
|||
var category_type_mapping = new Array();
|
||||
<?php
|
||||
foreach ($categoryDefinitions as $category => $def) {
|
||||
echo "category_type_mapping['" . addslashes($category) . "'] = {";
|
||||
$first = true;
|
||||
foreach ($def['types'] as $type) {
|
||||
if ($first) $first = false;
|
||||
else echo ', ';
|
||||
echo "'" . addslashes($type) . "' : '" . addslashes($type) . "'";
|
||||
}
|
||||
echo "}; \n";
|
||||
echo "category_type_mapping['" . addslashes($category) . "'] = {";
|
||||
$first = true;
|
||||
foreach ($def['types'] as $type) {
|
||||
if ($first) $first = false;
|
||||
else echo ', ';
|
||||
echo "'" . addslashes($type) . "' : '" . addslashes($type) . "'";
|
||||
}
|
||||
echo "}; \n";
|
||||
}
|
||||
?>
|
||||
|
||||
function formCategoryChanged(id) {
|
||||
// fill in the types
|
||||
var options = $('#AttributeType').prop('options');
|
||||
$('option', $('#AttributeType')).remove();
|
||||
$.each(category_type_mapping[$('#AttributeCategory').val()], function(val, text) {
|
||||
options[options.length] = new Option(text, val);
|
||||
});
|
||||
// enable the form element
|
||||
$('#AttributeType').prop('disabled', false);
|
||||
// fill in the types
|
||||
var options = $('#AttributeType').prop('options');
|
||||
$('option', $('#AttributeType')).remove();
|
||||
$.each(category_type_mapping[$('#AttributeCategory').val()], function(val, text) {
|
||||
options[options.length] = new Option(text, val);
|
||||
});
|
||||
// enable the form element
|
||||
$('#AttributeType').prop('disabled', false);
|
||||
}
|
||||
//
|
||||
//Generate tooltip information
|
||||
|
@ -86,68 +86,68 @@ var formInfoValues = new Array();
|
|||
var fieldsArray = new Array('AttributeCategory', 'AttributeType');
|
||||
<?php
|
||||
foreach ($typeDefinitions as $type => $def) {
|
||||
$info = isset($def['formdesc']) ? $def['formdesc'] : $def['desc'];
|
||||
echo "formInfoValues['" . addslashes($type) . "'] = \"" . addslashes($info) . "\";\n"; // as we output JS code we need to add slashes
|
||||
$info = isset($def['formdesc']) ? $def['formdesc'] : $def['desc'];
|
||||
echo "formInfoValues['" . addslashes($type) . "'] = \"" . addslashes($info) . "\";\n"; // as we output JS code we need to add slashes
|
||||
}
|
||||
foreach ($categoryDefinitions as $category => $def) {
|
||||
$info = isset($def['formdesc']) ? $def['formdesc'] : $def['desc'];
|
||||
echo "formInfoValues['" . addslashes($category) . "'] = \"" . addslashes($info) . "\";\n"; // as we output JS code we need to add slashes
|
||||
$info = isset($def['formdesc']) ? $def['formdesc'] : $def['desc'];
|
||||
echo "formInfoValues['" . addslashes($category) . "'] = \"" . addslashes($info) . "\";\n"; // as we output JS code we need to add slashes
|
||||
}
|
||||
?>
|
||||
|
||||
$(document).ready(function() {
|
||||
$("#AttributeType, #AttributeCategory").on('mouseover', function(e) {
|
||||
var $e = $(e.target);
|
||||
if ($e.is('option')) {
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
$('#'+e.currentTarget.id).popover({
|
||||
trigger: 'focus',
|
||||
placement: 'right',
|
||||
container: 'body',
|
||||
content: formInfoValues[$e.val()],
|
||||
}).popover('show');
|
||||
}
|
||||
});
|
||||
$("#AttributeType, #AttributeCategory").on('mouseover', function(e) {
|
||||
var $e = $(e.target);
|
||||
if ($e.is('option')) {
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
$('#'+e.currentTarget.id).popover({
|
||||
trigger: 'focus',
|
||||
placement: 'right',
|
||||
container: 'body',
|
||||
content: formInfoValues[$e.val()],
|
||||
}).popover('show');
|
||||
}
|
||||
});
|
||||
|
||||
$("input, label").on('mouseleave', function(e) {
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
});
|
||||
$("input, label").on('mouseleave', function(e) {
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
});
|
||||
|
||||
$("input, label").on('mouseover', function(e) {
|
||||
var $e = $(e.target);
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
$('#'+e.currentTarget.id).popover({
|
||||
trigger: 'focus',
|
||||
placement: 'right',
|
||||
container: 'body',
|
||||
}).popover('show');
|
||||
});
|
||||
$("input, label").on('mouseover', function(e) {
|
||||
var $e = $(e.target);
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
$('#'+e.currentTarget.id).popover({
|
||||
trigger: 'focus',
|
||||
placement: 'right',
|
||||
container: 'body',
|
||||
}).popover('show');
|
||||
});
|
||||
|
||||
// workaround for browsers like IE and Chrome that do now have an onmouseover on the 'options' of a select.
|
||||
// disadvangate is that user needs to click on the item to see the tooltip.
|
||||
// no solutions exist, except to generate the select completely using html.
|
||||
$("#AttributeType, #AttributeCategory").on('change', function(e) {
|
||||
if (this.id === "AttributeCategory") {
|
||||
var select = document.getElementById("AttributeCategory");
|
||||
if (select.value === 'Attribution' || select.value === 'Targeting data') {
|
||||
$("#warning-message").show();
|
||||
} else {
|
||||
$("#warning-message").hide();
|
||||
}
|
||||
}
|
||||
var $e = $(e.target);
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
$('#'+e.currentTarget.id).popover({
|
||||
trigger: 'focus',
|
||||
placement: 'right',
|
||||
container: 'body',
|
||||
content: formInfoValues[$e.val()],
|
||||
}).popover('show');
|
||||
});
|
||||
// workaround for browsers like IE and Chrome that do now have an onmouseover on the 'options' of a select.
|
||||
// disadvangate is that user needs to click on the item to see the tooltip.
|
||||
// no solutions exist, except to generate the select completely using html.
|
||||
$("#AttributeType, #AttributeCategory").on('change', function(e) {
|
||||
if (this.id === "AttributeCategory") {
|
||||
var select = document.getElementById("AttributeCategory");
|
||||
if (select.value === 'Attribution' || select.value === 'Targeting data') {
|
||||
$("#warning-message").show();
|
||||
} else {
|
||||
$("#warning-message").hide();
|
||||
}
|
||||
}
|
||||
var $e = $(e.target);
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
$('#'+e.currentTarget.id).popover({
|
||||
trigger: 'focus',
|
||||
placement: 'right',
|
||||
container: 'body',
|
||||
content: formInfoValues[$e.val()],
|
||||
}).popover('show');
|
||||
});
|
||||
|
||||
$('#cancel_attribute_add').click(function() {
|
||||
cancelPopoverForm();
|
||||
});
|
||||
$('#cancel_attribute_add').click(function() {
|
||||
cancelPopoverForm();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php echo $this->Js->writeBuffer(); // Write cached scripts
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
foreach ($attributes as $attribute) {
|
||||
echo $attribute;
|
||||
echo PHP_EOL;
|
||||
echo $attribute;
|
||||
echo PHP_EOL;
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<div class="composites index">
|
||||
<h2><?php echo __('Failed Composites'); ?></h2><?php
|
||||
<h2><?php echo __('Failed Composites'); ?></h2><?php
|
||||
if (0 == count($fails)):?>
|
||||
<p><?php echo __('No Failed Composites'); ?></p>
|
||||
<?php else:?>
|
||||
<ul>
|
||||
<?php foreach ($fails as $key => $value) echo '<li>' . $key . ' : ' . h($value) . '</li>'; ?>
|
||||
</ul>
|
||||
<?php
|
||||
<p><?php echo __('No Failed Composites'); ?></p>
|
||||
<?php else:?>
|
||||
<ul>
|
||||
<?php foreach ($fails as $key => $value) echo '<li>' . $key . ' : ' . h($value) . '</li>'; ?>
|
||||
</ul>
|
||||
<?php
|
||||
endif;?>
|
||||
</div>
|
||||
|
|
|
@ -1,143 +1,143 @@
|
|||
<div class="attributes <?php if (!isset($ajax) || !$ajax) echo 'form';?>">
|
||||
<?php echo $this->Form->create('Attribute');?>
|
||||
<fieldset>
|
||||
<legend><?php echo __('Edit Attribute'); ?></legend>
|
||||
<?php
|
||||
echo $this->Form->hidden('event_id');
|
||||
echo $this->Form->input('category', array(
|
||||
'empty' => __('(choose one)'),
|
||||
'label' => __('Category ') . $this->element('formInfo', array('type' => 'category'))
|
||||
));
|
||||
$typeInputData = array(
|
||||
'empty' => __('(first choose category)'),
|
||||
'label' => __('Type ') . $this->element('formInfo', array('type' => 'type')),
|
||||
);
|
||||
if ($objectAttribute) {
|
||||
$typeInputData[] = __('disabled');
|
||||
}
|
||||
echo $this->Form->input('type', $typeInputData);
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
<?php
|
||||
echo $this->Form->input('distribution', array(
|
||||
'options' => array($distributionLevels),
|
||||
'label' => __('Distribution ') . $this->element('formInfo', array('type' => 'distribution'))
|
||||
));
|
||||
?>
|
||||
<div id="SGContainer" style="display:none;">
|
||||
<?php
|
||||
if (!empty($sharingGroups)) {
|
||||
echo $this->Form->input('sharing_group_id', array(
|
||||
'options' => array($sharingGroups),
|
||||
'label' => __('Sharing Group'),
|
||||
));
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->input('value', array(
|
||||
'type' => 'textarea',
|
||||
'error' => array('escape' => false),
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge'
|
||||
));
|
||||
echo $this->Form->input('comment', array(
|
||||
'type' => 'text',
|
||||
'label' => __('Contextual Comment'),
|
||||
'error' => array('escape' => false),
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge'
|
||||
));
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
<?php
|
||||
echo $this->Form->input('to_ids', array(
|
||||
'label' => __('for Intrusion Detection System'),
|
||||
));
|
||||
if (!$objectAttribute) {
|
||||
echo $this->Form->input('batch_import', array(
|
||||
'type' => 'checkbox',
|
||||
));
|
||||
}
|
||||
?>
|
||||
</fieldset>
|
||||
<p style="color:red;font-weight:bold;display:none;<?php if (isset($ajax) && $ajax) echo "text-align:center;";?> " id="warning-message"><?php echo __('Warning: You are about to share data that is of a sensitive nature (Attribution / targeting data). Make sure that you are authorised to share this.'); ?></p>
|
||||
<fieldset>
|
||||
<legend><?php echo __('Edit Attribute'); ?></legend>
|
||||
<?php
|
||||
echo $this->Form->hidden('event_id');
|
||||
echo $this->Form->input('category', array(
|
||||
'empty' => __('(choose one)'),
|
||||
'label' => __('Category ') . $this->element('formInfo', array('type' => 'category'))
|
||||
));
|
||||
$typeInputData = array(
|
||||
'empty' => __('(first choose category)'),
|
||||
'label' => __('Type ') . $this->element('formInfo', array('type' => 'type')),
|
||||
);
|
||||
if ($objectAttribute) {
|
||||
$typeInputData[] = __('disabled');
|
||||
}
|
||||
echo $this->Form->input('type', $typeInputData);
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
<?php
|
||||
echo $this->Form->input('distribution', array(
|
||||
'options' => array($distributionLevels),
|
||||
'label' => __('Distribution ') . $this->element('formInfo', array('type' => 'distribution'))
|
||||
));
|
||||
?>
|
||||
<div id="SGContainer" style="display:none;">
|
||||
<?php
|
||||
if (!empty($sharingGroups)) {
|
||||
echo $this->Form->input('sharing_group_id', array(
|
||||
'options' => array($sharingGroups),
|
||||
'label' => __('Sharing Group'),
|
||||
));
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->input('value', array(
|
||||
'type' => 'textarea',
|
||||
'error' => array('escape' => false),
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge'
|
||||
));
|
||||
echo $this->Form->input('comment', array(
|
||||
'type' => 'text',
|
||||
'label' => __('Contextual Comment'),
|
||||
'error' => array('escape' => false),
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge'
|
||||
));
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
<?php
|
||||
echo $this->Form->input('to_ids', array(
|
||||
'label' => __('for Intrusion Detection System'),
|
||||
));
|
||||
if (!$objectAttribute) {
|
||||
echo $this->Form->input('batch_import', array(
|
||||
'type' => 'checkbox',
|
||||
));
|
||||
}
|
||||
?>
|
||||
</fieldset>
|
||||
<p style="color:red;font-weight:bold;display:none;<?php if (isset($ajax) && $ajax) echo "text-align:center;";?> " id="warning-message"><?php echo __('Warning: You are about to share data that is of a sensitive nature (Attribution / targeting data). Make sure that you are authorised to share this.'); ?></p>
|
||||
<?php
|
||||
echo $this->Form->button('Submit', array('class' => 'btn btn-primary'));
|
||||
echo $this->Form->end();
|
||||
echo $this->Form->button('Submit', array('class' => 'btn btn-primary'));
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
if (!$ajax) {
|
||||
$event['Event']['id'] = $this->request->data['Attribute']['event_id'];
|
||||
$event['Event']['published'] = $published;
|
||||
echo $this->element('side_menu', array('menuList' => 'event', 'menuItem' => 'addAttribute', 'event' => $event));
|
||||
}
|
||||
if (!$ajax) {
|
||||
$event['Event']['id'] = $this->request->data['Attribute']['event_id'];
|
||||
$event['Event']['published'] = $published;
|
||||
echo $this->element('side_menu', array('menuList' => 'event', 'menuItem' => 'addAttribute', 'event' => $event));
|
||||
}
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
var fieldsArray = new Array('AttributeCategory', 'AttributeType', 'AttributeValue', 'AttributeDistribution', 'AttributeComment', 'AttributeToIds', 'AttributeBatchImport', 'AttributeSharingGroupId');
|
||||
<?php
|
||||
$formInfoTypes = array('distribution' => 'Distribution', 'category' => 'Category', 'type' => 'Type');
|
||||
echo 'var formInfoFields = ' . json_encode($formInfoTypes) . PHP_EOL;
|
||||
foreach ($formInfoTypes as $formInfoType => $humanisedName) {
|
||||
echo 'var ' . $formInfoType . 'FormInfoValues = {' . PHP_EOL;
|
||||
foreach ($info[$formInfoType] as $key => $formInfoData) {
|
||||
echo '"' . $key . '": "<span class=\"blue bold\">' . h($formInfoData['key']) . '</span>: ' . h($formInfoData['desc']) . '<br />",' . PHP_EOL;
|
||||
}
|
||||
echo '}' . PHP_EOL;
|
||||
}
|
||||
$formInfoTypes = array('distribution' => 'Distribution', 'category' => 'Category', 'type' => 'Type');
|
||||
echo 'var formInfoFields = ' . json_encode($formInfoTypes) . PHP_EOL;
|
||||
foreach ($formInfoTypes as $formInfoType => $humanisedName) {
|
||||
echo 'var ' . $formInfoType . 'FormInfoValues = {' . PHP_EOL;
|
||||
foreach ($info[$formInfoType] as $key => $formInfoData) {
|
||||
echo '"' . $key . '": "<span class=\"blue bold\">' . h($formInfoData['key']) . '</span>: ' . h($formInfoData['desc']) . '<br />",' . PHP_EOL;
|
||||
}
|
||||
echo '}' . PHP_EOL;
|
||||
}
|
||||
?>
|
||||
//
|
||||
//Generate Category / Type filtering array
|
||||
//
|
||||
var category_type_mapping = new Array();
|
||||
<?php
|
||||
foreach ($categoryDefinitions as $category => $def) {
|
||||
echo "category_type_mapping['" . addslashes($category) . "'] = {";
|
||||
$first = true;
|
||||
foreach ($def['types'] as $type) {
|
||||
if ($first) $first = false;
|
||||
else echo ', ';
|
||||
echo "'" . addslashes($type) . "' : '" . addslashes($type) . "'";
|
||||
}
|
||||
echo "}; \n";
|
||||
}
|
||||
foreach ($categoryDefinitions as $category => $def) {
|
||||
echo "category_type_mapping['" . addslashes($category) . "'] = {";
|
||||
$first = true;
|
||||
foreach ($def['types'] as $type) {
|
||||
if ($first) $first = false;
|
||||
else echo ', ';
|
||||
echo "'" . addslashes($type) . "' : '" . addslashes($type) . "'";
|
||||
}
|
||||
echo "}; \n";
|
||||
}
|
||||
?>
|
||||
|
||||
$(document).ready(function() {
|
||||
initPopoverContent('Attribute');
|
||||
$('#AttributeDistribution').change(function() {
|
||||
if ($('#AttributeDistribution').val() == 4) $('#SGContainer').show();
|
||||
else $('#SGContainer').hide();
|
||||
});
|
||||
initPopoverContent('Attribute');
|
||||
$('#AttributeDistribution').change(function() {
|
||||
if ($('#AttributeDistribution').val() == 4) $('#SGContainer').show();
|
||||
else $('#SGContainer').hide();
|
||||
});
|
||||
|
||||
<?php
|
||||
if (!$objectAttribute):
|
||||
?>
|
||||
$("#AttributeCategory").on('change', function(e) {
|
||||
formCategoryChanged('Attribute');
|
||||
if ($(this).val() === 'Attribution' || $(this).val() === 'Targeting data') {
|
||||
$("#warning-message").show();
|
||||
} else {
|
||||
$("#warning-message").hide();
|
||||
}
|
||||
if ($(this).val() === 'Internal reference') {
|
||||
$("#AttributeDistribution").val('0');
|
||||
$('#SGContainer').hide();
|
||||
}
|
||||
});
|
||||
<?php
|
||||
if (!$objectAttribute):
|
||||
?>
|
||||
$("#AttributeCategory").on('change', function(e) {
|
||||
formCategoryChanged('Attribute');
|
||||
if ($(this).val() === 'Attribution' || $(this).val() === 'Targeting data') {
|
||||
$("#warning-message").show();
|
||||
} else {
|
||||
$("#warning-message").hide();
|
||||
}
|
||||
if ($(this).val() === 'Internal reference') {
|
||||
$("#AttributeDistribution").val('0');
|
||||
$('#SGContainer').hide();
|
||||
}
|
||||
});
|
||||
var start = $("#AttributeType").val();
|
||||
formCategoryChanged('Attribute');
|
||||
$("#AttributeType").val(start);
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
|
||||
$("#AttributeCategory, #AttributeType, #AttributeDistribution").change(function() {
|
||||
var start = $("#AttributeType").val();
|
||||
initPopoverContent('Attribute');
|
||||
$("#AttributeType").val(start);
|
||||
});
|
||||
$("#AttributeCategory, #AttributeType, #AttributeDistribution").change(function() {
|
||||
var start = $("#AttributeType").val();
|
||||
initPopoverContent('Attribute');
|
||||
$("#AttributeType").val(start);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php echo $this->Js->writeBuffer(); // Write cached scripts
|
||||
|
|
|
@ -1,203 +1,203 @@
|
|||
<div class="attributes index">
|
||||
<h2><?php echo __('Attributes'); ?></h2>
|
||||
<?php
|
||||
if ($isSearch == 1) {
|
||||
// The following block should serve as an example and food
|
||||
// for thought on how to optimize i18n & l10n (especially for languages that are not SOV)
|
||||
echo "<h4>" . __("Results for all attributes");
|
||||
if ($keywordSearch != null) echo __(" with the value containing "). "\"<b>" . h($keywordSearch) . "</b>\"";
|
||||
if ($attributeTags != null) echo __(" being tagged with ") ."\"<b>" . h($attributeTags) . "</b>\"";
|
||||
if ($keywordSearch2 != null) echo __(" from the events ") . "\"<b>" . h($keywordSearch2) . "</b>\"";
|
||||
if ($tags != null) echo " from events tagged \"<b>" . h($tags) . "</b>\"";
|
||||
if ($categorySearch != "ALL") echo __(" of category ") . "\"<b>" . h($categorySearch) . "</b>\"";
|
||||
if ($typeSearch != "ALL") echo __(" of type ") . "\"<b>" . h($typeSearch) . "</b>\"";
|
||||
if (isset($orgSearch) && $orgSearch != '' && $orgSearch != null) echo __(" created by the organisation ") . "\"<b>" . h($orgSearch) . "</b>\"";
|
||||
echo ":</h4>";
|
||||
}
|
||||
?>
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<?php
|
||||
$this->Paginator->options(array(
|
||||
'update' => '.span12',
|
||||
'evalScripts' => true,
|
||||
'before' => '$(".progress").show()',
|
||||
'complete' => '$(".progress").hide()',
|
||||
));
|
||||
<h2><?php echo __('Attributes'); ?></h2>
|
||||
<?php
|
||||
if ($isSearch == 1) {
|
||||
// The following block should serve as an example and food
|
||||
// for thought on how to optimize i18n & l10n (especially for languages that are not SOV)
|
||||
echo "<h4>" . __("Results for all attributes");
|
||||
if ($keywordSearch != null) echo __(" with the value containing "). "\"<b>" . h($keywordSearch) . "</b>\"";
|
||||
if ($attributeTags != null) echo __(" being tagged with ") ."\"<b>" . h($attributeTags) . "</b>\"";
|
||||
if ($keywordSearch2 != null) echo __(" from the events ") . "\"<b>" . h($keywordSearch2) . "</b>\"";
|
||||
if ($tags != null) echo " from events tagged \"<b>" . h($tags) . "</b>\"";
|
||||
if ($categorySearch != "ALL") echo __(" of category ") . "\"<b>" . h($categorySearch) . "</b>\"";
|
||||
if ($typeSearch != "ALL") echo __(" of type ") . "\"<b>" . h($typeSearch) . "</b>\"";
|
||||
if (isset($orgSearch) && $orgSearch != '' && $orgSearch != null) echo __(" created by the organisation ") . "\"<b>" . h($orgSearch) . "</b>\"";
|
||||
echo ":</h4>";
|
||||
}
|
||||
?>
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<?php
|
||||
$this->Paginator->options(array(
|
||||
'update' => '.span12',
|
||||
'evalScripts' => true,
|
||||
'before' => '$(".progress").show()',
|
||||
'complete' => '$(".progress").hide()',
|
||||
));
|
||||
|
||||
echo $this->Paginator->prev('« ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
echo $this->Paginator->numbers(array('modulus' => 20, 'separator' => '', 'tag' => 'li', 'currentClass' => 'active', 'currentTag' => 'span'));
|
||||
echo $this->Paginator->next(__('next') . ' »', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<table class="table table-striped table-hover table-condensed">
|
||||
<tr>
|
||||
<th><?php echo $this->Paginator->sort('event_id');?></th>
|
||||
<?php if (Configure::read('MISP.showorg') || $isAdmin): ?>
|
||||
<th><?php echo $this->Paginator->sort('org_id', 'Org');?></th>
|
||||
<?php endif; ?>
|
||||
<th><?php echo $this->Paginator->sort('category');?></th>
|
||||
<th><?php echo $this->Paginator->sort('type');?></th>
|
||||
<th><?php echo $this->Paginator->sort('value');?></th>
|
||||
<th>Tags</th>
|
||||
<th><?php echo $this->Paginator->sort('comment');?></th>
|
||||
<th<?php echo ' title="' . $attrDescriptions['signature']['desc'] . '"';?>>
|
||||
<?php echo $this->Paginator->sort('IDS');?></th>
|
||||
<th class="actions">Actions</th>
|
||||
</tr>
|
||||
<?php
|
||||
$currentCount = 0;
|
||||
if ($isSearch == 1) {
|
||||
echo $this->Paginator->prev('« ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
echo $this->Paginator->numbers(array('modulus' => 20, 'separator' => '', 'tag' => 'li', 'currentClass' => 'active', 'currentTag' => 'span'));
|
||||
echo $this->Paginator->next(__('next') . ' »', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<table class="table table-striped table-hover table-condensed">
|
||||
<tr>
|
||||
<th><?php echo $this->Paginator->sort('event_id');?></th>
|
||||
<?php if (Configure::read('MISP.showorg') || $isAdmin): ?>
|
||||
<th><?php echo $this->Paginator->sort('org_id', 'Org');?></th>
|
||||
<?php endif; ?>
|
||||
<th><?php echo $this->Paginator->sort('category');?></th>
|
||||
<th><?php echo $this->Paginator->sort('type');?></th>
|
||||
<th><?php echo $this->Paginator->sort('value');?></th>
|
||||
<th>Tags</th>
|
||||
<th><?php echo $this->Paginator->sort('comment');?></th>
|
||||
<th<?php echo ' title="' . $attrDescriptions['signature']['desc'] . '"';?>>
|
||||
<?php echo $this->Paginator->sort('IDS');?></th>
|
||||
<th class="actions">Actions</th>
|
||||
</tr>
|
||||
<?php
|
||||
$currentCount = 0;
|
||||
if ($isSearch == 1) {
|
||||
|
||||
// sanitize data
|
||||
if (isset($keywordArray)) {
|
||||
foreach ($keywordArray as &$keywordArrayElement) {
|
||||
$keywordArrayElement = h($keywordArrayElement);
|
||||
}
|
||||
// build the $replacePairs variable used to highlight the keywords
|
||||
$replacePairs = $this->Highlight->build_replace_pairs($keywordArray);
|
||||
}
|
||||
}
|
||||
// sanitize data
|
||||
if (isset($keywordArray)) {
|
||||
foreach ($keywordArray as &$keywordArrayElement) {
|
||||
$keywordArrayElement = h($keywordArrayElement);
|
||||
}
|
||||
// build the $replacePairs variable used to highlight the keywords
|
||||
$replacePairs = $this->Highlight->build_replace_pairs($keywordArray);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($attributes as $attribute):
|
||||
?>
|
||||
<tr>
|
||||
<td class="short">
|
||||
<div ondblclick="document.location='<?php echo $baseurl?>/events/view/<?php echo $attribute['Event']['id'];?>';" title="<?php echo h($attribute['Event']['info']); ?>">
|
||||
<?php
|
||||
if ($attribute['Event']['orgc_id'] == $me['org_id']) {
|
||||
$style='style="color:red;"';
|
||||
} else {
|
||||
$style='';
|
||||
}
|
||||
$currentCount++;
|
||||
?>
|
||||
<a href="<?php echo $baseurl;?>/events/view/<?php echo $attribute['Event']['id'];?>" <?php echo $style;?>><?php echo $attribute['Event']['id'];?></a>
|
||||
</div>
|
||||
</td>
|
||||
<?php if (Configure::read('MISP.showorg') || $isAdmin): ?>
|
||||
<td class="short" ondblclick="document.location.href ='<?php echo $baseurl;?>/events/view/<?php echo $attribute['Event']['id'];?>'">
|
||||
<?php
|
||||
?>
|
||||
<tr>
|
||||
<td class="short">
|
||||
<div ondblclick="document.location='<?php echo $baseurl?>/events/view/<?php echo $attribute['Event']['id'];?>';" title="<?php echo h($attribute['Event']['info']); ?>">
|
||||
<?php
|
||||
if ($attribute['Event']['orgc_id'] == $me['org_id']) {
|
||||
$style='style="color:red;"';
|
||||
} else {
|
||||
$style='';
|
||||
}
|
||||
$currentCount++;
|
||||
?>
|
||||
<a href="<?php echo $baseurl;?>/events/view/<?php echo $attribute['Event']['id'];?>" <?php echo $style;?>><?php echo $attribute['Event']['id'];?></a>
|
||||
</div>
|
||||
</td>
|
||||
<?php if (Configure::read('MISP.showorg') || $isAdmin): ?>
|
||||
<td class="short" ondblclick="document.location.href ='<?php echo $baseurl;?>/events/view/<?php echo $attribute['Event']['id'];?>'">
|
||||
<?php
|
||||
echo $this->OrgImg->getOrgImg(array('name' => $attribute['Event']['Orgc']['name'], 'id' => $attribute['Event']['orgc_id'], 'size' => 24));
|
||||
?>
|
||||
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<td title="<?php echo $categoryDefinitions[$attribute['Attribute']['category']]['desc'];?>" class="short" ondblclick="document.location='<?php echo $baseurl;?>/events/view/<?php echo $attribute['Event']['id'];?>';">
|
||||
<?php echo h($attribute['Attribute']['category']); ?> </td>
|
||||
<td title="<?php if (isset($typeDefinitions[$attribute['Attribute']['type']])) echo $typeDefinitions[$attribute['Attribute']['type']]['desc'];?>" class="short" ondblclick="document.location='<?php echo $baseurl;?>/events/view/<?php echo $attribute['Event']['id'];?>';">
|
||||
<?php echo h($attribute['Attribute']['type']); ?> </td>
|
||||
<td class="showspaces" ondblclick="document.location='<?php echo $baseurl;?>/events/view/<?php echo $attribute['Event']['id'];?>';"><?php
|
||||
$sigDisplay = nl2br(h($attribute['Attribute']['value']));
|
||||
if ($isSearch == 1 && !empty($replacePairs)) {
|
||||
// highlight the keywords if there are any
|
||||
$sigDisplay = $this->Highlight->highlighter($sigDisplay, $replacePairs);
|
||||
}
|
||||
if ('attachment' == $attribute['Attribute']['type'] || 'malware-sample' == $attribute['Attribute']['type']) {
|
||||
if ($attribute['Attribute']['type'] == 'attachment' && isset($attribute['Attribute']['image'])):
|
||||
$extension = explode('.', $attribute['Attribute']['value']);
|
||||
$extension = end($extension);
|
||||
$uri = 'data:image/' . strtolower(h($extension)) . ';base64,' . h($attribute['Attribute']['image']);
|
||||
echo '<img class="screenshot screenshot-collapsed useCursorPointer" src="' . $uri . '" title="' . h($attribute['Attribute']['value']) . '" />';
|
||||
else:
|
||||
?>
|
||||
<a href="<?php echo $baseurl;?>/attributes/download/<?php echo $attribute['Attribute']['id'];?>"><?php echo $sigDisplay; ?></a>
|
||||
<?php
|
||||
endif;
|
||||
} else if ('link' == $attribute['Attribute']['type']) {
|
||||
?><a href="<?php echo h($attribute['Attribute']['value']);?>"><?php echo $sigDisplay; ?></a><?php
|
||||
} else {
|
||||
echo $sigDisplay;
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td style = "max-width:200px;width:10px;">
|
||||
<?php foreach ($attribute['AttributeTag'] as $tag):
|
||||
$tagText = " ";
|
||||
if (Configure::read('MISP.full_tags_on_attribute_index') == 1) $tagText = h($tag['Tag']['name']);
|
||||
else if (Configure::read('MISP.full_tags_on_attribute_index') == 2) {
|
||||
if (strpos($tag['Tag']['name'], '=')) {
|
||||
$tagText = explode('=', $tag['Tag']['name']);
|
||||
$tagText = h(trim(end($tagText), "\""));
|
||||
}
|
||||
else $tagText = h($tag['Tag']['name']);
|
||||
}
|
||||
?>
|
||||
<span class="tag useCursorPointer" style="margin-bottom:3px;background-color:<?php echo h($tag['Tag']['colour']);?>;color:<?php echo $this->TextColour->getTextColour($tag['Tag']['colour']);?>;" title="<?php echo h($tag['Tag']['name']); ?>" role="button" tabindex="0" aria-label="Search events tagged <?php echo h($tag['Tag']['name'])?>" onClick="document.location.href='<?php echo $baseurl; ?>/attributes/search/attributetag:<?php echo h($tag['Tag']['id']);?>';"><?php echo $tagText; ?></span>
|
||||
<?php endforeach; ?>
|
||||
</td>
|
||||
<td ondblclick="document.location ='document.location ='<?php echo $baseurl;?>/events/view/<?php echo $attribute['Event']['id'];?>';">
|
||||
<?php
|
||||
$sigDisplay = nl2br(h($attribute['Attribute']['comment']));
|
||||
if ($isSearch == 1 && !empty($replacePairs)) {
|
||||
// highlight the keywords if there are any
|
||||
$sigDisplay = $this->Highlight->highlighter($sigDisplay, $replacePairs);
|
||||
}
|
||||
echo $sigDisplay;
|
||||
?>
|
||||
</td>
|
||||
<td class="short" ondblclick="document.location ='document.location ='/events/view/<?php echo $attribute['Event']['id'];?>';">
|
||||
<?php echo $attribute['Attribute']['to_ids'] ? 'Yes' : 'No'; ?>
|
||||
</td>
|
||||
<td class="short action-links">
|
||||
<?php
|
||||
if ($isSiteAdmin || ($isAclModify && $attribute['Event']['user_id'] == $me['id']) || ($isAclModifyOrg && $attribute['Event']['org_id'] == $me['org_id'])):
|
||||
?>
|
||||
<a href="<?php echo $baseurl;?>/attributes/edit/<?php echo $attribute['Attribute']['id'];?>" class="icon-edit" title="Edit"></a><?php
|
||||
echo $this->Form->postLink('',array('action' => 'delete', $attribute['Attribute']['id']), array('class' => 'icon-trash', 'title' => 'Delete'), __('Are you sure you want to delete this attribute?'));
|
||||
elseif ($isAclModify):
|
||||
?>
|
||||
<a href="<?php echo $baseurl;?>/shadow_attributes/edit/<?php echo $attribute['Attribute']['id'];?>" class="icon-share" title="<?php echo __('Propose an edit'); ?>"></a>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<a href="<?php echo $baseurl;?>/events/view/<?php echo $attribute['Attribute']['event_id'];?>" class="icon-list-alt" title="<?php echo __('View'); ?>"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
?>
|
||||
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<td title="<?php echo $categoryDefinitions[$attribute['Attribute']['category']]['desc'];?>" class="short" ondblclick="document.location='<?php echo $baseurl;?>/events/view/<?php echo $attribute['Event']['id'];?>';">
|
||||
<?php echo h($attribute['Attribute']['category']); ?> </td>
|
||||
<td title="<?php if (isset($typeDefinitions[$attribute['Attribute']['type']])) echo $typeDefinitions[$attribute['Attribute']['type']]['desc'];?>" class="short" ondblclick="document.location='<?php echo $baseurl;?>/events/view/<?php echo $attribute['Event']['id'];?>';">
|
||||
<?php echo h($attribute['Attribute']['type']); ?> </td>
|
||||
<td class="showspaces" ondblclick="document.location='<?php echo $baseurl;?>/events/view/<?php echo $attribute['Event']['id'];?>';"><?php
|
||||
$sigDisplay = nl2br(h($attribute['Attribute']['value']));
|
||||
if ($isSearch == 1 && !empty($replacePairs)) {
|
||||
// highlight the keywords if there are any
|
||||
$sigDisplay = $this->Highlight->highlighter($sigDisplay, $replacePairs);
|
||||
}
|
||||
if ('attachment' == $attribute['Attribute']['type'] || 'malware-sample' == $attribute['Attribute']['type']) {
|
||||
if ($attribute['Attribute']['type'] == 'attachment' && isset($attribute['Attribute']['image'])):
|
||||
$extension = explode('.', $attribute['Attribute']['value']);
|
||||
$extension = end($extension);
|
||||
$uri = 'data:image/' . strtolower(h($extension)) . ';base64,' . h($attribute['Attribute']['image']);
|
||||
echo '<img class="screenshot screenshot-collapsed useCursorPointer" src="' . $uri . '" title="' . h($attribute['Attribute']['value']) . '" />';
|
||||
else:
|
||||
?>
|
||||
<a href="<?php echo $baseurl;?>/attributes/download/<?php echo $attribute['Attribute']['id'];?>"><?php echo $sigDisplay; ?></a>
|
||||
<?php
|
||||
endif;
|
||||
} else if ('link' == $attribute['Attribute']['type']) {
|
||||
?><a href="<?php echo h($attribute['Attribute']['value']);?>"><?php echo $sigDisplay; ?></a><?php
|
||||
} else {
|
||||
echo $sigDisplay;
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td style = "max-width:200px;width:10px;">
|
||||
<?php foreach ($attribute['AttributeTag'] as $tag):
|
||||
$tagText = " ";
|
||||
if (Configure::read('MISP.full_tags_on_attribute_index') == 1) $tagText = h($tag['Tag']['name']);
|
||||
else if (Configure::read('MISP.full_tags_on_attribute_index') == 2) {
|
||||
if (strpos($tag['Tag']['name'], '=')) {
|
||||
$tagText = explode('=', $tag['Tag']['name']);
|
||||
$tagText = h(trim(end($tagText), "\""));
|
||||
}
|
||||
else $tagText = h($tag['Tag']['name']);
|
||||
}
|
||||
?>
|
||||
<span class="tag useCursorPointer" style="margin-bottom:3px;background-color:<?php echo h($tag['Tag']['colour']);?>;color:<?php echo $this->TextColour->getTextColour($tag['Tag']['colour']);?>;" title="<?php echo h($tag['Tag']['name']); ?>" role="button" tabindex="0" aria-label="Search events tagged <?php echo h($tag['Tag']['name'])?>" onClick="document.location.href='<?php echo $baseurl; ?>/attributes/search/attributetag:<?php echo h($tag['Tag']['id']);?>';"><?php echo $tagText; ?></span>
|
||||
<?php endforeach; ?>
|
||||
</td>
|
||||
<td ondblclick="document.location ='document.location ='<?php echo $baseurl;?>/events/view/<?php echo $attribute['Event']['id'];?>';">
|
||||
<?php
|
||||
$sigDisplay = nl2br(h($attribute['Attribute']['comment']));
|
||||
if ($isSearch == 1 && !empty($replacePairs)) {
|
||||
// highlight the keywords if there are any
|
||||
$sigDisplay = $this->Highlight->highlighter($sigDisplay, $replacePairs);
|
||||
}
|
||||
echo $sigDisplay;
|
||||
?>
|
||||
</td>
|
||||
<td class="short" ondblclick="document.location ='document.location ='/events/view/<?php echo $attribute['Event']['id'];?>';">
|
||||
<?php echo $attribute['Attribute']['to_ids'] ? 'Yes' : 'No'; ?>
|
||||
</td>
|
||||
<td class="short action-links">
|
||||
<?php
|
||||
if ($isSiteAdmin || ($isAclModify && $attribute['Event']['user_id'] == $me['id']) || ($isAclModifyOrg && $attribute['Event']['org_id'] == $me['org_id'])):
|
||||
?>
|
||||
<a href="<?php echo $baseurl;?>/attributes/edit/<?php echo $attribute['Attribute']['id'];?>" class="icon-edit" title="Edit"></a><?php
|
||||
echo $this->Form->postLink('',array('action' => 'delete', $attribute['Attribute']['id']), array('class' => 'icon-trash', 'title' => 'Delete'), __('Are you sure you want to delete this attribute?'));
|
||||
elseif ($isAclModify):
|
||||
?>
|
||||
<a href="<?php echo $baseurl;?>/shadow_attributes/edit/<?php echo $attribute['Attribute']['id'];?>" class="icon-share" title="<?php echo __('Propose an edit'); ?>"></a>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<a href="<?php echo $baseurl;?>/events/view/<?php echo $attribute['Attribute']['event_id'];?>" class="icon-list-alt" title="<?php echo __('View'); ?>"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
</table>
|
||||
?>
|
||||
</table>
|
||||
|
||||
<p>
|
||||
<?php
|
||||
echo $this->Paginator->counter(array(
|
||||
'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
|
||||
));
|
||||
?>
|
||||
</p>
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<?php
|
||||
echo $this->Paginator->prev('« ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
echo $this->Paginator->numbers(array('modulus' => 20, 'separator' => '', 'tag' => 'li', 'currentClass' => 'active', 'currentTag' => 'span'));
|
||||
echo $this->Paginator->next(__('next') . ' »', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<p>
|
||||
<?php
|
||||
echo $this->Paginator->counter(array(
|
||||
'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
|
||||
));
|
||||
?>
|
||||
</p>
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<?php
|
||||
echo $this->Paginator->prev('« ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
echo $this->Paginator->numbers(array('modulus' => 20, 'separator' => '', 'tag' => 'li', 'currentClass' => 'active', 'currentTag' => 'span'));
|
||||
echo $this->Paginator->next(__('next') . ' »', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
if ($isSearch == 1){
|
||||
$class = 'searchAttributes2';
|
||||
$class = 'searchAttributes2';
|
||||
} else {
|
||||
$class = 'listAttributes';
|
||||
$class = 'listAttributes';
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
echo $this->element('side_menu', array('menuList' => 'event-collection', 'menuItem' => $class));
|
||||
echo $this->element('side_menu', array('menuList' => 'event-collection', 'menuItem' => $class));
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
// tooltips
|
||||
$(document).ready(function () {
|
||||
$("td, div").tooltip({
|
||||
'placement': 'top',
|
||||
'container' : 'body',
|
||||
delay: { show: 500, hide: 100 }
|
||||
});
|
||||
$('.screenshot').click(function() {
|
||||
screenshotPopup($(this).attr('src'), $(this).attr('title'));
|
||||
});
|
||||
$("td, div").tooltip({
|
||||
'placement': 'top',
|
||||
'container' : 'body',
|
||||
delay: { show: 500, hide: 100 }
|
||||
});
|
||||
$('.screenshot').click(function() {
|
||||
screenshotPopup($(this).attr('src'), $(this).attr('title'));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
$jsonArray = array();
|
||||
foreach ($results as $k => $v) {
|
||||
unset(
|
||||
$results[$k]['Event'],
|
||||
$results[$k]['Attribute']['value1'],
|
||||
$results[$k]['Attribute']['value2']
|
||||
);
|
||||
$jsonArray['response']['Attribute'][] = $results[$k]['Attribute'];
|
||||
unset(
|
||||
$results[$k]['Event'],
|
||||
$results[$k]['Attribute']['value1'],
|
||||
$results[$k]['Attribute']['value2']
|
||||
);
|
||||
$jsonArray['response']['Attribute'][] = $results[$k]['Attribute'];
|
||||
}
|
||||
echo json_encode($jsonArray);
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
$jsonArray = array();
|
||||
foreach ($results as $k => $v) {
|
||||
unset(
|
||||
$results[$k]['value1'],
|
||||
$results[$k]['value2']
|
||||
);
|
||||
$jsonArray['response']['Attribute'][] = $results[$k];
|
||||
unset(
|
||||
$results[$k]['value1'],
|
||||
$results[$k]['value2']
|
||||
);
|
||||
$jsonArray['response']['Attribute'][] = $results[$k];
|
||||
}
|
||||
echo json_encode($jsonArray);
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
<div class="event index">
|
||||
<h2><?php echo __('Listing invalid attribute validations'); ?></h2>
|
||||
<?php
|
||||
foreach ($result as $r) {
|
||||
?>
|
||||
<h3><?php echo __('Validation errors for attribute: ') . h($r['id']); ?></h3>
|
||||
<?php
|
||||
foreach ($r['error'] as $field => $error) {
|
||||
// re-think i18n & l10n for the below line
|
||||
echo '<b>[' . h($field) . ']</b>: ' . __('Value found: ') . h($error['value']) . ' - ' . __('Error') . ': ' . h($error['error']) . '<br />';
|
||||
}
|
||||
?>
|
||||
<b><?php echo __('[Attribute details]'); ?></b>: <?php echo h($r['details']); ?><br/>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<h2><?php echo __('Listing invalid attribute validations'); ?></h2>
|
||||
<?php
|
||||
foreach ($result as $r) {
|
||||
?>
|
||||
<h3><?php echo __('Validation errors for attribute: ') . h($r['id']); ?></h3>
|
||||
<?php
|
||||
foreach ($r['error'] as $field => $error) {
|
||||
// re-think i18n & l10n for the below line
|
||||
echo '<b>[' . h($field) . ']</b>: ' . __('Value found: ') . h($error['value']) . ' - ' . __('Error') . ': ' . h($error['error']) . '<br />';
|
||||
}
|
||||
?>
|
||||
<b><?php echo __('[Attribute details]'); ?></b>: <?php echo h($r['details']); ?><br/>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->element('side_menu', array('menuList' => 'admin', 'menuItem' => 'adminTools'));
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
$xmlArray = array();
|
||||
foreach ($results as $k => $v) {
|
||||
unset(
|
||||
$results[$k]['Event'],
|
||||
$results[$k]['Attribute']['value1'],
|
||||
$results[$k]['Attribute']['value2']
|
||||
);
|
||||
$xmlArray['response']['Attribute'][] = $results[$k]['Attribute'];
|
||||
unset(
|
||||
$results[$k]['Event'],
|
||||
$results[$k]['Attribute']['value1'],
|
||||
$results[$k]['Attribute']['value2']
|
||||
);
|
||||
$xmlArray['response']['Attribute'][] = $results[$k]['Attribute'];
|
||||
}
|
||||
$xmlObject = Xml::fromArray($xmlArray, array('format' => 'tags'));
|
||||
echo $xmlObject->asXML();
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
$xmlArray = array();
|
||||
foreach ($results as $k => $v) {
|
||||
unset(
|
||||
$results[$k]['value1'],
|
||||
$results[$k]['value2']
|
||||
);
|
||||
$xmlArray['response']['Attribute'][] = $results[$k];
|
||||
unset(
|
||||
$results[$k]['value1'],
|
||||
$results[$k]['value2']
|
||||
);
|
||||
$xmlArray['response']['Attribute'][] = $results[$k];
|
||||
}
|
||||
$xmlObject = Xml::fromArray($xmlArray, array('format' => 'tags'));
|
||||
echo $xmlObject->asXML();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
App::uses('RPZExport', 'Export');
|
||||
$rpzExport = new RPZExport();
|
||||
echo ($rpzExport->export($values, $rpzSettings));
|
||||
App::uses('RPZExport', 'Export');
|
||||
$rpzExport = new RPZExport();
|
||||
echo ($rpzExport->export($values, $rpzSettings));
|
||||
|
|
|
@ -1,46 +1,46 @@
|
|||
<div class="attributes form">
|
||||
<?php echo $this->Form->create('Attribute');?>
|
||||
<fieldset>
|
||||
<legend><?php echo __('Search Attribute'); ?></legend>
|
||||
<fieldset>
|
||||
<legend><?php echo __('Search Attribute'); ?></legend>
|
||||
<?php echo __('You can search for attributes based on contained expression within the value, event ID, submitting organisation, category and type. <br />For the value, event ID and organisation, you can enter several search terms by entering each term as a new line. To exclude things from a result, use the NOT operator (!) in front of the term.'); ?>
|
||||
<br />
|
||||
<br />
|
||||
<?php echo __('For string searches (such as searching for an expression, tags, etc) - lookups are simple string matches. If you want a substring match encapsulate the lookup string between "%" characters.'); ?>
|
||||
<br /><br />
|
||||
<?php
|
||||
echo $this->Form->input('keyword', array('type' => 'textarea', 'rows' => 2, 'label' => __('Containing the following expressions'), 'div' => 'clear', 'class' => 'input-xxlarge'));
|
||||
echo $this->Form->input('attributetags', array('type' => 'textarea', 'rows' => 2, 'label' => __('Being an attribute matching the following tags'), 'div' => 'clear', 'class' => 'input-xxlarge'));
|
||||
echo $this->Form->input('keyword2', array('type' => 'textarea', 'rows' => 2, 'label' => __('Being attributes of the following event IDs, event UUIDs or attribute UUIDs'), 'div' => 'clear', 'class' => 'input-xxlarge'));
|
||||
echo $this->Form->input('tags', array('type' => 'textarea', 'rows' => 2, 'label' => __('Being an attribute of an event matching the following tags'), 'div' => 'clear', 'class' => 'input-xxlarge'));
|
||||
<br /><br />
|
||||
<?php
|
||||
echo $this->Form->input('keyword', array('type' => 'textarea', 'rows' => 2, 'label' => __('Containing the following expressions'), 'div' => 'clear', 'class' => 'input-xxlarge'));
|
||||
echo $this->Form->input('attributetags', array('type' => 'textarea', 'rows' => 2, 'label' => __('Being an attribute matching the following tags'), 'div' => 'clear', 'class' => 'input-xxlarge'));
|
||||
echo $this->Form->input('keyword2', array('type' => 'textarea', 'rows' => 2, 'label' => __('Being attributes of the following event IDs, event UUIDs or attribute UUIDs'), 'div' => 'clear', 'class' => 'input-xxlarge'));
|
||||
echo $this->Form->input('tags', array('type' => 'textarea', 'rows' => 2, 'label' => __('Being an attribute of an event matching the following tags'), 'div' => 'clear', 'class' => 'input-xxlarge'));
|
||||
|
||||
?>
|
||||
<?php
|
||||
if (Configure::read('MISP.showorg') || $isAdmin)
|
||||
echo $this->Form->input('org', array(
|
||||
'type' => 'textarea',
|
||||
'label' => __('From the following organisation(s)'),
|
||||
'div' => 'input clear',
|
||||
'rows' => 2,
|
||||
'class' => 'input-xxlarge'));
|
||||
?>
|
||||
<?php
|
||||
echo $this->Form->input('type', array(
|
||||
'div' => 'input clear',
|
||||
));
|
||||
echo $this->Form->input('category', array(
|
||||
));
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
<?php
|
||||
echo $this->Form->input('ioc', array(
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Only find IOCs to use in IDS'),
|
||||
));
|
||||
echo $this->Form->input('alternate', array(
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Alternate Search Result (Events)'),
|
||||
));
|
||||
?>
|
||||
</fieldset>
|
||||
?>
|
||||
<?php
|
||||
if (Configure::read('MISP.showorg') || $isAdmin)
|
||||
echo $this->Form->input('org', array(
|
||||
'type' => 'textarea',
|
||||
'label' => __('From the following organisation(s)'),
|
||||
'div' => 'input clear',
|
||||
'rows' => 2,
|
||||
'class' => 'input-xxlarge'));
|
||||
?>
|
||||
<?php
|
||||
echo $this->Form->input('type', array(
|
||||
'div' => 'input clear',
|
||||
));
|
||||
echo $this->Form->input('category', array(
|
||||
));
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
<?php
|
||||
echo $this->Form->input('ioc', array(
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Only find IOCs to use in IDS'),
|
||||
));
|
||||
echo $this->Form->input('alternate', array(
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Alternate Search Result (Events)'),
|
||||
));
|
||||
?>
|
||||
</fieldset>
|
||||
<?php
|
||||
echo $this->Form->button('Search', array('class' => 'btn btn-primary'));
|
||||
echo $this->Form->end();
|
||||
|
@ -57,9 +57,9 @@ var category_type_mapping = new Array();
|
|||
echo "category_type_mapping['ALL'] = {";
|
||||
$first = true;
|
||||
foreach ($typeDefinitions as $type => $def) {
|
||||
if ($first) $first = false;
|
||||
else echo ', ';
|
||||
echo "'" . addslashes($type) . "' : '" . addslashes($type) . "'";
|
||||
if ($first) $first = false;
|
||||
else echo ', ';
|
||||
echo "'" . addslashes($type) . "' : '" . addslashes($type) . "'";
|
||||
}
|
||||
echo "}; \n";
|
||||
|
||||
|
@ -67,22 +67,22 @@ echo "}; \n";
|
|||
echo "category_type_mapping[''] = {";
|
||||
$first = true;
|
||||
foreach ($typeDefinitions as $type => $def) {
|
||||
if ($first) $first = false;
|
||||
else echo ', ';
|
||||
echo "'" . addslashes($type) . "' : '" . addslashes($type) . "'";
|
||||
if ($first) $first = false;
|
||||
else echo ', ';
|
||||
echo "'" . addslashes($type) . "' : '" . addslashes($type) . "'";
|
||||
}
|
||||
echo "}; \n";
|
||||
|
||||
// Types per Category
|
||||
foreach ($categoryDefinitions as $category => $def) {
|
||||
echo "category_type_mapping['" . addslashes($category) . "'] = {";
|
||||
$first = true;
|
||||
foreach ($def['types'] as $type) {
|
||||
if ($first) $first = false;
|
||||
else echo ', ';
|
||||
echo "'" . addslashes($type) . "' : '" . addslashes($type) . "'";
|
||||
}
|
||||
echo "}; \n";
|
||||
echo "category_type_mapping['" . addslashes($category) . "'] = {";
|
||||
$first = true;
|
||||
foreach ($def['types'] as $type) {
|
||||
if ($first) $first = false;
|
||||
else echo ', ';
|
||||
echo "'" . addslashes($type) . "' : '" . addslashes($type) . "'";
|
||||
}
|
||||
echo "}; \n";
|
||||
}
|
||||
?>
|
||||
|
||||
|
@ -96,69 +96,69 @@ var type_category_mapping = new Array();
|
|||
echo "type_category_mapping['ALL'] = {";
|
||||
$first = true;
|
||||
foreach ($categoryDefinitions as $type => $def) {
|
||||
if ($first) $first = false;
|
||||
else echo ', ';
|
||||
echo "'" . addslashes($type) . "' : '" . addslashes($type) . "'";
|
||||
if ($first) $first = false;
|
||||
else echo ', ';
|
||||
echo "'" . addslashes($type) . "' : '" . addslashes($type) . "'";
|
||||
}
|
||||
echo "}; \n";
|
||||
|
||||
// Categories per Type
|
||||
foreach ($typeDefinitions as $type => $def) {
|
||||
echo "type_category_mapping['" . addslashes($type) . "'] = {";
|
||||
$first = true;
|
||||
foreach ($categoryDefinitions as $category => $def) {
|
||||
if ( in_array ( $type , $def['types'])) {
|
||||
if ($first) $first = false;
|
||||
else echo ', ';
|
||||
echo "'" . addslashes($category) . "' : '" . addslashes($category) . "'";
|
||||
}
|
||||
}
|
||||
echo "}; \n";
|
||||
echo "type_category_mapping['" . addslashes($type) . "'] = {";
|
||||
$first = true;
|
||||
foreach ($categoryDefinitions as $category => $def) {
|
||||
if ( in_array ( $type , $def['types'])) {
|
||||
if ($first) $first = false;
|
||||
else echo ', ';
|
||||
echo "'" . addslashes($category) . "' : '" . addslashes($category) . "'";
|
||||
}
|
||||
}
|
||||
echo "}; \n";
|
||||
}
|
||||
?>
|
||||
|
||||
function formCategoryChanged(id) {
|
||||
var alreadySelected = $('#AttributeType').val();
|
||||
// empty the types
|
||||
document.getElementById("AttributeType").options.length = 1;
|
||||
// add new items to options
|
||||
var options = $('#AttributeType').prop('options');
|
||||
$.each(category_type_mapping[$('#AttributeCategory').val()], function(val, text) {
|
||||
options[options.length] = new Option(text, val);
|
||||
if (val == alreadySelected) {
|
||||
options[options.length-1].selected = true;
|
||||
}
|
||||
});
|
||||
// enable the form element
|
||||
$('#AttributeType').prop('disabled', false);
|
||||
var alreadySelected = $('#AttributeType').val();
|
||||
// empty the types
|
||||
document.getElementById("AttributeType").options.length = 1;
|
||||
// add new items to options
|
||||
var options = $('#AttributeType').prop('options');
|
||||
$.each(category_type_mapping[$('#AttributeCategory').val()], function(val, text) {
|
||||
options[options.length] = new Option(text, val);
|
||||
if (val == alreadySelected) {
|
||||
options[options.length-1].selected = true;
|
||||
}
|
||||
});
|
||||
// enable the form element
|
||||
$('#AttributeType').prop('disabled', false);
|
||||
}
|
||||
|
||||
function formTypeChanged(id) {
|
||||
var alreadySelected = $('#AttributeCategory').val();
|
||||
// empty the categories
|
||||
document.getElementById("AttributeCategory").options.length = 2;
|
||||
// add new items to options
|
||||
var options = $('#AttributeCategory').prop('options');
|
||||
$.each(type_category_mapping[$('#AttributeType').val()], function(val, text) {
|
||||
options[options.length] = new Option(text, val);
|
||||
if (val == alreadySelected) {
|
||||
options[options.length-1].selected = true;
|
||||
}
|
||||
});
|
||||
// enable the form element
|
||||
$('#AttributeCategory').prop('disabled', false);
|
||||
var alreadySelected = $('#AttributeCategory').val();
|
||||
// empty the categories
|
||||
document.getElementById("AttributeCategory").options.length = 2;
|
||||
// add new items to options
|
||||
var options = $('#AttributeCategory').prop('options');
|
||||
$.each(type_category_mapping[$('#AttributeType').val()], function(val, text) {
|
||||
options[options.length] = new Option(text, val);
|
||||
if (val == alreadySelected) {
|
||||
options[options.length-1].selected = true;
|
||||
}
|
||||
});
|
||||
// enable the form element
|
||||
$('#AttributeCategory').prop('disabled', false);
|
||||
}
|
||||
|
||||
var formInfoValues = new Array();
|
||||
<?php
|
||||
foreach ($typeDefinitions as $type => $def) {
|
||||
$info = isset($def['formdesc']) ? $def['formdesc'] : $def['desc'];
|
||||
echo "formInfoValues['$type'] = \"$info\";\n";
|
||||
$info = isset($def['formdesc']) ? $def['formdesc'] : $def['desc'];
|
||||
echo "formInfoValues['$type'] = \"$info\";\n";
|
||||
}
|
||||
|
||||
foreach ($categoryDefinitions as $category => $def) {
|
||||
$info = isset($def['formdesc']) ? $def['formdesc'] : $def['desc'];
|
||||
echo "formInfoValues['$category'] = \"$info\";\n";
|
||||
$info = isset($def['formdesc']) ? $def['formdesc'] : $def['desc'];
|
||||
echo "formInfoValues['$category'] = \"$info\";\n";
|
||||
}
|
||||
$this->Js->get('#AttributeCategory')->event('change', 'formCategoryChanged("#AttributeCategory")');
|
||||
$this->Js->get('#AttributeType')->event('change', 'formTypeChanged("#AttributeType")');
|
||||
|
@ -170,43 +170,43 @@ formInfoValues[''] = '';
|
|||
|
||||
$(document).ready(function() {
|
||||
|
||||
$("#AttributeType, #AttributeCategory").on('mouseleave', function(e) {
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
});
|
||||
$("#AttributeType, #AttributeCategory").on('mouseleave', function(e) {
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
});
|
||||
|
||||
$("#AttributeType, #AttributeCategory").on('mouseover', function(e) {
|
||||
var $e = $(e.target);
|
||||
if ($e.is('option')) {
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
$('#'+e.currentTarget.id).popover({
|
||||
trigger: 'manual',
|
||||
placement: 'right',
|
||||
content: formInfoValues[$e.val()],
|
||||
}).popover('show');
|
||||
}
|
||||
});
|
||||
$("#AttributeType, #AttributeCategory").on('mouseover', function(e) {
|
||||
var $e = $(e.target);
|
||||
if ($e.is('option')) {
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
$('#'+e.currentTarget.id).popover({
|
||||
trigger: 'manual',
|
||||
placement: 'right',
|
||||
content: formInfoValues[$e.val()],
|
||||
}).popover('show');
|
||||
}
|
||||
});
|
||||
|
||||
// workaround for browsers like IE and Chrome that do now have an onmouseover on the 'options' of a select.
|
||||
// disadvantage is that user needs to click on the item to see the tooltip.
|
||||
// no solutions exist, except to generate the select completely using html.
|
||||
$("#AttributeType, #AttributeCategory").on('change', function(e) {
|
||||
var $e = $(e.target);
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
$('#'+e.currentTarget.id).popover({
|
||||
trigger: 'manual',
|
||||
placement: 'right',
|
||||
content: formInfoValues[$e.val()],
|
||||
}).popover('show');
|
||||
});
|
||||
// workaround for browsers like IE and Chrome that do now have an onmouseover on the 'options' of a select.
|
||||
// disadvantage is that user needs to click on the item to see the tooltip.
|
||||
// no solutions exist, except to generate the select completely using html.
|
||||
$("#AttributeType, #AttributeCategory").on('change', function(e) {
|
||||
var $e = $(e.target);
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
$('#'+e.currentTarget.id).popover({
|
||||
trigger: 'manual',
|
||||
placement: 'right',
|
||||
content: formInfoValues[$e.val()],
|
||||
}).popover('show');
|
||||
});
|
||||
|
||||
});
|
||||
$('.input-xxlarge').keydown(function (e) {
|
||||
if (e.ctrlKey && e.keyCode == 13) {
|
||||
$('#AttributeSearchForm').submit();
|
||||
}
|
||||
if (e.ctrlKey && e.keyCode == 13) {
|
||||
$('#AttributeSearchForm').submit();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
echo $this->element('side_menu', array('menuList' => 'event-collection', 'menuItem' => 'searchAttributes'));
|
||||
echo $this->element('side_menu', array('menuList' => 'event-collection', 'menuItem' => 'searchAttributes'));
|
||||
?>
|
||||
<?php echo $this->Js->writeBuffer(); // Write cached scripts ?>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
foreach ($attributes as $attribute) {
|
||||
echo $attribute['Attribute']['value'];
|
||||
echo PHP_EOL;
|
||||
echo $attribute['Attribute']['value'];
|
||||
echo PHP_EOL;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
$xmlArray = array();
|
||||
foreach ($results as $result) {
|
||||
$xmlArray['MISP']['Attribute'][] = $result['Attribute'];
|
||||
$xmlArray['MISP']['Attribute'][] = $result['Attribute'];
|
||||
}
|
||||
|
||||
$xmlObject = Xml::fromArray($xmlArray, array('format' => 'tags'));
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<?php
|
||||
$xmlArray = array();
|
||||
foreach ($attributes as $key => $attribute) {
|
||||
// rearrange things to be compatible with the Xml::fromArray()
|
||||
$attributes[$key] = $attributes[$key]['Attribute'];
|
||||
// rearrange things to be compatible with the Xml::fromArray()
|
||||
$attributes[$key] = $attributes[$key]['Attribute'];
|
||||
|
||||
// cleanup the array from things we do not want to expose
|
||||
unset($attributes[$key]['Event']);
|
||||
unset($attributes[$key]['value1']);
|
||||
unset($attributes[$key]['value2']);
|
||||
// cleanup the array from things we do not want to expose
|
||||
unset($attributes[$key]['Event']);
|
||||
unset($attributes[$key]['value1']);
|
||||
unset($attributes[$key]['value2']);
|
||||
}
|
||||
|
||||
// display the XML to the user
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
$xmlArray = array();
|
||||
foreach ($results as $k => $v) {
|
||||
unset(
|
||||
$results[$k]['Event'],
|
||||
$results[$k]['Attribute']['value1'],
|
||||
$results[$k]['Attribute']['value2']
|
||||
);
|
||||
$xmlArray['response']['Attribute'][] = $results[$k]['Attribute'];
|
||||
unset(
|
||||
$results[$k]['Event'],
|
||||
$results[$k]['Attribute']['value1'],
|
||||
$results[$k]['Attribute']['value2']
|
||||
);
|
||||
$xmlArray['response']['Attribute'][] = $results[$k]['Attribute'];
|
||||
}
|
||||
$xmlObject = Xml::fromArray($xmlArray, array('format' => 'tags'));
|
||||
echo $xmlObject->asXML();
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
$xmlArray = array();
|
||||
foreach ($results as $k => $v) {
|
||||
unset(
|
||||
$results[$k]['value1'],
|
||||
$results[$k]['value2']
|
||||
);
|
||||
$xmlArray['response']['Attribute'][] = $results[$k];
|
||||
unset(
|
||||
$results[$k]['value1'],
|
||||
$results[$k]['value2']
|
||||
);
|
||||
$xmlArray['response']['Attribute'][] = $results[$k];
|
||||
}
|
||||
$xmlObject = Xml::fromArray($xmlArray, array('format' => 'tags'));
|
||||
echo $xmlObject->asXML();
|
||||
|
|
|
@ -282,7 +282,7 @@
|
|||
if ($isSiteAdmin):
|
||||
?>
|
||||
<span class="verticalSeparator"> </span>
|
||||
<?php endif;
|
||||
<?php endif;
|
||||
endif;
|
||||
if ($isSiteAdmin || $mayModify):
|
||||
if (isset($modules) && isset($modules['types'][$object['type']])):
|
||||
|
|
|
@ -1,240 +1,240 @@
|
|||
<table class="table table-striped table-hover table-condensed">
|
||||
<tr>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<th>
|
||||
<input class="select_all select" type="checkbox" title="<?php echo __('Select all');?>" role="button" tabindex="0" aria-label="<?php echo __('Select all events on current page');?>" onClick="toggleAllCheckboxes();" />
|
||||
</th>
|
||||
<?php else: ?>
|
||||
<th style="padding-left:0px;padding-right:0px;"> </th>
|
||||
<?php endif;?>
|
||||
<th class="filter">
|
||||
<?php echo $this->Paginator->sort('published');?>
|
||||
</th>
|
||||
<?php
|
||||
if (Configure::read('MISP.showorgalternate') && Configure::read('MISP.showorg')):
|
||||
?>
|
||||
<th class="filter"><?php echo $this->Paginator->sort('Org', 'Source org'); ?></th>
|
||||
<th class="filter"><?php echo $this->Paginator->sort('Org', 'Member org'); ?></th>
|
||||
<?php
|
||||
else:
|
||||
if (Configure::read('MISP.showorg') || $isAdmin):
|
||||
?>
|
||||
<th class="filter"><?php echo $this->Paginator->sort('Org'); ?></th>
|
||||
<?php
|
||||
endif;
|
||||
if ($isSiteAdmin):
|
||||
?>
|
||||
<th class="filter"><?php echo $this->Paginator->sort('owner org');?></th>
|
||||
<?php
|
||||
endif;
|
||||
endif;
|
||||
$date = time();
|
||||
$day = 86400;
|
||||
?>
|
||||
<th><?php echo $this->Paginator->sort('id', null, array('direction' => 'desc'));?></th>
|
||||
<th><?php echo __('Clusters');?></th>
|
||||
<?php if (Configure::read('MISP.tagging')): ?>
|
||||
<th class="filter"><?php echo __('Tags');?></th>
|
||||
<?php endif; ?>
|
||||
<th title="<?php echo __('Attribute Count');?>"><?php echo $this->Paginator->sort('attribute_count', '#Attr.');?></th>
|
||||
<?php if (Configure::read('MISP.showCorrelationsOnIndex')):?>
|
||||
<th title="<?php echo __('Correlation Count');?>"><?php echo __('#Corr.');?></th>
|
||||
<?php endif; ?>
|
||||
<?php if (Configure::read('MISP.showSightingsCountOnIndex')):?>
|
||||
<th title="<?php echo __('Sigthing Count');?>"><?php echo __('#Sightings');?></th>
|
||||
<?php endif; ?>
|
||||
<?php if (Configure::read('MISP.showProposalsOnIndex')):?>
|
||||
<th title="<?php echo __('Proposal Count');?>"><?php echo __('#Prop');?></th>
|
||||
<?php endif; ?>
|
||||
<?php if (Configure::read('MISP.showDiscussionsCountOnIndex')):?>
|
||||
<th title="<?php echo __('Post Count');?>"><?php echo __('#Posts');?></th>
|
||||
<?php endif; ?>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<th><?php echo $this->Paginator->sort('user_id', 'Email');?></th>
|
||||
<?php endif; ?>
|
||||
<th class="filter"><?php echo $this->Paginator->sort('date', null, array('direction' => 'desc'));?></th>
|
||||
<th class="filter"><?php echo $this->Paginator->sort('info');?></th>
|
||||
<th title="<?php echo $eventDescriptions['distribution']['desc'];?>">
|
||||
<?php echo $this->Paginator->sort('distribution');?>
|
||||
</th>
|
||||
<th class="actions">Actions</th>
|
||||
<tr>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<th>
|
||||
<input class="select_all select" type="checkbox" title="<?php echo __('Select all');?>" role="button" tabindex="0" aria-label="<?php echo __('Select all events on current page');?>" onClick="toggleAllCheckboxes();" />
|
||||
</th>
|
||||
<?php else: ?>
|
||||
<th style="padding-left:0px;padding-right:0px;"> </th>
|
||||
<?php endif;?>
|
||||
<th class="filter">
|
||||
<?php echo $this->Paginator->sort('published');?>
|
||||
</th>
|
||||
<?php
|
||||
if (Configure::read('MISP.showorgalternate') && Configure::read('MISP.showorg')):
|
||||
?>
|
||||
<th class="filter"><?php echo $this->Paginator->sort('Org', 'Source org'); ?></th>
|
||||
<th class="filter"><?php echo $this->Paginator->sort('Org', 'Member org'); ?></th>
|
||||
<?php
|
||||
else:
|
||||
if (Configure::read('MISP.showorg') || $isAdmin):
|
||||
?>
|
||||
<th class="filter"><?php echo $this->Paginator->sort('Org'); ?></th>
|
||||
<?php
|
||||
endif;
|
||||
if ($isSiteAdmin):
|
||||
?>
|
||||
<th class="filter"><?php echo $this->Paginator->sort('owner org');?></th>
|
||||
<?php
|
||||
endif;
|
||||
endif;
|
||||
$date = time();
|
||||
$day = 86400;
|
||||
?>
|
||||
<th><?php echo $this->Paginator->sort('id', null, array('direction' => 'desc'));?></th>
|
||||
<th><?php echo __('Clusters');?></th>
|
||||
<?php if (Configure::read('MISP.tagging')): ?>
|
||||
<th class="filter"><?php echo __('Tags');?></th>
|
||||
<?php endif; ?>
|
||||
<th title="<?php echo __('Attribute Count');?>"><?php echo $this->Paginator->sort('attribute_count', '#Attr.');?></th>
|
||||
<?php if (Configure::read('MISP.showCorrelationsOnIndex')):?>
|
||||
<th title="<?php echo __('Correlation Count');?>"><?php echo __('#Corr.');?></th>
|
||||
<?php endif; ?>
|
||||
<?php if (Configure::read('MISP.showSightingsCountOnIndex')):?>
|
||||
<th title="<?php echo __('Sigthing Count');?>"><?php echo __('#Sightings');?></th>
|
||||
<?php endif; ?>
|
||||
<?php if (Configure::read('MISP.showProposalsOnIndex')):?>
|
||||
<th title="<?php echo __('Proposal Count');?>"><?php echo __('#Prop');?></th>
|
||||
<?php endif; ?>
|
||||
<?php if (Configure::read('MISP.showDiscussionsCountOnIndex')):?>
|
||||
<th title="<?php echo __('Post Count');?>"><?php echo __('#Posts');?></th>
|
||||
<?php endif; ?>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<th><?php echo $this->Paginator->sort('user_id', 'Email');?></th>
|
||||
<?php endif; ?>
|
||||
<th class="filter"><?php echo $this->Paginator->sort('date', null, array('direction' => 'desc'));?></th>
|
||||
<th class="filter"><?php echo $this->Paginator->sort('info');?></th>
|
||||
<th title="<?php echo $eventDescriptions['distribution']['desc'];?>">
|
||||
<?php echo $this->Paginator->sort('distribution');?>
|
||||
</th>
|
||||
<th class="actions">Actions</th>
|
||||
|
||||
</tr>
|
||||
<?php foreach ($events as $event): ?>
|
||||
<tr <?php if ($event['Event']['distribution'] == 0) echo 'class = "privateRed"'?>>
|
||||
<?php
|
||||
if ($isSiteAdmin || ($event['Event']['orgc_id'] == $me['org_id'])):
|
||||
?>
|
||||
<td style="width:10px;" data-id="<?php echo h($event['Event']['id']); ?>">
|
||||
<input class="select" type="checkbox" data-id="<?php echo $event['Event']['id'];?>" />
|
||||
</td>
|
||||
<?php
|
||||
else:
|
||||
?>
|
||||
<td style="padding-left:0px;padding-right:0px;"></td>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<td class="short" ondblclick="document.location.href ='<?php echo $baseurl."/events/view/".$event['Event']['id'];?>'">
|
||||
<?php
|
||||
if ($event['Event']['published'] == 1) {
|
||||
?>
|
||||
<a href="<?php echo $baseurl."/events/view/".$event['Event']['id'] ?>" class = "icon-ok" title = "<?php echo __('View');?>"></a>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<a href="<?php echo $baseurl."/events/view/".$event['Event']['id'] ?>" class = "icon-remove" title = "<?php echo __('View');?>"></a>
|
||||
<?php
|
||||
}?>
|
||||
</td>
|
||||
<?php if (Configure::read('MISP.showorg') || $isAdmin): ?>
|
||||
<td class="short" ondblclick="document.location.href ='<?php echo $baseurl . "/events/index/searchorg:" . $event['Orgc']['id'];?>'">
|
||||
<?php
|
||||
echo $this->OrgImg->getOrgImg(array('name' => $event['Orgc']['name'], 'id' => $event['Orgc']['id'], 'size' => 24));
|
||||
?>
|
||||
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<?php if ($isSiteAdmin || (Configure::read('MISP.showorgalternate') && Configure::read('MISP.showorg'))): ?>
|
||||
<td class="short" ondblclick="document.location.href ='<?php echo $baseurl . "/events/index/searchorg:" . $event['Org']['id'];?>'">
|
||||
<?php
|
||||
echo $this->OrgImg->getOrgImg(array('name' => $event['Org']['name'], 'id' => $event['Org']['id'], 'size' => 24));
|
||||
?>
|
||||
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<td style="width:30px;">
|
||||
<a href="<?php echo $baseurl."/events/view/".$event['Event']['id'] ?>"><?php echo $event['Event']['id'];?></a>
|
||||
</td>
|
||||
<td class="shortish">
|
||||
<?php
|
||||
$clusterList = array();
|
||||
$galaxyList = array();
|
||||
$galaxy_id = 0;
|
||||
if (isset($event['GalaxyCluster'])):
|
||||
foreach ($event['GalaxyCluster'] as $cluster):
|
||||
$galaxy_id = $cluster['Galaxy']['id'];
|
||||
if (!isset($galaxyList[$cluster['Galaxy']['id']])) {
|
||||
$galaxyList[$cluster['Galaxy']['id']] = $cluster['Galaxy']['name'];
|
||||
}
|
||||
$clusterList[$cluster['Galaxy']['id']][] = array('value' => $cluster['value'], 'id' => $cluster['id'], 'tag_id' => $cluster['tag_id']);
|
||||
endforeach;
|
||||
endif;
|
||||
$first = true;
|
||||
foreach ($clusterList as $galaxy_id => $clusters):
|
||||
if (!$first) {
|
||||
echo '<br />';
|
||||
} else {
|
||||
$first = false;
|
||||
}
|
||||
?>
|
||||
<span class="blue bold"><a href="<?php echo $baseurl; ?>/galaxies/view/<?php echo h($galaxy_id); ?>"><?php echo h($galaxyList[$galaxy_id]); ?></a>:</span>
|
||||
<?php
|
||||
foreach ($clusters as $cluster):
|
||||
?>
|
||||
<br />
|
||||
<span class="blue">
|
||||
|
||||
<a href="<?php echo $baseurl; ?>/events/index/searchtag:<?php echo h($cluster['tag_id']); ?>"><?php echo h($cluster['value']); ?></a>
|
||||
<a href="<?php echo $baseurl; ?>/galaxy_clusters/view/<?php echo h($cluster['id']); ?>" class="icon-search"></a>
|
||||
</span>
|
||||
<?php
|
||||
endforeach;
|
||||
endforeach;
|
||||
?>
|
||||
</td>
|
||||
<?php if (Configure::read('MISP.tagging')): ?>
|
||||
<td style = "max-width: 200px;width:10px;">
|
||||
<?php foreach ($event['EventTag'] as $tag):
|
||||
$tagText = " ";
|
||||
if (Configure::read('MISP.full_tags_on_event_index') == 1) $tagText = h($tag['Tag']['name']);
|
||||
else if (Configure::read('MISP.full_tags_on_event_index') == 2) {
|
||||
if (strpos($tag['Tag']['name'], '=')) {
|
||||
$tagText = explode('=', $tag['Tag']['name']);
|
||||
$tagText = h(trim(end($tagText), "\""));
|
||||
}
|
||||
else $tagText = h($tag['Tag']['name']);
|
||||
}
|
||||
?>
|
||||
<span class="tag useCursorPointer" style="margin-bottom:3px;background-color:<?php echo h($tag['Tag']['colour']);?>;color:<?php echo $this->TextColour->getTextColour($tag['Tag']['colour']);?>;" title="<?php echo h($tag['Tag']['name']); ?>" onClick="document.location.href='<?php echo $baseurl; ?>/events/index/searchtag:<?php echo h($tag['Tag']['id']);?>';"><?php echo $tagText; ?></span>
|
||||
<?php endforeach; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<td style="width:30px;" ondblclick="location.href ='<?php echo $baseurl."/events/view/".$event['Event']['id'];?>'">
|
||||
<?php echo $event['Event']['attribute_count']; ?>
|
||||
</td>
|
||||
<?php if (Configure::read('MISP.showCorrelationsOnIndex')):?>
|
||||
<td class = "bold" style="width:30px;" ondblclick="location.href ='<?php echo $baseurl."/events/view/".$event['Event']['id'];?>'" title="<?php echo (!empty($event['Event']['correlation_count']) ? h($event['Event']['correlation_count']) : '0') . __(' correlation(s)');?>">
|
||||
<?php echo !empty($event['Event']['correlation_count']) ? h($event['Event']['correlation_count']) : ''; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<?php if (Configure::read('MISP.showSightingsCountOnIndex')):?>
|
||||
<td class = "bold" style="width:30px;" ondblclick="location.href ='<?php echo $baseurl."/events/view/".$event['Event']['id'];?>'" title="<?php echo (!empty($event['Event']['sightings_count']) ? h($event['Event']['sightings_count']) : '0') . ' sighting(s)';?>">
|
||||
<?php echo !empty($event['Event']['sightings_count']) ? h($event['Event']['sightings_count']) : ''; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<?php if (Configure::read('MISP.showProposalsOnIndex')): ?>
|
||||
<td class = "bold" style="width:30px;" ondblclick="location.href ='<?php echo $baseurl."/events/view/".$event['Event']['id'];?>'" title="<?php echo (!empty($event['Event']['proposals_count']) ? h($event['Event']['proposals_count']) : '0') . __(' proposal(s)');?>">
|
||||
<?php echo !empty($event['Event']['proposals_count']) ? h($event['Event']['proposals_count']) : ''; ?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<?php if (Configure::read('MISP.showDiscussionsCountOnIndex')): ?>
|
||||
<td class = "bold" style="width:30px;" ondblclick="location.href ='<?php echo $baseurl."/events/view/".$event['Event']['id'];?>'" title="<?php echo (!empty($event['Event']['proposals_count']) ? h($event['Event']['proposals_count']) : '0') . __(' proposal(s)');?>">
|
||||
<?php
|
||||
if (!empty($event['Event']['post_count'])) {
|
||||
$post_count = h($event['Event']['post_count']);
|
||||
if (($date - $event['Event']['last_post']) < $day) {
|
||||
$post_count .= ' (<span class="red bold">' . __('NEW') . '</span>)';
|
||||
}
|
||||
} else {
|
||||
$post_count = '';
|
||||
}
|
||||
?>
|
||||
<span style=" white-space: nowrap;"><?php echo $post_count?></span>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<?php if ('true' == $isSiteAdmin): ?>
|
||||
<td class="short" ondblclick="location.href ='<?php echo $baseurl."/events/view/".$event['Event']['id'];?>'">
|
||||
<?php echo h($event['User']['email']); ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<td class="short" ondblclick="location.href ='<?php echo $baseurl."/events/view/".$event['Event']['id'];?>'">
|
||||
<?php echo $event['Event']['date']; ?>
|
||||
</td>
|
||||
<td ondblclick="location.href ='<?php echo $baseurl."/events/view/".$event['Event']['id'];?>'">
|
||||
<?php echo nl2br(h($event['Event']['info'])); ?>
|
||||
</td>
|
||||
<td class="short <?php if ($event['Event']['distribution'] == 0) echo 'privateRedText';?>" ondblclick="location.href ='<?php echo $baseurl; ?>/events/view/<?php echo $event['Event']['id'];?>'" title = "<?php echo $event['Event']['distribution'] != 3 ? $distributionLevels[$event['Event']['distribution']] : __('All');?>">
|
||||
<?php if ($event['Event']['distribution'] == 4):?>
|
||||
<a href="<?php echo $baseurl;?>/sharingGroups/view/<?php echo h($event['SharingGroup']['id']); ?>"><?php echo h($event['SharingGroup']['name']);?></a>
|
||||
<?php else:
|
||||
echo h($shortDist[$event['Event']['distribution']]);
|
||||
endif;
|
||||
?>
|
||||
</td>
|
||||
<td class="short action-links">
|
||||
<?php
|
||||
if (0 == $event['Event']['published'] && ($isSiteAdmin || ($isAclPublish && $event['Event']['orgc_id'] == $me['org_id'])))
|
||||
echo $this->Form->postLink('', array('action' => 'alert', $event['Event']['id']), array('class' => 'icon-download-alt', 'title' => __('Publish Event'), __('Are you sure this event is complete and everyone should be informed?')));
|
||||
else if (0 == $event['Event']['published']) echo __('Not published');
|
||||
</tr>
|
||||
<?php foreach ($events as $event): ?>
|
||||
<tr <?php if ($event['Event']['distribution'] == 0) echo 'class = "privateRed"'?>>
|
||||
<?php
|
||||
if ($isSiteAdmin || ($event['Event']['orgc_id'] == $me['org_id'])):
|
||||
?>
|
||||
<td style="width:10px;" data-id="<?php echo h($event['Event']['id']); ?>">
|
||||
<input class="select" type="checkbox" data-id="<?php echo $event['Event']['id'];?>" />
|
||||
</td>
|
||||
<?php
|
||||
else:
|
||||
?>
|
||||
<td style="padding-left:0px;padding-right:0px;"></td>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<td class="short" ondblclick="document.location.href ='<?php echo $baseurl."/events/view/".$event['Event']['id'];?>'">
|
||||
<?php
|
||||
if ($event['Event']['published'] == 1) {
|
||||
?>
|
||||
<a href="<?php echo $baseurl."/events/view/".$event['Event']['id'] ?>" class = "icon-ok" title = "<?php echo __('View');?>"></a>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<a href="<?php echo $baseurl."/events/view/".$event['Event']['id'] ?>" class = "icon-remove" title = "<?php echo __('View');?>"></a>
|
||||
<?php
|
||||
}?>
|
||||
</td>
|
||||
<?php if (Configure::read('MISP.showorg') || $isAdmin): ?>
|
||||
<td class="short" ondblclick="document.location.href ='<?php echo $baseurl . "/events/index/searchorg:" . $event['Orgc']['id'];?>'">
|
||||
<?php
|
||||
echo $this->OrgImg->getOrgImg(array('name' => $event['Orgc']['name'], 'id' => $event['Orgc']['id'], 'size' => 24));
|
||||
?>
|
||||
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<?php if ($isSiteAdmin || (Configure::read('MISP.showorgalternate') && Configure::read('MISP.showorg'))): ?>
|
||||
<td class="short" ondblclick="document.location.href ='<?php echo $baseurl . "/events/index/searchorg:" . $event['Org']['id'];?>'">
|
||||
<?php
|
||||
echo $this->OrgImg->getOrgImg(array('name' => $event['Org']['name'], 'id' => $event['Org']['id'], 'size' => 24));
|
||||
?>
|
||||
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<td style="width:30px;">
|
||||
<a href="<?php echo $baseurl."/events/view/".$event['Event']['id'] ?>"><?php echo $event['Event']['id'];?></a>
|
||||
</td>
|
||||
<td class="shortish">
|
||||
<?php
|
||||
$clusterList = array();
|
||||
$galaxyList = array();
|
||||
$galaxy_id = 0;
|
||||
if (isset($event['GalaxyCluster'])):
|
||||
foreach ($event['GalaxyCluster'] as $cluster):
|
||||
$galaxy_id = $cluster['Galaxy']['id'];
|
||||
if (!isset($galaxyList[$cluster['Galaxy']['id']])) {
|
||||
$galaxyList[$cluster['Galaxy']['id']] = $cluster['Galaxy']['name'];
|
||||
}
|
||||
$clusterList[$cluster['Galaxy']['id']][] = array('value' => $cluster['value'], 'id' => $cluster['id'], 'tag_id' => $cluster['tag_id']);
|
||||
endforeach;
|
||||
endif;
|
||||
$first = true;
|
||||
foreach ($clusterList as $galaxy_id => $clusters):
|
||||
if (!$first) {
|
||||
echo '<br />';
|
||||
} else {
|
||||
$first = false;
|
||||
}
|
||||
?>
|
||||
<span class="blue bold"><a href="<?php echo $baseurl; ?>/galaxies/view/<?php echo h($galaxy_id); ?>"><?php echo h($galaxyList[$galaxy_id]); ?></a>:</span>
|
||||
<?php
|
||||
foreach ($clusters as $cluster):
|
||||
?>
|
||||
<br />
|
||||
<span class="blue">
|
||||
|
||||
<a href="<?php echo $baseurl; ?>/events/index/searchtag:<?php echo h($cluster['tag_id']); ?>"><?php echo h($cluster['value']); ?></a>
|
||||
<a href="<?php echo $baseurl; ?>/galaxy_clusters/view/<?php echo h($cluster['id']); ?>" class="icon-search"></a>
|
||||
</span>
|
||||
<?php
|
||||
endforeach;
|
||||
endforeach;
|
||||
?>
|
||||
</td>
|
||||
<?php if (Configure::read('MISP.tagging')): ?>
|
||||
<td style = "max-width: 200px;width:10px;">
|
||||
<?php foreach ($event['EventTag'] as $tag):
|
||||
$tagText = " ";
|
||||
if (Configure::read('MISP.full_tags_on_event_index') == 1) $tagText = h($tag['Tag']['name']);
|
||||
else if (Configure::read('MISP.full_tags_on_event_index') == 2) {
|
||||
if (strpos($tag['Tag']['name'], '=')) {
|
||||
$tagText = explode('=', $tag['Tag']['name']);
|
||||
$tagText = h(trim(end($tagText), "\""));
|
||||
}
|
||||
else $tagText = h($tag['Tag']['name']);
|
||||
}
|
||||
?>
|
||||
<span class="tag useCursorPointer" style="margin-bottom:3px;background-color:<?php echo h($tag['Tag']['colour']);?>;color:<?php echo $this->TextColour->getTextColour($tag['Tag']['colour']);?>;" title="<?php echo h($tag['Tag']['name']); ?>" onClick="document.location.href='<?php echo $baseurl; ?>/events/index/searchtag:<?php echo h($tag['Tag']['id']);?>';"><?php echo $tagText; ?></span>
|
||||
<?php endforeach; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<td style="width:30px;" ondblclick="location.href ='<?php echo $baseurl."/events/view/".$event['Event']['id'];?>'">
|
||||
<?php echo $event['Event']['attribute_count']; ?>
|
||||
</td>
|
||||
<?php if (Configure::read('MISP.showCorrelationsOnIndex')):?>
|
||||
<td class = "bold" style="width:30px;" ondblclick="location.href ='<?php echo $baseurl."/events/view/".$event['Event']['id'];?>'" title="<?php echo (!empty($event['Event']['correlation_count']) ? h($event['Event']['correlation_count']) : '0') . __(' correlation(s)');?>">
|
||||
<?php echo !empty($event['Event']['correlation_count']) ? h($event['Event']['correlation_count']) : ''; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<?php if (Configure::read('MISP.showSightingsCountOnIndex')):?>
|
||||
<td class = "bold" style="width:30px;" ondblclick="location.href ='<?php echo $baseurl."/events/view/".$event['Event']['id'];?>'" title="<?php echo (!empty($event['Event']['sightings_count']) ? h($event['Event']['sightings_count']) : '0') . ' sighting(s)';?>">
|
||||
<?php echo !empty($event['Event']['sightings_count']) ? h($event['Event']['sightings_count']) : ''; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<?php if (Configure::read('MISP.showProposalsOnIndex')): ?>
|
||||
<td class = "bold" style="width:30px;" ondblclick="location.href ='<?php echo $baseurl."/events/view/".$event['Event']['id'];?>'" title="<?php echo (!empty($event['Event']['proposals_count']) ? h($event['Event']['proposals_count']) : '0') . __(' proposal(s)');?>">
|
||||
<?php echo !empty($event['Event']['proposals_count']) ? h($event['Event']['proposals_count']) : ''; ?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<?php if (Configure::read('MISP.showDiscussionsCountOnIndex')): ?>
|
||||
<td class = "bold" style="width:30px;" ondblclick="location.href ='<?php echo $baseurl."/events/view/".$event['Event']['id'];?>'" title="<?php echo (!empty($event['Event']['proposals_count']) ? h($event['Event']['proposals_count']) : '0') . __(' proposal(s)');?>">
|
||||
<?php
|
||||
if (!empty($event['Event']['post_count'])) {
|
||||
$post_count = h($event['Event']['post_count']);
|
||||
if (($date - $event['Event']['last_post']) < $day) {
|
||||
$post_count .= ' (<span class="red bold">' . __('NEW') . '</span>)';
|
||||
}
|
||||
} else {
|
||||
$post_count = '';
|
||||
}
|
||||
?>
|
||||
<span style=" white-space: nowrap;"><?php echo $post_count?></span>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<?php if ('true' == $isSiteAdmin): ?>
|
||||
<td class="short" ondblclick="location.href ='<?php echo $baseurl."/events/view/".$event['Event']['id'];?>'">
|
||||
<?php echo h($event['User']['email']); ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<td class="short" ondblclick="location.href ='<?php echo $baseurl."/events/view/".$event['Event']['id'];?>'">
|
||||
<?php echo $event['Event']['date']; ?>
|
||||
</td>
|
||||
<td ondblclick="location.href ='<?php echo $baseurl."/events/view/".$event['Event']['id'];?>'">
|
||||
<?php echo nl2br(h($event['Event']['info'])); ?>
|
||||
</td>
|
||||
<td class="short <?php if ($event['Event']['distribution'] == 0) echo 'privateRedText';?>" ondblclick="location.href ='<?php echo $baseurl; ?>/events/view/<?php echo $event['Event']['id'];?>'" title = "<?php echo $event['Event']['distribution'] != 3 ? $distributionLevels[$event['Event']['distribution']] : __('All');?>">
|
||||
<?php if ($event['Event']['distribution'] == 4):?>
|
||||
<a href="<?php echo $baseurl;?>/sharingGroups/view/<?php echo h($event['SharingGroup']['id']); ?>"><?php echo h($event['SharingGroup']['name']);?></a>
|
||||
<?php else:
|
||||
echo h($shortDist[$event['Event']['distribution']]);
|
||||
endif;
|
||||
?>
|
||||
</td>
|
||||
<td class="short action-links">
|
||||
<?php
|
||||
if (0 == $event['Event']['published'] && ($isSiteAdmin || ($isAclPublish && $event['Event']['orgc_id'] == $me['org_id'])))
|
||||
echo $this->Form->postLink('', array('action' => 'alert', $event['Event']['id']), array('class' => 'icon-download-alt', 'title' => __('Publish Event'), __('Are you sure this event is complete and everyone should be informed?')));
|
||||
else if (0 == $event['Event']['published']) echo __('Not published');
|
||||
|
||||
if ($isSiteAdmin || ($isAclModify && $event['Event']['user_id'] == $me['id']) || ($isAclModifyOrg && $event['Event']['orgc_id'] == $me['org_id'])):
|
||||
?>
|
||||
<a href='<?php echo $baseurl."/events/edit/".$event['Event']['id'];?>' class = "icon-edit" title = "<?php echo __('Edit');?>"></a>
|
||||
<?php
|
||||
if ($isSiteAdmin || ($isAclModify && $event['Event']['user_id'] == $me['id']) || ($isAclModifyOrg && $event['Event']['orgc_id'] == $me['org_id'])):
|
||||
?>
|
||||
<a href='<?php echo $baseurl."/events/edit/".$event['Event']['id'];?>' class = "icon-edit" title = "<?php echo __('Edit');?>"></a>
|
||||
<?php
|
||||
|
||||
echo $this->Form->postLink('', array('action' => 'delete', $event['Event']['id']), array('class' => 'icon-trash', 'title' => __('Delete')), __('Are you sure you want to delete # %s?', $event['Event']['id']));
|
||||
endif;
|
||||
?>
|
||||
<a href='<?php echo $baseurl."/events/view/".$event['Event']['id'];?>' class = "icon-list-alt" title = "<?php echo __('View');?>"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
echo $this->Form->postLink('', array('action' => 'delete', $event['Event']['id']), array('class' => 'icon-trash', 'title' => __('Delete')), __('Are you sure you want to delete # %s?', $event['Event']['id']));
|
||||
endif;
|
||||
?>
|
||||
<a href='<?php echo $baseurl."/events/view/".$event['Event']['id'];?>' class = "icon-list-alt" title = "<?php echo __('View');?>"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('.select').on('change', function() {
|
||||
listCheckboxesChecked();
|
||||
});
|
||||
});
|
||||
$(document).ready(function() {
|
||||
$('.select').on('change', function() {
|
||||
listCheckboxesChecked();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1,148 +1,148 @@
|
|||
<?php
|
||||
$all = false;
|
||||
if (isset($this->params->params['paging']['Event']['page'])) {
|
||||
if ($this->params->params['paging']['Event']['page'] == 0) $all = true;
|
||||
$page = $this->params->params['paging']['Event']['page'];
|
||||
} else {
|
||||
$page = 0;
|
||||
}
|
||||
$fieldCount = 8;
|
||||
$all = false;
|
||||
if (isset($this->params->params['paging']['Event']['page'])) {
|
||||
if ($this->params->params['paging']['Event']['page'] == 0) $all = true;
|
||||
$page = $this->params->params['paging']['Event']['page'];
|
||||
} else {
|
||||
$page = 0;
|
||||
}
|
||||
$fieldCount = 8;
|
||||
?>
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<?php
|
||||
$this->Paginator->options(array(
|
||||
'url' => array($feed['Feed']['id'], $event['Event']['uuid']),
|
||||
'evalScripts' => true,
|
||||
'before' => '$(".progress").show()',
|
||||
'complete' => '$(".progress").hide()',
|
||||
));
|
||||
echo $this->Paginator->prev('« ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
echo $this->Paginator->numbers(array('modulus' => 60, 'separator' => '', 'tag' => 'li', 'currentClass' => 'red', 'currentTag' => 'span'));
|
||||
echo $this->Paginator->next(__('next') . ' »', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
?>
|
||||
<li class="all <?php if ($all) echo 'disabled'; ?>">
|
||||
<?php
|
||||
if ($all):
|
||||
?>
|
||||
<span class="red"><?php echo __('view all');?></span>
|
||||
<?php
|
||||
else:
|
||||
echo $this->Paginator->link(__('view all'), 'all');
|
||||
endif;
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<?php
|
||||
$this->Paginator->options(array(
|
||||
'url' => array($feed['Feed']['id'], $event['Event']['uuid']),
|
||||
'evalScripts' => true,
|
||||
'before' => '$(".progress").show()',
|
||||
'complete' => '$(".progress").hide()',
|
||||
));
|
||||
echo $this->Paginator->prev('« ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
echo $this->Paginator->numbers(array('modulus' => 60, 'separator' => '', 'tag' => 'li', 'currentClass' => 'red', 'currentTag' => 'span'));
|
||||
echo $this->Paginator->next(__('next') . ' »', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
?>
|
||||
<li class="all <?php if ($all) echo 'disabled'; ?>">
|
||||
<?php
|
||||
if ($all):
|
||||
?>
|
||||
<span class="red"><?php echo __('view all');?></span>
|
||||
<?php
|
||||
else:
|
||||
echo $this->Paginator->link(__('view all'), 'all');
|
||||
endif;
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<br />
|
||||
<div id="attributeList" class="attributeListContainer">
|
||||
<table class="table table-striped table-condensed">
|
||||
<tr>
|
||||
<th><?php echo $this->Paginator->sort('timestamp', 'Date');?></th>
|
||||
<th><?php echo $this->Paginator->sort('category');?></th>
|
||||
<th><?php echo $this->Paginator->sort('type');?></th>
|
||||
<th><?php echo $this->Paginator->sort('value');?></th>
|
||||
<th><?php echo __('Tags');?></th>
|
||||
<th><?php echo $this->Paginator->sort('comment');?></th>
|
||||
<th><?php echo __('Related Events');?></th>
|
||||
<th><?php echo __('Feed hits');?></th>
|
||||
<th title="<?php echo $attrDescriptions['signature']['desc'];?>"><?php echo $this->Paginator->sort('to_ids', 'IDS');?></th>
|
||||
</tr>
|
||||
<?php
|
||||
$elements = array(
|
||||
0 => 'attribute',
|
||||
3 => 'object'
|
||||
);
|
||||
$focusedRow = false;
|
||||
foreach ($event['objects'] as $k => $object):
|
||||
$insertBlank = false;
|
||||
echo $this->element('/Feeds/View/row_' . $object['objectType'], array(
|
||||
'object' => $object,
|
||||
'k' => $k,
|
||||
'page' => $page,
|
||||
'fieldCount' => $fieldCount
|
||||
));
|
||||
if (!empty($focus) && ($object['objectType'] == 'object' || $object['objectType'] == 'attribute') && $object['uuid'] == $focus) {
|
||||
$focusedRow = $k;
|
||||
}
|
||||
if ($object['objectType'] == 'object'):
|
||||
?>
|
||||
<tr class="blank_table_row"><td colspan="<?php echo $fieldCount; ?>"></td></tr>
|
||||
<?php
|
||||
endif;
|
||||
endforeach;
|
||||
?>
|
||||
</table>
|
||||
<table class="table table-striped table-condensed">
|
||||
<tr>
|
||||
<th><?php echo $this->Paginator->sort('timestamp', 'Date');?></th>
|
||||
<th><?php echo $this->Paginator->sort('category');?></th>
|
||||
<th><?php echo $this->Paginator->sort('type');?></th>
|
||||
<th><?php echo $this->Paginator->sort('value');?></th>
|
||||
<th><?php echo __('Tags');?></th>
|
||||
<th><?php echo $this->Paginator->sort('comment');?></th>
|
||||
<th><?php echo __('Related Events');?></th>
|
||||
<th><?php echo __('Feed hits');?></th>
|
||||
<th title="<?php echo $attrDescriptions['signature']['desc'];?>"><?php echo $this->Paginator->sort('to_ids', 'IDS');?></th>
|
||||
</tr>
|
||||
<?php
|
||||
$elements = array(
|
||||
0 => 'attribute',
|
||||
3 => 'object'
|
||||
);
|
||||
$focusedRow = false;
|
||||
foreach ($event['objects'] as $k => $object):
|
||||
$insertBlank = false;
|
||||
echo $this->element('/Feeds/View/row_' . $object['objectType'], array(
|
||||
'object' => $object,
|
||||
'k' => $k,
|
||||
'page' => $page,
|
||||
'fieldCount' => $fieldCount
|
||||
));
|
||||
if (!empty($focus) && ($object['objectType'] == 'object' || $object['objectType'] == 'attribute') && $object['uuid'] == $focus) {
|
||||
$focusedRow = $k;
|
||||
}
|
||||
if ($object['objectType'] == 'object'):
|
||||
?>
|
||||
<tr class="blank_table_row"><td colspan="<?php echo $fieldCount; ?>"></td></tr>
|
||||
<?php
|
||||
endif;
|
||||
endforeach;
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<?php
|
||||
$this->Paginator->options(array(
|
||||
'url' => array($feed['Feed']['id'], $event['Event']['uuid']),
|
||||
'evalScripts' => true,
|
||||
'before' => '$(".progress").show()',
|
||||
'complete' => '$(".progress").hide()',
|
||||
));
|
||||
echo $this->Paginator->prev('« ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
echo $this->Paginator->numbers(array('modulus' => 60, 'separator' => '', 'tag' => 'li', 'currentClass' => 'red', 'currentTag' => 'span'));
|
||||
echo $this->Paginator->next(__('next') . ' »', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
?>
|
||||
<li class="all <?php if ($all) echo 'disabled'; ?>">
|
||||
<?php
|
||||
if ($all):
|
||||
?>
|
||||
<span class="red"><?php echo __('view all');?></span>
|
||||
<?php
|
||||
else:
|
||||
echo $this->Paginator->link(__('view all'), 'all');
|
||||
endif;
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<?php
|
||||
$this->Paginator->options(array(
|
||||
'url' => array($feed['Feed']['id'], $event['Event']['uuid']),
|
||||
'evalScripts' => true,
|
||||
'before' => '$(".progress").show()',
|
||||
'complete' => '$(".progress").hide()',
|
||||
));
|
||||
echo $this->Paginator->prev('« ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
echo $this->Paginator->numbers(array('modulus' => 60, 'separator' => '', 'tag' => 'li', 'currentClass' => 'red', 'currentTag' => 'span'));
|
||||
echo $this->Paginator->next(__('next') . ' »', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
?>
|
||||
<li class="all <?php if ($all) echo 'disabled'; ?>">
|
||||
<?php
|
||||
if ($all):
|
||||
?>
|
||||
<span class="red"><?php echo __('view all');?></span>
|
||||
<?php
|
||||
else:
|
||||
echo $this->Paginator->link(__('view all'), 'all');
|
||||
endif;
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var currentUri = "<?php echo isset($currentUri) ? h($currentUri) : '/feeds/previewEvent/' . h($feed['Feed']['id']) . '/' . h($event['Event']['uuid']); ?>";
|
||||
var lastSelected = false;
|
||||
var deleted = <?php echo (isset($deleted) && $deleted) ? 'true' : 'false';?>;
|
||||
$(document).ready(function() {
|
||||
<?php
|
||||
if ($focusedRow !== false):
|
||||
?>
|
||||
$('.row_' + '<?php echo h($focusedRow); ?>').focus();
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
$('.screenshot').click(function() {
|
||||
screenshotPopup($(this).attr('src'), $(this).attr('title'));
|
||||
});
|
||||
});
|
||||
$('.hex-value-convert').click(function() {
|
||||
var val = $(this).parent().children(':first-child').text();
|
||||
if ($(this).parent().children(':first-child').attr('data-original-title') == 'Hexadecimal representation') {
|
||||
var bin = [];
|
||||
var temp;
|
||||
val.split('').forEach(function(entry) {
|
||||
temp = parseInt(entry, 16).toString(2);
|
||||
bin.push(Array(5 - (temp.length)).join('0') + temp);
|
||||
});
|
||||
bin = bin.join(' ');
|
||||
$(this).parent().children(':first-child').text(bin);
|
||||
$(this).parent().children(':first-child').attr('data-original-title', __('Binary representation'));
|
||||
$(this).parent().children(':nth-child(2)').attr('data-original-title', __('Switch to hexadecimal representation'));
|
||||
$(this).parent().children(':nth-child(2)').attr('aria-label', __('Switch to hexadecimal representation'));
|
||||
} else {
|
||||
val = val.split(' ');
|
||||
hex = '';
|
||||
val.forEach(function(entry) {
|
||||
hex += parseInt(entry , 2).toString(16).toUpperCase();
|
||||
});
|
||||
$(this).parent().children(':first-child').text(hex);
|
||||
$(this).parent().children(':first-child').attr('data-original-title', __('Hexadecimal representation'));
|
||||
$(this).parent().children(':nth-child(2)').attr('data-original-title', __('Switch to binary representation'));
|
||||
$(this).parent().children(':nth-child(2)').attr('aria-label', __('Switch to binary representation'));
|
||||
}
|
||||
});
|
||||
var currentUri = "<?php echo isset($currentUri) ? h($currentUri) : '/feeds/previewEvent/' . h($feed['Feed']['id']) . '/' . h($event['Event']['uuid']); ?>";
|
||||
var lastSelected = false;
|
||||
var deleted = <?php echo (isset($deleted) && $deleted) ? 'true' : 'false';?>;
|
||||
$(document).ready(function() {
|
||||
<?php
|
||||
if ($focusedRow !== false):
|
||||
?>
|
||||
$('.row_' + '<?php echo h($focusedRow); ?>').focus();
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
$('.screenshot').click(function() {
|
||||
screenshotPopup($(this).attr('src'), $(this).attr('title'));
|
||||
});
|
||||
});
|
||||
$('.hex-value-convert').click(function() {
|
||||
var val = $(this).parent().children(':first-child').text();
|
||||
if ($(this).parent().children(':first-child').attr('data-original-title') == 'Hexadecimal representation') {
|
||||
var bin = [];
|
||||
var temp;
|
||||
val.split('').forEach(function(entry) {
|
||||
temp = parseInt(entry, 16).toString(2);
|
||||
bin.push(Array(5 - (temp.length)).join('0') + temp);
|
||||
});
|
||||
bin = bin.join(' ');
|
||||
$(this).parent().children(':first-child').text(bin);
|
||||
$(this).parent().children(':first-child').attr('data-original-title', __('Binary representation'));
|
||||
$(this).parent().children(':nth-child(2)').attr('data-original-title', __('Switch to hexadecimal representation'));
|
||||
$(this).parent().children(':nth-child(2)').attr('aria-label', __('Switch to hexadecimal representation'));
|
||||
} else {
|
||||
val = val.split(' ');
|
||||
hex = '';
|
||||
val.forEach(function(entry) {
|
||||
hex += parseInt(entry , 2).toString(16).toUpperCase();
|
||||
});
|
||||
$(this).parent().children(':first-child').text(hex);
|
||||
$(this).parent().children(':first-child').attr('data-original-title', __('Hexadecimal representation'));
|
||||
$(this).parent().children(':nth-child(2)').attr('data-original-title', __('Switch to binary representation'));
|
||||
$(this).parent().children(':nth-child(2)').attr('aria-label', __('Switch to binary representation'));
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
echo $this->Js->writeBuffer();
|
||||
echo $this->Js->writeBuffer();
|
||||
?>
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
$branches = array('services', 'timeout', 'hover');
|
||||
?>
|
||||
<div class="templateTableRow ui-sortable-handle">
|
||||
<div class="templateElementHeader" style="width:100%; position:relative;">
|
||||
<div class="templateGlass"></div>
|
||||
<div class="templateElementHeaderText"><?php echo h($type); ?></div>
|
||||
</div>
|
||||
<div class="templateElementHeader" style="width:100%; position:relative;">
|
||||
<div class="templateGlass"></div>
|
||||
<div class="templateElementHeaderText"><?php echo h($type); ?></div>
|
||||
</div>
|
||||
<div style="padding:10px;">
|
||||
<div><?php echo h($moduleTypes[$type]['description']); ?></div>
|
||||
<div><span class="bold"><?php echo __('Status'); ?></span>: <span id="<?php echo h(strtolower($type)); ?>_type"> </span></div>
|
||||
|
|
|
@ -1,148 +1,148 @@
|
|||
<?php
|
||||
$all = false;
|
||||
if (isset($this->params->params['paging']['Event']['page'])) {
|
||||
if ($this->params->params['paging']['Event']['page'] == 0) $all = true;
|
||||
$page = $this->params->params['paging']['Event']['page'];
|
||||
} else {
|
||||
$page = 0;
|
||||
}
|
||||
$fieldCount = 8;
|
||||
$all = false;
|
||||
if (isset($this->params->params['paging']['Event']['page'])) {
|
||||
if ($this->params->params['paging']['Event']['page'] == 0) $all = true;
|
||||
$page = $this->params->params['paging']['Event']['page'];
|
||||
} else {
|
||||
$page = 0;
|
||||
}
|
||||
$fieldCount = 8;
|
||||
?>
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<?php
|
||||
$this->Paginator->options(array(
|
||||
'url' => array($server['Server']['id'], $event['Event']['id']),
|
||||
'evalScripts' => true,
|
||||
'before' => '$(".progress").show()',
|
||||
'complete' => '$(".progress").hide()',
|
||||
));
|
||||
echo $this->Paginator->prev('« ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
echo $this->Paginator->numbers(array('modulus' => 60, 'separator' => '', 'tag' => 'li', 'currentClass' => 'red', 'currentTag' => 'span'));
|
||||
echo $this->Paginator->next(__('next') . ' »', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
?>
|
||||
<li class="all <?php if ($all) echo 'disabled'; ?>">
|
||||
<?php
|
||||
if ($all):
|
||||
?>
|
||||
<span class="red"><?php echo __('view all');?></span>
|
||||
<?php
|
||||
else:
|
||||
echo $this->Paginator->link(__('view all'), __('all'));
|
||||
endif;
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<?php
|
||||
$this->Paginator->options(array(
|
||||
'url' => array($server['Server']['id'], $event['Event']['id']),
|
||||
'evalScripts' => true,
|
||||
'before' => '$(".progress").show()',
|
||||
'complete' => '$(".progress").hide()',
|
||||
));
|
||||
echo $this->Paginator->prev('« ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
echo $this->Paginator->numbers(array('modulus' => 60, 'separator' => '', 'tag' => 'li', 'currentClass' => 'red', 'currentTag' => 'span'));
|
||||
echo $this->Paginator->next(__('next') . ' »', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
?>
|
||||
<li class="all <?php if ($all) echo 'disabled'; ?>">
|
||||
<?php
|
||||
if ($all):
|
||||
?>
|
||||
<span class="red"><?php echo __('view all');?></span>
|
||||
<?php
|
||||
else:
|
||||
echo $this->Paginator->link(__('view all'), __('all'));
|
||||
endif;
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<br />
|
||||
<div id="attributeList" class="attributeListContainer">
|
||||
<table class="table table-striped table-condensed">
|
||||
<tr>
|
||||
<th><?php echo $this->Paginator->sort('timestamp', __('Date'));?></th>
|
||||
<th><?php echo $this->Paginator->sort('category');?></th>
|
||||
<th><?php echo $this->Paginator->sort('type');?></th>
|
||||
<th><?php echo $this->Paginator->sort('value');?></th>
|
||||
<th><?php echo __('Tags');?></th>
|
||||
<th><?php echo $this->Paginator->sort('comment');?></th>
|
||||
<th><?php echo __('Related Events');?></th>
|
||||
<th><?php echo __('Feed hits');?></th>
|
||||
<th title="<?php echo $attrDescriptions['signature']['desc'];?>"><?php echo $this->Paginator->sort('to_ids', __('IDS'));?></th>
|
||||
</tr>
|
||||
<?php
|
||||
$elements = array(
|
||||
0 => 'attribute',
|
||||
3 => 'object'
|
||||
);
|
||||
$focusedRow = false;
|
||||
foreach ($event['objects'] as $k => $object):
|
||||
$insertBlank = false;
|
||||
echo $this->element('/Servers/View/row_' . $object['objectType'], array(
|
||||
'object' => $object,
|
||||
'k' => $k,
|
||||
'page' => $page,
|
||||
'fieldCount' => $fieldCount
|
||||
));
|
||||
if (!empty($focus) && ($object['objectType'] == 'object' || $object['objectType'] == 'attribute') && $object['uuid'] == $focus) {
|
||||
$focusedRow = $k;
|
||||
}
|
||||
if ($object['objectType'] == 'object'):
|
||||
?>
|
||||
<tr class="blank_table_row"><td colspan="<?php echo $fieldCount; ?>"></td></tr>
|
||||
<?php
|
||||
endif;
|
||||
endforeach;
|
||||
?>
|
||||
</table>
|
||||
<table class="table table-striped table-condensed">
|
||||
<tr>
|
||||
<th><?php echo $this->Paginator->sort('timestamp', __('Date'));?></th>
|
||||
<th><?php echo $this->Paginator->sort('category');?></th>
|
||||
<th><?php echo $this->Paginator->sort('type');?></th>
|
||||
<th><?php echo $this->Paginator->sort('value');?></th>
|
||||
<th><?php echo __('Tags');?></th>
|
||||
<th><?php echo $this->Paginator->sort('comment');?></th>
|
||||
<th><?php echo __('Related Events');?></th>
|
||||
<th><?php echo __('Feed hits');?></th>
|
||||
<th title="<?php echo $attrDescriptions['signature']['desc'];?>"><?php echo $this->Paginator->sort('to_ids', __('IDS'));?></th>
|
||||
</tr>
|
||||
<?php
|
||||
$elements = array(
|
||||
0 => 'attribute',
|
||||
3 => 'object'
|
||||
);
|
||||
$focusedRow = false;
|
||||
foreach ($event['objects'] as $k => $object):
|
||||
$insertBlank = false;
|
||||
echo $this->element('/Servers/View/row_' . $object['objectType'], array(
|
||||
'object' => $object,
|
||||
'k' => $k,
|
||||
'page' => $page,
|
||||
'fieldCount' => $fieldCount
|
||||
));
|
||||
if (!empty($focus) && ($object['objectType'] == 'object' || $object['objectType'] == 'attribute') && $object['uuid'] == $focus) {
|
||||
$focusedRow = $k;
|
||||
}
|
||||
if ($object['objectType'] == 'object'):
|
||||
?>
|
||||
<tr class="blank_table_row"><td colspan="<?php echo $fieldCount; ?>"></td></tr>
|
||||
<?php
|
||||
endif;
|
||||
endforeach;
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<?php
|
||||
$this->Paginator->options(array(
|
||||
'url' => array($server['Server']['id'], $event['Event']['id']),
|
||||
'evalScripts' => true,
|
||||
'before' => '$(".progress").show()',
|
||||
'complete' => '$(".progress").hide()',
|
||||
));
|
||||
echo $this->Paginator->prev('« ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
echo $this->Paginator->numbers(array('modulus' => 60, 'separator' => '', 'tag' => 'li', 'currentClass' => 'red', 'currentTag' => 'span'));
|
||||
echo $this->Paginator->next(__('next') . ' »', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
?>
|
||||
<li class="all <?php if ($all) echo 'disabled'; ?>">
|
||||
<?php
|
||||
if ($all):
|
||||
?>
|
||||
<span class="red"><?php echo __('view all');?></span>
|
||||
<?php
|
||||
else:
|
||||
echo $this->Paginator->link(__('view all'), __('all'));
|
||||
endif;
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<?php
|
||||
$this->Paginator->options(array(
|
||||
'url' => array($server['Server']['id'], $event['Event']['id']),
|
||||
'evalScripts' => true,
|
||||
'before' => '$(".progress").show()',
|
||||
'complete' => '$(".progress").hide()',
|
||||
));
|
||||
echo $this->Paginator->prev('« ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
echo $this->Paginator->numbers(array('modulus' => 60, 'separator' => '', 'tag' => 'li', 'currentClass' => 'red', 'currentTag' => 'span'));
|
||||
echo $this->Paginator->next(__('next') . ' »', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
?>
|
||||
<li class="all <?php if ($all) echo 'disabled'; ?>">
|
||||
<?php
|
||||
if ($all):
|
||||
?>
|
||||
<span class="red"><?php echo __('view all');?></span>
|
||||
<?php
|
||||
else:
|
||||
echo $this->Paginator->link(__('view all'), __('all'));
|
||||
endif;
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var currentUri = "<?php echo isset($currentUri) ? h($currentUri) : '/servers/previewEvent/' . h($server['Server']['id']) . '/' . h($event['Event']['id']); ?>";
|
||||
var lastSelected = false;
|
||||
var deleted = <?php echo (isset($deleted) && $deleted) ? 'true' : 'false';?>;
|
||||
$(document).ready(function() {
|
||||
<?php
|
||||
if ($focusedRow !== false):
|
||||
?>
|
||||
$('.row_' + '<?php echo h($focusedRow); ?>').focus();
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
$('.screenshot').click(function() {
|
||||
screenshotPopup($(this).attr('src'), $(this).attr('title'));
|
||||
});
|
||||
});
|
||||
$('.hex-value-convert').click(function() {
|
||||
var val = $(this).parent().children(':first-child').text();
|
||||
if ($(this).parent().children(':first-child').attr('data-original-title') == 'Hexadecimal representation') {
|
||||
var bin = [];
|
||||
var temp;
|
||||
val.split('').forEach(function(entry) {
|
||||
temp = parseInt(entry, 16).toString(2);
|
||||
bin.push(Array(5 - (temp.length)).join('0') + temp);
|
||||
});
|
||||
bin = bin.join(' ');
|
||||
$(this).parent().children(':first-child').text(bin);
|
||||
$(this).parent().children(':first-child').attr('data-original-title', __('Binary representation'));
|
||||
$(this).parent().children(':nth-child(2)').attr('data-original-title', __('Switch to hexadecimal representation'));
|
||||
$(this).parent().children(':nth-child(2)').attr('aria-label', __('Switch to hexadecimal representation'));
|
||||
} else {
|
||||
val = val.split(' ');
|
||||
hex = '';
|
||||
val.forEach(function(entry) {
|
||||
hex += parseInt(entry , 2).toString(16).toUpperCase();
|
||||
});
|
||||
$(this).parent().children(':first-child').text(hex);
|
||||
$(this).parent().children(':first-child').attr('data-original-title', __('Hexadecimal representation'));
|
||||
$(this).parent().children(':nth-child(2)').attr('data-original-title', __('Switch to binary representation'));
|
||||
$(this).parent().children(':nth-child(2)').attr('aria-label', __('Switch to binary representation'));
|
||||
}
|
||||
});
|
||||
var currentUri = "<?php echo isset($currentUri) ? h($currentUri) : '/servers/previewEvent/' . h($server['Server']['id']) . '/' . h($event['Event']['id']); ?>";
|
||||
var lastSelected = false;
|
||||
var deleted = <?php echo (isset($deleted) && $deleted) ? 'true' : 'false';?>;
|
||||
$(document).ready(function() {
|
||||
<?php
|
||||
if ($focusedRow !== false):
|
||||
?>
|
||||
$('.row_' + '<?php echo h($focusedRow); ?>').focus();
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
$('.screenshot').click(function() {
|
||||
screenshotPopup($(this).attr('src'), $(this).attr('title'));
|
||||
});
|
||||
});
|
||||
$('.hex-value-convert').click(function() {
|
||||
var val = $(this).parent().children(':first-child').text();
|
||||
if ($(this).parent().children(':first-child').attr('data-original-title') == 'Hexadecimal representation') {
|
||||
var bin = [];
|
||||
var temp;
|
||||
val.split('').forEach(function(entry) {
|
||||
temp = parseInt(entry, 16).toString(2);
|
||||
bin.push(Array(5 - (temp.length)).join('0') + temp);
|
||||
});
|
||||
bin = bin.join(' ');
|
||||
$(this).parent().children(':first-child').text(bin);
|
||||
$(this).parent().children(':first-child').attr('data-original-title', __('Binary representation'));
|
||||
$(this).parent().children(':nth-child(2)').attr('data-original-title', __('Switch to hexadecimal representation'));
|
||||
$(this).parent().children(':nth-child(2)').attr('aria-label', __('Switch to hexadecimal representation'));
|
||||
} else {
|
||||
val = val.split(' ');
|
||||
hex = '';
|
||||
val.forEach(function(entry) {
|
||||
hex += parseInt(entry , 2).toString(16).toUpperCase();
|
||||
});
|
||||
$(this).parent().children(':first-child').text(hex);
|
||||
$(this).parent().children(':first-child').attr('data-original-title', __('Hexadecimal representation'));
|
||||
$(this).parent().children(':nth-child(2)').attr('data-original-title', __('Switch to binary representation'));
|
||||
$(this).parent().children(':nth-child(2)').attr('aria-label', __('Switch to binary representation'));
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
echo $this->Js->writeBuffer();
|
||||
echo $this->Js->writeBuffer();
|
||||
?>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<div class="btn-toolbar">
|
||||
<div class="btn-group">
|
||||
<?php
|
||||
foreach ($pages as $key => $value):
|
||||
?>
|
||||
<a class="btn <?php echo $page == $key ? 'btn-primary' : 'btn-inverse'?> qet" href="<?php echo $baseurl . '/users/statistics/' . h($key); ?>"><?php echo h($value); ?></a>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<?php
|
||||
foreach ($pages as $key => $value):
|
||||
?>
|
||||
<a class="btn <?php echo $page == $key ? 'btn-primary' : 'btn-inverse'?> qet" href="<?php echo $baseurl . '/users/statistics/' . h($key); ?>"><?php echo h($value); ?></a>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,100 +1,100 @@
|
|||
<table class="table table-striped table-hover table-condensed">
|
||||
<tr>
|
||||
<th><?php echo $this->Paginator->sort('id');?></th>
|
||||
<th><?php echo $this->Paginator->sort('org_ci', __('Org'));?></th>
|
||||
<th><?php echo $this->Paginator->sort('role_id', __('Role'));?></th>
|
||||
<th><?php echo $this->Paginator->sort('email');?></th>
|
||||
<th><?php echo $this->Paginator->sort('authkey');?></th>
|
||||
<th><?php echo $this->Paginator->sort('autoalert');?></th>
|
||||
<th><?php echo $this->Paginator->sort('contactalert');?></th>
|
||||
<th><?php echo $this->Paginator->sort('gpgkey');?></th>
|
||||
<?php if (Configure::read('SMIME.enabled')): ?>
|
||||
<th><?php echo $this->Paginator->sort('certif_public', 'SMIME');?></th>
|
||||
<?php endif; ?>
|
||||
<th><?php echo $this->Paginator->sort('nids_sid');?></th>
|
||||
<th><?php echo $this->Paginator->sort('termsaccepted');?></th>
|
||||
<th><?php echo $this->Paginator->sort('current_login', __('Last login'));?></th>
|
||||
<th><?php echo $this->Paginator->sort('date_created', __('Created'));?></th>
|
||||
<?php
|
||||
if (Configure::read('Plugin.CustomAuth_enable') && !Configure::read('Plugin.CustomAuth_required')):
|
||||
?>
|
||||
<th><?php echo $this->Paginator->sort('external_auth_required', Configure::read('Plugin.CustomAuth_name') ? Configure::read('Plugin.CustomAuth_name') : 'External authentication');?></th>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<th><?php echo $this->Paginator->sort('disabled');?></th>
|
||||
<th class="actions"><?php echo __('Actions');?></th>
|
||||
</tr>
|
||||
<?php
|
||||
foreach ($users as $user): ?>
|
||||
<tr <?php echo $user['User']['disabled'] ? 'class="deleted_row"' : '';?>>
|
||||
<td class="short" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';">
|
||||
<?php echo h($user['User']['id']); ?>
|
||||
</td>
|
||||
<td class="short" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';">
|
||||
<a href="/organisations/view/<?php echo $user['Organisation']['id'];?>"><?php echo h($user['Organisation']['name']); ?> </a>
|
||||
</td>
|
||||
<td class="short" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';">
|
||||
<?php echo $this->Html->link($user['Role']['name'], array('controller' => 'roles', 'action' => 'view', $user['Role']['id'])); ?>
|
||||
</td>
|
||||
<td ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';">
|
||||
<?php echo h($user['User']['email']); ?>
|
||||
</td>
|
||||
<td ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';" class="quickSelect <?php echo $user['Role']['perm_auth'] ? 'bold' : 'grey'; ?>">
|
||||
<?php echo h($user['User']['authkey']); ?>
|
||||
</td>
|
||||
<td class="short" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';">
|
||||
<?php echo $user['User']['autoalert']? __('Yes') : __('No'); ?>
|
||||
</td>
|
||||
<td class="short" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';">
|
||||
<?php echo $user['User']['contactalert']? __('Yes') : __('No'); ?>
|
||||
</td>
|
||||
<td class="short" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';">
|
||||
<?php echo $user['User']['gpgkey']? 'Yes' : 'No'; ?>
|
||||
</td>
|
||||
<?php if (Configure::read('SMIME.enabled')): ?>
|
||||
<td class="short" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';">
|
||||
<?php echo $user['User']['certif_public']? __('Yes') : __('No'); ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<td class="short" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';">
|
||||
<?php echo h($user['User']['nids_sid']); ?>
|
||||
</td>
|
||||
<td class="short" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';">
|
||||
<?php echo ($user['User']['termsaccepted'] == 1) ? __("Yes") : __("No"); ?>
|
||||
</td>
|
||||
<td class="short" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';" title="<?php echo !$user['User']['current_login'] ? __('N/A') : h(date("Y-m-d H:i:s",$user['User']['current_login']));?>">
|
||||
<?php echo !$user['User']['current_login'] ? __('N/A') : h(date("Y-m-d",$user['User']['current_login'])); ?>
|
||||
</td>
|
||||
<td class="short" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';" title="<?php echo !$user['User']['current_login'] ? 'N/A' : h(date("Y-m-d H:i:s",$user['User']['current_login']));?>">
|
||||
<?php echo !$user['User']['date_created'] ? __('N/A') : h(date("Y-m-d",$user['User']['date_created'])); ?>
|
||||
</td>
|
||||
<?php
|
||||
if (Configure::read('Plugin.CustomAuth_enable') && !Configure::read('Plugin.CustomAuth_required')):
|
||||
?>
|
||||
<td class="short" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';" title="">
|
||||
<?php echo ($user['User']['external_auth_required'] ? __('Yes') : __('No')); ?>
|
||||
</td>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<td class="short <?php if ($user['User']['disabled']) echo 'red bold';?>" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';">
|
||||
<?php echo ($user['User']['disabled'] ? __('Yes') : __('No')); ?>
|
||||
</td>
|
||||
<td class="short action-links">
|
||||
<?php
|
||||
if (($isAclAdmin && (($user['User']['org_id'] == $me['org_id'])) || ('1' == $me['id'])) || ($isSiteAdmin)):
|
||||
?>
|
||||
<span role="button" tabindex="0" aria-label="Initiate password refresh" title="<?php echo __('Initiate password refresh');?>" class="icon-refresh useCursorPointer" onClick="initiatePasswordReset('<?php echo $user['User']['id']; ?>');" title="<?php echo __('Create new credentials and inform user');?>" role="button" tabindex="0" aria-label="<?php echo __('Create new credentials and inform user');?>"></span>
|
||||
<?php
|
||||
echo $this->Html->link('', array('admin' => true, 'action' => 'edit', $user['User']['id']), array('class' => 'icon-edit', 'title' => __('Edit')));
|
||||
echo $this->Form->postLink('', array('admin' => true, 'action' => 'delete', $user['User']['id']), array('class' => 'icon-trash', 'title' => __('Delete')), __('Are you sure you want to delete # %s? It is highly recommended to never delete users but to disable them instead.', $user['User']['id']));
|
||||
endif;
|
||||
?>
|
||||
<?php echo $this->Html->link('', array('admin' => true, 'action' => 'view', $user['User']['id']), array('class' => 'icon-list-alt', 'title' => __('View'))); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
<tr>
|
||||
<th><?php echo $this->Paginator->sort('id');?></th>
|
||||
<th><?php echo $this->Paginator->sort('org_ci', __('Org'));?></th>
|
||||
<th><?php echo $this->Paginator->sort('role_id', __('Role'));?></th>
|
||||
<th><?php echo $this->Paginator->sort('email');?></th>
|
||||
<th><?php echo $this->Paginator->sort('authkey');?></th>
|
||||
<th><?php echo $this->Paginator->sort('autoalert');?></th>
|
||||
<th><?php echo $this->Paginator->sort('contactalert');?></th>
|
||||
<th><?php echo $this->Paginator->sort('gpgkey');?></th>
|
||||
<?php if (Configure::read('SMIME.enabled')): ?>
|
||||
<th><?php echo $this->Paginator->sort('certif_public', 'SMIME');?></th>
|
||||
<?php endif; ?>
|
||||
<th><?php echo $this->Paginator->sort('nids_sid');?></th>
|
||||
<th><?php echo $this->Paginator->sort('termsaccepted');?></th>
|
||||
<th><?php echo $this->Paginator->sort('current_login', __('Last login'));?></th>
|
||||
<th><?php echo $this->Paginator->sort('date_created', __('Created'));?></th>
|
||||
<?php
|
||||
if (Configure::read('Plugin.CustomAuth_enable') && !Configure::read('Plugin.CustomAuth_required')):
|
||||
?>
|
||||
<th><?php echo $this->Paginator->sort('external_auth_required', Configure::read('Plugin.CustomAuth_name') ? Configure::read('Plugin.CustomAuth_name') : 'External authentication');?></th>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<th><?php echo $this->Paginator->sort('disabled');?></th>
|
||||
<th class="actions"><?php echo __('Actions');?></th>
|
||||
</tr>
|
||||
<?php
|
||||
foreach ($users as $user): ?>
|
||||
<tr <?php echo $user['User']['disabled'] ? 'class="deleted_row"' : '';?>>
|
||||
<td class="short" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';">
|
||||
<?php echo h($user['User']['id']); ?>
|
||||
</td>
|
||||
<td class="short" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';">
|
||||
<a href="/organisations/view/<?php echo $user['Organisation']['id'];?>"><?php echo h($user['Organisation']['name']); ?> </a>
|
||||
</td>
|
||||
<td class="short" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';">
|
||||
<?php echo $this->Html->link($user['Role']['name'], array('controller' => 'roles', 'action' => 'view', $user['Role']['id'])); ?>
|
||||
</td>
|
||||
<td ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';">
|
||||
<?php echo h($user['User']['email']); ?>
|
||||
</td>
|
||||
<td ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';" class="quickSelect <?php echo $user['Role']['perm_auth'] ? 'bold' : 'grey'; ?>">
|
||||
<?php echo h($user['User']['authkey']); ?>
|
||||
</td>
|
||||
<td class="short" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';">
|
||||
<?php echo $user['User']['autoalert']? __('Yes') : __('No'); ?>
|
||||
</td>
|
||||
<td class="short" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';">
|
||||
<?php echo $user['User']['contactalert']? __('Yes') : __('No'); ?>
|
||||
</td>
|
||||
<td class="short" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';">
|
||||
<?php echo $user['User']['gpgkey']? 'Yes' : 'No'; ?>
|
||||
</td>
|
||||
<?php if (Configure::read('SMIME.enabled')): ?>
|
||||
<td class="short" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';">
|
||||
<?php echo $user['User']['certif_public']? __('Yes') : __('No'); ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<td class="short" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';">
|
||||
<?php echo h($user['User']['nids_sid']); ?>
|
||||
</td>
|
||||
<td class="short" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';">
|
||||
<?php echo ($user['User']['termsaccepted'] == 1) ? __("Yes") : __("No"); ?>
|
||||
</td>
|
||||
<td class="short" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';" title="<?php echo !$user['User']['current_login'] ? __('N/A') : h(date("Y-m-d H:i:s",$user['User']['current_login']));?>">
|
||||
<?php echo !$user['User']['current_login'] ? __('N/A') : h(date("Y-m-d",$user['User']['current_login'])); ?>
|
||||
</td>
|
||||
<td class="short" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';" title="<?php echo !$user['User']['current_login'] ? 'N/A' : h(date("Y-m-d H:i:s",$user['User']['current_login']));?>">
|
||||
<?php echo !$user['User']['date_created'] ? __('N/A') : h(date("Y-m-d",$user['User']['date_created'])); ?>
|
||||
</td>
|
||||
<?php
|
||||
if (Configure::read('Plugin.CustomAuth_enable') && !Configure::read('Plugin.CustomAuth_required')):
|
||||
?>
|
||||
<td class="short" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';" title="">
|
||||
<?php echo ($user['User']['external_auth_required'] ? __('Yes') : __('No')); ?>
|
||||
</td>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<td class="short <?php if ($user['User']['disabled']) echo 'red bold';?>" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';">
|
||||
<?php echo ($user['User']['disabled'] ? __('Yes') : __('No')); ?>
|
||||
</td>
|
||||
<td class="short action-links">
|
||||
<?php
|
||||
if (($isAclAdmin && (($user['User']['org_id'] == $me['org_id'])) || ('1' == $me['id'])) || ($isSiteAdmin)):
|
||||
?>
|
||||
<span role="button" tabindex="0" aria-label="Initiate password refresh" title="<?php echo __('Initiate password refresh');?>" class="icon-refresh useCursorPointer" onClick="initiatePasswordReset('<?php echo $user['User']['id']; ?>');" title="<?php echo __('Create new credentials and inform user');?>" role="button" tabindex="0" aria-label="<?php echo __('Create new credentials and inform user');?>"></span>
|
||||
<?php
|
||||
echo $this->Html->link('', array('admin' => true, 'action' => 'edit', $user['User']['id']), array('class' => 'icon-edit', 'title' => __('Edit')));
|
||||
echo $this->Form->postLink('', array('admin' => true, 'action' => 'delete', $user['User']['id']), array('class' => 'icon-trash', 'title' => __('Delete')), __('Are you sure you want to delete # %s? It is highly recommended to never delete users but to disable them instead.', $user['User']['id']));
|
||||
endif;
|
||||
?>
|
||||
<?php echo $this->Html->link('', array('admin' => true, 'action' => 'view', $user['User']['id']), array('class' => 'icon-list-alt', 'title' => __('View'))); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
</table>
|
||||
|
|
|
@ -1,40 +1,40 @@
|
|||
<div style="width:100%;display:inline-block;">
|
||||
<?php
|
||||
$full = $isAclTagger && $tagAccess;
|
||||
foreach ($attributeTags as $tag):
|
||||
if (!isset($tag['Tag'])) $tag = array('Tag' => $tag);
|
||||
$tagClass = $full ? 'tagFirstHalf' : 'tag';
|
||||
?>
|
||||
<div style="padding:1px; overflow:hidden; white-space:nowrap; display:flex; float:left; margin-right:2px;">
|
||||
<?php
|
||||
if (!empty($server)):
|
||||
?>
|
||||
<a href="<?php echo $baseurl;?>/servers/previewIndex/<?php echo h($server['Server']['id']); ?>/searchtag:<?php echo h($tag['Tag']['id']); ?>" class="<?php echo $tagClass; ?>" style="display:inline-block; background-color:<?php echo h($tag['Tag']['colour']);?>;color:<?php echo $this->TextColour->getTextColour($tag['Tag']['colour']);?>"><?php echo h($tag['Tag']['name']); ?></a>
|
||||
<?php
|
||||
elseif (!empty($feed)):
|
||||
?>
|
||||
<div class="<?php echo $tagClass; ?>" style="display:inline-block; background-color:<?php echo h($tag['Tag']['colour']);?>;color:<?php echo $this->TextColour->getTextColour($tag['Tag']['colour']);?>"><?php echo h($tag['Tag']['name']); ?></div>
|
||||
<?php
|
||||
else:
|
||||
?>
|
||||
<a href="<?php echo $baseurl;?>/attributes/search/attributetag:<?php echo h($tag['Tag']['id']); ?>" class="<?php echo $tagClass; ?>" style="display:inline-block; background-color:<?php echo h($tag['Tag']['colour']);?>;color:<?php echo $this->TextColour->getTextColour($tag['Tag']['colour']);?>"><?php echo h($tag['Tag']['name']); ?></a>
|
||||
<?php
|
||||
endif;
|
||||
if ($full):
|
||||
?>
|
||||
<div class="tagSecondHalf useCursorPointer noPrint" title="<?php echo __('Remove tag');?>" role="button" tabindex="0" aria-label="<?php echo __('Remove tag');?>" onClick="removeObjectTagPopup('attribute', '<?php echo h($attributeId); ?>', '<?php echo h($tag['Tag']['id']); ?>');">x</div>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
<div style="float:left">
|
||||
<?php if ($full): ?>
|
||||
<button id="addTagButton" class="btn btn-inverse noPrint" style="line-height:10px; padding: 4px 4px;" onClick="getPopup('<?php echo h($attributeId); ?>' + '/true', 'tags', 'selectTaxonomy');">+</button>
|
||||
<?php else:?>
|
||||
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php
|
||||
$full = $isAclTagger && $tagAccess;
|
||||
foreach ($attributeTags as $tag):
|
||||
if (!isset($tag['Tag'])) $tag = array('Tag' => $tag);
|
||||
$tagClass = $full ? 'tagFirstHalf' : 'tag';
|
||||
?>
|
||||
<div style="padding:1px; overflow:hidden; white-space:nowrap; display:flex; float:left; margin-right:2px;">
|
||||
<?php
|
||||
if (!empty($server)):
|
||||
?>
|
||||
<a href="<?php echo $baseurl;?>/servers/previewIndex/<?php echo h($server['Server']['id']); ?>/searchtag:<?php echo h($tag['Tag']['id']); ?>" class="<?php echo $tagClass; ?>" style="display:inline-block; background-color:<?php echo h($tag['Tag']['colour']);?>;color:<?php echo $this->TextColour->getTextColour($tag['Tag']['colour']);?>"><?php echo h($tag['Tag']['name']); ?></a>
|
||||
<?php
|
||||
elseif (!empty($feed)):
|
||||
?>
|
||||
<div class="<?php echo $tagClass; ?>" style="display:inline-block; background-color:<?php echo h($tag['Tag']['colour']);?>;color:<?php echo $this->TextColour->getTextColour($tag['Tag']['colour']);?>"><?php echo h($tag['Tag']['name']); ?></div>
|
||||
<?php
|
||||
else:
|
||||
?>
|
||||
<a href="<?php echo $baseurl;?>/attributes/search/attributetag:<?php echo h($tag['Tag']['id']); ?>" class="<?php echo $tagClass; ?>" style="display:inline-block; background-color:<?php echo h($tag['Tag']['colour']);?>;color:<?php echo $this->TextColour->getTextColour($tag['Tag']['colour']);?>"><?php echo h($tag['Tag']['name']); ?></a>
|
||||
<?php
|
||||
endif;
|
||||
if ($full):
|
||||
?>
|
||||
<div class="tagSecondHalf useCursorPointer noPrint" title="<?php echo __('Remove tag');?>" role="button" tabindex="0" aria-label="<?php echo __('Remove tag');?>" onClick="removeObjectTagPopup('attribute', '<?php echo h($attributeId); ?>', '<?php echo h($tag['Tag']['id']); ?>');">x</div>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
<div style="float:left">
|
||||
<?php if ($full): ?>
|
||||
<button id="addTagButton" class="btn btn-inverse noPrint" style="line-height:10px; padding: 4px 4px;" onClick="getPopup('<?php echo h($attributeId); ?>' + '/true', 'tags', 'selectTaxonomy');">+</button>
|
||||
<?php else:?>
|
||||
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,40 +1,40 @@
|
|||
<span style="display:inline-block;">
|
||||
<?php
|
||||
$full = $isAclTagger && $tagAccess;
|
||||
$tagData = "";
|
||||
foreach ($tags as $tag) {
|
||||
$aStyle = 'display:inline-block; background-color:' . h($tag['Tag']['colour']) . ';color:' . $this->TextColour->getTextColour($tag['Tag']['colour']) . ';';
|
||||
$aClass = $full ? 'tagFirstHalf' : 'tag';
|
||||
$aText = h($tag['Tag']['name']);
|
||||
$aSearchTagUrl = $baseurl . '/events/index/searchtag: ' . h($tag['Tag']['id']);
|
||||
$span1 = sprintf('<a href="%s" style="%s" class="%s">%s</a>', $aSearchTagUrl, $aStyle, $aClass, $aText);
|
||||
$span2 = '';
|
||||
if ($full) {
|
||||
$spanClass = "tagSecondHalf useCursorPointer noPrint";
|
||||
$spanTitle = __('Remove tag');
|
||||
$spanRole = "button";
|
||||
$spanTabIndex = "0";
|
||||
$spanAriaLabel = __('Remove tag %s', h($tag['Tag']['name']));
|
||||
$spanOnClick = "removeObjectTagPopup('event', '" . h($event['Event']['id']) . "', '" . h($tag['Tag']['id']) . "')";
|
||||
$span2 = sprintf('<span class="%s" title="%s" role="%s" tabindex="%s" aria-label="%s" onClick="%s">x</span>', $spanClass, $spanTitle, $spanRole, $spanTabIndex, $spanAriaLabel, $spanOnClick);
|
||||
}
|
||||
$tagData .= '<span style="white-space:nowrap;">' . $span1 . $span2 . '</span> ';
|
||||
}
|
||||
$buttonData = " ";
|
||||
if ($full) {
|
||||
$buttonVars = array(
|
||||
'addTagButton',
|
||||
__('Add a tag'),
|
||||
'button',
|
||||
'0',
|
||||
__('Add a tag'),
|
||||
'btn btn-inverse noPrint',
|
||||
'line-height:10px; padding: 4px 4px;',
|
||||
'getPopup(\'' . h($event['Event']['id']) . '\', \'tags\', \'selectTaxonomy\');'
|
||||
);
|
||||
$buttonData = vsprintf('<button id="%s" title="%s" role ="%s" tabindex="%s" aria-label="%s" class="%s" style="%s" onClick="%s">+</button>', $buttonVars);
|
||||
}
|
||||
$tagData .= $buttonData;
|
||||
?>
|
||||
<span style="padding:1px; display:flex; display: inline-block; margin-right:2px;word-wrap:break-word;"><?php echo $tagData; ?></span>
|
||||
<?php
|
||||
$full = $isAclTagger && $tagAccess;
|
||||
$tagData = "";
|
||||
foreach ($tags as $tag) {
|
||||
$aStyle = 'display:inline-block; background-color:' . h($tag['Tag']['colour']) . ';color:' . $this->TextColour->getTextColour($tag['Tag']['colour']) . ';';
|
||||
$aClass = $full ? 'tagFirstHalf' : 'tag';
|
||||
$aText = h($tag['Tag']['name']);
|
||||
$aSearchTagUrl = $baseurl . '/events/index/searchtag: ' . h($tag['Tag']['id']);
|
||||
$span1 = sprintf('<a href="%s" style="%s" class="%s">%s</a>', $aSearchTagUrl, $aStyle, $aClass, $aText);
|
||||
$span2 = '';
|
||||
if ($full) {
|
||||
$spanClass = "tagSecondHalf useCursorPointer noPrint";
|
||||
$spanTitle = __('Remove tag');
|
||||
$spanRole = "button";
|
||||
$spanTabIndex = "0";
|
||||
$spanAriaLabel = __('Remove tag %s', h($tag['Tag']['name']));
|
||||
$spanOnClick = "removeObjectTagPopup('event', '" . h($event['Event']['id']) . "', '" . h($tag['Tag']['id']) . "')";
|
||||
$span2 = sprintf('<span class="%s" title="%s" role="%s" tabindex="%s" aria-label="%s" onClick="%s">x</span>', $spanClass, $spanTitle, $spanRole, $spanTabIndex, $spanAriaLabel, $spanOnClick);
|
||||
}
|
||||
$tagData .= '<span style="white-space:nowrap;">' . $span1 . $span2 . '</span> ';
|
||||
}
|
||||
$buttonData = " ";
|
||||
if ($full) {
|
||||
$buttonVars = array(
|
||||
'addTagButton',
|
||||
__('Add a tag'),
|
||||
'button',
|
||||
'0',
|
||||
__('Add a tag'),
|
||||
'btn btn-inverse noPrint',
|
||||
'line-height:10px; padding: 4px 4px;',
|
||||
'getPopup(\'' . h($event['Event']['id']) . '\', \'tags\', \'selectTaxonomy\');'
|
||||
);
|
||||
$buttonData = vsprintf('<button id="%s" title="%s" role ="%s" tabindex="%s" aria-label="%s" class="%s" style="%s" onClick="%s">+</button>', $buttonVars);
|
||||
}
|
||||
$tagData .= $buttonData;
|
||||
?>
|
||||
<span style="padding:1px; display:flex; display: inline-block; margin-right:2px;word-wrap:break-word;"><?php echo $tagData; ?></span>
|
||||
</span>
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<td>
|
||||
<div id="tag_bubble_<?php echo h($tag['Tag']['id']); ?>">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="padding-right:0px;">
|
||||
<span class="<?php echo ($editable == 'yes' ? 'tagFirstHalf' : 'tagComplete'); ?>" style="background-color:<?php echo h($tag['Tag']['colour']);?>;color:<?php echo $this->TextColour->getTextColour($tag['Tag']['colour']);?>"><?php echo h($tag['Tag']['name']); ?></span>
|
||||
</td>
|
||||
<?php if ($editable == 'yes'): ?>
|
||||
<td style="padding-left:0px;padding-right:5px;">
|
||||
<span class="tagSecondHalf useCursorPointer" title="<?php echo __('Remove tag');?>" role="button" tabindex="0" aria-label="<?php echo __('Remove tag');?>" onClick="removeTemplateTag('<?php echo h($tag['Tag']['id']); ?>', '<?php echo h($tag['Tag']['name']); ?>');">x</span>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="tag_bubble_<?php echo h($tag['Tag']['id']); ?>">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="padding-right:0px;">
|
||||
<span class="<?php echo ($editable == 'yes' ? 'tagFirstHalf' : 'tagComplete'); ?>" style="background-color:<?php echo h($tag['Tag']['colour']);?>;color:<?php echo $this->TextColour->getTextColour($tag['Tag']['colour']);?>"><?php echo h($tag['Tag']['name']); ?></span>
|
||||
</td>
|
||||
<?php if ($editable == 'yes'): ?>
|
||||
<td style="padding-left:0px;padding-right:5px;">
|
||||
<span class="tagSecondHalf useCursorPointer" title="<?php echo __('Remove tag');?>" role="button" tabindex="0" aria-label="<?php echo __('Remove tag');?>" onClick="removeTemplateTag('<?php echo h($tag['Tag']['id']); ?>', '<?php echo h($tag['Tag']['name']); ?>');">x</span>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<div class="dashboard_element w-2 h-1 dashboard_notifications">
|
||||
<h4><?php echo __('Changes since last visit'); ?></h4>
|
||||
<p>
|
||||
<b><?php echo __('Events updated: '); ?></b><span class="bold <?php echo $events['changed'] ? 'red' : 'green'; ?>"><?php echo h($events['changed']);?></span> (<a href="<?php echo $baseurl;?>/events/index"><?php echo __('View'); ?></a>)<br />
|
||||
<b><?php echo __('Events published: '); ?></b><span class="bold <?php echo $events['published'] ? 'red' : 'green'; ?>"><?php echo h($events['published']);?></span> (<a href="<?php echo $baseurl;?>/events/index"><?php echo __('View'); ?></a>)<br />
|
||||
</p>
|
||||
<?php echo $this->Form->postLink('Reset', $baseurl . '/users/updateLoginTime', array('div' => false));?>
|
||||
<h4><?php echo __('Changes since last visit'); ?></h4>
|
||||
<p>
|
||||
<b><?php echo __('Events updated: '); ?></b><span class="bold <?php echo $events['changed'] ? 'red' : 'green'; ?>"><?php echo h($events['changed']);?></span> (<a href="<?php echo $baseurl;?>/events/index"><?php echo __('View'); ?></a>)<br />
|
||||
<b><?php echo __('Events published: '); ?></b><span class="bold <?php echo $events['published'] ? 'red' : 'green'; ?>"><?php echo h($events['published']);?></span> (<a href="<?php echo $baseurl;?>/events/index"><?php echo __('View'); ?></a>)<br />
|
||||
</p>
|
||||
<?php echo $this->Form->postLink('Reset', $baseurl . '/users/updateLoginTime', array('div' => false));?>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
var elem = $('.dashboard_notifications').width();
|
||||
$('.dashboard_notifications').css({'height':elem+'px'});
|
||||
var elem = $('.dashboard_notifications').width();
|
||||
$('.dashboard_notifications').css({'height':elem+'px'});
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
<div class="dashboard_element dashboard_notifications">
|
||||
<h4><?php echo __('Notifications'); ?></h4>
|
||||
<p>
|
||||
<b><?php echo __('Proposals: '); ?></b><span class="bold <?php echo $notifications['proposalCount'] ? 'red' : 'green'; ?>"><?php echo h($notifications['proposalCount']);?></span> (<a href="<?php echo $baseurl;?>/shadow_attributes/index"><?php echo __('View'); ?></a>)<br />
|
||||
<b><?php echo __('Events with proposals: '); ?></b><span class="bold <?php echo $notifications['proposalEventCount'] ? 'red' : 'green'; ?>"><?php echo h($notifications['proposalEventCount']);?></span> (<a href="<?php echo $baseurl;?>/events/proposalEventIndex"><?php echo __('View'); ?></a>)<br />
|
||||
<?php
|
||||
if (isset($notifications['delegationCount'])):
|
||||
?>
|
||||
<b><?php echo __('Delegation requests: '); ?></b><span class="bold <?php echo $notifications['delegationCount'] ? 'red' : 'green'; ?>"><?php echo h($notifications['delegationCount']);?></span> (<a href="<?php echo $baseurl;?>/events/delegation_index"><?php echo __('View'); ?></a>)
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
</p>
|
||||
<h4><?php echo __('Notifications'); ?></h4>
|
||||
<p>
|
||||
<b><?php echo __('Proposals: '); ?></b><span class="bold <?php echo $notifications['proposalCount'] ? 'red' : 'green'; ?>"><?php echo h($notifications['proposalCount']);?></span> (<a href="<?php echo $baseurl;?>/shadow_attributes/index"><?php echo __('View'); ?></a>)<br />
|
||||
<b><?php echo __('Events with proposals: '); ?></b><span class="bold <?php echo $notifications['proposalEventCount'] ? 'red' : 'green'; ?>"><?php echo h($notifications['proposalEventCount']);?></span> (<a href="<?php echo $baseurl;?>/events/proposalEventIndex"><?php echo __('View'); ?></a>)<br />
|
||||
<?php
|
||||
if (isset($notifications['delegationCount'])):
|
||||
?>
|
||||
<b><?php echo __('Delegation requests: '); ?></b><span class="bold <?php echo $notifications['delegationCount'] ? 'red' : 'green'; ?>"><?php echo h($notifications['delegationCount']);?></span> (<a href="<?php echo $baseurl;?>/events/delegation_index"><?php echo __('View'); ?></a>)
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
var elem = $('.dashboard_notifications').width();
|
||||
$('.dashboard_notifications').css({'height':elem+'px'});
|
||||
var elem = $('.dashboard_notifications').width();
|
||||
$('.dashboard_notifications').css({'height':elem+'px'});
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1,380 +1,380 @@
|
|||
<?php
|
||||
$urlHere = $this->here;
|
||||
$urlHere = explode('/', $urlHere);
|
||||
foreach ($urlHere as $k => $v) {
|
||||
$urlHere[$k] = urlencode($v);
|
||||
}
|
||||
$urlHere = implode('/', $urlHere);
|
||||
$urlHere = $baseurl . $urlHere;
|
||||
$mayModify = ($isSiteAdmin || ($isAclModify && $event['Event']['user_id'] == $me['id'] && $event['Orgc']['id'] == $me['org_id']) || ($isAclModifyOrg && $event['Orgc']['id'] == $me['org_id']));
|
||||
$mayPublish = ($isAclPublish && $event['Orgc']['id'] == $me['org_id']);
|
||||
$mayChangeCorrelation = !Configure::read('MISP.completely_disable_correlation') && ($isSiteAdmin || ($mayModify && Configure::read('MISP.allow_disabling_correlation')));
|
||||
$possibleAction = 'Proposal';
|
||||
if ($mayModify) $possibleAction = 'Attribute';
|
||||
$all = false;
|
||||
if (isset($this->params->params['paging']['Event']['page'])) {
|
||||
if ($this->params->params['paging']['Event']['page'] == 0) $all = true;
|
||||
$page = $this->params->params['paging']['Event']['page'];
|
||||
} else {
|
||||
$page = 0;
|
||||
}
|
||||
$fieldCount = 11;
|
||||
if (!empty($event['Sighting'])) {
|
||||
foreach ($sightingsData['data'] as $aid => $data) {
|
||||
$sightingsData['data'][$aid]['html'] = '';
|
||||
foreach ($data as $type => $typeData) {
|
||||
$name = (($type != 'expiration') ? Inflector::pluralize($type) : $type);
|
||||
$sightingsData['data'][$aid]['html'] .= '<span class=\'blue bold\'>' . ucfirst(h($name)) . '</span><br />';
|
||||
foreach ($typeData['orgs'] as $org => $orgData) {
|
||||
$extra = (($org == $me['Organisation']['name']) ? " class= 'bold'" : "");
|
||||
if ($type == 'expiration') {
|
||||
$sightingsData['data'][$aid]['html'] .= '<span ' . $extra . '>' . h($org) . '</span>: <span class=\'orange bold\'>' . date('Y-m-d H:i:s', $orgData['date']) . '</span><br />';
|
||||
} else {
|
||||
$sightingsData['data'][$aid]['html'] .= '<span ' . $extra . '>' . h($org) . '</span>: <span class=\'' . (($type == 'sighting') ? 'green' : 'red') . ' bold\'>' . h($orgData['count']) . ' (' . date('Y-m-d H:i:s', $orgData['date']) . ')</span><br />';
|
||||
}
|
||||
}
|
||||
$sightingsData['data'][$aid]['html'] .= '<br />';
|
||||
}
|
||||
}
|
||||
}
|
||||
$filtered = false;
|
||||
if(isset($passedArgsArray)){
|
||||
if (count($passedArgsArray) > 0) {
|
||||
$filtered = true;
|
||||
}
|
||||
}
|
||||
$urlHere = $this->here;
|
||||
$urlHere = explode('/', $urlHere);
|
||||
foreach ($urlHere as $k => $v) {
|
||||
$urlHere[$k] = urlencode($v);
|
||||
}
|
||||
$urlHere = implode('/', $urlHere);
|
||||
$urlHere = $baseurl . $urlHere;
|
||||
$mayModify = ($isSiteAdmin || ($isAclModify && $event['Event']['user_id'] == $me['id'] && $event['Orgc']['id'] == $me['org_id']) || ($isAclModifyOrg && $event['Orgc']['id'] == $me['org_id']));
|
||||
$mayPublish = ($isAclPublish && $event['Orgc']['id'] == $me['org_id']);
|
||||
$mayChangeCorrelation = !Configure::read('MISP.completely_disable_correlation') && ($isSiteAdmin || ($mayModify && Configure::read('MISP.allow_disabling_correlation')));
|
||||
$possibleAction = 'Proposal';
|
||||
if ($mayModify) $possibleAction = 'Attribute';
|
||||
$all = false;
|
||||
if (isset($this->params->params['paging']['Event']['page'])) {
|
||||
if ($this->params->params['paging']['Event']['page'] == 0) $all = true;
|
||||
$page = $this->params->params['paging']['Event']['page'];
|
||||
} else {
|
||||
$page = 0;
|
||||
}
|
||||
$fieldCount = 11;
|
||||
if (!empty($event['Sighting'])) {
|
||||
foreach ($sightingsData['data'] as $aid => $data) {
|
||||
$sightingsData['data'][$aid]['html'] = '';
|
||||
foreach ($data as $type => $typeData) {
|
||||
$name = (($type != 'expiration') ? Inflector::pluralize($type) : $type);
|
||||
$sightingsData['data'][$aid]['html'] .= '<span class=\'blue bold\'>' . ucfirst(h($name)) . '</span><br />';
|
||||
foreach ($typeData['orgs'] as $org => $orgData) {
|
||||
$extra = (($org == $me['Organisation']['name']) ? " class= 'bold'" : "");
|
||||
if ($type == 'expiration') {
|
||||
$sightingsData['data'][$aid]['html'] .= '<span ' . $extra . '>' . h($org) . '</span>: <span class=\'orange bold\'>' . date('Y-m-d H:i:s', $orgData['date']) . '</span><br />';
|
||||
} else {
|
||||
$sightingsData['data'][$aid]['html'] .= '<span ' . $extra . '>' . h($org) . '</span>: <span class=\'' . (($type == 'sighting') ? 'green' : 'red') . ' bold\'>' . h($orgData['count']) . ' (' . date('Y-m-d H:i:s', $orgData['date']) . ')</span><br />';
|
||||
}
|
||||
}
|
||||
$sightingsData['data'][$aid]['html'] .= '<br />';
|
||||
}
|
||||
}
|
||||
}
|
||||
$filtered = false;
|
||||
if(isset($passedArgsArray)){
|
||||
if (count($passedArgsArray) > 0) {
|
||||
$filtered = true;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<?php
|
||||
$params = $this->request->named;
|
||||
unset($params['focus']);
|
||||
$url = array_merge(array('controller' => 'events', 'action' => 'viewEventAttributes', $event['Event']['id']), $params);
|
||||
$this->Paginator->options(array(
|
||||
'url' => $url,
|
||||
'update' => '#attributes_div',
|
||||
'evalScripts' => true,
|
||||
'before' => '$(".progress").show()',
|
||||
'complete' => '$(".progress").hide()',
|
||||
));
|
||||
echo $this->Paginator->prev('« ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
echo $this->Paginator->numbers(array('modulus' => 60, 'separator' => '', 'tag' => 'li', 'currentClass' => 'red', 'currentTag' => 'span'));
|
||||
echo $this->Paginator->next(__('next') . ' »', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
?>
|
||||
<li class="all <?php if ($all) echo 'disabled'; ?>">
|
||||
<?php
|
||||
if ($all):
|
||||
?>
|
||||
<span class="red">view all</span>
|
||||
<?php
|
||||
else:
|
||||
echo $this->Paginator->link(__('view all'), 'all');
|
||||
endif;
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<?php
|
||||
$params = $this->request->named;
|
||||
unset($params['focus']);
|
||||
$url = array_merge(array('controller' => 'events', 'action' => 'viewEventAttributes', $event['Event']['id']), $params);
|
||||
$this->Paginator->options(array(
|
||||
'url' => $url,
|
||||
'update' => '#attributes_div',
|
||||
'evalScripts' => true,
|
||||
'before' => '$(".progress").show()',
|
||||
'complete' => '$(".progress").hide()',
|
||||
));
|
||||
echo $this->Paginator->prev('« ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
echo $this->Paginator->numbers(array('modulus' => 60, 'separator' => '', 'tag' => 'li', 'currentClass' => 'red', 'currentTag' => 'span'));
|
||||
echo $this->Paginator->next(__('next') . ' »', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
?>
|
||||
<li class="all <?php if ($all) echo 'disabled'; ?>">
|
||||
<?php
|
||||
if ($all):
|
||||
?>
|
||||
<span class="red">view all</span>
|
||||
<?php
|
||||
else:
|
||||
echo $this->Paginator->link(__('view all'), 'all');
|
||||
endif;
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<br />
|
||||
<div id="edit_object_div">
|
||||
<?php
|
||||
$deleteSelectedUrl = '/attributes/deleteSelected/' . $event['Event']['id'];
|
||||
if (empty($event['Event']['publish_timestamp'])) {
|
||||
$deleteSelectedUrl .= '/1';
|
||||
}
|
||||
echo $this->Form->create('Attribute', array('id' => 'delete_selected', 'url' => $deleteSelectedUrl));
|
||||
echo $this->Form->input('ids_delete', array(
|
||||
'type' => 'text',
|
||||
'value' => 'test',
|
||||
'style' => 'display:none;',
|
||||
'label' => false,
|
||||
));
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
<?php
|
||||
echo $this->Form->create('ShadowAttribute', array('id' => 'accept_selected', 'url' => '/shadow_attributes/acceptSelected/' . $event['Event']['id']));
|
||||
echo $this->Form->input('ids_accept', array(
|
||||
'type' => 'text',
|
||||
'value' => '',
|
||||
'style' => 'display:none;',
|
||||
'label' => false,
|
||||
));
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
<?php
|
||||
echo $this->Form->create('ShadowAttribute', array('id' => 'discard_selected', 'url' => '/shadow_attributes/discardSelected/' . $event['Event']['id']));
|
||||
echo $this->Form->input('ids_discard', array(
|
||||
'type' => 'text',
|
||||
'value' => '',
|
||||
'style' => 'display:none;',
|
||||
'label' => false,
|
||||
));
|
||||
echo $this->Form->end();
|
||||
if (!isset($attributeFilter)) $attributeFilter = 'all';
|
||||
?>
|
||||
<?php
|
||||
$deleteSelectedUrl = '/attributes/deleteSelected/' . $event['Event']['id'];
|
||||
if (empty($event['Event']['publish_timestamp'])) {
|
||||
$deleteSelectedUrl .= '/1';
|
||||
}
|
||||
echo $this->Form->create('Attribute', array('id' => 'delete_selected', 'url' => $deleteSelectedUrl));
|
||||
echo $this->Form->input('ids_delete', array(
|
||||
'type' => 'text',
|
||||
'value' => 'test',
|
||||
'style' => 'display:none;',
|
||||
'label' => false,
|
||||
));
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
<?php
|
||||
echo $this->Form->create('ShadowAttribute', array('id' => 'accept_selected', 'url' => '/shadow_attributes/acceptSelected/' . $event['Event']['id']));
|
||||
echo $this->Form->input('ids_accept', array(
|
||||
'type' => 'text',
|
||||
'value' => '',
|
||||
'style' => 'display:none;',
|
||||
'label' => false,
|
||||
));
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
<?php
|
||||
echo $this->Form->create('ShadowAttribute', array('id' => 'discard_selected', 'url' => '/shadow_attributes/discardSelected/' . $event['Event']['id']));
|
||||
echo $this->Form->input('ids_discard', array(
|
||||
'type' => 'text',
|
||||
'value' => '',
|
||||
'style' => 'display:none;',
|
||||
'label' => false,
|
||||
));
|
||||
echo $this->Form->end();
|
||||
if (!isset($attributeFilter)) $attributeFilter = 'all';
|
||||
?>
|
||||
</div>
|
||||
<div id="attributeList" class="attributeListContainer">
|
||||
<div class="tabMenu tabMenuEditBlock noPrint">
|
||||
<span id="create-button" title="<?php echo __('Add attribute');?>" role="button" tabindex="0" aria-label="<?php echo __('Add attribute');?>" class="icon-plus useCursorPointer" onClick="clickCreateButton(<?php echo $event['Event']['id']; ?>, '<?php echo $possibleAction; ?>');"></span>
|
||||
<span id="multi-edit-button" title="<?php echo __('Edit selected Attributes');?>" role="button" tabindex="0" aria-label="<?php echo __('Edit selected Attributes');?>" class="hidden icon-edit mass-select useCursorPointer" onClick="editSelectedAttributes(<?php echo $event['Event']['id']; ?>);"></span>
|
||||
<span id="multi-tag-button" title="<?php echo __('Tag selected Attributes');?>" role="button" tabindex="0" aria-label="<?php echo __('Tag selected Attributes');?>" class="hidden icon-tag mass-select useCursorPointer" onClick="getPopup('selected/true', 'tags', 'selectTaxonomy');"></span>
|
||||
<span id="multi-delete-button" title="<?php echo __('Delete selected Attributes');?>" role="button" tabindex="0" aria-label="<?php echo __('Delete selected Attributes');?>" class="hidden icon-trash mass-select useCursorPointer" onClick="multiSelectAction(<?php echo $event['Event']['id']; ?>, 'deleteAttributes');"></span>
|
||||
<span id="multi-accept-button" title="<?php echo __('Accept selected Proposals');?>" role="button" tabindex="0" aria-label="<?php echo __('Accept selected Proposals');?>" class="hidden icon-ok mass-proposal-select useCursorPointer" onClick="multiSelectAction(<?php echo $event['Event']['id']; ?>, 'acceptProposals');"></span>
|
||||
<span id="multi-discard-button" title="<?php echo __('Discard selected Proposals');?>" role="button" tabindex="0" aria-label="<?php echo __('Discard selected Proposals');?>" class="hidden icon-remove mass-proposal-select useCursorPointer" onClick="multiSelectAction(<?php echo $event['Event']['id']; ?>, 'discardProposals');"></span>
|
||||
<span id="multi-sighting-button" title="<?php echo __('Sightings display for selected attributes');?>" role="button" tabindex="0" aria-label="<?php echo __('Sightings display for selected attributes');?>" class="hidden icon-wrench mass-select useCursorPointer sightings_advanced_add" data-object-id="selected" data-object-context="attribute"></span>
|
||||
</div>
|
||||
<div class="tabMenu tabMenuToolsBlock noPrint">
|
||||
<?php if ($mayModify): ?>
|
||||
<span id="create-button" title="<?php echo __('Populate using a template');?>" role="button" tabindex="0" aria-label="<?php echo __('Populate using a template');?>" class="icon-list-alt useCursorPointer" onClick="getPopup(<?php echo $event['Event']['id']; ?>, 'templates', 'templateChoices');"></span>
|
||||
<?php endif; ?>
|
||||
<span id="freetext-button" title="<?php echo __('Populate using the freetext import tool');?>" role="button" tabindex="0" aria-label="<?php echo __('Populate using the freetext import tool');?>" class="icon-exclamation-sign icon-inverse useCursorPointer" onClick="getPopup(<?php echo $event['Event']['id']; ?>, 'events', 'freeTextImport');"></span>
|
||||
<?php if ($mayModify): ?>
|
||||
<span id="attribute-replace-button" title="<?php echo __('Replace all attributes of a category/type combination within the event');?>" role="button" tabindex="0" aria-label="<?php echo __('Replace all attributes of a category/type combination within the event');?>" class="icon-random useCursorPointer" onClick="getPopup(<?php echo $event['Event']['id']; ?>, 'attributes', 'attributeReplace');"></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php
|
||||
$target = h($event['Event']['id']);
|
||||
if ($extended) $target .= '/extended:1';
|
||||
?>
|
||||
<div class="tabMenu tabMenuFiltersBlock noPrint" style="padding-right:0px !important;">
|
||||
<span id="filter_header" class="attribute_filter_header">Filters: </span>
|
||||
<div id="filter_all" title="<?php echo __('Show all attributes');?>" role="button" tabindex="0" aria-label="<?php echo __('Show all attributes');?>" class="attribute_filter_text<?php if ($attributeFilter == 'all') echo '_active'; ?>" onClick="filterAttributes('all', '<?php echo $target; ?>');">All</div>
|
||||
<?php
|
||||
foreach ($typeGroups as $group):
|
||||
?>
|
||||
<div id="filter_<?php echo h($group); ?>" title="<?php echo __('Only show %s related attributes', h($group));?>" role="button" tabindex="0" aria-label="<?php echo __('Only show %s related attributes', h($group));?>" class="attribute_filter_text<?php if ($attributeFilter == $group) echo '_active'; ?>" onClick="filterAttributes('<?php echo $group; ?>', '<?php echo $target; ?>');"><?php echo ucfirst($group); ?></div>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
<div id="filter_proposal" title="<?php echo __('Only show proposals');?>" role="button" tabindex="0" aria-label="<?php echo __('Only show proposals');?>" class="attribute_filter_text<?php if ($attributeFilter == 'proposal') echo '_active'; ?>" onClick="filterAttributes('proposal', '<?php echo h($event['Event']['id']); ?>');"><?php echo __('Proposal');?></div>
|
||||
<div id="filter_correlation" title="<?php echo __('Only show correlating attributes');?>" role="button" tabindex="0" aria-label="<?php echo __('Only show correlating attributes');?>" class="attribute_filter_text<?php if ($attributeFilter == 'correlation') echo '_active'; ?>" onClick="filterAttributes('correlation', '<?php echo h($event['Event']['id']); ?>');">Correlation</div>
|
||||
<div id="filter_warning" title="<?php echo __('Only show potentially false positive attributes');?>" role="button" tabindex="0" aria-label="<?php echo __('Only show potentially false positive attributes');?>" class="attribute_filter_text<?php if ($attributeFilter == 'warning') echo '_active'; ?>" onClick="filterAttributes('warning', '<?php echo h($event['Event']['id']); ?>');"><?php echo __('Warnings');?></div>
|
||||
<?php if ($me['Role']['perm_sync'] || $event['Orgc']['id'] == $me['org_id']): ?>
|
||||
<div id="filter_deleted" title="<?php echo __('Include deleted attributes');?>" role="button" tabindex="0" aria-label="<?php echo __('Include deleted attributes');?>" class="attribute_filter_text<?php if ($deleted) echo '_active'; ?>" onClick="toggleDeletedAttributes('<?php echo $urlHere;?>');"><?php echo __('Include deleted attributes');?></div>
|
||||
<?php endif; ?>
|
||||
<div id="show_context" title="<?php echo __('Show attribute context fields');?>" role="button" tabindex="0" aria-label="<?php echo __('Show attribute context fields');?>" class="attribute_filter_text" onClick="toggleContextFields();"><?php echo __('Show context fields');?></div>
|
||||
<div title="input filter" tabindex="0" aria-label="input filter" class="attribute_filter_text" style="padding-top:0px;">
|
||||
<input type="text" id="attributesFilterField" style="height:20px;padding:0px;margin:0px;" class="form-control" data-eventid="<?php echo h($event['Event']['id']); ?>" value="<?php if ($filtered) echo h($passedArgsArray['all']); ?>"></input>
|
||||
<span id="attributesFilterButton" role="button" class="icon-search" tabindex="0" aria-label="<?php echo __('Filter on attributes value');?>" onClick="filterAttributes('value', '<?php echo h($event['Event']['id']); ?>');"></span>
|
||||
<?php if ($filtered):?>
|
||||
<span tabindex="0" aria-label="<?php echo __('Show all attributes');?>" title="<?php echo __('Remove filters');?>" role="button" onClick="filterAttributes('all', '<?php echo h($event['Event']['id']); ?>');" class='icon-remove'></span>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tabMenu tabMenuEditBlock noPrint">
|
||||
<span id="create-button" title="<?php echo __('Add attribute');?>" role="button" tabindex="0" aria-label="<?php echo __('Add attribute');?>" class="icon-plus useCursorPointer" onClick="clickCreateButton(<?php echo $event['Event']['id']; ?>, '<?php echo $possibleAction; ?>');"></span>
|
||||
<span id="multi-edit-button" title="<?php echo __('Edit selected Attributes');?>" role="button" tabindex="0" aria-label="<?php echo __('Edit selected Attributes');?>" class="hidden icon-edit mass-select useCursorPointer" onClick="editSelectedAttributes(<?php echo $event['Event']['id']; ?>);"></span>
|
||||
<span id="multi-tag-button" title="<?php echo __('Tag selected Attributes');?>" role="button" tabindex="0" aria-label="<?php echo __('Tag selected Attributes');?>" class="hidden icon-tag mass-select useCursorPointer" onClick="getPopup('selected/true', 'tags', 'selectTaxonomy');"></span>
|
||||
<span id="multi-delete-button" title="<?php echo __('Delete selected Attributes');?>" role="button" tabindex="0" aria-label="<?php echo __('Delete selected Attributes');?>" class="hidden icon-trash mass-select useCursorPointer" onClick="multiSelectAction(<?php echo $event['Event']['id']; ?>, 'deleteAttributes');"></span>
|
||||
<span id="multi-accept-button" title="<?php echo __('Accept selected Proposals');?>" role="button" tabindex="0" aria-label="<?php echo __('Accept selected Proposals');?>" class="hidden icon-ok mass-proposal-select useCursorPointer" onClick="multiSelectAction(<?php echo $event['Event']['id']; ?>, 'acceptProposals');"></span>
|
||||
<span id="multi-discard-button" title="<?php echo __('Discard selected Proposals');?>" role="button" tabindex="0" aria-label="<?php echo __('Discard selected Proposals');?>" class="hidden icon-remove mass-proposal-select useCursorPointer" onClick="multiSelectAction(<?php echo $event['Event']['id']; ?>, 'discardProposals');"></span>
|
||||
<span id="multi-sighting-button" title="<?php echo __('Sightings display for selected attributes');?>" role="button" tabindex="0" aria-label="<?php echo __('Sightings display for selected attributes');?>" class="hidden icon-wrench mass-select useCursorPointer sightings_advanced_add" data-object-id="selected" data-object-context="attribute"></span>
|
||||
</div>
|
||||
<div class="tabMenu tabMenuToolsBlock noPrint">
|
||||
<?php if ($mayModify): ?>
|
||||
<span id="create-button" title="<?php echo __('Populate using a template');?>" role="button" tabindex="0" aria-label="<?php echo __('Populate using a template');?>" class="icon-list-alt useCursorPointer" onClick="getPopup(<?php echo $event['Event']['id']; ?>, 'templates', 'templateChoices');"></span>
|
||||
<?php endif; ?>
|
||||
<span id="freetext-button" title="<?php echo __('Populate using the freetext import tool');?>" role="button" tabindex="0" aria-label="<?php echo __('Populate using the freetext import tool');?>" class="icon-exclamation-sign icon-inverse useCursorPointer" onClick="getPopup(<?php echo $event['Event']['id']; ?>, 'events', 'freeTextImport');"></span>
|
||||
<?php if ($mayModify): ?>
|
||||
<span id="attribute-replace-button" title="<?php echo __('Replace all attributes of a category/type combination within the event');?>" role="button" tabindex="0" aria-label="<?php echo __('Replace all attributes of a category/type combination within the event');?>" class="icon-random useCursorPointer" onClick="getPopup(<?php echo $event['Event']['id']; ?>, 'attributes', 'attributeReplace');"></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php
|
||||
$target = h($event['Event']['id']);
|
||||
if ($extended) $target .= '/extended:1';
|
||||
?>
|
||||
<div class="tabMenu tabMenuFiltersBlock noPrint" style="padding-right:0px !important;">
|
||||
<span id="filter_header" class="attribute_filter_header">Filters: </span>
|
||||
<div id="filter_all" title="<?php echo __('Show all attributes');?>" role="button" tabindex="0" aria-label="<?php echo __('Show all attributes');?>" class="attribute_filter_text<?php if ($attributeFilter == 'all') echo '_active'; ?>" onClick="filterAttributes('all', '<?php echo $target; ?>');">All</div>
|
||||
<?php
|
||||
foreach ($typeGroups as $group):
|
||||
?>
|
||||
<div id="filter_<?php echo h($group); ?>" title="<?php echo __('Only show %s related attributes', h($group));?>" role="button" tabindex="0" aria-label="<?php echo __('Only show %s related attributes', h($group));?>" class="attribute_filter_text<?php if ($attributeFilter == $group) echo '_active'; ?>" onClick="filterAttributes('<?php echo $group; ?>', '<?php echo $target; ?>');"><?php echo ucfirst($group); ?></div>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
<div id="filter_proposal" title="<?php echo __('Only show proposals');?>" role="button" tabindex="0" aria-label="<?php echo __('Only show proposals');?>" class="attribute_filter_text<?php if ($attributeFilter == 'proposal') echo '_active'; ?>" onClick="filterAttributes('proposal', '<?php echo h($event['Event']['id']); ?>');"><?php echo __('Proposal');?></div>
|
||||
<div id="filter_correlation" title="<?php echo __('Only show correlating attributes');?>" role="button" tabindex="0" aria-label="<?php echo __('Only show correlating attributes');?>" class="attribute_filter_text<?php if ($attributeFilter == 'correlation') echo '_active'; ?>" onClick="filterAttributes('correlation', '<?php echo h($event['Event']['id']); ?>');">Correlation</div>
|
||||
<div id="filter_warning" title="<?php echo __('Only show potentially false positive attributes');?>" role="button" tabindex="0" aria-label="<?php echo __('Only show potentially false positive attributes');?>" class="attribute_filter_text<?php if ($attributeFilter == 'warning') echo '_active'; ?>" onClick="filterAttributes('warning', '<?php echo h($event['Event']['id']); ?>');"><?php echo __('Warnings');?></div>
|
||||
<?php if ($me['Role']['perm_sync'] || $event['Orgc']['id'] == $me['org_id']): ?>
|
||||
<div id="filter_deleted" title="<?php echo __('Include deleted attributes');?>" role="button" tabindex="0" aria-label="<?php echo __('Include deleted attributes');?>" class="attribute_filter_text<?php if ($deleted) echo '_active'; ?>" onClick="toggleDeletedAttributes('<?php echo $urlHere;?>');"><?php echo __('Include deleted attributes');?></div>
|
||||
<?php endif; ?>
|
||||
<div id="show_context" title="<?php echo __('Show attribute context fields');?>" role="button" tabindex="0" aria-label="<?php echo __('Show attribute context fields');?>" class="attribute_filter_text" onClick="toggleContextFields();"><?php echo __('Show context fields');?></div>
|
||||
<div title="input filter" tabindex="0" aria-label="input filter" class="attribute_filter_text" style="padding-top:0px;">
|
||||
<input type="text" id="attributesFilterField" style="height:20px;padding:0px;margin:0px;" class="form-control" data-eventid="<?php echo h($event['Event']['id']); ?>" value="<?php if ($filtered) echo h($passedArgsArray['all']); ?>"></input>
|
||||
<span id="attributesFilterButton" role="button" class="icon-search" tabindex="0" aria-label="<?php echo __('Filter on attributes value');?>" onClick="filterAttributes('value', '<?php echo h($event['Event']['id']); ?>');"></span>
|
||||
<?php if ($filtered):?>
|
||||
<span tabindex="0" aria-label="<?php echo __('Show all attributes');?>" title="<?php echo __('Remove filters');?>" role="button" onClick="filterAttributes('all', '<?php echo h($event['Event']['id']); ?>');" class='icon-remove'></span>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table-condensed">
|
||||
<tr>
|
||||
<?php
|
||||
if ($extended || ($mayModify && !empty($event['objects']))):
|
||||
$fieldCount += 1;
|
||||
?>
|
||||
<th><input class="select_all" type="checkbox" title="<?php echo __('Select all');?>" role="button" tabindex="0" aria-label="<?php echo __('Select all attributes/proposals on current page');?>" onClick="toggleAllAttributeCheckboxes();" /></th>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<th class="context hidden"><?php echo $this->Paginator->sort('id');?></th>
|
||||
<th class="context hidden">UUID</th>
|
||||
<th><?php echo $this->Paginator->sort('timestamp', 'Date', array('direction' => 'desc'));?></th>
|
||||
<?php
|
||||
if ($extended):
|
||||
?>
|
||||
<th class="event_id"><?php echo $this->Paginator->sort('event_id', 'Event');?></th>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<th><?php echo $this->Paginator->sort('Org.name', 'Org'); ?>
|
||||
<th><?php echo $this->Paginator->sort('category');?></th>
|
||||
<th><?php echo $this->Paginator->sort('type');?></th>
|
||||
<th><?php echo $this->Paginator->sort('value');?></th>
|
||||
<th><?php echo __('Tags');?></th>
|
||||
<th><?php echo __('Galaxies');?></th>
|
||||
<th><?php echo $this->Paginator->sort('comment');?></th>
|
||||
<th><?php echo __('Correlate');?></th>
|
||||
<th><?php echo __('Related Events');?></th>
|
||||
<th><?php echo __('Feed hits');?></th>
|
||||
<th title="<?php echo $attrDescriptions['signature']['desc'];?>"><?php echo $this->Paginator->sort('to_ids', 'IDS');?></th>
|
||||
<th title="<?php echo $attrDescriptions['distribution']['desc'];?>"><?php echo $this->Paginator->sort('distribution');?></th>
|
||||
<th><?php echo __('Sightings');?></th>
|
||||
<th><?php echo __('Activity');?></th>
|
||||
<th class="actions"><?php echo __('Actions');?></th>
|
||||
</tr>
|
||||
<?php
|
||||
$elements = array(
|
||||
0 => 'attribute',
|
||||
1 => 'proposal',
|
||||
2 => 'proposal_delete',
|
||||
3 => 'object'
|
||||
);
|
||||
$focusedRow = false;
|
||||
foreach ($event['objects'] as $k => $object) {
|
||||
$insertBlank = false;
|
||||
echo $this->element('/Events/View/row_' . $object['objectType'], array(
|
||||
'object' => $object,
|
||||
'k' => $k,
|
||||
'mayModify' => $mayModify,
|
||||
'mayChangeCorrelation' => $mayChangeCorrelation,
|
||||
'page' => $page,
|
||||
'fieldCount' => $fieldCount
|
||||
));
|
||||
if (!empty($focus) && ($object['objectType'] == 'object' || $object['objectType'] == 'attribute') && $object['uuid'] == $focus) {
|
||||
$focusedRow = $k;
|
||||
}
|
||||
if (
|
||||
($object['objectType'] == 'attribute' && !empty($object['ShadowAttribute'])) ||
|
||||
$object['objectType'] == 'object'
|
||||
):
|
||||
?>
|
||||
<tr class="blank_table_row"><td colspan="<?php echo $fieldCount; ?>"></td></tr>
|
||||
<?php
|
||||
endif;
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<table class="table table-striped table-condensed">
|
||||
<tr>
|
||||
<?php
|
||||
if ($extended || ($mayModify && !empty($event['objects']))):
|
||||
$fieldCount += 1;
|
||||
?>
|
||||
<th><input class="select_all" type="checkbox" title="<?php echo __('Select all');?>" role="button" tabindex="0" aria-label="<?php echo __('Select all attributes/proposals on current page');?>" onClick="toggleAllAttributeCheckboxes();" /></th>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<th class="context hidden"><?php echo $this->Paginator->sort('id');?></th>
|
||||
<th class="context hidden">UUID</th>
|
||||
<th><?php echo $this->Paginator->sort('timestamp', 'Date', array('direction' => 'desc'));?></th>
|
||||
<?php
|
||||
if ($extended):
|
||||
?>
|
||||
<th class="event_id"><?php echo $this->Paginator->sort('event_id', 'Event');?></th>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<th><?php echo $this->Paginator->sort('Org.name', 'Org'); ?>
|
||||
<th><?php echo $this->Paginator->sort('category');?></th>
|
||||
<th><?php echo $this->Paginator->sort('type');?></th>
|
||||
<th><?php echo $this->Paginator->sort('value');?></th>
|
||||
<th><?php echo __('Tags');?></th>
|
||||
<th><?php echo __('Galaxies');?></th>
|
||||
<th><?php echo $this->Paginator->sort('comment');?></th>
|
||||
<th><?php echo __('Correlate');?></th>
|
||||
<th><?php echo __('Related Events');?></th>
|
||||
<th><?php echo __('Feed hits');?></th>
|
||||
<th title="<?php echo $attrDescriptions['signature']['desc'];?>"><?php echo $this->Paginator->sort('to_ids', 'IDS');?></th>
|
||||
<th title="<?php echo $attrDescriptions['distribution']['desc'];?>"><?php echo $this->Paginator->sort('distribution');?></th>
|
||||
<th><?php echo __('Sightings');?></th>
|
||||
<th><?php echo __('Activity');?></th>
|
||||
<th class="actions"><?php echo __('Actions');?></th>
|
||||
</tr>
|
||||
<?php
|
||||
$elements = array(
|
||||
0 => 'attribute',
|
||||
1 => 'proposal',
|
||||
2 => 'proposal_delete',
|
||||
3 => 'object'
|
||||
);
|
||||
$focusedRow = false;
|
||||
foreach ($event['objects'] as $k => $object) {
|
||||
$insertBlank = false;
|
||||
echo $this->element('/Events/View/row_' . $object['objectType'], array(
|
||||
'object' => $object,
|
||||
'k' => $k,
|
||||
'mayModify' => $mayModify,
|
||||
'mayChangeCorrelation' => $mayChangeCorrelation,
|
||||
'page' => $page,
|
||||
'fieldCount' => $fieldCount
|
||||
));
|
||||
if (!empty($focus) && ($object['objectType'] == 'object' || $object['objectType'] == 'attribute') && $object['uuid'] == $focus) {
|
||||
$focusedRow = $k;
|
||||
}
|
||||
if (
|
||||
($object['objectType'] == 'attribute' && !empty($object['ShadowAttribute'])) ||
|
||||
$object['objectType'] == 'object'
|
||||
):
|
||||
?>
|
||||
<tr class="blank_table_row"><td colspan="<?php echo $fieldCount; ?>"></td></tr>
|
||||
<?php
|
||||
endif;
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
<?php if ($emptyEvent): ?>
|
||||
<div class="background-red bold">
|
||||
<span>
|
||||
<?php
|
||||
if ($me['org_id'] != $event['Event']['orgc_id']) {
|
||||
echo __('Attribute warning: This event doesn\'t have any attributes visible to you. Either the owner of the event decided to have
|
||||
<?php if ($emptyEvent): ?>
|
||||
<div class="background-red bold">
|
||||
<span>
|
||||
<?php
|
||||
if ($me['org_id'] != $event['Event']['orgc_id']) {
|
||||
echo __('Attribute warning: This event doesn\'t have any attributes visible to you. Either the owner of the event decided to have
|
||||
a specific distribution scheme per attribute and wanted to still distribute the event alone either for notification or potential contribution with attributes without such restriction. Or the owner forgot to add the
|
||||
attributes or the appropriate distribution level. If you think there is a mistake or you can contribute attributes based on the event meta-information, feel free to make a proposal');
|
||||
} else {
|
||||
echo __('Attribute warning: This event doesn\'t contain any attribute. It\'s strongly advised to populate the event with attributes (indicators, observables or information) to provide a meaningful event');
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<?php
|
||||
$this->Paginator->options(array(
|
||||
'url' => $url,
|
||||
'update' => '#attributes_div',
|
||||
'evalScripts' => true,
|
||||
'before' => '$(".progress").show()',
|
||||
'complete' => '$(".progress").hide()',
|
||||
));
|
||||
echo $this->Paginator->prev('« ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
echo $this->Paginator->numbers(array('modulus' => 60, 'separator' => '', 'tag' => 'li', 'currentClass' => 'red', 'currentTag' => 'span'));
|
||||
echo $this->Paginator->next(__('next') . ' »', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
?>
|
||||
<li class="all <?php if ($all) echo 'disabled'; ?>">
|
||||
<?php
|
||||
if ($all):
|
||||
?>
|
||||
<span class="red">view all</span>
|
||||
<?php
|
||||
else:
|
||||
echo $this->Paginator->link(__('view all'), 'all');
|
||||
endif;
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
} else {
|
||||
echo __('Attribute warning: This event doesn\'t contain any attribute. It\'s strongly advised to populate the event with attributes (indicators, observables or information) to provide a meaningful event');
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<?php
|
||||
$this->Paginator->options(array(
|
||||
'url' => $url,
|
||||
'update' => '#attributes_div',
|
||||
'evalScripts' => true,
|
||||
'before' => '$(".progress").show()',
|
||||
'complete' => '$(".progress").hide()',
|
||||
));
|
||||
echo $this->Paginator->prev('« ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
echo $this->Paginator->numbers(array('modulus' => 60, 'separator' => '', 'tag' => 'li', 'currentClass' => 'red', 'currentTag' => 'span'));
|
||||
echo $this->Paginator->next(__('next') . ' »', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
?>
|
||||
<li class="all <?php if ($all) echo 'disabled'; ?>">
|
||||
<?php
|
||||
if ($all):
|
||||
?>
|
||||
<span class="red">view all</span>
|
||||
<?php
|
||||
else:
|
||||
echo $this->Paginator->link(__('view all'), 'all');
|
||||
endif;
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var currentUri = "<?php echo isset($currentUri) ? h($currentUri) : '/events/viewEventAttributes/' . h($event['Event']['id']); ?>";
|
||||
var ajaxResults = [];
|
||||
var timer;
|
||||
var lastSelected = false;
|
||||
var deleted = <?php echo (isset($deleted) && $deleted) ? 'true' : 'false';?>;
|
||||
$(document).ready(function() {
|
||||
$('.addGalaxy').click(function() {
|
||||
addGalaxyListener(this);
|
||||
});
|
||||
<?php
|
||||
if ($focusedRow !== false):
|
||||
?>
|
||||
//window.location.hash = '.row_' + '<?php echo h($focusedRow); ?>';
|
||||
//$.scrollTo('#row_' + '<?php echo h($k); ?>', 800, {easing:'elasout'});
|
||||
//$('html,body').animate({scrollTop: $('#row_' + '<?php echo h($k); ?>').offset().top}, 'slow');
|
||||
$('.row_' + '<?php echo h($focusedRow); ?>').focus();
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
setContextFields();
|
||||
popoverStartup();
|
||||
$('.select_attribute').removeAttr('checked');
|
||||
$('.select_proposal').removeAttr('checked');
|
||||
$('.select_attribute').click(function(e) {
|
||||
if ($(this).is(':checked')) {
|
||||
if (e.shiftKey) {
|
||||
selectAllInbetween(lastSelected, this.id);
|
||||
}
|
||||
lastSelected = this.id;
|
||||
}
|
||||
attributeListAnyAttributeCheckBoxesChecked();
|
||||
});
|
||||
$('.select_proposal').click(function(e){
|
||||
if ($(this).is(':checked')) {
|
||||
if (e.shiftKey) {
|
||||
selectAllInbetween(lastSelected, this.id);
|
||||
}
|
||||
lastSelected = this.id;
|
||||
}
|
||||
attributeListAnyProposalCheckBoxesChecked();
|
||||
});
|
||||
$('.select_all').click(function() {
|
||||
attributeListAnyAttributeCheckBoxesChecked();
|
||||
attributeListAnyProposalCheckBoxesChecked();
|
||||
});
|
||||
$('.correlation-toggle').click(function() {
|
||||
var attribute_id = $(this).data('attribute-id');
|
||||
getPopup(attribute_id, 'attributes', 'toggleCorrelation', '', '#confirmation_box');
|
||||
return false;
|
||||
});
|
||||
$('.screenshot').click(function() {
|
||||
screenshotPopup($(this).attr('src'), $(this).attr('title'));
|
||||
});
|
||||
$('.sightings_advanced_add').click(function() {
|
||||
var selected = [];
|
||||
var object_context = $(this).data('object-context');
|
||||
var object_id = $(this).data('object-id');
|
||||
if (object_id == 'selected') {
|
||||
$(".select_attribute").each(function() {
|
||||
if ($(this).is(":checked")) {
|
||||
selected.push($(this).data("id"));
|
||||
}
|
||||
});
|
||||
object_id = selected.join('|');
|
||||
}
|
||||
url = "<?php echo $baseurl; ?>" + "/sightings/advanced/" + object_id + "/" + object_context;
|
||||
genericPopup(url, '#screenshot_box');
|
||||
});
|
||||
});
|
||||
$('#attributesFilterField').bind("keydown", function(e) {
|
||||
var eventid = $('#attributesFilterField').data("eventid");
|
||||
if ((e.keyCode == 13 || e.keyCode == 10)) {
|
||||
filterAttributes('value', eventid);
|
||||
}
|
||||
});
|
||||
$('.hex-value-convert').click(function() {
|
||||
var val = $(this).parent().children(':first-child').text();
|
||||
if ($(this).parent().children(':first-child').attr('data-original-title') == 'Hexadecimal representation') {
|
||||
var bin = [];
|
||||
var temp;
|
||||
val.split('').forEach(function(entry) {
|
||||
temp = parseInt(entry, 16).toString(2);
|
||||
bin.push(Array(5 - (temp.length)).join('0') + temp);
|
||||
});
|
||||
bin = bin.join(' ');
|
||||
$(this).parent().children(':first-child').text(bin);
|
||||
$(this).parent().children(':first-child').attr('data-original-title', 'Binary representation');
|
||||
$(this).parent().children(':nth-child(2)').attr('data-original-title', 'Switch to hexadecimal representation');
|
||||
$(this).parent().children(':nth-child(2)').attr('aria-label', 'Switch to hexadecimal representation');
|
||||
} else {
|
||||
val = val.split(' ');
|
||||
hex = '';
|
||||
val.forEach(function(entry) {
|
||||
hex += parseInt(entry , 2).toString(16).toUpperCase();
|
||||
});
|
||||
$(this).parent().children(':first-child').text(hex);
|
||||
$(this).parent().children(':first-child').attr('data-original-title', 'Hexadecimal representation');
|
||||
$(this).parent().children(':nth-child(2)').attr('data-original-title', 'Switch to binary representation');
|
||||
$(this).parent().children(':nth-child(2)').attr('aria-label', 'Switch to binary representation');
|
||||
}
|
||||
});
|
||||
var currentUri = "<?php echo isset($currentUri) ? h($currentUri) : '/events/viewEventAttributes/' . h($event['Event']['id']); ?>";
|
||||
var ajaxResults = [];
|
||||
var timer;
|
||||
var lastSelected = false;
|
||||
var deleted = <?php echo (isset($deleted) && $deleted) ? 'true' : 'false';?>;
|
||||
$(document).ready(function() {
|
||||
$('.addGalaxy').click(function() {
|
||||
addGalaxyListener(this);
|
||||
});
|
||||
<?php
|
||||
if ($focusedRow !== false):
|
||||
?>
|
||||
//window.location.hash = '.row_' + '<?php echo h($focusedRow); ?>';
|
||||
//$.scrollTo('#row_' + '<?php echo h($k); ?>', 800, {easing:'elasout'});
|
||||
//$('html,body').animate({scrollTop: $('#row_' + '<?php echo h($k); ?>').offset().top}, 'slow');
|
||||
$('.row_' + '<?php echo h($focusedRow); ?>').focus();
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
setContextFields();
|
||||
popoverStartup();
|
||||
$('.select_attribute').removeAttr('checked');
|
||||
$('.select_proposal').removeAttr('checked');
|
||||
$('.select_attribute').click(function(e) {
|
||||
if ($(this).is(':checked')) {
|
||||
if (e.shiftKey) {
|
||||
selectAllInbetween(lastSelected, this.id);
|
||||
}
|
||||
lastSelected = this.id;
|
||||
}
|
||||
attributeListAnyAttributeCheckBoxesChecked();
|
||||
});
|
||||
$('.select_proposal').click(function(e){
|
||||
if ($(this).is(':checked')) {
|
||||
if (e.shiftKey) {
|
||||
selectAllInbetween(lastSelected, this.id);
|
||||
}
|
||||
lastSelected = this.id;
|
||||
}
|
||||
attributeListAnyProposalCheckBoxesChecked();
|
||||
});
|
||||
$('.select_all').click(function() {
|
||||
attributeListAnyAttributeCheckBoxesChecked();
|
||||
attributeListAnyProposalCheckBoxesChecked();
|
||||
});
|
||||
$('.correlation-toggle').click(function() {
|
||||
var attribute_id = $(this).data('attribute-id');
|
||||
getPopup(attribute_id, 'attributes', 'toggleCorrelation', '', '#confirmation_box');
|
||||
return false;
|
||||
});
|
||||
$('.screenshot').click(function() {
|
||||
screenshotPopup($(this).attr('src'), $(this).attr('title'));
|
||||
});
|
||||
$('.sightings_advanced_add').click(function() {
|
||||
var selected = [];
|
||||
var object_context = $(this).data('object-context');
|
||||
var object_id = $(this).data('object-id');
|
||||
if (object_id == 'selected') {
|
||||
$(".select_attribute").each(function() {
|
||||
if ($(this).is(":checked")) {
|
||||
selected.push($(this).data("id"));
|
||||
}
|
||||
});
|
||||
object_id = selected.join('|');
|
||||
}
|
||||
url = "<?php echo $baseurl; ?>" + "/sightings/advanced/" + object_id + "/" + object_context;
|
||||
genericPopup(url, '#screenshot_box');
|
||||
});
|
||||
});
|
||||
$('#attributesFilterField').bind("keydown", function(e) {
|
||||
var eventid = $('#attributesFilterField').data("eventid");
|
||||
if ((e.keyCode == 13 || e.keyCode == 10)) {
|
||||
filterAttributes('value', eventid);
|
||||
}
|
||||
});
|
||||
$('.hex-value-convert').click(function() {
|
||||
var val = $(this).parent().children(':first-child').text();
|
||||
if ($(this).parent().children(':first-child').attr('data-original-title') == 'Hexadecimal representation') {
|
||||
var bin = [];
|
||||
var temp;
|
||||
val.split('').forEach(function(entry) {
|
||||
temp = parseInt(entry, 16).toString(2);
|
||||
bin.push(Array(5 - (temp.length)).join('0') + temp);
|
||||
});
|
||||
bin = bin.join(' ');
|
||||
$(this).parent().children(':first-child').text(bin);
|
||||
$(this).parent().children(':first-child').attr('data-original-title', 'Binary representation');
|
||||
$(this).parent().children(':nth-child(2)').attr('data-original-title', 'Switch to hexadecimal representation');
|
||||
$(this).parent().children(':nth-child(2)').attr('aria-label', 'Switch to hexadecimal representation');
|
||||
} else {
|
||||
val = val.split(' ');
|
||||
hex = '';
|
||||
val.forEach(function(entry) {
|
||||
hex += parseInt(entry , 2).toString(16).toUpperCase();
|
||||
});
|
||||
$(this).parent().children(':first-child').text(hex);
|
||||
$(this).parent().children(':first-child').attr('data-original-title', 'Hexadecimal representation');
|
||||
$(this).parent().children(':nth-child(2)').attr('data-original-title', 'Switch to binary representation');
|
||||
$(this).parent().children(':nth-child(2)').attr('aria-label', 'Switch to binary representation');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
echo $this->Js->writeBuffer();
|
||||
echo $this->Js->writeBuffer();
|
||||
?>
|
||||
|
|
|
@ -1,207 +1,207 @@
|
|||
<?php
|
||||
$mayModify = (($isAclModify && $event['Event']['user_id'] == $me['id'] && $event['Orgc']['id'] == $me['org_id']) || ($isAclModifyOrg && $event['Orgc']['id'] == $me['org_id']));
|
||||
$mayPublish = ($isAclPublish && $event['Orgc']['id'] == $me['org_id']);
|
||||
$mayModify = (($isAclModify && $event['Event']['user_id'] == $me['id'] && $event['Orgc']['id'] == $me['org_id']) || ($isAclModifyOrg && $event['Orgc']['id'] == $me['org_id']));
|
||||
$mayPublish = ($isAclPublish && $event['Orgc']['id'] == $me['org_id']);
|
||||
?>
|
||||
|
||||
<div class="attribute_creation">
|
||||
<?php echo $this->Form->create('Attribute');?>
|
||||
<fieldset>
|
||||
<legend><?php echo __('Add Attribute'); ?></legend>
|
||||
<div class="add_attribute_fields">
|
||||
<?php
|
||||
echo $this->Form->hidden('event_id');
|
||||
echo $this->Form->input('category', array(
|
||||
'empty' => '(choose one)'
|
||||
));
|
||||
echo $this->Form->input('type', array(
|
||||
'empty' => '(first choose category)'
|
||||
));
|
||||
<?php echo $this->Form->create('Attribute');?>
|
||||
<fieldset>
|
||||
<legend><?php echo __('Add Attribute'); ?></legend>
|
||||
<div class="add_attribute_fields">
|
||||
<?php
|
||||
echo $this->Form->hidden('event_id');
|
||||
echo $this->Form->input('category', array(
|
||||
'empty' => '(choose one)'
|
||||
));
|
||||
echo $this->Form->input('type', array(
|
||||
'empty' => '(first choose category)'
|
||||
));
|
||||
|
||||
$initialDistribution = 3;
|
||||
if (Configure::read('MISP.default_attribute_distribution') != null) {
|
||||
if (Configure::read('MISP.default_attribute_distribution') === 'event') {
|
||||
$initialDistribution = 5;
|
||||
} else {
|
||||
$initialDistribution = Configure::read('MISP.default_attribute_distribution');
|
||||
}
|
||||
}
|
||||
echo $this->Form->input('distribution', array(
|
||||
'options' => array($distributionLevels),
|
||||
'label' => __('Distribution'),
|
||||
'selected' => $initialDistribution,
|
||||
));
|
||||
$initialDistribution = 3;
|
||||
if (Configure::read('MISP.default_attribute_distribution') != null) {
|
||||
if (Configure::read('MISP.default_attribute_distribution') === 'event') {
|
||||
$initialDistribution = 5;
|
||||
} else {
|
||||
$initialDistribution = Configure::read('MISP.default_attribute_distribution');
|
||||
}
|
||||
}
|
||||
echo $this->Form->input('distribution', array(
|
||||
'options' => array($distributionLevels),
|
||||
'label' => __('Distribution'),
|
||||
'selected' => $initialDistribution,
|
||||
));
|
||||
|
||||
echo $this->Form->input('value', array(
|
||||
'type' => 'textarea',
|
||||
'error' => array('escape' => false),
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge'
|
||||
));
|
||||
echo $this->Form->input('comment', array(
|
||||
'type' => 'text',
|
||||
'label' => __('Contextual Comment'),
|
||||
'error' => array('escape' => false),
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge'
|
||||
));
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
<?php
|
||||
echo $this->Form->input('to_ids', array(
|
||||
'checked' => false,
|
||||
'data-content' => isset($attrDescriptions['signature']['formdesc']) ? $attrDescriptions['signature']['formdesc'] : $attrDescriptions['signature']['desc'],
|
||||
'label' => __('for Intrusion Detection System'),
|
||||
));
|
||||
echo $this->Form->input('batch_import', array(
|
||||
'type' => 'checkbox',
|
||||
'data-content' => __('Create multiple attributes one per line'),
|
||||
));
|
||||
// link an onchange event to the form elements
|
||||
$this->Js->get('#AttributeCategory')->event('change', 'formCategoryChanged("#AttributeCategory")');
|
||||
?>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="overlay_spacing">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align:top">
|
||||
<?php
|
||||
echo $this->Js->submit('Submit', array(
|
||||
'before'=>$this->Js->get('#loading')->effect('fadeIn'),
|
||||
'success'=>$this->Js->get('#loading')->effect('fadeOut'),
|
||||
'complete'=> $this->Js->request(
|
||||
array('action' => 'view', $event['Event']['id'], 'attributesPage:' . $page),
|
||||
array(
|
||||
'update' => '#attributes_div',
|
||||
'before' => '$(".loading").show();$("#gray_out").hide();$("#attribute_creation_div").hide();',
|
||||
'complete' => '$(".loading").hide();',
|
||||
)
|
||||
),
|
||||
'class'=>'btn btn-primary',
|
||||
'url' => '/attributes/add/' . $event['Event']['id']
|
||||
));
|
||||
?>
|
||||
</td>
|
||||
<td style="width:540px;">
|
||||
<p style="color:red;font-weight:bold;display:none;text-align:center" id="warning-message"><?php echo __('Warning: You are about to share data that is of a classified nature (Attribution / targeting data). Make sure that you are authorised to share this.');?></p>
|
||||
</td>
|
||||
<td style="vertical-align:top;">
|
||||
<span class="btn btn-inverse" id="cancel_attribute_add"><?php echo __('Cancel');?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
echo $this->Form->input('value', array(
|
||||
'type' => 'textarea',
|
||||
'error' => array('escape' => false),
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge'
|
||||
));
|
||||
echo $this->Form->input('comment', array(
|
||||
'type' => 'text',
|
||||
'label' => __('Contextual Comment'),
|
||||
'error' => array('escape' => false),
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge'
|
||||
));
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
<?php
|
||||
echo $this->Form->input('to_ids', array(
|
||||
'checked' => false,
|
||||
'data-content' => isset($attrDescriptions['signature']['formdesc']) ? $attrDescriptions['signature']['formdesc'] : $attrDescriptions['signature']['desc'],
|
||||
'label' => __('for Intrusion Detection System'),
|
||||
));
|
||||
echo $this->Form->input('batch_import', array(
|
||||
'type' => 'checkbox',
|
||||
'data-content' => __('Create multiple attributes one per line'),
|
||||
));
|
||||
// link an onchange event to the form elements
|
||||
$this->Js->get('#AttributeCategory')->event('change', 'formCategoryChanged("#AttributeCategory")');
|
||||
?>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="overlay_spacing">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align:top">
|
||||
<?php
|
||||
echo $this->Js->submit('Submit', array(
|
||||
'before'=>$this->Js->get('#loading')->effect('fadeIn'),
|
||||
'success'=>$this->Js->get('#loading')->effect('fadeOut'),
|
||||
'complete'=> $this->Js->request(
|
||||
array('action' => 'view', $event['Event']['id'], 'attributesPage:' . $page),
|
||||
array(
|
||||
'update' => '#attributes_div',
|
||||
'before' => '$(".loading").show();$("#gray_out").hide();$("#attribute_creation_div").hide();',
|
||||
'complete' => '$(".loading").hide();',
|
||||
)
|
||||
),
|
||||
'class'=>'btn btn-primary',
|
||||
'url' => '/attributes/add/' . $event['Event']['id']
|
||||
));
|
||||
?>
|
||||
</td>
|
||||
<td style="width:540px;">
|
||||
<p style="color:red;font-weight:bold;display:none;text-align:center" id="warning-message"><?php echo __('Warning: You are about to share data that is of a classified nature (Attribution / targeting data). Make sure that you are authorised to share this.');?></p>
|
||||
</td>
|
||||
<td style="vertical-align:top;">
|
||||
<span class="btn btn-inverse" id="cancel_attribute_add"><?php echo __('Cancel');?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
//
|
||||
//Generate Category / Type filtering array
|
||||
//
|
||||
var category_type_mapping = new Array();
|
||||
<?php
|
||||
foreach ($categoryDefinitions as $category => $def) {
|
||||
echo "category_type_mapping['" . addslashes($category) . "'] = {";
|
||||
$first = true;
|
||||
foreach ($def['types'] as $type) {
|
||||
if ($first) $first = false;
|
||||
else echo ', ';
|
||||
echo "'" . addslashes($type) . "' : '" . addslashes($type) . "'";
|
||||
}
|
||||
echo "}; \n";
|
||||
}
|
||||
?>
|
||||
function formCategoryChanged(id) {
|
||||
// fill in the types
|
||||
var options = $('#AttributeType').prop('options');
|
||||
$('option', $('#AttributeType')).remove();
|
||||
$.each(category_type_mapping[$('#AttributeCategory').val()], function(val, text) {
|
||||
options[options.length] = new Option(text, val);
|
||||
});
|
||||
// enable the form element
|
||||
$('#AttributeType').prop('disabled', false);
|
||||
}
|
||||
<script type="text/javascript">
|
||||
//
|
||||
//Generate Category / Type filtering array
|
||||
//
|
||||
var category_type_mapping = new Array();
|
||||
<?php
|
||||
foreach ($categoryDefinitions as $category => $def) {
|
||||
echo "category_type_mapping['" . addslashes($category) . "'] = {";
|
||||
$first = true;
|
||||
foreach ($def['types'] as $type) {
|
||||
if ($first) $first = false;
|
||||
else echo ', ';
|
||||
echo "'" . addslashes($type) . "' : '" . addslashes($type) . "'";
|
||||
}
|
||||
echo "}; \n";
|
||||
}
|
||||
?>
|
||||
function formCategoryChanged(id) {
|
||||
// fill in the types
|
||||
var options = $('#AttributeType').prop('options');
|
||||
$('option', $('#AttributeType')).remove();
|
||||
$.each(category_type_mapping[$('#AttributeCategory').val()], function(val, text) {
|
||||
options[options.length] = new Option(text, val);
|
||||
});
|
||||
// enable the form element
|
||||
$('#AttributeType').prop('disabled', false);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Generate tooltip information
|
||||
//
|
||||
var formInfoValues = new Array();
|
||||
<?php
|
||||
foreach ($typeDefinitions as $type => $def) {
|
||||
$info = isset($def['formdesc']) ? $def['formdesc'] : $def['desc'];
|
||||
echo "formInfoValues['" . addslashes($type) . "'] = \"" . addslashes($info) . "\";\n"; // as we output JS code we need to add slashes
|
||||
}
|
||||
foreach ($categoryDefinitions as $category => $def) {
|
||||
$info = isset($def['formdesc']) ? $def['formdesc'] : $def['desc'];
|
||||
echo "formInfoValues['" . addslashes($category) . "'] = \"" . addslashes($info) . "\";\n"; // as we output JS code we need to add slashes
|
||||
}
|
||||
foreach ($distributionDescriptions as $type => $def) {
|
||||
$info = isset($def['formdesc']) ? $def['formdesc'] : $def['desc'];
|
||||
echo "formInfoValues['" . addslashes($type) . "'] = \"" . addslashes($info) . "\";\n"; // as we output JS code we need to add slashes
|
||||
}
|
||||
?>
|
||||
//
|
||||
// Generate tooltip information
|
||||
//
|
||||
var formInfoValues = new Array();
|
||||
<?php
|
||||
foreach ($typeDefinitions as $type => $def) {
|
||||
$info = isset($def['formdesc']) ? $def['formdesc'] : $def['desc'];
|
||||
echo "formInfoValues['" . addslashes($type) . "'] = \"" . addslashes($info) . "\";\n"; // as we output JS code we need to add slashes
|
||||
}
|
||||
foreach ($categoryDefinitions as $category => $def) {
|
||||
$info = isset($def['formdesc']) ? $def['formdesc'] : $def['desc'];
|
||||
echo "formInfoValues['" . addslashes($category) . "'] = \"" . addslashes($info) . "\";\n"; // as we output JS code we need to add slashes
|
||||
}
|
||||
foreach ($distributionDescriptions as $type => $def) {
|
||||
$info = isset($def['formdesc']) ? $def['formdesc'] : $def['desc'];
|
||||
echo "formInfoValues['" . addslashes($type) . "'] = \"" . addslashes($info) . "\";\n"; // as we output JS code we need to add slashes
|
||||
}
|
||||
?>
|
||||
|
||||
$(document).ready(function() {
|
||||
$(document).ready(function() {
|
||||
|
||||
$("#AttributeType, #AttributeCategory, #Attribute, #AttributeDistribution").on('mouseover', function(e) {
|
||||
var $e = $(e.target);
|
||||
if ($e.is('option')) {
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
$('#'+e.currentTarget.id).popover({
|
||||
trigger: 'focus',
|
||||
placement: 'right',
|
||||
container: 'body',
|
||||
content: formInfoValues[$e.val()],
|
||||
}).popover('show');
|
||||
}
|
||||
});
|
||||
$("#AttributeType, #AttributeCategory, #Attribute, #AttributeDistribution").on('mouseover', function(e) {
|
||||
var $e = $(e.target);
|
||||
if ($e.is('option')) {
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
$('#'+e.currentTarget.id).popover({
|
||||
trigger: 'focus',
|
||||
placement: 'right',
|
||||
container: 'body',
|
||||
content: formInfoValues[$e.val()],
|
||||
}).popover('show');
|
||||
}
|
||||
});
|
||||
|
||||
$("input, label").on('mouseleave', function(e) {
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
});
|
||||
$("input, label").on('mouseleave', function(e) {
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
});
|
||||
|
||||
$("input, label").on('mouseover', function(e) {
|
||||
var $e = $(e.target);
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
$('#'+e.currentTarget.id).popover({
|
||||
trigger: 'focus',
|
||||
placement: 'right',
|
||||
container: 'body',
|
||||
}).popover('show');
|
||||
$("input, label").on('mouseover', function(e) {
|
||||
var $e = $(e.target);
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
$('#'+e.currentTarget.id).popover({
|
||||
trigger: 'focus',
|
||||
placement: 'right',
|
||||
container: 'body',
|
||||
}).popover('show');
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
// workaround for browsers like IE and Chrome that do now have an onmouseover on the 'options' of a select.
|
||||
// disadvangate is that user needs to click on the item to see the tooltip.
|
||||
// no solutions exist, except to generate the select completely using html.
|
||||
$("#AttributeType, #AttributeCategory, #Attribute, #AttributeDistribution").on('change', function(e) {
|
||||
if (this.id === "AttributeCategory") {
|
||||
var select = document.getElementById("AttributeCategory");
|
||||
if (select.value === 'Attribution' || select.value === 'Targeting data') {
|
||||
$("#warning-message").show();
|
||||
} else {
|
||||
$("#warning-message").hide();
|
||||
}
|
||||
}
|
||||
var $e = $(e.target);
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
$('#'+e.currentTarget.id).popover({
|
||||
trigger: 'focus',
|
||||
placement: 'right',
|
||||
container: 'body',
|
||||
content: formInfoValues[$e.val()],
|
||||
}).popover('show');
|
||||
});
|
||||
// workaround for browsers like IE and Chrome that do now have an onmouseover on the 'options' of a select.
|
||||
// disadvangate is that user needs to click on the item to see the tooltip.
|
||||
// no solutions exist, except to generate the select completely using html.
|
||||
$("#AttributeType, #AttributeCategory, #Attribute, #AttributeDistribution").on('change', function(e) {
|
||||
if (this.id === "AttributeCategory") {
|
||||
var select = document.getElementById("AttributeCategory");
|
||||
if (select.value === 'Attribution' || select.value === 'Targeting data') {
|
||||
$("#warning-message").show();
|
||||
} else {
|
||||
$("#warning-message").hide();
|
||||
}
|
||||
}
|
||||
var $e = $(e.target);
|
||||
$('#'+e.currentTarget.id).popover('destroy');
|
||||
$('#'+e.currentTarget.id).popover({
|
||||
trigger: 'focus',
|
||||
placement: 'right',
|
||||
container: 'body',
|
||||
content: formInfoValues[$e.val()],
|
||||
}).popover('show');
|
||||
});
|
||||
|
||||
$('#cancel_attribute_add').click(function() {
|
||||
$('#gray_out').hide();
|
||||
$('#attribute_creation_div').hide();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
$('#cancel_attribute_add').click(function() {
|
||||
$('#gray_out').hide();
|
||||
$('#attribute_creation_div').hide();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Js->writeBuffer();
|
||||
echo $this->Js->writeBuffer();
|
||||
?>
|
||||
|
|
|
@ -1,184 +1,184 @@
|
|||
<div id="top">
|
||||
<div class="pagination">
|
||||
<?php
|
||||
if (!empty($posts)):
|
||||
?>
|
||||
<ul>
|
||||
<?php
|
||||
$this->Paginator->options(array(
|
||||
'update' => '#top',
|
||||
'evalScripts' => true,
|
||||
'before' => '$(".loading").show()',
|
||||
'complete' => '$(".loading").hide()',
|
||||
));
|
||||
<div class="pagination">
|
||||
<?php
|
||||
if (!empty($posts)):
|
||||
?>
|
||||
<ul>
|
||||
<?php
|
||||
$this->Paginator->options(array(
|
||||
'update' => '#top',
|
||||
'evalScripts' => true,
|
||||
'before' => '$(".loading").show()',
|
||||
'complete' => '$(".loading").hide()',
|
||||
));
|
||||
|
||||
echo $this->Paginator->prev('« ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
echo $this->Paginator->numbers(array('modulus' => 10, 'separator' => '', 'tag' => 'li', 'currentClass' => 'red', 'currentTag' => 'span'));
|
||||
echo $this->Paginator->next(__('next') . ' »', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<div id = "posts">
|
||||
<?php
|
||||
foreach ($posts as $post) {
|
||||
?>
|
||||
<a name="message_<?php echo h($post['id']);?>"></a>
|
||||
<table class="discussionBox" id=<?php echo '"' . h($post['id']) . '"';?> >
|
||||
<tr>
|
||||
<td class="discussionBoxTD discussionBoxTDtop" colspan="2">
|
||||
<div>
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
<td>
|
||||
<?php
|
||||
echo __('Date: ') . h($post['date_created']);
|
||||
?>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<a href="#top" class="whitelink">Top</a> |
|
||||
<a href="<?php echo "#".$post['id']; ?>" class="whitelink">#<?php echo h($post['id'])?></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="discussionBoxTD discussionBoxTDMid discussionBoxTDMidLeft">
|
||||
<?php
|
||||
if (isset($post['org_name'])) {
|
||||
echo $this->OrgImg->getOrgImg(array('name' => $post['org_name'], 'size' => 48));
|
||||
} else {
|
||||
echo __('Deactivated user');
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td class="discussionBoxTD discussionBoxTDMid discussionBoxTDMidRight">
|
||||
<?php
|
||||
echo $this->Command->convertQuotes(nl2br(h($post['contents'])));
|
||||
if ($post['post_id'] !=0 || ($post['date_created'] != $post['date_modified'])) {
|
||||
?>
|
||||
<br /><br />
|
||||
<?php
|
||||
}
|
||||
if ($post['post_id'] != 0) {
|
||||
?>
|
||||
<span style="font-style:italic">
|
||||
In reply to post
|
||||
<a href="<?php echo "#".h($post['post_id']); ?>">#<?php echo h($post['post_id'])?></a>
|
||||
</span>
|
||||
<?php
|
||||
}
|
||||
if ($post['date_created'] != $post['date_modified']) {
|
||||
echo '<span style="font-style:italic">Message edited at ' . h($post['date_modified']) . '<span>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="discussionBoxTD discussionBoxTDbottom" colspan = "2">
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo !empty($post['user_email']) ? h($post['user_email']) : 'User ' . h($post['user_id']) . ' (' . (h($post['org_name'])) . ')'; ?>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<?php
|
||||
if (!$isSiteAdmin) {
|
||||
if ($post['user_id'] == $myuserid) {
|
||||
echo $this->Html->link('', array('controller' => 'posts', 'action' => 'edit', h($post['id']), h($context)), array('class' => 'icon-edit', 'title' => __('Edit')));
|
||||
echo $this->Form->postLink('', array('controller' => 'posts', 'action' => 'delete', h($post['id']), h($context)), array('class' => 'icon-trash', 'title' => __('Delete')), __('Are you sure you want to delete this post?'));
|
||||
} else {
|
||||
?>
|
||||
<a href="<?php echo $baseurl.'/posts/add/post/'.h($post['id']); ?>" class="icon-comment" title = "<?php echo __('Reply');?>"></a>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
echo $this->Html->link('', array('controller' => 'posts', 'action' => 'edit', h($post['id']), h($context)), array('class' => 'icon-edit', 'title' => __('Edit')));
|
||||
echo $this->Form->postLink('', array('controller' => 'posts', 'action' => 'delete', h($post['id']), h($context)), array('class' => 'icon-trash', 'title' => 'Delete'), __('Are you sure you want to delete this post?'));
|
||||
?>
|
||||
<a href = "<?php echo $baseurl.'/posts/add/post/'.h($post['id']); ?>" class="icon-comment" title = "<?php echo __('Reply');?>"></a>
|
||||
<?php
|
||||
echo $this->Paginator->prev('« ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
echo $this->Paginator->numbers(array('modulus' => 10, 'separator' => '', 'tag' => 'li', 'currentClass' => 'red', 'currentTag' => 'span'));
|
||||
echo $this->Paginator->next(__('next') . ' »', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<div id = "posts">
|
||||
<?php
|
||||
foreach ($posts as $post) {
|
||||
?>
|
||||
<a name="message_<?php echo h($post['id']);?>"></a>
|
||||
<table class="discussionBox" id=<?php echo '"' . h($post['id']) . '"';?> >
|
||||
<tr>
|
||||
<td class="discussionBoxTD discussionBoxTDtop" colspan="2">
|
||||
<div>
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
<td>
|
||||
<?php
|
||||
echo __('Date: ') . h($post['date_created']);
|
||||
?>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<a href="#top" class="whitelink">Top</a> |
|
||||
<a href="<?php echo "#".$post['id']; ?>" class="whitelink">#<?php echo h($post['id'])?></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="discussionBoxTD discussionBoxTDMid discussionBoxTDMidLeft">
|
||||
<?php
|
||||
if (isset($post['org_name'])) {
|
||||
echo $this->OrgImg->getOrgImg(array('name' => $post['org_name'], 'size' => 48));
|
||||
} else {
|
||||
echo __('Deactivated user');
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td class="discussionBoxTD discussionBoxTDMid discussionBoxTDMidRight">
|
||||
<?php
|
||||
echo $this->Command->convertQuotes(nl2br(h($post['contents'])));
|
||||
if ($post['post_id'] !=0 || ($post['date_created'] != $post['date_modified'])) {
|
||||
?>
|
||||
<br /><br />
|
||||
<?php
|
||||
}
|
||||
if ($post['post_id'] != 0) {
|
||||
?>
|
||||
<span style="font-style:italic">
|
||||
In reply to post
|
||||
<a href="<?php echo "#".h($post['post_id']); ?>">#<?php echo h($post['post_id'])?></a>
|
||||
</span>
|
||||
<?php
|
||||
}
|
||||
if ($post['date_created'] != $post['date_modified']) {
|
||||
echo '<span style="font-style:italic">Message edited at ' . h($post['date_modified']) . '<span>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="discussionBoxTD discussionBoxTDbottom" colspan = "2">
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
<td>
|
||||
<?php echo !empty($post['user_email']) ? h($post['user_email']) : 'User ' . h($post['user_id']) . ' (' . (h($post['org_name'])) . ')'; ?>
|
||||
</td>
|
||||
<td style="text-align:right">
|
||||
<?php
|
||||
if (!$isSiteAdmin) {
|
||||
if ($post['user_id'] == $myuserid) {
|
||||
echo $this->Html->link('', array('controller' => 'posts', 'action' => 'edit', h($post['id']), h($context)), array('class' => 'icon-edit', 'title' => __('Edit')));
|
||||
echo $this->Form->postLink('', array('controller' => 'posts', 'action' => 'delete', h($post['id']), h($context)), array('class' => 'icon-trash', 'title' => __('Delete')), __('Are you sure you want to delete this post?'));
|
||||
} else {
|
||||
?>
|
||||
<a href="<?php echo $baseurl.'/posts/add/post/'.h($post['id']); ?>" class="icon-comment" title = "<?php echo __('Reply');?>"></a>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
echo $this->Html->link('', array('controller' => 'posts', 'action' => 'edit', h($post['id']), h($context)), array('class' => 'icon-edit', 'title' => __('Edit')));
|
||||
echo $this->Form->postLink('', array('controller' => 'posts', 'action' => 'delete', h($post['id']), h($context)), array('class' => 'icon-trash', 'title' => 'Delete'), __('Are you sure you want to delete this post?'));
|
||||
?>
|
||||
<a href = "<?php echo $baseurl.'/posts/add/post/'.h($post['id']); ?>" class="icon-comment" title = "<?php echo __('Reply');?>"></a>
|
||||
<?php
|
||||
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<p>
|
||||
<?php
|
||||
echo $this->Paginator->counter(array(
|
||||
'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
|
||||
));
|
||||
?>
|
||||
</p>
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<?php
|
||||
echo $this->Paginator->prev('« ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
echo $this->Paginator->numbers(array('modulus' => 20, 'separator' => '', 'tag' => 'li', 'currentClass' => 'red', 'currentTag' => 'span'));
|
||||
echo $this->Paginator->next(__('next') . ' »', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="comment">
|
||||
<?php
|
||||
if (isset($currentEvent)) $url = '/posts/add/event/' . $currentEvent;
|
||||
else $url = '/posts/add/thread/' . $thread['Thread']['id'];
|
||||
echo $this->Form->create('Post', array('url' => $url));
|
||||
?>
|
||||
<fieldset>
|
||||
<div class="input clear">
|
||||
<button type="button" title="<?php echo __('Insert a quote - just paste your quote between the [quote][/quote] tags.');?>" class="toggle-left btn btn-inverse qet" id = "quote" onclick="insertQuote()"><?php echo __('Quote');?></button>
|
||||
<button type="button" title="<?php echo __('Insert a link to an event - just enter the event ID between the [event][/event] tags.');?>" class="toggle btn btn-inverse qet" id = "event" onclick="insertEvent()"><?php echo __('Event');?></button>
|
||||
<button type="button" title="<?php echo __('Insert a link to a discussion thread - enter the thread\'s ID between the [thread][/thread] tags.');?>" class="toggle-right btn btn-inverse qet" id = "thread" onclick="insertThread()"><?php echo __('Thread');?></button>
|
||||
<button type="button" title="<?php echo __('Insert a link [link][/link] tags.');?>" class="toggle-right btn btn-inverse qet" id = "link" onclick="insertLink()"><?php echo __('Link');?></button>
|
||||
<button type="button" title="<?php echo __('Insert a code [code][/code] tags.');?>" class="toggle-right btn btn-inverse qet" id = "code" onclick="insertCode()"><?php echo __('Code');?></button>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->input('message', array(
|
||||
'label' => false,
|
||||
'type' => 'textarea',
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge',
|
||||
));
|
||||
?>
|
||||
</fieldset>
|
||||
<button class="btn btn-primary" onClick="submitMessageForm('<?php echo h($url);?>', 'PostViewForm', 'top'); return false;"><?php echo __('Send');?></button>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<p>
|
||||
<?php
|
||||
echo $this->Paginator->counter(array(
|
||||
'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
|
||||
));
|
||||
?>
|
||||
</p>
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<?php
|
||||
echo $this->Paginator->prev('« ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
echo $this->Paginator->numbers(array('modulus' => 20, 'separator' => '', 'tag' => 'li', 'currentClass' => 'red', 'currentTag' => 'span'));
|
||||
echo $this->Paginator->next(__('next') . ' »', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="comment">
|
||||
<?php
|
||||
if (isset($currentEvent)) $url = '/posts/add/event/' . $currentEvent;
|
||||
else $url = '/posts/add/thread/' . $thread['Thread']['id'];
|
||||
echo $this->Form->create('Post', array('url' => $url));
|
||||
?>
|
||||
<fieldset>
|
||||
<div class="input clear">
|
||||
<button type="button" title="<?php echo __('Insert a quote - just paste your quote between the [quote][/quote] tags.');?>" class="toggle-left btn btn-inverse qet" id = "quote" onclick="insertQuote()"><?php echo __('Quote');?></button>
|
||||
<button type="button" title="<?php echo __('Insert a link to an event - just enter the event ID between the [event][/event] tags.');?>" class="toggle btn btn-inverse qet" id = "event" onclick="insertEvent()"><?php echo __('Event');?></button>
|
||||
<button type="button" title="<?php echo __('Insert a link to a discussion thread - enter the thread\'s ID between the [thread][/thread] tags.');?>" class="toggle-right btn btn-inverse qet" id = "thread" onclick="insertThread()"><?php echo __('Thread');?></button>
|
||||
<button type="button" title="<?php echo __('Insert a link [link][/link] tags.');?>" class="toggle-right btn btn-inverse qet" id = "link" onclick="insertLink()"><?php echo __('Link');?></button>
|
||||
<button type="button" title="<?php echo __('Insert a code [code][/code] tags.');?>" class="toggle-right btn btn-inverse qet" id = "code" onclick="insertCode()"><?php echo __('Code');?></button>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->input('message', array(
|
||||
'label' => false,
|
||||
'type' => 'textarea',
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge',
|
||||
));
|
||||
?>
|
||||
</fieldset>
|
||||
<button class="btn btn-primary" onClick="submitMessageForm('<?php echo h($url);?>', 'PostViewForm', 'top'); return false;"><?php echo __('Send');?></button>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function insertQuote() {
|
||||
document.getElementById("PostMessage").value+="[Quote][/Quote]";
|
||||
}
|
||||
function insertEvent() {
|
||||
document.getElementById("PostMessage").value+="[Event][/Event]";
|
||||
}
|
||||
function insertThread() {
|
||||
document.getElementById("PostMessage").value+="[Thread][/Thread]";
|
||||
}
|
||||
function insertLink() {
|
||||
document.getElementById("PostMessage").value+="[Link][/Link]";
|
||||
}
|
||||
function insertCode() {
|
||||
document.getElementById("PostMessage").value+="[Code][/Code]";
|
||||
}
|
||||
<?php if (isset($post_id) && $post_id): ?>
|
||||
$(document).ready(function() {
|
||||
location.hash = "#message_<?php echo h($post_id); ?>";
|
||||
});
|
||||
<?php endif; ?>
|
||||
function insertQuote() {
|
||||
document.getElementById("PostMessage").value+="[Quote][/Quote]";
|
||||
}
|
||||
function insertEvent() {
|
||||
document.getElementById("PostMessage").value+="[Event][/Event]";
|
||||
}
|
||||
function insertThread() {
|
||||
document.getElementById("PostMessage").value+="[Thread][/Thread]";
|
||||
}
|
||||
function insertLink() {
|
||||
document.getElementById("PostMessage").value+="[Link][/Link]";
|
||||
}
|
||||
function insertCode() {
|
||||
document.getElementById("PostMessage").value+="[Code][/Code]";
|
||||
}
|
||||
<?php if (isset($post_id) && $post_id): ?>
|
||||
$(document).ready(function() {
|
||||
location.hash = "#message_<?php echo h($post_id); ?>";
|
||||
});
|
||||
<?php endif; ?>
|
||||
</script>
|
||||
<?php echo $this->Js->writeBuffer();
|
||||
|
|
|
@ -1,41 +1,41 @@
|
|||
<div class="footer <?php echo $debugMode;?>">
|
||||
<div id="shortcutsListContainer" class="<?php echo $debugMode ? 'hidden': ''; ?>">
|
||||
<div id="triangle"></div>
|
||||
<div id="shortcutsList">
|
||||
<span> <?php echo __('Keyboard shortcuts for this page'); ?>:</span><br />
|
||||
<div id="shortcuts"><?php echo __('none'); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footerContainer" class="navbar navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<div class="pull-left footerText" style="float:left;position:absolute;padding-top:12px;z-index:2;">
|
||||
<?php
|
||||
$gpgpath = ROOT.DS.APP_DIR.DS.WEBROOT_DIR.DS.'gpg.asc';
|
||||
if (file_exists($gpgpath) && (is_file($gpgpath) || is_link($gpgpath))){ ?>
|
||||
<span>Download: <?php echo $this->Html->link(__('GnuPG key'), $this->webroot.'gpg.asc');?></span>
|
||||
<?php } else { ?>
|
||||
<span><?php echo __('Could not locate the GnuPG public key.');?></span>
|
||||
<?php }
|
||||
if (Configure::read('SMIME.enabled')):
|
||||
$smimepath = ROOT.DS.APP_DIR.DS.WEBROOT_DIR.DS.'public_certificate.pem';
|
||||
if (file_exists($smimepath) && (is_file($smimepath) || is_link($gpgpath))){ ?>
|
||||
<span>Download: <?php echo $this->Html->link('SMIME certificate', $this->webroot.'public_certificate.pem');?></span>
|
||||
<?php } else { ?>
|
||||
<span><?php echo __('Could not locate SMIME certificate.');?></span>
|
||||
<?php }
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
<div class = "footerText footerCenterText">
|
||||
<span><?php echo h(Configure::read('MISP.footermidleft')); ?> Powered by <a href="https://github.com/MISP/MISP">MISP <?php if (isset($me['id'])) echo h($mispVersionFull);?></a> <?php echo h(Configure::read('MISP.footermidright')); ?> - <?php echo date("Y-m-d H:i:s"); ?></span>
|
||||
</div>
|
||||
<div class="pull-right" style="position:relative;padding-top:9px;z-index:2;">
|
||||
<?php
|
||||
if (Configure::read('MISP.footer_logo')) {
|
||||
if (Configure::read('MISP.footer_logo')) echo $this->Html->image('custom/' . h(Configure::read('MISP.footer_logo')), array('alt' => 'Footer Logo', 'onerror' => "this.style.display='none';", 'style' => 'height:24px'));
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="shortcutsListContainer" class="<?php echo $debugMode ? 'hidden': ''; ?>">
|
||||
<div id="triangle"></div>
|
||||
<div id="shortcutsList">
|
||||
<span> <?php echo __('Keyboard shortcuts for this page'); ?>:</span><br />
|
||||
<div id="shortcuts"><?php echo __('none'); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="footerContainer" class="navbar navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<div class="pull-left footerText" style="float:left;position:absolute;padding-top:12px;z-index:2;">
|
||||
<?php
|
||||
$gpgpath = ROOT.DS.APP_DIR.DS.WEBROOT_DIR.DS.'gpg.asc';
|
||||
if (file_exists($gpgpath) && (is_file($gpgpath) || is_link($gpgpath))){ ?>
|
||||
<span>Download: <?php echo $this->Html->link(__('GnuPG key'), $this->webroot.'gpg.asc');?></span>
|
||||
<?php } else { ?>
|
||||
<span><?php echo __('Could not locate the GnuPG public key.');?></span>
|
||||
<?php }
|
||||
if (Configure::read('SMIME.enabled')):
|
||||
$smimepath = ROOT.DS.APP_DIR.DS.WEBROOT_DIR.DS.'public_certificate.pem';
|
||||
if (file_exists($smimepath) && (is_file($smimepath) || is_link($gpgpath))){ ?>
|
||||
<span>Download: <?php echo $this->Html->link('SMIME certificate', $this->webroot.'public_certificate.pem');?></span>
|
||||
<?php } else { ?>
|
||||
<span><?php echo __('Could not locate SMIME certificate.');?></span>
|
||||
<?php }
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
<div class = "footerText footerCenterText">
|
||||
<span><?php echo h(Configure::read('MISP.footermidleft')); ?> Powered by <a href="https://github.com/MISP/MISP">MISP <?php if (isset($me['id'])) echo h($mispVersionFull);?></a> <?php echo h(Configure::read('MISP.footermidright')); ?> - <?php echo date("Y-m-d H:i:s"); ?></span>
|
||||
</div>
|
||||
<div class="pull-right" style="position:relative;padding-top:9px;z-index:2;">
|
||||
<?php
|
||||
if (Configure::read('MISP.footer_logo')) {
|
||||
if (Configure::read('MISP.footer_logo')) echo $this->Html->image('custom/' . h(Configure::read('MISP.footer_logo')), array('alt' => 'Footer Logo', 'onerror' => "this.style.display='none';", 'style' => 'height:24px'));
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,116 +1,116 @@
|
|||
<?php
|
||||
$fixed_fields = array('synonyms', 'description', 'meta', 'authors', 'source');
|
||||
foreach ($data as $galaxy):
|
||||
$fixed_fields = array('synonyms', 'description', 'meta', 'authors', 'source');
|
||||
foreach ($data as $galaxy):
|
||||
?>
|
||||
<div style="margin-left:10px;">
|
||||
<span title="<?php echo isset($galaxy['description']) ? h($galaxy['description']) : h($galaxy['name']);?>" class="bold blue" style="font-size:14px;">
|
||||
<?php echo h($galaxy['name']); ?>
|
||||
<a href="<?php echo $baseurl; ?>/galaxies/view/<?php echo h($galaxy['id']); ?>" class="icon-search" title="<?php echo __('View details about this galaxy');?>"></a>
|
||||
</span>
|
||||
<?php
|
||||
foreach ($galaxy['GalaxyCluster'] as $cluster):
|
||||
?>
|
||||
<div style="margin-left:8px;">
|
||||
<span class="bold blue expandContainer useCursorPointer">
|
||||
<span class="collapse-status" style="font-size: 16px;">+</span>
|
||||
<span><?php echo h($cluster['value']); ?></span>
|
||||
<a href="<?php echo $baseurl; ?>/galaxy_clusters/view/<?php echo h($cluster['id']); ?>" class="icon-search" title="<?php echo __('View details about this cluster');?>"></a>
|
||||
<a href="<?php echo $baseurl; ?>/events/index/searchtag:<?php echo h($cluster['tag_id']); ?>" class="icon-th-list" title="<?php echo __('View all events containing this cluster.');?>"></a>
|
||||
<?php
|
||||
if ($isSiteAdmin || ($mayModify && $isAclTagger)) {
|
||||
echo $this->Form->postLink('',
|
||||
$baseurl . '/galaxy_clusters/detach/' . ucfirst(h($target_id)) . '/' . h($target_type) . '/' . $cluster['tag_id'],
|
||||
array('class' => 'icon-trash', 'title' => __('Delete'), 'div' => false),
|
||||
__('Are you sure you want to detach %s from this event?', h($cluster['value']))
|
||||
);
|
||||
}
|
||||
?>
|
||||
<div style="margin-left:15px;display:none;" class="blue galaxy_data">
|
||||
<?php
|
||||
$cluster_fields = array();
|
||||
if (isset($cluster['description'])) {
|
||||
$cluster_fields[] = array('key' => 'description', 'value' => $cluster['description']);
|
||||
}
|
||||
if (isset($cluster['meta']['synonyms'])) {
|
||||
$cluster_fields[] = array('key' => 'synonyms', 'value' => $cluster['meta']['synonyms']);
|
||||
}
|
||||
if (isset($cluster['source'])) {
|
||||
$cluster_fields[] = array('key' => 'source', 'value' => $cluster['source']);
|
||||
}
|
||||
if (isset($cluster['authors'])) {
|
||||
$cluster_fields[] = array('key' => 'authors', 'value' => $cluster['authors']);
|
||||
}
|
||||
if (!empty($cluster['meta'])) {
|
||||
foreach ($cluster['meta'] as $metaKey => $metaField) {
|
||||
if ($metaKey != 'synonyms') {
|
||||
$cluster_fields[] = array('key' => $metaKey, 'value' => $metaField);
|
||||
}
|
||||
}
|
||||
}
|
||||
$data = array();
|
||||
foreach ($cluster_fields as $cluster_field) {
|
||||
$dataKey = h(ucfirst($cluster_field['key']));
|
||||
$dataValue = '';
|
||||
if (is_array($cluster_field['value'])) {
|
||||
if ($cluster_field['key'] == 'refs') {
|
||||
$value = array();
|
||||
foreach ($cluster_field['value'] as $k => $v) {
|
||||
$v_name = strlen($v) > 30 ? substr($v, 0, 30) . '...' : $v;
|
||||
$value[$k] = sprintf('<a href="%s" title="%s">%s</a>', h($v), h($v), h($v_name));
|
||||
}
|
||||
$dataValue .= nl2br(implode("\n", $value));
|
||||
} else if($cluster_field['key'] == 'country') {
|
||||
$value = array();
|
||||
foreach ($cluster_field['value'] as $k => $v) {
|
||||
$value[] = '<div class="famfamfam-flag-' . strtolower(h($v)) . '" ></div> ' . h($v);
|
||||
}
|
||||
$dataValue .= nl2br(implode("\n", $value));
|
||||
} else {
|
||||
$dataValue .= nl2br(h(implode("\n", $cluster_field['value'])));
|
||||
}
|
||||
} else {
|
||||
if ($cluster_field['key'] == 'source' && filter_var($cluster_field['value'], FILTER_VALIDATE_URL)) {
|
||||
$dataValue .= '<a href="' . h($cluster_field['value']) . '">' . h($cluster_field['value']) . '</a>';;
|
||||
} else {
|
||||
$dataValue .= h($cluster_field['value']);
|
||||
}
|
||||
}
|
||||
$dataKey = sprintf('<div class="span3 info_container_key">%s</div>', $dataKey);
|
||||
$dataValue = sprintf('<div class="span9 info_container_value">%s</div>', $dataValue);
|
||||
echo sprintf('<div class="row-fluid cluster_%s">%s%s</div>', h($cluster_field['key']), $dataKey, $dataValue);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
<div style="margin-left:10px;">
|
||||
<span title="<?php echo isset($galaxy['description']) ? h($galaxy['description']) : h($galaxy['name']);?>" class="bold blue" style="font-size:14px;">
|
||||
<?php echo h($galaxy['name']); ?>
|
||||
<a href="<?php echo $baseurl; ?>/galaxies/view/<?php echo h($galaxy['id']); ?>" class="icon-search" title="<?php echo __('View details about this galaxy');?>"></a>
|
||||
</span>
|
||||
<?php
|
||||
foreach ($galaxy['GalaxyCluster'] as $cluster):
|
||||
?>
|
||||
<div style="margin-left:8px;">
|
||||
<span class="bold blue expandContainer useCursorPointer">
|
||||
<span class="collapse-status" style="font-size: 16px;">+</span>
|
||||
<span><?php echo h($cluster['value']); ?></span>
|
||||
<a href="<?php echo $baseurl; ?>/galaxy_clusters/view/<?php echo h($cluster['id']); ?>" class="icon-search" title="<?php echo __('View details about this cluster');?>"></a>
|
||||
<a href="<?php echo $baseurl; ?>/events/index/searchtag:<?php echo h($cluster['tag_id']); ?>" class="icon-th-list" title="<?php echo __('View all events containing this cluster.');?>"></a>
|
||||
<?php
|
||||
if ($isSiteAdmin || ($mayModify && $isAclTagger)) {
|
||||
echo $this->Form->postLink('',
|
||||
$baseurl . '/galaxy_clusters/detach/' . ucfirst(h($target_id)) . '/' . h($target_type) . '/' . $cluster['tag_id'],
|
||||
array('class' => 'icon-trash', 'title' => __('Delete'), 'div' => false),
|
||||
__('Are you sure you want to detach %s from this event?', h($cluster['value']))
|
||||
);
|
||||
}
|
||||
?>
|
||||
<div style="margin-left:15px;display:none;" class="blue galaxy_data">
|
||||
<?php
|
||||
$cluster_fields = array();
|
||||
if (isset($cluster['description'])) {
|
||||
$cluster_fields[] = array('key' => 'description', 'value' => $cluster['description']);
|
||||
}
|
||||
if (isset($cluster['meta']['synonyms'])) {
|
||||
$cluster_fields[] = array('key' => 'synonyms', 'value' => $cluster['meta']['synonyms']);
|
||||
}
|
||||
if (isset($cluster['source'])) {
|
||||
$cluster_fields[] = array('key' => 'source', 'value' => $cluster['source']);
|
||||
}
|
||||
if (isset($cluster['authors'])) {
|
||||
$cluster_fields[] = array('key' => 'authors', 'value' => $cluster['authors']);
|
||||
}
|
||||
if (!empty($cluster['meta'])) {
|
||||
foreach ($cluster['meta'] as $metaKey => $metaField) {
|
||||
if ($metaKey != 'synonyms') {
|
||||
$cluster_fields[] = array('key' => $metaKey, 'value' => $metaField);
|
||||
}
|
||||
}
|
||||
}
|
||||
$data = array();
|
||||
foreach ($cluster_fields as $cluster_field) {
|
||||
$dataKey = h(ucfirst($cluster_field['key']));
|
||||
$dataValue = '';
|
||||
if (is_array($cluster_field['value'])) {
|
||||
if ($cluster_field['key'] == 'refs') {
|
||||
$value = array();
|
||||
foreach ($cluster_field['value'] as $k => $v) {
|
||||
$v_name = strlen($v) > 30 ? substr($v, 0, 30) . '...' : $v;
|
||||
$value[$k] = sprintf('<a href="%s" title="%s">%s</a>', h($v), h($v), h($v_name));
|
||||
}
|
||||
$dataValue .= nl2br(implode("\n", $value));
|
||||
} else if($cluster_field['key'] == 'country') {
|
||||
$value = array();
|
||||
foreach ($cluster_field['value'] as $k => $v) {
|
||||
$value[] = '<div class="famfamfam-flag-' . strtolower(h($v)) . '" ></div> ' . h($v);
|
||||
}
|
||||
$dataValue .= nl2br(implode("\n", $value));
|
||||
} else {
|
||||
$dataValue .= nl2br(h(implode("\n", $cluster_field['value'])));
|
||||
}
|
||||
} else {
|
||||
if ($cluster_field['key'] == 'source' && filter_var($cluster_field['value'], FILTER_VALIDATE_URL)) {
|
||||
$dataValue .= '<a href="' . h($cluster_field['value']) . '">' . h($cluster_field['value']) . '</a>';;
|
||||
} else {
|
||||
$dataValue .= h($cluster_field['value']);
|
||||
}
|
||||
}
|
||||
$dataKey = sprintf('<div class="span3 info_container_key">%s</div>', $dataKey);
|
||||
$dataValue = sprintf('<div class="span9 info_container_value">%s</div>', $dataValue);
|
||||
echo sprintf('<div class="row-fluid cluster_%s">%s%s</div>', h($cluster_field['key']), $dataKey, $dataValue);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
<?php
|
||||
endforeach;
|
||||
endforeach;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
endforeach;
|
||||
endforeach;
|
||||
?>
|
||||
<?php
|
||||
if ($isSiteAdmin || ($mayModify && $isAclTagger)):
|
||||
if ($isSiteAdmin || ($mayModify && $isAclTagger)):
|
||||
?>
|
||||
<span class="useCursorPointer btn btn-inverse addGalaxy" data-target-type="<?php echo h($target_type);?>" data-target-id="<?php echo h($target_id); ?>" role="button" tabindex="0" aria-label="Add new cluster" style="padding: 1px 5px !important;font-size: 12px !important;">Add</span>
|
||||
<span class="useCursorPointer btn btn-inverse addGalaxy" data-target-type="<?php echo h($target_type);?>" data-target-id="<?php echo h($target_id); ?>" role="button" tabindex="0" aria-label="Add new cluster" style="padding: 1px 5px !important;font-size: 12px !important;">Add</span>
|
||||
<?php
|
||||
endif;
|
||||
endif;
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$('.expandContainer').click(function() {
|
||||
$(this).children('.galaxy_data').toggle();
|
||||
if ($(this).children('.collapse-status').html() == '+') {
|
||||
$(this).children('.collapse-status').val('-');
|
||||
} else {
|
||||
$(this).children('.collapse-status').val('+');
|
||||
}
|
||||
});
|
||||
$('.delete-cluster').click(function() {
|
||||
var tagName = $(this).data('tag-name');
|
||||
removeTag($id = false, $tag_id = false, $galaxy = false);
|
||||
});
|
||||
$('.expandContainer').click(function() {
|
||||
$(this).children('.galaxy_data').toggle();
|
||||
if ($(this).children('.collapse-status').html() == '+') {
|
||||
$(this).children('.collapse-status').val('-');
|
||||
} else {
|
||||
$(this).children('.collapse-status').val('+');
|
||||
}
|
||||
});
|
||||
$('.delete-cluster').click(function() {
|
||||
var tagName = $(this).data('tag-name');
|
||||
removeTag($id = false, $tag_id = false, $galaxy = false);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1,111 +1,111 @@
|
|||
<?php
|
||||
$fixed_fields = array('synonyms', 'description', 'meta', 'authors', 'source');
|
||||
foreach ($data as $galaxy):
|
||||
$fixed_fields = array('synonyms', 'description', 'meta', 'authors', 'source');
|
||||
foreach ($data as $galaxy):
|
||||
?>
|
||||
<div>
|
||||
<span title="<?php echo isset($galaxy['description']) ? h($galaxy['description']) : h($galaxy['name']);?>" class="bold blue" style="font-size:14px;">
|
||||
<?php echo h($galaxy['name']); ?>
|
||||
</span>
|
||||
<?php
|
||||
foreach ($galaxy['GalaxyCluster'] as $cluster):
|
||||
$cluster_fields = array();
|
||||
if (isset($cluster['description'])) {
|
||||
$cluster_fields[] = array('key' => 'description', 'value' => $cluster['description']);
|
||||
}
|
||||
if (isset($cluster['meta']['synonyms'])) {
|
||||
$cluster_fields[] = array('key' => 'synonyms', 'value' => $cluster['meta']['synonyms']);
|
||||
}
|
||||
if (isset($cluster['source'])) {
|
||||
$cluster_fields[] = array('key' => 'source', 'value' => $cluster['source']);
|
||||
}
|
||||
if (isset($cluster['authors'])) {
|
||||
$cluster_fields[] = array('key' => 'authors', 'value' => $cluster['authors']);
|
||||
}
|
||||
if (!empty($cluster['meta'])) {
|
||||
foreach ($cluster['meta'] as $metaKey => $metaField) {
|
||||
if ($metaKey != 'synonyms') {
|
||||
$cluster_fields[] = array('key' => $metaKey, 'value' => $metaField);
|
||||
}
|
||||
}
|
||||
}
|
||||
$popover_data = sprintf('<h4 class="blue bold">%s</h4>', h($cluster['value']));
|
||||
foreach ($cluster_fields as $cluster_field) {
|
||||
$key = sprintf('<span class="blue bold">%s</span>', Inflector::humanize(h($cluster_field['key'])));
|
||||
if (is_array($cluster_field['value'])) {
|
||||
if ($cluster_field['key'] == 'refs') {
|
||||
$value = array();
|
||||
foreach ($cluster_field['value'] as $k => $v) {
|
||||
$v_name = $v;
|
||||
if (strlen($v_name) > 30) {
|
||||
$v_name = substr($v, 0, 30) . '...';
|
||||
}
|
||||
$value[$k] = '<a href="' . h($v) . '" title="' . h($v) . '">' . h($v_name) . '</a>';
|
||||
}
|
||||
$value_contents = nl2br(implode("\n", $value));
|
||||
} else if($cluster_field['key'] == 'country') {
|
||||
$value = array();
|
||||
foreach ($cluster_field['value'] as $k => $v) {
|
||||
$value[] = '<span class="famfamfam-flag-' . strtolower(h($v)) . '" ></span> ' . h($v);
|
||||
}
|
||||
$value_contents = nl2br(implode("\n", $value));
|
||||
} else {
|
||||
$value_contents = nl2br(h(implode("\n", $cluster_field['value'])));
|
||||
}
|
||||
} else {
|
||||
if ($cluster_field['key'] == 'source' && filter_var($cluster_field['value'], FILTER_VALIDATE_URL)) {
|
||||
$value_contents = '<a href="' . h($cluster_field['value']) . '">' . h($cluster_field['value']) . '</a>';;
|
||||
} else {
|
||||
$value_contents = h($cluster_field['value']);
|
||||
}
|
||||
}
|
||||
$value = sprintf('<span class="black">%s</span>', $value_contents);
|
||||
$popover_data .= sprintf('<span>%s: %s</span><br />', $key, $value);
|
||||
}
|
||||
?>
|
||||
<div style="margin-left:8px;">
|
||||
<span class="bold blue expandable useCursorPointer" data-toggle="popover" data-content="<?php echo h($popover_data); ?>">
|
||||
<?php echo h($cluster['value']); ?>
|
||||
</span>
|
||||
<a href="<?php echo $baseurl; ?>/galaxy_clusters/view/<?php echo h($cluster['id']); ?>" class="icon-search" title="<?php echo __('View details about this cluster');?>"></a>
|
||||
<a href="<?php echo $baseurl; ?>/events/index/searchtag:<?php echo h($cluster['tag_id']); ?>" class="icon-th-list" title="<?php echo __('View all events containing this cluster.');?>"></a>
|
||||
<?php
|
||||
if ($isSiteAdmin || ($mayModify && $isAclTagger)) {
|
||||
echo $this->Form->postLink('',
|
||||
$baseurl . '/galaxy_clusters/detach/' . ucfirst(h($target_id)) . '/' . h($target_type) . '/' . $cluster['tag_id'],
|
||||
array('class' => 'icon-trash', 'title' => 'Delete'),
|
||||
__('Are you sure you want to detach %s from this %s?', h($cluster['value']), h($target_type))
|
||||
);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div>
|
||||
<span title="<?php echo isset($galaxy['description']) ? h($galaxy['description']) : h($galaxy['name']);?>" class="bold blue" style="font-size:14px;">
|
||||
<?php echo h($galaxy['name']); ?>
|
||||
</span>
|
||||
<?php
|
||||
foreach ($galaxy['GalaxyCluster'] as $cluster):
|
||||
$cluster_fields = array();
|
||||
if (isset($cluster['description'])) {
|
||||
$cluster_fields[] = array('key' => 'description', 'value' => $cluster['description']);
|
||||
}
|
||||
if (isset($cluster['meta']['synonyms'])) {
|
||||
$cluster_fields[] = array('key' => 'synonyms', 'value' => $cluster['meta']['synonyms']);
|
||||
}
|
||||
if (isset($cluster['source'])) {
|
||||
$cluster_fields[] = array('key' => 'source', 'value' => $cluster['source']);
|
||||
}
|
||||
if (isset($cluster['authors'])) {
|
||||
$cluster_fields[] = array('key' => 'authors', 'value' => $cluster['authors']);
|
||||
}
|
||||
if (!empty($cluster['meta'])) {
|
||||
foreach ($cluster['meta'] as $metaKey => $metaField) {
|
||||
if ($metaKey != 'synonyms') {
|
||||
$cluster_fields[] = array('key' => $metaKey, 'value' => $metaField);
|
||||
}
|
||||
}
|
||||
}
|
||||
$popover_data = sprintf('<h4 class="blue bold">%s</h4>', h($cluster['value']));
|
||||
foreach ($cluster_fields as $cluster_field) {
|
||||
$key = sprintf('<span class="blue bold">%s</span>', Inflector::humanize(h($cluster_field['key'])));
|
||||
if (is_array($cluster_field['value'])) {
|
||||
if ($cluster_field['key'] == 'refs') {
|
||||
$value = array();
|
||||
foreach ($cluster_field['value'] as $k => $v) {
|
||||
$v_name = $v;
|
||||
if (strlen($v_name) > 30) {
|
||||
$v_name = substr($v, 0, 30) . '...';
|
||||
}
|
||||
$value[$k] = '<a href="' . h($v) . '" title="' . h($v) . '">' . h($v_name) . '</a>';
|
||||
}
|
||||
$value_contents = nl2br(implode("\n", $value));
|
||||
} else if($cluster_field['key'] == 'country') {
|
||||
$value = array();
|
||||
foreach ($cluster_field['value'] as $k => $v) {
|
||||
$value[] = '<span class="famfamfam-flag-' . strtolower(h($v)) . '" ></span> ' . h($v);
|
||||
}
|
||||
$value_contents = nl2br(implode("\n", $value));
|
||||
} else {
|
||||
$value_contents = nl2br(h(implode("\n", $cluster_field['value'])));
|
||||
}
|
||||
} else {
|
||||
if ($cluster_field['key'] == 'source' && filter_var($cluster_field['value'], FILTER_VALIDATE_URL)) {
|
||||
$value_contents = '<a href="' . h($cluster_field['value']) . '">' . h($cluster_field['value']) . '</a>';;
|
||||
} else {
|
||||
$value_contents = h($cluster_field['value']);
|
||||
}
|
||||
}
|
||||
$value = sprintf('<span class="black">%s</span>', $value_contents);
|
||||
$popover_data .= sprintf('<span>%s: %s</span><br />', $key, $value);
|
||||
}
|
||||
?>
|
||||
<div style="margin-left:8px;">
|
||||
<span class="bold blue expandable useCursorPointer" data-toggle="popover" data-content="<?php echo h($popover_data); ?>">
|
||||
<?php echo h($cluster['value']); ?>
|
||||
</span>
|
||||
<a href="<?php echo $baseurl; ?>/galaxy_clusters/view/<?php echo h($cluster['id']); ?>" class="icon-search" title="<?php echo __('View details about this cluster');?>"></a>
|
||||
<a href="<?php echo $baseurl; ?>/events/index/searchtag:<?php echo h($cluster['tag_id']); ?>" class="icon-th-list" title="<?php echo __('View all events containing this cluster.');?>"></a>
|
||||
<?php
|
||||
if ($isSiteAdmin || ($mayModify && $isAclTagger)) {
|
||||
echo $this->Form->postLink('',
|
||||
$baseurl . '/galaxy_clusters/detach/' . ucfirst(h($target_id)) . '/' . h($target_type) . '/' . $cluster['tag_id'],
|
||||
array('class' => 'icon-trash', 'title' => 'Delete'),
|
||||
__('Are you sure you want to detach %s from this %s?', h($cluster['value']), h($target_type))
|
||||
);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
endforeach;
|
||||
endforeach;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
endforeach;
|
||||
endforeach;
|
||||
?>
|
||||
<?php
|
||||
if ($isSiteAdmin || ($mayModify && $isAclTagger)):
|
||||
if ($isSiteAdmin || ($mayModify && $isAclTagger)):
|
||||
?>
|
||||
<span class="btn btn-inverse noPrint addGalaxy" data-target-type="<?php echo h($target_type);?>" data-target-id="<?php echo h($target_id); ?>" role="button" tabindex="0" aria-label="<?php echo __('Add new cluster');?>" style="padding: 1px 5px !important;font-size: 12px !important;"><?php echo __('Add');?></span>
|
||||
<span class="btn btn-inverse noPrint addGalaxy" data-target-type="<?php echo h($target_type);?>" data-target-id="<?php echo h($target_id); ?>" role="button" tabindex="0" aria-label="<?php echo __('Add new cluster');?>" style="padding: 1px 5px !important;font-size: 12px !important;"><?php echo __('Add');?></span>
|
||||
<?php
|
||||
endif;
|
||||
endif;
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$('.expandable').click(function() {
|
||||
$(this).parent().children('div').toggle();
|
||||
if ($(this).children('span').html() == '+') {
|
||||
$(this).children('span').html('-');
|
||||
} else {
|
||||
$(this).children('span').html('+');
|
||||
}
|
||||
});
|
||||
$('.delete-cluster').click(function() {
|
||||
var tagName = $(this).data('tag-name');
|
||||
removeTag($id = false, $tag_id = false, $galaxy = false);
|
||||
});
|
||||
$('.expandable').click(function() {
|
||||
$(this).parent().children('div').toggle();
|
||||
if ($(this).children('span').html() == '+') {
|
||||
$(this).children('span').html('-');
|
||||
} else {
|
||||
$(this).children('span').html('+');
|
||||
}
|
||||
});
|
||||
$('.delete-cluster').click(function() {
|
||||
var tagName = $(this).data('tag-name');
|
||||
removeTag($id = false, $tag_id = false, $galaxy = false);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1,216 +1,216 @@
|
|||
<div id="topBar" class="navbar-wrapper header <?php echo $debugMode;?>">
|
||||
<div class="navbar navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
|
||||
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</a>
|
||||
<?php if ($me != false ):?>
|
||||
<div class="nav-collapse collapse">
|
||||
<ul class="nav">
|
||||
<?php
|
||||
$logo = 'Home';
|
||||
if (Configure::read('MISP.home_logo')) $logo = '<img src="' . $baseurl . '/img/custom/' . Configure::read('MISP.home_logo') . '" style="height:24px;">';
|
||||
?>
|
||||
<li><a href="<?php echo !empty($baseurl) ? $baseurl : '/';?>" style="color:white"><?php echo $logo; ?></a></li>
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
Event Actions
|
||||
<b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="<?php echo $baseurl;?>/events/index"><?php echo __('List Events');?></a></li>
|
||||
<?php if ($isAclAdd): ?>
|
||||
<li><a href="<?php echo $baseurl;?>/events/add"><?php echo __('Add Event');?></a></li>
|
||||
<?php endif; ?>
|
||||
<li><a href="<?php echo $baseurl;?>/attributes/index"><?php echo __('List Attributes');?></a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/attributes/search"><?php echo __('Search Attributes');?></a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/shadow_attributes/index"><?php echo __('View Proposals');?></a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/events/proposalEventIndex">Events with proposals</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/tags/index"><?php echo __('List Tags');?></a></li>
|
||||
<?php if ($isAclTagEditor): ?>
|
||||
<li><a href="<?php echo $baseurl;?>/tags/add"><?php echo __('Add Tag');?></a></li>
|
||||
<?php endif; ?>
|
||||
<li><a href="<?php echo $baseurl;?>/taxonomies/index"><?php echo __('List Taxonomies');?></a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/templates/index"><?php echo __('List Templates');?></a></li>
|
||||
<?php if ($isAclTemplate): ?>
|
||||
<li><a href="<?php echo $baseurl;?>/templates/add"><?php echo __('Add Template');?></a></li>
|
||||
<?php endif; ?>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/events/export"><?php echo __('Export');?></a></li>
|
||||
<?php if ($isAclAuth): ?>
|
||||
<li><a href="<?php echo $baseurl;?>/events/automation"><?php echo __('Automation');?></a></li>
|
||||
<?php endif;?>
|
||||
<div class="navbar navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
|
||||
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</a>
|
||||
<?php if ($me != false ):?>
|
||||
<div class="nav-collapse collapse">
|
||||
<ul class="nav">
|
||||
<?php
|
||||
$logo = 'Home';
|
||||
if (Configure::read('MISP.home_logo')) $logo = '<img src="' . $baseurl . '/img/custom/' . Configure::read('MISP.home_logo') . '" style="height:24px;">';
|
||||
?>
|
||||
<li><a href="<?php echo !empty($baseurl) ? $baseurl : '/';?>" style="color:white"><?php echo $logo; ?></a></li>
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
Event Actions
|
||||
<b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="<?php echo $baseurl;?>/events/index"><?php echo __('List Events');?></a></li>
|
||||
<?php if ($isAclAdd): ?>
|
||||
<li><a href="<?php echo $baseurl;?>/events/add"><?php echo __('Add Event');?></a></li>
|
||||
<?php endif; ?>
|
||||
<li><a href="<?php echo $baseurl;?>/attributes/index"><?php echo __('List Attributes');?></a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/attributes/search"><?php echo __('Search Attributes');?></a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/shadow_attributes/index"><?php echo __('View Proposals');?></a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/events/proposalEventIndex">Events with proposals</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/tags/index"><?php echo __('List Tags');?></a></li>
|
||||
<?php if ($isAclTagEditor): ?>
|
||||
<li><a href="<?php echo $baseurl;?>/tags/add"><?php echo __('Add Tag');?></a></li>
|
||||
<?php endif; ?>
|
||||
<li><a href="<?php echo $baseurl;?>/taxonomies/index"><?php echo __('List Taxonomies');?></a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/templates/index"><?php echo __('List Templates');?></a></li>
|
||||
<?php if ($isAclTemplate): ?>
|
||||
<li><a href="<?php echo $baseurl;?>/templates/add"><?php echo __('Add Template');?></a></li>
|
||||
<?php endif; ?>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/events/export"><?php echo __('Export');?></a></li>
|
||||
<?php if ($isAclAuth): ?>
|
||||
<li><a href="<?php echo $baseurl;?>/events/automation"><?php echo __('Automation');?></a></li>
|
||||
<?php endif;?>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<?php echo __('Galaxies');?>
|
||||
<b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="<?php echo $baseurl;?>/galaxies/index"><?php echo __('List Galaxies');?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<?php echo __('Galaxies');?>
|
||||
<b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="<?php echo $baseurl;?>/galaxies/index"><?php echo __('List Galaxies');?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<?php echo __('Input Filters');?>
|
||||
<b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<?php if ($isAclRegexp): ?>
|
||||
<li><a href="<?php echo $baseurl;?>/admin/regexp/index"><?php echo __('Import Regexp');?></a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/admin/whitelists/index"><?php echo __('Signature Whitelist');?></a></li>
|
||||
<?php endif;?>
|
||||
<?php if (!$isAclRegexp): ?>
|
||||
<li><a href="<?php echo $baseurl;?>/regexp/index"><?php echo __('Import Regexp');?></a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/whitelists/index"><?php echo __('Signature Whitelist');?></a></li>
|
||||
<?php endif;?>
|
||||
<li><a href="<?php echo $baseurl;?>/warninglists/index"><?php echo __('List Warninglists');?></a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/noticelists/index"><?php echo __('List Noticelists');?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<?php echo __('Input Filters');?>
|
||||
<b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<?php if ($isAclRegexp): ?>
|
||||
<li><a href="<?php echo $baseurl;?>/admin/regexp/index"><?php echo __('Import Regexp');?></a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/admin/whitelists/index"><?php echo __('Signature Whitelist');?></a></li>
|
||||
<?php endif;?>
|
||||
<?php if (!$isAclRegexp): ?>
|
||||
<li><a href="<?php echo $baseurl;?>/regexp/index"><?php echo __('Import Regexp');?></a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/whitelists/index"><?php echo __('Signature Whitelist');?></a></li>
|
||||
<?php endif;?>
|
||||
<li><a href="<?php echo $baseurl;?>/warninglists/index"><?php echo __('List Warninglists');?></a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/noticelists/index"><?php echo __('List Noticelists');?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
Global Actions
|
||||
<b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="<?php echo $baseurl;?>/news"><?php echo __('News');?></a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/users/view/me"><?php echo __('My Profile');?></a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/users/dashboard"><?php echo __('Dashboard');?></a></li>
|
||||
<?php
|
||||
if ($isAclSharingGroup || empty(Configure::read('Security.hide_organisation_index_from_users'))):
|
||||
?>
|
||||
<li><a href="<?php echo $baseurl;?>/organisations/index"><?php echo __('Organisations');?></a></li>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<li><a href="<?php echo $baseurl;?>/roles/index"><?php echo __('Role Permissions');?></a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/objectTemplates/index"><?php echo __('List Object Templates');?></a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/sharing_groups/index"><?php echo __('List Sharing Groups');?></a></li>
|
||||
<?php if ($isAclSharingGroup): ?>
|
||||
<li><a href="<?php echo $baseurl;?>/sharing_groups/add"><?php echo __('Add Sharing Group');?></a></li>
|
||||
<?php endif; ?>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/pages/display/doc/quickstart"><?php echo __('User Guide');?></a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/users/terms"><?php echo __('Terms & Conditions');?></a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/users/statistics"><?php echo __('Statistics');?></a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/threads/index"><?php echo __('List Discussions');?></a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/posts/add"><?php echo __('Start Discussion');?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
Global Actions
|
||||
<b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="<?php echo $baseurl;?>/news"><?php echo __('News');?></a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/users/view/me"><?php echo __('My Profile');?></a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/users/dashboard"><?php echo __('Dashboard');?></a></li>
|
||||
<?php
|
||||
if ($isAclSharingGroup || empty(Configure::read('Security.hide_organisation_index_from_users'))):
|
||||
?>
|
||||
<li><a href="<?php echo $baseurl;?>/organisations/index"><?php echo __('Organisations');?></a></li>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<li><a href="<?php echo $baseurl;?>/roles/index"><?php echo __('Role Permissions');?></a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/objectTemplates/index"><?php echo __('List Object Templates');?></a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/sharing_groups/index"><?php echo __('List Sharing Groups');?></a></li>
|
||||
<?php if ($isAclSharingGroup): ?>
|
||||
<li><a href="<?php echo $baseurl;?>/sharing_groups/add"><?php echo __('Add Sharing Group');?></a></li>
|
||||
<?php endif; ?>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/pages/display/doc/quickstart"><?php echo __('User Guide');?></a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/users/terms"><?php echo __('Terms & Conditions');?></a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/users/statistics"><?php echo __('Statistics');?></a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/threads/index"><?php echo __('List Discussions');?></a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/posts/add"><?php echo __('Start Discussion');?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<?php if ($isAclSync || $isAdmin): ?>
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
Sync Actions
|
||||
<b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="<?php echo $baseurl;?>/servers/index"><?php echo __('List Servers');?></a></li>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<li><a href="<?php echo $baseurl;?>/feeds/index"><?php echo __('List Feeds');?></a></li>
|
||||
<?php endif;?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif;?>
|
||||
<?php if ($isAclSync || $isAdmin): ?>
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
Sync Actions
|
||||
<b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="<?php echo $baseurl;?>/servers/index"><?php echo __('List Servers');?></a></li>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<li><a href="<?php echo $baseurl;?>/feeds/index"><?php echo __('List Feeds');?></a></li>
|
||||
<?php endif;?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if ($isAdmin || $isSiteAdmin): ?>
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<?php echo __('Administration');?>
|
||||
<b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="<?php echo $baseurl;?>/admin/users/index"><?php echo __('List Users');?></a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/admin/users/add"><?php echo __('Add User');?></a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/admin/users/email"><?php echo __('Contact Users');?></a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/organisations/index"><?php echo __('List Organisations');?></a></li>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<li><a href="<?php echo $baseurl;?>/admin/organisations/add"><?php echo __('Add Organisation');?></a></li>
|
||||
<?php endif;?>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/admin/roles/index"><?php echo __('List Roles');?></a></li>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<li><a href="<?php echo $baseurl;?>/admin/roles/add"><?php echo __('Add Role');?></a></li>
|
||||
<?php endif; ?>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/servers/serverSettings">Server Settings &<br /><?php echo __('Maintenance');?></a></li>
|
||||
<?php if (Configure::read('MISP.background_jobs')): ?>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/jobs/index"><?php echo __('Jobs');?></a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/tasks"><?php echo __('Scheduled Tasks');?></a></li>
|
||||
<?php endif; ?>
|
||||
<?php if (Configure::read('MISP.enableEventBlacklisting') !== false && $isSiteAdmin): ?>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/eventBlacklists/add">Blacklist Event</a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/eventBlacklists"><?php echo __('Manage Event Blacklists');?></a></li>
|
||||
<?php endif; ?>
|
||||
<?php if (Configure::read('MISP.enableEventBlacklisting') !== false && $isSiteAdmin): ?>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/orgBlacklists/add"><?php echo __('Blacklist Organisation');?></a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/orgBlacklists"><?php echo __('Manage Org Blacklists');?></a></li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if ($isAdmin || $isSiteAdmin): ?>
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<?php echo __('Administration');?>
|
||||
<b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="<?php echo $baseurl;?>/admin/users/index"><?php echo __('List Users');?></a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/admin/users/add"><?php echo __('Add User');?></a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/admin/users/email"><?php echo __('Contact Users');?></a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/organisations/index"><?php echo __('List Organisations');?></a></li>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<li><a href="<?php echo $baseurl;?>/admin/organisations/add"><?php echo __('Add Organisation');?></a></li>
|
||||
<?php endif;?>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/admin/roles/index"><?php echo __('List Roles');?></a></li>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<li><a href="<?php echo $baseurl;?>/admin/roles/add"><?php echo __('Add Role');?></a></li>
|
||||
<?php endif; ?>
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/servers/serverSettings">Server Settings &<br /><?php echo __('Maintenance');?></a></li>
|
||||
<?php if (Configure::read('MISP.background_jobs')): ?>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/jobs/index"><?php echo __('Jobs');?></a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/tasks"><?php echo __('Scheduled Tasks');?></a></li>
|
||||
<?php endif; ?>
|
||||
<?php if (Configure::read('MISP.enableEventBlacklisting') !== false && $isSiteAdmin): ?>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/eventBlacklists/add">Blacklist Event</a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/eventBlacklists"><?php echo __('Manage Event Blacklists');?></a></li>
|
||||
<?php endif; ?>
|
||||
<?php if (Configure::read('MISP.enableEventBlacklisting') !== false && $isSiteAdmin): ?>
|
||||
<li class="divider"></li>
|
||||
<li><a href="<?php echo $baseurl;?>/orgBlacklists/add"><?php echo __('Blacklist Organisation');?></a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/orgBlacklists"><?php echo __('Manage Org Blacklists');?></a></li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($isAclAudit): ?>
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<?php echo __('Audit');?>
|
||||
<b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="<?php echo $baseurl;?>/admin/logs/index"><?php echo __('List Logs');?></a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/admin/logs/search"><?php echo __('Search Logs');?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif;?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="nav-collapse collapse pull-right">
|
||||
<ul class="nav">
|
||||
<li>
|
||||
<a href="<?php echo $baseurl;?>/" id="smallLogo" style="font-weight:bold;">
|
||||
<span class="logoBlueStatic">MISP</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php echo $baseurl;?>/users/view/me" class="white" style="padding-left:0px;padding-right:5px;" title="<?php echo h($me['email']);?>"><?php echo $loggedInUserName;?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php echo $baseurl;?>/users/dashboard" style="padding-left:0px;padding-right:0px;">
|
||||
<span class="notification-<?php echo ($notifications['total'] > 0) ? 'active' : 'passive';?>"><span style="float:left;margin-top:3px;margin-right:3px;margin-left:3px;" class="icon-envelope icon-white" title="<?php echo __('Dashboard');?>" role="button" tabindex="0" aria-label="<?php echo __('Dashboard');?>"></span></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php if (!$externalAuthUser && !Configure::read('Plugin.CustomAuth_disable_logout')): ?>
|
||||
<li><a href="<?php echo $baseurl;?>/users/logout"><?php echo __('Log out');?></a></li>
|
||||
<?php elseif (Configure::read('Plugin.CustomAuth_custom_logout')): ?>
|
||||
<li><a href="<?php echo h(Configure::read('Plugin.CustomAuth_custom_logout'));?>"><?php echo __('Log out');?></a></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($isAclAudit): ?>
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<?php echo __('Audit');?>
|
||||
<b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="<?php echo $baseurl;?>/admin/logs/index"><?php echo __('List Logs');?></a></li>
|
||||
<li><a href="<?php echo $baseurl;?>/admin/logs/search"><?php echo __('Search Logs');?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif;?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="nav-collapse collapse pull-right">
|
||||
<ul class="nav">
|
||||
<li>
|
||||
<a href="<?php echo $baseurl;?>/" id="smallLogo" style="font-weight:bold;">
|
||||
<span class="logoBlueStatic">MISP</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php echo $baseurl;?>/users/view/me" class="white" style="padding-left:0px;padding-right:5px;" title="<?php echo h($me['email']);?>"><?php echo $loggedInUserName;?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php echo $baseurl;?>/users/dashboard" style="padding-left:0px;padding-right:0px;">
|
||||
<span class="notification-<?php echo ($notifications['total'] > 0) ? 'active' : 'passive';?>"><span style="float:left;margin-top:3px;margin-right:3px;margin-left:3px;" class="icon-envelope icon-white" title="<?php echo __('Dashboard');?>" role="button" tabindex="0" aria-label="<?php echo __('Dashboard');?>"></span></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php if (!$externalAuthUser && !Configure::read('Plugin.CustomAuth_disable_logout')): ?>
|
||||
<li><a href="<?php echo $baseurl;?>/users/logout"><?php echo __('Log out');?></a></li>
|
||||
<?php elseif (Configure::read('Plugin.CustomAuth_custom_logout')): ?>
|
||||
<li><a href="<?php echo h(Configure::read('Plugin.CustomAuth_custom_logout'));?>"><?php echo __('Log out');?></a></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" class="keyboardShortcutsConfig" value="/shortcuts/global_menu.json" />
|
||||
|
|
|
@ -1,359 +1,359 @@
|
|||
<div style="border:1px solid #dddddd; margin-top:1px; width:95%; padding:10px">
|
||||
<?php
|
||||
if (!$dbEncodingStatus):
|
||||
if (!$dbEncodingStatus):
|
||||
?>
|
||||
<div style="font-size:12pt;padding-left:3px;width:100%;background-color:red;color:white;font-weight:bold;"><?php echo __('Incorrect database encoding setting: Your database connection is currently NOT set to UTF-8. Please make sure to uncomment the \'encoding\' => \'utf8\' line in ') . APP; ?>Config/database.php</div>
|
||||
<div style="font-size:12pt;padding-left:3px;width:100%;background-color:red;color:white;font-weight:bold;"><?php echo __('Incorrect database encoding setting: Your database connection is currently NOT set to UTF-8. Please make sure to uncomment the \'encoding\' => \'utf8\' line in ') . APP; ?>Config/database.php</div>
|
||||
<?php
|
||||
endif;
|
||||
endif;
|
||||
?>
|
||||
<h3><?php echo __('MISP version');?></h3>
|
||||
<p><?php echo __('Every version of MISP includes a json file with the current version. This is checked against the latest tag on github, if there is a version mismatch the tool will warn you about it. Make sure that you update MISP regularly.');?></p>
|
||||
<div style="background-color:#f7f7f9;width:100%;">
|
||||
<span><?php echo __('Currently installed version…');?>
|
||||
<?php
|
||||
<h3><?php echo __('MISP version');?></h3>
|
||||
<p><?php echo __('Every version of MISP includes a json file with the current version. This is checked against the latest tag on github, if there is a version mismatch the tool will warn you about it. Make sure that you update MISP regularly.');?></p>
|
||||
<div style="background-color:#f7f7f9;width:100%;">
|
||||
<span><?php echo __('Currently installed version…');?>
|
||||
<?php
|
||||
|
||||
switch ($version['upToDate']) {
|
||||
case 'newer':
|
||||
$fontColour = 'orange';
|
||||
$versionText = __('Upcoming development version');
|
||||
break;
|
||||
case 'older':
|
||||
$fontColour = 'red';
|
||||
$versionText = __('Outdated version');
|
||||
break;
|
||||
case 'same':
|
||||
$fontColour = 'green';
|
||||
$versionText = __('OK');
|
||||
break;
|
||||
default:
|
||||
$fontColour = 'red';
|
||||
$versionText = __('Could not retrieve version from github');
|
||||
}
|
||||
?>
|
||||
<span style="color:<?php echo $fontColour; ?>;">
|
||||
<?php
|
||||
echo $version['current'] . ' (' . h($commit) . ')';
|
||||
?>
|
||||
</span>
|
||||
</span><br />
|
||||
<span><?php echo __('Latest available version…');?>
|
||||
<span style="color:<?php echo $fontColour; ?>;">
|
||||
<?php
|
||||
echo $version['newest'] . ' (' . $latestCommit . ')';
|
||||
?>
|
||||
</span>
|
||||
</span><br />
|
||||
<span><?php echo __('Status…');?>
|
||||
<span style="color:<?php echo $fontColour; ?>;">
|
||||
<?php
|
||||
echo $versionText;
|
||||
?>
|
||||
</span>
|
||||
</span><br />
|
||||
<span><?php echo __('Current branch…');?>
|
||||
<?php
|
||||
$branchColour = $branch == '2.4' ? 'green' : 'red bold';
|
||||
?>
|
||||
<span class="<?php echo h($branchColour); ?>">
|
||||
<?php
|
||||
echo h($branch);
|
||||
?>
|
||||
</span>
|
||||
</span><br />
|
||||
<pre class="hidden green bold" id="gitResult"></pre>
|
||||
<button title="<?php echo __('Pull the latest MISP version from github');?>" class="btn btn-inverse" style="padding-top:1px;padding-bottom:1px;" onClick = "updateMISP();"><?php echo __('Update MISP');?></button>
|
||||
</div>
|
||||
<h3><?php echo __('Writeable Directories and files');?></h3>
|
||||
<p><?php echo __('The following directories and files have to be writeable for MISP to function properly. Make sure that the apache user has write privileges for the directories below.');?></p>
|
||||
<p><b><?php echo __('Directories');?></b></p>
|
||||
<div style="background-color:#f7f7f9;width:400px;">
|
||||
<?php
|
||||
foreach ($writeableDirs as $dir => $error) {
|
||||
$colour = 'green';
|
||||
$message = $writeableErrors[$error];
|
||||
if ($error > 0) {
|
||||
$message = __('Directory ') . $message;
|
||||
$colour = 'red';
|
||||
}
|
||||
echo $dir . '…<span style="color:' . $colour . ';">' . $message . '</span><br />';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<br />
|
||||
<p><b><?php echo __('Writeable Files');?></b></p>
|
||||
<div style="background-color:#f7f7f9;width:400px;">
|
||||
<?php
|
||||
foreach ($writeableFiles as $file => $error) {
|
||||
$colour = 'green';
|
||||
$message = $writeableErrors[$error];
|
||||
if ($error > 0) {
|
||||
$message = __('File ') . $message;
|
||||
$colour = 'red';
|
||||
}
|
||||
echo $file . '…<span style="color:' . $colour . ';">' . $message . '</span><br />';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<p><b><?php echo __('Readable Files');?></b></p>
|
||||
<div style="background-color:#f7f7f9;width:400px;">
|
||||
<?php
|
||||
foreach ($readableFiles as $file => $error) {
|
||||
$colour = 'green';
|
||||
$message = $readableErrors[$error];
|
||||
if ($error > 0) {
|
||||
$message = __('File ') . $message;
|
||||
$colour = 'red';
|
||||
}
|
||||
echo $file . '…<span style="color:' . $colour . ';">' . $message . '</span><br />';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
switch ($version['upToDate']) {
|
||||
case 'newer':
|
||||
$fontColour = 'orange';
|
||||
$versionText = __('Upcoming development version');
|
||||
break;
|
||||
case 'older':
|
||||
$fontColour = 'red';
|
||||
$versionText = __('Outdated version');
|
||||
break;
|
||||
case 'same':
|
||||
$fontColour = 'green';
|
||||
$versionText = __('OK');
|
||||
break;
|
||||
default:
|
||||
$fontColour = 'red';
|
||||
$versionText = __('Could not retrieve version from github');
|
||||
}
|
||||
?>
|
||||
<span style="color:<?php echo $fontColour; ?>;">
|
||||
<?php
|
||||
echo $version['current'] . ' (' . h($commit) . ')';
|
||||
?>
|
||||
</span>
|
||||
</span><br />
|
||||
<span><?php echo __('Latest available version…');?>
|
||||
<span style="color:<?php echo $fontColour; ?>;">
|
||||
<?php
|
||||
echo $version['newest'] . ' (' . $latestCommit . ')';
|
||||
?>
|
||||
</span>
|
||||
</span><br />
|
||||
<span><?php echo __('Status…');?>
|
||||
<span style="color:<?php echo $fontColour; ?>;">
|
||||
<?php
|
||||
echo $versionText;
|
||||
?>
|
||||
</span>
|
||||
</span><br />
|
||||
<span><?php echo __('Current branch…');?>
|
||||
<?php
|
||||
$branchColour = $branch == '2.4' ? 'green' : 'red bold';
|
||||
?>
|
||||
<span class="<?php echo h($branchColour); ?>">
|
||||
<?php
|
||||
echo h($branch);
|
||||
?>
|
||||
</span>
|
||||
</span><br />
|
||||
<pre class="hidden green bold" id="gitResult"></pre>
|
||||
<button title="<?php echo __('Pull the latest MISP version from github');?>" class="btn btn-inverse" style="padding-top:1px;padding-bottom:1px;" onClick = "updateMISP();"><?php echo __('Update MISP');?></button>
|
||||
</div>
|
||||
<h3><?php echo __('Writeable Directories and files');?></h3>
|
||||
<p><?php echo __('The following directories and files have to be writeable for MISP to function properly. Make sure that the apache user has write privileges for the directories below.');?></p>
|
||||
<p><b><?php echo __('Directories');?></b></p>
|
||||
<div style="background-color:#f7f7f9;width:400px;">
|
||||
<?php
|
||||
foreach ($writeableDirs as $dir => $error) {
|
||||
$colour = 'green';
|
||||
$message = $writeableErrors[$error];
|
||||
if ($error > 0) {
|
||||
$message = __('Directory ') . $message;
|
||||
$colour = 'red';
|
||||
}
|
||||
echo $dir . '…<span style="color:' . $colour . ';">' . $message . '</span><br />';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<br />
|
||||
<p><b><?php echo __('Writeable Files');?></b></p>
|
||||
<div style="background-color:#f7f7f9;width:400px;">
|
||||
<?php
|
||||
foreach ($writeableFiles as $file => $error) {
|
||||
$colour = 'green';
|
||||
$message = $writeableErrors[$error];
|
||||
if ($error > 0) {
|
||||
$message = __('File ') . $message;
|
||||
$colour = 'red';
|
||||
}
|
||||
echo $file . '…<span style="color:' . $colour . ';">' . $message . '</span><br />';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<p><b><?php echo __('Readable Files');?></b></p>
|
||||
<div style="background-color:#f7f7f9;width:400px;">
|
||||
<?php
|
||||
foreach ($readableFiles as $file => $error) {
|
||||
$colour = 'green';
|
||||
$message = $readableErrors[$error];
|
||||
if ($error > 0) {
|
||||
$message = __('File ') . $message;
|
||||
$colour = 'red';
|
||||
}
|
||||
echo $file . '…<span style="color:' . $colour . ';">' . $message . '</span><br />';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<h3><?php echo __('PHP Settings');?></h3>
|
||||
<?php
|
||||
$phpcolour = 'green';
|
||||
$phptext = __('Up to date');
|
||||
$phpversions = array();
|
||||
$phpversions['web']['phpversion'] = $phpversion;
|
||||
$phpversions['cli']['phpversion'] = isset($extensions['cli']['phpversion']) ? $extensions['cli']['phpversion'] : false;
|
||||
foreach (array('web', 'cli') as $source) {
|
||||
if (!$phpversions[$source]['phpversion']) {
|
||||
$phpversions[$source]['phpversion'] = __('Unknown');
|
||||
$phpversions[$source]['phpcolour'] = 'red';
|
||||
$phpversions[$source]['phptext'] = __('Issues determining version');
|
||||
continue;
|
||||
}
|
||||
$phpversions[$source]['phpcolour'] = 'green';
|
||||
$phpversions[$source]['phptext'] = __('Up to date');
|
||||
if (version_compare($phpversions[$source]['phpversion'], $phprec) < 1) {
|
||||
$phpversions[$source]['phpcolour'] = 'orange';
|
||||
$phpversions[$source]['phptext'] = __('Update highly recommended');
|
||||
if (version_compare($phpversions[$source]['phpversion'], $phpmin) < 1) {
|
||||
$phpversions[$source]['phpcolour'] = 'red';
|
||||
$phpversions[$source]['phptext'] = __('Version unsupported, update ASAP');
|
||||
}
|
||||
}
|
||||
}
|
||||
if (version_compare($phpversion, $phprec) < 1) {
|
||||
$phpcolour = 'orange';
|
||||
$phptext = __('Update highly recommended');
|
||||
if (version_compare($phpversion, $phpmin) < 1) {
|
||||
$phpcolour = 'red';
|
||||
$phptext = __('Version unsupported, update ASAP');
|
||||
}
|
||||
}
|
||||
?>
|
||||
<p><span class="bold"><?php echo __('PHP ini path');?></span>:… <span class="green"><?php echo h($php_ini); ?></span><br />
|
||||
<span class="bold"><?php echo __('PHP Version');?> (><?php echo $phprec; ?> <?php echo __('recommended');?>): </span><span class="<?php echo $phpversions['web']['phpcolour']; ?>"><?php echo h($phpversions['web']['phpversion']) . ' (' . $phpversions['web']['phptext'] . ')';?></span><br />
|
||||
<span class="bold"><?php echo __('PHP CLI Version');?> (><?php echo $phprec; ?> <?php echo __('recommended');?>): </span><span class="<?php echo $phpversions['cli']['phpcolour']; ?>"><?php echo h($phpversions['cli']['phpversion']) . ' (' . $phpversions['cli']['phptext'] . ')';?></span></p>
|
||||
<p><?php echo __('The following settings might have a negative impact on certain functionalities of MISP with their current and recommended minimum settings. You can adjust these in your php.ini. Keep in mind that the recommendations are not requirements, just recommendations. Depending on usage you might want to go beyond the recommended values.');?></p>
|
||||
<?php
|
||||
foreach ($phpSettings as $settingName => &$phpSetting):
|
||||
echo $settingName . ' (<span class="bold">' . $phpSetting['value'] . ($phpSetting['unit'] ? $phpSetting['unit'] : '') . '</span>' .')' . '…';
|
||||
if ($phpSetting['value'] < $phpSetting['recommended']) $pass = false;
|
||||
else $pass = true;
|
||||
?>
|
||||
<span style="color:<?php echo $pass ? 'green': 'orange'; ?>"><?php echo $pass ? __('OK') : __('Low'); ?> (recommended: <?php echo strval($phpSetting['recommended']) . ($phpSetting['unit'] ? $phpSetting['unit'] : '') . ')'; ?></span><br />
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
<h4><?php echo __('PHP Extensions');?></h4>
|
||||
<?php
|
||||
foreach (array('web', 'cli') as $context):
|
||||
?>
|
||||
<div style="background-color:#f7f7f9;width:400px;">
|
||||
<b><?php echo ucfirst(h($context));?></b><br />
|
||||
<?php
|
||||
if (isset($extensions[$context]['extensions'])):
|
||||
foreach ($extensions[$context]['extensions'] as $extension => $status):
|
||||
?>
|
||||
<?php echo h($extension); ?>:… <span style="color:<?php echo $status ? 'green' : 'red';?>;font-weight:bold;"><?php echo $status ? __('OK') : __('Not loaded'); ?></span>
|
||||
<?php
|
||||
endforeach;
|
||||
else:
|
||||
?>
|
||||
<span class="red"><?php echo __('Issues reading PHP settings. This could be due to the test script not being readable.');?></span>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
</div><br />
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
<h3><?php echo __('Advanced attachment handler');?></h3>
|
||||
<?php echo __('The advanced attachment tools are used by the add attachment functionality to extract additional data about the uploaded sample.');?>
|
||||
<div style="background-color:#f7f7f9;width:400px;">
|
||||
<?php
|
||||
if (empty($advanced_attachments)):
|
||||
?>
|
||||
<b><?php echo __('PyMISP');?></b>:… <span class="red bold"><?php echo __('Not installed or version outdated.');?></span><br />
|
||||
<?php
|
||||
endif;
|
||||
if (!empty($advanced_attachments)):
|
||||
foreach ($advanced_attachments as $k => $v):
|
||||
?>
|
||||
<b><?php echo h($k); ?></b>:… <?php echo $v === false ? '<span class="green bold">' . __('OK') . '</span>' : '<span class="red bold">' . h($v) . '</span>'; ?><br />
|
||||
<?php
|
||||
endforeach;
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
<h3><?php echo __('STIX and Cybox libraries');?></h3>
|
||||
<p><?php echo __('Mitre\'s STIX and Cybox python libraries have to be installed in order for MISP\'s STIX export to work. Make sure that you install them (as described in the MISP installation instructions) if you receive an error below.');?><br />
|
||||
<?php echo __('If you run into any issues here, make sure that both STIX and CyBox are installed as described in the INSTALL.txt file. The required versions are');?>:<br />
|
||||
<b>STIX</b>: <?php echo $stix['stix']['expected'];?><br />
|
||||
<b>CyBox</b>: <?php echo $stix['cybox']['expected'];?><br />
|
||||
<b>mixbox</b>: <?php echo $stix['mixbox']['expected'];?><br />
|
||||
<b>maec</b>: <?php echo $stix['maec']['expected'];?><br />
|
||||
<b>PyMISP</b>: <?php echo $stix['pymisp']['expected'];?><br />
|
||||
<?php echo __('Other versions might work but are not tested / recommended.');?></p>
|
||||
<div style="background-color:#f7f7f9;width:400px;">
|
||||
<?php
|
||||
$colour = 'green';
|
||||
$testReadError = false;
|
||||
foreach ($readableFiles as $file => $data) {
|
||||
if (substr($file, -strlen('/stixtest.py')) == '/stixtest.py') {
|
||||
if ($data > 0) {
|
||||
$colour = 'red';
|
||||
echo __('STIX and CyBox') . '… <span class="red">' . __('Could not read test script (stixtest.py).') . '</span>';
|
||||
$testReadError = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!$testReadError) {
|
||||
$error_count = 0;
|
||||
$libraries = '';
|
||||
foreach (array('stix', 'cybox', 'mixbox', 'maec', 'pymisp') as $package) {
|
||||
$lib_colour = 'green';
|
||||
if ($stix[$package]['status'] == 0) {
|
||||
$lib_colour = 'red';
|
||||
$error_count += 1;
|
||||
}
|
||||
$libraries = $libraries . strtoupper($package) . __(' library version') . '…<span style="color:' . $lib_colour . ';">' . ${$package . 'Version'}[$stix[$package]['status']] . '</span><br />';
|
||||
}
|
||||
if ($stix['operational'] == 0) {
|
||||
$colour = 'red';
|
||||
echo '<b>Current libraries status</b>…<span style="color:' . $colour . ';">' . $stixOperational[$stix['operational']] . '</span><br />';
|
||||
} else {
|
||||
if ($error_count > 0) {
|
||||
$colour = 'orange';
|
||||
echo '<b>Current libraries status</b>…<span style="color:' . $colour . ';">Some versions should be updated</span>:<br />';
|
||||
} else {
|
||||
echo '<b>Current libraries status</b>…<span style="color:' . $colour . ';">' . $stixOperational[$stix['operational']] . '</span><br />';
|
||||
}
|
||||
}
|
||||
echo $libraries;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<h3><?php echo __('GnuPG');?></h3>
|
||||
<p><?php echo __('This tool tests whether your GnuPG is set up correctly or not.');?></p>
|
||||
<div style="background-color:#f7f7f9;width:400px;">
|
||||
<?php
|
||||
$colour = 'green';
|
||||
$message = $gpgErrors[$gpgStatus];
|
||||
if ($gpgStatus > 0) {
|
||||
$colour = 'red';
|
||||
}
|
||||
echo __('GnuPG installation and settings') . '…<span style="color:' . $colour . ';">' . $message . '</span>';
|
||||
?>
|
||||
</div>
|
||||
<h3><?php echo __('ZeroMQ');?></h3>
|
||||
<p><?php echo __('This tool tests whether the ZeroMQ extension is installed and functional.');?></p>
|
||||
<div style="background-color:#f7f7f9;width:400px;">
|
||||
<?php
|
||||
$colour = 'green';
|
||||
$message = $zmqErrors[$zmqStatus];
|
||||
if ($zmqStatus > 1) {
|
||||
$colour = 'red';
|
||||
}
|
||||
echo __('ZeroMQ settings') . '…<span style="color:' . $colour . ';">' . $message . '</span>';
|
||||
?>
|
||||
</div>
|
||||
<div>
|
||||
<span class="btn btn-inverse" role="button" tabindex="0" aria-label="<?php echo __('Start ZMQ service');?>" title="<?php echo __('Start ZeroMQ service');?>" style="padding-top:1px;padding-bottom:1px;" onClick = "zeroMQServerAction('start')"><?php echo __('Start');?></span>
|
||||
<span class="btn btn-inverse" role="button" tabindex="0" aria-label="<?php echo __('Stop ZeroMQ service');?>" title="<?php echo __('Stop ZeroMQ service');?>" style="padding-top:1px;padding-bottom:1px;" onClick = "zeroMQServerAction('stop')"><?php echo __('Stop');?></span>
|
||||
<span class="btn btn-inverse" role="button" tabindex="0" aria-label="<?php echo __('Check ZeroMQ service status');?>" title="<?php echo __('Check ZeroMQ service status');?>" style="padding-top:1px;padding-bottom:1px;" onClick = "zeroMQServerAction('status')"><?php echo __('Status');?></span>
|
||||
</div>
|
||||
<h3><?php echo __('Proxy');?></h3>
|
||||
<p><?php echo __('This tool tests whether your HTTP proxy settings are correct.');?></p>
|
||||
<div style="background-color:#f7f7f9;width:400px;">
|
||||
<?php
|
||||
$colour = 'green';
|
||||
$message = $proxyErrors[$proxyStatus];
|
||||
if ($proxyStatus > 1) {
|
||||
$colour = 'red';
|
||||
}
|
||||
echo __('Proxy settings') . '…<span style="color:' . $colour . ';">' . $message . '</span>';
|
||||
?>
|
||||
</div>
|
||||
<h3><?php echo __('Module System');?></h3>
|
||||
<p><?php echo __('This tool tests the various module systems and whether they are reachable based on the module settings.');?></p>
|
||||
<?php
|
||||
foreach ($moduleTypes as $type):
|
||||
?>
|
||||
<div style="background-color:#f7f7f9;width:400px;">
|
||||
<?php
|
||||
$colour = 'green';
|
||||
if (isset($moduleErrors[$moduleStatus[$type]])) {
|
||||
$message = $moduleErrors[$moduleStatus[$type]];
|
||||
} else {
|
||||
$message = h($moduleStatus[$type]);
|
||||
}
|
||||
if ($moduleStatus[$type] > 0) {
|
||||
$colour = 'red';
|
||||
}
|
||||
echo $type . __(' module system') . '…<span style="color:' . $colour . ';">' . $message . '</span>';
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
<h3><?php echo __('Session table');?></h3>
|
||||
<p><?php echo __('This tool checks how large your database\'s session table is. <br />Sessions in CakePHP rely on PHP\'s garbage collection for clean-up and in certain distributions this can be disabled by default resulting in an ever growing cake session table. <br />If you are affected by this, just click the clean session table button below.');?></p>
|
||||
<div style="background-color:#f7f7f9;width:400px;">
|
||||
<?php
|
||||
$colour = 'green';
|
||||
$message = $sessionErrors[$sessionStatus];
|
||||
$sessionColours = array(0 => 'green', 1 => 'red', 2 => 'orange', 3 => 'red');
|
||||
$colour = $sessionColours[$sessionStatus];
|
||||
echo __('Expired sessions') . '…<span style="color:' . $colour . ';">' . $sessionCount . ' (' . $message . ')' . '</span>';
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
if ($sessionStatus < 2):
|
||||
?>
|
||||
<a href="<?php echo $baseurl;?>/servers/purgeSessions"><span class="btn btn-inverse" style="padding-top:1px;padding-bottom:1px;"><?php echo __('Purge sessions');?></span></a>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<h3><?php echo __('Clean model cache');?></h3>
|
||||
<p><?php echo __('If you ever run into issues with missing database fields / tables, please run the following script to clean the model cache.');?></p>
|
||||
<?php echo $this->Form->postLink('<span class="btn btn-inverse" style="padding-top:1px;padding-bottom:1px;">' . __('Clean cache') . '</span>', $baseurl . '/events/cleanModelCaches', array('escape' => false));?>
|
||||
<h3><?php echo __('Overwritten objects');?></h3>
|
||||
<p><?php echo __('Prior to 2.4.89, due to a bug a situation could occur where objects got overwritten on a sync pull. This tool allows you to inspect whether you are affected and if yes, remedy the issue.');?></p>
|
||||
<a href="<?php echo $baseurl; ?>/objects/orphanedObjectDiagnostics"><span class="btn btn-inverse">Reconstruct overwritten objects</span></a>
|
||||
<h3><?php echo __('Orphaned attributes');?></h3>
|
||||
<p><?php echo __('In some rare cases attributes can remain in the database after an event is deleted becoming orphaned attributes. This means that they do not belong to any event, which can cause issues with the correlation engine (known cases include event deletion directly in the database without cleaning up the attributes and situations involving a race condition with an event deletion happening before all attributes are synchronised over).');?></p>
|
||||
<div style="background-color:#f7f7f9;width:400px;">
|
||||
<?php echo __('Orphaned attributes');?>…<span id="orphanedAttributeCount"><span style="color:orange;"><?php echo __('Run the test below');?></span></span>
|
||||
</div><br />
|
||||
<span class="btn btn-inverse" role="button" tabindex="0" aria-label="<?php echo __('Check for orphaned attribute');?>" title="<?php echo __('Check for orphaned attributes');?>" style="padding-top:1px;padding-bottom:1px;" onClick="checkOrphanedAttributes();"><?php echo __('Check for orphaned attributes');?></span><br /><br />
|
||||
<?php echo $this->Form->postButton(__('Remove orphaned attributes'), $baseurl . '/attributes/pruneOrphanedAttributes', $options = array('class' => 'btn btn-primary', 'style' => 'padding-top:1px;padding-bottom:1px;')); ?>
|
||||
<h3><?php echo __('Verify GnuPG keys');?></h3>
|
||||
<p><?php echo __('Run a full validation of all GnuPG keys within this instance\'s userbase. The script will try to identify possible issues with each key and report back on the results.');?></p>
|
||||
<span class="btn btn-inverse" onClick="location.href='<?php echo $baseurl;?>/users/verifyGPG';"><?php echo __('Verify GnuPG keys');?></span> (<?php echo __('Check whether every user\'s GnuPG key is usable');?>)</li>
|
||||
<h3><?php echo __('Database cleanup scripts');?></h3>
|
||||
<p><?php echo __('If you run into an issue with an infinite upgrade loop (when upgrading from version ~2.4.50) that ends up filling your database with upgrade script log messages, run the following script.');?></p>
|
||||
<?php echo $this->Form->postButton(__('Prune upgrade logs'), $baseurl . '/logs/pruneUpdateLogs', $options = array('class' => 'btn btn-primary', 'style' => 'padding-top:1px;padding-bottom:1px;')); ?>
|
||||
<h3><?php echo __('Legacy Administrative Tools');?></h3>
|
||||
<p><?php echo __('Click the following button to go to the legacy administrative tools page. There should in general be no need to do this unless you are upgrading a very old MISP instance (<2.4), all updates are done automatically with more current versions.');?></p>
|
||||
<span class="btn btn-inverse" style="padding-top:1px;padding-bottom:1px;" onClick="location.href = '<?php echo $baseurl; ?>/pages/display/administration';"><?php echo __('Legacy Administrative Tools');?></span>
|
||||
<h3><?php echo __('PHP Settings');?></h3>
|
||||
<?php
|
||||
$phpcolour = 'green';
|
||||
$phptext = __('Up to date');
|
||||
$phpversions = array();
|
||||
$phpversions['web']['phpversion'] = $phpversion;
|
||||
$phpversions['cli']['phpversion'] = isset($extensions['cli']['phpversion']) ? $extensions['cli']['phpversion'] : false;
|
||||
foreach (array('web', 'cli') as $source) {
|
||||
if (!$phpversions[$source]['phpversion']) {
|
||||
$phpversions[$source]['phpversion'] = __('Unknown');
|
||||
$phpversions[$source]['phpcolour'] = 'red';
|
||||
$phpversions[$source]['phptext'] = __('Issues determining version');
|
||||
continue;
|
||||
}
|
||||
$phpversions[$source]['phpcolour'] = 'green';
|
||||
$phpversions[$source]['phptext'] = __('Up to date');
|
||||
if (version_compare($phpversions[$source]['phpversion'], $phprec) < 1) {
|
||||
$phpversions[$source]['phpcolour'] = 'orange';
|
||||
$phpversions[$source]['phptext'] = __('Update highly recommended');
|
||||
if (version_compare($phpversions[$source]['phpversion'], $phpmin) < 1) {
|
||||
$phpversions[$source]['phpcolour'] = 'red';
|
||||
$phpversions[$source]['phptext'] = __('Version unsupported, update ASAP');
|
||||
}
|
||||
}
|
||||
}
|
||||
if (version_compare($phpversion, $phprec) < 1) {
|
||||
$phpcolour = 'orange';
|
||||
$phptext = __('Update highly recommended');
|
||||
if (version_compare($phpversion, $phpmin) < 1) {
|
||||
$phpcolour = 'red';
|
||||
$phptext = __('Version unsupported, update ASAP');
|
||||
}
|
||||
}
|
||||
?>
|
||||
<p><span class="bold"><?php echo __('PHP ini path');?></span>:… <span class="green"><?php echo h($php_ini); ?></span><br />
|
||||
<span class="bold"><?php echo __('PHP Version');?> (><?php echo $phprec; ?> <?php echo __('recommended');?>): </span><span class="<?php echo $phpversions['web']['phpcolour']; ?>"><?php echo h($phpversions['web']['phpversion']) . ' (' . $phpversions['web']['phptext'] . ')';?></span><br />
|
||||
<span class="bold"><?php echo __('PHP CLI Version');?> (><?php echo $phprec; ?> <?php echo __('recommended');?>): </span><span class="<?php echo $phpversions['cli']['phpcolour']; ?>"><?php echo h($phpversions['cli']['phpversion']) . ' (' . $phpversions['cli']['phptext'] . ')';?></span></p>
|
||||
<p><?php echo __('The following settings might have a negative impact on certain functionalities of MISP with their current and recommended minimum settings. You can adjust these in your php.ini. Keep in mind that the recommendations are not requirements, just recommendations. Depending on usage you might want to go beyond the recommended values.');?></p>
|
||||
<?php
|
||||
foreach ($phpSettings as $settingName => &$phpSetting):
|
||||
echo $settingName . ' (<span class="bold">' . $phpSetting['value'] . ($phpSetting['unit'] ? $phpSetting['unit'] : '') . '</span>' .')' . '…';
|
||||
if ($phpSetting['value'] < $phpSetting['recommended']) $pass = false;
|
||||
else $pass = true;
|
||||
?>
|
||||
<span style="color:<?php echo $pass ? 'green': 'orange'; ?>"><?php echo $pass ? __('OK') : __('Low'); ?> (recommended: <?php echo strval($phpSetting['recommended']) . ($phpSetting['unit'] ? $phpSetting['unit'] : '') . ')'; ?></span><br />
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
<h4><?php echo __('PHP Extensions');?></h4>
|
||||
<?php
|
||||
foreach (array('web', 'cli') as $context):
|
||||
?>
|
||||
<div style="background-color:#f7f7f9;width:400px;">
|
||||
<b><?php echo ucfirst(h($context));?></b><br />
|
||||
<?php
|
||||
if (isset($extensions[$context]['extensions'])):
|
||||
foreach ($extensions[$context]['extensions'] as $extension => $status):
|
||||
?>
|
||||
<?php echo h($extension); ?>:… <span style="color:<?php echo $status ? 'green' : 'red';?>;font-weight:bold;"><?php echo $status ? __('OK') : __('Not loaded'); ?></span>
|
||||
<?php
|
||||
endforeach;
|
||||
else:
|
||||
?>
|
||||
<span class="red"><?php echo __('Issues reading PHP settings. This could be due to the test script not being readable.');?></span>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
</div><br />
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
<h3><?php echo __('Advanced attachment handler');?></h3>
|
||||
<?php echo __('The advanced attachment tools are used by the add attachment functionality to extract additional data about the uploaded sample.');?>
|
||||
<div style="background-color:#f7f7f9;width:400px;">
|
||||
<?php
|
||||
if (empty($advanced_attachments)):
|
||||
?>
|
||||
<b><?php echo __('PyMISP');?></b>:… <span class="red bold"><?php echo __('Not installed or version outdated.');?></span><br />
|
||||
<?php
|
||||
endif;
|
||||
if (!empty($advanced_attachments)):
|
||||
foreach ($advanced_attachments as $k => $v):
|
||||
?>
|
||||
<b><?php echo h($k); ?></b>:… <?php echo $v === false ? '<span class="green bold">' . __('OK') . '</span>' : '<span class="red bold">' . h($v) . '</span>'; ?><br />
|
||||
<?php
|
||||
endforeach;
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
<h3><?php echo __('STIX and Cybox libraries');?></h3>
|
||||
<p><?php echo __('Mitre\'s STIX and Cybox python libraries have to be installed in order for MISP\'s STIX export to work. Make sure that you install them (as described in the MISP installation instructions) if you receive an error below.');?><br />
|
||||
<?php echo __('If you run into any issues here, make sure that both STIX and CyBox are installed as described in the INSTALL.txt file. The required versions are');?>:<br />
|
||||
<b>STIX</b>: <?php echo $stix['stix']['expected'];?><br />
|
||||
<b>CyBox</b>: <?php echo $stix['cybox']['expected'];?><br />
|
||||
<b>mixbox</b>: <?php echo $stix['mixbox']['expected'];?><br />
|
||||
<b>maec</b>: <?php echo $stix['maec']['expected'];?><br />
|
||||
<b>PyMISP</b>: <?php echo $stix['pymisp']['expected'];?><br />
|
||||
<?php echo __('Other versions might work but are not tested / recommended.');?></p>
|
||||
<div style="background-color:#f7f7f9;width:400px;">
|
||||
<?php
|
||||
$colour = 'green';
|
||||
$testReadError = false;
|
||||
foreach ($readableFiles as $file => $data) {
|
||||
if (substr($file, -strlen('/stixtest.py')) == '/stixtest.py') {
|
||||
if ($data > 0) {
|
||||
$colour = 'red';
|
||||
echo __('STIX and CyBox') . '… <span class="red">' . __('Could not read test script (stixtest.py).') . '</span>';
|
||||
$testReadError = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!$testReadError) {
|
||||
$error_count = 0;
|
||||
$libraries = '';
|
||||
foreach (array('stix', 'cybox', 'mixbox', 'maec', 'pymisp') as $package) {
|
||||
$lib_colour = 'green';
|
||||
if ($stix[$package]['status'] == 0) {
|
||||
$lib_colour = 'red';
|
||||
$error_count += 1;
|
||||
}
|
||||
$libraries = $libraries . strtoupper($package) . __(' library version') . '…<span style="color:' . $lib_colour . ';">' . ${$package . 'Version'}[$stix[$package]['status']] . '</span><br />';
|
||||
}
|
||||
if ($stix['operational'] == 0) {
|
||||
$colour = 'red';
|
||||
echo '<b>Current libraries status</b>…<span style="color:' . $colour . ';">' . $stixOperational[$stix['operational']] . '</span><br />';
|
||||
} else {
|
||||
if ($error_count > 0) {
|
||||
$colour = 'orange';
|
||||
echo '<b>Current libraries status</b>…<span style="color:' . $colour . ';">Some versions should be updated</span>:<br />';
|
||||
} else {
|
||||
echo '<b>Current libraries status</b>…<span style="color:' . $colour . ';">' . $stixOperational[$stix['operational']] . '</span><br />';
|
||||
}
|
||||
}
|
||||
echo $libraries;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<h3><?php echo __('GnuPG');?></h3>
|
||||
<p><?php echo __('This tool tests whether your GnuPG is set up correctly or not.');?></p>
|
||||
<div style="background-color:#f7f7f9;width:400px;">
|
||||
<?php
|
||||
$colour = 'green';
|
||||
$message = $gpgErrors[$gpgStatus];
|
||||
if ($gpgStatus > 0) {
|
||||
$colour = 'red';
|
||||
}
|
||||
echo __('GnuPG installation and settings') . '…<span style="color:' . $colour . ';">' . $message . '</span>';
|
||||
?>
|
||||
</div>
|
||||
<h3><?php echo __('ZeroMQ');?></h3>
|
||||
<p><?php echo __('This tool tests whether the ZeroMQ extension is installed and functional.');?></p>
|
||||
<div style="background-color:#f7f7f9;width:400px;">
|
||||
<?php
|
||||
$colour = 'green';
|
||||
$message = $zmqErrors[$zmqStatus];
|
||||
if ($zmqStatus > 1) {
|
||||
$colour = 'red';
|
||||
}
|
||||
echo __('ZeroMQ settings') . '…<span style="color:' . $colour . ';">' . $message . '</span>';
|
||||
?>
|
||||
</div>
|
||||
<div>
|
||||
<span class="btn btn-inverse" role="button" tabindex="0" aria-label="<?php echo __('Start ZMQ service');?>" title="<?php echo __('Start ZeroMQ service');?>" style="padding-top:1px;padding-bottom:1px;" onClick = "zeroMQServerAction('start')"><?php echo __('Start');?></span>
|
||||
<span class="btn btn-inverse" role="button" tabindex="0" aria-label="<?php echo __('Stop ZeroMQ service');?>" title="<?php echo __('Stop ZeroMQ service');?>" style="padding-top:1px;padding-bottom:1px;" onClick = "zeroMQServerAction('stop')"><?php echo __('Stop');?></span>
|
||||
<span class="btn btn-inverse" role="button" tabindex="0" aria-label="<?php echo __('Check ZeroMQ service status');?>" title="<?php echo __('Check ZeroMQ service status');?>" style="padding-top:1px;padding-bottom:1px;" onClick = "zeroMQServerAction('status')"><?php echo __('Status');?></span>
|
||||
</div>
|
||||
<h3><?php echo __('Proxy');?></h3>
|
||||
<p><?php echo __('This tool tests whether your HTTP proxy settings are correct.');?></p>
|
||||
<div style="background-color:#f7f7f9;width:400px;">
|
||||
<?php
|
||||
$colour = 'green';
|
||||
$message = $proxyErrors[$proxyStatus];
|
||||
if ($proxyStatus > 1) {
|
||||
$colour = 'red';
|
||||
}
|
||||
echo __('Proxy settings') . '…<span style="color:' . $colour . ';">' . $message . '</span>';
|
||||
?>
|
||||
</div>
|
||||
<h3><?php echo __('Module System');?></h3>
|
||||
<p><?php echo __('This tool tests the various module systems and whether they are reachable based on the module settings.');?></p>
|
||||
<?php
|
||||
foreach ($moduleTypes as $type):
|
||||
?>
|
||||
<div style="background-color:#f7f7f9;width:400px;">
|
||||
<?php
|
||||
$colour = 'green';
|
||||
if (isset($moduleErrors[$moduleStatus[$type]])) {
|
||||
$message = $moduleErrors[$moduleStatus[$type]];
|
||||
} else {
|
||||
$message = h($moduleStatus[$type]);
|
||||
}
|
||||
if ($moduleStatus[$type] > 0) {
|
||||
$colour = 'red';
|
||||
}
|
||||
echo $type . __(' module system') . '…<span style="color:' . $colour . ';">' . $message . '</span>';
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
<h3><?php echo __('Session table');?></h3>
|
||||
<p><?php echo __('This tool checks how large your database\'s session table is. <br />Sessions in CakePHP rely on PHP\'s garbage collection for clean-up and in certain distributions this can be disabled by default resulting in an ever growing cake session table. <br />If you are affected by this, just click the clean session table button below.');?></p>
|
||||
<div style="background-color:#f7f7f9;width:400px;">
|
||||
<?php
|
||||
$colour = 'green';
|
||||
$message = $sessionErrors[$sessionStatus];
|
||||
$sessionColours = array(0 => 'green', 1 => 'red', 2 => 'orange', 3 => 'red');
|
||||
$colour = $sessionColours[$sessionStatus];
|
||||
echo __('Expired sessions') . '…<span style="color:' . $colour . ';">' . $sessionCount . ' (' . $message . ')' . '</span>';
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
if ($sessionStatus < 2):
|
||||
?>
|
||||
<a href="<?php echo $baseurl;?>/servers/purgeSessions"><span class="btn btn-inverse" style="padding-top:1px;padding-bottom:1px;"><?php echo __('Purge sessions');?></span></a>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
<h3><?php echo __('Clean model cache');?></h3>
|
||||
<p><?php echo __('If you ever run into issues with missing database fields / tables, please run the following script to clean the model cache.');?></p>
|
||||
<?php echo $this->Form->postLink('<span class="btn btn-inverse" style="padding-top:1px;padding-bottom:1px;">' . __('Clean cache') . '</span>', $baseurl . '/events/cleanModelCaches', array('escape' => false));?>
|
||||
<h3><?php echo __('Overwritten objects');?></h3>
|
||||
<p><?php echo __('Prior to 2.4.89, due to a bug a situation could occur where objects got overwritten on a sync pull. This tool allows you to inspect whether you are affected and if yes, remedy the issue.');?></p>
|
||||
<a href="<?php echo $baseurl; ?>/objects/orphanedObjectDiagnostics"><span class="btn btn-inverse">Reconstruct overwritten objects</span></a>
|
||||
<h3><?php echo __('Orphaned attributes');?></h3>
|
||||
<p><?php echo __('In some rare cases attributes can remain in the database after an event is deleted becoming orphaned attributes. This means that they do not belong to any event, which can cause issues with the correlation engine (known cases include event deletion directly in the database without cleaning up the attributes and situations involving a race condition with an event deletion happening before all attributes are synchronised over).');?></p>
|
||||
<div style="background-color:#f7f7f9;width:400px;">
|
||||
<?php echo __('Orphaned attributes');?>…<span id="orphanedAttributeCount"><span style="color:orange;"><?php echo __('Run the test below');?></span></span>
|
||||
</div><br />
|
||||
<span class="btn btn-inverse" role="button" tabindex="0" aria-label="<?php echo __('Check for orphaned attribute');?>" title="<?php echo __('Check for orphaned attributes');?>" style="padding-top:1px;padding-bottom:1px;" onClick="checkOrphanedAttributes();"><?php echo __('Check for orphaned attributes');?></span><br /><br />
|
||||
<?php echo $this->Form->postButton(__('Remove orphaned attributes'), $baseurl . '/attributes/pruneOrphanedAttributes', $options = array('class' => 'btn btn-primary', 'style' => 'padding-top:1px;padding-bottom:1px;')); ?>
|
||||
<h3><?php echo __('Verify GnuPG keys');?></h3>
|
||||
<p><?php echo __('Run a full validation of all GnuPG keys within this instance\'s userbase. The script will try to identify possible issues with each key and report back on the results.');?></p>
|
||||
<span class="btn btn-inverse" onClick="location.href='<?php echo $baseurl;?>/users/verifyGPG';"><?php echo __('Verify GnuPG keys');?></span> (<?php echo __('Check whether every user\'s GnuPG key is usable');?>)</li>
|
||||
<h3><?php echo __('Database cleanup scripts');?></h3>
|
||||
<p><?php echo __('If you run into an issue with an infinite upgrade loop (when upgrading from version ~2.4.50) that ends up filling your database with upgrade script log messages, run the following script.');?></p>
|
||||
<?php echo $this->Form->postButton(__('Prune upgrade logs'), $baseurl . '/logs/pruneUpdateLogs', $options = array('class' => 'btn btn-primary', 'style' => 'padding-top:1px;padding-bottom:1px;')); ?>
|
||||
<h3><?php echo __('Legacy Administrative Tools');?></h3>
|
||||
<p><?php echo __('Click the following button to go to the legacy administrative tools page. There should in general be no need to do this unless you are upgrading a very old MISP instance (<2.4), all updates are done automatically with more current versions.');?></p>
|
||||
<span class="btn btn-inverse" style="padding-top:1px;padding-bottom:1px;" onClick="location.href = '<?php echo $baseurl; ?>/pages/display/administration';"><?php echo __('Legacy Administrative Tools');?></span>
|
||||
<h3><?php echo __('Verify bad link on attachments');?></h3>
|
||||
<p><?php echo __('Verify each attachment referenced in database is accessible on filesystem.');?></p>
|
||||
<div style="background-color:#f7f7f9;width:400px;">
|
||||
<p><?php echo __('Verify each attachment referenced in database is accessible on filesystem.');?></p>
|
||||
<div style="background-color:#f7f7f9;width:400px;">
|
||||
<?php echo __('Non existing attachments referenced in Database');?>…<span id="orphanedFileCount"><span style="color:orange;"><?php echo __('Run the test below');?></span></span>
|
||||
</div><br>
|
||||
<span class="btn btn-inverse" role="button" tabindex="0" aria-label="<?php echo __('Check bad link on attachments');?>" title="<?php echo __('Check bad link on attachments');?>" style="padding-top:1px;padding-bottom:1px;" onClick="checkAttachments();"><?php echo __('Check bad link on attachments');?></span>
|
||||
<span class="btn btn-inverse" role="button" tabindex="0" aria-label="<?php echo __('Check bad link on attachments');?>" title="<?php echo __('Check bad link on attachments');?>" style="padding-top:1px;padding-bottom:1px;" onClick="checkAttachments();"><?php echo __('Check bad link on attachments');?></span>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -1,97 +1,97 @@
|
|||
<div style="border:1px solid #dddddd; margin-top:1px; width:100%; padding:10px">
|
||||
<p><?php echo __('Below you will find a list of the uploaded files based on type.');?></p>
|
||||
<?php
|
||||
foreach ($files as $k => $file):
|
||||
?>
|
||||
<h3><?php echo h($file['name']); ?></h3>
|
||||
<div>
|
||||
<b><?php echo __('Description');?></b>: <?php echo $file['description']; ?><br />
|
||||
<b><?php echo __('Expected Format');?></b>: <?php echo h($file['valid_format']);?><br />
|
||||
<b><?php echo __('Path');?></b>: <?php echo h($file['path']);?><br />
|
||||
<?php
|
||||
if (!empty($file['expected'])):
|
||||
?>
|
||||
<b><?php echo __('Files set for each relevant setting');?>:</b>:<br />
|
||||
<ul>
|
||||
<?php foreach ($file['expected'] as $expectedKey => $expectedValue):
|
||||
$colour = 'red';
|
||||
foreach ($file['files'] as $f) if ($f['filename'] == $expectedValue) $colour = 'green';
|
||||
?>
|
||||
<li><b><?php echo h($expectedKey); ?></b>: <span style="color:<?php echo $colour; ?>"><?php echo h($expectedValue); ?></span></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
<table class="table table-striped table-hover table-condensed" style="width:600px;">
|
||||
<tr>
|
||||
<th><?php echo __('Filename');?></th>
|
||||
<th><?php echo __('Used by');?></th>
|
||||
<th><?php echo __('Size');?></th>
|
||||
<th><?php echo __('Permissions');?></th>
|
||||
<th><?php echo __('Actions');?></th>
|
||||
</tr>
|
||||
<?php
|
||||
foreach ($file['files'] as $f):
|
||||
$permission = "";
|
||||
if ($f['read']) $permission .= "r";
|
||||
if ($f['write']) $permission .= "w";
|
||||
if ($f['execute']) $permission .= "x";
|
||||
$sizeUnit = "B";
|
||||
if (($f['filesize'] / 1024) > 1) {
|
||||
$f['filesize'] = $f['filesize'] / 1024;
|
||||
$sizeUnit = "KB";
|
||||
if (($f['filesize'] / 1024) > 1) {
|
||||
$f['filesize'] = $f['filesize'] / 1024;
|
||||
$sizeUnit = "MB";
|
||||
}
|
||||
$f['filesize'] = round($f['filesize'], 1);
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo h($f['filename']);?></td>
|
||||
<td width="150px;">
|
||||
<?php
|
||||
if ($k != 'orgs'):
|
||||
foreach ($file['expected'] as $ek => $ev):
|
||||
if ($f['filename'] == $ev) echo h($ek) . "<br />";
|
||||
endforeach;
|
||||
else:
|
||||
echo __('N/A');
|
||||
endif;
|
||||
?>
|
||||
</td>
|
||||
<td width="75px;">
|
||||
<?php echo h($f['filesize']) . ' ' . $sizeUnit;?>
|
||||
</td>
|
||||
<td class="short">
|
||||
<?php echo $permission;?>
|
||||
</td>
|
||||
<td class="short">
|
||||
<?php
|
||||
echo $this->Form->postLink('', array('controller' => 'servers', 'action' => 'deleteFile' , $k , $f['filename']), array('class' => 'icon-trash', 'title' => __('Delete')), __('Are you sure you want to delete %s?', $f['filename']));
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
</table>
|
||||
<?php
|
||||
echo $this->Form->create('Server', array('type' => 'file', 'url' => '/servers/uploadFile/' . $k));?>
|
||||
<fieldset>
|
||||
<?php
|
||||
echo $this->Form->hidden('event_id');
|
||||
echo $this->Form->file('file', array(
|
||||
'error' => array('escape' => false),
|
||||
));
|
||||
?>
|
||||
</fieldset>
|
||||
<?php
|
||||
echo $this->Form->button('Upload', array('class' => 'btn btn-primary'));
|
||||
echo $this->Form->end();
|
||||
endforeach;
|
||||
?>
|
||||
<p><?php echo __('Below you will find a list of the uploaded files based on type.');?></p>
|
||||
<?php
|
||||
foreach ($files as $k => $file):
|
||||
?>
|
||||
<h3><?php echo h($file['name']); ?></h3>
|
||||
<div>
|
||||
<b><?php echo __('Description');?></b>: <?php echo $file['description']; ?><br />
|
||||
<b><?php echo __('Expected Format');?></b>: <?php echo h($file['valid_format']);?><br />
|
||||
<b><?php echo __('Path');?></b>: <?php echo h($file['path']);?><br />
|
||||
<?php
|
||||
if (!empty($file['expected'])):
|
||||
?>
|
||||
<b><?php echo __('Files set for each relevant setting');?>:</b>:<br />
|
||||
<ul>
|
||||
<?php foreach ($file['expected'] as $expectedKey => $expectedValue):
|
||||
$colour = 'red';
|
||||
foreach ($file['files'] as $f) if ($f['filename'] == $expectedValue) $colour = 'green';
|
||||
?>
|
||||
<li><b><?php echo h($expectedKey); ?></b>: <span style="color:<?php echo $colour; ?>"><?php echo h($expectedValue); ?></span></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
<table class="table table-striped table-hover table-condensed" style="width:600px;">
|
||||
<tr>
|
||||
<th><?php echo __('Filename');?></th>
|
||||
<th><?php echo __('Used by');?></th>
|
||||
<th><?php echo __('Size');?></th>
|
||||
<th><?php echo __('Permissions');?></th>
|
||||
<th><?php echo __('Actions');?></th>
|
||||
</tr>
|
||||
<?php
|
||||
foreach ($file['files'] as $f):
|
||||
$permission = "";
|
||||
if ($f['read']) $permission .= "r";
|
||||
if ($f['write']) $permission .= "w";
|
||||
if ($f['execute']) $permission .= "x";
|
||||
$sizeUnit = "B";
|
||||
if (($f['filesize'] / 1024) > 1) {
|
||||
$f['filesize'] = $f['filesize'] / 1024;
|
||||
$sizeUnit = "KB";
|
||||
if (($f['filesize'] / 1024) > 1) {
|
||||
$f['filesize'] = $f['filesize'] / 1024;
|
||||
$sizeUnit = "MB";
|
||||
}
|
||||
$f['filesize'] = round($f['filesize'], 1);
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo h($f['filename']);?></td>
|
||||
<td width="150px;">
|
||||
<?php
|
||||
if ($k != 'orgs'):
|
||||
foreach ($file['expected'] as $ek => $ev):
|
||||
if ($f['filename'] == $ev) echo h($ek) . "<br />";
|
||||
endforeach;
|
||||
else:
|
||||
echo __('N/A');
|
||||
endif;
|
||||
?>
|
||||
</td>
|
||||
<td width="75px;">
|
||||
<?php echo h($f['filesize']) . ' ' . $sizeUnit;?>
|
||||
</td>
|
||||
<td class="short">
|
||||
<?php echo $permission;?>
|
||||
</td>
|
||||
<td class="short">
|
||||
<?php
|
||||
echo $this->Form->postLink('', array('controller' => 'servers', 'action' => 'deleteFile' , $k , $f['filename']), array('class' => 'icon-trash', 'title' => __('Delete')), __('Are you sure you want to delete %s?', $f['filename']));
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
</table>
|
||||
<?php
|
||||
echo $this->Form->create('Server', array('type' => 'file', 'url' => '/servers/uploadFile/' . $k));?>
|
||||
<fieldset>
|
||||
<?php
|
||||
echo $this->Form->hidden('event_id');
|
||||
echo $this->Form->file('file', array(
|
||||
'error' => array('escape' => false),
|
||||
));
|
||||
?>
|
||||
</fieldset>
|
||||
<?php
|
||||
echo $this->Form->button('Upload', array('class' => 'btn btn-primary'));
|
||||
echo $this->Form->end();
|
||||
endforeach;
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -1,37 +1,37 @@
|
|||
<table id="server-settings-container" class="table table-hover table-condensed" style="border:1px solid #dddddd; margin-top:1px; width:100%; padding:10px">
|
||||
<tr>
|
||||
<th>Test</th>
|
||||
<th>Value</th>
|
||||
<th>Description</th>
|
||||
<th>Test</th>
|
||||
<th>Value</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
<?php
|
||||
$health = array(0 => __('Critical, your MISP instance requires immediate attention.'), 1 => __('Issues found, it is recommended that you resolve them.'), 2 => __('Good, but there are some optional settings that are incorrect / not set.'), 3 => __('In perfect health.'));
|
||||
$colour = '';
|
||||
if ($diagnostic_errors > 0) $issues['overallHealth'] = 0;
|
||||
if ($issues['overallHealth'] < 3) $colour = 'background-color:' . $priorityErrorColours[$issues['overallHealth']] . ';';
|
||||
if ($issues['overallHealth'] == 0 || $issues['overallHealth'] == 2) $colour .= 'color:white;';
|
||||
$health = array(0 => __('Critical, your MISP instance requires immediate attention.'), 1 => __('Issues found, it is recommended that you resolve them.'), 2 => __('Good, but there are some optional settings that are incorrect / not set.'), 3 => __('In perfect health.'));
|
||||
$colour = '';
|
||||
if ($diagnostic_errors > 0) $issues['overallHealth'] = 0;
|
||||
if ($issues['overallHealth'] < 3) $colour = 'background-color:' . $priorityErrorColours[$issues['overallHealth']] . ';';
|
||||
if ($issues['overallHealth'] == 0 || $issues['overallHealth'] == 2) $colour .= 'color:white;';
|
||||
?>
|
||||
<tr>
|
||||
<td style="<?php echo $colour;?>"><?php echo __('Overall health');?></td>
|
||||
<td style="<?php echo $colour;?>"><?php echo h($health[$issues['overallHealth']]);?></td>
|
||||
<td style="<?php echo $colour;?>"><?php echo __('The overall health of your instance depends on the most severe unresolved issues.');?></td>
|
||||
<td style="<?php echo $colour;?>"><?php echo __('Overall health');?></td>
|
||||
<td style="<?php echo $colour;?>"><?php echo h($health[$issues['overallHealth']]);?></td>
|
||||
<td style="<?php echo $colour;?>"><?php echo __('The overall health of your instance depends on the most severe unresolved issues.');?></td>
|
||||
</tr>
|
||||
<?php
|
||||
foreach ($issues['errors'] as $k => $v):
|
||||
$colour = '';
|
||||
if ($k < 3 && $v['value'] > 0) $colour = 'background-color:' . $priorityErrorColours[$k] . ';';
|
||||
if (($k == 0 || $k == 2) && $v['value'] > 0) $colour .= 'color:white;';
|
||||
foreach ($issues['errors'] as $k => $v):
|
||||
$colour = '';
|
||||
if ($k < 3 && $v['value'] > 0) $colour = 'background-color:' . $priorityErrorColours[$k] . ';';
|
||||
if (($k == 0 || $k == 2) && $v['value'] > 0) $colour .= 'color:white;';
|
||||
?>
|
||||
<tr>
|
||||
<td style="<?php echo $colour; ?>"><?php echo h($priorities[$k]) . __(' settings incorrectly or not set');?></td>
|
||||
<td style="<?php echo $colour; ?>"><?php echo h($v['value']);?><?php echo __(' incorrect settings.');?></td>
|
||||
<td style="<?php echo $colour; ?>"><?php echo h($v['description']);?></td>
|
||||
<td style="<?php echo $colour; ?>"><?php echo h($priorities[$k]) . __(' settings incorrectly or not set');?></td>
|
||||
<td style="<?php echo $colour; ?>"><?php echo h($v['value']);?><?php echo __(' incorrect settings.');?></td>
|
||||
<td style="<?php echo $colour; ?>"><?php echo h($v['description']);?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<tr>
|
||||
<?php $colour = ($diagnostic_errors > 0 ? 'background-color:red;color:white;' : '');?>
|
||||
<td style="<?php echo $colour; ?>"><?php echo __('Critical issues revealed by the diagnostics');?></td>
|
||||
<td style="<?php echo $colour; ?>"><?php echo h($diagnostic_errors);?><?php echo __(' issues detected.');?></td>
|
||||
<td style="<?php echo $colour; ?>"><?php echo __('Issues revealed here can be due to incorrect directory permissions or not correctly installed dependencies.');?></td>
|
||||
<?php $colour = ($diagnostic_errors > 0 ? 'background-color:red;color:white;' : '');?>
|
||||
<td style="<?php echo $colour; ?>"><?php echo __('Critical issues revealed by the diagnostics');?></td>
|
||||
<td style="<?php echo $colour; ?>"><?php echo h($diagnostic_errors);?><?php echo __(' issues detected.');?></td>
|
||||
<td style="<?php echo $colour; ?>"><?php echo __('Issues revealed here can be due to incorrect directory permissions or not correctly installed dependencies.');?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
<?php
|
||||
$bgColour = '';
|
||||
if (isset($setting['error']) && $setting['level'] < 3) {
|
||||
$bgColour = 'background-color:' . $priorityErrorColours[$setting['level']] . ';';
|
||||
if ($setting['level'] == 0 || $setting['level'] == 2) $bgColour .= 'color:white;';
|
||||
}
|
||||
if ($setting['level'] == 3) $bgColour = 'background-color:gray;color:white;';
|
||||
if ($setting['type'] == 'boolean') $setting['value'] = ($setting['value'] === true ? 'true' : 'false');
|
||||
if (isset($setting['options'])) $setting['value'] = $setting['options'][$setting['value']];
|
||||
$bgColour = '';
|
||||
if (isset($setting['error']) && $setting['level'] < 3) {
|
||||
$bgColour = 'background-color:' . $priorityErrorColours[$setting['level']] . ';';
|
||||
if ($setting['level'] == 0 || $setting['level'] == 2) $bgColour .= 'color:white;';
|
||||
}
|
||||
if ($setting['level'] == 3) $bgColour = 'background-color:gray;color:white;';
|
||||
if ($setting['type'] == 'boolean') $setting['value'] = ($setting['value'] === true ? 'true' : 'false');
|
||||
if (isset($setting['options'])) $setting['value'] = $setting['options'][$setting['value']];
|
||||
?>
|
||||
<tr id ="<?php echo h("${subGroup}_$k"); ?>_row" class="subGroup_<?php echo h($subGroup);?>">
|
||||
<?php
|
||||
if (!empty($setting['redacted'])) {
|
||||
$setting['value'] = '*****';
|
||||
}
|
||||
?>
|
||||
<td class="short" style="<?php echo $bgColour; ?>"><?php echo h($priorities[$setting['level']]);?></td>
|
||||
<td class="short" style="<?php echo $bgColour; ?>"><?php echo h($setting['setting']);?></td>
|
||||
<?php if ((isset($setting['editable']) && !$setting['editable']) || $setting['level'] == 3): ?>
|
||||
<td id="setting_<?php echo h("${subGroup}_$k"); ?>_passive" class="inline-field-solid" style="<?php echo $bgColour; ?>width:500px;"><?php echo nl2br(h($setting['value']));?></td>
|
||||
<?php else: ?>
|
||||
<td id="setting_<?php echo h("${subGroup}_$k"); ?>_solid" class="inline-field-solid" ondblclick="serverSettingsActivateField('<?php echo $setting['setting'];?>', '<?php echo $k;?>')" style="<?php echo $bgColour; ?>width:500px;"><?php echo h($setting['value']);?></td>
|
||||
<td id="setting_<?php echo h("${subGroup}_$k"); ?>_placeholder" class="short hidden inline-field-placeholder" style="<?php echo $bgColour; ?>width:500px;"></td>
|
||||
<?php endif; ?>
|
||||
<td style="<?php echo $bgColour; ?>"><?php echo h($setting['description']);?></td>
|
||||
<td class="short" style="<?php echo $bgColour; ?>"><?php if (isset($setting['error']) && $setting['level'] != 3) echo h($setting['errorMessage']); ?></td>
|
||||
<?php
|
||||
if (!empty($setting['redacted'])) {
|
||||
$setting['value'] = '*****';
|
||||
}
|
||||
?>
|
||||
<td class="short" style="<?php echo $bgColour; ?>"><?php echo h($priorities[$setting['level']]);?></td>
|
||||
<td class="short" style="<?php echo $bgColour; ?>"><?php echo h($setting['setting']);?></td>
|
||||
<?php if ((isset($setting['editable']) && !$setting['editable']) || $setting['level'] == 3): ?>
|
||||
<td id="setting_<?php echo h("${subGroup}_$k"); ?>_passive" class="inline-field-solid" style="<?php echo $bgColour; ?>width:500px;"><?php echo nl2br(h($setting['value']));?></td>
|
||||
<?php else: ?>
|
||||
<td id="setting_<?php echo h("${subGroup}_$k"); ?>_solid" class="inline-field-solid" ondblclick="serverSettingsActivateField('<?php echo $setting['setting'];?>', '<?php echo $k;?>')" style="<?php echo $bgColour; ?>width:500px;"><?php echo h($setting['value']);?></td>
|
||||
<td id="setting_<?php echo h("${subGroup}_$k"); ?>_placeholder" class="short hidden inline-field-placeholder" style="<?php echo $bgColour; ?>width:500px;"></td>
|
||||
<?php endif; ?>
|
||||
<td style="<?php echo $bgColour; ?>"><?php echo h($setting['description']);?></td>
|
||||
<td class="short" style="<?php echo $bgColour; ?>"><?php if (isset($setting['error']) && $setting['level'] != 3) echo h($setting['errorMessage']); ?></td>
|
||||
</tr>
|
||||
|
|
|
@ -1,66 +1,66 @@
|
|||
<div class="settingsTableContainerOutline">
|
||||
<?php
|
||||
foreach ($finalSettings as $subGroup => &$settings):
|
||||
foreach ($finalSettings as $subGroup => &$settings):
|
||||
?>
|
||||
<div>
|
||||
<table class="table table-hover table-condensed settingsTableContainer">
|
||||
<?php if ($subGroup != 'general'): ?>
|
||||
<tr>
|
||||
<th class="useCursorPointer" role="button" tabindex="0" aria-label="Toggle subgroup <?php echo h($subGroup); ?>" title="<?php echo __('Toggle subgroup'); ?>" style="border-right: 1px solid #dddddd;color: #0088cc;" onClick="toggleSettingSubGroup('<?php echo h($subGroup);?>')"><?php echo h($subGroup);?></th>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr class="subGroup_<?php echo h($subGroup);?> hidden">
|
||||
<th><?php echo __('Priority'); ?></th>
|
||||
<th><?php echo __('Setting'); ?></th>
|
||||
<th><?php echo __('Value'); ?></th>
|
||||
<th><?php echo __('Description'); ?></th>
|
||||
<th><?php echo __('Error Message'); ?></th>
|
||||
</tr>
|
||||
<?php
|
||||
foreach ($settings as $k => $setting):
|
||||
$bgColour = '';
|
||||
if (isset($setting['error']) && $setting['level'] < 3) {
|
||||
$bgColour = 'background-color:' . $priorityErrorColours[$setting['level']] . ';';
|
||||
if ($setting['level'] == 0 || $setting['level'] == 2) $bgColour .= 'color:white;';
|
||||
}
|
||||
if ($setting['level'] == 3) $bgColour = 'background-color:gray;color:white;';
|
||||
if ($setting['type'] == 'boolean') $setting['value'] = ($setting['value'] === true ? 'true' : 'false');;
|
||||
if (isset($setting['options'])) {
|
||||
$setting['value'] = $setting['options'][$setting['value']];
|
||||
}
|
||||
if ($setting['setting'] == 'Security.salt' && !isset($setting['error'])) {
|
||||
continue;
|
||||
}
|
||||
if (!empty($setting['redacted'])) {
|
||||
$setting['value'] = '*****';
|
||||
}
|
||||
?>
|
||||
<tr id ="<?php echo h($subGroup) . '_' . $k; ?>_row" class="subGroup_<?php echo h($subGroup);?> hidden">
|
||||
<td class="short" style="<?php echo $bgColour; ?>"><?php echo h($priorities[$setting['level']]);?></td>
|
||||
<td class="short" style="<?php echo $bgColour; ?>"><?php echo h($setting['setting']);?></td>
|
||||
<?php if ((isset($setting['editable']) && !$setting['editable']) || $setting['level'] == 3): ?>
|
||||
<td id="setting_<?php echo h($subGroup) . '_' . $k; ?>_passive" class="inline-field-solid" style="<?php echo $bgColour; ?>width:500px;"><?php echo nl2br(h($setting['value']));?></td>
|
||||
<?php else: ?>
|
||||
<td id="setting_<?php echo h($subGroup) . '_' . $k; ?>_solid" class="inline-field-solid" ondblclick="serverSettingsActivateField('<?php echo $setting['setting'];?>', '<?php echo $k;?>')" style="<?php echo $bgColour; ?>width:500px;">
|
||||
<?php echo h($setting['value']); ?>
|
||||
</td>
|
||||
<td id="setting_<?php echo h($subGroup) . '_' . $k; ?>_placeholder" class="short hidden inline-field-placeholder" style="<?php echo $bgColour; ?>width:500px;"></td>
|
||||
<?php endif; ?>
|
||||
<td style="<?php echo $bgColour; ?>"><?php echo h($setting['description']);?></td>
|
||||
<td style="<?php echo $bgColour; ?>"><?php if (isset($setting['error']) && $setting['level'] != 3) echo h($setting['errorMessage']); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
</table>
|
||||
<div class="subGroup_<?php echo h($subGroup);?> hidden" style="margin-bottom:30px;"></div>
|
||||
</div>
|
||||
<div>
|
||||
<table class="table table-hover table-condensed settingsTableContainer">
|
||||
<?php if ($subGroup != 'general'): ?>
|
||||
<tr>
|
||||
<th class="useCursorPointer" role="button" tabindex="0" aria-label="Toggle subgroup <?php echo h($subGroup); ?>" title="<?php echo __('Toggle subgroup'); ?>" style="border-right: 1px solid #dddddd;color: #0088cc;" onClick="toggleSettingSubGroup('<?php echo h($subGroup);?>')"><?php echo h($subGroup);?></th>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr class="subGroup_<?php echo h($subGroup);?> hidden">
|
||||
<th><?php echo __('Priority'); ?></th>
|
||||
<th><?php echo __('Setting'); ?></th>
|
||||
<th><?php echo __('Value'); ?></th>
|
||||
<th><?php echo __('Description'); ?></th>
|
||||
<th><?php echo __('Error Message'); ?></th>
|
||||
</tr>
|
||||
<?php
|
||||
foreach ($settings as $k => $setting):
|
||||
$bgColour = '';
|
||||
if (isset($setting['error']) && $setting['level'] < 3) {
|
||||
$bgColour = 'background-color:' . $priorityErrorColours[$setting['level']] . ';';
|
||||
if ($setting['level'] == 0 || $setting['level'] == 2) $bgColour .= 'color:white;';
|
||||
}
|
||||
if ($setting['level'] == 3) $bgColour = 'background-color:gray;color:white;';
|
||||
if ($setting['type'] == 'boolean') $setting['value'] = ($setting['value'] === true ? 'true' : 'false');;
|
||||
if (isset($setting['options'])) {
|
||||
$setting['value'] = $setting['options'][$setting['value']];
|
||||
}
|
||||
if ($setting['setting'] == 'Security.salt' && !isset($setting['error'])) {
|
||||
continue;
|
||||
}
|
||||
if (!empty($setting['redacted'])) {
|
||||
$setting['value'] = '*****';
|
||||
}
|
||||
?>
|
||||
<tr id ="<?php echo h($subGroup) . '_' . $k; ?>_row" class="subGroup_<?php echo h($subGroup);?> hidden">
|
||||
<td class="short" style="<?php echo $bgColour; ?>"><?php echo h($priorities[$setting['level']]);?></td>
|
||||
<td class="short" style="<?php echo $bgColour; ?>"><?php echo h($setting['setting']);?></td>
|
||||
<?php if ((isset($setting['editable']) && !$setting['editable']) || $setting['level'] == 3): ?>
|
||||
<td id="setting_<?php echo h($subGroup) . '_' . $k; ?>_passive" class="inline-field-solid" style="<?php echo $bgColour; ?>width:500px;"><?php echo nl2br(h($setting['value']));?></td>
|
||||
<?php else: ?>
|
||||
<td id="setting_<?php echo h($subGroup) . '_' . $k; ?>_solid" class="inline-field-solid" ondblclick="serverSettingsActivateField('<?php echo $setting['setting'];?>', '<?php echo $k;?>')" style="<?php echo $bgColour; ?>width:500px;">
|
||||
<?php echo h($setting['value']); ?>
|
||||
</td>
|
||||
<td id="setting_<?php echo h($subGroup) . '_' . $k; ?>_placeholder" class="short hidden inline-field-placeholder" style="<?php echo $bgColour; ?>width:500px;"></td>
|
||||
<?php endif; ?>
|
||||
<td style="<?php echo $bgColour; ?>"><?php echo h($setting['description']);?></td>
|
||||
<td style="<?php echo $bgColour; ?>"><?php if (isset($setting['error']) && $setting['level'] != 3) echo h($setting['errorMessage']); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
</table>
|
||||
<div class="subGroup_<?php echo h($subGroup);?> hidden" style="margin-bottom:30px;"></div>
|
||||
</div>
|
||||
<?php
|
||||
endforeach;
|
||||
endforeach;
|
||||
?>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('.subGroup_general').show();
|
||||
});
|
||||
$(document).ready(function() {
|
||||
$('.subGroup_general').show();
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1,50 +1,50 @@
|
|||
<div class="tabMenuFixedContainer">
|
||||
<span class="tabMenuFixed tabMenuFixedLeft tabMenuSides">
|
||||
<a href="<?php echo $baseurl;?>/servers/serverSettings/" id="create-button" title="<?php echo __('Modify filters');?>" class="discrete"><?php echo __('Overview'); ?></a>
|
||||
</span>
|
||||
<span class="tabMenuFixed tabMenuFixedLeft tabMenuSides">
|
||||
<a href="<?php echo $baseurl;?>/servers/serverSettings/" id="create-button" title="<?php echo __('Modify filters');?>" class="discrete"><?php echo __('Overview'); ?></a>
|
||||
</span>
|
||||
<?php
|
||||
$i = 0;
|
||||
foreach ($tabs as $k => $tab):
|
||||
$extra = '';
|
||||
if ($i == (count($tabs) -1)) $extra = "tabMenuFixedRight";
|
||||
$label = ucfirst($k) . ' settings';
|
||||
$severity = '';
|
||||
if ($tab['severity'] == 0) $severity = 'style="color:red;"';
|
||||
$i = 0;
|
||||
foreach ($tabs as $k => $tab):
|
||||
$extra = '';
|
||||
if ($i == (count($tabs) -1)) $extra = "tabMenuFixedRight";
|
||||
$label = ucfirst($k) . ' settings';
|
||||
$severity = '';
|
||||
if ($tab['severity'] == 0) $severity = 'style="color:red;"';
|
||||
?>
|
||||
<span class="tabMenuFixed tabMenuFixedLeft <?php echo h($extra); ?> tabMenuSides">
|
||||
<a href="<?php echo $baseurl."/servers/serverSettings/".h($k); ?>" id="create-button" title="<?php echo __('Modify filters');?>" class="discrete">
|
||||
<?php
|
||||
echo h($label);
|
||||
if ($tab['errors'] > 0) echo '<span ' . $severity . '> (' . $tab['errors'] . ')</span>';
|
||||
?>
|
||||
</a>
|
||||
</span>
|
||||
<span class="tabMenuFixed tabMenuFixedLeft <?php echo h($extra); ?> tabMenuSides">
|
||||
<a href="<?php echo $baseurl."/servers/serverSettings/".h($k); ?>" id="create-button" title="<?php echo __('Modify filters');?>" class="discrete">
|
||||
<?php
|
||||
echo h($label);
|
||||
if ($tab['errors'] > 0) echo '<span ' . $severity . '> (' . $tab['errors'] . ')</span>';
|
||||
?>
|
||||
</a>
|
||||
</span>
|
||||
<?php
|
||||
$i++;
|
||||
endforeach;
|
||||
$i++;
|
||||
endforeach;
|
||||
?>
|
||||
<span class="tabMenuFixed tabMenuFixedCenter tabMenuSides" style="margin-left:50px;">
|
||||
<a href="<?php echo $baseurl;?>/servers/serverSettings/diagnostics" id="create-button" title="<?php echo __('Modify filters'); ?>" class="discrete">
|
||||
<?php echo __('Diagnostics'); ?>
|
||||
<?php
|
||||
if ($diagnostic_errors > 0) echo '<span style="color:red;"> (' . $diagnostic_errors . ')</span>';
|
||||
?>
|
||||
</a>
|
||||
</span>
|
||||
<?php if (!empty($worker_array)): ?>
|
||||
<span class="tabMenuFixed tabMenuFixedCenter tabMenuSides" style="margin-left:10px;">
|
||||
<a href="<?php echo $baseurl;?>/servers/serverSettings/workers" id="create-button" title="<?php echo __('Modify filters'); ?>" class="discrete">
|
||||
<?php echo __('Workers'); ?>
|
||||
<?php
|
||||
if ($workerIssueCount > 0) echo '<span style="color:red;"> (' . $workerIssueCount . ')</span>';
|
||||
?>
|
||||
</a>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<span class="tabMenuFixed tabMenuFixedCenter tabMenuSides" style="margin-left:10px;">
|
||||
<a href="<?php echo $baseurl;?>/servers/serverSettings/files" id="download-button" title="<?php echo __('Manage files'); ?>" class="discrete"><?php echo __('Manage files'); ?></a>
|
||||
</span>
|
||||
<span class="tabMenuFixed tabMenuFixedCenter tabMenuSides" style="margin-left:10px;">
|
||||
<a href="<?php echo $baseurl;?>/servers/serverSettings/download" id="download-button" title="<?php echo __('Download report'); ?>" role="button" tabindex="0" aria-label="Download report" class="useCursorPointer discrete icon-download-alt"></a>
|
||||
</span>
|
||||
<span class="tabMenuFixed tabMenuFixedCenter tabMenuSides" style="margin-left:50px;">
|
||||
<a href="<?php echo $baseurl;?>/servers/serverSettings/diagnostics" id="create-button" title="<?php echo __('Modify filters'); ?>" class="discrete">
|
||||
<?php echo __('Diagnostics'); ?>
|
||||
<?php
|
||||
if ($diagnostic_errors > 0) echo '<span style="color:red;"> (' . $diagnostic_errors . ')</span>';
|
||||
?>
|
||||
</a>
|
||||
</span>
|
||||
<?php if (!empty($worker_array)): ?>
|
||||
<span class="tabMenuFixed tabMenuFixedCenter tabMenuSides" style="margin-left:10px;">
|
||||
<a href="<?php echo $baseurl;?>/servers/serverSettings/workers" id="create-button" title="<?php echo __('Modify filters'); ?>" class="discrete">
|
||||
<?php echo __('Workers'); ?>
|
||||
<?php
|
||||
if ($workerIssueCount > 0) echo '<span style="color:red;"> (' . $workerIssueCount . ')</span>';
|
||||
?>
|
||||
</a>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<span class="tabMenuFixed tabMenuFixedCenter tabMenuSides" style="margin-left:10px;">
|
||||
<a href="<?php echo $baseurl;?>/servers/serverSettings/files" id="download-button" title="<?php echo __('Manage files'); ?>" class="discrete"><?php echo __('Manage files'); ?></a>
|
||||
</span>
|
||||
<span class="tabMenuFixed tabMenuFixedCenter tabMenuSides" style="margin-left:10px;">
|
||||
<a href="<?php echo $baseurl;?>/servers/serverSettings/download" id="download-button" title="<?php echo __('Download report'); ?>" role="button" tabindex="0" aria-label="Download report" class="useCursorPointer discrete icon-download-alt"></a>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -1,117 +1,117 @@
|
|||
<div style="border:1px solid #dddddd; margin-top:1px; width:100%; padding:10px">
|
||||
<?php
|
||||
if (!$worker_array['proc_accessible']):
|
||||
?>
|
||||
<div style="background-color:red !important;color:white;"><b><?php echo __('Warning');?></b>: <?php echo __('MISP cannot access your /proc directory to check the status of the worker processes, which means that dead workers will not be detected by the diagnostic tool. If you would like to regain this functionality, make sure that the open_basedir directive is not set, or that /proc is included in it.');?></div>
|
||||
<?php
|
||||
endif;
|
||||
foreach ($worker_array as $type => $data):
|
||||
if ($type == 'proc_accessible') continue;
|
||||
$queueStatusMessage = __("Issues prevent jobs from being processed. Please resolve them below.");
|
||||
$queueStatus = false;
|
||||
if ($data['ok']) {
|
||||
if (!$worker_array['proc_accessible']) {
|
||||
$queueStatus = 'N/A';
|
||||
$queueStatusMessage = __("Worker started with the correct user, but the current status is unknown.");
|
||||
} else {
|
||||
$queueStatus = true;
|
||||
$queueStatusMessage = __("OK");
|
||||
}
|
||||
} else if (!empty($data['workers'])) {
|
||||
foreach ($data['workers'] as $worker) {
|
||||
if ($worker['alive']) {
|
||||
$queueStatus = true;
|
||||
$queueStatusMessage = __("There are issues with the worker(s), but at least one healthy worker is monitoring the queue.");
|
||||
}
|
||||
}
|
||||
}
|
||||
<?php
|
||||
if (!$worker_array['proc_accessible']):
|
||||
?>
|
||||
<div style="background-color:red !important;color:white;"><b><?php echo __('Warning');?></b>: <?php echo __('MISP cannot access your /proc directory to check the status of the worker processes, which means that dead workers will not be detected by the diagnostic tool. If you would like to regain this functionality, make sure that the open_basedir directive is not set, or that /proc is included in it.');?></div>
|
||||
<?php
|
||||
endif;
|
||||
foreach ($worker_array as $type => $data):
|
||||
if ($type == 'proc_accessible') continue;
|
||||
$queueStatusMessage = __("Issues prevent jobs from being processed. Please resolve them below.");
|
||||
$queueStatus = false;
|
||||
if ($data['ok']) {
|
||||
if (!$worker_array['proc_accessible']) {
|
||||
$queueStatus = 'N/A';
|
||||
$queueStatusMessage = __("Worker started with the correct user, but the current status is unknown.");
|
||||
} else {
|
||||
$queueStatus = true;
|
||||
$queueStatusMessage = __("OK");
|
||||
}
|
||||
} else if (!empty($data['workers'])) {
|
||||
foreach ($data['workers'] as $worker) {
|
||||
if ($worker['alive']) {
|
||||
$queueStatus = true;
|
||||
$queueStatusMessage = __("There are issues with the worker(s), but at least one healthy worker is monitoring the queue.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<h3><?php echo __('Worker type: ') . h($type);?></h3>
|
||||
<?php if ($type !== 'scheduler'): ?>
|
||||
<span><b><?php echo __('Jobs in the queue: ');?></b>
|
||||
<?php
|
||||
echo h($data['jobCount']);
|
||||
if ($data['jobCount'] > 0) {
|
||||
echo $this->Form->postLink('<span class="icon-trash useCursorPointer"></span>', $baseurl . '/servers/clearWorkerQueue/' . h($type), array('escape' => false, 'inline' => true, 'style' => 'margin-left:2px;'));
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
<p><b><?php echo __('Queue status: ');?></b>
|
||||
<?php
|
||||
$color = "green";
|
||||
if ($queueStatus === 'N/A') $color = "orange";
|
||||
if ($queueStatus === false) $color = "red";
|
||||
echo '<span class="' . $color . '">' . $queueStatusMessage . '</span>';
|
||||
?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<table class="table table-hover table-condensed" style="border:1px solid #dddddd; margin-top:1px; width:100%; padding:10px">
|
||||
<tr>
|
||||
<th><?php echo __('Worker PID');?></th>
|
||||
<th><?php echo __('User');?></th>
|
||||
<th><?php echo __('Worker process');?></th>
|
||||
<th><?php echo __('Information');?></th>
|
||||
<th><?php echo __('Actions');?></th>
|
||||
</tr>
|
||||
<?php
|
||||
if (empty($data['workers'])):
|
||||
?>
|
||||
<tr>
|
||||
<td class="shortish" style="background-color:red; color:white;"><?php echo __('N/A');?></td>
|
||||
<td class="short" style="background-color:red; color:white;"><?php echo __('N/A');?></td>
|
||||
<td style="background-color:red; color:white;"><?php echo __('N/A');?></td>
|
||||
<td style="background-color:red; color:white;"><?php echo __('Worker not running!');?></td>
|
||||
<td style="background-color:red; color:white;"> </td>
|
||||
</tr>
|
||||
<?php
|
||||
else:
|
||||
foreach ($data['workers'] as $worker):
|
||||
$style = "color:green;";
|
||||
$process = __('OK');
|
||||
$message = __('The worker appears to be healthy.');
|
||||
$icon_modifier = '';
|
||||
if (!$worker['correct_user']) {
|
||||
$message = __('The worker was started with a user other than the apache user. MISP cannot check whether the worker is alive or not.');
|
||||
$style = "color:white;background-color:red;";
|
||||
$icon_modifier = ' icon-white';
|
||||
$process = __('Unknown');
|
||||
} else if ($worker['alive'] === 'N/A') {
|
||||
$process = __('Unknown');
|
||||
$message = __('Cannot check whether the worker is alive or dead.');
|
||||
$style = "color:white;background-color:orange;";
|
||||
$icon_modifier = ' icon-white';
|
||||
} else if (!$worker['alive']) {
|
||||
$process = __('Dead');
|
||||
$message = __('The Worker appears to be dead.');
|
||||
$style = "color:white;background-color:red;";
|
||||
$icon_modifier = ' icon-white';
|
||||
}
|
||||
?>
|
||||
<h3><?php echo __('Worker type: ') . h($type);?></h3>
|
||||
<?php if ($type !== 'scheduler'): ?>
|
||||
<span><b><?php echo __('Jobs in the queue: ');?></b>
|
||||
<?php
|
||||
echo h($data['jobCount']);
|
||||
if ($data['jobCount'] > 0) {
|
||||
echo $this->Form->postLink('<span class="icon-trash useCursorPointer"></span>', $baseurl . '/servers/clearWorkerQueue/' . h($type), array('escape' => false, 'inline' => true, 'style' => 'margin-left:2px;'));
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
<p><b><?php echo __('Queue status: ');?></b>
|
||||
<?php
|
||||
$color = "green";
|
||||
if ($queueStatus === 'N/A') $color = "orange";
|
||||
if ($queueStatus === false) $color = "red";
|
||||
echo '<span class="' . $color . '">' . $queueStatusMessage . '</span>';
|
||||
?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<table class="table table-hover table-condensed" style="border:1px solid #dddddd; margin-top:1px; width:100%; padding:10px">
|
||||
<tr>
|
||||
<th><?php echo __('Worker PID');?></th>
|
||||
<th><?php echo __('User');?></th>
|
||||
<th><?php echo __('Worker process');?></th>
|
||||
<th><?php echo __('Information');?></th>
|
||||
<th><?php echo __('Actions');?></th>
|
||||
</tr>
|
||||
<?php
|
||||
if (empty($data['workers'])):
|
||||
?>
|
||||
<tr>
|
||||
<td class="shortish" style="background-color:red; color:white;"><?php echo __('N/A');?></td>
|
||||
<td class="short" style="background-color:red; color:white;"><?php echo __('N/A');?></td>
|
||||
<td style="background-color:red; color:white;"><?php echo __('N/A');?></td>
|
||||
<td style="background-color:red; color:white;"><?php echo __('Worker not running!');?></td>
|
||||
<td style="background-color:red; color:white;"> </td>
|
||||
</tr>
|
||||
<?php
|
||||
else:
|
||||
foreach ($data['workers'] as $worker):
|
||||
$style = "color:green;";
|
||||
$process = __('OK');
|
||||
$message = __('The worker appears to be healthy.');
|
||||
$icon_modifier = '';
|
||||
if (!$worker['correct_user']) {
|
||||
$message = __('The worker was started with a user other than the apache user. MISP cannot check whether the worker is alive or not.');
|
||||
$style = "color:white;background-color:red;";
|
||||
$icon_modifier = ' icon-white';
|
||||
$process = __('Unknown');
|
||||
} else if ($worker['alive'] === 'N/A') {
|
||||
$process = __('Unknown');
|
||||
$message = __('Cannot check whether the worker is alive or dead.');
|
||||
$style = "color:white;background-color:orange;";
|
||||
$icon_modifier = ' icon-white';
|
||||
} else if (!$worker['alive']) {
|
||||
$process = __('Dead');
|
||||
$message = __('The Worker appears to be dead.');
|
||||
$style = "color:white;background-color:red;";
|
||||
$icon_modifier = ' icon-white';
|
||||
}
|
||||
|
||||
$status = '<span style="color:green;">OK</span>';
|
||||
?>
|
||||
<tr>
|
||||
<td class="shortish" style="<?php echo $style; ?>"><?php echo h($worker['pid']);?></td>
|
||||
<td class="short" style="<?php echo $style; ?>"><?php echo h($worker['user']); ?></td>
|
||||
<td class="short" style="<?php echo $style; ?>"><?php echo $process; ?></td>
|
||||
<td style="<?php echo $style; ?>"><?php echo $message; ?></td>
|
||||
<td class="actions short" style="<?php echo $style; ?>">
|
||||
<?php
|
||||
echo $this->Form->postLink('', '/servers/stopWorker/' . h($worker['pid']), array('class' => 'icon-trash' . $icon_modifier, 'title' => __('Stop (if still running) and remove this worker. This will immediately terminate any jobs that are being executed by it.')));
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
endforeach;
|
||||
endif;
|
||||
?>
|
||||
</table>
|
||||
<?php
|
||||
echo $this->Form->create('Server', array('url' => '/servers/startWorker/' . h($type)));
|
||||
echo $this->Form->button(__('Start a worker'), array('class' => 'btn btn-inverse'));
|
||||
echo $this->Form->end();
|
||||
endforeach;
|
||||
?>
|
||||
$status = '<span style="color:green;">OK</span>';
|
||||
?>
|
||||
<tr>
|
||||
<td class="shortish" style="<?php echo $style; ?>"><?php echo h($worker['pid']);?></td>
|
||||
<td class="short" style="<?php echo $style; ?>"><?php echo h($worker['user']); ?></td>
|
||||
<td class="short" style="<?php echo $style; ?>"><?php echo $process; ?></td>
|
||||
<td style="<?php echo $style; ?>"><?php echo $message; ?></td>
|
||||
<td class="actions short" style="<?php echo $style; ?>">
|
||||
<?php
|
||||
echo $this->Form->postLink('', '/servers/stopWorker/' . h($worker['pid']), array('class' => 'icon-trash' . $icon_modifier, 'title' => __('Stop (if still running) and remove this worker. This will immediately terminate any jobs that are being executed by it.')));
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
endforeach;
|
||||
endif;
|
||||
?>
|
||||
</table>
|
||||
<?php
|
||||
echo $this->Form->create('Server', array('url' => '/servers/startWorker/' . h($type)));
|
||||
echo $this->Form->button(__('Start a worker'), array('class' => 'btn btn-inverse'));
|
||||
echo $this->Form->end();
|
||||
endforeach;
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,63 +1,63 @@
|
|||
<h2><?php echo __('Attribute Types Histogram');?></h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2"><h4 class="histogram-legendH4"><?php echo __('Attributes');?></h4> (<?php echo __('you can also choose specific histogram items by clicking on attributes below');?>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="attributehistogram-legend">
|
||||
<div class="attributehistogram-legend-line col">
|
||||
<?php
|
||||
$cnt = 0;
|
||||
foreach ($typeDb as $type => $colour):
|
||||
?>
|
||||
<div class="attributehistogram-legend-line">
|
||||
<div class="attributehistogram-legend-box" style="display: block;float: left;margin: 4px 6px 0 0;background-color:<?php echo $colour; ?>"> </div>
|
||||
<div style="display: inline-block;cursor: pointer;<?php if (in_array($type, $selectedTypes)) echo 'font-weight:bold';?>" role="button" tabindex="0" aria-label="<?php echo __('Toggle histogram');?>" tite="<?php echo __('Toggle histogram');?>" onClick='toggleHistogramType("<?php echo h($type); ?>", [<?php foreach ($selectedTypes as $t) echo '"' . $t . '", ' ?>]);'><?php echo h($type);?></div>
|
||||
</div>
|
||||
<?php
|
||||
if ($cnt % 12 == 11):
|
||||
?>
|
||||
</div>
|
||||
<div class="attributehistogram-legend-line col">
|
||||
<?php
|
||||
endif;
|
||||
$cnt++;
|
||||
endforeach;
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><h4 ><?php echo __('Attributes per organization');?></h4></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="attributehistogram-left-table">
|
||||
<table style="border-spacing:0px !important;">
|
||||
<?php
|
||||
end($data);
|
||||
$lastElement = key($data);
|
||||
foreach ($data as $k => $org):
|
||||
if ($k == 0) continue;
|
||||
?>
|
||||
<tr>
|
||||
<td style="text-align:right"><?php echo h($org['org_name']);?></td>
|
||||
<td <?php echo ($k == $lastElement ? 'class="attributehistogram-last"' : '');?> style="border-left:1px solid;padding-left:0px;width:500px;border-spacing:0px !important;">
|
||||
<ul style="width:<?php echo 600 * $org['total'] / $max;?>px;" class="attributehistogramBar">
|
||||
<?php
|
||||
foreach ($org['data'] as $orgType => $orgTypeCount):
|
||||
?>
|
||||
<li title="<?php echo h($orgType) . ' : ' . $orgTypeCount; ?>" class="type_<?php echo h($orgType); ?>" style="display:block;height:30px;float:left;width:<?php echo (100 * $orgTypeCount / $org['total']);?>%;background:<?php echo $typeDb[$orgType];?>"> </li>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
</ul>
|
||||
</td>
|
||||
<tr>
|
||||
<td colspan="2"><h4 class="histogram-legendH4"><?php echo __('Attributes');?></h4> (<?php echo __('you can also choose specific histogram items by clicking on attributes below');?>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="attributehistogram-legend">
|
||||
<div class="attributehistogram-legend-line col">
|
||||
<?php
|
||||
$cnt = 0;
|
||||
foreach ($typeDb as $type => $colour):
|
||||
?>
|
||||
<div class="attributehistogram-legend-line">
|
||||
<div class="attributehistogram-legend-box" style="display: block;float: left;margin: 4px 6px 0 0;background-color:<?php echo $colour; ?>"> </div>
|
||||
<div style="display: inline-block;cursor: pointer;<?php if (in_array($type, $selectedTypes)) echo 'font-weight:bold';?>" role="button" tabindex="0" aria-label="<?php echo __('Toggle histogram');?>" tite="<?php echo __('Toggle histogram');?>" onClick='toggleHistogramType("<?php echo h($type); ?>", [<?php foreach ($selectedTypes as $t) echo '"' . $t . '", ' ?>]);'><?php echo h($type);?></div>
|
||||
</div>
|
||||
<?php
|
||||
if ($cnt % 12 == 11):
|
||||
?>
|
||||
</div>
|
||||
<div class="attributehistogram-legend-line col">
|
||||
<?php
|
||||
endif;
|
||||
$cnt++;
|
||||
endforeach;
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><h4 ><?php echo __('Attributes per organization');?></h4></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="attributehistogram-left-table">
|
||||
<table style="border-spacing:0px !important;">
|
||||
<?php
|
||||
end($data);
|
||||
$lastElement = key($data);
|
||||
foreach ($data as $k => $org):
|
||||
if ($k == 0) continue;
|
||||
?>
|
||||
<tr>
|
||||
<td style="text-align:right"><?php echo h($org['org_name']);?></td>
|
||||
<td <?php echo ($k == $lastElement ? 'class="attributehistogram-last"' : '');?> style="border-left:1px solid;padding-left:0px;width:500px;border-spacing:0px !important;">
|
||||
<ul style="width:<?php echo 600 * $org['total'] / $max;?>px;" class="attributehistogramBar">
|
||||
<?php
|
||||
foreach ($org['data'] as $orgType => $orgTypeCount):
|
||||
?>
|
||||
<li title="<?php echo h($orgType) . ' : ' . $orgTypeCount; ?>" class="type_<?php echo h($orgType); ?>" style="display:block;height:30px;float:left;width:<?php echo (100 * $orgTypeCount / $org['total']);?>%;background:<?php echo $typeDb[$orgType];?>"> </li>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
</ul>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -12,13 +12,13 @@
|
|||
$imgId = h($id);
|
||||
if (!isset($imgSize)) $imgSize = 48;
|
||||
if (!isset($imgStyle)) {
|
||||
$imgStyle = 'float:right;';
|
||||
$imgStyle = 'float:right;';
|
||||
} else if (is_array($imgStyle)) {
|
||||
$imgStyle = $imgStyle['style'];
|
||||
$imgStyle = $imgStyle['style'];
|
||||
}
|
||||
else $imgStyle = '';
|
||||
$imgRelativePath = 'orgs/' . $imgId . '.png';
|
||||
$imgAbsolutePath = APP . WEBROOT_DIR . DS . 'img' . DS . $imgRelativePath;
|
||||
if (file_exists($imgAbsolutePath)) {
|
||||
echo $this->Html->image($imgRelativePath, array('alt' => $imgId, 'style' => 'width:' . $imgSize . 'px; max-height:' . $imgSize . 'px;' . $imgStyle, 'title' => $imgId));
|
||||
echo $this->Html->image($imgRelativePath, array('alt' => $imgId, 'style' => 'width:' . $imgSize . 'px; max-height:' . $imgSize . 'px;' . $imgStyle, 'title' => $imgId));
|
||||
}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<?php
|
||||
echo $this->Html->css('tree');
|
||||
echo $this->Html->css('tree');
|
||||
?>
|
||||
<div>
|
||||
<div class="tree">
|
||||
<span style="white-space:nowrap;">
|
||||
<?php
|
||||
echo $this->Pivot->convertPivotToHTML($pivot, $event['Event']['id']);
|
||||
?>
|
||||
</span>
|
||||
</div>
|
||||
<div style="clear:both">
|
||||
</div>
|
||||
<div class="tree">
|
||||
<span style="white-space:nowrap;">
|
||||
<?php
|
||||
echo $this->Pivot->convertPivotToHTML($pivot, $event['Event']['id']);
|
||||
?>
|
||||
</span>
|
||||
</div>
|
||||
<div style="clear:both">
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,36 +1,36 @@
|
|||
<div style="width:100%;display:inline-block;">
|
||||
<?php
|
||||
foreach ($tags as $tag): ?>
|
||||
<div style="overflow:hidden;white-space:nowrap;float:left;">
|
||||
<div style="padding-right:0px;float: left;">
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<a href="<?php echo $baseurl;?>/events/index/searchtag:<?php echo h($tag['Tag']['id']); ?>" class="tagFirstHalf" style="background-color:<?php echo h($tag['Tag']['colour']);?>;color:<?php echo $this->TextColour->getTextColour($tag['Tag']['colour']);?>"><?php echo h($tag['Tag']['name']); ?></a>
|
||||
<?php else: ?>
|
||||
<a href="<?php echo $baseurl;?>/events/index/searchtag:<?php echo h($tag['Tag']['id']); ?>" class=tag style="background-color:<?php echo h($tag['Tag']['colour']);?>;color:<?php echo $this->TextColour->getTextColour($tag['Tag']['colour']);?>"><?php echo h($tag['Tag']['name']); ?></a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div style="padding-left:0px;padding-right:5px;float:left;">
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<?php
|
||||
echo $this->Form->create('Server', array('id' => 'removeTag_' . h($tag['Tag']['id']), 'url' => '/servers/removeTag/' . h($server['Server']['id']) . '/' . h($tag['Tag']['id']), 'style' => 'margin:0px;'));
|
||||
?>
|
||||
<div title="<?php echo __('Remove tag');?>" role="button" tabindex="0" aria-label="<?php echo __('Remove tag');?>" class="tagSecondHalf useCursorPointer noPrint" onClick="removeServerTag('<?php echo h($server['Server']['id']); ?>', '<?php echo h($tag['Tag']['id']); ?>');">x</div>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
<?php else: ?>
|
||||
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
<div style="float:left">
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<button title="Add a tag" id="addTagButton" class="btn btn-inverse noPrint" style="line-height:10px; padding: 4px 4px;" onClick="getPopup('<?php echo h($server['Server']['id']); ?>', 'tags', 'selectTaxonomy');">+</button>
|
||||
<?php else:?>
|
||||
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php
|
||||
foreach ($tags as $tag): ?>
|
||||
<div style="overflow:hidden;white-space:nowrap;float:left;">
|
||||
<div style="padding-right:0px;float: left;">
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<a href="<?php echo $baseurl;?>/events/index/searchtag:<?php echo h($tag['Tag']['id']); ?>" class="tagFirstHalf" style="background-color:<?php echo h($tag['Tag']['colour']);?>;color:<?php echo $this->TextColour->getTextColour($tag['Tag']['colour']);?>"><?php echo h($tag['Tag']['name']); ?></a>
|
||||
<?php else: ?>
|
||||
<a href="<?php echo $baseurl;?>/events/index/searchtag:<?php echo h($tag['Tag']['id']); ?>" class=tag style="background-color:<?php echo h($tag['Tag']['colour']);?>;color:<?php echo $this->TextColour->getTextColour($tag['Tag']['colour']);?>"><?php echo h($tag['Tag']['name']); ?></a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div style="padding-left:0px;padding-right:5px;float:left;">
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<?php
|
||||
echo $this->Form->create('Server', array('id' => 'removeTag_' . h($tag['Tag']['id']), 'url' => '/servers/removeTag/' . h($server['Server']['id']) . '/' . h($tag['Tag']['id']), 'style' => 'margin:0px;'));
|
||||
?>
|
||||
<div title="<?php echo __('Remove tag');?>" role="button" tabindex="0" aria-label="<?php echo __('Remove tag');?>" class="tagSecondHalf useCursorPointer noPrint" onClick="removeServerTag('<?php echo h($server['Server']['id']); ?>', '<?php echo h($tag['Tag']['id']); ?>');">x</div>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
<?php else: ?>
|
||||
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
endforeach;
|
||||
?>
|
||||
<div style="float:left">
|
||||
<?php if ($isSiteAdmin): ?>
|
||||
<button title="Add a tag" id="addTagButton" class="btn btn-inverse noPrint" style="line-height:10px; padding: 4px 4px;" onClick="getPopup('<?php echo h($server['Server']['id']); ?>', 'tags', 'selectTaxonomy');">+</button>
|
||||
<?php else:?>
|
||||
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,76 +1,76 @@
|
|||
<div id="server_pull_rule_popover" class="ajax_popover_form server_rule_popover">
|
||||
<div class="confirmation">
|
||||
<legend><?php echo __('Set pull rules');?></legend>
|
||||
<div style="padding-left:5px;padding-right:5px;padding-bottom:5px;">
|
||||
<div style="padding:10px;">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="width:120px;">
|
||||
<p style="color:green;font-weight:bold;"><?php echo __('Allowed Tags (OR)');?></p>
|
||||
<select id="tagspullLeftValues" size="5" multiple style="width:185px;">
|
||||
</select>
|
||||
</td>
|
||||
<td style="width:50px;text-align:center;">
|
||||
<span title="<?php echo __('Move tag to the list of tags to allow');?>" role="button" tabindex="0" aria-label="<?php echo __('Move tag to the list of tags to allow');?>" class="btn btn-inverse" id="tagspullLeftLeft" style="padding:2px;" onClick="serverRuleMoveFilter('pull', 'tags', 'Middle', 'Left');"><<</span>
|
||||
<span title="<?php echo __('Remove tag from the list of tags to allow');?>" role="button" tabindex="0" aria-label="<?php echo __('Remove tag from the list of tags to allow');?>" class="btn btn-inverse" id="tagspullLeftRight" style="padding:2px;" onClick="serverRuleMoveFilter('pull', 'tags', 'Left', 'Middle');">>></span>
|
||||
</td>
|
||||
<td style="width:120px;">
|
||||
<input id="tagspullNewValue" style="width:180px;"></input>
|
||||
</td>
|
||||
<td style="width:50px;text-align:center;">
|
||||
<span title="<?php echo __('Remove tag from the list of tags to block');?>" role="button" tabindex="0" aria-label="<?php echo __('Remove tag from the list of tags to block');?>" class="btn btn-inverse" id="tagspullRightLeft" style="padding:2px;" onClick="serverRuleMoveFilter('pull', 'tags', 'Right', 'Middle');"><<</span>
|
||||
<span title="<?php echo __('Move tag to the list of tags to block');?>" role="button" tabindex="0" aria-label="<?php echo __('Move tag to the list of tags to block');?>" class="btn btn-inverse" id="tagspullRightRight" style="padding:2px;" onClick="serverRuleMoveFilter('pull', 'tags', 'Middle', 'Right');">>></span>
|
||||
</td>
|
||||
<td style="width:120px;">
|
||||
<p style="color:red;font-weight:bold;"><?php echo __('Blocked Tags (AND NOT)');?></p>
|
||||
<select id="tagspullRightValues" size="5" multiple style="width:185px;"></select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bold green center" style="padding-bottom:15px;padding-top:15px;"><?php echo __('AND');?></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td class="bold red center" style="padding-bottom:15px;padding-top:15px;"><?php echo __('AND NOT');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:120px;">
|
||||
<p style="color:green;font-weight:bold;">Allowed Orgs (OR)</p>
|
||||
<select id="orgspullLeftValues" size="5" multiple style="width:185px;">
|
||||
</select>
|
||||
</td>
|
||||
<td style="width:50px;text-align:center;">
|
||||
<span title="<?php echo __('Move organisation to the list of tags to allow');?>" role="button" tabindex="0" aria-label="<?php echo __('Move organisation to the list of organisations to allow');?>" class="btn btn-inverse" id="orgspullLeftLeft" style="padding:2px;" onClick="serverRuleMoveFilter('pull', 'orgs', 'Middle', 'Left');"><<</span>
|
||||
<span title="<?php echo __('Remove organisation to the list of tags to allow');?>" role="button" tabindex="0" aria-label="<?php echo __('Remove organisation form the list of organisations to allow');?>" class="btn btn-inverse" id="orgspullLeftRight" style="padding:2px;" onClick="serverRuleMoveFilter('pull', 'orgs', 'Left', 'Middle');">>></span>
|
||||
</td>
|
||||
<td style="width:120px;">
|
||||
<input id="orgspullNewValue" style="width:180px;"></input>
|
||||
</td>
|
||||
<td style="width:50px;text-align:center;">
|
||||
<span title="<?php echo __('Remove organisation from the list of tags to allow');?>" role="button" tabindex="0" aria-label="<?php echo __('Remove organisation from the list of organisations to block');?>" class="btn btn-inverse" id="orgspullRightLeft" style="padding:2px;" onClick="serverRuleMoveFilter('pull', 'orgs', 'Right', 'Middle');"><<</span>
|
||||
<span title="<?php echo __('Move organisation to the list of tags to block');?>" role="button" tabindex="0" aria-label="<?php echo __('Move organisation to the list of organisations to block');?>" class="btn btn-inverse" id="orgspullRightRight" style="padding:2px;" onClick="serverRuleMoveFilter('pull', 'orgs', 'Middle', 'Right');">>></span>
|
||||
</td>
|
||||
<td style="width:120px;">
|
||||
<p style="color:red;font-weight:bold;"><?php echo __('Blocked Orgs (AND NOT)');?></p>
|
||||
<select id="orgspullRightValues" size="5" multiple style="width:185px;"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="confirmation">
|
||||
<legend><?php echo __('Set pull rules');?></legend>
|
||||
<div style="padding-left:5px;padding-right:5px;padding-bottom:5px;">
|
||||
<div style="padding:10px;">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="width:120px;">
|
||||
<p style="color:green;font-weight:bold;"><?php echo __('Allowed Tags (OR)');?></p>
|
||||
<select id="tagspullLeftValues" size="5" multiple style="width:185px;">
|
||||
</select>
|
||||
</td>
|
||||
<td style="width:50px;text-align:center;">
|
||||
<span title="<?php echo __('Move tag to the list of tags to allow');?>" role="button" tabindex="0" aria-label="<?php echo __('Move tag to the list of tags to allow');?>" class="btn btn-inverse" id="tagspullLeftLeft" style="padding:2px;" onClick="serverRuleMoveFilter('pull', 'tags', 'Middle', 'Left');"><<</span>
|
||||
<span title="<?php echo __('Remove tag from the list of tags to allow');?>" role="button" tabindex="0" aria-label="<?php echo __('Remove tag from the list of tags to allow');?>" class="btn btn-inverse" id="tagspullLeftRight" style="padding:2px;" onClick="serverRuleMoveFilter('pull', 'tags', 'Left', 'Middle');">>></span>
|
||||
</td>
|
||||
<td style="width:120px;">
|
||||
<input id="tagspullNewValue" style="width:180px;"></input>
|
||||
</td>
|
||||
<td style="width:50px;text-align:center;">
|
||||
<span title="<?php echo __('Remove tag from the list of tags to block');?>" role="button" tabindex="0" aria-label="<?php echo __('Remove tag from the list of tags to block');?>" class="btn btn-inverse" id="tagspullRightLeft" style="padding:2px;" onClick="serverRuleMoveFilter('pull', 'tags', 'Right', 'Middle');"><<</span>
|
||||
<span title="<?php echo __('Move tag to the list of tags to block');?>" role="button" tabindex="0" aria-label="<?php echo __('Move tag to the list of tags to block');?>" class="btn btn-inverse" id="tagspullRightRight" style="padding:2px;" onClick="serverRuleMoveFilter('pull', 'tags', 'Middle', 'Right');">>></span>
|
||||
</td>
|
||||
<td style="width:120px;">
|
||||
<p style="color:red;font-weight:bold;"><?php echo __('Blocked Tags (AND NOT)');?></p>
|
||||
<select id="tagspullRightValues" size="5" multiple style="width:185px;"></select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bold green center" style="padding-bottom:15px;padding-top:15px;"><?php echo __('AND');?></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td class="bold red center" style="padding-bottom:15px;padding-top:15px;"><?php echo __('AND NOT');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:120px;">
|
||||
<p style="color:green;font-weight:bold;">Allowed Orgs (OR)</p>
|
||||
<select id="orgspullLeftValues" size="5" multiple style="width:185px;">
|
||||
</select>
|
||||
</td>
|
||||
<td style="width:50px;text-align:center;">
|
||||
<span title="<?php echo __('Move organisation to the list of tags to allow');?>" role="button" tabindex="0" aria-label="<?php echo __('Move organisation to the list of organisations to allow');?>" class="btn btn-inverse" id="orgspullLeftLeft" style="padding:2px;" onClick="serverRuleMoveFilter('pull', 'orgs', 'Middle', 'Left');"><<</span>
|
||||
<span title="<?php echo __('Remove organisation to the list of tags to allow');?>" role="button" tabindex="0" aria-label="<?php echo __('Remove organisation form the list of organisations to allow');?>" class="btn btn-inverse" id="orgspullLeftRight" style="padding:2px;" onClick="serverRuleMoveFilter('pull', 'orgs', 'Left', 'Middle');">>></span>
|
||||
</td>
|
||||
<td style="width:120px;">
|
||||
<input id="orgspullNewValue" style="width:180px;"></input>
|
||||
</td>
|
||||
<td style="width:50px;text-align:center;">
|
||||
<span title="<?php echo __('Remove organisation from the list of tags to allow');?>" role="button" tabindex="0" aria-label="<?php echo __('Remove organisation from the list of organisations to block');?>" class="btn btn-inverse" id="orgspullRightLeft" style="padding:2px;" onClick="serverRuleMoveFilter('pull', 'orgs', 'Right', 'Middle');"><<</span>
|
||||
<span title="<?php echo __('Move organisation to the list of tags to block');?>" role="button" tabindex="0" aria-label="<?php echo __('Move organisation to the list of organisations to block');?>" class="btn btn-inverse" id="orgspullRightRight" style="padding:2px;" onClick="serverRuleMoveFilter('pull', 'orgs', 'Middle', 'Right');">>></span>
|
||||
</td>
|
||||
<td style="width:120px;">
|
||||
<p style="color:red;font-weight:bold;"><?php echo __('Blocked Orgs (AND NOT)');?></p>
|
||||
<select id="orgspullRightValues" size="5" multiple style="width:185px;"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align:top">
|
||||
<span title="<?php echo __('Accept changes');?>" role="button" tabindex="0" aria-label="<?php echo __('Accept changes');?>" id="PromptYesButton" class="btn btn-primary" onClick="submitServerRulePopulateTagPicklistValues('pull');"><?php echo __('Update');?></span>
|
||||
</td>
|
||||
<td style="width:540px;">
|
||||
</td>
|
||||
<td style="vertical-align:top;">
|
||||
<span title="<?php echo __('Cancel');?>" role="button" tabindex="0" aria-label="<?php echo __('Cancel');?>" class="btn btn-inverse" id="PromptNoButton" onClick="serverRuleCancel();"><?php echo __('Cancel');?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align:top">
|
||||
<span title="<?php echo __('Accept changes');?>" role="button" tabindex="0" aria-label="<?php echo __('Accept changes');?>" id="PromptYesButton" class="btn btn-primary" onClick="submitServerRulePopulateTagPicklistValues('pull');"><?php echo __('Update');?></span>
|
||||
</td>
|
||||
<td style="width:540px;">
|
||||
</td>
|
||||
<td style="vertical-align:top;">
|
||||
<span title="<?php echo __('Cancel');?>" role="button" tabindex="0" aria-label="<?php echo __('Cancel');?>" class="btn btn-inverse" id="PromptNoButton" onClick="serverRuleCancel();"><?php echo __('Cancel');?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,78 +1,78 @@
|
|||
<div id="server_push_rule_popover" class="ajax_popover_form server_rule_popover">
|
||||
<div class="confirmation">
|
||||
<legend><?php echo __('Set push rules');?></legend>
|
||||
<div style="padding-left:5px;padding-right:5px;padding-bottom:5px;">
|
||||
<div style="padding:10px;">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="width:120px;">
|
||||
<p style="color:green;font-weight:bold;"><?php echo __('Allowed Tags (OR)');?></p>
|
||||
<select id="tagspushLeftValues" size="5" multiple style="width:185px;">
|
||||
</select>
|
||||
</td>
|
||||
<td style="width:50px;text-align:center;">
|
||||
<span title="<?php echo __('Move tag to the list of tags to allow');?>" role="button" tabindex="0" aria-label="<?php echo __('Move tag to the list of tags to allow');?>" class="btn btn-inverse" id="tagspushLeftLeft" onClick="serverRuleMoveFilter('push', 'tags', 'Middle', 'Left');" style="padding:2px;"><<</span>
|
||||
<span title="<?php echo __('Remove tag from the list of tags to allow');?>" role="button" tabindex="0" aria-label="<?php echo __('Remove tag from the list of tags to allow');?>"class="btn btn-inverse" id="tagspushLeftRight" onClick="serverRuleMoveFilter('push', 'tags', 'Left', 'Middle');" style="padding:2px;">>></span>
|
||||
</td>
|
||||
<td style="width:120px;">
|
||||
<p style="font-weight:bold;"><?php echo __('Available Tags');?></p>
|
||||
<select id="tagspushMiddleValues" size="5" multiple style="width:185px;">
|
||||
</select>
|
||||
</td>
|
||||
<td style="width:50px;text-align:center;">
|
||||
<span title="<?php echo __('Remove tag from the list of tags to block');?>" role="button" tabindex="0" aria-label="<?php echo __('Remove tag from the list of tags to block');?>" class="btn btn-inverse" id="tagspushRightLeft" style="padding:2px;" onClick="serverRuleMoveFilter('push', 'tags', 'Right', 'Middle');"><<</span>
|
||||
<span title="<?php echo __('Move tag to the list of tags to block');?>" role="button" tabindex="0" aria-label="<?php echo __('Move tag to the list of tags to block');?>" class="btn btn-inverse" id="tagspushRightRight" style="padding:2px;" onClick="serverRuleMoveFilter('push', 'tags', 'Middle', 'Right');">>></span>
|
||||
</td>
|
||||
<td style="width:120px;">
|
||||
<p style="color:red;font-weight:bold;"><?php echo __('Blocked Tags (AND NOT)');?></p>
|
||||
<select id="tagspushRightValues" size="5" multiple style="width:185px;"></select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bold green center" style="padding-bottom:15px;padding-top:15px;"><?php echo __('AND');?></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td class="bold red center" style="padding-bottom:15px;padding-top:15px;"><?php echo __('AND NOT');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:120px;">
|
||||
<p style="color:green;font-weight:bold;"><?php echo __('Allowed Orgs (OR)');?></p>
|
||||
<select id="orgspushLeftValues" size="5" multiple style="width:185px;">
|
||||
</select>
|
||||
</td>
|
||||
<td style="width:50px;text-align:center;">
|
||||
<span title="<?php echo __('Move organisation to the list of organisations to allow');?>" role="button" tabindex="0" aria-label="<?php echo __('Move organisation to the list of organisations to allow');?>" class="btn btn-inverse" id="orgspushLeftLeft" onClick="serverRuleMoveFilter('push', 'orgs', 'Middle', 'Left');" style="padding:2px;"><<</span>
|
||||
<span title="<?php echo __('Remove organisation from the list of organisations to allow');?>" role="button" tabindex="0" aria-label="<?php echo __('Remove organisation from the list of organisations to allow');?>" class="btn btn-inverse" id="orgspushLeftRight" onClick="serverRuleMoveFilter('push', 'orgs', 'Left', 'Middle');" style="padding:2px;">>></span>
|
||||
</td>
|
||||
<td style="width:120px;">
|
||||
<p style="font-weight:bold;"><?php echo __('Available Organisations');?></p>
|
||||
<select id="orgspushMiddleValues" size="5" multiple style="width:185px;">
|
||||
</select>
|
||||
</td>
|
||||
<td style="width:50px;text-align:center;">
|
||||
<span title="<?php echo __('Remove organisation from the list of organisations to block');?>" role="button" tabindex="0" aria-label="<?php echo __('Remove organisation from the list of organisations to block');?>" class="btn btn-inverse" id="orgspushRightLeft" onClick="serverRuleMoveFilter('push', 'orgs', 'Right', 'Middle');" style="padding:2px;"><<</span>
|
||||
<span title="<?php echo __('Move organisation to the list of organisations to block');?>" role="button" tabindex="0" aria-label="<?php echo __('Move organisation to the list of organisations to block');?>"class="btn btn-inverse" id="orgspushRightRight" onClick="serverRuleMoveFilter('push', 'orgs', 'Middle', 'Right');" style="padding:2px;">>></span>
|
||||
</td>
|
||||
<td style="width:120px;">
|
||||
<p style="color:red;font-weight:bold;"><?php echo __('Blocked Orgs (AND NOT)');?></p>
|
||||
<select id="orgspushRightValues" size="5" multiple style="width:185px;"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align:top">
|
||||
<span id="PromptYesButton" class="btn btn-primary" onClick="submitServerRulePopulateTagPicklistValues('push');"><?php echo __('Update');?></span>
|
||||
</td>
|
||||
<td style="width:540px;">
|
||||
</td>
|
||||
<td style="vertical-align:top;">
|
||||
<span class="btn btn-inverse" id="PromptNoButton" onClick="serverRuleCancel();"><?php echo __('Cancel');?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="confirmation">
|
||||
<legend><?php echo __('Set push rules');?></legend>
|
||||
<div style="padding-left:5px;padding-right:5px;padding-bottom:5px;">
|
||||
<div style="padding:10px;">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="width:120px;">
|
||||
<p style="color:green;font-weight:bold;"><?php echo __('Allowed Tags (OR)');?></p>
|
||||
<select id="tagspushLeftValues" size="5" multiple style="width:185px;">
|
||||
</select>
|
||||
</td>
|
||||
<td style="width:50px;text-align:center;">
|
||||
<span title="<?php echo __('Move tag to the list of tags to allow');?>" role="button" tabindex="0" aria-label="<?php echo __('Move tag to the list of tags to allow');?>" class="btn btn-inverse" id="tagspushLeftLeft" onClick="serverRuleMoveFilter('push', 'tags', 'Middle', 'Left');" style="padding:2px;"><<</span>
|
||||
<span title="<?php echo __('Remove tag from the list of tags to allow');?>" role="button" tabindex="0" aria-label="<?php echo __('Remove tag from the list of tags to allow');?>"class="btn btn-inverse" id="tagspushLeftRight" onClick="serverRuleMoveFilter('push', 'tags', 'Left', 'Middle');" style="padding:2px;">>></span>
|
||||
</td>
|
||||
<td style="width:120px;">
|
||||
<p style="font-weight:bold;"><?php echo __('Available Tags');?></p>
|
||||
<select id="tagspushMiddleValues" size="5" multiple style="width:185px;">
|
||||
</select>
|
||||
</td>
|
||||
<td style="width:50px;text-align:center;">
|
||||
<span title="<?php echo __('Remove tag from the list of tags to block');?>" role="button" tabindex="0" aria-label="<?php echo __('Remove tag from the list of tags to block');?>" class="btn btn-inverse" id="tagspushRightLeft" style="padding:2px;" onClick="serverRuleMoveFilter('push', 'tags', 'Right', 'Middle');"><<</span>
|
||||
<span title="<?php echo __('Move tag to the list of tags to block');?>" role="button" tabindex="0" aria-label="<?php echo __('Move tag to the list of tags to block');?>" class="btn btn-inverse" id="tagspushRightRight" style="padding:2px;" onClick="serverRuleMoveFilter('push', 'tags', 'Middle', 'Right');">>></span>
|
||||
</td>
|
||||
<td style="width:120px;">
|
||||
<p style="color:red;font-weight:bold;"><?php echo __('Blocked Tags (AND NOT)');?></p>
|
||||
<select id="tagspushRightValues" size="5" multiple style="width:185px;"></select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bold green center" style="padding-bottom:15px;padding-top:15px;"><?php echo __('AND');?></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td class="bold red center" style="padding-bottom:15px;padding-top:15px;"><?php echo __('AND NOT');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:120px;">
|
||||
<p style="color:green;font-weight:bold;"><?php echo __('Allowed Orgs (OR)');?></p>
|
||||
<select id="orgspushLeftValues" size="5" multiple style="width:185px;">
|
||||
</select>
|
||||
</td>
|
||||
<td style="width:50px;text-align:center;">
|
||||
<span title="<?php echo __('Move organisation to the list of organisations to allow');?>" role="button" tabindex="0" aria-label="<?php echo __('Move organisation to the list of organisations to allow');?>" class="btn btn-inverse" id="orgspushLeftLeft" onClick="serverRuleMoveFilter('push', 'orgs', 'Middle', 'Left');" style="padding:2px;"><<</span>
|
||||
<span title="<?php echo __('Remove organisation from the list of organisations to allow');?>" role="button" tabindex="0" aria-label="<?php echo __('Remove organisation from the list of organisations to allow');?>" class="btn btn-inverse" id="orgspushLeftRight" onClick="serverRuleMoveFilter('push', 'orgs', 'Left', 'Middle');" style="padding:2px;">>></span>
|
||||
</td>
|
||||
<td style="width:120px;">
|
||||
<p style="font-weight:bold;"><?php echo __('Available Organisations');?></p>
|
||||
<select id="orgspushMiddleValues" size="5" multiple style="width:185px;">
|
||||
</select>
|
||||
</td>
|
||||
<td style="width:50px;text-align:center;">
|
||||
<span title="<?php echo __('Remove organisation from the list of organisations to block');?>" role="button" tabindex="0" aria-label="<?php echo __('Remove organisation from the list of organisations to block');?>" class="btn btn-inverse" id="orgspushRightLeft" onClick="serverRuleMoveFilter('push', 'orgs', 'Right', 'Middle');" style="padding:2px;"><<</span>
|
||||
<span title="<?php echo __('Move organisation to the list of organisations to block');?>" role="button" tabindex="0" aria-label="<?php echo __('Move organisation to the list of organisations to block');?>"class="btn btn-inverse" id="orgspushRightRight" onClick="serverRuleMoveFilter('push', 'orgs', 'Middle', 'Right');" style="padding:2px;">>></span>
|
||||
</td>
|
||||
<td style="width:120px;">
|
||||
<p style="color:red;font-weight:bold;"><?php echo __('Blocked Orgs (AND NOT)');?></p>
|
||||
<select id="orgspushRightValues" size="5" multiple style="width:185px;"></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align:top">
|
||||
<span id="PromptYesButton" class="btn btn-primary" onClick="submitServerRulePopulateTagPicklistValues('push');"><?php echo __('Update');?></span>
|
||||
</td>
|
||||
<td style="width:540px;">
|
||||
</td>
|
||||
<td style="vertical-align:top;">
|
||||
<span class="btn btn-inverse" id="PromptNoButton" onClick="serverRuleCancel();"><?php echo __('Cancel');?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,71 +1,71 @@
|
|||
<div id="element_<?php echo $k; ?>">
|
||||
<div class="populate_template_div_body">
|
||||
<div class="left-inverse"><?php echo __('Field');?>:</div>
|
||||
<div class="right-inverse">
|
||||
<?php echo h($element['name']); ?>
|
||||
<?php if ($element['mandatory']): ?>
|
||||
<span class="template_mandatory">(*)</span>
|
||||
<?php endif;?>
|
||||
</div><br />
|
||||
<div class="left"><?php echo __('Description');?>:</div>
|
||||
<div class="right"><?php echo h($element['description']); ?></div><br />
|
||||
<div class="populate_template_div_body">
|
||||
<div class="left-inverse"><?php echo __('Field');?>:</div>
|
||||
<div class="right-inverse">
|
||||
<?php echo h($element['name']); ?>
|
||||
<?php if ($element['mandatory']): ?>
|
||||
<span class="template_mandatory">(*)</span>
|
||||
<?php endif;?>
|
||||
</div><br />
|
||||
<div class="left"><?php echo __('Description');?>:</div>
|
||||
<div class="right"><?php echo h($element['description']); ?></div><br />
|
||||
|
||||
<div class="left"><?php echo __('Type');?><?php if ($element['complex']) echo 's'; ?>:</div>
|
||||
<div class="right">
|
||||
<?php
|
||||
$types = '';
|
||||
if ($element['complex']) {
|
||||
foreach ($validTypeGroups[$element['type']]['types'] as $k => $type):
|
||||
if ($k != 0) $types .= ', ';
|
||||
$types .= $type;
|
||||
?>
|
||||
<div class="templateTypeBox"><?php echo h($type); ?></div>
|
||||
<?php
|
||||
endforeach;
|
||||
} else {
|
||||
?>
|
||||
<div class="templateTypeBox"><?php echo h($element['type']); ?></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div>
|
||||
<?php
|
||||
if (isset($template['Template']['value_' . $element_id])) $value = $template['Template']['value_' . $element_id];
|
||||
if (isset($errors[$element_id])) $error = $errors[$element_id];
|
||||
if ($element['batch']) {
|
||||
if ($element['complex']) {
|
||||
$placeholder = __('Describe the %s using one or several (separated by a line-break) of the following types: %s' , h($element['name']), $types);
|
||||
} else {
|
||||
$placeholder = __('Describe the %s using one or several %s\s (separated by a line-break) ' , h($element['name']) , h($element['type']));
|
||||
}
|
||||
echo $this->Form->input('value_' . $element_id, array(
|
||||
'type' => 'textarea',
|
||||
'label' => false,
|
||||
'div' => false,
|
||||
'style' => 'width: calc(100% - 16px);',
|
||||
'placeholder' => $placeholder,
|
||||
'value' => $value,
|
||||
));
|
||||
} else {
|
||||
if ($element['complex']) {
|
||||
$placeholder = __('Describe the %s using one of the following types: %s' , h($element['name'], $types));
|
||||
} else {
|
||||
$placeholder = __('Describe the %s using a %s' , h($element['name']) , h($element['type']));
|
||||
}
|
||||
echo $this->Form->input('value_' . $element_id, array(
|
||||
'type' => 'text',
|
||||
'label' => false,
|
||||
'div' => false,
|
||||
'style' => 'width: calc(100% - 16px);',
|
||||
'placeholder' => $placeholder,
|
||||
'value' => $value,
|
||||
));
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="error-message populateTemplateErrorField" <?php if (!isset($errors[$element_id])) echo 'style="display:none;"';?>>
|
||||
<?php echo __('Error: %s', $errors[$element_id]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="left"><?php echo __('Type');?><?php if ($element['complex']) echo 's'; ?>:</div>
|
||||
<div class="right">
|
||||
<?php
|
||||
$types = '';
|
||||
if ($element['complex']) {
|
||||
foreach ($validTypeGroups[$element['type']]['types'] as $k => $type):
|
||||
if ($k != 0) $types .= ', ';
|
||||
$types .= $type;
|
||||
?>
|
||||
<div class="templateTypeBox"><?php echo h($type); ?></div>
|
||||
<?php
|
||||
endforeach;
|
||||
} else {
|
||||
?>
|
||||
<div class="templateTypeBox"><?php echo h($element['type']); ?></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div>
|
||||
<?php
|
||||
if (isset($template['Template']['value_' . $element_id])) $value = $template['Template']['value_' . $element_id];
|
||||
if (isset($errors[$element_id])) $error = $errors[$element_id];
|
||||
if ($element['batch']) {
|
||||
if ($element['complex']) {
|
||||
$placeholder = __('Describe the %s using one or several (separated by a line-break) of the following types: %s' , h($element['name']), $types);
|
||||
} else {
|
||||
$placeholder = __('Describe the %s using one or several %s\s (separated by a line-break) ' , h($element['name']) , h($element['type']));
|
||||
}
|
||||
echo $this->Form->input('value_' . $element_id, array(
|
||||
'type' => 'textarea',
|
||||
'label' => false,
|
||||
'div' => false,
|
||||
'style' => 'width: calc(100% - 16px);',
|
||||
'placeholder' => $placeholder,
|
||||
'value' => $value,
|
||||
));
|
||||
} else {
|
||||
if ($element['complex']) {
|
||||
$placeholder = __('Describe the %s using one of the following types: %s' , h($element['name'], $types));
|
||||
} else {
|
||||
$placeholder = __('Describe the %s using a %s' , h($element['name']) , h($element['type']));
|
||||
}
|
||||
echo $this->Form->input('value_' . $element_id, array(
|
||||
'type' => 'text',
|
||||
'label' => false,
|
||||
'div' => false,
|
||||
'style' => 'width: calc(100% - 16px);',
|
||||
'placeholder' => $placeholder,
|
||||
'value' => $value,
|
||||
));
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="error-message populateTemplateErrorField" <?php if (!isset($errors[$element_id])) echo 'style="display:none;"';?>>
|
||||
<?php echo __('Error: %s', $errors[$element_id]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
<div id="populate_template_info_header" class="templateElementHeader" style="width:100%; position:relative;">
|
||||
<div class="templateGlass"></div>
|
||||
<div class ="templateElementHeaderText"><?php echo __('Template Description');?></div>
|
||||
<div class="templateGlass"></div>
|
||||
<div class ="templateElementHeaderText"><?php echo __('Template Description');?></div>
|
||||
</div>
|
||||
<div id="populate_template_info_body" class="populate_template_div_body">
|
||||
<div class="left" style="float:left;"><?php echo __('Template ID');?>:</div>
|
||||
<div class="right" style="float:left;"><?php echo h($templateData['Template']['id']); ?></div><br />
|
||||
<div class="left" style="float:left;"><?php echo __('Template Name');?>:</div>
|
||||
<div class="right" style="float:left;"><?php echo h($templateData['Template']['name']); ?></div><br />
|
||||
<div class="left" style="float:left;"><?php echo __('Created by');?>:</div>
|
||||
<div class="right" style="float:left;"><?php echo h($templateData['Template']['org']); ?></div><br />
|
||||
<div class="left" style="float:left;"><?php echo __('Description');?>:</div>
|
||||
<div class="right" style="float:left;"><?php echo h($templateData['Template']['description']); ?></div><br />
|
||||
<div class="left" style="float:left;"><?php echo __('Tags automatically assigned');?>:</div>
|
||||
<div class="right" style="float:left;">
|
||||
<?php
|
||||
foreach ($templateData['TemplateTag'] as $tag) {
|
||||
echo $this->element('ajaxTemplateTag', array('editable' => 'no', 'tag' => array('Tag' => $tag['Tag'])));
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="left" style="float:left;"><?php echo __('Template ID');?>:</div>
|
||||
<div class="right" style="float:left;"><?php echo h($templateData['Template']['id']); ?></div><br />
|
||||
<div class="left" style="float:left;"><?php echo __('Template Name');?>:</div>
|
||||
<div class="right" style="float:left;"><?php echo h($templateData['Template']['name']); ?></div><br />
|
||||
<div class="left" style="float:left;"><?php echo __('Created by');?>:</div>
|
||||
<div class="right" style="float:left;"><?php echo h($templateData['Template']['org']); ?></div><br />
|
||||
<div class="left" style="float:left;"><?php echo __('Description');?>:</div>
|
||||
<div class="right" style="float:left;"><?php echo h($templateData['Template']['description']); ?></div><br />
|
||||
<div class="left" style="float:left;"><?php echo __('Tags automatically assigned');?>:</div>
|
||||
<div class="right" style="float:left;">
|
||||
<?php
|
||||
foreach ($templateData['TemplateTag'] as $tag) {
|
||||
echo $this->element('ajaxTemplateTag', array('editable' => 'no', 'tag' => array('Tag' => $tag['Tag'])));
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
<div id="populate_template_info">
|
||||
<div id="populate_template_info_body" class="populate_template_div_body">
|
||||
<div class="left-inverse">Field:</div>
|
||||
<div class="right-inverse">
|
||||
<?php echo h($element['name']);
|
||||
if ($element['mandatory']): ?>
|
||||
<span class="template_mandatory">(*)</span>
|
||||
<?php endif;?>
|
||||
</div><br />
|
||||
<div class="left"><?php echo __('Description');?>:</div>
|
||||
<div class="right"><?php echo h($element['description']); ?></div><br />
|
||||
<?php // The following is not ideal for i18n ?>
|
||||
<div class="left" style="height:26px;"><?php echo __('File');?><?php if ($element['batch']) echo __('s')?>:</div>
|
||||
<div class="right" id ="filenames_<?php echo $element_id; ?>" style="height:26px;">
|
||||
|
||||
</div><br />
|
||||
<div class="input file" id="file_container_<?php echo $element_id;?>">
|
||||
</div>
|
||||
<iframe id="iframe_<?php echo $element_id; ?>" src="/templates/uploadFile/<?php echo $element_id; ?>/<?php echo ($element['batch'] ? 'yes' : 'no'); ?>" style="border:0px;height:30px;width:100%;overflow:hidden;" scrolling="no"></iframe>
|
||||
<div class="error-message populateTemplateErrorField" <?php if (!isset($errors[$element_id])) echo 'style="display:none;"';?>>
|
||||
<?php echo __('Error') . ': ' . $errors[$element_id]; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="populate_template_info_body" class="populate_template_div_body">
|
||||
<div class="left-inverse">Field:</div>
|
||||
<div class="right-inverse">
|
||||
<?php echo h($element['name']);
|
||||
if ($element['mandatory']): ?>
|
||||
<span class="template_mandatory">(*)</span>
|
||||
<?php endif;?>
|
||||
</div><br />
|
||||
<div class="left"><?php echo __('Description');?>:</div>
|
||||
<div class="right"><?php echo h($element['description']); ?></div><br />
|
||||
<?php // The following is not ideal for i18n ?>
|
||||
<div class="left" style="height:26px;"><?php echo __('File');?><?php if ($element['batch']) echo __('s')?>:</div>
|
||||
<div class="right" id ="filenames_<?php echo $element_id; ?>" style="height:26px;">
|
||||
|
||||
</div><br />
|
||||
<div class="input file" id="file_container_<?php echo $element_id;?>">
|
||||
</div>
|
||||
<iframe id="iframe_<?php echo $element_id; ?>" src="/templates/uploadFile/<?php echo $element_id; ?>/<?php echo ($element['batch'] ? 'yes' : 'no'); ?>" style="border:0px;height:30px;width:100%;overflow:hidden;" scrolling="no"></iframe>
|
||||
<div class="error-message populateTemplateErrorField" <?php if (!isset($errors[$element_id])) echo 'style="display:none;"';?>>
|
||||
<?php echo __('Error') . ': ' . $errors[$element_id]; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var i_<?php echo h($element_id); ?> = 0;
|
||||
var element_id_<?php echo h($element_id); ?> = <?php echo h($element_id); ?>;
|
||||
var batch_<?php echo h($element_id); ?> = "<?php echo ($element['batch'] ? 'yes': 'no'); ?>";
|
||||
var i_<?php echo h($element_id); ?> = 0;
|
||||
var element_id_<?php echo h($element_id); ?> = <?php echo h($element_id); ?>;
|
||||
var batch_<?php echo h($element_id); ?> = "<?php echo ($element['batch'] ? 'yes': 'no'); ?>";
|
||||
</script>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<div id="populate_template_info">
|
||||
<div class="templateElementHeader" style="width:100%; position:relative;">
|
||||
<div class="templateGlass"></div>
|
||||
<div class ="templateElementHeaderText"><?php echo h($element['name']); ?></div>
|
||||
</div>
|
||||
<div id="populate_template_info_body" class="populate_template_div_body">
|
||||
<div class="solo" style="float:left;"><?php echo h($element['text']); ?></div><br />
|
||||
</div>
|
||||
<div class="templateElementHeader" style="width:100%; position:relative;">
|
||||
<div class="templateGlass"></div>
|
||||
<div class ="templateElementHeaderText"><?php echo h($element['name']); ?></div>
|
||||
</div>
|
||||
<div id="populate_template_info_body" class="populate_template_div_body">
|
||||
<div class="solo" style="float:left;"><?php echo h($element['text']); ?></div><br />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,117 +1,117 @@
|
|||
<li id="id_<?php echo $element_id; ?>" class="templateTableRow">
|
||||
<div class="templateElementHeader" style="width:100%; position:relative;">
|
||||
<div class="templateGlass"></div>
|
||||
<div class ="templateElementHeaderText"><?php echo __('Attribute');?></div>
|
||||
</div>
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display:inline">
|
||||
<div class="templateTableTDName templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Name');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php echo h($element['TemplateElementAttribute'][0]['name']); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="templateElementHeader" style="width:100%; position:relative;">
|
||||
<div class="templateGlass"></div>
|
||||
<div class ="templateElementHeaderText"><?php echo __('Attribute');?></div>
|
||||
</div>
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display:inline">
|
||||
<div class="templateTableTDName templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Name');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php echo h($element['TemplateElementAttribute'][0]['name']); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="templateTableTDDescription templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Description');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php echo h($element['TemplateElementAttribute'][0]['description']); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="templateTableTDDescription templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Description');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php echo h($element['TemplateElementAttribute'][0]['description']); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="templateTableTDCategory templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Category');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php echo h($element['TemplateElementAttribute'][0]['category']); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="templateTableTDCategory templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Category');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php echo h($element['TemplateElementAttribute'][0]['category']); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="templateTableTDTypes templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Types');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php
|
||||
if ($element['TemplateElementAttribute'][0]['complex']) {
|
||||
echo '<span style="color:red">' . h($element['TemplateElementAttribute'][0]['type']) . '</span> (';
|
||||
foreach ($validTypeGroups[$element['TemplateElementAttribute'][0]['type']]['types'] as $k => $t) {
|
||||
if ($k != 0) echo ', ';
|
||||
echo h($t);
|
||||
}
|
||||
echo ')';
|
||||
} else {
|
||||
echo h($element['TemplateElementAttribute'][0]['type']);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="templateTableTDTypes templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Types');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php
|
||||
if ($element['TemplateElementAttribute'][0]['complex']) {
|
||||
echo '<span style="color:red">' . h($element['TemplateElementAttribute'][0]['type']) . '</span> (';
|
||||
foreach ($validTypeGroups[$element['TemplateElementAttribute'][0]['type']]['types'] as $k => $t) {
|
||||
if ($k != 0) echo ', ';
|
||||
echo h($t);
|
||||
}
|
||||
echo ')';
|
||||
} else {
|
||||
echo h($element['TemplateElementAttribute'][0]['type']);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="templateTableTDShort templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Mandatory');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php
|
||||
if ($element['TemplateElementAttribute'][0]['mandatory']) echo __('Yes');
|
||||
else echo __('No');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="templateTableTDShort templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Batch');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php
|
||||
if ($element['TemplateElementAttribute'][0]['batch']) echo __('Yes');
|
||||
else echo __('No');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="templateTableTDShort templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Mandatory');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php
|
||||
if ($element['TemplateElementAttribute'][0]['mandatory']) echo __('Yes');
|
||||
else echo __('No');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="templateTableTDShort templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Batch');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php
|
||||
if ($element['TemplateElementAttribute'][0]['batch']) echo __('Yes');
|
||||
else echo __('No');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="templateTableTDShort templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('IDS');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php
|
||||
if ($element['TemplateElementAttribute'][0]['to_ids']) echo __('Yes');
|
||||
else echo __('No');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="templateTableTDShort templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('IDS');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php
|
||||
if ($element['TemplateElementAttribute'][0]['to_ids']) echo __('Yes');
|
||||
else echo __('No');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="templateTableTDActions templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Actions');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php
|
||||
if ($mayModify) {
|
||||
echo $this->Form->create('TemplateElement', array('class' => 'inline-delete', 'style' => 'display:inline-block;', 'id' => 'TemplateElement_' . h($element_id) . '_delete', 'url' => array('action' => 'delete')));
|
||||
?>
|
||||
<span class="icon-trash useCursorPointer" title="<?php echo __('Delete template element');?>" role="button" tabindex="0" aria-label="<?php echo __('Delete template element');?>" onClick="deleteObject('template_elements', 'delete' ,'<?php echo h($element_id); ?>', '<?php echo h($element['TemplateElement']['template_id']); ?>');"></span>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
<span class="icon-edit useCursorPointer" title="<?php echo __('Edit template element');?>" role="button" tabindex="0" aria-label="<?php echo __('Edit template element');?>" onClick="editTemplateElement('attribute' ,'<?php echo h($element_id); ?>');"></span>
|
||||
<?php
|
||||
} else {
|
||||
echo ' ';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="templateTableTDActions templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Actions');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php
|
||||
if ($mayModify) {
|
||||
echo $this->Form->create('TemplateElement', array('class' => 'inline-delete', 'style' => 'display:inline-block;', 'id' => 'TemplateElement_' . h($element_id) . '_delete', 'url' => array('action' => 'delete')));
|
||||
?>
|
||||
<span class="icon-trash useCursorPointer" title="<?php echo __('Delete template element');?>" role="button" tabindex="0" aria-label="<?php echo __('Delete template element');?>" onClick="deleteObject('template_elements', 'delete' ,'<?php echo h($element_id); ?>', '<?php echo h($element['TemplateElement']['template_id']); ?>');"></span>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
<span class="icon-edit useCursorPointer" title="<?php echo __('Edit template element');?>" role="button" tabindex="0" aria-label="<?php echo __('Edit template element');?>" onClick="editTemplateElement('attribute' ,'<?php echo h($element_id); ?>');"></span>
|
||||
<?php
|
||||
} else {
|
||||
echo ' ';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
|
|
|
@ -1,94 +1,94 @@
|
|||
<li id="id_<?php echo $element_id;?>" class="templateTableRow">
|
||||
<div class="templateElementHeader" style="width:100%; position:relative;">
|
||||
<div class="templateGlass"></div>
|
||||
<div class ="templateElementHeaderText"><?php echo __('File');?></div>
|
||||
</div>
|
||||
<table class="templateTable">
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display:inline">
|
||||
<div class="templateTableTDName templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Name');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php echo h($element['TemplateElementFile'][0]['name']); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="templateElementHeader" style="width:100%; position:relative;">
|
||||
<div class="templateGlass"></div>
|
||||
<div class ="templateElementHeaderText"><?php echo __('File');?></div>
|
||||
</div>
|
||||
<table class="templateTable">
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display:inline">
|
||||
<div class="templateTableTDName templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Name');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php echo h($element['TemplateElementFile'][0]['name']); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="templateTableTDDescriptionFile templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Description');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php echo h($element['TemplateElementFile'][0]['description']); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="templateTableTDDescriptionFile templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Description');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php echo h($element['TemplateElementFile'][0]['description']); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="templateTableTDCategory templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Category');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php echo h($element['TemplateElementFile'][0]['category']); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="templateTableTDShort templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Malware');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php
|
||||
if ($element['TemplateElementFile'][0]['malware']) echo __('Yes');
|
||||
else echo __('No');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="templateTableTDShort templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Req.');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php
|
||||
if ($element['TemplateElementFile'][0]['mandatory']) echo __('Yes');
|
||||
else echo __('No');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="templateTableTDShort templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Batch');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php
|
||||
if ($element['TemplateElementFile'][0]['batch']) echo __('Yes');
|
||||
else echo __('No');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="templateTableTDActions templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Actions');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php
|
||||
if ($mayModify) {
|
||||
echo $this->Form->create('TemplateElement', array('class' => 'inline-delete', 'style' => 'display:inline-block;', 'id' => 'TemplateElement_' . h($element_id) . '_delete', 'url' => array('action' => 'delete')));
|
||||
?>
|
||||
<span class="icon-trash useCursorPointer" title="<?php echo __('Delete template element');?>" role="button" tabindex="0" aria-label="<?php echo __('Delete template element');?>" onClick="deleteObject('template_elements', 'delete' ,'<?php echo h($element_id); ?>', '<?php echo h($element['TemplateElement']['template_id']); ?>');"></span>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
<span class="icon-edit useCursorPointer" title="<?php echo __('Edit template element');?>" role="button" tabindex="0" aria-label="<?php echo __('Edit template element');?>" onClick="editTemplateElement('file' ,'<?php echo h($element_id); ?>');"></span>
|
||||
<?php
|
||||
} else {
|
||||
echo ' ';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="templateTableTDCategory templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Category');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php echo h($element['TemplateElementFile'][0]['category']); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="templateTableTDShort templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Malware');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php
|
||||
if ($element['TemplateElementFile'][0]['malware']) echo __('Yes');
|
||||
else echo __('No');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="templateTableTDShort templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Req.');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php
|
||||
if ($element['TemplateElementFile'][0]['mandatory']) echo __('Yes');
|
||||
else echo __('No');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="templateTableTDShort templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Batch');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php
|
||||
if ($element['TemplateElementFile'][0]['batch']) echo __('Yes');
|
||||
else echo __('No');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="templateTableTDActions templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Actions');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php
|
||||
if ($mayModify) {
|
||||
echo $this->Form->create('TemplateElement', array('class' => 'inline-delete', 'style' => 'display:inline-block;', 'id' => 'TemplateElement_' . h($element_id) . '_delete', 'url' => array('action' => 'delete')));
|
||||
?>
|
||||
<span class="icon-trash useCursorPointer" title="<?php echo __('Delete template element');?>" role="button" tabindex="0" aria-label="<?php echo __('Delete template element');?>" onClick="deleteObject('template_elements', 'delete' ,'<?php echo h($element_id); ?>', '<?php echo h($element['TemplateElement']['template_id']); ?>');"></span>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
<span class="icon-edit useCursorPointer" title="<?php echo __('Edit template element');?>" role="button" tabindex="0" aria-label="<?php echo __('Edit template element');?>" onClick="editTemplateElement('file' ,'<?php echo h($element_id); ?>');"></span>
|
||||
<?php
|
||||
} else {
|
||||
echo ' ';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
|
|
|
@ -1,51 +1,51 @@
|
|||
<li id="id_<?php echo $element_id;?>" class="templateTableRow">
|
||||
<div class="templateElementHeader" style="width:100%; position:relative;">
|
||||
<div class="templateGlass"></div>
|
||||
<div class ="templateElementHeaderText"><?php echo __('Text');?></div>
|
||||
</div>
|
||||
<table class="templateTable">
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display:inline">
|
||||
<div class="templateTableTDName templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Name');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php echo h($element['TemplateElementText'][0]['name']); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="templateTableTDText templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Text');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php echo h($element['TemplateElementText'][0]['text']); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="templateTableTDActions templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Actions');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php
|
||||
if ($mayModify) {
|
||||
echo $this->Form->create('TemplateElement', array('class' => 'inline-delete', 'style' => 'display:inline-block;', 'id' => 'TemplateElement_' . h($element_id) . '_delete', 'url' => array('action' => 'delete')));
|
||||
?>
|
||||
<span class="icon-trash useCursorPointer" title="<?php echo __('Delete template element');?>" role="button" tabindex="0" aria-label="<?php echo __('Delete template element');?>" onClick="deleteObject('template_elements', 'delete' ,'<?php echo h($element_id); ?>', '<?php echo h($element['TemplateElement']['template_id']); ?>');"></span>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
<span class="icon-edit useCursorPointer" title="<?php echo __('Edit template element');?>" role="button" tabindex="0" aria-label="<?php echo __('Edit template element');?>" onClick="editTemplateElement('text' ,'<?php echo h($element_id); ?>');"></span>
|
||||
<?php
|
||||
} else {
|
||||
echo ' ';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="templateElementHeader" style="width:100%; position:relative;">
|
||||
<div class="templateGlass"></div>
|
||||
<div class ="templateElementHeaderText"><?php echo __('Text');?></div>
|
||||
</div>
|
||||
<table class="templateTable">
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display:inline">
|
||||
<div class="templateTableTDName templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Name');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php echo h($element['TemplateElementText'][0]['name']); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="templateTableTDText templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Text');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php echo h($element['TemplateElementText'][0]['text']); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="templateTableTDActions templateTableArea">
|
||||
<div class="templateTableColumnName">
|
||||
<?php echo __('Actions');?>
|
||||
</div>
|
||||
<div class="">
|
||||
<?php
|
||||
if ($mayModify) {
|
||||
echo $this->Form->create('TemplateElement', array('class' => 'inline-delete', 'style' => 'display:inline-block;', 'id' => 'TemplateElement_' . h($element_id) . '_delete', 'url' => array('action' => 'delete')));
|
||||
?>
|
||||
<span class="icon-trash useCursorPointer" title="<?php echo __('Delete template element');?>" role="button" tabindex="0" aria-label="<?php echo __('Delete template element');?>" onClick="deleteObject('template_elements', 'delete' ,'<?php echo h($element_id); ?>', '<?php echo h($element['TemplateElement']['template_id']); ?>');"></span>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
<span class="icon-edit useCursorPointer" title="<?php echo __('Edit template element');?>" role="button" tabindex="0" aria-label="<?php echo __('Edit template element');?>" onClick="editTemplateElement('text' ,'<?php echo h($element_id); ?>');"></span>
|
||||
<?php
|
||||
} else {
|
||||
echo ' ';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
|
|
|
@ -1,34 +1,34 @@
|
|||
<?php
|
||||
$mayModify = (($isAclModify && $event['Event']['user_id'] == $me['id'] && $event['Orgc']['id'] == $me['org_id']) || ($isAclModifyOrg && $event['Orgc']['id'] == $me['org_id']));
|
||||
$mayPublish = ($isAclPublish && $event['Orgc']['id'] == $me['org_id']);
|
||||
$mayModify = (($isAclModify && $event['Event']['user_id'] == $me['id'] && $event['Orgc']['id'] == $me['org_id']) || ($isAclModifyOrg && $event['Orgc']['id'] == $me['org_id']));
|
||||
$mayPublish = ($isAclPublish && $event['Orgc']['id'] == $me['org_id']);
|
||||
?>
|
||||
|
||||
<div id="distribution_graph_container">
|
||||
<div class="loadingPopover">
|
||||
<div class="spinner"></div>
|
||||
<div class="loadingText"><?php echo __('Loading');?></div>
|
||||
</div>
|
||||
<div id="eventdistri_graph" data-event-id="<?php echo h($event['Event']['id']); ?>" data-event-distribution="<?php echo h($event['Event']['distribution']); ?>" data-user-manipulation="<?php echo $mayModify || $isSiteAdmin ? 'true' : 'false'; ?>" data-extended="<?php echo $extended; ?>">
|
||||
<canvas id="distribution_graph_canvas" height="290px"width="400px"></canvas>
|
||||
</div>
|
||||
<div class="popupDistriSeparator"></div>
|
||||
<div id="eventdistri_pb_container">
|
||||
<div id="eventdistri_pb_background" class="customProgress useCursorPointer">
|
||||
<div id="eventdistri_pb_min" class="customProgress useCursorPointer animatedPB" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" data-toggle="tooltip" data-placement="left" data-container="body" title="<?php echo __('Elements having lower distribution level than the event'); ?>"></div>
|
||||
<div id="eventdistri_pb" class="customProgress useCursorPointer animatedPB" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" data-toggle="tooltip" data-placement="top" data-container="body" title="<?php echo __('Distribution of the event'); ?>"></div>
|
||||
<div id="eventdistri_pb_invalid" class="customProgress useCursorPointer animatedPB" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" data-toggle="tooltip" data-placement="right" data-container="body" title="<?php echo __('Inconsistent distribution level, fallback on the event distribution'); ?>"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="eventdistri_sg_pb_container">
|
||||
<span class="sharingGroup_pb_text useCursorPointer badge"><?php echo __("Sharing group"); ?></span>
|
||||
<div id="eventdistri_sg_pb_background" class="customProgress useCursorPointer">
|
||||
<div id="eventdistri_sg_pb" class="customProgress useCursorPointer animatedPB" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" data-toggle="tooltip" data-placement="bottom" data-container="body"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="loadingPopover">
|
||||
<div class="spinner"></div>
|
||||
<div class="loadingText"><?php echo __('Loading');?></div>
|
||||
</div>
|
||||
<div id="eventdistri_graph" data-event-id="<?php echo h($event['Event']['id']); ?>" data-event-distribution="<?php echo h($event['Event']['distribution']); ?>" data-user-manipulation="<?php echo $mayModify || $isSiteAdmin ? 'true' : 'false'; ?>" data-extended="<?php echo $extended; ?>">
|
||||
<canvas id="distribution_graph_canvas" height="290px"width="400px"></canvas>
|
||||
</div>
|
||||
<div class="popupDistriSeparator"></div>
|
||||
<div id="eventdistri_pb_container">
|
||||
<div id="eventdistri_pb_background" class="customProgress useCursorPointer">
|
||||
<div id="eventdistri_pb_min" class="customProgress useCursorPointer animatedPB" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" data-toggle="tooltip" data-placement="left" data-container="body" title="<?php echo __('Elements having lower distribution level than the event'); ?>"></div>
|
||||
<div id="eventdistri_pb" class="customProgress useCursorPointer animatedPB" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" data-toggle="tooltip" data-placement="top" data-container="body" title="<?php echo __('Distribution of the event'); ?>"></div>
|
||||
<div id="eventdistri_pb_invalid" class="customProgress useCursorPointer animatedPB" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" data-toggle="tooltip" data-placement="right" data-container="body" title="<?php echo __('Inconsistent distribution level, fallback on the event distribution'); ?>"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="eventdistri_sg_pb_container">
|
||||
<span class="sharingGroup_pb_text useCursorPointer badge"><?php echo __("Sharing group"); ?></span>
|
||||
<div id="eventdistri_sg_pb_background" class="customProgress useCursorPointer">
|
||||
<div id="eventdistri_sg_pb" class="customProgress useCursorPointer animatedPB" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" data-toggle="tooltip" data-placement="bottom" data-container="body"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
echo $this->Html->script('Chart.min');
|
||||
echo $this->Html->script('event-distribution-graph');
|
||||
echo $this->Html->css('distribution-graph');
|
||||
echo $this->Html->script('Chart.min');
|
||||
echo $this->Html->script('event-distribution-graph');
|
||||
echo $this->Html->css('distribution-graph');
|
||||
?>
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
<?php
|
||||
$mayModify = (($isAclModify && $event['Event']['user_id'] == $me['id'] && $event['Orgc']['id'] == $me['org_id']) || ($isAclModifyOrg && $event['Orgc']['id'] == $me['org_id']));
|
||||
$mayPublish = ($isAclPublish && $event['Orgc']['id'] == $me['org_id']);
|
||||
$mayModify = (($isAclModify && $event['Event']['user_id'] == $me['id'] && $event['Orgc']['id'] == $me['org_id']) || ($isAclModifyOrg && $event['Orgc']['id'] == $me['org_id']));
|
||||
$mayPublish = ($isAclPublish && $event['Orgc']['id'] == $me['org_id']);
|
||||
?>
|
||||
|
||||
<div class="eventgraph_header">
|
||||
<label id="network-scope" class="btn center-in-network-header network-control-btn">
|
||||
<span class="useCursorPointer fa fa-object-group" style="margin-right: 3px;">
|
||||
</span><?php echo __('Scope')?>
|
||||
<span id="network-scope-badge" class="badge"></span>
|
||||
</label>
|
||||
<label id="network-physic" class="btn center-in-network-header network-control-btn"><span class="useCursorPointer fa fa-space-shuttle" style="margin-right: 3px;"></span><?php echo __('Physics')?></label>
|
||||
<label id="network-display" class="btn center-in-network-header network-control-btn"><span class="useCursorPointer fa fa-list-alt" style="margin-right: 3px;"></span><?php echo __('Display')?></label>
|
||||
<label id="network-filter" class="btn center-in-network-header network-control-btn"><span class="useCursorPointer fa fa-filter" style="margin-right: 3px;"></span><?php echo __('Filters')?></label>
|
||||
<label id="network-import" class="btn center-in-network-header network-control-btn"><span class="useCursorPointer fa fa-exchange" style="margin-right: 3px;"></span><?php echo __('Export')?></label>
|
||||
<label id="network-history" class="btn center-in-network-header network-control-btn"><span class="useCursorPointer fa fa-history" style="margin-right: 3px;"></span><?php echo __('History')?></label>
|
||||
|
||||
<input type="text" id="network-typeahead" class="center-in-network-header network-typeahead flushright" data-provide="typeahead" size="20" placeholder="Search for an item">
|
||||
<label id="network-scope" class="btn center-in-network-header network-control-btn">
|
||||
<span class="useCursorPointer fa fa-object-group" style="margin-right: 3px;">
|
||||
</span><?php echo __('Scope')?>
|
||||
<span id="network-scope-badge" class="badge"></span>
|
||||
</label>
|
||||
<label id="network-physic" class="btn center-in-network-header network-control-btn"><span class="useCursorPointer fa fa-space-shuttle" style="margin-right: 3px;"></span><?php echo __('Physics')?></label>
|
||||
<label id="network-display" class="btn center-in-network-header network-control-btn"><span class="useCursorPointer fa fa-list-alt" style="margin-right: 3px;"></span><?php echo __('Display')?></label>
|
||||
<label id="network-filter" class="btn center-in-network-header network-control-btn"><span class="useCursorPointer fa fa-filter" style="margin-right: 3px;"></span><?php echo __('Filters')?></label>
|
||||
<label id="network-import" class="btn center-in-network-header network-control-btn"><span class="useCursorPointer fa fa-exchange" style="margin-right: 3px;"></span><?php echo __('Export')?></label>
|
||||
<label id="network-history" class="btn center-in-network-header network-control-btn"><span class="useCursorPointer fa fa-history" style="margin-right: 3px;"></span><?php echo __('History')?></label>
|
||||
|
||||
<input type="text" id="network-typeahead" class="center-in-network-header network-typeahead flushright" data-provide="typeahead" size="20" placeholder="Search for an item">
|
||||
</div>
|
||||
|
||||
<span class="shortcut-help btn btn-xs btn-info">?</span>
|
||||
|
@ -24,19 +24,19 @@
|
|||
<div id="eventgraph_shortcuts_background" class="eventgraph_network_background"></div>
|
||||
<div id="eventgraph_network" class="eventgraph_network" data-event-id="<?php echo h($event['Event']['id']); ?>" data-event-timestamp="<?php echo h($event['Event']['timestamp']); ?>" data-user-manipulation="<?php echo $mayModify || $isSiteAdmin ? 'true' : 'false'; ?>" data-extended="<?php echo $extended; ?>" data-user-email="<?php echo h($me['email']);?>" data-is-site-admin="<?php echo $isSiteAdmin ? 'true' : 'false'; ?>"></div>
|
||||
<div class="loading-network-div" id="refecences_network_loading_div" style="display: none;">
|
||||
<div class="spinner-network" data-original-title="" title=""></div>
|
||||
<div class="loadingText-network" data-original-title="" title=""></div>
|
||||
<div class="spinner-network" data-original-title="" title=""></div>
|
||||
<div class="loadingText-network" data-original-title="" title=""></div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
echo $this->Html->script('vis');
|
||||
echo $this->Html->css('vis');
|
||||
echo $this->Html->script('bootstrap-typeahead');
|
||||
echo $this->Html->script('contextual_menu');
|
||||
echo $this->Html->css('contextual_menu');
|
||||
echo $this->Html->script('action_table');
|
||||
echo $this->Html->css('action_table');
|
||||
echo $this->Html->css('event-graph');
|
||||
echo $this->Html->script('event-graph');
|
||||
echo $this->Html->script('vis');
|
||||
echo $this->Html->css('vis');
|
||||
echo $this->Html->script('bootstrap-typeahead');
|
||||
echo $this->Html->script('contextual_menu');
|
||||
echo $this->Html->css('contextual_menu');
|
||||
echo $this->Html->script('action_table');
|
||||
echo $this->Html->css('action_table');
|
||||
echo $this->Html->css('event-graph');
|
||||
echo $this->Html->script('event-graph');
|
||||
?>
|
||||
|
|
|
@ -5,7 +5,7 @@ $enterpriseTag = "mitre-enterprise-attack-attack-pattern";
|
|||
foreach($attackTactic as $tactic):
|
||||
$galaxy = $tactic['galaxy'];
|
||||
?>
|
||||
<li class="tactic <?php echo $galaxy['type']==$enterpriseTag ? "active" : ""; ?>"><span href="#tabMatrix-<?php echo h($galaxy['type']); ?>" data-toggle="tab" style="padding-top: 3px; padding-bottom: 3px;"><?php echo h($galaxy['name']); ?></span></li>
|
||||
<li class="tactic <?php echo $galaxy['type']==$enterpriseTag ? "active" : ""; ?>"><span href="#tabMatrix-<?php echo h($galaxy['type']); ?>" data-toggle="tab" style="padding-top: 3px; padding-bottom: 3px;"><?php echo h($galaxy['name']); ?></span></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -16,95 +16,95 @@ foreach($attackTactic as $tactic):
|
|||
|
||||
<div class="attack-matrix-options">
|
||||
<span id="matrix-heatmap-legend-caret">
|
||||
<span id="matrix-heatmap-legend-caret-value">0</span>
|
||||
<span class="fa fa-caret-down"></span>
|
||||
<span id="matrix-heatmap-legend-caret-value">0</span>
|
||||
<span class="fa fa-caret-down"></span>
|
||||
</span>
|
||||
<div>
|
||||
<span>0</span>
|
||||
<div id="matrix-heatmap-legend"></div>
|
||||
<span id="matrix-heatmap-maxval"><?php echo h($maxScore); ?></span>
|
||||
<span>0</span>
|
||||
<div id="matrix-heatmap-legend"></div>
|
||||
<span id="matrix-heatmap-maxval"><?php echo h($maxScore); ?></span>
|
||||
</div>
|
||||
<label style="display: inline-block; margin-left: 30px;"><input type="checkbox" id="checkbox_attackMatrix_showAll" checked><span class="fa fa-filter"><?php echo __('Show all');?></span></input></label>
|
||||
</div>
|
||||
|
||||
<div class="hidden">
|
||||
<?php
|
||||
echo $this->Form->create('Galaxy', array('url' => '/galaxies/attachMultipleClusters/' . (empty($target_id) ? $eventId : $target_id ) . '/' . (empty($target_type) ? 'event' : $target_type), 'style' => 'margin:0px;'));
|
||||
echo $this->Form->input('target_ids', array('type' => 'text'));
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
<?php
|
||||
echo $this->Form->create('Galaxy', array('url' => '/galaxies/attachMultipleClusters/' . (empty($target_id) ? $eventId : $target_id ) . '/' . (empty($target_type) ? 'event' : $target_type), 'style' => 'margin:0px;'));
|
||||
echo $this->Form->input('target_ids', array('type' => 'text'));
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div id="matrix_container" class="fixed-table-container-inner" style="max-height: 670px;" data-picking-mode="<?php echo $pickingMode ? 'true' : 'false'; ?>">
|
||||
<div class="tab-content">
|
||||
<?php foreach($attackTactic as $galaxy):
|
||||
$galaxyType = $galaxy['galaxy']['type'];
|
||||
$galaxyType = $galaxy['galaxy']['type'];
|
||||
?>
|
||||
<div class="tab-pane <?php echo $galaxyType==$enterpriseTag ? "active" : ""; ?>" id="tabMatrix-<?php echo h($galaxyType); ?>">
|
||||
<div class="header-background"></div>
|
||||
<div class="fixed-table-container-inner" style="max-height: 670px;">
|
||||
<table class="table table-condensed matrix-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<?php
|
||||
foreach($killChainOrders[$galaxyType] as $kc):
|
||||
$name = str_replace("-", " ", $kc);
|
||||
?>
|
||||
<th>
|
||||
<?php echo h(ucfirst($name)); ?>
|
||||
<div class="th-inner"><?php echo h(ucfirst($name)); ?></div>
|
||||
</th>
|
||||
<div class="tab-pane <?php echo $galaxyType==$enterpriseTag ? "active" : ""; ?>" id="tabMatrix-<?php echo h($galaxyType); ?>">
|
||||
<div class="header-background"></div>
|
||||
<div class="fixed-table-container-inner" style="max-height: 670px;">
|
||||
<table class="table table-condensed matrix-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<?php
|
||||
foreach($killChainOrders[$galaxyType] as $kc):
|
||||
$name = str_replace("-", " ", $kc);
|
||||
?>
|
||||
<th>
|
||||
<?php echo h(ucfirst($name)); ?>
|
||||
<div class="th-inner"><?php echo h(ucfirst($name)); ?></div>
|
||||
</th>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody style="overflow-y: scroll;">
|
||||
<?php
|
||||
$added = false;
|
||||
$i = 0;
|
||||
do {
|
||||
$added = false;
|
||||
echo '<tr>';
|
||||
$killChainOrder = $killChainOrders[$galaxyType];
|
||||
$attackClusters = $galaxy['clusters'];
|
||||
foreach($killChainOrder as $kc) {
|
||||
if(!isset($attackClusters[$kc])) { // undefined index
|
||||
$td = '<td class="">';
|
||||
} else {
|
||||
$clusters = $attackClusters[$kc];
|
||||
$td = '<td ';
|
||||
if ($i < count($clusters)) {
|
||||
$clusterId = $clusters[$i]['id'];
|
||||
$tagName = $clusters[$i]['tag_name'];
|
||||
$score = empty($scores[$tagName]) ? 0 : $scores[$tagName];
|
||||
$name = join(" ", array_slice(explode(" ", $clusters[$i]['value']), 0, -2)); // remove " - external_id"
|
||||
$td .= ' class="heatCell matrix-interaction ' . ($pickingMode ? 'cell-picking"' : '"');
|
||||
$td .= isset($colours[$tagName]) ? ' style="background: ' . h($colours[$tagName]) . '; color: ' . h($this->TextColour->getTextColour($colours[$tagName])) . '"' : '' ;
|
||||
$td .= ' data-score="'.h($score).'"';
|
||||
$td .= ' data-tag_name="'.h($tagName).'"';
|
||||
$td .= ' data-cluster-id="'.h($clusterId).'"';
|
||||
if ($pickingMode) {
|
||||
$td .= ' data-target-type="attribute"';
|
||||
$td .= ' data-target-id="'.h($target_id).'"';
|
||||
}
|
||||
$td .= ' title="'.h($clusters[$i]['external_id']).'"';
|
||||
$td .= '>' . h($name);
|
||||
$added = true;
|
||||
} else {
|
||||
$td .= 'class="">';
|
||||
}
|
||||
}
|
||||
$td .= '</td>';
|
||||
echo $td;
|
||||
}
|
||||
echo '</tr>';
|
||||
$i++;
|
||||
} while($added);
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody style="overflow-y: scroll;">
|
||||
<?php
|
||||
$added = false;
|
||||
$i = 0;
|
||||
do {
|
||||
$added = false;
|
||||
echo '<tr>';
|
||||
$killChainOrder = $killChainOrders[$galaxyType];
|
||||
$attackClusters = $galaxy['clusters'];
|
||||
foreach($killChainOrder as $kc) {
|
||||
if(!isset($attackClusters[$kc])) { // undefined index
|
||||
$td = '<td class="">';
|
||||
} else {
|
||||
$clusters = $attackClusters[$kc];
|
||||
$td = '<td ';
|
||||
if ($i < count($clusters)) {
|
||||
$clusterId = $clusters[$i]['id'];
|
||||
$tagName = $clusters[$i]['tag_name'];
|
||||
$score = empty($scores[$tagName]) ? 0 : $scores[$tagName];
|
||||
$name = join(" ", array_slice(explode(" ", $clusters[$i]['value']), 0, -2)); // remove " - external_id"
|
||||
$td .= ' class="heatCell matrix-interaction ' . ($pickingMode ? 'cell-picking"' : '"');
|
||||
$td .= isset($colours[$tagName]) ? ' style="background: ' . h($colours[$tagName]) . '; color: ' . h($this->TextColour->getTextColour($colours[$tagName])) . '"' : '' ;
|
||||
$td .= ' data-score="'.h($score).'"';
|
||||
$td .= ' data-tag_name="'.h($tagName).'"';
|
||||
$td .= ' data-cluster-id="'.h($clusterId).'"';
|
||||
if ($pickingMode) {
|
||||
$td .= ' data-target-type="attribute"';
|
||||
$td .= ' data-target-id="'.h($target_id).'"';
|
||||
}
|
||||
$td .= ' title="'.h($clusters[$i]['external_id']).'"';
|
||||
$td .= '>' . h($name);
|
||||
$added = true;
|
||||
} else {
|
||||
$td .= 'class="">';
|
||||
}
|
||||
}
|
||||
$td .= '</td>';
|
||||
echo $td;
|
||||
}
|
||||
echo '</tr>';
|
||||
$i++;
|
||||
} while($added);
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -115,7 +115,7 @@ foreach($attackTactic as $tactic):
|
|||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
echo $this->Html->script('bootstrap-typeahead');
|
||||
echo $this->Html->script('attack_matrix');
|
||||
echo $this->Html->css('attack_matrix');
|
||||
echo $this->Html->script('bootstrap-typeahead');
|
||||
echo $this->Html->script('attack_matrix');
|
||||
echo $this->Html->css('attack_matrix');
|
||||
?>
|
||||
|
|
|
@ -20,6 +20,6 @@
|
|||
$content = explode("\n", $content);
|
||||
|
||||
foreach ($content as $line):
|
||||
echo '<p> ' . $line . "</p>\n";
|
||||
echo '<p> ' . $line . "</p>\n";
|
||||
endforeach;
|
||||
?>
|
||||
|
|
|
@ -6,8 +6,8 @@ Reported by : <?php echo h($event['Event']['org']); ?>
|
|||
Risk : <?php echo $event['Event']['risk']; ?>
|
||||
Attributes :
|
||||
<?php if (!empty($event['Attribute'])):
|
||||
$i = 0;
|
||||
foreach ($event['Attribute'] as $attribute): ?>
|
||||
$i = 0;
|
||||
foreach ($event['Attribute'] as $attribute): ?>
|
||||
- <?php echo $attribute['type']; echo str_repeat(' ', $appendlen - 2 - strlen( $attribute['type'])); ?>
|
||||
: <?php echo h($attribute['value']);?>
|
||||
<?php endforeach; ?><?php endif; ?>
|
||||
|
|
|
@ -14,32 +14,32 @@
|
|||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
if ($message !== 'csrf'):
|
||||
?>
|
||||
<h2><?php echo $message; ?></h2>
|
||||
<p class="error">
|
||||
<strong><?php echo __d('cake', 'Error'); ?>: </strong>
|
||||
<?php printf(
|
||||
__d('cake', 'The requested address %s was not found on this server.'),
|
||||
"<strong>'{$url}'</strong>"
|
||||
); ?>
|
||||
</p>
|
||||
<?php
|
||||
if (Configure::read('debug') > 0):
|
||||
echo $this->element('exception_stack_trace');
|
||||
endif;
|
||||
?>
|
||||
<h2><?php echo $message; ?></h2>
|
||||
<p class="error">
|
||||
<strong><?php echo __d('cake', 'Error'); ?>: </strong>
|
||||
<?php printf(
|
||||
__d('cake', 'The requested address %s was not found on this server.'),
|
||||
"<strong>'{$url}'</strong>"
|
||||
); ?>
|
||||
</p>
|
||||
<?php
|
||||
if (Configure::read('debug') > 0):
|
||||
echo $this->element('exception_stack_trace');
|
||||
endif;
|
||||
|
||||
else:
|
||||
?>
|
||||
<h2><?php echo __('You have tripped the cross-site request forgery protection of MISP');?></h2>
|
||||
<p class="error">
|
||||
<strong><?php echo __('CSRF error');?>:</strong>
|
||||
<?php echo __('This happens usually when you try to resubmit the same form with invalidated CSRF tokens or you had a form open too long and the CSRF tokens simply expired. Just go back to the previous page and refresh the form (by reloading the same url) so that the tokens get refreshed.');?>
|
||||
</p>
|
||||
<p>
|
||||
<?php echo __('Alternatively, click <a href="%s">here</a> to continue to the start page.', $baseurl);?>
|
||||
</p>
|
||||
<?php
|
||||
if (Configure::read('debug') > 0):
|
||||
echo $this->element('exception_stack_trace');
|
||||
endif;
|
||||
<h2><?php echo __('You have tripped the cross-site request forgery protection of MISP');?></h2>
|
||||
<p class="error">
|
||||
<strong><?php echo __('CSRF error');?>:</strong>
|
||||
<?php echo __('This happens usually when you try to resubmit the same form with invalidated CSRF tokens or you had a form open too long and the CSRF tokens simply expired. Just go back to the previous page and refresh the form (by reloading the same url) so that the tokens get refreshed.');?>
|
||||
</p>
|
||||
<p>
|
||||
<?php echo __('Alternatively, click <a href="%s">here</a> to continue to the start page.', $baseurl);?>
|
||||
</p>
|
||||
<?php
|
||||
if (Configure::read('debug') > 0):
|
||||
echo $this->element('exception_stack_trace');
|
||||
endif;
|
||||
endif;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<h2><?php echo $name; ?></h2>
|
||||
<p class="error">
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('%s', true), "{$message}"); ?>
|
||||
<strong><?php echo __('Error'); ?>: </strong>
|
||||
<?php printf(__('%s', true), "{$message}"); ?>
|
||||
</p>
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
?>
|
||||
<h2><?php echo $message; ?></h2>
|
||||
<p class="error">
|
||||
<strong><?php echo __d('cake', 'Error'); ?>: </strong>
|
||||
<?php echo __d('cake', 'An Internal Error Has Occurred.'); ?>
|
||||
<strong><?php echo __d('cake', 'Error'); ?>: </strong>
|
||||
<?php echo __d('cake', 'An Internal Error Has Occurred.'); ?>
|
||||
</p>
|
||||
<?php
|
||||
if (Configure::read('debug') > 0 ):
|
||||
echo $this->element('exception_stack_trace');
|
||||
echo $this->element('exception_stack_trace');
|
||||
endif;
|
||||
?>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?php echo __('Missing Database Connection');?>
|
||||
<h2><?php echo $name; ?></h2>
|
||||
<p class="error">
|
||||
<strong><?php echo __d('cake', 'Error'); ?>: </strong>
|
||||
<?php echo __d('cake', 'An Internal Error Has Occurred.'); ?>
|
||||
<strong><?php echo __d('cake', 'Error'); ?>: </strong>
|
||||
<?php echo __d('cake', 'An Internal Error Has Occurred.'); ?>
|
||||
</p>
|
||||
<?php
|
||||
if (Configure::read('debug') > 0 ):
|
||||
echo $this->element('exception_stack_trace');
|
||||
echo $this->element('exception_stack_trace');
|
||||
endif;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?php echo __('Missing Database Connection');?>
|
||||
<h2><?php echo $name; ?></h2>
|
||||
<p class="error">
|
||||
<strong><?php echo __d('cake', 'Error'); ?>: </strong>
|
||||
<?php echo __d('cake', 'An Internal Error Has Occurred.'); ?>
|
||||
<strong><?php echo __d('cake', 'Error'); ?>: </strong>
|
||||
<?php echo __d('cake', 'An Internal Error Has Occurred.'); ?>
|
||||
</p>
|
||||
<?php
|
||||
if (Configure::read('debug') > 0 ):
|
||||
echo $this->element('exception_stack_trace');
|
||||
echo $this->element('exception_stack_trace');
|
||||
endif;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?php echo __('PDO error');?>
|
||||
<h2><?php echo $name; ?></h2>
|
||||
<p class="error">
|
||||
<strong><?php echo __d('cake', 'Error'); ?>: </strong>
|
||||
<?php echo __d('cake', 'An Internal Error Has Occurred.'); ?>
|
||||
<strong><?php echo __d('cake', 'Error'); ?>: </strong>
|
||||
<?php echo __d('cake', 'An Internal Error Has Occurred.'); ?>
|
||||
</p>
|
||||
<?php
|
||||
if (Configure::read('debug') > 0 ):
|
||||
echo $this->element('exception_stack_trace');
|
||||
echo $this->element('exception_stack_trace');
|
||||
endif;
|
||||
|
|
|
@ -1,41 +1,41 @@
|
|||
<div class="eventBlacklist form">
|
||||
<?php echo $this->Form->create('EventBlacklist');?>
|
||||
<fieldset>
|
||||
<legend><?php echo __('Add Event Blacklist Entries');?></legend>
|
||||
<p><?php echo __('Simply paste a list of all the event UUIDs that you wish to block from being entered.');?></p>
|
||||
<?php
|
||||
echo $this->Form->input('uuids', array(
|
||||
'type' => 'textarea',
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge',
|
||||
'placeholder' => __('Enter a single or a list of UUIDs')
|
||||
));
|
||||
echo $this->Form->input('event_orgc', array(
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge',
|
||||
'label' => 'Creating organisation',
|
||||
'placeholder' => __('(Optional) The organisation that the event is associated with')
|
||||
));
|
||||
echo $this->Form->input('event_info', array(
|
||||
'type' => 'textarea',
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge',
|
||||
'label' => 'Event info',
|
||||
'placeholder' => __('(Optional) the event info of the event that you would like to block. It\'s best to leave this empty if you are adding a list of UUIDs.')
|
||||
));
|
||||
echo $this->Form->input('comment', array(
|
||||
'type' => 'textarea',
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge',
|
||||
'placeholder' => __('(Optional) Any comments you would like to add regarding this (or these) entries.')
|
||||
));
|
||||
?>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><?php echo __('Add Event Blacklist Entries');?></legend>
|
||||
<p><?php echo __('Simply paste a list of all the event UUIDs that you wish to block from being entered.');?></p>
|
||||
<?php
|
||||
echo $this->Form->input('uuids', array(
|
||||
'type' => 'textarea',
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge',
|
||||
'placeholder' => __('Enter a single or a list of UUIDs')
|
||||
));
|
||||
echo $this->Form->input('event_orgc', array(
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge',
|
||||
'label' => 'Creating organisation',
|
||||
'placeholder' => __('(Optional) The organisation that the event is associated with')
|
||||
));
|
||||
echo $this->Form->input('event_info', array(
|
||||
'type' => 'textarea',
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge',
|
||||
'label' => 'Event info',
|
||||
'placeholder' => __('(Optional) the event info of the event that you would like to block. It\'s best to leave this empty if you are adding a list of UUIDs.')
|
||||
));
|
||||
echo $this->Form->input('comment', array(
|
||||
'type' => 'textarea',
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge',
|
||||
'placeholder' => __('(Optional) Any comments you would like to add regarding this (or these) entries.')
|
||||
));
|
||||
?>
|
||||
</fieldset>
|
||||
<?php
|
||||
echo $this->Form->button(__('Add'), array('class' => 'btn btn-primary'));
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->element('side_menu', array('menuList' => 'admin', 'menuItem' => 'eventBlacklistsAdd'));
|
||||
echo $this->element('side_menu', array('menuList' => 'admin', 'menuItem' => 'eventBlacklistsAdd'));
|
||||
?>
|
||||
|
|
|
@ -1,35 +1,35 @@
|
|||
<div class="eventBlacklist form">
|
||||
<?php echo $this->Form->create('EventBlacklist');?>
|
||||
<fieldset>
|
||||
<legend><?php echo __('Add Event Blacklist Entries');?></legend>
|
||||
<p><?php echo __('Simply paste a list of all the event UUIDs that you wish to block from being entered.');?></p>
|
||||
<?php
|
||||
echo $this->Form->input('event_orgc', array(
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge',
|
||||
'label' => __('Creating organisation'),
|
||||
'default' => $blockEntry['EventBlacklist']['event_orgc'],
|
||||
));
|
||||
echo $this->Form->input('event_info', array(
|
||||
'type' => 'textarea',
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge',
|
||||
'label' => __('Event info'),
|
||||
'default' => $blockEntry['EventBlacklist']['event_info'],
|
||||
));
|
||||
echo $this->Form->input('comment', array(
|
||||
'type' => 'textarea',
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge',
|
||||
'default' => $blockEntry['EventBlacklist']['comment'],
|
||||
));
|
||||
?>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><?php echo __('Add Event Blacklist Entries');?></legend>
|
||||
<p><?php echo __('Simply paste a list of all the event UUIDs that you wish to block from being entered.');?></p>
|
||||
<?php
|
||||
echo $this->Form->input('event_orgc', array(
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge',
|
||||
'label' => __('Creating organisation'),
|
||||
'default' => $blockEntry['EventBlacklist']['event_orgc'],
|
||||
));
|
||||
echo $this->Form->input('event_info', array(
|
||||
'type' => 'textarea',
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge',
|
||||
'label' => __('Event info'),
|
||||
'default' => $blockEntry['EventBlacklist']['event_info'],
|
||||
));
|
||||
echo $this->Form->input('comment', array(
|
||||
'type' => 'textarea',
|
||||
'div' => 'input clear',
|
||||
'class' => 'input-xxlarge',
|
||||
'default' => $blockEntry['EventBlacklist']['comment'],
|
||||
));
|
||||
?>
|
||||
</fieldset>
|
||||
<?php
|
||||
echo $this->Form->button(__('Add'), array('class' => 'btn btn-primary'));
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->element('side_menu', array('menuList' => 'admin', 'menuItem' => 'eventBlacklistsAdd'));
|
||||
echo $this->element('side_menu', array('menuList' => 'admin', 'menuItem' => 'eventBlacklistsAdd'));
|
||||
?>
|
||||
|
|
|
@ -1,64 +1,64 @@
|
|||
<div class="eventBlacklists index">
|
||||
<h2><?php echo __('Event Blacklists');?></h2>
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<?php
|
||||
$this->Paginator->options(array(
|
||||
'update' => '.span12',
|
||||
'evalScripts' => true,
|
||||
'before' => '$(".progress").show()',
|
||||
'complete' => '$(".progress").hide()',
|
||||
));
|
||||
<h2><?php echo __('Event Blacklists');?></h2>
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<?php
|
||||
$this->Paginator->options(array(
|
||||
'update' => '.span12',
|
||||
'evalScripts' => true,
|
||||
'before' => '$(".progress").show()',
|
||||
'complete' => '$(".progress").hide()',
|
||||
));
|
||||
|
||||
echo $this->Paginator->prev('« ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
echo $this->Paginator->numbers(array('modulus' => 20, 'separator' => '', 'tag' => 'li', 'currentClass' => 'active', 'currentTag' => 'span'));
|
||||
echo $this->Paginator->next(__('next') . ' »', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<table class="table table-striped table-hover table-condensed">
|
||||
<tr>
|
||||
<th><?php echo $this->Paginator->sort('id');?></th>
|
||||
<th><?php echo $this->Paginator->sort('org');?></th>
|
||||
<th><?php echo $this->Paginator->sort('event_uuid');?></th>
|
||||
<th><?php echo $this->Paginator->sort('created');?></th>
|
||||
<th><?php echo $this->Paginator->sort('event_info');?></th>
|
||||
<th><?php echo $this->Paginator->sort('comment');?></th>
|
||||
<th class="actions"><?php echo __('Actions');?></th>
|
||||
</tr><?php
|
||||
echo $this->Paginator->prev('« ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
echo $this->Paginator->numbers(array('modulus' => 20, 'separator' => '', 'tag' => 'li', 'currentClass' => 'active', 'currentTag' => 'span'));
|
||||
echo $this->Paginator->next(__('next') . ' »', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<table class="table table-striped table-hover table-condensed">
|
||||
<tr>
|
||||
<th><?php echo $this->Paginator->sort('id');?></th>
|
||||
<th><?php echo $this->Paginator->sort('org');?></th>
|
||||
<th><?php echo $this->Paginator->sort('event_uuid');?></th>
|
||||
<th><?php echo $this->Paginator->sort('created');?></th>
|
||||
<th><?php echo $this->Paginator->sort('event_info');?></th>
|
||||
<th><?php echo $this->Paginator->sort('comment');?></th>
|
||||
<th class="actions"><?php echo __('Actions');?></th>
|
||||
</tr><?php
|
||||
foreach ($response as $item): ?>
|
||||
<tr>
|
||||
<td class="short"><?php echo h($item['EventBlacklist']['id']); ?> </td>
|
||||
<td class="short"><?php echo (isset($item['EventBlacklist']['event_orgc']) ? h($item['EventBlacklist']['event_orgc']) : ' '); ?></td>
|
||||
<td class="short"><?php echo h($item['EventBlacklist']['event_uuid']); ?> </td>
|
||||
<td><?php echo h($item['EventBlacklist']['created']); ?> </td>
|
||||
<td class="short"><?php echo (isset($item['EventBlacklist']['event_info']) ? h($item['EventBlacklist']['event_info']) : ' '); ?></td>
|
||||
<td class="short"><?php echo (isset($item['EventBlacklist']['comment']) ? h($item['EventBlacklist']['comment']) : ' '); ?></td>
|
||||
<td class="short action-links">
|
||||
<a href="<?php echo $baseurl;?>/eventBlacklists/edit/<?php echo h($item['EventBlacklist']['id']); ?>"><span class="icon-edit" title="edit" role="button" tabindex="0" aria-label="Edit blacklist entry"> </span></a>
|
||||
<?php echo $this->Form->postLink('', array('action' => 'delete', h($item['EventBlacklist']['id'])), array('class' => 'icon-trash', 'title' => 'Delete'), __('Are you sure you want to delete the blacklist entry for the event UUID %s?', h($item['EventBlacklist']['event_uuid']))); ?>
|
||||
</td>
|
||||
</tr><?php
|
||||
<tr>
|
||||
<td class="short"><?php echo h($item['EventBlacklist']['id']); ?> </td>
|
||||
<td class="short"><?php echo (isset($item['EventBlacklist']['event_orgc']) ? h($item['EventBlacklist']['event_orgc']) : ' '); ?></td>
|
||||
<td class="short"><?php echo h($item['EventBlacklist']['event_uuid']); ?> </td>
|
||||
<td><?php echo h($item['EventBlacklist']['created']); ?> </td>
|
||||
<td class="short"><?php echo (isset($item['EventBlacklist']['event_info']) ? h($item['EventBlacklist']['event_info']) : ' '); ?></td>
|
||||
<td class="short"><?php echo (isset($item['EventBlacklist']['comment']) ? h($item['EventBlacklist']['comment']) : ' '); ?></td>
|
||||
<td class="short action-links">
|
||||
<a href="<?php echo $baseurl;?>/eventBlacklists/edit/<?php echo h($item['EventBlacklist']['id']); ?>"><span class="icon-edit" title="edit" role="button" tabindex="0" aria-label="Edit blacklist entry"> </span></a>
|
||||
<?php echo $this->Form->postLink('', array('action' => 'delete', h($item['EventBlacklist']['id'])), array('class' => 'icon-trash', 'title' => 'Delete'), __('Are you sure you want to delete the blacklist entry for the event UUID %s?', h($item['EventBlacklist']['event_uuid']))); ?>
|
||||
</td>
|
||||
</tr><?php
|
||||
endforeach; ?>
|
||||
</table>
|
||||
<p>
|
||||
<?php
|
||||
echo $this->Paginator->counter(array(
|
||||
'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
|
||||
));
|
||||
?>
|
||||
</p>
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<?php
|
||||
echo $this->Paginator->prev('« ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
echo $this->Paginator->numbers(array('modulus' => 20, 'separator' => '', 'tag' => 'li', 'currentClass' => 'active', 'currentTag' => 'span'));
|
||||
echo $this->Paginator->next(__('next') . ' »', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</table>
|
||||
<p>
|
||||
<?php
|
||||
echo $this->Paginator->counter(array(
|
||||
'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
|
||||
));
|
||||
?>
|
||||
</p>
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
<?php
|
||||
echo $this->Paginator->prev('« ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
echo $this->Paginator->numbers(array('modulus' => 20, 'separator' => '', 'tag' => 'li', 'currentClass' => 'active', 'currentTag' => 'span'));
|
||||
echo $this->Paginator->next(__('next') . ' »', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
echo $this->element('side_menu', array('menuList' => 'admin', 'menuItem' => 'eventBlacklists'));
|
||||
echo $this->element('side_menu', array('menuList' => 'admin', 'menuItem' => 'eventBlacklists'));
|
||||
?>
|
||||
|
|
|
@ -2,21 +2,21 @@
|
|||
<div class="legend"><?php echo __('Accept Delegation Request');?></div>
|
||||
<div style="padding-left:5px;padding-right:5px;padding-bottom:5px;">
|
||||
<p><?php echo __('Are you sure you would like to accept the request by %s to take ownership of Event #%s', h($delegationRequest['RequesterOrg']['name']), h($delegationRequest['Event']['id']));?>?</p>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align:top">
|
||||
<?php
|
||||
echo $this->Form->create('EventDelegation', array('style' => 'margin:0px;', 'id' => 'PromptForm'));
|
||||
echo $this->Form->submit(__('Yes'), array('div' => false, 'class' => 'btn btn-primary'));
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</td>
|
||||
<td style="width:540px;">
|
||||
</td>
|
||||
<td style="vertical-align:top;">
|
||||
<span title="<?php echo __('Cancel');?>" role="button" tabindex="0" aria-label="<?php echo __('Cancel');?>" class="btn btn-inverse" id="PromptNoButton" onClick="cancelPrompt();"><?php echo __('No');?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align:top">
|
||||
<?php
|
||||
echo $this->Form->create('EventDelegation', array('style' => 'margin:0px;', 'id' => 'PromptForm'));
|
||||
echo $this->Form->submit(__('Yes'), array('div' => false, 'class' => 'btn btn-primary'));
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</td>
|
||||
<td style="width:540px;">
|
||||
</td>
|
||||
<td style="vertical-align:top;">
|
||||
<span title="<?php echo __('Cancel');?>" role="button" tabindex="0" aria-label="<?php echo __('Cancel');?>" class="btn btn-inverse" id="PromptNoButton" onClick="cancelPrompt();"><?php echo __('No');?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,54 +1,54 @@
|
|||
<div class="popover_choice" style="padding-bottom:5px;">
|
||||
<div class="legend"><?php echo __('Delegate the publishing of the Event to another organisation');?></div>
|
||||
<p class="white" style="background:red;"><?php echo __('Warning: You are about to request another organisation to take ownership of this event.');?></p>
|
||||
<div class="popover_choice_main overlay_spacing bottomGap" id ="popover_choice_main">
|
||||
<?php
|
||||
echo $this->Form->create('EventDelegation', array('style' => 'margin:0px;', 'id' => 'PromptForm'));
|
||||
echo $this->Form->input('org_id', array(
|
||||
'label' => __('Target Organisation'),
|
||||
'options' => array($org),
|
||||
'empty' => __('Select organisation'),
|
||||
'div' => 'clear'
|
||||
));
|
||||
echo $this->Form->input('distribution', array(
|
||||
'options' => $distributionOptions,
|
||||
'label' => __('Desired Distribution'),
|
||||
));
|
||||
?>
|
||||
<div id="sgid" class="hidden">
|
||||
<?php
|
||||
echo $this->Form->input('sharing_group_id', array(
|
||||
'options' => $sgOptions,
|
||||
'label' => __('Desired Sharing Group'),
|
||||
'div' => false
|
||||
));
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->input('message', array(
|
||||
'label' => false,
|
||||
'div' => false,
|
||||
'type' => 'textarea',
|
||||
'style' => 'width:665px;',
|
||||
'placeholder' => __('Message to the recipient organisation')
|
||||
));
|
||||
echo $this->Form->submit(__('Yes'), array('div' => false, 'class' => 'btn btn-primary'));
|
||||
?>
|
||||
<span role="button" tabindex="0" aria-label="<?php echo __('Cancel');?>" title="<?php echo __('Cancel');?>" class="btn btn-inverse" id="PromptNoButton" onClick="cancelPopoverForm();" style="float:right;"><?php echo __('No');?></span>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
?>
|
||||
<div class="legend"><?php echo __('Delegate the publishing of the Event to another organisation');?></div>
|
||||
<p class="white" style="background:red;"><?php echo __('Warning: You are about to request another organisation to take ownership of this event.');?></p>
|
||||
<div class="popover_choice_main overlay_spacing bottomGap" id ="popover_choice_main">
|
||||
<?php
|
||||
echo $this->Form->create('EventDelegation', array('style' => 'margin:0px;', 'id' => 'PromptForm'));
|
||||
echo $this->Form->input('org_id', array(
|
||||
'label' => __('Target Organisation'),
|
||||
'options' => array($org),
|
||||
'empty' => __('Select organisation'),
|
||||
'div' => 'clear'
|
||||
));
|
||||
echo $this->Form->input('distribution', array(
|
||||
'options' => $distributionOptions,
|
||||
'label' => __('Desired Distribution'),
|
||||
));
|
||||
?>
|
||||
<div id="sgid" class="hidden">
|
||||
<?php
|
||||
echo $this->Form->input('sharing_group_id', array(
|
||||
'options' => $sgOptions,
|
||||
'label' => __('Desired Sharing Group'),
|
||||
'div' => false
|
||||
));
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->input('message', array(
|
||||
'label' => false,
|
||||
'div' => false,
|
||||
'type' => 'textarea',
|
||||
'style' => 'width:665px;',
|
||||
'placeholder' => __('Message to the recipient organisation')
|
||||
));
|
||||
echo $this->Form->submit(__('Yes'), array('div' => false, 'class' => 'btn btn-primary'));
|
||||
?>
|
||||
<span role="button" tabindex="0" aria-label="<?php echo __('Cancel');?>" title="<?php echo __('Cancel');?>" class="btn btn-inverse" id="PromptNoButton" onClick="cancelPopoverForm();" style="float:right;"><?php echo __('No');?></span>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
?>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#EventDelegationDistribution').change(function() {
|
||||
if ($('#EventDelegationDistribution').val() == 4) $('#sgid').show();
|
||||
else $('#sgid').hide();
|
||||
});
|
||||
$('#EventDelegationDistribution').change(function() {
|
||||
if ($('#EventDelegationDistribution').val() == 4) $('#sgid').show();
|
||||
else $('#sgid').hide();
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
<div class="confirmation">
|
||||
<div class="legend"><?php echo __('Delete Delegation Request');?></div>
|
||||
<div style="padding-left:5px;padding-right:5px;padding-bottom:5px;">
|
||||
<p><?php echo __('Are you sure you would like to discard the request by %s to take ownership of Event #%s', h($delegationRequest['RequesterOrg']['name']), h($delegationRequest['Event']['id']));?>?</p>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align:top">
|
||||
<?php
|
||||
echo $this->Form->create('EventDelegation', array('style' => 'margin:0px;', 'id' => 'PromptForm'));
|
||||
echo $this->Form->submit(__('Yes'), array('div' => false, 'class' => 'btn btn-primary'));
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</td>
|
||||
<td style="width:540px;">
|
||||
</td>
|
||||
<td style="vertical-align:top;">
|
||||
<span role="button" tabindex="0" aria-label="<?php echo __('Cancel');?>" title="<?php echo __('Cancel');?>" class="btn btn-inverse" id="PromptNoButton" onClick="cancelPrompt();"><?php echo __('No');?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="legend"><?php echo __('Delete Delegation Request');?></div>
|
||||
<div style="padding-left:5px;padding-right:5px;padding-bottom:5px;">
|
||||
<p><?php echo __('Are you sure you would like to discard the request by %s to take ownership of Event #%s', h($delegationRequest['RequesterOrg']['name']), h($delegationRequest['Event']['id']));?>?</p>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align:top">
|
||||
<?php
|
||||
echo $this->Form->create('EventDelegation', array('style' => 'margin:0px;', 'id' => 'PromptForm'));
|
||||
echo $this->Form->submit(__('Yes'), array('div' => false, 'class' => 'btn btn-primary'));
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</td>
|
||||
<td style="width:540px;">
|
||||
</td>
|
||||
<td style="vertical-align:top;">
|
||||
<span role="button" tabindex="0" aria-label="<?php echo __('Cancel');?>" title="<?php echo __('Cancel');?>" class="btn btn-inverse" id="PromptNoButton" onClick="cancelPrompt();"><?php echo __('No');?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -8,19 +8,19 @@ $requester = $me['org_id'] == $delegation['RequesterOrg']['id'] ? __('Your organ
|
|||
<p>
|
||||
<b><?php echo __('Request details</b><br /><span class="red bold">%s</span> is requesting <span class="red bold">%s</span> to take over this event.', h($requester), h($target));?>
|
||||
<?php if ($delegation['EventDelegation']['distribution'] != -1): ?>
|
||||
<?php if ($delegation['EventDelegation']['distribution'] < 4): ?> <br />
|
||||
<?php echo __('The desired distribution level is');?> <span class="red bold"><?php echo h($delegation['requested_distribution_level']);?></span>
|
||||
<?php else: ?>
|
||||
<?php echo __('The desired sharing group to distribute the event to is');?>: <span class="red bold"><?php echo h($delegation['SharingGroup']['name']);?></span>.
|
||||
<?php endif;?>
|
||||
<?php if ($delegation['EventDelegation']['distribution'] < 4): ?> <br />
|
||||
<?php echo __('The desired distribution level is');?> <span class="red bold"><?php echo h($delegation['requested_distribution_level']);?></span>
|
||||
<?php else: ?>
|
||||
<?php echo __('The desired sharing group to distribute the event to is');?>: <span class="red bold"><?php echo h($delegation['SharingGroup']['name']);?></span>.
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
<p><b><?php echo __('Message from requester');?></b><br /><?php echo h($delegation['EventDelegation']['message']); ?></p>
|
||||
<div class="row-fluid">
|
||||
<?php if ($isSiteAdmin || $me['org_id'] == $delegation['Org']['id']):?>
|
||||
<span role="button" tabindex="0" aria-label="<?php echo __('Accept delegation request');?>" title="<?php echo __('Accept delegation request');?>" class="btn btn-primary" onClick="genericPopup('<?php echo $baseurl?>/event_delegations/acceptDelegation/<?php echo h($delegation['EventDelegation']['id']); ?>', '#confirmation_box');"><?php echo __('Accept');?></span>
|
||||
<?php endif;?>
|
||||
<span role="button" tabindex="0" aria-label="<?php echo __('Decline and remove delegation request');?>" title="<?php echo __('Decline and remove delegation request');?>" class="btn btn-inverse" onClick="genericPopup('<?php echo $baseurl?>/event_delegations/deleteDelegation/<?php echo h($delegation['EventDelegation']['id']); ?>', '#confirmation_box');"><?php echo __('Discard');?></span>
|
||||
<span role="button" tabindex="0" aria-label="<?php echo __('Cancel');?>" title="<?php echo __('Cancel');?>" class="btn btn-inverse" style="float:right;" id="PromptNoButton" onClick="cancelPrompt();"><?php echo __('Cancel');?></span>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<?php if ($isSiteAdmin || $me['org_id'] == $delegation['Org']['id']):?>
|
||||
<span role="button" tabindex="0" aria-label="<?php echo __('Accept delegation request');?>" title="<?php echo __('Accept delegation request');?>" class="btn btn-primary" onClick="genericPopup('<?php echo $baseurl?>/event_delegations/acceptDelegation/<?php echo h($delegation['EventDelegation']['id']); ?>', '#confirmation_box');"><?php echo __('Accept');?></span>
|
||||
<?php endif;?>
|
||||
<span role="button" tabindex="0" aria-label="<?php echo __('Decline and remove delegation request');?>" title="<?php echo __('Decline and remove delegation request');?>" class="btn btn-inverse" onClick="genericPopup('<?php echo $baseurl?>/event_delegations/deleteDelegation/<?php echo h($delegation['EventDelegation']['id']); ?>', '#confirmation_box');"><?php echo __('Discard');?></span>
|
||||
<span role="button" tabindex="0" aria-label="<?php echo __('Cancel');?>" title="<?php echo __('Cancel');?>" class="btn btn-inverse" style="float:right;" id="PromptNoButton" onClick="cancelPrompt();"><?php echo __('Cancel');?></span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
<?php
|
||||
$url_params = $action == 'add' ? 'add/' . $event_id : 'edit/' . $eventGraph['id'];
|
||||
echo $this->Form->create('EventGraph', array('url' => '/EventGraph/' . $url_params));
|
||||
$url_params = $action == 'add' ? 'add/' . $event_id : 'edit/' . $eventGraph['id'];
|
||||
echo $this->Form->create('EventGraph', array('url' => '/EventGraph/' . $url_params));
|
||||
?>
|
||||
<fieldset>
|
||||
<legend><?php echo $action == 'add' ? __('Add EventGraph') : __('Edit EventGraph'); ?></legend>
|
||||
<div class="add_eventgraph_fields">
|
||||
<?php
|
||||
echo $this->Form->hidden('event_id');
|
||||
echo $this->Form->input('network_name', array(
|
||||
'type' => 'text'
|
||||
));
|
||||
echo $this->Form->input('network_json', array(
|
||||
'type' => 'textarea'
|
||||
));
|
||||
echo $this->Form->input('preview_img', array(
|
||||
'type' => 'textarea'
|
||||
));
|
||||
<fieldset>
|
||||
<legend><?php echo $action == 'add' ? __('Add EventGraph') : __('Edit EventGraph'); ?></legend>
|
||||
<div class="add_eventgraph_fields">
|
||||
<?php
|
||||
echo $this->Form->hidden('event_id');
|
||||
echo $this->Form->input('network_name', array(
|
||||
'type' => 'text'
|
||||
));
|
||||
echo $this->Form->input('network_json', array(
|
||||
'type' => 'textarea'
|
||||
));
|
||||
echo $this->Form->input('preview_img', array(
|
||||
'type' => 'textarea'
|
||||
));
|
||||
|
||||
echo $this->Form->button(__($action));
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
</fieldset>
|
||||
echo $this->Form->button(__($action));
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
<div class="confirmation">
|
||||
<?php
|
||||
echo $this->Form->create('EventGraph', array('style' => 'margin:0px;', 'id' => 'PromptForm'));
|
||||
echo $this->Form->create('EventGraph', array('style' => 'margin:0px;', 'id' => 'PromptForm'));
|
||||
?>
|
||||
<legend><?php echo __('EventGraph Deletion'); ?></legend>
|
||||
<div style="padding-left:5px;padding-right:5px;padding-bottom:5px;">
|
||||
<?php
|
||||
$message = __('Are you sure you want to delete eventGraph #%s? The eventGraph will be permanently deleted and unrecoverable.', h($id));
|
||||
$message = __('Are you sure you want to delete eventGraph #%s? The eventGraph will be permanently deleted and unrecoverable.', h($id));
|
||||
?>
|
||||
<p><?php echo $message; ?></p>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align:top">
|
||||
<span id="PromptYesButton" title="<?php echo __('Delete'); ?>" role="button" tabindex="0" aria-label="<?php echo __('Delete'); ?>" class="btn btn-primary" onClick="submitDeletion(<?php echo 'scope_id'; ?>, 'delete', 'eventGraph', '<?php echo h($id) ;?>')"><?php echo __('Yes'); ?></span>
|
||||
</td>
|
||||
<td style="width:540px;">
|
||||
</td>
|
||||
<td style="vertical-align:top;">
|
||||
<span class="btn btn-inverse" title="<?php echo __('No'); ?>" role="button" tabindex="0" aria-label="<?php echo __('No'); ?>" id="PromptNoButton" onClick="cancelPrompt();"><?php echo __('No'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align:top">
|
||||
<span id="PromptYesButton" title="<?php echo __('Delete'); ?>" role="button" tabindex="0" aria-label="<?php echo __('Delete'); ?>" class="btn btn-primary" onClick="submitDeletion(<?php echo 'scope_id'; ?>, 'delete', 'eventGraph', '<?php echo h($id) ;?>')"><?php echo __('Yes'); ?></span>
|
||||
</td>
|
||||
<td style="width:540px;">
|
||||
</td>
|
||||
<td style="vertical-align:top;">
|
||||
<span class="btn btn-inverse" title="<?php echo __('No'); ?>" role="button" tabindex="0" aria-label="<?php echo __('No'); ?>" id="PromptNoButton" onClick="cancelPrompt();"><?php echo __('No'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
|
|
|
@ -1,112 +1,112 @@
|
|||
<div class="events form">
|
||||
<div class="message">
|
||||
<?php echo __('The event created %s, but not synchronised to other MISP instances until it is published.', (Configure::read('MISP.unpublishedprivate') ? __('will be restricted to your organisation') : __('will be visible to the organisations having an account on this platform')));?>
|
||||
</div>
|
||||
<div class="message">
|
||||
<?php echo __('The event created %s, but not synchronised to other MISP instances until it is published.', (Configure::read('MISP.unpublishedprivate') ? __('will be restricted to your organisation') : __('will be visible to the organisations having an account on this platform')));?>
|
||||
</div>
|
||||
|
||||
<?php echo $this->Form->create('', array('type' => 'file'));?>
|
||||
<fieldset>
|
||||
<legend><?php echo __('Add Event');?></legend>
|
||||
<?php
|
||||
echo $this->Form->input('date', array(
|
||||
'type' => 'text',
|
||||
'class' => 'datepicker'
|
||||
));
|
||||
if (isset($this->request->data['Event']['distribution'])) {
|
||||
$initialDistribution = $this->request->data['Event']['distribution'];
|
||||
} else {
|
||||
$initialDistribution = 3;
|
||||
if (Configure::read('MISP.default_event_distribution') != null) {
|
||||
$initialDistribution = Configure::read('MISP.default_event_distribution');
|
||||
}
|
||||
}
|
||||
echo $this->Form->input('distribution', array(
|
||||
'options' => array($distributionLevels),
|
||||
'label' => __('Distribution ') . $this->element('formInfo', array('type' => 'distribution')),
|
||||
'selected' => $initialDistribution,
|
||||
));
|
||||
$style = $initialDistribution == 4 ? '' : 'style="display:none"';
|
||||
?>
|
||||
<div id="SGContainer" <?php echo $style; ?>>
|
||||
<?php
|
||||
if (!empty($sharingGroups)) {
|
||||
echo $this->Form->input('sharing_group_id', array(
|
||||
'options' => array($sharingGroups),
|
||||
'label' => __('Sharing Group'),
|
||||
));
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
if (isset($this->request->data['Event']['threat_level_id'])) {
|
||||
$selected = $this->request->data['Event']['threat_level_id'];
|
||||
} else {
|
||||
$selected = Configure::read('MISP.default_event_threat_level') ? Configure::read('MISP.default_event_threat_level') : '4';
|
||||
}
|
||||
<fieldset>
|
||||
<legend><?php echo __('Add Event');?></legend>
|
||||
<?php
|
||||
echo $this->Form->input('date', array(
|
||||
'type' => 'text',
|
||||
'class' => 'datepicker'
|
||||
));
|
||||
if (isset($this->request->data['Event']['distribution'])) {
|
||||
$initialDistribution = $this->request->data['Event']['distribution'];
|
||||
} else {
|
||||
$initialDistribution = 3;
|
||||
if (Configure::read('MISP.default_event_distribution') != null) {
|
||||
$initialDistribution = Configure::read('MISP.default_event_distribution');
|
||||
}
|
||||
}
|
||||
echo $this->Form->input('distribution', array(
|
||||
'options' => array($distributionLevels),
|
||||
'label' => __('Distribution ') . $this->element('formInfo', array('type' => 'distribution')),
|
||||
'selected' => $initialDistribution,
|
||||
));
|
||||
$style = $initialDistribution == 4 ? '' : 'style="display:none"';
|
||||
?>
|
||||
<div id="SGContainer" <?php echo $style; ?>>
|
||||
<?php
|
||||
if (!empty($sharingGroups)) {
|
||||
echo $this->Form->input('sharing_group_id', array(
|
||||
'options' => array($sharingGroups),
|
||||
'label' => __('Sharing Group'),
|
||||
));
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
if (isset($this->request->data['Event']['threat_level_id'])) {
|
||||
$selected = $this->request->data['Event']['threat_level_id'];
|
||||
} else {
|
||||
$selected = Configure::read('MISP.default_event_threat_level') ? Configure::read('MISP.default_event_threat_level') : '4';
|
||||
}
|
||||
|
||||
echo $this->Form->input('threat_level_id', array(
|
||||
'div' => 'input clear',
|
||||
'label' => __('Threat Level ') . $this->element('formInfo', array('type' => 'threat_level')),
|
||||
'selected' => $selected,
|
||||
));
|
||||
echo $this->Form->input('analysis', array(
|
||||
'label' => __('Analysis ') . $this->element('formInfo', array('type' => 'analysis')),
|
||||
'options' => array($analysisLevels),
|
||||
));
|
||||
echo $this->Form->input('info', array(
|
||||
'label' => __('Event Info'),
|
||||
'div' => 'clear',
|
||||
'type' => 'text',
|
||||
'class' => 'form-control span6',
|
||||
'placeholder' => __('Quick Event Description or Tracking Info')
|
||||
));
|
||||
echo $this->Form->input('extends_uuid', array(
|
||||
'label' => __('Extends event'),
|
||||
'div' => 'clear',
|
||||
'class' => 'form-control span6',
|
||||
'placeholder' => __('Event UUID or ID. Leave blank if not applicable.')
|
||||
));
|
||||
?>
|
||||
<div id="extended_event_preview" style="width:446px;"></div>
|
||||
</fieldset>
|
||||
echo $this->Form->input('threat_level_id', array(
|
||||
'div' => 'input clear',
|
||||
'label' => __('Threat Level ') . $this->element('formInfo', array('type' => 'threat_level')),
|
||||
'selected' => $selected,
|
||||
));
|
||||
echo $this->Form->input('analysis', array(
|
||||
'label' => __('Analysis ') . $this->element('formInfo', array('type' => 'analysis')),
|
||||
'options' => array($analysisLevels),
|
||||
));
|
||||
echo $this->Form->input('info', array(
|
||||
'label' => __('Event Info'),
|
||||
'div' => 'clear',
|
||||
'type' => 'text',
|
||||
'class' => 'form-control span6',
|
||||
'placeholder' => __('Quick Event Description or Tracking Info')
|
||||
));
|
||||
echo $this->Form->input('extends_uuid', array(
|
||||
'label' => __('Extends event'),
|
||||
'div' => 'clear',
|
||||
'class' => 'form-control span6',
|
||||
'placeholder' => __('Event UUID or ID. Leave blank if not applicable.')
|
||||
));
|
||||
?>
|
||||
<div id="extended_event_preview" style="width:446px;"></div>
|
||||
</fieldset>
|
||||
<?php
|
||||
echo $this->Form->button(__('Add'), array('class' => 'btn btn-primary'));
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->element('side_menu', array('menuList' => 'event-collection', 'menuItem' => 'add'));
|
||||
echo $this->element('side_menu', array('menuList' => 'event-collection', 'menuItem' => 'add'));
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
<?php
|
||||
$formInfoTypes = array('distribution' => 'Distribution', 'analysis' => 'Analysis', 'threat_level' => 'ThreatLevelId');
|
||||
echo 'var formInfoFields = ' . json_encode($formInfoTypes) . PHP_EOL;
|
||||
foreach ($formInfoTypes as $formInfoType => $humanisedName) {
|
||||
echo 'var ' . $formInfoType . 'FormInfoValues = {' . PHP_EOL;
|
||||
foreach ($info[$formInfoType] as $key => $formInfoData) {
|
||||
echo '"' . $key . '": "<span class=\"blue bold\">' . h($formInfoData['key']) . '</span>: ' . h($formInfoData['desc']) . '<br />",' . PHP_EOL;
|
||||
}
|
||||
echo '}' . PHP_EOL;
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
$formInfoTypes = array('distribution' => 'Distribution', 'analysis' => 'Analysis', 'threat_level' => 'ThreatLevelId');
|
||||
echo 'var formInfoFields = ' . json_encode($formInfoTypes) . PHP_EOL;
|
||||
foreach ($formInfoTypes as $formInfoType => $humanisedName) {
|
||||
echo 'var ' . $formInfoType . 'FormInfoValues = {' . PHP_EOL;
|
||||
foreach ($info[$formInfoType] as $key => $formInfoData) {
|
||||
echo '"' . $key . '": "<span class=\"blue bold\">' . h($formInfoData['key']) . '</span>: ' . h($formInfoData['desc']) . '<br />",' . PHP_EOL;
|
||||
}
|
||||
echo '}' . PHP_EOL;
|
||||
}
|
||||
?>
|
||||
|
||||
$('#EventDistribution').change(function() {
|
||||
if ($('#EventDistribution').val() == 4) $('#SGContainer').show();
|
||||
else $('#SGContainer').hide();
|
||||
});
|
||||
$('#EventDistribution').change(function() {
|
||||
if ($('#EventDistribution').val() == 4) $('#SGContainer').show();
|
||||
else $('#SGContainer').hide();
|
||||
});
|
||||
|
||||
$("#EventDistribution, #EventAnalysis, #EventThreatLevelId").change(function() {
|
||||
initPopoverContent('Event');
|
||||
});
|
||||
$("#EventDistribution, #EventAnalysis, #EventThreatLevelId").change(function() {
|
||||
initPopoverContent('Event');
|
||||
});
|
||||
|
||||
$("#EventExtendsUuid").keyup(function() {
|
||||
previewEventBasedOnUuids();
|
||||
});
|
||||
$("#EventExtendsUuid").keyup(function() {
|
||||
previewEventBasedOnUuids();
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
if ($('#EventDistribution').val() == 4) $('#SGContainer').show();
|
||||
else $('#SGContainer').hide();
|
||||
initPopoverContent('Event');
|
||||
});
|
||||
$(document).ready(function() {
|
||||
if ($('#EventDistribution').val() == 4) $('#SGContainer').show();
|
||||
else $('#SGContainer').hide();
|
||||
initPopoverContent('Event');
|
||||
});
|
||||
</script>
|
||||
<?php echo $this->Js->writeBuffer();
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
<div class="events form">
|
||||
<?php echo $this->Form->create('Event', array('type' => 'file'));?>
|
||||
<fieldset>
|
||||
<legend><?php echo __('Import OpenIOC'); ?></legend>
|
||||
<fieldset>
|
||||
<legend><?php echo __('Import OpenIOC'); ?></legend>
|
||||
<?php
|
||||
echo $this->Form->input('Event.submittedioc', array(
|
||||
'label' => '<b>OpenIOC</b>',
|
||||
'type' => 'file',
|
||||
'label' => '<b>OpenIOC</b>',
|
||||
'type' => 'file',
|
||||
));
|
||||
?>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
<?php
|
||||
echo $this->Form->button(__('Upload'), array('class' => 'btn btn-primary'));
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
$event['Event']['id'] = $id;
|
||||
$event['Event']['published'] = $published;
|
||||
echo $this->element('side_menu', array('menuList' => 'event', 'menuItem' => 'addIOC', 'event' => $event));
|
||||
$event['Event']['id'] = $id;
|
||||
$event['Event']['published'] = $published;
|
||||
echo $this->element('side_menu', array('menuList' => 'event', 'menuItem' => 'addIOC', 'event' => $event));
|
||||
?>
|
||||
|
|
|
@ -1,33 +1,33 @@
|
|||
<div class="events form">
|
||||
<?php echo $this->Form->create('Event', array('type' => 'file'));?>
|
||||
<fieldset>
|
||||
<legend><?php echo __('Import from MISP Export File'); ?></legend>
|
||||
<fieldset>
|
||||
<legend><?php echo __('Import from MISP Export File'); ?></legend>
|
||||
<?php
|
||||
echo $this->Form->input('Event.submittedfile', array(
|
||||
'label' => '<b>' . __('MISP XML or JSON file') . '</b>',
|
||||
'type' => 'file',
|
||||
));
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
<?php
|
||||
if (Configure::read('MISP.take_ownership_xml_import')):
|
||||
echo $this->Form->input('Event.takeownership', array(
|
||||
'checked' => false,
|
||||
'label' => __('Take ownership of the event'),
|
||||
'title' => __('Warning: This will change the creator organisation of the event, tampering with the event\'s ownership and releasability and can lead to unexpected behaviour when synchronising the event with instances that have another creator for the same event.)'
|
||||
)));
|
||||
endif;
|
||||
echo $this->Form->input('publish', array(
|
||||
'checked' => false,
|
||||
'label' => __('Publish imported events'),
|
||||
));
|
||||
echo $this->Form->input('Event.submittedfile', array(
|
||||
'label' => '<b>' . __('MISP XML or JSON file') . '</b>',
|
||||
'type' => 'file',
|
||||
));
|
||||
?>
|
||||
<div class="input clear"></div>
|
||||
<?php
|
||||
if (Configure::read('MISP.take_ownership_xml_import')):
|
||||
echo $this->Form->input('Event.takeownership', array(
|
||||
'checked' => false,
|
||||
'label' => __('Take ownership of the event'),
|
||||
'title' => __('Warning: This will change the creator organisation of the event, tampering with the event\'s ownership and releasability and can lead to unexpected behaviour when synchronising the event with instances that have another creator for the same event.)'
|
||||
)));
|
||||
endif;
|
||||
echo $this->Form->input('publish', array(
|
||||
'checked' => false,
|
||||
'label' => __('Publish imported events'),
|
||||
));
|
||||
?>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
<?php
|
||||
echo $this->Form->button(__('Upload'), array('class' => 'btn btn-primary'));
|
||||
echo $this->Form->end();
|
||||
echo $this->Form->button(__('Upload'), array('class' => 'btn btn-primary'));
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->element('side_menu', array('menuList' => 'event-collection', 'menuItem' => 'addMISPExport'));
|
||||
echo $this->element('side_menu', array('menuList' => 'event-collection', 'menuItem' => 'addMISPExport'));
|
||||
?>
|
||||
|
|
|
@ -1,50 +1,50 @@
|
|||
<div class="eventAddXML index">
|
||||
<h2><?php echo __('Add From MISP Export Result');?></h2>
|
||||
<table class="table table-striped table-hover table-condensed">
|
||||
<tr>
|
||||
<th><?php echo __('Event info');?></th>
|
||||
<th><?php echo __('Result');?></th>
|
||||
<th><?php echo __('Details');?></th>
|
||||
<h2><?php echo __('Add From MISP Export Result');?></h2>
|
||||
<table class="table table-striped table-hover table-condensed">
|
||||
<tr>
|
||||
<th><?php echo __('Event info');?></th>
|
||||
<th><?php echo __('Result');?></th>
|
||||
<th><?php echo __('Details');?></th>
|
||||
|
||||
</tr>
|
||||
</tr>
|
||||
<?php
|
||||
App::uses('JSONConverterTool', 'Tools');
|
||||
$converter = new JSONConverterTool();
|
||||
foreach ($results as &$result):
|
||||
if ($result['result'] === false) {
|
||||
$status = __('Failed');
|
||||
} else {
|
||||
$status = ucfirst($result['result']);
|
||||
}
|
||||
$text = '';
|
||||
$colour = 'red';
|
||||
if ($result['result'] === true) {
|
||||
$colour = 'green';
|
||||
$status = __('OK');
|
||||
$text = __('Event created.');
|
||||
} else if (is_numeric($result['result'])) {
|
||||
$text = __('Event with this UUID already exists.');
|
||||
}
|
||||
if (!empty($result['validationIssues'])) $result['validationIssues'] = $converter->arrayPrinter($result['validationIssues']);
|
||||
else $result['validationIssues'] = false;
|
||||
App::uses('JSONConverterTool', 'Tools');
|
||||
$converter = new JSONConverterTool();
|
||||
foreach ($results as &$result):
|
||||
if ($result['result'] === false) {
|
||||
$status = __('Failed');
|
||||
} else {
|
||||
$status = ucfirst($result['result']);
|
||||
}
|
||||
$text = '';
|
||||
$colour = 'red';
|
||||
if ($result['result'] === true) {
|
||||
$colour = 'green';
|
||||
$status = __('OK');
|
||||
$text = __('Event created.');
|
||||
} else if (is_numeric($result['result'])) {
|
||||
$text = __('Event with this UUID already exists.');
|
||||
}
|
||||
if (!empty($result['validationIssues'])) $result['validationIssues'] = $converter->arrayPrinter($result['validationIssues']);
|
||||
else $result['validationIssues'] = false;
|
||||
?>
|
||||
<tr>
|
||||
<td class="short"><?php echo h($result['info']); ?> </td>
|
||||
<td class="short" style="color:<?php echo $colour; ?>"><?php echo h($status); ?> </td>
|
||||
<td class="short">
|
||||
<?php
|
||||
if ($result['validationIssues']) echo nl2br(h($result['validationIssues']));
|
||||
echo nl2br(h($text));
|
||||
if (0 !== ($result['id'])) echo ' <a href="' . $baseurl . '/events/view/' . h($result['id']) . '">' . __('Event ') . h($result['id']) . '</a>';
|
||||
?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="short"><?php echo h($result['info']); ?> </td>
|
||||
<td class="short" style="color:<?php echo $colour; ?>"><?php echo h($status); ?> </td>
|
||||
<td class="short">
|
||||
<?php
|
||||
if ($result['validationIssues']) echo nl2br(h($result['validationIssues']));
|
||||
echo nl2br(h($text));
|
||||
if (0 !== ($result['id'])) echo ' <a href="' . $baseurl . '/events/view/' . h($result['id']) . '">' . __('Event ') . h($result['id']) . '</a>';
|
||||
?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
endforeach;
|
||||
endforeach;
|
||||
?>
|
||||
</table>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
echo $this->element('side_menu', array('menuList' => 'event-collection', 'menuItem' => 'addMISPExport'));
|
||||
echo $this->element('side_menu', array('menuList' => 'event-collection', 'menuItem' => 'addMISPExport'));
|
||||
?>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
$mayModify = (($isAclModify && $event['Event']['user_id'] == $me['id'] && $event['Event']['orgc_id'] == $me['org_id']) || ($isAclModifyOrg && $event['Event']['orgc_id'] == $me['org_id']));
|
||||
echo $this->element('ajaxTags', array('event' => $event, 'tags' => $tags, 'tagAccess' => ($isSiteAdmin || $mayModify || $me['org_id'] == $event['Event']['org_id'])));
|
||||
$mayModify = (($isAclModify && $event['Event']['user_id'] == $me['id'] && $event['Event']['orgc_id'] == $me['org_id']) || ($isAclModifyOrg && $event['Event']['orgc_id'] == $me['org_id']));
|
||||
echo $this->element('ajaxTags', array('event' => $event, 'tags' => $tags, 'tagAccess' => ($isSiteAdmin || $mayModify || $me['org_id'] == $event['Event']['org_id'])));
|
||||
?>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue