mirror of https://github.com/MISP/MISP
new: [cryptographic keys] views added
parent
f74d664ce7
commit
b1b32fe1f9
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
echo '<span class="hidden instanceKeyContainer"></span>';
|
||||
echo $this->element('genericElements/Form/genericForm', [
|
||||
'data' => [
|
||||
'description' => __('Add a signing key to be used to validate the origin of event updates. By putting an event into protected mode, the event cannot reliably be propagated to / updated at instances beyond the reach of those that can sign with the listed keys below.'),
|
||||
'model' => 'CryptographicKey',
|
||||
'title' => __('Add Cryptographic key'),
|
||||
'fields' => [
|
||||
[
|
||||
'field' => 'type',
|
||||
'class' => 'span6',
|
||||
'type' => 'dropdown',
|
||||
'options' => [
|
||||
'pgp' => 'PGP'
|
||||
]
|
||||
],
|
||||
[
|
||||
'field' => 'instance_key',
|
||||
'type' => 'action',
|
||||
'class' => 'btn btn-inverse',
|
||||
'icon' => 'key',
|
||||
'text' => __('Use the instance\'s signing key'),
|
||||
'onClick' => 'insertInstanceKey();'
|
||||
],
|
||||
[
|
||||
'field' => 'key_data',
|
||||
'label' => __('Key contents'),
|
||||
'type' => 'textarea',
|
||||
'class' => 'input span6'
|
||||
],
|
||||
],
|
||||
'submit' => [
|
||||
'action' => $this->request->params['action'],
|
||||
'ajaxSubmit' => 'submitGenericFormInPlace();'
|
||||
]
|
||||
]
|
||||
]);
|
||||
|
||||
if (!$ajax) {
|
||||
echo $this->element('/genericElements/SideMenu/side_menu', $menuData);
|
||||
}
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
var instanceKey = <?= json_encode(h($instanceKey)); ?>;
|
||||
function insertInstanceKey() {
|
||||
$('#CryptographicKeyKeyData').val(instanceKey);
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
echo $this->element(
|
||||
'genericElements/SingleViews/single_view',
|
||||
[
|
||||
'title' => 'Cryptographic key view',
|
||||
'data' => $data,
|
||||
'fields' => [
|
||||
[
|
||||
'key' => __('type'),
|
||||
'path' => 'CryptographicKey.type'
|
||||
],
|
||||
[
|
||||
'key' => __('key_data'),
|
||||
'path' => 'CryptographicKey.key_data'
|
||||
]
|
||||
]
|
||||
]
|
||||
);
|
Loading…
Reference in New Issue