PluginProbe
WebTotem Security / 2.3.21
WebTotem Security v2.3.21
3.0.1 3.0.0 trunk 1.0 1.1 1.2 1.3 1.3.1 1.3.2 1.3.3 2.0 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.1 2.2.2 2.2.3 2.2.4 All 109 releases
wt-security / includes / dashboard.php

dashboard.php in WebTotem Security 2.3.21, at includes/dashboard.php

1,000 lines 52.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php defined('ABSPATH') or die("Protected By WT!"); ?>
2
3 <?php if (!empty($arguments)): ?>
4
5 <div class="wtotem_content">
6 <div class="wtotem_container">
7 <div class="wtotem_first">
8 <div class="wtotem_overall wtotem_first_left wt_card">
9 <div class="wtotem_overall__title wtotem_title-info">
10 <h3 class="wtotem_title-info__title">
11 <?= wtsec_locale("score.overall_security_grade") ?>
12 <div class="wtotem_title-info__info wtotem-tooltip">
13 <div class="wtotem-tooltip__content">
14 <?= wtsec_locale("tooltips.scoring") ?>
15 </div>
16 </div>
17 </h3>
18 </div>
19 <div class="wtotem_overall__body">
20 <div class="wtotem_overall__inner">
21 <div class="wtotem_overall__rectangle wtsec_score_bg_<?= $arguments["score"]["color"] ?>"><?= $arguments["score"]["grade"] ?></div>
22 <div class="wtotem_overall__figures wtsec_score_<?= $arguments["score"]["color"] ?>"><?= $arguments["score"]["total_score"] ?></div>
23 </div>
24 <p class="wtotem_overall__text"><?= $arguments["score"]["information"] ?></p>
25 </div>
26 </div>
27
28 <div class="wtotem_info wtotem_first_right wt_card">
29 <div class="wtotem_info__item">
30 <div class="wtotem_info__block">
31 <div class="wtotem_info__subtitle"><?= wtsec_locale("score.tested_on") ?></div>
32 <div class="wtotem_info__info"><?= $arguments["score"]["tested_on"] ?></div>
33 </div>
34 <div class="wtotem_info__block">
35 <div class="wtotem_info__subtitle"><?= wtsec_locale("score.server_ip") ?></div>
36 <div class="wtotem_info__info"><?= $arguments["score"]["server_ip"] ?></div>
37 </div>
38 </div>
39 <div class="wtotem_info__item">
40 <div class="wtotem_info__block">
41 <div class="wtotem_info__subtitle"><?= wtsec_locale("score.location") ?></div>
42 <div class="wtotem_info__info"><?= $arguments["score"]["location"] ?></div>
43 </div>
44 <div class="wtotem_info__scoring arrow-right"><a href="https://wtotem.com/cabinet/site/<?= $arguments['settings']['site_id']?>/scoring" target="_blank"><?= wtsec_locale("score.full_scoring") ?></a></div>
45 </div>
46 </div>
47 </div>
48
49 <?php if ($arguments["am"]["process_status"] !== "installed" || !$arguments["am"]["installed"]): ?>
50 <div class="wtotem_unit">
51 <div class="wtotem_unit__first section-header-mb">
52 <h2 class="title">
53 <?= wtsec_locale("agent_manager_installation") ?>
54 </h2>
55
56 <a class="wtotem_button wtotem_button--primary wtotem_font-700 wtotem_reinstall" href="#" data-text="<?= wtsec_locale("reinstall_warning") ?>">
57 <span><?= wtsec_locale("reinstall") ?></span>
58 </a>
59 </div>
60 <div class="wtotem_unit__wrapper wt_card">
61 <?php if ($arguments["am"]["process_status"] === "installing"): ?>
62 <div class="wtotem_unit__block wtotem_unit__block_antivirus" id="wtsec_antivirus_block_installed" style="display: none">
63 <div class="wtotem_unit__contain">
64 <div class="wtotem_unit__circle wtotem_unit__circle_success">
65 <img src="<?= wtsec_getImagePath("success.svg") ?>" alt="Success" class="wtotem_unit__img">
66 </div>
67 <h2 class="title">
68 <?= wtsec_locale("remote_antivirus") ?>
69 </h2>
70 </div>
71 <div class="wtotem_unit__expectation wtotem_unit__expectation_success">
72 <?= wtsec_locale("installed") ?>
73 </div>
74 </div>
75 <div class="wtotem_unit__block wtotem_unit__block_antivirus" id="wtsec_antivirus_block_installing" >
76 <div class="wtotem_unit__contain">
77 <div class="wtotem_unit__expectation wtotem_unit__circle_loading">
78 <img src="<?= wtsec_getImagePath("spinner.svg") ?>" alt="Spinner"
79 class="wtotem_unit__img wtotem_unit__img_spinner"/>
80 </div>
81 <h2 class="title ml-2">
82 <?= wtsec_locale("remote_antivirus") ?>
83 </h2>
84 </div>
85 <div class="wtotem_unit__expectation wtotem_unit__expectation_loading">
86 <?= wtsec_locale("installation_in_progress") ?>...
87 </div>
88 </div>
89 <div class="wtotem_unit__block wtotem_unit__block_antivirus" id="wtsec_antivirus_block_failed" style="display: none">
90 <div class="wtotem_unit__contain">
91 <div class="wtotem_unit__circle wtotem_unit__circle_error"></div>
92 <h2 class="title">
93 <?= wtsec_locale("remote_antivirus") ?>
94 </h2>
95 </div>
96 <div class="wtotem_unit__expectation wtotem_unit__expectation_error">
97 <?= wtsec_locale("installation_failed") ?>
98 </div>
99 </div>
100
101 <div class="wtotem_unit__block wtotem_unit__block_firewall" id="wtsec_firewall_block_installed" style="display: none">
102 <div class="wtotem_unit__contain">
103 <div class="wtotem_unit__circle wtotem_unit__circle_success">
104 <img src="<?= wtsec_getImagePath("success.svg") ?>" alt="Success"
105 class="wtotem_unit__img">
106 </div>
107 <h2 class="title">
108 <?= wtsec_locale("firewall") ?>
109 </h2>
110 </div>
111 <div class="wtotem_unit__expectation wtotem_unit__expectation_success">
112 <?= wtsec_locale("installed") ?>
113 </div>
114 </div>
115
116 <div class="wtotem_unit__block wtotem_unit__block_firewall" id="wtsec_firewall_block_installing">
117 <div class="wtotem_unit__contain">
118 <div class="wtotem_unit__expectation wtotem_unit__circle_loading">
119 <img src="<?= wtsec_getImagePath("spinner.svg") ?>" alt="Spinner"
120 class="wtotem_unit__img wtotem_unit__img_spinner"/>
121 </div>
122 <h2 class="title ml-2">
123 <?= wtsec_locale("firewall") ?>
124 </h2>
125 </div>
126 <div class="wtotem_unit__expectation wtotem_unit__expectation_loading">
127 <?= wtsec_locale("installation_in_progress") ?>...
128 </div>
129 </div>
130
131 <div class="wtotem_unit__block wtotem_unit__block_firewall" id="wtsec_firewall_block_failed" style="display: none">
132 <div class="wtotem_unit__contain">
133 <div class="wtotem_unit__circle wtotem_unit__circle_error"></div>
134 <h2 class="title">
135 <?= wtsec_locale("firewall") ?>
136 </h2>
137 </div>
138 <div class="wtotem_unit__expectation wtotem_unit__expectation_error">
139 <?= wtsec_locale("installation_failed") ?>
140 </div>
141 </div>
142
143 <?php elseif(!$arguments["am"]["installed"]): ?>
144 <div class="wtotem_unit__block">
145 <div class="wtotem_unit__contain">
146 <div class="wtotem_unit__circle wtotem_unit__circle_error"></div>
147 <h2 class="title">
148 <?= wtsec_locale("agent_manager_failed") ?>
149 </h2>
150 </div>
151 <div class="wtotem_unit__expectation wtotem_unit__expectation_error">
152 <a class="wtotem_button wtotem_button--primary wtotem_font-700 wtotem_block_center wtotem_reinstall" href="#" data-text="<?= wtsec_locale("reinstall_warning") ?>">
153 <span><?= wtsec_locale("install") ?></span>
154 </a>
155 </div>
156 </div>
157 <?php endif; ?>
158
159 </div>
160
161 </div>
162 <?php endif; ?>
163
164
165 <div class="wtotem_firewall">
166 <div class="wtotem_firewall__first section-header-mb">
167 <h2 class="title"><?= wtsec_locale("firewall_activity") ?></h2>
168 </div>
169
170 <?php if($arguments["wafTraining"]):?>
171 <div class="wtotem_firwall-training-alert wt_card">
172 <div class="wtotem_firwall-training-alert__text-wrapper">
173 <p class="wtotem_firwall-training-alert__text">
174 <?= wtsec_locale("firewall-training") ?>
175 </p>
176 </div>
177 <a href="https://wtotem.com/docs/our-features/firewall" target="_blank" class="wtotem_firwall-training-alert__learn-more button">
178 <?= wtsec_locale("learn_more") ?>
179 </a>
180 </div>
181 <?php endif; ?>
182
183 <div class="wtotem_firewall__block">
184 <div class="wtotem_numbers wt_card">
185 <div class="wtotem_numbers__item">
186 <div class="wtotem_numbers__title"><?= wtsec_locale("attacks") ?></div>
187 <div class="wtotem_numbers__figures"><?= $arguments["waf"]["attacks"] ?></div>
188 </div>
189
190 <div class="wtotem_numbers__item">
191 <div class="wtotem_numbers__title"><?= wtsec_locale("attacks_blocked") ?></div>
192 <div class="wtotem_numbers__figures"><?= $arguments["waf"]["blocking"] ?></div>
193 </div>
194
195 <div class="wtotem_numbers__item">
196 <div class="wtotem_numbers__title"><?= wtsec_locale("not_blocked") ?></div>
197 <div class="wtotem_numbers__figures"><?= $arguments["waf"]["non-blocking"] ?></div>
198 </div>
199 </div>
200
201
202 <div class="wtotem_from wt_card">
203 <div class="wtotem_from__svg-wrap">
204 <svg class="wtotem_from__progress">
205 <circle class="wtotem_from__circle" cx="35" cy="35" r="28" stroke-width="20" stroke="rgb(135,255,222)"/>
206 </svg>
207 <span class="wtotem_from__percent" data-value="<?=$arguments["waf"]["countryAttacks"]['percent']?>">100%</span>
208 </div>
209
210 <div class="wtotem_from__info">
211 <div class="wtotem_from__title"><?= wtsec_locale("chart.country") ?></div>
212 <div class="wtotem_from__country" >
213 <?= ($arguments["waf"]["countryAttacks"]["country"]) ?
214 wtsec_locale("chart.attack_from_region",['region' => $arguments["waf"]["countryAttacks"]["country"]]) :
215 wtsec_locale('statuses.pending') ?>
216 </div>
217 </div>
218 <a href="<?=wtsec_getUrl("waf")?>" class="wtotem_from__arrow-right"></a>
219 </div>
220 </div>
221 </div>
222
223 <div class="wtotem_chart wt_card">
224 <div class="wtotem_chart-first">
225 <div class="wtotem_chart-first__left">
226 <div class="wtotem_chart-first__hack wtotem_chart-first__hack_attack">
227 <span></span>
228 <p><?= wtsec_locale("chart.attacks") ?></p>
229 </div>
230 <div class="wtotem_chart-first__hack wtotem_chart-first__hack_blocked">
231 <span></span>
232 <p><?= wtsec_locale("chart.blocked") ?></p>
233 </div>
234 </div>
235
236 <div class="wtotem_chart-first__right chart_btn" data-box="chart_wrap" data-service="waf">
237 <div class="wtotem_chart-first__btn" data-days="365"><?= wtsec_locale("chart.yearly") ?></div>
238 <div class="wtotem_chart-first__btn wtotem_chart-first__btn_active" data-days="31"><?= wtsec_locale("chart.monthly") ?></div>
239 <div class="wtotem_chart-first__btn" data-days="7"><?= wtsec_locale("chart.weekly") ?></div>
240 <div class="wtotem_chart-first__btn" data-days="1"><?= wtsec_locale("chart.daily") ?></div>
241 </div>
242 </div>
243
244
245 <?php if($arguments["waf"]["chart"] && $arguments["waf"]["chart"] != 'null'):?>
246 <div id="chart_wrap">
247 <div class="wtotem_chart__diagram" data-days="31" id="wtotem_chart_diagram">
248 <div id="line-chart" class="line-chart">
249 <div id="tooltipAttacks" class="line-chart__tooltip">
250 <span id="countAttacks"></span>
251 </div>
252 <div id="tooltipBlocked" class="line-chart__tooltip line-chart__tooltip--reverse">
253 <span id="countBlocked"></span>
254 </div>
255 </div>
256 </div>
257
258 <div class="wtotem_chart__line"></div>
259 </div>
260 <?php else:?>
261 <!-- No data block -->
262 <section class="wtotem_reports-no-data" style="height:300px" >
263 <h2 class="visually-hidden"><?= wtsec_locale("no_data") ?></h2>
264 <p class="wtotem_reports-no-data__text">
265 <?= wtsec_locale("has_no_action_ready_yet") ?>
266 </p>
267 </section>
268 <?php endif; ?>
269
270 <div class="wtotem_data">
271 <div class="wtotem_data__thead">
272 <div class="wtotem_data__tr">
273 <div class="wtotem_data__th wtotem_data_width_1">
274 <?= wtsec_locale("chart.type_ip") ?>
275 </div>
276 <div class="wtotem_data__th wtotem_data_width_2">
277 <?= wtsec_locale("chart.country") ?>
278 </div>
279 <div class="wtotem_data__th wtotem_data_width_3">
280 <?= wtsec_locale("chart.time") ?>
281 </div>
282 <div class="wtotem_data__th wtotem_data_width_4">
283 <?= wtsec_locale("chart.attack_location") ?>
284 </div>
285 <div class="wtotem_data__th wtotem_data_width_6">
286 <?= wtsec_locale("chart.status") ?>
287 </div>
288 </div>
289 </div>
290 <div class="wtotem_data__tbody">
291 <?php include 'components/_firewall_lazy.php'?>
292 </div>
293 </div>
294 <div class="wtotem_chart__line"></div>
295 <div class="wtotem_chart__last">
296
297
298 <a href="<?=wtsec_getUrl("waf")?>" class="wtotem_chart__btn">
299 <?= wtsec_locale("read_more") ?>
300 </a>
301 </div>
302 </div>
303
304 <div class="wtotem_map__first section-header-mb">
305 <h2 class="title"><?= wtsec_locale("server_resources") ?>
306 <div class="wtotem_title-info__info wtotem-tooltip">
307 <div class="wtotem-tooltip__content">
308 <p class="wtotem-tooltip__header"><?= wtsec_locale("server_resources") ?></p>
309 <?= wtsec_locale("tooltips.server_resources") ?>
310 </div>
311 </div>
312 </h2>
313
314 </div>
315
316 <!-- RAM diagram -->
317 <div class="wtotem_chart wt_card">
318 <div class="wtotem_chart-first">
319 <div class="wtotem_chart-first__left">
320 <h3><?= wtsec_locale("random_access_memory") ?>
321 <div class="wtotem_title-info__info wtotem-tooltip">
322 <div class="wtotem-tooltip__content">
323 <?= wtsec_locale("tooltips.ram") ?>
324 </div>
325 </div>
326 </h3>
327 </div>
328 <div class="wtotem_chart-first__right chart_btn" data-box="chart_ram_wrap" data-service="ram">
329 <div class="wtotem_chart-first__btn" data-days="365"><?= wtsec_locale("chart.yearly") ?></div>
330 <div class="wtotem_chart-first__btn" data-days="31"><?= wtsec_locale("chart.monthly") ?></div>
331 <div class="wtotem_chart-first__btn wtotem_chart-first__btn_active" data-days="7"><?= wtsec_locale("chart.weekly") ?></div>
332 <div class="wtotem_chart-first__btn" data-days="1"><?= wtsec_locale("chart.daily") ?></div>
333 </div>
334 </div>
335
336 <?php if($arguments["serverStatus"]["ramChart"] && $arguments["serverStatus"]["ramChart"] != 'null'):?>
337 <div id="chart_ram_wrap">
338 <div class="wtotem_chart__diagram">
339 <div id="ram-chart" class="line-chart" data-days="7">
340 <div id="tooltipRam" class="line-chart__tooltip">
341 <span id="countRam"></span>
342 </div>
343 </div>
344 </div>
345 <div class="wtotem_chart__line"></div>
346 </div>
347
348 <?php else:?>
349
350 <!-- No data block -->
351 <section class="wtotem_reports-no-data" style="height:300px" >
352 <h2 class="visually-hidden"><?= wtsec_locale("no_data") ?></h2>
353 <p class="wtotem_reports-no-data__text">
354 <?= wtsec_locale("no_data") ?>
355 </p>
356 </section>
357
358 <?php endif; ?>
359
360 <section class="wtotem-ss-info">
361 <h3 class="visually-hidden"></h3>
362 <dl class="wtotem-ss-info__stats-list">
363 <div class="wtotem-ss-info__column">
364 <div class="wtotem-ss-info__stat-wrapper">
365 <dt>PHP version</dt>
366 <dd><?= $arguments['serverStatus']['info']['phpVersion']?></dd>
367 </div>
368 <div class="wtotem-ss-info__stat-wrapper">
369 <dt>PHP Server User</dt>
370 <dd><?= $arguments['serverStatus']['info']['phpServerUser']?></dd>
371 </div>
372 <div class="wtotem-ss-info__stat-wrapper">
373 <dt>Operation system</dt>
374 <dd title="<?= $arguments['serverStatus']['info']['osInfo']?>">
375 <?= wtsec_cutString($arguments['serverStatus']['info']['osInfo'],20)?>
376 </dd>
377 </div>
378 </div>
379 <div class="wtotem-ss-info__column">
380 <div class="wtotem-ss-info__stat-wrapper">
381 <dt>CPU Freq</dt>
382 <dd><?= $arguments['serverStatus']['info']['CpuFreq']?> MHz</dd>
383 </div>
384 <div class="wtotem-ss-info__stat-wrapper">
385 <dt>CPU count</dt>
386 <dd><?= $arguments['serverStatus']['info']['cpuCount']?></dd>
387 </div>
388 <div class="wtotem-ss-info__stat-wrapper">
389 <dt>CPU Model</dt>
390 <dd title="<?= $arguments['serverStatus']['info']['cpuModel']?>">
391 <?= wtsec_cutString($arguments['serverStatus']['info']['cpuModel'],20)?>
392 </dd>
393 </div>
394 </div>
395 <div class="wtotem-ss-info__column">
396 <div class="wtotem-ss-info__stat-wrapper">
397 <dt>CPU Family</dt>
398 <dd><?= $arguments['serverStatus']['info']['cpuFamily']?></dd>
399 </div>
400
401 </div>
402 </dl>
403 </section>
404
405 </div>
406
407 <!-- CPU diagram -->
408 <div class="wtotem_chart wt_card">
409 <div class="wtotem_chart-first">
410 <div class="wtotem_chart-first__left">
411 <h3><?= wtsec_locale("cpu_memory") ?>
412 <div class="wtotem_title-info__info wtotem-tooltip">
413 <div class="wtotem-tooltip__content">
414 <?= wtsec_locale("tooltips.cpu") ?>
415 </div>
416 </div>
417 </h3>
418 </div>
419 <div class="wtotem_chart-first__right chart_btn" data-box="chart_cpu_wrap" data-service="cpu">
420 <div class="wtotem_chart-first__btn" data-days="365"><?= wtsec_locale("chart.yearly") ?></div>
421 <div class="wtotem_chart-first__btn" data-days="31"><?= wtsec_locale("chart.monthly") ?></div>
422 <div class="wtotem_chart-first__btn wtotem_chart-first__btn_active" data-days="7"><?= wtsec_locale("chart.weekly") ?></div>
423 <div class="wtotem_chart-first__btn" data-days="1"><?= wtsec_locale("chart.daily") ?></div>
424 </div>
425 </div>
426
427 <?php if($arguments["serverStatus"]["cpuChart"] && $arguments["serverStatus"]["cpuChart"] != 'null'):?>
428 <div id="chart_cpu_wrap">
429 <div class="wtotem_chart__diagram">
430 <div id="cpu-chart" class="line-chart" data-days="7">
431 <div id="tooltipCpu" class="line-chart__tooltip">
432 <span id="countCpu"></span>
433 </div>
434 </div>
435 </div>
436 </div>
437 <?php else:?>
438 <!-- No data block -->
439 <section class="wtotem_reports-no-data" style="height:300px" >
440 <h2 class="visually-hidden"><?= wtsec_locale("no_data") ?></h2>
441 <p class="wtotem_reports-no-data__text">
442 <?= wtsec_locale("no_data") ?>
443 </p>
444 </section>
445 <?php endif; ?>
446 </div>
447
448 <div class="wtotem_antivirus">
449 <div class="wtotem_antivirus__first section-header-mb">
450 <h2 class="title">
451 <?= wtsec_locale("remote_antivirus") ?>
452 </h2>
453 <a href="<?=wtsec_getUrl("vc")?>" class="arrow-right">
454 <?= wtsec_locale("learn_more") ?>
455 </a>
456 </div>
457 <div class="wtotem_antivirus__block wt_card">
458 <div class="wtotem_antivirus__item">
459 <div class="wtotem_antivirus__figures wtotem_antivirus__figures_green">
460 <?= $arguments["vc"]["scanned"] ?>
461 </div>
462 <div class="wtotem_antivirus__title">
463 <?= wtsec_locale("antivirus.scanned") ?>
464 </div>
465 </div>
466
467 <div class="wtotem_antivirus__item">
468 <div class="wtotem_antivirus__figures wtotem_antivirus__figures_yellow">
469 <?= $arguments["vc"]["changes"] ?>
470 </div>
471 <div class="wtotem_antivirus__title">
472 <?= wtsec_locale("antivirus.changed") ?>
473 </div>
474 </div>
475
476 <div class="wtotem_antivirus__item">
477 <div class="wtotem_antivirus__figures wtotem_antivirus__figures_black">
478 <?= $arguments["vc"]["deleted"] ?>
479 </div>
480 <div class="wtotem_antivirus__title">
481 <?= wtsec_locale("antivirus.deleted") ?>
482 </div>
483 </div>
484
485 <div class="wtotem_antivirus__item">
486 <div class="wtotem_antivirus__figures wtotem_antivirus__figures_orange">
487 <?= $arguments["vc"]["signatures"] ?>
488 </div>
489 <div class="wtotem_antivirus__title">
490 <?= wtsec_locale("antivirus.infected") ?>
491 </div>
492 </div>
493
494 </div>
495 </div>
496
497 <div class="wtotem_monitoring">
498 <div class="wtotem_monitoring__first section-header-mb">
499 <h2 class="title">
500 <?= wtsec_locale("monitoring") ?>
501 </h2>
502 </div>
503 <div class="wtotem_table wt_card">
504 <div class="wtotem_table__row">
505 <div class="wtotem_table__col">
506 <div class="wtotem_table__th">
507 <h3 class="wtotem_table__title wtotem_title-info__title">
508 <?= wtsec_locale("ssl") ?>
509 <div class="wtotem_title-info__info wtotem-tooltip">
510 <div class="wtotem-tooltip__content">
511 <?= wtsec_locale("tooltips.ssl") ?>
512 </div>
513 </div>
514 </h3>
515 </div>
516
517 <?php if($arguments["ssl"]["status"]['type'] == 'pending'):?>
518 <?php include 'components/_dots_loader.php'?>
519 <?php else: ?>
520 <div class="wtotem_table__td">
521 <div class="wtotem_table__expired">
522 <?= $arguments["ssl"]["status"]["text"] ?>
523 </div>
524 </div>
525
526 <?php if (!empty($arguments["ssl"]["days_left"])): ?>
527 <div class="wtotem_table__info">
528 <h3 class="wtotem_table__subject">
529 <?= wtsec_locale("days_left") ?>
530 </h3>
531 <div class="wtotem_table__text">
532 <?= $arguments["ssl"]["days_left"] ?>
533 </div>
534 </div>
535 <?php endif; ?>
536 <?php if (!empty($arguments["ssl"]["issue_date"])): ?>
537 <div class="wtotem_table__info">
538 <h3 class="wtotem_table__subject">
539 <?= wtsec_locale("issue_date") ?>
540 </h3>
541 <div class="wtotem_table__text">
542 <?= $arguments["ssl"]["issue_date"] ?>
543 </div>
544 </div>
545 <?php endif; ?>
546 <?php if (!empty($arguments["ssl"]["expiry_date"])): ?>
547 <div class="wtotem_table__info">
548 <h3 class="wtotem_table__subject">
549 <?= wtsec_locale("expiry_date") ?>
550 </h3>
551 <div class="wtotem_table__text">
552 <?= $arguments["ssl"]["expiry_date"] ?>
553 </div>
554 </div>
555 <?php endif; ?>
556
557 <?php endif; ?>
558 </div>
559 <div class="wtotem_table__col">
560 <div class="wtotem_table__th">
561 <h3 class="wtotem_table__title wtotem_title-info__title">
562 <?= wtsec_locale("availability") ?>
563 <div class="wtotem_title-info__info wtotem-tooltip">
564 <div class="wtotem-tooltip__content">
565 <?= wtsec_locale("tooltips.availability") ?>
566 </div>
567 </div>
568 </h3>
569 </div>
570
571 <?php if($arguments["wa"]["status"]['type'] == 'pending'):?>
572 <?php include 'components/_dots_loader.php'?>
573 <?php else: ?>
574 <div class="wtotem_table__td">
575 <div class="wtotem_table__perfomance">
576 <?= wtsec_locale("performance") ?>
577 </div>
578 <div class="wtotem_table__right wtotem_table__right_progress-wrap">
579 <span class="wtotem_table__initial-value">0%</span>
580 <div class="wtotem_table__stick-progress">
581 <div class="wtotem_table__message">
582 <span class="wtotem_table__percent">
583 <?= $arguments["wa"]["availability_percent"] ?>%
584 </span>
585 <span class="wtotem_table__triangle"></span>
586 </div>
587 </div>
588 </div>
589 </div>
590 <div class="wtotem_table__info">
591 <h3 class="wtotem_table__subject">
592 <?= wtsec_locale("status") ?>
593 <div class="wtotem_title-info__info wtotem-tooltip">
594 <div class="wtotem-tooltip__content">
595 <?= wtsec_locale("tooltips.status.".$arguments["wa"]["status"]["type"]."") ?>
596 </div>
597 </div>
598 </h3>
599 <div class="wtotem_table__status"><?= $arguments["wa"]["status"]["text"] ?></div>
600 </div>
601 <div class="wtotem_table__info">
602 <h3 class="wtotem_table__subject"><?= wtsec_locale("response_time") ?></h3>
603 <div class="wtotem_table__text"><?= $arguments["wa"]["response_time"] ?></div>
604 </div>
605 <div class="wtotem_table__info">
606 <h3 class="wtotem_table__subject"><?= wtsec_locale("downtime") ?></h3>
607 <div class="wtotem_table__text"><?= $arguments["wa"]["downtime"] ?></div>
608 </div>
609 <div class="wtotem_table__info">
610 <h3 class="wtotem_table__subject"><?= wtsec_locale("last_test") ?></h3>
611 <div class="wtotem_table__text"><?= $arguments["wa"]["last_test"] ?></div>
612 </div>
613 <?php endif; ?>
614 </div>
615
616 <div class="wtotem_table__col">
617 <div class="wtotem_table__th">
618 <h3 class="wtotem_table__title wtotem_title-info__title"><?= wtsec_locale("reputation") ?>
619 <div class="wtotem_title-info__info wtotem-tooltip">
620 <div class="wtotem-tooltip__content">
621 <?= wtsec_locale("tooltips.reputation") ?>
622 </div>
623 </div>
624 </h3>
625 </div>
626
627 <?php if($arguments["av"]["status"]['type'] == 'pending'):?>
628 <?php include 'components/_dots_loader.php'?>
629 <?php else: ?>
630
631 <div class="wtotem_table__td">
632 <div class="wtotem_table__wrap">
633 <?php if($arguments["av"]["status"]["image"]):?>
634 <img src="<?= wtsec_getImagePath($arguments["av"]["status"]["image"]) ?>" alt="Check mark icon"
635 class="wtotem_table__img"/>
636 <?php endif; ?>
637 </div>
638
639 <div class="wtotem_table__perfomance wtotem_table__perfomance_long ml-2"><?= $arguments["av"]["reputation"] ?></div>
640 </div>
641 <div class="wtotem_table__info">
642 <h3 class="wtotem_table__subject">
643 <?= wtsec_locale("status") ?>
644 <div class="wtotem_title-info__info wtotem-tooltip">
645 <div class="wtotem-tooltip__content">
646 <?= wtsec_locale("tooltips.status.".$arguments["av"]["status"]["type"]."") ?>
647 </div>
648 </div>
649 </h3>
650 <div class="wtotem_table__status"><?= $arguments["av"]["status"]["text"] ?></div>
651 </div>
652 <div class="wtotem_table__info">
653 <h3 class="wtotem_table__subject">
654 <?= wtsec_locale("blacklists_entries") ?>
655 </h3>
656 <div class="wtotem_table__text">
657 <?= $arguments["av"]["blacklists_entries"] ?>
658 </div>
659 </div>
660 <div class="wtotem_table__info">
661 <h3 class="wtotem_table__subject">
662 <?= wtsec_locale("last_test") ?>
663 </h3>
664 <div class="wtotem_table__text">
665 <?= $arguments["av"]["time_of_the_last_test"] ?>
666 </div>
667 </div>
668 <div class="wtotem_table__info"></div>
669
670 <?php endif; ?>
671 </div>
672 </div>
673 <div class="wtotem_table__footer">
674 <a target="_blank" href="https://wtotem.com/faq/#hs-chat-open" class="wtotem_table__link">
675 <div class="wtotem_table__perfomance">
676 <?= wtsec_locale("need_more_support") ?>
677 <span><?= wtsec_locale("lets_talk") ?></span>
678 </div>
679 </a>
680 </div>
681 </div>
682 </div>
683
684 <div class="wtotem_scanning">
685 <div class="wtotem_scanning__first section-header-mb">
686 <h2 class="title">
687 <?= wtsec_locale("scanning") ?>
688 </h2>
689 </div>
690 <div class="wtotem_table wt_card">
691 <div class="wtotem_table__row">
692 <div class="wtotem_table__col">
693 <div class="wtotem_table__th">
694 <h3 class="wtotem_table__title wtotem_title-info__title">
695 <?= wtsec_locale("port_scanner") ?>
696 <div class="wtotem_title-info__info wtotem-tooltip">
697 <div class="wtotem-tooltip__content">
698 <?= wtsec_locale("tooltips.port_scanner") ?>
699 </div>
700 </div>
701 </h3>
702 </div>
703 <?php if($arguments["ps"]["status"]['type'] == 'pending'):?>
704 <?php include 'components/_dots_loader.php'?>
705 <?php else: ?>
706 <div class="wtotem_table__info">
707 <h3 class="wtotem_table__subject">
708 <?= wtsec_locale("status") ?>
709 <div class="wtotem_title-info__info wtotem-tooltip">
710 <div class="wtotem-tooltip__content">
711 <?= wtsec_locale("tooltips.status.".$arguments["ps"]["status"]["type"]."") ?>
712 </div>
713 </div>
714 </h3>
715 <div class="wtotem_table__status"><?= $arguments["ps"]["status"]["text"] ?></div>
716 </div>
717 <div class="wtotem_table__info">
718 <h3 class="wtotem_table__subject"><?= wtsec_locale("ip_address") ?></h3>
719 <div class="wtotem_table__text"><?= $arguments["ps"]["ip"] ?></div>
720 </div>
721 <?php if (!empty($arguments["ps"]["tcp"])): ?>
722 <div class="wtotem_table__info">
723 <h3 class="wtotem_table__subject">
724 <?= wtsec_locale("tcp") ?>
725 </h3>
726 <div class="wtotem_table__text">
727 <?= $arguments["ps"]["tcp"] ?>
728 </div>
729 </div>
730 <?php endif; ?>
731 <div class="wtotem_table__info">
732 <h3 class="wtotem_table__subject">
733 <?= wtsec_locale("last_test") ?>
734 </h3>
735 <div class="wtotem_table__text">
736 <?= $arguments["ps"]["last_test"] ?>
737 </div>
738 </div>
739 <?php endif; ?>
740 </div>
741
742 <div class="wtotem_table__col">
743 <div class="wtotem_table__th">
744 <h3 class="wtotem_table__title wtotem_title-info__title">
745 <?= wtsec_locale("deface_scanner") ?>
746 <div class="wtotem_title-info__info wtotem-tooltip">
747 <div class="wtotem-tooltip__content">
748 <?= wtsec_locale("tooltips.deface_scanner") ?>
749 </div>
750 </div>
751 </h3>
752 </div>
753
754 <?php if($arguments["dc"]["status"]['type'] == 'pending'):?>
755 <?php include 'components/_dots_loader.php'?>
756 <?php else: ?>
757
758 <div class="wtotem_table__item">
759 <div class="wtotem_table__wrap_big">
760 <?php if($arguments["dc"]["status"]["image"]):?>
761 <img src="<?= wtsec_getImagePath($arguments["dc"]["status"]["image"]) ?>" alt="Check mark icon"
762 class="wtotem_table__img"/>
763 <?php endif; ?>
764 </div>
765 </div>
766
767 <div class="wtotem_table__info">
768 <h3 class="wtotem_table__subject">
769 <?= wtsec_locale("status") ?>
770 <span class="wtotem_title-info__info wtotem-tooltip">
771 <div class="wtotem-tooltip__content">
772 <?= wtsec_locale("tooltips.status.".$arguments["dc"]["status"]["type"]."") ?>
773 </div>
774 </span>
775 </h3>
776 <div class="wtotem_table__status">
777 <?= $arguments["dc"]["status"]["text"] ?>
778 </div>
779 </div>
780 <?php if($arguments["dc"]["words"]):?>
781 <div class="wtotem_table__info">
782 <h3 class="wtotem_table__subject">
783 <?= wtsec_locale("words") ?>
784 </h3>
785 <div class="wtotem_table__text">
786 <?= $arguments["dc"]["words"] ?>
787 </div>
788 </div>
789 <?php endif; ?>
790 <div class="wtotem_table__info">
791 <h3 class="wtotem_table__subject">
792 <?= wtsec_locale("last_test") ?>
793 </h3>
794 <div class="wtotem_table__text">
795 <?= $arguments["dc"]["time_of_the_last_test"] ?>
796 </div>
797 </div>
798
799 <?php endif; ?>
800 </div>
801
802 <div class="wtotem_table__col">
803 <section class="wtotem-ss-disc">
804 <div class="wtotem_chart wt_card wtotem-ss-disc">
805 <div class="wtotem_chart-first wtotem-ss-disc__header">
806 <h3 class="wtotem_table__subject" ><?= wtsec_locale("disk_usage") ?>
807 <div class="wtotem_title-info__info wtotem-tooltip">
808 <div class="wtotem-tooltip__content">
809 <?= wtsec_locale("tooltips.disk_usage") ?>
810 </div>
811 </div>
812 </h3>
813 </div>
814 <div class="wtotem_state__line wtotem-ss-disc__line"></div>
815
816 <div class="wtotem-ss-disc__content">
817 <?php if(!$arguments["serverStatus"]["discUsage"]['total']):?>
818 <section class="wtotem_reports-no-data" >
819 <h2 class="visually-hidden"><?= wtsec_locale("no_data") ?></h2>
820 <p class="wtotem_reports-no-data__text">
821 <?= wtsec_locale("no_data") ?>
822 </p>
823 </section>
824 <?php else: ?>
825 <div class="wtotem-ss-disc__wrapper">
826 <div id="disk-chart"></div>
827 <div class="wtotem-ss-disc__totals">
828 <p class="wtotem-ss-disc__totals-caption"><?= wtsec_locale("total") ?></p>
829 <p class="wtotem-ss-disc__totals-value"><?= $arguments["serverStatus"]["discUsage"]['total']?></p>
830 </div>
831 </div>
832 <ul class="wtotem-ss-disc__legend">
833 <li class="wtotem-ss-disc__legend-item wtotem-ss-disc__legend-item--use">
834 <p class="wtotem-ss-disc__legend-value"><?= $arguments["serverStatus"]["discUsage"]['use']?></p>
835 <p class="wtotem-ss-disc__legend-caption"><?= wtsec_locale("use") ?></p>
836 </li>
837 <li class="wtotem-ss-disc__legend-item wtotem-ss-disc__legend-item--free">
838 <p class="wtotem-ss-disc__legend-value"><?= $arguments["serverStatus"]["discUsage"]['free']?></p>
839 <p class="wtotem-ss-disc__legend-caption"><?= wtsec_locale("free") ?></p>
840 </li>
841 </ul>
842 <?php endif; ?>
843 </div>
844 </div>
845 </section>
846
847 </div>
848
849 </div>
850
851 <div class="wtotem_table__footer">
852 <a target="_blank" href="https://wtotem.com/faq/#hs-chat-open" class="wtotem_table__link">
853 <div class="wtotem_table__perfomance">
854 <?= wtsec_locale("need_more_support") ?>
855 <span><?= wtsec_locale("lets_talk") ?></span>
856 </div>
857 </a>
858 </div>
859 </div>
860 </div>
861 </div>
862 </div>
863
864 <script>
865 var availability_percent = "<?=$arguments["wa"]["availability_percent"]?>";
866 var waf_chart = <?php echo $arguments["waf"]["chart"] ?: 'false' ?>;
867 var serverStatusRam = <?php echo $arguments["serverStatus"]["ramChart"] ?: 'false' ?>;
868 var serverStatusCpu = <?php echo $arguments["serverStatus"]["cpuChart"] ?: 'false' ?>;
869 var serverStatusDiscUsage = <?= json_encode($arguments["serverStatus"]["discUsage"])?>;
870
871 var wtotem_token = "<?=$arguments["settings"]["token"]?>";
872 var wtotem_site_id = "<?=$arguments["settings"]["site_id"]?>";
873 var wtotem_am_process_status = "<?=$arguments["am"]["process_status"]?>";
874 var wtotem_locale_installed = "<?= wtsec_locale("installed") ?>";
875 var wtotem_locale_installing = "<?= wtsec_locale("installation_in_progress") ?>";
876 var wtotem_locale_failed = "<?= wtsec_locale("failed") ?>";
877 var wtotem_dashbord = true;
878
879 var wtotem_socket_url = "wss://api.wtotem.com/graphql";
880
881 document.addEventListener('DOMContentLoaded', function () {
882 if (wtotem_am_process_status === "installing") {
883 let firewall_selector = document.getElementsByClassName("wtotem_unit__block_firewall");
884 let firewall_installed_selector = document.getElementById("wtsec_firewall_block_installed");
885 let firewall_installing_selector = document.getElementById("wtsec_firewall_block_installing");
886 let firewall_failed_selector = document.getElementById("wtsec_firewall_block_failed");
887 let antivirus_selector = document.getElementsByClassName("wtotem_unit__block_antivirus");
888 let antivirus_installed_selector = document.getElementById("wtsec_antivirus_block_installed");
889 let antivirus_installing_selector = document.getElementById("wtsec_antivirus_block_installing");
890 let antivirus_failed_selector = document.getElementById("wtsec_antivirus_block_failed");
891
892 function show_hide(selector,show = true){
893 if(show){
894 selector.style.display = "flex";
895 }else{
896 selector.style.display = "none";
897 }
898 }
899
900 function show_hide_in_loop(selectors,show = true){
901 for(let selector of selectors){
902 show_hide(selector,show);
903 }
904 }
905
906 show_hide(firewall_installing_selector,true);
907 show_hide(antivirus_installing_selector,true);
908 let variables = {
909 input: {
910 token: wtotem_token,
911 service: 'am',
912 siteId: wtotem_site_id,
913 },
914 }
915 let query = `subscription EventsSubscription($input: EventsInput!) {
916 events(input: $input) {
917 siteId hostname status service
918 error {
919 message
920 __typename
921 }
922 __typename
923 }
924 }`;
925 const sub = graphQLSubscriber(wtotem_socket_url, {},
926 (error, subscribe) => {
927 if (!(error || subscribe)) {
928 // Normal closure.
929 return
930 }
931 if (error) {
932 wtsec_showNotification('connection_fail','error');
933 console.error(error)
934 throw error
935 }
936 const unsubscribe = subscribe(
937 query,
938 variables,
939 null,
940 (error, data) => {
941 console.log(data);
942 if (!(error || subscribe)) {
943 // Normal closure
944 return
945 }
946 if (error) {
947 wtsec_showNotification('connection_fail','error');
948 console.error(error)
949 throw error
950 }
951
952 if (data.events.status === "waf_installed") {
953 show_hide_in_loop(firewall_selector, false);
954 show_hide(firewall_installed_selector,true);
955 } else if (data.events.status === "av_installed") {
956 show_hide_in_loop(antivirus_selector, false);
957 show_hide(antivirus_installed_selector,true);
958 } else if (data.events.status === "am_installed") {
959
960 } else {
961 let split = data.events.status.split("_");
962 if(split.length === 0){
963 return;
964 }
965 let service = split[0];
966 if (service === "waf") {
967 show_hide_in_loop(firewall_selector, false);
968 show_hide(firewall_failed_selector,true);
969 }
970 if (service === "av") {
971 show_hide_in_loop(antivirus_selector, false);
972 show_hide(antivirus_failed_selector,true);
973 }
974 if (service === "am") {
975
976 }
977 }
978 })
979 })
980 }
981 });
982 </script>
983
984 <script>
985 if(typeof waf_chart == "object" && typeof drawWafChart != 'undefined'){
986 drawWafChart(waf_chart);
987 }
988 if(typeof serverStatusRam == "object" && typeof drawRamChart != 'undefined'){
989 drawRamChart(serverStatusRam);
990 }
991 if(typeof serverStatusCpu == "object" && typeof drawCpuChart != 'undefined') {
992 drawCpuChart(serverStatusCpu);
993 }
994 if(typeof serverStatusDiscUsage == "object" && typeof drawDiskChart != 'undefined') {
995 drawDiskChart(serverStatusDiscUsage);
996 }
997 </script>
998 <?php else: ?>
999 <?php //show error here ?>
1000 <?php endif; ?>