Merge branch 'ent-9662-second-round' of brutus.artica.es:artica/pandorafms into ent-9662-second-round

This commit is contained in:
Jose Gonzalez 2023-03-16 11:58:40 +01:00
commit fd82e1a582
3 changed files with 172 additions and 51 deletions

View File

@ -2752,6 +2752,146 @@ function events_print_type_img(
}
/**
* Prints the event type image.
*
* @param string $type Event type from SQL.
* @param boolean $return Whether to return or print.
*
* @return string HTML with img.
*/
function events_print_type_img_pdf(
$type,
$return=false
) {
$svg = '';
switch ($type) {
case 'alert_recovered':
$svg = '<svg viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Dark / 20 / alert@svg</title>
<desc>Created with Sketch.</desc>
<g id="Dark-/-20-/-alert" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M10,20 C11.4190985,20 12.5702076,18.8808594 12.5702076,17.5 L7.42979244,17.5 C7.42979244,18.8808594 8.5809015,20 10,20 Z M18.6540098,14.1519531 C17.8777645,13.3410156 16.425318,12.1210937 16.425318,8.125 C16.425318,5.08984375 14.2364028,2.66015625 11.2849029,2.0640625 L11.2849029,1.25 C11.2849029,0.559765625 10.7095493,0 10,0 C9.29045075,0 8.71509711,0.559765625 8.71509711,1.25 L8.71509711,2.0640625 C5.76359722,2.66015625 3.57468198,5.08984375 3.57468198,8.125 C3.57468198,12.1210938 2.12223547,13.3410156 1.3459902,14.1519531 C1.10492023,14.4039062 0.998045886,14.7050781 1.00002702,15 C1.00447442,15.640625 1.52156948,16.25 2.28977909,16.25 L17.7102209,16.25 C18.4784305,16.25 18.9959274,15.640625 18.999973,15 C19.0019541,14.7050781 18.8950798,14.4035156 18.6540098,14.1519531 L18.6540098,14.1519531 Z" id="Shape" fill="#82b92e"></path>
</g>
</svg>';
break;
case 'alert_manual_validation':
$svg = '<svg viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Dark / 20 / validate@svg</title>
<desc>Created with Sketch.</desc>
<g id="Dark-/-20-/-validate" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
<g id="Group" transform="translate(1.000000, 1.000000)" stroke="#3F3F3F" stroke-width="2">
<circle id="Oval" cx="9" cy="9" r="9"></circle>
<polyline id="Path-10" points="4.93746567 8.98550486 7 12 12.9374657 7.03800583"></polyline>
</g>
</g>
</svg>';
break;
case 'going_down_critical':
case 'going_up_critical':
$svg = '<svg viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Dark / 20 / modules@svg</title>
<desc>Created with Sketch.</desc>
<g id="Dark-/-20-/-modules" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M18.7929688,3.18164062 L10.8789062,0.162109375 C10.59375,0.0540234375 10.296875,0 10,0 C9.703125,0 9.40625,0.0540234375 9.12109375,0.161914062 L1.20664062,3.18164062 C0.480078125,3.45898438 0,4.15625 0,4.93359375 L0,15.0664062 C0,15.8441406 0.480078125,16.5410156 1.20664062,16.8183594 L9.12070313,19.8378906 C9.40625,19.9453125 9.703125,20 10,20 C10.296875,20 10.5949219,19.9459766 10.8777344,19.8380859 L18.7917969,16.8185547 C19.5195312,16.5429688 20,15.84375 20,15.0664062 L20,4.93359375 C20,4.15625 19.5195312,3.45898438 18.7929688,3.18164062 Z M10,2.50273437 L16.4921875,4.9796875 L10,7.4140625 L3.50664062,4.98046875 L10,2.50273437 Z M11.25,17.0273438 L11.25,9.6171875 L17.5,7.2734375 L17.5,14.6367188 L11.25,17.0273438 Z" id="Shape" fill="#e63c52"></path>
</g>
</svg>';
break;
case 'going_up_normal':
case 'going_down_normal':
$svg = '<svg viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Dark / 20 / modules@svg</title>
<desc>Created with Sketch.</desc>
<g id="Dark-/-20-/-modules" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M18.7929688,3.18164062 L10.8789062,0.162109375 C10.59375,0.0540234375 10.296875,0 10,0 C9.703125,0 9.40625,0.0540234375 9.12109375,0.161914062 L1.20664062,3.18164062 C0.480078125,3.45898438 0,4.15625 0,4.93359375 L0,15.0664062 C0,15.8441406 0.480078125,16.5410156 1.20664062,16.8183594 L9.12070313,19.8378906 C9.40625,19.9453125 9.703125,20 10,20 C10.296875,20 10.5949219,19.9459766 10.8777344,19.8380859 L18.7917969,16.8185547 C19.5195312,16.5429688 20,15.84375 20,15.0664062 L20,4.93359375 C20,4.15625 19.5195312,3.45898438 18.7929688,3.18164062 Z M10,2.50273437 L16.4921875,4.9796875 L10,7.4140625 L3.50664062,4.98046875 L10,2.50273437 Z M11.25,17.0273438 L11.25,9.6171875 L17.5,7.2734375 L17.5,14.6367188 L11.25,17.0273438 Z" id="Shape" fill="#82b92e"></path>
</g>
</svg>';
break;
case 'going_up_warning':
case 'going_down_warning':
$svg = '<svg viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Dark / 20 / modules@svg</title>
<desc>Created with Sketch.</desc>
<g id="Dark-/-20-/-modules" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M18.7929688,3.18164062 L10.8789062,0.162109375 C10.59375,0.0540234375 10.296875,0 10,0 C9.703125,0 9.40625,0.0540234375 9.12109375,0.161914062 L1.20664062,3.18164062 C0.480078125,3.45898438 0,4.15625 0,4.93359375 L0,15.0664062 C0,15.8441406 0.480078125,16.5410156 1.20664062,16.8183594 L9.12070313,19.8378906 C9.40625,19.9453125 9.703125,20 10,20 C10.296875,20 10.5949219,19.9459766 10.8777344,19.8380859 L18.7917969,16.8185547 C19.5195312,16.5429688 20,15.84375 20,15.0664062 L20,4.93359375 C20,4.15625 19.5195312,3.45898438 18.7929688,3.18164062 Z M10,2.50273437 L16.4921875,4.9796875 L10,7.4140625 L3.50664062,4.98046875 L10,2.50273437 Z M11.25,17.0273438 L11.25,9.6171875 L17.5,7.2734375 L17.5,14.6367188 L11.25,17.0273438 Z" id="Shape" fill="#fcab10"></path>
</g>
</svg>';
break;
case 'going_unknown':
$svg = '<svg viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Dark / 20 / modules@svg</title>
<desc>Created with Sketch.</desc>
<g id="Dark-/-20-/-modules" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M18.7929688,3.18164062 L10.8789062,0.162109375 C10.59375,0.0540234375 10.296875,0 10,0 C9.703125,0 9.40625,0.0540234375 9.12109375,0.161914062 L1.20664062,3.18164062 C0.480078125,3.45898438 0,4.15625 0,4.93359375 L0,15.0664062 C0,15.8441406 0.480078125,16.5410156 1.20664062,16.8183594 L9.12070313,19.8378906 C9.40625,19.9453125 9.703125,20 10,20 C10.296875,20 10.5949219,19.9459766 10.8777344,19.8380859 L18.7917969,16.8185547 C19.5195312,16.5429688 20,15.84375 20,15.0664062 L20,4.93359375 C20,4.15625 19.5195312,3.45898438 18.7929688,3.18164062 Z M10,2.50273437 L16.4921875,4.9796875 L10,7.4140625 L3.50664062,4.98046875 L10,2.50273437 Z M11.25,17.0273438 L11.25,9.6171875 L17.5,7.2734375 L17.5,14.6367188 L11.25,17.0273438 Z" id="Shape" fill="#808080"></path>
</g>
</svg>';
break;
case 'system':
$svg = '<svg viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Dark / 20 / configuration@svg</title>
<desc>Created with Sketch.</desc>
<g id="Dark-/-20-/-configuration" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M18.7953273,7.94064046 L18.0028475,7.94064046 C17.3563508,7.94064046 16.8141278,7.38349388 16.8141278,6.72220776 C16.8141278,6.38896121 16.9548972,6.08695652 17.205154,5.8630565 L17.7160949,5.36318667 C18.2218222,4.86331684 18.2218222,4.0458214 17.7160949,3.54595158 L16.5534436,2.39520958 C16.3240416,2.16610258 15.9851522,2.03072117 15.6410491,2.03072117 C15.296946,2.03072117 14.9632703,2.16610258 14.7286546,2.39520958 L14.2385684,2.88466545 C14.0039526,3.14501432 13.6911316,3.28560271 13.3522422,3.28560271 C12.6848908,3.28560271 12.1270267,2.74407706 12.1270267,2.10361885 L12.1270267,1.30695131 C12.1270267,0.604009373 11.5587353,0 10.8496744,0 L9.26471474,0 C8.55565385,0 7.99257608,0.598802395 7.99257608,1.30695131 L7.99257608,2.09841187 C7.99257608,2.73887009 7.434712,3.28039573 6.76736057,3.28039573 C6.43368486,3.28039573 6.12607756,3.13980734 5.90188919,2.89507941 L5.39616194,2.39520958 C5.16675988,2.1608956 4.82787048,2.03072117 4.48376741,2.03072117 C4.13966433,2.03072117 3.80598861,2.16610258 3.57137287,2.39520958 L2.39829419,3.5407446 C1.89778062,4.04061442 1.89778062,4.85810987 2.39829419,5.35277272 L2.8883804,5.84222859 C3.14906455,6.07654257 3.29504767,6.38896121 3.29504767,6.72220776 C3.29504767,7.38870086 2.75282464,7.94064046 2.10632794,7.94064046 L1.31384812,7.94064046 C0.599573548,7.94064046 0,8.49778703 0,9.20593595 L0,9.99739651 L0,10.7888571 C0,11.491799 0.599573548,12.0541526 1.31384812,12.0541526 L2.10632794,12.0541526 C2.75282464,12.0541526 3.29504767,12.6112991 3.29504767,13.2725853 C3.29504767,13.6058318 3.14906455,13.9182505 2.8883804,14.1525644 L2.39829419,14.6368133 C1.89778062,15.1366832 1.89778062,15.9541786 2.39829419,16.4488414 L3.56094551,17.6047904 C3.79034756,17.8391044 4.12923696,17.9692788 4.47334004,17.9692788 C4.81744312,17.9692788 5.15111883,17.8338974 5.38573457,17.6047904 L5.89146182,17.1049206 C6.11043651,16.8601927 6.42325749,16.7196043 6.75693321,16.7196043 C7.42428463,16.7196043 7.98214872,17.2611299 7.98214872,17.9015881 L7.98214872,18.6930487 C7.98214872,19.3959906 8.54522648,20 9.25950106,20 L10.8444607,20 C11.5535216,20 12.1165994,19.4011976 12.1165994,18.6930487 L12.1165994,17.9015881 C12.1165994,17.2611299 12.6744634,16.7196043 13.3418149,16.7196043 C13.6754906,16.7196043 13.9883116,16.8653996 14.228141,17.1205415 L14.7182272,17.6099974 C14.9528429,17.8391044 15.2865186,17.9744858 15.6306217,17.9744858 C15.9747248,17.9744858 16.3084005,17.8391044 16.5430163,17.6099974 L17.7056676,16.4540484 C18.2061811,15.9541786 18.2061811,15.1366832 17.7056676,14.6368133 L17.1947266,14.1369435 C16.9444698,13.9130435 16.8037004,13.6058318 16.8037004,13.2777922 C16.8037004,12.6112991 17.3459234,12.0593595 17.9924201,12.0593595 L18.7849,12.0593595 C19.4939608,12.0593595 19.9998464,11.502213 19.9998464,10.794064 L19.9998464,9.99739651 L19.9998464,9.20593595 C20.0101155,8.49778703 19.5043882,7.94064046 18.7953273,7.94064046 Z M14.2229273,9.99739651 L14.2229273,9.99739651 C14.2229273,12.2936735 12.3616425,14.1629784 10.0519809,14.1629784 C7.7423193,14.1629784 5.88103446,12.2936735 5.88103446,9.99739651 L5.88103446,9.99739651 L5.88103446,9.99739651 C5.88103446,7.7011195 7.7423193,5.83181463 10.0519809,5.83181463 C12.3616425,5.83181463 14.2229273,7.7011195 14.2229273,9.99739651 L14.2229273,9.99739651 Z" id="Path-2" fill="#3F3F3F"></path>
</g>
</svg>';
break;
case 'new_agent':
$svg = '<svg viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Dark / 20 / agents@svg</title>
<desc>Created with Sketch.</desc>
<g id="Dark-/-20-/-agents" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Group" transform="translate(0.000000, 1.000000)">
<rect id="Rectangle" fill="#3F3F3F" x="0" y="6" width="10" height="6" rx="1"></rect>
<polyline id="Path-43" stroke="#3F3F3F" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" points="3 4 6.9967103 -2.30926389e-14 15 -2.30926389e-14 19 4 19 14 15 18 6.9967103 18 3 14.0223656"></polyline>
</g>
</g>
</svg>';
break;
case 'configuration_change':
$svg = '<svg viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 61.2 (89653) - https://sketch.com -->
<title>Dark / 20 / configuration@svg</title>
<desc>Created with Sketch.</desc>
<g id="Dark-/-20-/-configuration" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M18.7953273,7.94064046 L18.0028475,7.94064046 C17.3563508,7.94064046 16.8141278,7.38349388 16.8141278,6.72220776 C16.8141278,6.38896121 16.9548972,6.08695652 17.205154,5.8630565 L17.7160949,5.36318667 C18.2218222,4.86331684 18.2218222,4.0458214 17.7160949,3.54595158 L16.5534436,2.39520958 C16.3240416,2.16610258 15.9851522,2.03072117 15.6410491,2.03072117 C15.296946,2.03072117 14.9632703,2.16610258 14.7286546,2.39520958 L14.2385684,2.88466545 C14.0039526,3.14501432 13.6911316,3.28560271 13.3522422,3.28560271 C12.6848908,3.28560271 12.1270267,2.74407706 12.1270267,2.10361885 L12.1270267,1.30695131 C12.1270267,0.604009373 11.5587353,0 10.8496744,0 L9.26471474,0 C8.55565385,0 7.99257608,0.598802395 7.99257608,1.30695131 L7.99257608,2.09841187 C7.99257608,2.73887009 7.434712,3.28039573 6.76736057,3.28039573 C6.43368486,3.28039573 6.12607756,3.13980734 5.90188919,2.89507941 L5.39616194,2.39520958 C5.16675988,2.1608956 4.82787048,2.03072117 4.48376741,2.03072117 C4.13966433,2.03072117 3.80598861,2.16610258 3.57137287,2.39520958 L2.39829419,3.5407446 C1.89778062,4.04061442 1.89778062,4.85810987 2.39829419,5.35277272 L2.8883804,5.84222859 C3.14906455,6.07654257 3.29504767,6.38896121 3.29504767,6.72220776 C3.29504767,7.38870086 2.75282464,7.94064046 2.10632794,7.94064046 L1.31384812,7.94064046 C0.599573548,7.94064046 0,8.49778703 0,9.20593595 L0,9.99739651 L0,10.7888571 C0,11.491799 0.599573548,12.0541526 1.31384812,12.0541526 L2.10632794,12.0541526 C2.75282464,12.0541526 3.29504767,12.6112991 3.29504767,13.2725853 C3.29504767,13.6058318 3.14906455,13.9182505 2.8883804,14.1525644 L2.39829419,14.6368133 C1.89778062,15.1366832 1.89778062,15.9541786 2.39829419,16.4488414 L3.56094551,17.6047904 C3.79034756,17.8391044 4.12923696,17.9692788 4.47334004,17.9692788 C4.81744312,17.9692788 5.15111883,17.8338974 5.38573457,17.6047904 L5.89146182,17.1049206 C6.11043651,16.8601927 6.42325749,16.7196043 6.75693321,16.7196043 C7.42428463,16.7196043 7.98214872,17.2611299 7.98214872,17.9015881 L7.98214872,18.6930487 C7.98214872,19.3959906 8.54522648,20 9.25950106,20 L10.8444607,20 C11.5535216,20 12.1165994,19.4011976 12.1165994,18.6930487 L12.1165994,17.9015881 C12.1165994,17.2611299 12.6744634,16.7196043 13.3418149,16.7196043 C13.6754906,16.7196043 13.9883116,16.8653996 14.228141,17.1205415 L14.7182272,17.6099974 C14.9528429,17.8391044 15.2865186,17.9744858 15.6306217,17.9744858 C15.9747248,17.9744858 16.3084005,17.8391044 16.5430163,17.6099974 L17.7056676,16.4540484 C18.2061811,15.9541786 18.2061811,15.1366832 17.7056676,14.6368133 L17.1947266,14.1369435 C16.9444698,13.9130435 16.8037004,13.6058318 16.8037004,13.2777922 C16.8037004,12.6112991 17.3459234,12.0593595 17.9924201,12.0593595 L18.7849,12.0593595 C19.4939608,12.0593595 19.9998464,11.502213 19.9998464,10.794064 L19.9998464,9.99739651 L19.9998464,9.20593595 C20.0101155,8.49778703 19.5043882,7.94064046 18.7953273,7.94064046 Z M14.2229273,9.99739651 L14.2229273,9.99739651 C14.2229273,12.2936735 12.3616425,14.1629784 10.0519809,14.1629784 C7.7423193,14.1629784 5.88103446,12.2936735 5.88103446,9.99739651 L5.88103446,9.99739651 L5.88103446,9.99739651 C5.88103446,7.7011195 7.7423193,5.83181463 10.0519809,5.83181463 C12.3616425,5.83181463 14.2229273,7.7011195 14.2229273,9.99739651 L14.2229273,9.99739651 Z" id="Path-2" fill="#3F3F3F"></path>
</g>
</svg>';
break;
case 'unknown':
default:
$svg = '<svg viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Dark / 20 / event@svg</title>
<desc>Created with Sketch.</desc>
<g id="Dark-/-20-/-event" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g>
<rect id="Rectangle" x="0" y="0" width="20" height="20"></rect>
<path d="M15.9503156,6.25 L10.901623,6.25 L12.7653518,1.1796875 C12.9403498,0.5859375 12.4372305,0 11.7503633,0 L5.45043493,0 C4.9254409,0 4.47919597,0.34765625 4.40919676,0.8125 L3.00921267,10.1875 C2.92608862,10.75 3.41608305,11.25 4.05045084,11.25 L9.24351682,11.25 L7.22666474,18.8476562 C7.06916653,19.4414062 7.57666077,20 8.24602816,20 C8.61352398,20 8.96352,19.828125 9.15601782,19.53125 L16.8559303,7.65625 C17.2628007,7.03515625 16.7596814,6.25 15.9503156,6.25 Z" id="Path" fill="#3F3F3F"></path>
</g>
</g>
</svg>';
break;
}
$output = '<div style="width:20px;height:20px">'.$svg.'</div>';
if ($return) {
return $output;
}
echo $output;
}
/**
* Prints the event type description
*

View File

@ -1075,24 +1075,6 @@ function reporting_html_event_report_group($table, $item, $pdf=0)
}
foreach ($item['data'] as $k => $event) {
// First pass along the class of this row.
if ($item['show_summary_group']) {
$table1->cellclass[$k][2] = get_priority_class($event['criticity']);
$table1->cellclass[$k][3] = get_priority_class($event['criticity']);
$table1->cellclass[$k][4] = get_priority_class($event['criticity']);
$table1->cellclass[$k][5] = get_priority_class($event['criticity']);
$table1->cellclass[$k][6] = get_priority_class($event['criticity']);
$table1->cellclass[$k][7] = get_priority_class($event['criticity']);
$table1->cellclass[$k][8] = get_priority_class($event['criticity']);
} else {
$table1->cellclass[$k][2] = get_priority_class($event['criticity']);
$table1->cellclass[$k][3] = get_priority_class($event['criticity']);
$table1->cellclass[$k][4] = get_priority_class($event['criticity']);
$table1->cellclass[$k][5] = get_priority_class($event['criticity']);
$table1->cellclass[$k][6] = get_priority_class($event['criticity']);
$table1->cellclass[$k][7] = get_priority_class($event['criticity']);
}
$data = [];
// Colored box.
@ -1125,7 +1107,11 @@ function reporting_html_event_report_group($table, $item, $pdf=0)
]
);
$data[] = events_print_type_img($event['event_type'], true);
if ($pdf) {
$data[] = events_print_type_img_pdf($event['event_type'], true);
} else {
$data[] = events_print_type_img($event['event_type'], true);
}
if ($item['show_summary_group']) {
$data[] = $event['event_rep'];
@ -1343,19 +1329,6 @@ function reporting_html_event_report_module($table, $item, $pdf=0)
if (is_array($item_data) || is_object($item_data)) {
foreach ($item_data as $i => $event) {
$data = [];
if ($show_summary_group) {
$table1->cellclass[$i][2] = get_priority_class($event['criticity']);
$table1->cellclass[$i][3] = get_priority_class($event['criticity']);
$table1->cellclass[$i][4] = get_priority_class($event['criticity']);
$table1->cellclass[$i][5] = get_priority_class($event['criticity']);
$table1->cellclass[$i][6] = get_priority_class($event['criticity']);
} else {
$table1->cellclass[$i][2] = get_priority_class($event['criticity']);
$table1->cellclass[$i][3] = get_priority_class($event['criticity']);
$table1->cellclass[$i][4] = get_priority_class($event['criticity']);
$table1->cellclass[$i][6] = get_priority_class($event['criticity']);
}
// Colored box.
switch ($event['estado']) {
case 0:
@ -1386,7 +1359,12 @@ function reporting_html_event_report_module($table, $item, $pdf=0)
]
);
$data[1] = events_print_type_img($event['event_type'], true);
if ($pdf) {
$data[1] = events_print_type_img_pdf($event['event_type'], true);
} else {
$data[1] = events_print_type_img($event['event_type'], true);
}
$data[2] = io_safe_output($event['evento']);
$data[3] = get_priority_name($event['criticity']);
if ($show_summary_group) {
@ -2671,21 +2649,6 @@ function reporting_html_event_report_agent($table, $item, $pdf=0)
}
foreach ($item['data'] as $i => $event) {
if ($item['show_summary_group']) {
$table1->cellclass[$i][2] = get_priority_class($event['criticity']);
$table1->cellclass[$i][3] = get_priority_class($event['criticity']);
$table1->cellclass[$i][4] = get_priority_class($event['criticity']);
$table1->cellclass[$i][5] = get_priority_class($event['criticity']);
$table1->cellclass[$i][6] = get_priority_class($event['criticity']);
$table1->cellclass[$i][7] = get_priority_class($event['criticity']);
} else {
$table1->cellclass[$i][2] = get_priority_class($event['criticity']);
$table1->cellclass[$i][3] = get_priority_class($event['criticity']);
$table1->cellclass[$i][4] = get_priority_class($event['criticity']);
$table1->cellclass[$i][5] = get_priority_class($event['criticity']);
$table1->cellclass[$i][6] = get_priority_class($event['criticity']);
}
$data = [];
// Colored box.
switch ($event['status']) {
@ -2716,7 +2679,11 @@ function reporting_html_event_report_agent($table, $item, $pdf=0)
]
);
$data[] = events_print_type_img($event['type'], true);
if ($pdf) {
$data[] = events_print_type_img_pdf($event['type'], true);
} else {
$data[] = events_print_type_img($event['type'], true);
}
if ($item['show_summary_group']) {
$data[] = $event['count'];
@ -3284,6 +3251,7 @@ function get_alert_table($data)
{
$table = new StdCLass();
$table->width = '99%';
$table->class = 'info_table';
$table->data = [];
$table->head = [];
$table->headstyle = [];

View File

@ -216,6 +216,19 @@ table tbody td.cellBig {
font-size: 18px;
}
table.info_table > tbody > tr:nth-child(even) {
background-color: #e5e9ed !important;
table.info_table {
border-collapse: collapse;
}
table.info_table thead tr th,
table.info_table thead tr td {
background-color: white !important;
}
table.info_table thead tr th {
border-bottom: 1px solid #333333;
}
table.info_table tbody tr td {
border-bottom: 1px solid #e5e5e5;
}