chg: [decaying] More sanitization and indentation is important..

pull/5032/head
mokaddem 2019-08-22 16:11:04 +02:00
parent 46f6b92360
commit 5ca2e9bdc0
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
4 changed files with 243 additions and 245 deletions

View File

@ -1,167 +1,165 @@
<div class="view">
<h2>Decaying Of Indicator Fine Tuning Tool</h2>
<h2>Decaying Of Indicator Fine Tuning Tool</h2>
<div class="row">
<div class="span9 form-inline" style="border: 1px solid #ddd; border-radius: 4px; margin-bottom: 15px;">
<div style="border-bottom: 1px solid #ddd;">
<label class="checkbox inline">
<input id="table_toggle_all_type" type="checkbox"></input>
<?php echo __('Show All Types'); ?>
</label>
<label class="checkbox inline">
<input id="table_toggle_objects" type="checkbox"></input>
<?php echo __('Show MISP Objects'); ?>
</label>
<input id="table_type_search" class="input" type="text" placeholder="<?php echo _('Search Attribute Type'); ?>"></input>
<button class="btn btn-primary btn-small" onclick="decayingTool.restoreSelection()"><span class="fa fa-history"></span></button>
</div>
<div class="AttributeTypeTableContainer">
<table id="table_attribute_type" class="table table-striped table-bordered">
<thead>
<tr>
<th><input id="checkAll" type="checkbox" title="<?php echo __('Check all'); ?>"></input></th>
<th><?php echo _('Attribute Type'); ?></th>
<th><?php echo _('Category'); ?></th>
<th><?php echo _('Model ID'); ?></th>
</tr>
</thead>
<tbody id="attributeTypeTableBody">
<?php foreach ($types as $type => $info): ?>
<?php
$class = 'hidden ';
if (isset($info['isObject']) && $info['isObject']) {
$class .= 'isObject';
} else if (isset($info['to_ids']) && $info['to_ids'] != 1) {
$class .= 'isNotToIDS';
} else {
$class = "";
}
?>
<tr class="<?php echo $class; ?>">
<td><input type="checkbox"></input></td>
<td class="useCursorPointer isFilteringField isAttributeTypeField">
<?php if(isset($info['isObject']) && $info['isObject']): ?>
<it class="fa fa-cube" title="<?php echo __('Belong to a MISP Object'); ?>"></it>
<?php endif; ?>
<span title="<?php echo isset($info['desc']) ? $info['desc'] : ''; ?>"><?php echo h($type); ?></span>
<?php if(isset($info['to_ids']) && $info['to_ids'] == 1): ?>
<it class="fa fa-flag fa-pull-right" title="<?php echo __('To IDS flag set'); ?>"></it>
<?php endif; ?>
</td>
<td class="useCursorPointer isFilteringField"><?php echo is_array($info['default_category']) ? implode('</br>', h($info['default_category'])) : h($info['default_category']); ?></td>
<td class="isFilteringField isModelIdField">
<?php if (isset($associated_models[$type])): ?>
<?php foreach ($associated_models[$type] as $id): ?>
<a href="#" onclick="$('#modelId_<?php echo h($id); ?>').find('.decayingLoadBtn').click();"><?php echo h($id); ?></a>
<?php endforeach; ?>
<?php endif; ?>
</td>
<div class="row">
<div class="span9 form-inline" style="border: 1px solid #ddd; border-radius: 4px; margin-bottom: 15px;">
<div style="border-bottom: 1px solid #ddd;">
<label class="checkbox inline">
<input id="table_toggle_all_type" type="checkbox"></input>
<?php echo __('Show All Types'); ?>
</label>
<label class="checkbox inline">
<input id="table_toggle_objects" type="checkbox"></input>
<?php echo __('Show MISP Objects'); ?>
</label>
<input id="table_type_search" class="input" type="text" placeholder="<?php echo __('Search Attribute Type'); ?>"></input>
<button class="btn btn-primary btn-small" onclick="decayingTool.restoreSelection()"><span class="fa fa-history"></span></button>
</div>
<div class="AttributeTypeTableContainer">
<table id="table_attribute_type" class="table table-striped table-bordered">
<thead>
<tr>
<th><input id="checkAll" type="checkbox" title="<?php echo __('Check all'); ?>"></input></th>
<th><?php echo __('Attribute Type'); ?></th>
<th><?php echo __('Category'); ?></th>
<th><?php echo __('Model ID'); ?></th>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
<div class="span12">
<div style="margin-bottom: 10px;">
<select id="formulaSelectPicker" style="margin: 0px;">
<?php foreach ($available_formulas as $formula_name => $formula_data): ?>
<option value="<?php echo h($formula_name); ?>" data-extends="<?php echo h($formula_data['parent_class']); ?>" title="<?php echo h($formula_data['description']); ?>"><?php echo h($formula_name); ?></option>
<?php endforeach; ?>
</select>
<i id="formulaSelectPickerHelpText" class="fas fa-question-circle"></i>
</div>
<div id="containerFormulaPolynomialSetting">
<div class="span10" style="border: 1px solid #ddd; border-radius: 4px; margin-bottom: 20px;">
<div id="decayGraph" style="width: 100%;"></div>
</div>
<div class="row">
<div class="span6" style="margin-bottom: 20px;">
<?php foreach ($parameters as $param => $config): ?>
<div class="input-prepend input-append">
<span class="add-on param-name" data-toggle="tooltip" data-placement="left" style="min-width: 100px;" title="<?php echo isset($config['info']) ? h($config['info']) : ''?>">
<?php echo h($config['name']) . (isset($config['greek']) ? ' <strong>'.h($config['greek']).'</strong>' : ''); ?>
</span>
<input id="input_<?php echo h($param); ?>" class="input-mini" type="number" min=0 step=<?php echo h($config['step']); ?> value=<?php echo h($config['value']); ?> max=<?php echo isset($config['max']) ? h($config['max']) : ''; ?> oninput="refreshGraph(this);" ></input>
<span class="add-on"><input id="input_<?php echo h($param); ?>_range" type="range" min=0 <?php echo isset($config['max']) ? 'max=' . h($config['max']) : '' ?> step=<?php echo h($config['step']); ?> value=<?php echo h($config['value']); ?> oninput="$('#input_<?php echo h($param); ?>').val(this.value).trigger('input');"></input></span>
<?php if (isset($config['unit'])): ?>
<span class="add-on"><?php echo h($config['unit']); ?></span>
<?php endif; ?>
</div>
<?php endforeach; ?>
<input id="input_default_base_score" value=0 class="hidden"></input>
<div class="input-append" style="margin-bottom: 0px;">
<input id="input_base_score_config" class="hidden" value="[]"></input>
<button class="btn btn-primary" style="border-radius: 4px 0px 0px 4px;" onclick="decayingTool.toggleBasescoreForm()">
<span class="fa fa-tags"> <?php echo __('Adjust base score'); ?></span>
</button>
<span id="summary_base_score_config" class="add-on param-name">
<span class="far fa-square"></span>
</span>
</div>
<div style="display: inline-block; margin-left: 10px;">
<a id="button-toggle-simulation" target="_blank" class="btn btn-primary" href="" onclick="return !$(this).hasClass('disabled');">
<span class="fa fa-chart-line"> <?php echo __('Simulate this model'); ?></span>
</a>
</div>
</div>
<div class="span6">
<table class="table table-striped table-bordered">
<tbody>
<tr>
<td>Expire after (lifetime)</td>
<td id="infoCellExpired"></td>
</thead>
<tbody id="attributeTypeTableBody">
<?php foreach ($types as $type => $info): ?>
<?php
$class = 'hidden ';
if (isset($info['isObject']) && $info['isObject']) {
$class .= 'isObject';
} else if (isset($info['to_ids']) && $info['to_ids'] != 1) {
$class .= 'isNotToIDS';
} else {
$class = "";
}
?>
<tr class="<?php echo $class; ?>">
<td><input type="checkbox"></input></td>
<td class="useCursorPointer isFilteringField isAttributeTypeField">
<?php if(isset($info['isObject']) && $info['isObject']): ?>
<it class="fa fa-cube" title="<?php echo __('Belong to a MISP Object'); ?>"></it>
<?php endif; ?>
<span title="<?php echo isset($info['desc']) ? h($info['desc']) : ''; ?>"><?php echo h($type); ?></span>
<?php if(isset($info['to_ids']) && $info['to_ids'] == 1): ?>
<it class="fa fa-flag fa-pull-right" title="<?php echo __('To IDS flag set'); ?>"></it>
<?php endif; ?>
</td>
<td class="useCursorPointer isFilteringField"><?php echo is_array($info['default_category']) ? implode('</br>', h($info['default_category'])) : h($info['default_category']); ?></td>
<td class="isFilteringField isModelIdField">
<?php if (isset($associated_models[$type])): ?>
<?php foreach ($associated_models[$type] as $id): ?>
<a href="#" onclick="$('#modelId_<?php echo h($id); ?>').find('.decayingLoadBtn').click();"><?php echo h($id); ?></a>
<?php endforeach; ?>
<?php endif; ?>
</td>
</tr>
<tr>
<td>Score halved after (Half-life)</td>
<td id="infoCellHalved"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div id="containerFormulaOtherSetting" class="hidden">
<textarea id="textarea_other_settings_formulas" style="width: 430px;" rows="5" placeholder="<?php echo(__('Model\'s Settings')); ?>"></textarea>
</div>
<div class="row">
<div class="span12">
<form id="saveForm" class="form-inline">
<input type="text" name="name" class="input" placeholder="Model name" required>
<textarea rows="1" name="description" class="input" placeholder="Description"></textarea>
<span id="save-model-button" class="btn btn-success" data-save-type="add" onclick="decayingTool.saveModel(this)" data-modelid="0" data-isedit="0" data-edittext="<?php echo __("Edit") ?>" data-savetext="<?php echo __("Create") ?>"><i class="fa fa-plus"> <?php echo __("Create") ?></i></span>
</form>
</div>
</div>
<div class="row">
<div class="span12">
<span class="tableRadioFilterOptionsContainer">
<label class="radio inline">
<input type="radio" id="tableRadioFilterAll" name="tableRadioFilterOptions" value="all" checked><?php echo __('All available models');?>
</label>
<label class="radio inline">
<input type="radio" id="tableRadioFilterMy" name="tableRadioFilterOptions" value="my_models"><?php echo __('My models'); ?>
</label>
<label class="radio inline">
<input type="radio" id="tableRadioFilterDefault" name="tableRadioFilterOptions" value="default_models"><?php echo __('Default models'); ?>
</label>
</span>
<table id="table-model" class="table table-striped table-bordered">
<thead id="table-model-head"></thead>
<tbody id="table-model-body"></tbody>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
<div class="span12">
<div style="margin-bottom: 10px;">
<select id="formulaSelectPicker" style="margin: 0px;">
<?php foreach ($available_formulas as $formula_name => $formula_data): ?>
<option value="<?php echo h($formula_name); ?>" data-extends="<?php echo h($formula_data['parent_class']); ?>" title="<?php echo h($formula_data['description']); ?>"><?php echo h($formula_name); ?></option>
<?php endforeach; ?>
</select>
<i id="formulaSelectPickerHelpText" class="fas fa-question-circle"></i>
</div>
<div id="containerFormulaPolynomialSetting">
<div class="span10" style="border: 1px solid #ddd; border-radius: 4px; margin-bottom: 20px;">
<div id="decayGraph" style="width: 100%;"></div>
</div>
<div class="row">
<div class="span6" style="margin-bottom: 20px;">
<?php foreach ($parameters as $param => $config): ?>
<div class="input-prepend input-append">
<span class="add-on param-name" data-toggle="tooltip" data-placement="left" style="min-width: 100px;" title="<?php echo isset($config['info']) ? h($config['info']) : ''?>">
<?php echo h($config['name']) . (isset($config['greek']) ? ' <strong>' . h($config['greek']).'</strong>' : ''); ?>
</span>
<input id="input_<?php echo h($param); ?>" class="input-mini" type="number" min=0 step=<?php echo h($config['step']); ?> value=<?php echo h($config['value']); ?> max=<?php echo isset($config['max']) ? h($config['max']) : ''; ?> oninput="refreshGraph(this);" ></input>
<span class="add-on"><input id="input_<?php echo h($param); ?>_range" type="range" min=0 <?php echo isset($config['max']) ? 'max=' . h($config['max']) : '' ?> step=<?php echo h($config['step']); ?> value=<?php echo h($config['value']); ?> oninput="$('#input_<?php echo h($param); ?>').val(this.value).trigger('input');"></input></span>
<?php if (isset($config['unit'])): ?>
<span class="add-on"><?php echo h($config['unit']); ?></span>
<?php endif; ?>
</div>
<?php endforeach; ?>
<input id="input_default_base_score" value=0 class="hidden"></input>
<div class="input-append" style="margin-bottom: 0px;">
<input id="input_base_score_config" class="hidden" value="[]"></input>
<button class="btn btn-primary" style="border-radius: 4px 0px 0px 4px;" onclick="decayingTool.toggleBasescoreForm()">
<span class="fa fa-tags"> <?php echo __('Adjust base score'); ?></span>
</button>
<span id="summary_base_score_config" class="add-on param-name">
<span class="far fa-square"></span>
</span>
</div>
<div style="display: inline-block; margin-left: 10px;">
<a id="button-toggle-simulation" target="_blank" class="btn btn-primary" href="" onclick="return !$(this).hasClass('disabled');">
<span class="fa fa-chart-line"> <?php echo __('Simulate this model'); ?></span>
</a>
</div>
</div>
<div class="span6">
<table class="table table-striped table-bordered">
<tbody>
<tr>
<td>Expire after (lifetime)</td>
<td id="infoCellExpired"></td>
</tr>
<tr>
<td>Score halved after (Half-life)</td>
<td id="infoCellHalved"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div id="containerFormulaOtherSetting" class="hidden">
<textarea id="textarea_other_settings_formulas" style="width: 430px;" rows="5" placeholder="<?php echo(__('Model\'s Settings')); ?>"></textarea>
</div>
<div class="row">
<div class="span12">
<form id="saveForm" class="form-inline">
<input type="text" name="name" class="input" placeholder="Model name" required>
<textarea rows="1" name="description" class="input" placeholder="Description"></textarea>
<span id="save-model-button" class="btn btn-success" data-save-type="add" onclick="decayingTool.saveModel(this)" data-modelid="0" data-isedit="0" data-edittext="<?php echo __("Edit") ?>" data-savetext="<?php echo __("Create") ?>"><i class="fa fa-plus"> <?php echo __("Create") ?></i></span>
</form>
</div>
</div>
<div class="row">
<div class="span12">
<span class="tableRadioFilterOptionsContainer">
<label class="radio inline">
<input type="radio" id="tableRadioFilterAll" name="tableRadioFilterOptions" value="all" checked><?php echo __('All available models');?>
</label>
<label class="radio inline">
<input type="radio" id="tableRadioFilterMy" name="tableRadioFilterOptions" value="my_models"><?php echo __('My models'); ?>
</label>
<label class="radio inline">
<input type="radio" id="tableRadioFilterDefault" name="tableRadioFilterOptions" value="default_models"><?php echo __('Default models'); ?>
</label>
</span>
<table id="table-model" class="table table-striped table-bordered">
<thead id="table-model-head"></thead>
<tbody id="table-model-body"></tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<?php echo $this->element('/genericElements/SideMenu/side_menu', array('menuList' => 'decayingModel', 'menuItem' => 'decayingTool')); ?>
<?php
echo $this->element('genericElements/assetLoader', array(

View File

@ -1,6 +1,6 @@
<div id="basescore_configurator" class="row">
<div class="span8" class="taxonomyTableContainer">
<input id="table_taxonomy_search" class="input" style="width: 250px; margin: 0px;" type="text" placeholder="<?php echo _('Search Taxonomy'); ?>"></input>
<input id="table_taxonomy_search" class="input" style="width: 250px; margin: 0px;" type="text" placeholder="<?php echo __('Search Taxonomy'); ?>"></input>
<it class="fa fa-times useCursorPointer" title="<?php echo __('Clear search field'); ?>" onclick="$('#table_taxonomy_search').val('').trigger('input');"></it>
<span style="float: right; margin-top: 6px;" class="badge badge-info"><b><?php echo h($taxonomies_not_having_numerical_value); ?></b><?php echo __(' not having numerical value'); ?></span>
<div class="input-prepend" style="margin: 4px;">
@ -29,8 +29,8 @@
<li>
<a style="position: relative; padding: 3px 5px;">
<span class="tagComplete"
style="margin-right: 35px;background-color: <?php echo $entry['Tag']['colour']; ?>;color:<?php echo $this->TextColour->getTextColour($entry['Tag']['colour']);?>"
title="<?php echo sprintf('%s: %s', h($entry['expanded']), h($entry['description'])) ?>"><?php echo $entry['Tag']['name']; ?>
style="margin-right: 35px;background-color: <?php echo h($entry['Tag']['colour']); ?>;color:<?php echo h($this->TextColour->getTextColour($entry['Tag']['colour']));?>"
title="<?php echo sprintf('%s: %s', h($entry['expanded']), h($entry['description'])) ?>"><?php echo h($entry['Tag']['name']); ?>
</span>
<span class="label label-inverse numerical-value-label"><?php echo h($entry['numerical_value']) ?></span>
</a>
@ -107,10 +107,10 @@
</div>
<?php
echo $this->element('genericElements/assetLoader', array(
'css' => array('treemap'),
'js' => array('decayingToolBasescore')
));
echo $this->element('genericElements/assetLoader', array(
'css' => array('treemap'),
'js' => array('decayingToolBasescore')
));
?>
<script>

View File

@ -20,15 +20,15 @@
'ID',
$this->Paginator->sort('event_id'),
$this->Paginator->sort('date'),
$this->Paginator->sort('date', __('Date')),
$this->Paginator->sort('Event.orgc_id', __('Org')),
$this->Paginator->sort('category'),
$this->Paginator->sort('type'),
$this->Paginator->sort('value'),
$this->Paginator->sort('category', __('Category')),
$this->Paginator->sort('type', __('Type')),
$this->Paginator->sort('value', __('Value')),
__('Tags'),
__('Event Tags'),
__('Galaxies'),
$this->Paginator->sort('comment'),
$this->Paginator->sort('comment', __('Comment')),
sprintf('<span title="%s">%s', $attrDescriptions['signature']['desc'], $this->Paginator->sort('IDS')),
__('Sightings'),
$this->Paginator->sort('decay_score.score', __('Score')),

View File

@ -1,96 +1,96 @@
<div class="view">
<div id="simulationContainer">
<div class="simulationSubContainer">
<div style="height: 40%; display: flex">
<div style="width: 20%; display: flex; flex-direction: column;">
<div class="panel-container" style="display: flex; flex-direction: column; flex-grow: 1">
<div style="display: flex;">
<select id="select_model_to_simulate" onchange="modelChangeHandler(this)" style="flex-grow: 1;">
<?php foreach ($all_models as $model): ?>
<option value="<?php echo h($model['DecayingModel']['id']) ?>" <?php echo $decaying_model['DecayingModel']['id'] == $model['DecayingModel']['id'] ? 'selected' : '' ?>><?php echo h($model['DecayingModel']['name']); ?></option>
<?php endforeach; ?>
</select>
<span id="select_model_to_simulate_infobox" class="btn"><span class="fa fa-question-circle"></span></span>
</div>
<ul class="nav nav-tabs" style="margin-right: -5px; margin-bottom: 0px;" id="simulation-tabs">
<li class="<?php echo isset($attribute_id) ? '' : 'active'; ?>"><a href="#restsearch" data-toggle="tab">RestSearch</a></li>
<li class="<?php echo !isset($attribute_id) ? '' : 'active'; ?>"><a href="#specificid" data-toggle="tab">Specific ID</a></li>
</ul>
<div class="tab-content" style="padding: 5px; height: 100%;">
<div class="tab-pane <?php echo isset($attribute_id) ? '' : 'active'; ?>" id="restsearch" style="height: 100%;">
<div style="display: flex; flex-direction: column; height: 100%;">
<h3 style="">Attribute RestSearch<span style="vertical-align: top; font-size: x-small;" class="fa fa-question-circle" title="Enforced fields: returnFormat"></span></h3>
<?php
$registered_taxonomies = array_keys($decaying_model['DecayingModel']['parameters']['base_score_config']);
foreach ($registered_taxonomies as $i => &$taxonomy_name) {
$taxonomy_name = $taxonomy_name . ':%' ;
}
?>
<textarea id="restSearchTextarea">
{
"includeDecayScore": 1,
"excludeDecayed": 0,
"decayingModel": [<?php echo h($decaying_model['DecayingModel']['id']); ?>],
"to_ids": 1,
"tags": <?php echo json_encode($registered_taxonomies); ?>,
"modelOverrides": {
}
}</textarea>
</br>
<span class="btn btn-primary" style="width: fit-content;" role="button" onclick="doRestSearch(this)"><?php echo __('Search'); ?></span>
</div>
<div id="simulationContainer">
<div class="simulationSubContainer">
<div style="height: 40%; display: flex">
<div style="width: 20%; display: flex; flex-direction: column;">
<div class="panel-container" style="display: flex; flex-direction: column; flex-grow: 1">
<div style="display: flex;">
<select id="select_model_to_simulate" onchange="modelChangeHandler(this)" style="flex-grow: 1;">
<?php foreach ($all_models as $model): ?>
<option value="<?php echo h($model['DecayingModel']['id']) ?>" <?php echo $decaying_model['DecayingModel']['id'] == $model['DecayingModel']['id'] ? 'selected' : '' ?>><?php echo h($model['DecayingModel']['name']); ?></option>
<?php endforeach; ?>
</select>
<span id="select_model_to_simulate_infobox" class="btn"><span class="fa fa-question-circle"></span></span>
</div>
<div class="tab-pane <?php echo !isset($attribute_id) ? '' : 'active'; ?>" id="specificid">
<h3 style=""><?php echo __('Specific Attribute'); ?></h3>
<div style="display: flex;">
<div style="margin-left: 4px; margin-bottom: 0px;" class="input-prepend">
<span class="add-on">ID</span>
<input type="text" value="<?php echo isset($attribute_id) ? h($attribute_id) : ''; ?>" placeholder="<?php echo __('Attribute ID or UUID') ?>" onkeypress="handle_input_key(event)" style="width: auto;">
<ul class="nav nav-tabs" style="margin-right: -5px; margin-bottom: 0px;" id="simulation-tabs">
<li class="<?php echo isset($attribute_id) ? '' : 'active'; ?>"><a href="#restsearch" data-toggle="tab">RestSearch</a></li>
<li class="<?php echo !isset($attribute_id) ? '' : 'active'; ?>"><a href="#specificid" data-toggle="tab">Specific ID</a></li>
</ul>
<div class="tab-content" style="padding: 5px; height: 100%;">
<div class="tab-pane <?php echo isset($attribute_id) ? '' : 'active'; ?>" id="restsearch" style="height: 100%;">
<div style="display: flex; flex-direction: column; height: 100%;">
<h3 style="">Attribute RestSearch<span style="vertical-align: top; font-size: x-small;" class="fa fa-question-circle" title="Enforced fields: returnFormat"></span></h3>
<?php
$registered_taxonomies = array_keys($decaying_model['DecayingModel']['parameters']['base_score_config']);
foreach ($registered_taxonomies as $i => &$taxonomy_name) {
$taxonomy_name = $taxonomy_name . ':%' ;
}
?>
<textarea id="restSearchTextarea">
{
"includeDecayScore": 1,
"excludeDecayed": 0,
"decayingModel": [<?php echo h($decaying_model['DecayingModel']['id']); ?>],
"to_ids": 1,
"tags": <?php echo json_encode($registered_taxonomies); ?>,
"modelOverrides": {
}
}</textarea>
</br>
<span class="btn btn-primary" style="width: fit-content;" role="button" onclick="doRestSearch(this)"><?php echo __('Search'); ?></span>
</div>
</div>
<div class="tab-pane <?php echo !isset($attribute_id) ? '' : 'active'; ?>" id="specificid">
<h3 style=""><?php echo __('Specific Attribute'); ?></h3>
<div style="display: flex;">
<div style="margin-left: 4px; margin-bottom: 0px;" class="input-prepend">
<span class="add-on">ID</span>
<input type="text" value="<?php echo isset($attribute_id) ? h($attribute_id) : ''; ?>" placeholder="<?php echo __('Attribute ID or UUID') ?>" onkeypress="handle_input_key(event)" style="width: auto;">
</div>
<span id="performRestSearchButton" class="btn btn-primary" style="width: fit-content; margin-left: 4px;" role="button" onclick="doSpecificSearch(this)"><?php echo __('Simulate'); ?></span>
</div>
<span id="performRestSearchButton" class="btn btn-primary" style="width: fit-content; margin-left: 4px;" role="button" onclick="doSpecificSearch(this)"><?php echo __('Simulate'); ?></span>
</div>
</div>
</div>
</div>
</div>
<div style="width: 80%; display: flex;">
<div class="panel-container" style="flex-grow: 1; display: flex;">
<div id="basescore-simulation-container" style="width: 30%; min-width: 400px; height: 100%; margin-right: 10px;">
<h5 style="display: inline-block;"><?php echo __('Base score') ?></h5>
<div id="alert-basescore-not-set" class="alert alert-warning" style="display: inline-block; margin-bottom: auto; margin-left: 5px; padding: 4px 8px;">
<strong><?php echo __('Base score configuration'); ?></strong> <?php echo __('not set. But default value sets.') ?>
</div>
<div id="alert-basescore-not-set" class="alert alert-error" style="display: inline-block; margin-bottom: auto; margin-left: 5px; padding: 4px 8px;">
<strong><?php echo __('Base score configuration'); ?></strong> <?php echo __('not set') ?>
</div>
<div style="position: relative;">
<?php echo $this->element('DecayingModels/View/basescore_computation_steps'); ?>
</div>
<div style="margin-left: 4px; margin-bottom: 0px;" class="input-prepend input-append">
<span class="add-on"><?php echo __('Sighting'); ?></span>
<span id="simulation-sighting" class="add-on"></span>
</div>
<div style="margin-left: 4px; margin-bottom: 0px;" class="input-prepend input-append">
<span class="add-on"><?php echo __('Current score'); ?></span>
<span id="simulation-current-score" class="add-on"></span>
</div>
</div>
<div id="chart-decay-simulation-container" style="width: 70%; height: 100%; position: relative; overflow: hidden;">
<div id="simulation_chart" class="svg-container"></div>
</div>
<div style="width: 80%; display: flex;">
<div class="panel-container" style="flex-grow: 1; display: flex;">
<div id="basescore-simulation-container" style="width: 30%; min-width: 400px; height: 100%; margin-right: 10px;">
<h5 style="display: inline-block;"><?php echo __('Base score') ?></h5>
<div id="alert-basescore-not-set" class="alert alert-warning" style="display: inline-block; margin-bottom: auto; margin-left: 5px; padding: 4px 8px;">
<strong><?php echo __('Base score configuration'); ?></strong> <?php echo __('not set. But default value sets.') ?>
</div>
<div id="alert-basescore-not-set" class="alert alert-error" style="display: inline-block; margin-bottom: auto; margin-left: 5px; padding: 4px 8px;">
<strong><?php echo __('Base score configuration'); ?></strong> <?php echo __('not set') ?>
</div>
<div style="position: relative;">
<?php echo $this->element('DecayingModels/View/basescore_computation_steps'); ?>
</div>
<div style="margin-left: 4px; margin-bottom: 0px;" class="input-prepend input-append">
<span class="add-on"><?php echo __('Sighting'); ?></span>
<span id="simulation-sighting" class="add-on"></span>
</div>
<div style="margin-left: 4px; margin-bottom: 0px;" class="input-prepend input-append">
<span class="add-on"><?php echo __('Current score'); ?></span>
<span id="simulation-current-score" class="add-on"></span>
</div>
</div>
<div id="chart-decay-simulation-container" style="width: 70%; height: 100%; position: relative; overflow: hidden;">
<div id="simulation_chart" class="svg-container"></div>
</div>
</div>
</div>
</div>
</div>
<div style="height: 60%; overflow-y: auto; background-color: #ffffff;" class="panel-container">
<div style="height: 100%;" id="attributeTableContainer"></div>
<div style="height: 60%; overflow-y: auto; background-color: #ffffff;" class="panel-container">
<div style="height: 100%;" id="attributeTableContainer"></div>
</div>
</div>
</div>
</div>
</div>
<?php echo $this->element('/genericElements/SideMenu/side_menu', array('menuList' => 'decayingModel', 'menuItem' => '')); ?>
<?php
echo $this->element('genericElements/assetLoader', array(