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