mirror of https://github.com/MISP/MISP
fix: [statistics] Don't show types with no values
parent
59949b2512
commit
d5515007ec
|
@ -9,19 +9,21 @@
|
|||
<?php
|
||||
$cnt = 0;
|
||||
foreach ($typeDb as $type => $colour):
|
||||
if (isset($data[0]['data'][$type])):
|
||||
?>
|
||||
<div class="attributehistogram-legend-line">
|
||||
<div class="attributehistogram-legend-box" style="display: block;float: left;margin: 4px 6px 0 0;background-color:<?php echo $colour; ?>"> </div>
|
||||
<div style="display: inline-block;cursor: pointer;<?php if (in_array($type, $selectedTypes)) echo 'font-weight:bold';?>" role="button" tabindex="0" aria-label="<?php echo __('Toggle histogram');?>" tite="<?php echo __('Toggle histogram');?>" onClick='toggleHistogramType("<?php echo h($type); ?>", [<?php foreach ($selectedTypes as $t) echo '"' . $t . '", ' ?>]);'><?php echo h($type);?></div>
|
||||
</div>
|
||||
<div class="attributehistogram-legend-line">
|
||||
<div class="attributehistogram-legend-box" style="display: block;float: left;margin: 4px 6px 0 0;background-color:<?php echo $colour; ?>"> </div>
|
||||
<div style="display: inline-block;cursor: pointer;<?php if (in_array($type, $selectedTypes)) echo 'font-weight:bold';?>" role="button" tabindex="0" aria-label="<?php echo __('Toggle histogram');?>" tite="<?php echo __('Toggle histogram');?>" onClick='toggleHistogramType("<?php echo h($type); ?>", [<?php foreach ($selectedTypes as $t) echo '"' . $t . '", ' ?>]);'><?php echo h($type);?></div>
|
||||
</div>
|
||||
<?php
|
||||
if ($cnt % 12 == 11):
|
||||
$cnt++;
|
||||
endif;
|
||||
if ($cnt % 12 == 0):
|
||||
?>
|
||||
</div>
|
||||
<div class="attributehistogram-legend-line col">
|
||||
</div>
|
||||
<div class="attributehistogram-legend-line col">
|
||||
<?php
|
||||
endif;
|
||||
$cnt++;
|
||||
endif;
|
||||
endforeach;
|
||||
?>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue