mirror of https://github.com/MISP/MISP
chg: [decaying] Few views tweakings
parent
5ca2e9bdc0
commit
60d407a4cc
|
@ -82,25 +82,25 @@
|
|||
|
||||
<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('all_orgs');?></th>
|
||||
<th><?php echo $this->Paginator->sort('name');?></th>
|
||||
<th><?php echo $this->Paginator->sort('description');?></th>
|
||||
<th><?php echo $this->Paginator->sort('ID');?></th>
|
||||
<th><?php echo $this->Paginator->sort('org', __('Organization'));?></th>
|
||||
<th><?php echo $this->Paginator->sort('all_orgs', __('Usable to everyone'));?></th>
|
||||
<th><?php echo $this->Paginator->sort('name', __('Name'));?></th>
|
||||
<th><?php echo $this->Paginator->sort('description', __('Description'));?></th>
|
||||
<th>
|
||||
<?php echo __('Parameters'); ?>
|
||||
<a class="useCursorPointer" title="<?php echo __('Pretty print') ?>"><b style="font-size: larger;" onclick="prettyPrintJson();">{ }</b></a>
|
||||
|
||||
</th>
|
||||
<th><?php echo $this->Paginator->sort('formula');?></th>
|
||||
<th><?php echo $this->Paginator->sort('formula', __('Formula'));?></th>
|
||||
<th><?php echo __('# Assigned Types') ?></th>
|
||||
<th><?php echo $this->Paginator->sort('version');?></th>
|
||||
<th><?php echo $this->Paginator->sort('enabled');?></th>
|
||||
<th><?php echo $this->Paginator->sort('version', __('Version'));?></th>
|
||||
<th><?php echo $this->Paginator->sort('enabled', __('Enabled'));?></th>
|
||||
<th class="actions"><?php echo __('Actions');?></th>
|
||||
</tr><?php
|
||||
foreach ($decayingModels as $item): ?>
|
||||
<tr>
|
||||
<td class="short"><a href="<?php echo $baseurl."/decayingModel/view/".$item['DecayingModel']['id']; ?>"><?php echo h($item['DecayingModel']['id']); ?> </a></td>
|
||||
<td class="short"><a href="<?php echo $baseurl."/decayingModel/view/" . h($item['DecayingModel']['id']); ?>"><?php echo h($item['DecayingModel']['id']); ?> </a></td>
|
||||
<td class="short">
|
||||
<?php
|
||||
echo $this->OrgImg->getOrgImg(array('name' => $item['DecayingModel']['org_id'], 'size' => 24));
|
||||
|
@ -109,7 +109,7 @@ foreach ($decayingModels as $item): ?>
|
|||
</td>
|
||||
<td><i class="fas fa-<?php echo $item['DecayingModel']['all_orgs'] ? 'check' : 'times';?>"></i></td>
|
||||
<td>
|
||||
<a href="<?php echo $baseurl."/decayingModel/view/".$item['DecayingModel']['id']; ?>"><?php echo h($item['DecayingModel']['name']); ?> </a>
|
||||
<a href="<?php echo $baseurl."/decayingModel/view/" . h($item['DecayingModel']['id']); ?>"><?php echo h($item['DecayingModel']['name']); ?> </a>
|
||||
<?php if ($item['DecayingModel']['isDefault']): ?>
|
||||
<img src="<?php echo $baseurl;?>/img/orgs/MISP.png" width="24" height="24" style="padding-bottom:3px;" title="<?php echo __('Default Model from MISP Project'); ?>" />
|
||||
<?php endif; ?>
|
||||
|
@ -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/".$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 json_encode($item['DecayingModel']['parameters']); ?> </td>
|
||||
<td>
|
||||
<?php echo h($item['DecayingModel']['formula']); ?>
|
||||
<?php if (isset($available_formulas[$item['DecayingModel']['formula']]['description'])): ?>
|
||||
|
@ -139,15 +139,15 @@ foreach ($decayingModels as $item): ?>
|
|||
<?php if ($me['Role']['perm_site_admin'] || $item['DecayingModel']['org_id'] == $me['org_id']): ?>
|
||||
<?php
|
||||
if (!$item['DecayingModel']['isDefault']) {
|
||||
echo $this->Form->postLink('', array('action' => 'delete', $item['DecayingModel']['id']), array('class' => 'icon-trash', 'title' => 'Delete'), __('Are you sure you want to delete DecayingModel #' . $item['DecayingModel']['id'] . '?'));
|
||||
echo $this->Form->postLink('', array('action' => 'delete', $item['DecayingModel']['id']), array('class' => 'icon-trash', 'title' => 'Delete'), __('Are you sure you want to delete DecayingModel #' . h($item['DecayingModel']['id']) . '?'));
|
||||
}
|
||||
?>
|
||||
<?php echo $this->Html->link('', array('action' => 'edit', $item['DecayingModel']['id']), array('class' => 'icon-edit', 'title' => 'Edit'));?>
|
||||
<?php
|
||||
if ($item['DecayingModel']['enabled']):
|
||||
echo $this->Form->postLink('', array('action' => 'disable', $item['DecayingModel']['id']), array('class' => 'fa fa-pause', 'title' => 'Disable model'), __('Are you sure you want to disable DecayingModel #' . $item['DecayingModel']['id'] . '?'));
|
||||
echo $this->Form->postLink('', array('action' => 'disable', $item['DecayingModel']['id']), array('class' => 'fa fa-pause', 'title' => 'Disable model'), __('Are you sure you want to disable DecayingModel #' . h($item['DecayingModel']['id']) . '?'));
|
||||
else:
|
||||
echo $this->Form->postLink('', array('action' => 'enable', $item['DecayingModel']['id']), array('class' => 'fa fa-play', 'title' => 'Enable model'), __('Are you sure you want to enable DecayingModel #' . $item['DecayingModel']['id'] . '?'));
|
||||
echo $this->Form->postLink('', array('action' => 'enable', $item['DecayingModel']['id']), array('class' => 'fa fa-play', 'title' => 'Enable model'), __('Are you sure you want to enable DecayingModel #' . h($item['DecayingModel']['id']) . '?'));
|
||||
endif;
|
||||
?>
|
||||
<?php endif; ?>
|
||||
|
@ -159,7 +159,7 @@ endforeach; ?>
|
|||
<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}')
|
||||
'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
|
||||
));
|
||||
?>
|
||||
</p>
|
||||
|
|
|
@ -350,7 +350,7 @@
|
|||
?>
|
||||
<?php if (!empty($includeDecayScore)): ?>
|
||||
<td class="decayingScoreField">
|
||||
<div id = "Attribute_<?php echo $object['id']; ?>_score_solid" class="inline-field-solid">
|
||||
<div id = "Attribute_<?php echo h($object['id']); ?>_score_solid" class="inline-field-solid">
|
||||
<?php echo $this->element('DecayingModels/View/attribute_decay_score', array('scope' => 'object', 'object' => $object, 'uselink' => true)); ?>
|
||||
</div>
|
||||
</td>
|
||||
|
|
Loading…
Reference in New Issue