mirror of https://github.com/MISP/MISP
chg: [dashboard] views for widgets updated
parent
44ff66445d
commit
1c915cd077
|
@ -12,18 +12,19 @@
|
|||
}
|
||||
echo sprintf(
|
||||
'<tr><td style="%s">%s</td><td style="%s">%s</td></tr>',
|
||||
'text-align:right;width:33%;',
|
||||
'text-align:right;width:33%;white-space:nowrap;',
|
||||
h($entry),
|
||||
'width:100%',
|
||||
sprintf(
|
||||
'<div title="%s" style="%s">%s</div>',
|
||||
'<div title="%s" style="%s">%s%s</div>',
|
||||
h($entry) . ': ' . h($count),
|
||||
sprintf(
|
||||
'background-color:%s; width:%s; color:white; text-align:center;',
|
||||
(empty($data['colours'][$entry]) ? '#0088cc' : h($data['colours'][$entry])),
|
||||
100 * h($value) / $max . '%;'
|
||||
($max == 0 ? 0 : 100 * h($value) / $max) . '%;'
|
||||
),
|
||||
h($count)
|
||||
h($count),
|
||||
!empty($data['output_decorator']) ? '%' : ''
|
||||
),
|
||||
' '
|
||||
);
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
<?php
|
||||
foreach ($data as $element) {
|
||||
echo sprintf(
|
||||
'<div><span class="bold">%s</span>: <span class="blue">%s</span>%s</div>',
|
||||
h($element['title']),
|
||||
empty($element['value']) ? '' : h($element['value']),
|
||||
empty($element['html']) ? '' : $element['html']
|
||||
);
|
||||
if (!empty($element['type']) && $element['type'] === 'gap') {
|
||||
echo '<br />';
|
||||
} else {
|
||||
echo sprintf(
|
||||
'<div><span class="bold">%s</span>: <span class="%s">%s</span>%s</div>',
|
||||
h($element['title']),
|
||||
empty($element['class']) ? 'blue' : h($element['class']),
|
||||
!isset($element['value']) ? '' : h($element['value']),
|
||||
empty($element['html']) ? '' : $element['html']
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue