mirror of https://github.com/MISP/MISP
fix: [decaying] UI - Interface errors and sanitization
parent
c333d23f2d
commit
0c880fe30a
|
@ -114,7 +114,7 @@ $(document).ready(function() {
|
|||
});
|
||||
$('#select_model_to_simulate_infobox').popover({
|
||||
title: function() {
|
||||
return $('#select_model_to_simulate option:selected').text();
|
||||
return $('<div>').text($('#select_model_to_simulate option:selected').text()).html();
|
||||
},
|
||||
content: function() {
|
||||
return '<div>' + syntaxHighlightJson(models[$('#select_model_to_simulate').val()]) + '</div>';
|
||||
|
@ -174,7 +174,8 @@ function doRestSearch(clicked, query) {
|
|||
$trs.data('modelOverride', JSON.stringify(json.modelOverrides));
|
||||
}
|
||||
},
|
||||
error:function() {
|
||||
error:function(jqXHR, textStatus, errorThrown) {
|
||||
$('#attributeTableContainer').text(textStatus + ': ' + errorThrown);
|
||||
showMessage('fail', '<?php echo __('Failed to perform RestSearch') ?>');
|
||||
},
|
||||
type:'post',
|
||||
|
|
|
@ -120,7 +120,7 @@ foreach ($decayingModels as $item): ?>
|
|||
$item['DecayingModel']['parameters']['base_score_config'] = new stdClass(); // force output to be {} instead of []
|
||||
}
|
||||
?>
|
||||
<td data-toggle="json" ondblclick="document.location.href ='<?php echo $baseurl . '/decayingModel/view/' . h($item['DecayingModel']['id']); ?>'"><?php echo json_encode($item['DecayingModel']['parameters']); ?> </td>
|
||||
<td data-toggle="json" ondblclick="document.location.href ='<?php echo $baseurl . '/decayingModel/view/' . h($item['DecayingModel']['id']); ?>'"><?php echo h(json_encode($item['DecayingModel']['parameters'])); ?> </td>
|
||||
<td>
|
||||
<?php echo h($item['DecayingModel']['formula']); ?>
|
||||
<?php if (isset($available_formulas[$item['DecayingModel']['formula']]['description'])): ?>
|
||||
|
|
|
@ -33,12 +33,12 @@
|
|||
);
|
||||
$table_data[] = array(
|
||||
'key' => __('Formula'),
|
||||
'html' => $decaying_model['DecayingModel']['formula'] . (
|
||||
'html' => h($decaying_model['DecayingModel']['formula']) . (
|
||||
isset($available_formulas[$decaying_model['DecayingModel']['formula']]['description']) ? sprintf(' <i class="fas fa-question-circle" data-toggle="tooltip" title="%s"></i>', h($available_formulas[$decaying_model['DecayingModel']['formula']]['description'])) : ''
|
||||
)
|
||||
);
|
||||
$table_data[] = array('key' => __('Parameters'), 'value' => json_encode($decaying_model['DecayingModel']['parameters']), 'class' => 'json-transform');
|
||||
$table_data[] = array('key' => __('Reference(s)'), 'html' => implode('<br/>', (empty($decaying_model['DecayingModel']['ref']) ? array() : $decaying_model['DecayingModel']['ref'])));
|
||||
$table_data[] = array('key' => __('Reference(s)'), 'html' => implode('<br/>', (empty($decaying_model['DecayingModel']['ref']) ? array() : h($decaying_model['DecayingModel']['ref']))));
|
||||
$table_data[] = array('key' => __('Associated types'), 'value' => json_encode($decaying_model['DecayingModel']['attribute_types']), 'class' => 'json-transform');
|
||||
?>
|
||||
<div class='view'>
|
||||
|
|
Loading…
Reference in New Issue