mirror of https://github.com/MISP/MISP
Merge branch '2.4' into guides
commit
6add4364f0
|
@ -269,6 +269,10 @@ checkFlavour () {
|
|||
}
|
||||
|
||||
checkInstaller () {
|
||||
# TODO: Implement $FLAVOUR checks and install depending on the platform we are on
|
||||
if [[ $(which shasum > /dev/null 2>&1 ; echo $?) != 0 ]]; then
|
||||
sudo apt install libdigest-sha-perl -qyy
|
||||
fi
|
||||
# SHAsums to be computed, not the -- notatiation is for ease of use with rhash
|
||||
SHA_SUMS="--sha1 --sha256 --sha384 --sha512"
|
||||
for sum in $(echo ${SHA_SUMS} |sed 's/--sha//g'); do
|
||||
|
|
|
@ -46,7 +46,7 @@ class AppController extends Controller
|
|||
|
||||
public $helpers = array('Utility', 'OrgImg', 'FontAwesome');
|
||||
|
||||
private $__queryVersion = '68';
|
||||
private $__queryVersion = '69';
|
||||
public $pyMispVersion = '2.4.106';
|
||||
public $phpmin = '7.0';
|
||||
public $phprec = '7.2';
|
||||
|
|
|
@ -3793,6 +3793,22 @@ class Server extends AppModel
|
|||
return array('status' => 6);
|
||||
}
|
||||
}
|
||||
$this->Log = ClassRegistry::init('Log');
|
||||
$this->Log->create();
|
||||
$this->Log->save(array(
|
||||
'org' => 'SYSTEM',
|
||||
'model' => 'Server',
|
||||
'model_id' => $id,
|
||||
'email' => 'SYSTEM',
|
||||
'action' => 'error',
|
||||
'user_id' => 0,
|
||||
'title' => 'Error: Connection test failed. Returned data is in the change field.',
|
||||
'change' => sprintf(
|
||||
'response () => (%s), response-code () => (%s)',
|
||||
$response->body,
|
||||
$response->code
|
||||
)
|
||||
));
|
||||
return array('status' => 3);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
'class' => 'Attribute_value_select',
|
||||
'style' => 'width:414px;margin-bottom:0px;',
|
||||
'options' => array_combine($list, $list),
|
||||
'empty' => __('-- Select an option --'),
|
||||
'label' => false,
|
||||
'div' => false,
|
||||
'value' => $choice
|
||||
|
|
|
@ -317,8 +317,9 @@
|
|||
var rows = <?php echo json_encode($row_list, true); ?>;
|
||||
$(document).ready(function() {
|
||||
enableDisableObjectRows(rows);
|
||||
$(".Attribute_value_select").each(function() {
|
||||
$(".Attribute_value_select").each(function() {
|
||||
checkAndEnable($(this).parent().find('.Attribute_value'), $(this).val() == '<?php echo __('Enter value manually');?>');
|
||||
$(this).find('option:first').attr('disabled', true);
|
||||
});
|
||||
$(".Attribute_distribution_select").change(function() {
|
||||
checkAndEnable($(this).parent().find('.Attribute_sharing_group_id_select'), $(this).val() == 4);
|
||||
|
|
|
@ -3644,7 +3644,7 @@ function quickSubmitGalaxyForm(cluster_ids, additionalData) {
|
|||
$('#temp').html(formData);
|
||||
$('#temp #GalaxyTargetIds').val(JSON.stringify(cluster_ids));
|
||||
if (target_id == 'selected') {
|
||||
$('#AttributeAttributeIds').val(getSelected());
|
||||
$('#AttributeAttributeIds, #GalaxyAttributeIds').val(getSelected());
|
||||
}
|
||||
$.ajax({
|
||||
data: $('#GalaxyAttachMultipleClustersForm').serialize(),
|
||||
|
@ -3832,7 +3832,10 @@ function checkAndEnableCheckbox(id, enable) {
|
|||
function enableDisableObjectRows(rows) {
|
||||
rows.forEach(function(i) {
|
||||
if ($("#Attribute" + i + "ValueSelect").length != 0) {
|
||||
checkAndEnableCheckbox("#Attribute" + i + "Save", true);
|
||||
checkAndEnableCheckbox("#Attribute" + i + "Save", $("#Attribute" + i + "ValueSelect").val() != "");
|
||||
$("#Attribute" + i + "ValueSelect").bind('input propertychange', function() {
|
||||
checkAndEnableCheckbox("#Attribute" + i + "Save", $(this).val() != "");
|
||||
})
|
||||
} else if ($("#Attribute" + i + "Attachment").length != 0) {
|
||||
checkAndEnableCheckbox("#Attribute" + i + "Save", $("#Attribute" + i + "Attachment").val() != "");
|
||||
} else {
|
||||
|
@ -4074,6 +4077,8 @@ $(document).ready(function() {
|
|||
url = "/objects/get_row/" + template_id + "/" + object_relation + "/" + k;
|
||||
$.get(url, function(data) {
|
||||
$('#row_' + object_relation + '_expand').before($(data).fadeIn()).html();
|
||||
var $added_row = $('#row_' + object_relation + '_expand').prev().prev();
|
||||
$added_row.find('select.Attribute_value_select option:first').attr('disabled', true);
|
||||
});
|
||||
});
|
||||
$('.quickToggleCheckbox').toggle(function() {
|
||||
|
|
|
@ -117,6 +117,10 @@ checkFlavour () {
|
|||
}
|
||||
|
||||
checkInstaller () {
|
||||
# TODO: Implement $FLAVOUR checks and install depending on the platform we are on
|
||||
if [[ $(which shasum > /dev/null 2>&1 ; echo $?) != 0 ]]; then
|
||||
sudo apt install libdigest-sha-perl -qyy
|
||||
fi
|
||||
# SHAsums to be computed, not the -- notatiation is for ease of use with rhash
|
||||
SHA_SUMS="--sha1 --sha256 --sha384 --sha512"
|
||||
for sum in $(echo ${SHA_SUMS} |sed 's/--sha//g'); do
|
||||
|
|
Loading…
Reference in New Issue