| 1 |
<?php defined('ABSPATH') or die("Protected By WT!"); ?> |
| 2 |
<?php if (!empty($arguments)): ?> |
| 3 |
|
| 4 |
<div class="wtotem_content"> |
| 5 |
<div class="wtotem_container"> |
| 6 |
<div class="wtotem_first"> |
| 7 |
<div class="wtotem_overall wtotem_first_left wt_card"> |
| 8 |
<div class="wtotem_overall__title wtotem_title-info"> |
| 9 |
<h3 class="wtotem_title-info__title"> |
| 10 |
<?= wtsec_locale("score.overall_security_grade") ?> |
| 11 |
<span class="wtotem_title-info__info" data-tlite="w" |
| 12 |
title="<?= $arguments["score"]["description"] ?>"> </span> |
| 13 |
</h3> |
| 14 |
</div> |
| 15 |
<div class="wtotem_overall__body"> |
| 16 |
<div class="wtotem_overall__inner"> |
| 17 |
<div class="wtotem_overall__rectangle wtsec_score_bg_<?= $arguments["score"]["color"] ?>"><?= $arguments["score"]["grade"] ?></div> |
| 18 |
<div class="wtotem_overall__figures wtsec_score_<?= $arguments["score"]["color"] ?>"><?= $arguments["score"]["total_score"] ?></div> |
| 19 |
</div> |
| 20 |
<p class="wtotem_overall__text"><?= $arguments["score"]["information"] ?></p> |
| 21 |
</div> |
| 22 |
</div> |
| 23 |
|
| 24 |
<div class="wtotem_info wtotem_first_right wt_card"> |
| 25 |
<div class="wtotem_info__item"> |
| 26 |
<div class="wtotem_info__block"> |
| 27 |
<div class="wtotem_info__subtitle"><?= wtsec_locale("score.tested_on") ?></div> |
| 28 |
<div class="wtotem_info__info"><?= $arguments["score"]["tested_on"] ?></div> |
| 29 |
</div> |
| 30 |
<div class="wtotem_info__block"> |
| 31 |
<div class="wtotem_info__subtitle"><?= wtsec_locale("score.server_ip") ?></div> |
| 32 |
<div class="wtotem_info__info"><?= $arguments["score"]["server_ip"] ?></div> |
| 33 |
</div> |
| 34 |
</div> |
| 35 |
<div class="wtotem_info__item"> |
| 36 |
<div class="wtotem_info__block"> |
| 37 |
<div class="wtotem_info__subtitle"><?= wtsec_locale("score.location") ?></div> |
| 38 |
<div class="wtotem_info__info"><?= $arguments["score"]["location"] ?></div> |
| 39 |
</div> |
| 40 |
<div class="wtotem_info__scoring arrow-right"><a href="https://wtotem.com/scoring?url=<?= WTSEC_SITE_URL ?>&email=<?= $arguments["settings"]["email"] ?>" target="_blank"><?= wtsec_locale("score.full_scoring") ?></a></div> |
| 41 |
</div> |
| 42 |
</div> |
| 43 |
</div> |
| 44 |
|
| 45 |
<?php if ($arguments["am"]["process_status"] !== "installed" || !$arguments["am"]["installed"]): ?> |
| 46 |
<div class="wtotem_unit"> |
| 47 |
<div class="wtotem_unit__first section-header-mb"> |
| 48 |
<h2 class="title"> |
| 49 |
<?= wtsec_locale("agent_manager_installation") ?> |
| 50 |
</h2> |
| 51 |
</div> |
| 52 |
<div class="wtotem_unit__wrapper wt_card"> |
| 53 |
<?php if ($arguments["am"]["process_status"] === "installing"): ?> |
| 54 |
<div class="wtotem_unit__block wtotem_unit__block_antivirus" id="wtsec_antivirus_block_installed" style="display: none"> |
| 55 |
<div class="wtotem_unit__contain"> |
| 56 |
<div class="wtotem_unit__circle wtotem_unit__circle_success"> |
| 57 |
<img src="<?= wtsec_getImagePath("success.svg") ?>" alt="Success" class="wtotem_unit__img"> |
| 58 |
</div> |
| 59 |
<h2 class="title"> |
| 60 |
<?= wtsec_locale("remote_antivirus") ?> |
| 61 |
</h2> |
| 62 |
</div> |
| 63 |
<div class="wtotem_unit__expectation wtotem_unit__expectation_success"> |
| 64 |
<?= wtsec_locale("installed") ?> |
| 65 |
</div> |
| 66 |
</div> |
| 67 |
<div class="wtotem_unit__block wtotem_unit__block_antivirus" id="wtsec_antivirus_block_installing" style="display: none"> |
| 68 |
<div class="wtotem_unit__contain"> |
| 69 |
<div class="wtotem_unit__expectation wtotem_unit__circle_loading"> |
| 70 |
<img src="<?= wtsec_getImagePath("spinner.svg") ?>" alt="Spinner" |
| 71 |
class="wtotem_unit__img wtotem_unit__img_spinner"/> |
| 72 |
</div> |
| 73 |
<h2 class="title ml-2"> |
| 74 |
<?= wtsec_locale("remote_antivirus") ?> |
| 75 |
</h2> |
| 76 |
</div> |
| 77 |
<div class="wtotem_unit__expectation wtotem_unit__expectation_loading"> |
| 78 |
<?= wtsec_locale("installation_in_progress") ?>... |
| 79 |
</div> |
| 80 |
</div> |
| 81 |
<div class="wtotem_unit__block wtotem_unit__block_antivirus" id="wtsec_antivirus_block_failed" style="display: none"> |
| 82 |
<div class="wtotem_unit__contain"> |
| 83 |
<div class="wtotem_unit__circle wtotem_unit__circle_error"></div> |
| 84 |
<h2 class="title"> |
| 85 |
<?= wtsec_locale("remote_antivirus") ?> |
| 86 |
</h2> |
| 87 |
</div> |
| 88 |
<div class="wtotem_unit__expectation wtotem_unit__expectation_error"> |
| 89 |
<?= wtsec_locale("installation_failed") ?> |
| 90 |
</div> |
| 91 |
</div> |
| 92 |
|
| 93 |
<div class="wtotem_unit__block wtotem_unit__block_firewall" id="wtsec_firewall_block_installed" style="display: none"> |
| 94 |
<div class="wtotem_unit__contain"> |
| 95 |
<div class="wtotem_unit__circle wtotem_unit__circle_success"> |
| 96 |
<img src="<?= wtsec_getImagePath("success.svg") ?>" alt="Success" |
| 97 |
class="wtotem_unit__img"> |
| 98 |
</div> |
| 99 |
<h2 class="title"> |
| 100 |
<?= wtsec_locale("firewall") ?> |
| 101 |
</h2> |
| 102 |
</div> |
| 103 |
<div class="wtotem_unit__expectation wtotem_unit__expectation_success"> |
| 104 |
<?= wtsec_locale("installed") ?> |
| 105 |
</div> |
| 106 |
</div> |
| 107 |
|
| 108 |
<div class="wtotem_unit__block wtotem_unit__block_firewall" id="wtsec_firewall_block_installing" style="display: none"> |
| 109 |
<div class="wtotem_unit__contain"> |
| 110 |
<div class="wtotem_unit__expectation wtotem_unit__circle_loading"> |
| 111 |
<img src="<?= wtsec_getImagePath("spinner.svg") ?>" alt="Spinner" |
| 112 |
class="wtotem_unit__img wtotem_unit__img_spinner"/> |
| 113 |
</div> |
| 114 |
<h2 class="title ml-2"> |
| 115 |
<?= wtsec_locale("firewall") ?> |
| 116 |
</h2> |
| 117 |
</div> |
| 118 |
<div class="wtotem_unit__expectation wtotem_unit__expectation_loading"> |
| 119 |
<?= wtsec_locale("installation_in_progress") ?>... |
| 120 |
</div> |
| 121 |
</div> |
| 122 |
|
| 123 |
<div class="wtotem_unit__block wtotem_unit__block_firewall" id="wtsec_firewall_block_failed" style="display: none"> |
| 124 |
<div class="wtotem_unit__contain"> |
| 125 |
<div class="wtotem_unit__circle wtotem_unit__circle_error"></div> |
| 126 |
<h2 class="title"> |
| 127 |
<?= wtsec_locale("firewall") ?> |
| 128 |
</h2> |
| 129 |
</div> |
| 130 |
<div class="wtotem_unit__expectation wtotem_unit__expectation_error"> |
| 131 |
<?= wtsec_locale("installation_failed") ?> |
| 132 |
</div> |
| 133 |
</div> |
| 134 |
<?php elseif(!$arguments["am"]["installed"]): ?> |
| 135 |
<div class="wtotem_unit__block"> |
| 136 |
<div class="wtotem_unit__contain"> |
| 137 |
<div class="wtotem_unit__circle wtotem_unit__circle_error"></div> |
| 138 |
<h2 class="title"> |
| 139 |
<?= wtsec_locale("agent_manager_failed") ?> |
| 140 |
</h2> |
| 141 |
</div> |
| 142 |
<div class="wtotem_unit__expectation wtotem_unit__expectation_error"> |
| 143 |
<?php if (isset($arguments['am']['actions']['first'])) { ?> |
| 144 |
<?= $arguments['am']['actions']['first'] ?> |
| 145 |
<?php } ?> |
| 146 |
</div> |
| 147 |
</div> |
| 148 |
<?php endif; ?> |
| 149 |
|
| 150 |
</div> |
| 151 |
</div> |
| 152 |
<?php endif; ?> |
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
<div class="wtotem_firewall"> |
| 157 |
<div class="wtotem_firewall__first section-header-mb"> |
| 158 |
<h2 class="title"><?= wtsec_locale("firewall_activity") ?></h2> |
| 159 |
<a href="<?=wtsec_getUrl("waf")?>" class="wtotem_firewall__stats wtotem_print"> |
| 160 |
<span class="wtotem_firewall__icon"></span> |
| 161 |
<span class="wtotem_firewall__text wtotem_print__label">Full stats</span> |
| 162 |
</a> |
| 163 |
</div> |
| 164 |
<div class="wtotem_firewall__block"> |
| 165 |
<div class="wtotem_numbers wt_card"> |
| 166 |
<div class="wtotem_numbers__item"> |
| 167 |
<div class="wtotem_numbers__title"><?= wtsec_locale("attacks") ?></div> |
| 168 |
<div class="wtotem_numbers__figures"><?= $arguments["waf"]["attacks"] ?></div> |
| 169 |
</div> |
| 170 |
|
| 171 |
<div class="wtotem_numbers__item"> |
| 172 |
<div class="wtotem_numbers__title"><?= wtsec_locale("attacks_blocked") ?></div> |
| 173 |
<div class="wtotem_numbers__figures"><?= $arguments["waf"]["blocking"] ?></div> |
| 174 |
</div> |
| 175 |
|
| 176 |
<div class="wtotem_numbers__item"> |
| 177 |
<div class="wtotem_numbers__title"><?= wtsec_locale("not_blocked") ?></div> |
| 178 |
<div class="wtotem_numbers__figures"><?= $arguments["waf"]["non-blocking"] ?></div> |
| 179 |
</div> |
| 180 |
</div> |
| 181 |
|
| 182 |
|
| 183 |
<div class="wtotem_from wt_card"> |
| 184 |
<div class="wtotem_from__svg-wrap"> |
| 185 |
<svg class="wtotem_from__progress"> |
| 186 |
<circle class="wtotem_from__circle" cx="35" cy="35" r="28" stroke-width="20" |
| 187 |
stroke="rgb(135,255,222)"/> |
| 188 |
</svg> |
| 189 |
<span class="wtotem_from__percent" data-value="<?=$arguments["waf"]["countryAttacks"]['percent']?>">100%</span> |
| 190 |
</div> |
| 191 |
|
| 192 |
<div class="wtotem_from__info"> |
| 193 |
<div class="wtotem_from__title"><?= wtsec_locale("chart.country") ?></div> |
| 194 |
<div class="wtotem_from__country" > |
| 195 |
<?= ($arguments["waf"]["countryAttacks"]["country"]) ? |
| 196 |
wtsec_locale("chart.attack_from_region",['region' => $arguments["waf"]["countryAttacks"]["country"]]) : |
| 197 |
wtsec_locale('statuses.ok') ?> |
| 198 |
</div> |
| 199 |
</div> |
| 200 |
<div class="wtotem_from__arrow-right"></div> |
| 201 |
</div> |
| 202 |
</div> |
| 203 |
</div> |
| 204 |
|
| 205 |
<div class="wtotem_chart wt_card"> |
| 206 |
<div class="wtotem_chart-first"> |
| 207 |
<div class="wtotem_chart-first__left"> |
| 208 |
<div class="wtotem_chart-first__all"><?= wtsec_locale("chart.all") ?></div> |
| 209 |
<div class="wtotem_chart-first__hack wtotem_chart-first__hack_attack"> |
| 210 |
<span></span> |
| 211 |
<p><?= wtsec_locale("chart.attacks") ?></p> |
| 212 |
</div> |
| 213 |
<div class="wtotem_chart-first__hack wtotem_chart-first__hack_blocked"> |
| 214 |
<span></span> |
| 215 |
<p><?= wtsec_locale("chart.blocked") ?></p> |
| 216 |
</div> |
| 217 |
</div> |
| 218 |
|
| 219 |
<div class="wtotem_chart-first__right" id="chart_btn"> |
| 220 |
<div class="wtotem_chart-first__btn" data-days="365"><?= wtsec_locale("chart.yearly") ?></div> |
| 221 |
<div class="wtotem_chart-first__btn wtotem_chart-first__btn_active" data-days="31"><?= wtsec_locale("chart.monthly") ?></div> |
| 222 |
<div class="wtotem_chart-first__btn" data-days="7"><?= wtsec_locale("chart.weekly") ?></div> |
| 223 |
<div class="wtotem_chart-first__btn" data-days="1"><?= wtsec_locale("chart.daily") ?></div> |
| 224 |
</div> |
| 225 |
</div> |
| 226 |
|
| 227 |
<div id="chart_wrap"> |
| 228 |
<div class="wtotem_chart__diagram" data-days="7" id="wtotem_chart_diagram"> |
| 229 |
<div id="line-chart" class="line-chart"> |
| 230 |
<div id="tooltipAttacks" class="line-chart__tooltip"> |
| 231 |
<span id="countAttacks"></span> |
| 232 |
</div> |
| 233 |
<div id="tooltipBlocked" class="line-chart__tooltip"> |
| 234 |
<span id="countBlocked"></span> |
| 235 |
</div> |
| 236 |
</div> |
| 237 |
</div> |
| 238 |
|
| 239 |
<div class="wtotem_chart__line"></div> |
| 240 |
</div> |
| 241 |
|
| 242 |
|
| 243 |
<div class="wtotem_data"> |
| 244 |
<div class="wtotem_data__thead"> |
| 245 |
<div class="wtotem_data__tr"> |
| 246 |
<div |
| 247 |
class="wtotem_data__th wtotem_data_width_1" |
| 248 |
> |
| 249 |
<?= wtsec_locale("chart.type_ip") ?> |
| 250 |
</div> |
| 251 |
<div |
| 252 |
class="wtotem_data__th wtotem_data_width_2" |
| 253 |
> |
| 254 |
<?= wtsec_locale("chart.country") ?> |
| 255 |
</div> |
| 256 |
<div |
| 257 |
class="wtotem_data__th wtotem_data_width_3" |
| 258 |
> |
| 259 |
<?= wtsec_locale("chart.time") ?> |
| 260 |
</div> |
| 261 |
<div |
| 262 |
class="wtotem_data__th wtotem_data_width_4" |
| 263 |
> |
| 264 |
<?= wtsec_locale("chart.attack_location") ?> |
| 265 |
</div> |
| 266 |
<div |
| 267 |
class="wtotem_data__th wtotem_data_width_6" |
| 268 |
> |
| 269 |
<?= wtsec_locale("chart.status") ?> |
| 270 |
</div> |
| 271 |
</div> |
| 272 |
</div> |
| 273 |
<div class="wtotem_data__tbody"> |
| 274 |
<?php include 'components/_firewall_lazy.php'?> |
| 275 |
</div> |
| 276 |
</div> |
| 277 |
<div class="wtotem_chart__line"></div> |
| 278 |
<div class="wtotem_chart__last"> |
| 279 |
<p class="wtotem_chart__text"> |
| 280 |
<?= wtsec_locale("want_more") ?> |
| 281 |
</p> |
| 282 |
|
| 283 |
<a href="<?=wtsec_getUrl("waf")?>" class="wtotem_chart__btn"> |
| 284 |
<?= wtsec_locale("read_more") ?> |
| 285 |
</a> |
| 286 |
</div> |
| 287 |
</div> |
| 288 |
|
| 289 |
<div class="wtotem_antivirus"> |
| 290 |
<div class="wtotem_antivirus__first section-header-mb"> |
| 291 |
<h2 class="title"> |
| 292 |
<?= wtsec_locale("remote_antivirus") ?> |
| 293 |
</h2> |
| 294 |
<a href="<?=wtsec_getUrl("vc")?>" class="arrow-right"> |
| 295 |
<?= wtsec_locale("learn_more") ?> |
| 296 |
</a> |
| 297 |
</div> |
| 298 |
<div class="wtotem_antivirus__block wt_card"> |
| 299 |
<div class="wtotem_antivirus__item"> |
| 300 |
<div class="wtotem_antivirus__figures wtotem_antivirus__figures_green"> |
| 301 |
<?= $arguments["vc"]["scanned"] ?> |
| 302 |
</div> |
| 303 |
<div class="wtotem_antivirus__title"> |
| 304 |
<?= wtsec_locale("antivirus.scanned") ?> |
| 305 |
</div> |
| 306 |
</div> |
| 307 |
|
| 308 |
<div class="wtotem_antivirus__item"> |
| 309 |
<div class="wtotem_antivirus__figures wtotem_antivirus__figures_yellow"> |
| 310 |
<?= $arguments["vc"]["changes"] ?> |
| 311 |
</div> |
| 312 |
<div class="wtotem_antivirus__title"> |
| 313 |
<?= wtsec_locale("antivirus.changed") ?> |
| 314 |
</div> |
| 315 |
</div> |
| 316 |
|
| 317 |
<div class="wtotem_antivirus__item"> |
| 318 |
<div class="wtotem_antivirus__figures wtotem_antivirus__figures_orange"> |
| 319 |
<?= $arguments["vc"]["signatures"] ?> |
| 320 |
</div> |
| 321 |
<div class="wtotem_antivirus__title"><?= wtsec_locale("antivirus.infected") ?></div> |
| 322 |
</div> |
| 323 |
|
| 324 |
<div class="wtotem_antivirus__item"> |
| 325 |
<div class="wtotem_antivirus__figures wtotem_antivirus__figures_black"><?= $arguments["vc"]["deleted"] ?></div> |
| 326 |
<div class="wtotem_antivirus__title"><?= wtsec_locale("antivirus.deleted") ?></div> |
| 327 |
</div> |
| 328 |
</div> |
| 329 |
</div> |
| 330 |
|
| 331 |
<div class="wtotem_monitoring"> |
| 332 |
<div class="wtotem_monitoring__first section-header-mb"> |
| 333 |
<h2 class="title"> |
| 334 |
<?= wtsec_locale("monitoring") ?> |
| 335 |
</h2> |
| 336 |
</div> |
| 337 |
<div class="wtotem_table wt_card"> |
| 338 |
<div class="wtotem_table__row"> |
| 339 |
<div class="wtotem_table__col"> |
| 340 |
<div class="wtotem_table__th"> |
| 341 |
<h3 class="wtotem_table__title wtotem_title-info__title"> |
| 342 |
<?= wtsec_locale("ssl") ?> |
| 343 |
<span class="wtotem_title-info__info" data-tlite="w" |
| 344 |
title="<?= $arguments["ssl"]["description"] ?>"></span> |
| 345 |
</h3> |
| 346 |
</div> |
| 347 |
<div class="wtotem_table__td"> |
| 348 |
<div class="wtotem_table__expired"> |
| 349 |
<?= $arguments["ssl"]["status"]["text"] ?> |
| 350 |
</div> |
| 351 |
<div class="wtotem_table__solve"> |
| 352 |
<?= $arguments["ssl"]["solve_it"] ?> |
| 353 |
</div> |
| 354 |
</div> |
| 355 |
<?php if (!empty($arguments["ssl"]["days_left"])): ?> |
| 356 |
<div class="wtotem_table__info"> |
| 357 |
<h3 class="wtotem_table__subject"> |
| 358 |
<?= wtsec_locale("days_left") ?> |
| 359 |
</h3> |
| 360 |
<div class="wtotem_table__text"> |
| 361 |
<?= $arguments["ssl"]["days_left"] ?> |
| 362 |
</div> |
| 363 |
</div> |
| 364 |
<?php endif; ?> |
| 365 |
<?php if (!empty($arguments["ssl"]["issue_date"])): ?> |
| 366 |
<div class="wtotem_table__info"> |
| 367 |
<h3 class="wtotem_table__subject"> |
| 368 |
<?= wtsec_locale("issue_date") ?> |
| 369 |
</h3> |
| 370 |
<div class="wtotem_table__text"> |
| 371 |
<?= $arguments["ssl"]["issue_date"] ?> |
| 372 |
</div> |
| 373 |
</div> |
| 374 |
<?php endif; ?> |
| 375 |
<?php if (!empty($arguments["ssl"]["expiry_date"])): ?> |
| 376 |
<div class="wtotem_table__info"> |
| 377 |
<h3 class="wtotem_table__subject"> |
| 378 |
<?= wtsec_locale("expiry_date") ?> |
| 379 |
</h3> |
| 380 |
<div class="wtotem_table__text"> |
| 381 |
<?= $arguments["ssl"]["expiry_date"] ?> |
| 382 |
</div> |
| 383 |
</div> |
| 384 |
<?php endif; ?> |
| 385 |
|
| 386 |
</div> |
| 387 |
<div class="wtotem_table__col"> |
| 388 |
<div class="wtotem_table__th"> |
| 389 |
<h3 class="wtotem_table__title wtotem_title-info__title"> |
| 390 |
<?= wtsec_locale("availability") ?> |
| 391 |
<span class="wtotem_title-info__info" data-tlite="w" |
| 392 |
title="<?= $arguments["wa"]["description"] ?>"></span> |
| 393 |
</h3> |
| 394 |
</div> |
| 395 |
<div class="wtotem_table__td"> |
| 396 |
<div class="wtotem_table__perfomance"> |
| 397 |
<?= wtsec_locale("performance") ?> |
| 398 |
</div> |
| 399 |
<div class="wtotem_table__right wtotem_table__right_progress-wrap"> |
| 400 |
<span class="wtotem_table__initial-value">0%</span> |
| 401 |
<div class="wtotem_table__stick-progress"> |
| 402 |
<div class="wtotem_table__message"><span |
| 403 |
class="wtotem_table__percent"><?= $arguments["wa"]["availability_percent"] ?>%</span><span |
| 404 |
class="wtotem_table__triangle"></span> |
| 405 |
</div> |
| 406 |
</div> |
| 407 |
</div> |
| 408 |
</div> |
| 409 |
<div class="wtotem_table__info"> |
| 410 |
<h3 class="wtotem_table__subject"><?= wtsec_locale("status") ?></h3> |
| 411 |
<div class="wtotem_table__status"><?= $arguments["wa"]["status"]["text"] ?></div> |
| 412 |
</div> |
| 413 |
<div class="wtotem_table__info"> |
| 414 |
<h3 class="wtotem_table__subject"><?= wtsec_locale("response_time") ?></h3> |
| 415 |
<div class="wtotem_table__text"><?= $arguments["wa"]["response_time"] ?></div> |
| 416 |
</div> |
| 417 |
<div class="wtotem_table__info"> |
| 418 |
<h3 class="wtotem_table__subject"><?= wtsec_locale("downtime") ?></h3> |
| 419 |
<div class="wtotem_table__text"><?= $arguments["wa"]["downtime"] ?></div> |
| 420 |
</div> |
| 421 |
<div class="wtotem_table__info"> |
| 422 |
<h3 class="wtotem_table__subject"><?= wtsec_locale("last_test") ?></h3> |
| 423 |
<div class="wtotem_table__text"><?= $arguments["wa"]["last_test"] ?></div> |
| 424 |
</div> |
| 425 |
</div> |
| 426 |
<div class="wtotem_table__col"> |
| 427 |
<div class="wtotem_table__th"> |
| 428 |
<h3 class="wtotem_table__title wtotem_title-info__title"><?= wtsec_locale("reputation") ?> |
| 429 |
<span class="wtotem_title-info__info" data-tlite="w" |
| 430 |
title="<?= $arguments["av"]["description"] ?>"></span></h3> |
| 431 |
</div> |
| 432 |
<div class="wtotem_table__td"> |
| 433 |
<div class="wtotem_table__wrap"> |
| 434 |
<?php if($arguments["dc"]["status"]["image"]):?> |
| 435 |
<img src="<?= wtsec_getImagePath($arguments["dc"]["status"]["image"]) ?>" alt="Check mark icon" |
| 436 |
class="wtotem_table__img"/> |
| 437 |
<?php endif; ?> |
| 438 |
</div> |
| 439 |
|
| 440 |
<div class="wtotem_table__perfomance wtotem_table__perfomance_long ml-2"><?= $arguments["av"]["reputation"] ?></div> |
| 441 |
</div> |
| 442 |
<div class="wtotem_table__info"> |
| 443 |
<h3 class="wtotem_table__subject"><?= wtsec_locale("status") ?></h3> |
| 444 |
<div class="wtotem_table__status"><?= $arguments["av"]["status"]["text"] ?></div> |
| 445 |
</div> |
| 446 |
<div class="wtotem_table__info"> |
| 447 |
<h3 class="wtotem_table__subject"> |
| 448 |
<?= wtsec_locale("blacklists_entries") ?> |
| 449 |
</h3> |
| 450 |
<div class="wtotem_table__text"> |
| 451 |
<?= $arguments["av"]["blacklists_entries"] ?> |
| 452 |
</div> |
| 453 |
</div> |
| 454 |
<div class="wtotem_table__info"> |
| 455 |
<h3 class="wtotem_table__subject"> |
| 456 |
<?= wtsec_locale("last_test") ?> |
| 457 |
</h3> |
| 458 |
<div class="wtotem_table__text"> |
| 459 |
<?= $arguments["av"]["time_of_the_last_test"] ?> |
| 460 |
</div> |
| 461 |
</div> |
| 462 |
<div class="wtotem_table__info"></div> |
| 463 |
</div> |
| 464 |
</div> |
| 465 |
<div class="wtotem_table__footer"> |
| 466 |
<a target="_blank" href="https://wtotem.com/faq/#hs-chat-open" class="wtotem_table__link"> |
| 467 |
<div class="wtotem_table__perfomance"> |
| 468 |
<?= wtsec_locale("need_more_support") ?> |
| 469 |
<span><?= wtsec_locale("lets_talk") ?></span> |
| 470 |
</div> |
| 471 |
</a> |
| 472 |
</div> |
| 473 |
</div> |
| 474 |
</div> |
| 475 |
|
| 476 |
<div class="wtotem_scanning"> |
| 477 |
<div class="wtotem_scanning__first section-header-mb"> |
| 478 |
<h2 class="title"> |
| 479 |
<?= wtsec_locale("scanning") ?> |
| 480 |
</h2> |
| 481 |
</div> |
| 482 |
<div class="wtotem_table wt_card"> |
| 483 |
<div class="wtotem_table__row"> |
| 484 |
<div class="wtotem_table__col"> |
| 485 |
<div class="wtotem_table__th"> |
| 486 |
<h3 class="wtotem_table__title wtotem_title-info__title"> |
| 487 |
<?= wtsec_locale("port_scanner") ?> |
| 488 |
<span class="wtotem_title-info__info" data-tlite="w" |
| 489 |
title="<?= $arguments["dc"]["description"] ?>"></span> |
| 490 |
</h3> |
| 491 |
</div> |
| 492 |
<div class="wtotem_table__info"> |
| 493 |
<h3 class="wtotem_table__subject"> |
| 494 |
<?= wtsec_locale("status") ?> |
| 495 |
</h3> |
| 496 |
<div class="wtotem_table__status"><?= $arguments["ps"]["status"]["text"] ?></div> |
| 497 |
</div> |
| 498 |
<div class="wtotem_table__info"> |
| 499 |
<h3 class="wtotem_table__subject"><?= wtsec_locale("ip_address") ?></h3> |
| 500 |
<div class="wtotem_table__text"><?= $arguments["ps"]["ip"] ?></div> |
| 501 |
</div> |
| 502 |
<?php if (!empty($arguments["ps"]["tcp"])): ?> |
| 503 |
<div class="wtotem_table__info"> |
| 504 |
<h3 class="wtotem_table__subject"> |
| 505 |
<?= wtsec_locale("tcp") ?> |
| 506 |
</h3> |
| 507 |
<div class="wtotem_table__text"> |
| 508 |
<?= $arguments["ps"]["tcp"] ?> |
| 509 |
</div> |
| 510 |
</div> |
| 511 |
<?php endif; ?> |
| 512 |
<div class="wtotem_table__info"> |
| 513 |
<h3 class="wtotem_table__subject"> |
| 514 |
<?= wtsec_locale("last_test") ?> |
| 515 |
</h3> |
| 516 |
<div class="wtotem_table__text"> |
| 517 |
<?= $arguments["ps"]["last_test"] ?> |
| 518 |
</div> |
| 519 |
</div> |
| 520 |
</div> |
| 521 |
|
| 522 |
<div class="wtotem_table__col"> |
| 523 |
<div class="wtotem_table__th wtotem_overall__title"> |
| 524 |
<h3 class="wtotem_table__title wtotem_title-info__title"> |
| 525 |
<?= wtsec_locale("deface_scanner") ?> |
| 526 |
<span class="wtotem_title-info__info" data-tlite="w" |
| 527 |
title="<?= $arguments["dc"]["description"] ?>"></span> |
| 528 |
</h3> |
| 529 |
</div> |
| 530 |
<div class="wtotem_table__item"> |
| 531 |
<div class="wtotem_table__wrap_big"> |
| 532 |
<?php if($arguments["dc"]["status"]["image"]):?> |
| 533 |
<img src="<?= wtsec_getImagePath($arguments["dc"]["status"]["image"]) ?>" alt="Check mark icon" |
| 534 |
class="wtotem_table__img"/> |
| 535 |
<?php endif; ?> |
| 536 |
</div> |
| 537 |
</div> |
| 538 |
|
| 539 |
<div class="wtotem_table__info"> |
| 540 |
<h3 class="wtotem_table__subject"> |
| 541 |
<?= wtsec_locale("status") ?> |
| 542 |
</h3> |
| 543 |
<div class="wtotem_table__status"> |
| 544 |
<?= $arguments["dc"]["status"]["text"] ?> |
| 545 |
</div> |
| 546 |
</div> |
| 547 |
<div class="wtotem_table__info"> |
| 548 |
<h3 class="wtotem_table__subject"> |
| 549 |
<?= wtsec_locale("number") ?> |
| 550 |
</h3> |
| 551 |
<div class="wtotem_table__text"> |
| 552 |
<?= $arguments["dc"]["number"] ?> |
| 553 |
</div> |
| 554 |
</div> |
| 555 |
<div class="wtotem_table__info"> |
| 556 |
<h3 class="wtotem_table__subject"> |
| 557 |
<?= wtsec_locale("last_test") ?> |
| 558 |
</h3> |
| 559 |
<div class="wtotem_table__text"> |
| 560 |
<?= $arguments["dc"]["time_of_the_last_test"] ?> |
| 561 |
</div> |
| 562 |
</div> |
| 563 |
</div> |
| 564 |
|
| 565 |
</div> |
| 566 |
|
| 567 |
<div class="wtotem_table__footer"> |
| 568 |
<a target="_blank" href="https://wtotem.com/faq/#hs-chat-open" class="wtotem_table__link"> |
| 569 |
<div class="wtotem_table__perfomance"> |
| 570 |
<?= wtsec_locale("need_more_support") ?> |
| 571 |
<span><?= wtsec_locale("lets_talk") ?></span> |
| 572 |
</div> |
| 573 |
</a> |
| 574 |
</div> |
| 575 |
</div> |
| 576 |
</div> |
| 577 |
</div> |
| 578 |
</div> |
| 579 |
|
| 580 |
<script> |
| 581 |
var availability_percent = "<?=$arguments["wa"]["availability_percent"]?>"; |
| 582 |
var waf_chart = <?=$arguments["waf"]["chart"]?>; |
| 583 |
</script> |
| 584 |
<script> |
| 585 |
var wtotem_token = "<?=$arguments["settings"]["token"]?>"; |
| 586 |
var wtotem_site_id = "<?=$arguments["settings"]["site_id"]?>"; |
| 587 |
var wtotem_am_process_status = "<?=$arguments["am"]["process_status"]?>"; |
| 588 |
var wtotem_locale_installed = "<?= wtsec_locale("installed") ?>"; |
| 589 |
var wtotem_locale_installing = "<?= wtsec_locale("installation_in_progress") ?>"; |
| 590 |
var wtotem_locale_failed = "<?= wtsec_locale("failed") ?>"; |
| 591 |
var wtotem_socket_url = "wss://api.wtotem.com/graphql"; |
| 592 |
document.addEventListener('DOMContentLoaded', function () { |
| 593 |
if (wtotem_am_process_status === "installing") { |
| 594 |
let firewall_selector = document.getElementsByClassName("wtotem_unit__block_firewall"); |
| 595 |
let firewall_installed_selector = document.getElementById("wtsec_firewall_block_installed"); |
| 596 |
let firewall_installing_selector = document.getElementById("wtsec_firewall_block_installing"); |
| 597 |
let firewall_failed_selector = document.getElementById("wtsec_firewall_block_failed"); |
| 598 |
let antivirus_selector = document.getElementsByClassName("wtotem_unit__block_antivirus"); |
| 599 |
let antivirus_installed_selector = document.getElementById("wtsec_antivirus_block_installed"); |
| 600 |
let antivirus_installing_selector = document.getElementById("wtsec_antivirus_block_installing"); |
| 601 |
let antivirus_failed_selector = document.getElementById("wtsec_antivirus_block_failed"); |
| 602 |
|
| 603 |
function show_hide(selector,show = true){ |
| 604 |
if(show){ |
| 605 |
selector.style.display = "flex"; |
| 606 |
}else{ |
| 607 |
selector.style.display = "none"; |
| 608 |
} |
| 609 |
} |
| 610 |
|
| 611 |
function show_hide_in_loop(selectors,show = true){ |
| 612 |
for(let selector of selectors){ |
| 613 |
show_hide(selector,show); |
| 614 |
} |
| 615 |
} |
| 616 |
|
| 617 |
show_hide(firewall_installing_selector,true); |
| 618 |
show_hide(antivirus_installing_selector,true); |
| 619 |
let variables = { |
| 620 |
input: { |
| 621 |
token: wtotem_token, |
| 622 |
service: 'am', |
| 623 |
siteId: wtotem_site_id, |
| 624 |
}, |
| 625 |
} |
| 626 |
let query = `subscription EventsSubscription($input: EventsInput!) { |
| 627 |
events(input: $input) { |
| 628 |
siteId |
| 629 |
hostname |
| 630 |
status |
| 631 |
service |
| 632 |
error { |
| 633 |
message |
| 634 |
__typename |
| 635 |
} |
| 636 |
__typename |
| 637 |
} |
| 638 |
}`; |
| 639 |
const sub = graphQLSubscriber(wtotem_socket_url, {}, |
| 640 |
(error, subscribe) => { |
| 641 |
if (!(error || subscribe)) { |
| 642 |
// Normal closure. |
| 643 |
return |
| 644 |
} |
| 645 |
if (error) { |
| 646 |
console.error(error) |
| 647 |
throw error |
| 648 |
} |
| 649 |
const unsubscribe = subscribe( |
| 650 |
query, |
| 651 |
variables, |
| 652 |
null, |
| 653 |
(error, data) => { |
| 654 |
console.log(data); |
| 655 |
if (!(error || subscribe)) { |
| 656 |
// Normal closure |
| 657 |
return |
| 658 |
} |
| 659 |
if (error) { |
| 660 |
console.error(error) |
| 661 |
throw error |
| 662 |
} |
| 663 |
|
| 664 |
if (data.events.status === "waf_installed") { |
| 665 |
show_hide_in_loop(firewall_selector, false); |
| 666 |
show_hide(firewall_installed_selector,true); |
| 667 |
} else if (data.events.status === "av_installed") { |
| 668 |
show_hide_in_loop(antivirus_selector, false); |
| 669 |
show_hide(antivirus_installed_selector,true); |
| 670 |
} else if (data.events.status === "am_installed") { |
| 671 |
|
| 672 |
} else { |
| 673 |
let split = data.events.status.split("_"); |
| 674 |
if(split.length === 0){ |
| 675 |
return; |
| 676 |
} |
| 677 |
let service = split[0]; |
| 678 |
if (service === "waf") { |
| 679 |
show_hide_in_loop(firewall_selector, false); |
| 680 |
show_hide(firewall_failed_selector,true); |
| 681 |
} |
| 682 |
if (service === "av") { |
| 683 |
show_hide_in_loop(antivirus_selector, false); |
| 684 |
show_hide(antivirus_failed_selector,true); |
| 685 |
} |
| 686 |
if (service === "am") { |
| 687 |
|
| 688 |
} |
| 689 |
} |
| 690 |
}) |
| 691 |
}) |
| 692 |
} |
| 693 |
}); |
| 694 |
</script> |
| 695 |
<?php else: ?> |
| 696 |
<?php //show error here ?> |
| 697 |
<?php endif; ?> |