PluginProbe
WebTotem Security / 2.3.36
WebTotem Security v2.3.36
3.0.2 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 All 110 releases
wt-security / includes / dashboard.php

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

1,078 lines 58.3 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 <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 <?= __( 'Overall Security Grade', 'wtotem' ) ?>
11 <div class="wtotem_title-info__info wtotem-tooltip">
12 <div class="wtotem-tooltip__content">
13 <p class="wtotem-tooltip__header"><?= __( 'Scoring module', 'wtotem' ) ?></p>
14 <p class="wtotem-tooltip__text"><?= __( 'Assesses overall site security, identifies vulnerabilities, misconfigurations, and data leak, as well as gives recommendations for their elimination.', 'wtotem' ) ?></p>
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"><?= __( 'Tested on:', 'wtotem' ) ?></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"><?= __( 'Server Ip:', 'wtotem' ) ?></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"><?= __( 'Location:', 'wtotem' ) ?></div>
42 <div class="wtotem_info__info"><?= $arguments["score"]["location"] ?></div>
43 </div>
44 <div class="wtotem_info__scoring arrow-right">
45 <a href="https://wtotem.com/cabinet/site/<?= $arguments['settings']['site_id']?>/scoring" target="_blank">
46 <?= __('Full scoring', 'wtotem') ?>
47 </a>
48 </div>
49 </div>
50 </div>
51 </div>
52
53 <?php if ($arguments["am"]["process_status"] !== "installed" || !$arguments["am"]["installed"]): ?>
54 <div class="wtotem_unit">
55 <div class="wtotem_unit__first section-header-mb">
56 <h2 class="title">
57 <?= __( 'Agent manager installation', 'wtotem' ) ?>
58 </h2>
59
60 <a class="wtotem_button wtotem_button--primary wtotem_font-700 wtotem_reinstall" href="#" data-text="<?= __( 'Attention, all data will be deleted during the reinstall! Do you want to continue?', 'wtotem' ) ?>">
61 <span><?= __( 'Reinstall agents', 'wtotem' ) ?></span>
62 </a>
63 </div>
64 <div class="wtotem_unit__wrapper wt_card">
65 <?php if ($arguments["am"]["process_status"] === "installing"): ?>
66 <div class="wtotem_unit__block wtotem_unit__block_antivirus" id="wtsec_antivirus_block_installed" style="display: none">
67 <div class="wtotem_unit__contain">
68 <div class="wtotem_unit__circle wtotem_unit__circle_success">
69 <img src="<?= wtsec_getImagePath("success.svg") ?>" alt="Success" class="wtotem_unit__img">
70 </div>
71 <h2 class="title">
72 <?= __( 'Antivirus', 'wtotem' ) ?>
73 </h2>
74 </div>
75 <div class="wtotem_unit__expectation wtotem_unit__expectation_success">
76 <?= __( 'Installed', 'wtotem' ) ?>
77 </div>
78 </div>
79 <div class="wtotem_unit__block wtotem_unit__block_antivirus" id="wtsec_antivirus_block_installing" style="display: none">
80 <div class="wtotem_unit__contain">
81 <div class="wtotem_unit__expectation wtotem_unit__circle_loading">
82 <img src="<?= wtsec_getImagePath("spinner.svg") ?>" alt="Spinner"
83 class="wtotem_unit__img wtotem_unit__img_spinner"/>
84 </div>
85 <h2 class="title ml-2">
86 <?= __( 'Antivirus', 'wtotem' ) ?>
87 </h2>
88 </div>
89 <div class="wtotem_unit__expectation wtotem_unit__expectation_loading">
90 <?= __( 'Installing', 'wtotem' ) ?>...
91 </div>
92 </div>
93 <div class="wtotem_unit__block wtotem_unit__block_antivirus" id="wtsec_antivirus_block_failed" style="display: none">
94 <div class="wtotem_unit__contain">
95 <div class="wtotem_unit__circle wtotem_unit__circle_error"></div>
96 <h2 class="title">
97 <?= __( 'Antivirus', 'wtotem' ) ?>
98 </h2>
99 </div>
100 <div class="wtotem_unit__expectation wtotem_unit__expectation_error">
101 <?= __( 'Failed to install', 'wtotem' ) ?>
102 </div>
103 </div>
104
105 <div class="wtotem_unit__block wtotem_unit__block_firewall" id="wtsec_firewall_block_installed" style="display: none">
106 <div class="wtotem_unit__contain">
107 <div class="wtotem_unit__circle wtotem_unit__circle_success">
108 <img src="<?= wtsec_getImagePath("success.svg") ?>" alt="Success"
109 class="wtotem_unit__img">
110 </div>
111 <h2 class="title">
112 <?= __( 'Firewall', 'wtotem' ) ?>
113 </h2>
114 </div>
115 <div class="wtotem_unit__expectation wtotem_unit__expectation_success">
116 <?= __( 'Installed', 'wtotem' ) ?>
117 </div>
118 </div>
119
120 <div class="wtotem_unit__block wtotem_unit__block_firewall" id="wtsec_firewall_block_installing" style="display: none">
121 <div class="wtotem_unit__contain">
122 <div class="wtotem_unit__expectation wtotem_unit__circle_loading">
123 <img src="<?= wtsec_getImagePath("spinner.svg") ?>" alt="Spinner"
124 class="wtotem_unit__img wtotem_unit__img_spinner"/>
125 </div>
126 <h2 class="title ml-2">
127 <?= __( 'Firewall', 'wtotem' ) ?>
128 </h2>
129 </div>
130 <div class="wtotem_unit__expectation wtotem_unit__expectation_loading">
131 <?= __( 'Installing', 'wtotem' ) ?>...
132 </div>
133 </div>
134
135 <div class="wtotem_unit__block wtotem_unit__block_firewall" id="wtsec_firewall_block_failed" style="display: none">
136 <div class="wtotem_unit__contain">
137 <div class="wtotem_unit__circle wtotem_unit__circle_error"></div>
138 <h2 class="title">
139 <?= __( 'Firewall', 'wtotem' ) ?>
140 </h2>
141 </div>
142 <div class="wtotem_unit__expectation wtotem_unit__expectation_error">
143 <?= __( 'Failed to install', 'wtotem' ) ?>
144 </div>
145 </div>
146 <?php elseif(!$arguments["am"]["installed"]): ?>
147 <div class="wtotem_unit__block">
148 <div class="wtotem_unit__contain">
149 <div class="wtotem_unit__circle wtotem_unit__circle_error"></div>
150 <h2 class="title">
151 <?= __( 'Failed to install Agent Manager', 'wtotem' ) ?>
152 </h2>
153 </div>
154 <div class="wtotem_unit__expectation wtotem_unit__expectation_error">
155 <a class="wtotem_button wtotem_button--primary wtotem_font-700 wtotem_block_center wtotem_reinstall" href="#" data-text="<?= __( 'Attention, all data will be deleted during the reinstall! Do you want to continue?', 'wtotem' ) ?>">
156 <span><?= __( 'Install', 'wtotem' ) ?></span>
157 </a>
158 </div>
159 </div>
160 <?php endif; ?>
161
162 </div>
163
164 </div>
165 <?php endif; ?>
166
167
168 <div class="wtotem_firewall">
169 <div class="wtotem_firewall__first section-header-mb">
170 <h2 class="title"><?= __( 'Firewall activity', 'wtotem' ) ?></h2>
171 </div>
172
173 <?php if($arguments["wafTraining"]):?>
174 <div class="wtotem_firwall-training-alert wt_card">
175 <div class="wtotem_firwall-training-alert__text-wrapper">
176 <p class="wtotem_firwall-training-alert__text">
177 <?= __( 'Firewall needs up to 2 days to finish training', 'wtotem' ) ?>
178 </p>
179 </div>
180 <a href="https://wtotem.com/docs/our-features/firewall" target="_blank" class="wtotem_firwall-training-alert__learn-more button">
181 <?= __( 'Show more', 'wtotem' ) ?>
182 </a>
183 </div>
184 <?php endif; ?>
185
186 <div class="wtotem_firewall__block">
187 <div class="wtotem_numbers wt_card">
188 <div class="wtotem_numbers__item">
189 <div class="wtotem_numbers__title"><?= __( 'Attacks', 'wtotem' ) ?></div>
190 <div class="wtotem_numbers__figures"><?= $arguments["waf"]["attacks"] ?></div>
191 </div>
192
193 <div class="wtotem_numbers__item">
194 <div class="wtotem_numbers__title"><?= __( 'Attacks blocked', 'wtotem' ) ?></div>
195 <div class="wtotem_numbers__figures"><?= $arguments["waf"]["blocking"] ?></div>
196 </div>
197
198 <div class="wtotem_numbers__item">
199 <div class="wtotem_numbers__title"><?= __( 'Not blocked', 'wtotem' ) ?></div>
200 <div class="wtotem_numbers__figures"><?= $arguments["waf"]["non-blocking"] ?></div>
201 </div>
202 </div>
203
204
205 <div class="wtotem_from wt_card">
206 <div class="wtotem_from__svg-wrap">
207 <svg class="wtotem_from__progress">
208 <circle class="wtotem_from__circle" cx="35" cy="35" r="28" stroke-width="20" stroke="rgb(135,255,222)"/>
209 </svg>
210 <span class="wtotem_from__percent" data-value="<?=$arguments["waf"]["countryAttacks"]['percent']?>">100%</span>
211 </div>
212
213 <div class="wtotem_from__info">
214 <div class="wtotem_from__title"><?= __( 'Country', 'wtotem' ) ?></div>
215 <div class="wtotem_from__country" >
216 <?= ($arguments["waf"]["countryAttacks"]["country"]) ?
217 __( 'Attack from', 'wtotem' ) . ' <span>'. $arguments["waf"]["countryAttacks"]["country"].'</span>' :
218 __( 'Pending', 'wtotem' ) ?>
219 </div>
220 </div>
221 <?php if(wtsec_app()->get('waf_installed')): ?>
222 <a href="<?=wtsec_getUrl("waf")?>" class="wtotem_from__arrow-right"></a>
223 <?php endif; ?>
224 </div>
225 </div>
226 </div>
227
228 <div class="wtotem_chart wt_card">
229 <div class="wtotem_chart-first">
230 <div class="wtotem_chart-first__left">
231 <div class="wtotem_chart-first__hack wtotem_chart-first__hack_attack">
232 <span></span>
233 <p><?= __( 'Attacks', 'wtotem' ) ?></p>
234 </div>
235 <div class="wtotem_chart-first__hack wtotem_chart-first__hack_blocked">
236 <span></span>
237 <p><?= __( 'Blocked', 'wtotem' ) ?></p>
238 </div>
239 </div>
240
241 <div class="wtotem_chart-first__right chart_btn" data-box="chart_wrap" data-service="waf">
242 <div class="wtotem_chart-first__btn" data-days="365"><?= __( 'Yearly', 'wtotem' ) ?></div>
243 <div class="wtotem_chart-first__btn" data-days="31"><?= __( 'Monthly', 'wtotem' ) ?></div>
244 <div class="wtotem_chart-first__btn wtotem_chart-first__btn_active" data-days="7"><?= __( 'Weekly', 'wtotem' ) ?></div>
245 <div class="wtotem_chart-first__btn" data-days="1"><?= __( 'Daily', 'wtotem' ) ?></div>
246 </div>
247 </div>
248
249 <?php if($arguments["waf"]["chart"] && $arguments["waf"]["chart"] != 'null'):?>
250 <div id="chart_wrap">
251 <div class="wtotem_chart__diagram" data-days="31" id="wtotem_chart_diagram">
252 <div id="line-chart" class="line-chart">
253 <div id="tooltipAttacks" class="line-chart__tooltip">
254 <span id="countAttacks"></span>
255 </div>
256 <div id="tooltipBlocked" class="line-chart__tooltip line-chart__tooltip--reverse">
257 <span id="countBlocked"></span>
258 </div>
259 </div>
260 </div>
261
262 <div class="wtotem_chart__line"></div>
263 </div>
264 <?php else:?>
265 <!-- No data block -->
266 <section class="wtotem_reports-no-data" style="height:300px" >
267 <h2 class="visually-hidden"><?= __( 'No data', 'wtotem' ) ?></h2>
268 <p class="wtotem_reports-no-data__text">
269 <?= __( 'Has no action ready yet', 'wtotem' ) ?>
270 </p>
271 </section>
272 <?php endif; ?>
273
274 <?php if($arguments['waf']['edges']):?>
275 <div class="wtotem_data">
276 <div class="wtotem_data__thead">
277 <div class="wtotem_data__tr">
278 <div class="wtotem_data__th wtotem_data_width_1">
279 <?= __( 'Type/IP', 'wtotem' ) ?>
280 </div>
281 <div class="wtotem_data__th wtotem_data_width_2">
282 <?= __( 'Country', 'wtotem' ) ?>
283 </div>
284 <div class="wtotem_data__th wtotem_data_width_3">
285 <?= __( 'Time', 'wtotem' ) ?>
286 </div>
287 <div class="wtotem_data__th wtotem_data_width_4">
288 <?= __( 'Attack location', 'wtotem' ) ?>
289 </div>
290 <div class="wtotem_data__th wtotem_data_width_6">
291 <?= __( 'Status', 'wtotem' ) ?>
292 </div>
293 </div>
294 </div>
295 <div class="wtotem_data__tbody">
296 <?php include 'components/_firewall_lazy.php'?>
297 </div>
298 </div>
299 <?php endif; ?>
300 <div class="wtotem_chart__line"></div>
301 <div class="wtotem_chart__last">
302
303 <?php if(wtsec_app()->get('waf_installed')): ?>
304 <a href="<?=wtsec_getUrl("waf")?>" class="wtotem_chart__btn">
305 <?= __( 'Show more', 'wtotem' ) ?>
306 </a>
307 <?php endif; ?>
308 </div>
309 </div>
310
311 <div class="wtotem_map__first section-header-mb">
312 <h2 class="title"><?= __( 'Server resources', 'wtotem' ) ?>
313 <div class="wtotem_title-info__info wtotem-tooltip">
314 <div class="wtotem-tooltip__content">
315 <p class="wtotem-tooltip__header"><?= __( 'Server resources', 'wtotem' ) ?></p>
316 <p class="wtotem-tooltip__text"><?= __( 'Displays critical data about web-server usage. A large load on a server can slow down the website performance.', 'wtotem' ) ?></p>
317 </div>
318 </div>
319 </h2>
320
321 </div>
322
323 <!-- RAM diagram -->
324 <div class="wtotem_chart wt_card">
325 <div class="wtotem_chart-first">
326 <div class="wtotem_chart-first__left">
327 <h3><?= __( 'Random access memory', 'wtotem' ) ?>
328 <div class="wtotem_title-info__info wtotem-tooltip">
329 <div class="wtotem-tooltip__content">
330 <p class="wtotem-tooltip__header"><?= __( 'RAM', 'wtotem' ) ?></p>
331 <p class="wtotem-tooltip__text"><?= __( 'Shows the RAM load.', 'wtotem' ) ?></p>
332 </div>
333 </div>
334 </h3>
335 </div>
336 <div class="wtotem_chart-first__right chart_btn" data-box="chart_ram_wrap" data-service="ram">
337 <div class="wtotem_chart-first__btn" data-days="365"><?= __( 'Yearly', 'wtotem' ) ?></div>
338 <div class="wtotem_chart-first__btn" data-days="31"><?= __( 'Monthly', 'wtotem' ) ?></div>
339 <div class="wtotem_chart-first__btn wtotem_chart-first__btn_active" data-days="7"><?= __( 'Weekly', 'wtotem' ) ?></div>
340 <div class="wtotem_chart-first__btn" data-days="1"><?= __( 'Daily', 'wtotem' ) ?></div>
341 </div>
342 </div>
343
344 <?php if($arguments["serverStatus"]["ramChart"] && $arguments["serverStatus"]["ramChart"] != 'null'):?>
345 <div id="chart_ram_wrap">
346 <div class="wtotem_chart__diagram">
347 <div id="ram-chart" class="line-chart" data-days="7">
348 <div id="tooltipRam" class="line-chart__tooltip">
349 <span id="countRam"></span>
350 </div>
351 </div>
352 </div>
353 <div class="wtotem_chart__line"></div>
354 </div>
355
356 <?php else:?>
357
358 <!-- No data block -->
359 <section class="wtotem_reports-no-data" style="height:300px" >
360 <h2 class="visually-hidden"><?= __( 'No data', 'wtotem' ) ?></h2>
361 <p class="wtotem_reports-no-data__text">
362 <?= __( 'No data', 'wtotem' ) ?>
363 </p>
364 </section>
365
366 <?php endif; ?>
367
368 <section class="wtotem-ss-info">
369 <h3 class="visually-hidden"></h3>
370 <dl class="wtotem-ss-info__stats-list">
371 <div class="wtotem-ss-info__column">
372 <div class="wtotem-ss-info__stat-wrapper">
373 <dt>PHP version</dt>
374 <dd><?= $arguments['serverStatus']['info']['phpVersion']?></dd>
375 </div>
376 <div class="wtotem-ss-info__stat-wrapper">
377 <dt>PHP Server User</dt>
378 <dd><?= $arguments['serverStatus']['info']['phpServerUser']?></dd>
379 </div>
380 <div class="wtotem-ss-info__stat-wrapper">
381 <dt>Operation system</dt>
382 <dd title="<?= $arguments['serverStatus']['info']['osInfo']?>">
383 <?= wtsec_cutString($arguments['serverStatus']['info']['osInfo'],20)?>
384 </dd>
385 </div>
386 </div>
387 <div class="wtotem-ss-info__column">
388 <div class="wtotem-ss-info__stat-wrapper">
389 <dt>CPU Freq</dt>
390 <dd><?= $arguments['serverStatus']['info']['CpuFreq']?> MHz</dd>
391 </div>
392 <div class="wtotem-ss-info__stat-wrapper">
393 <dt>CPU count</dt>
394 <dd><?= $arguments['serverStatus']['info']['cpuCount']?></dd>
395 </div>
396 <div class="wtotem-ss-info__stat-wrapper">
397 <dt>CPU Model</dt>
398 <dd title="<?= $arguments['serverStatus']['info']['cpuModel']?>">
399 <?= wtsec_cutString($arguments['serverStatus']['info']['cpuModel'],20)?>
400 </dd>
401 </div>
402 </div>
403 <div class="wtotem-ss-info__column">
404 <div class="wtotem-ss-info__stat-wrapper">
405 <dt>CPU Family</dt>
406 <dd><?= $arguments['serverStatus']['info']['cpuFamily']?></dd>
407 </div>
408
409 </div>
410 </dl>
411 </section>
412
413 </div>
414
415 <!-- CPU diagram -->
416 <div class="wtotem_chart wt_card">
417 <div class="wtotem_chart-first">
418 <div class="wtotem_chart-first__left">
419 <h3><?= __( 'CPU Load average', 'wtotem' ) ?>
420 <div class="wtotem_title-info__info wtotem-tooltip">
421 <div class="wtotem-tooltip__content">
422 <p class="wtotem-tooltip__header"><?= __( 'CPU Load average', 'wtotem' ) ?></p>
423 <p class="wtotem-tooltip__text"><?= __( 'Shows the CPU load.', 'wtotem' ) ?></p>
424 </div>
425 </div>
426 </h3>
427 </div>
428 <div class="wtotem_chart-first__right chart_btn" data-box="chart_cpu_wrap" data-service="cpu">
429 <div class="wtotem_chart-first__btn" data-days="365"><?= __( 'Yearly', 'wtotem' ) ?></div>
430 <div class="wtotem_chart-first__btn" data-days="31"><?= __( 'Monthly', 'wtotem' ) ?></div>
431 <div class="wtotem_chart-first__btn wtotem_chart-first__btn_active" data-days="7"><?= __( 'Weekly', 'wtotem' ) ?></div>
432 <div class="wtotem_chart-first__btn" data-days="1"><?= __( 'Daily', 'wtotem' ) ?></div>
433 </div>
434 </div>
435
436 <?php if($arguments["serverStatus"]["cpuChart"] && $arguments["serverStatus"]["cpuChart"] != 'null'):?>
437 <div id="chart_cpu_wrap">
438 <div class="wtotem_chart__diagram">
439 <div id="cpu-chart" class="line-chart" data-days="7">
440 <div id="tooltipCpu" class="line-chart__tooltip">
441 <span id="countCpu"></span>
442 </div>
443 </div>
444 </div>
445 </div>
446 <?php else:?>
447 <!-- No data block -->
448 <section class="wtotem_reports-no-data" style="height:300px" >
449 <h2 class="visually-hidden"><?= __( 'No data', 'wtotem' ) ?></h2>
450 <p class="wtotem_reports-no-data__text">
451 <?= __( 'No data', 'wtotem' ) ?>
452 </p>
453 </section>
454 <?php endif; ?>
455 </div>
456
457 <div class="wtotem_antivirus">
458 <div class="wtotem_antivirus__first section-header-mb">
459 <h2 class="title">
460 <?= __( 'Antivirus', 'wtotem' ) ?>
461 </h2>
462 <?php if(wtsec_app()->get('av_installed')): ?>
463 <a href="<?=wtsec_getUrl("vc")?>" class="arrow-right">
464 <?= __( 'Show more', 'wtotem' ) ?>
465 </a>
466 <?php endif; ?>
467 </div>
468 <div class="wtotem_antivirus__block wt_card">
469 <div class="wtotem_antivirus__item">
470 <div class="wtotem_antivirus__figures wtotem_antivirus__figures_green">
471 <?= $arguments["vc"]["scanned"] ?>
472 </div>
473 <div class="wtotem_antivirus__title">
474 <?= __( 'Scanned files', 'wtotem' ) ?>
475 </div>
476 </div>
477
478 <div class="wtotem_antivirus__item">
479 <div class="wtotem_antivirus__figures wtotem_antivirus__figures_yellow">
480 <?= $arguments["vc"]["changes"] ?>
481 </div>
482 <div class="wtotem_antivirus__title">
483 <?= __( 'Changed files', 'wtotem' ) ?>
484 </div>
485 </div>
486
487 <div class="wtotem_antivirus__item">
488 <div class="wtotem_antivirus__figures wtotem_antivirus__figures_black">
489 <?= $arguments["vc"]["deleted"] ?>
490 </div>
491 <div class="wtotem_antivirus__title">
492 <?= __( 'Deleted files', 'wtotem' ) ?>
493 </div>
494 </div>
495
496 <div class="wtotem_antivirus__item">
497 <div class="wtotem_antivirus__figures wtotem_antivirus__figures_orange">
498 <?= $arguments["vc"]["signatures"] ?>
499 </div>
500 <div class="wtotem_antivirus__title">
501 <?= __( 'Infected files', 'wtotem' ) ?>
502 </div>
503 </div>
504
505 </div>
506 </div>
507
508 <div class="wtotem_monitoring">
509 <div class="wtotem_monitoring__first section-header-mb">
510 <h2 class="title">
511 <?= __( 'Monitoring', 'wtotem' ) ?>
512 </h2>
513 </div>
514 <div class="wtotem_table wt_card">
515 <div class="wtotem_table__row">
516 <div class="wtotem_table__col">
517 <div class="wtotem_table__th">
518 <h3 class="wtotem_table__title wtotem_title-info__title">
519 <?= __( 'SSL', 'wtotem' ) ?>
520 <div class="wtotem_title-info__info wtotem-tooltip">
521 <div class="wtotem-tooltip__content">
522 <p class="wtotem-tooltip__header"><?= __( 'SSL module', 'wtotem' ) ?></p>
523 <p class="wtotem-tooltip__text"><?= __( 'Displays the status of the SSL Certificate.', 'wtotem' ) ?></p>
524 </div>
525 </div>
526 </h3>
527 </div>
528
529 <?php if($arguments["ssl"]["status"]['type'] == 'pending'):?>
530 <?php include 'components/_dots_loader.php'?>
531 <?php else: ?>
532 <div class="wtotem_table__td">
533 <div class="wtotem_table__expired">
534 <?= $arguments["ssl"]["status"]["text"] ?>
535 </div>
536 </div>
537
538 <?php if (!empty($arguments["ssl"]["days_left"])): ?>
539 <div class="wtotem_table__info">
540 <h3 class="wtotem_table__subject">
541 <?= __( 'Days left', 'wtotem' ) ?>
542 </h3>
543 <div class="wtotem_table__text">
544 <?= $arguments["ssl"]["days_left"] ?>
545 </div>
546 </div>
547 <?php endif; ?>
548 <?php if (!empty($arguments["ssl"]["issue_date"])): ?>
549 <div class="wtotem_table__info">
550 <h3 class="wtotem_table__subject">
551 <?= __( 'Issue date', 'wtotem' ) ?>
552 </h3>
553 <div class="wtotem_table__text">
554 <?= $arguments["ssl"]["issue_date"] ?>
555 </div>
556 </div>
557 <?php endif; ?>
558 <?php if (!empty($arguments["ssl"]["expiry_date"])): ?>
559 <div class="wtotem_table__info">
560 <h3 class="wtotem_table__subject">
561 <?= __( 'Expiry date', 'wtotem' ) ?>
562 </h3>
563 <div class="wtotem_table__text">
564 <?= $arguments["ssl"]["expiry_date"] ?>
565 </div>
566 </div>
567 <?php endif; ?>
568
569 <?php endif; ?>
570 </div>
571 <div class="wtotem_table__col">
572 <div class="wtotem_table__th">
573 <h3 class="wtotem_table__title wtotem_title-info__title">
574 <?= __( 'Availability', 'wtotem' ) ?>
575 <div class="wtotem_title-info__info wtotem-tooltip">
576 <div class="wtotem-tooltip__content">
577 <p class="wtotem-tooltip__header"><?= __( 'Availability module', 'wtotem' ) ?></p>
578 <p class="wtotem-tooltip__text"><?= __( 'Check the performance of your site every minute. Stay informed about the problems of accessibility of the site instantly using any available types of notifications: SMS, Email, Telegram, Slack and many others.', 'wtotem' ) ?></p>
579 </div>
580 </div>
581 </h3>
582 </div>
583
584 <?php if($arguments["wa"]["status"]['type'] == 'pending'):?>
585 <?php include 'components/_dots_loader.php'?>
586 <?php else: ?>
587 <div class="wtotem_table__td">
588 <div class="wtotem_table__perfomance">
589 <?= __( 'Performance', 'wtotem' ) ?>
590 </div>
591 <div class="wtotem_table__right wtotem_table__right_progress-wrap">
592 <span class="wtotem_table__initial-value">0%</span>
593 <div class="wtotem_table__stick-progress">
594 <div class="wtotem_table__message">
595 <span class="wtotem_table__percent">
596 <?= $arguments["wa"]["availability_percent"] ?>%
597 </span>
598 <span class="wtotem_table__triangle"></span>
599 </div>
600 </div>
601 </div>
602 </div>
603 <div class="wtotem_table__info">
604 <h3 class="wtotem_table__subject">
605 <?= __( 'Status', 'wtotem' ) ?>
606 <div class="wtotem_title-info__info wtotem-tooltip">
607 <div class="wtotem-tooltip__content">
608 <?= (array_key_exists($arguments["wa"]["status"]["type"],$arguments['tooltipsStatuses'])) ? $arguments['tooltipsStatuses'][$arguments["wa"]["status"]["type"]] : '' ?>
609 </div>
610 </div>
611 </h3>
612 <div class="wtotem_table__status"><?= $arguments["wa"]["status"]["text"] ?></div>
613 </div>
614 <div class="wtotem_table__info">
615 <h3 class="wtotem_table__subject"><?= __( 'Response time', 'wtotem' ) ?></h3>
616 <div class="wtotem_table__text"><?= $arguments["wa"]["response_time"] ?></div>
617 </div>
618 <div class="wtotem_table__info">
619 <h3 class="wtotem_table__subject"><?= __( 'Downtime', 'wtotem' ) ?></h3>
620 <div class="wtotem_table__text"><?= $arguments["wa"]["downtime"] ?></div>
621 </div>
622 <div class="wtotem_table__info">
623 <h3 class="wtotem_table__subject"><?= __( 'Last test', 'wtotem' ) ?></h3>
624 <div class="wtotem_table__text"><?= $arguments["wa"]["last_test"] ?></div>
625 </div>
626 <?php endif; ?>
627 </div>
628
629 <div class="wtotem_table__col">
630 <div class="wtotem_table__th">
631 <h3 class="wtotem_table__title wtotem_title-info__title"><?= __( 'Reputation', 'wtotem' ) ?>
632 <div class="wtotem_title-info__info wtotem-tooltip">
633 <div class="wtotem-tooltip__content">
634 <p class="wtotem-tooltip__header"><?= __( 'Reputation module', 'wtotem' ) ?></p>
635 <p class="wtotem-tooltip__text"><?= __( 'Checks website entries in 60+ blacklisting authorities.', 'wtotem' ) ?></p>
636 </div>
637 </div>
638 </h3>
639 </div>
640
641 <?php if($arguments["av"]["status"]['type'] == 'pending'):?>
642 <?php include 'components/_dots_loader.php'?>
643 <?php else: ?>
644
645 <div class="wtotem_table__td">
646 <div class="wtotem_table__wrap">
647 <?php if($arguments["av"]["status"]["image"]):?>
648 <img src="<?= wtsec_getImagePath($arguments["av"]["status"]["image"]) ?>" alt="Check mark icon"
649 class="wtotem_table__img"/>
650 <?php endif; ?>
651 </div>
652
653 <div class="wtotem_table__perfomance wtotem_table__perfomance_long ml-2"><?= $arguments["av"]["reputation"] ?></div>
654 </div>
655 <div class="wtotem_table__info">
656 <h3 class="wtotem_table__subject">
657 <?= __( 'Status', 'wtotem' ) ?>
658 <div class="wtotem_title-info__info wtotem-tooltip">
659 <div class="wtotem-tooltip__content">
660 <?= (array_key_exists($arguments["av"]["status"]["type"],$arguments['tooltipsStatuses'])) ? $arguments['tooltipsStatuses'][$arguments["av"]["status"]["type"]] : '' ?>
661 </div>
662 </div>
663 </h3>
664 <div class="wtotem_table__status"><?= $arguments["av"]["status"]["text"] ?></div>
665 </div>
666 <div class="wtotem_table__info">
667 <h3 class="wtotem_table__subject">
668 <?= __( 'Deny lists entries', 'wtotem' ) ?>
669 </h3>
670 <div class="wtotem_table__text">
671 <?= $arguments["av"]["blacklists_entries"] ?>
672 </div>
673 </div>
674 <div class="wtotem_table__info">
675 <h3 class="wtotem_table__subject">
676 <?= __( 'Last test', 'wtotem' ) ?>
677 </h3>
678 <div class="wtotem_table__text">
679 <?= $arguments["av"]["time_of_the_last_test"] ?>
680 </div>
681 </div>
682 <div class="wtotem_table__info"></div>
683
684 <?php endif; ?>
685 </div>
686 </div>
687 <div class="wtotem_table__footer">
688 <a target="_blank" href="https://wtotem.com/faq/#hs-chat-open" class="wtotem_table__link">
689 <div class="wtotem_table__perfomance">
690 <?= __( 'Need more support?', 'wtotem' ) ?>
691 <span><?= __( 'Let\'s talk!', 'wtotem' ) ?></span>
692 </div>
693 </a>
694 </div>
695 </div>
696 </div>
697
698 <div class="wtotem_scanning">
699 <div class="wtotem_scanning__first section-header-mb">
700 <h2 class="title">
701 <?= __( 'Scanning', 'wtotem' ) ?>
702 </h2>
703 </div>
704 <div class="wtotem_table wt_card">
705 <div class="wtotem_table__row">
706 <div class="wtotem_table__col">
707 <div class="wtotem_table__th">
708 <h3 class="wtotem_table__title wtotem_title-info__title">
709 <?= __( 'Port scanner', 'wtotem' ) ?>
710 <div class="wtotem_title-info__info wtotem-tooltip">
711 <div class="wtotem-tooltip__content">
712 <p class="wtotem-tooltip__header"><?= __( 'Port scanner', 'wtotem' ) ?></p>
713 <p class="wtotem-tooltip__text"><?= __( 'Detects open ports on the server. Potentially, open ports can be dangerous and used by hackers.', 'wtotem' ) ?> </p>
714 </div>
715 </div>
716 </h3>
717 </div>
718 <?php if($arguments["ps"]["status"]['type'] == 'pending'):?>
719 <?php include 'components/_dots_loader.php'?>
720 <?php else: ?>
721 <div class="wtotem_table__info">
722 <h3 class="wtotem_table__subject">
723 <?= __( 'Status', 'wtotem' ) ?>
724 <div class="wtotem_title-info__info wtotem-tooltip">
725 <div class="wtotem-tooltip__content">
726 <?= (array_key_exists($arguments["ps"]["status"]["type"],$arguments['tooltipsStatuses'])) ? $arguments['tooltipsStatuses'][$arguments["ps"]["status"]["type"]] : '' ?>
727 </div>
728 </div>
729 </h3>
730 <div class="wtotem_table__status"><?= $arguments["ps"]["status"]["text"] ?></div>
731 </div>
732 <div class="wtotem_table__info">
733 <h3 class="wtotem_table__subject"><?= __( 'IP Address', 'wtotem' ) ?></h3>
734 <div class="wtotem_table__text"><?= $arguments["ps"]["ip"] ?></div>
735 </div>
736 <?php if (!empty($arguments["ps"]["tcp"])): ?>
737 <div class="wtotem_table__info">
738 <h3 class="wtotem_table__subject">
739 <?= __( 'TCP', 'wtotem' ) ?>
740 </h3>
741 <div class="wtotem_table__text">
742 <?= $arguments["ps"]["tcp"] ?>
743 </div>
744 </div>
745 <?php endif; ?>
746 <div class="wtotem_table__info">
747 <h3 class="wtotem_table__subject">
748 <?= __( 'Last test', 'wtotem' ) ?>
749 </h3>
750 <div class="wtotem_table__text">
751 <?= $arguments["ps"]["last_test"] ?>
752 </div>
753 </div>
754 <?php endif; ?>
755 </div>
756
757 <div class="wtotem_table__col">
758 <div class="wtotem_table__th">
759 <h3 class="wtotem_table__title wtotem_title-info__title">
760 <?= __( 'Deface scanner', 'wtotem' ) ?>
761 <div class="wtotem_title-info__info wtotem-tooltip">
762 <div class="wtotem-tooltip__content">
763 <p class="wtotem-tooltip__header"><?= __( 'Deface scanner', 'wtotem' ) ?></p>
764 <p class="wtotem-tooltip__text"><?= __( 'Tracks the possible hacker attack with the main page substitution.', 'wtotem' ) ?></p>
765 </div>
766 </div>
767 </h3>
768 </div>
769
770 <?php if($arguments["dc"]["status"]['type'] == 'pending'):?>
771 <?php include 'components/_dots_loader.php'?>
772 <?php else: ?>
773
774 <div class="wtotem_table__item">
775 <div class="wtotem_table__wrap_big">
776 <?php if($arguments["dc"]["status"]["image"]):?>
777 <img src="<?= wtsec_getImagePath($arguments["dc"]["status"]["image"]) ?>" alt="Check mark icon"
778 class="wtotem_table__img"/>
779 <?php endif; ?>
780 </div>
781 </div>
782
783 <div class="wtotem_table__info">
784 <h3 class="wtotem_table__subject">
785 <?= __( 'Status', 'wtotem' ) ?>
786 <div class="wtotem_title-info__info wtotem-tooltip">
787 <div class="wtotem-tooltip__content">
788 <?= (array_key_exists($arguments["dc"]["status"]["type"],$arguments['tooltipsStatuses'])) ? $arguments['tooltipsStatuses'][$arguments["dc"]["status"]["type"]] : '' ?>
789 </div>
790 </div>
791 </h3>
792 <div class="wtotem_table__status">
793 <?= $arguments["dc"]["status"]["text"] ?>
794 </div>
795 </div>
796 <?php if($arguments["dc"]["words"]):?>
797 <div class="wtotem_table__info">
798 <h3 class="wtotem_table__subject">
799 <?= __( 'Found words', 'wtotem' ) ?>
800 </h3>
801 <div class="wtotem_table__text">
802 <?= $arguments["dc"]["words"] ?>
803 </div>
804 </div>
805 <?php endif; ?>
806 <div class="wtotem_table__info">
807 <h3 class="wtotem_table__subject">
808 <?= __( 'Last test', 'wtotem' ) ?>
809 </h3>
810 <div class="wtotem_table__text">
811 <?= $arguments["dc"]["time_of_the_last_test"] ?>
812 </div>
813 </div>
814
815 <?php endif; ?>
816 </div>
817
818 <div class="wtotem_table__col">
819 <section class="wtotem-ss-disc">
820 <div class="wtotem_chart wt_card wtotem-ss-disc">
821 <div class="wtotem_chart-first wtotem-ss-disc__header">
822 <h3 class="wtotem_table__subject" ><?= __( 'DISC USAGE', 'wtotem' ) ?>
823 <div class="wtotem_title-info__info wtotem-tooltip">
824 <div class="wtotem-tooltip__content">
825 <p class="wtotem-tooltip__header"><?= __( 'Disc usage', 'wtotem' ) ?></p>
826 <p class="wtotem-tooltip__text"><?= __( 'Shows the Disc load and its accessible memory.', 'wtotem' ) ?></p>
827 </div>
828 </div>
829 </h3>
830 </div>
831 <div class="wtotem_state__line wtotem-ss-disc__line"></div>
832
833 <div class="wtotem-ss-disc__content">
834 <?php if(!$arguments["serverStatus"]["discUsage"]['total']):?>
835 <section class="wtotem_reports-no-data" >
836 <h2 class="visually-hidden"><?= __( 'No data', 'wtotem' ) ?></h2>
837 <p class="wtotem_reports-no-data__text">
838 <?= __( 'No data', 'wtotem' ) ?>
839 </p>
840 </section>
841 <?php else: ?>
842 <div class="wtotem-ss-disc__wrapper">
843 <div id="disk-chart"></div>
844 <div class="wtotem-ss-disc__totals">
845 <p class="wtotem-ss-disc__totals-caption"><?= __( 'Total', 'wtotem' ) ?></p>
846 <p class="wtotem-ss-disc__totals-value"><?= $arguments["serverStatus"]["discUsage"]['total']?></p>
847 </div>
848 </div>
849 <ul class="wtotem-ss-disc__legend">
850 <li class="wtotem-ss-disc__legend-item wtotem-ss-disc__legend-item--use">
851 <p class="wtotem-ss-disc__legend-value"><?= $arguments["serverStatus"]["discUsage"]['use']?></p>
852 <p class="wtotem-ss-disc__legend-caption"><?= __( 'Use', 'wtotem' ) ?></p>
853 </li>
854 <li class="wtotem-ss-disc__legend-item wtotem-ss-disc__legend-item--free">
855 <p class="wtotem-ss-disc__legend-value"><?= $arguments["serverStatus"]["discUsage"]['free']?></p>
856 <p class="wtotem-ss-disc__legend-caption"><?= __( 'Free', 'wtotem' ) ?></p>
857 </li>
858 </ul>
859 <?php endif; ?>
860 </div>
861 </div>
862 </section>
863
864 </div>
865
866 </div>
867
868 <div class="wtotem_table__footer">
869 <a target="_blank" href="https://wtotem.com/faq/#hs-chat-open" class="wtotem_table__link">
870 <div class="wtotem_table__perfomance">
871 <?= __( 'Need more support?', 'wtotem' ) ?>
872 <span><?= __( 'Let\'s talk!', 'wtotem' ) ?></span>
873 </div>
874 </a>
875 </div>
876 </div>
877 </div>
878 </div>
879 </div>
880
881 <script>
882 var availability_percent = "<?=$arguments["wa"]["availability_percent"]?>";
883
884 var wtotem_token = "<?=$arguments["settings"]["token"]?>";
885 var wtotem_site_id = "<?=$arguments["settings"]["site_id"]?>";
886 var wtotem_am_process_status = "<?=$arguments["am"]["process_status"]?>";
887 var wtotem_av_process_status = "<?=$arguments["vc"]["_status"]?>";
888 var wtotem_waf_process_status = "<?=$arguments["waf"]["_status"]?>";
889 var wtotem_dashbord = true;
890
891 var wtotem_socket_url = "wss://api.wtotem.com/graphql";
892
893
894 document.addEventListener('DOMContentLoaded', function () {
895 if (wtotem_am_process_status === "installing") {
896 let firewall_selector = document.getElementsByClassName("wtotem_unit__block_firewall");
897 let firewall_installed_selector = document.getElementById("wtsec_firewall_block_installed");
898 let firewall_installing_selector = document.getElementById("wtsec_firewall_block_installing");
899 let firewall_failed_selector = document.getElementById("wtsec_firewall_block_failed");
900 let antivirus_selector = document.getElementsByClassName("wtotem_unit__block_antivirus");
901 let antivirus_installed_selector = document.getElementById("wtsec_antivirus_block_installed");
902 let antivirus_installing_selector = document.getElementById("wtsec_antivirus_block_installing");
903 let antivirus_failed_selector = document.getElementById("wtsec_antivirus_block_failed");
904 let firewall = false, antivirus = false;
905
906 function show_hide(selector,show = true){
907 if(show){
908 selector.style.display = "flex";
909 }else{
910 selector.style.display = "none";
911 }
912 }
913
914 function show_hide_in_loop(selectors,show = true){
915 for(let selector of selectors){
916 show_hide(selector,show);
917 }
918 }
919
920 switch (wtotem_waf_process_status){
921 case 'installing' || 'not_installed':
922 show_hide(firewall_installing_selector,true);
923 break;
924 case 'internal_error' || 'update_error' || 'config_error':
925 show_hide(firewall_failed_selector,true);
926 break;
927 case 'installed':
928 show_hide(firewall_installed_selector,true);
929 break;
930 default:
931 show_hide(firewall_installing_selector,true);
932 }
933
934 switch (wtotem_av_process_status){
935 case 'installing' || 'not_installed':
936 show_hide(antivirus_installing_selector,true);
937 break;
938 case 'internal_error' || 'update_error' || 'config_error':
939 show_hide(antivirus_failed_selector,true);
940 break;
941 case 'installed':
942 show_hide(antivirus_installed_selector,true);
943 break;
944 default:
945 show_hide(antivirus_installing_selector,true);
946 }
947
948
949 let variables = {
950 input: {
951 token: wtotem_token,
952 service: 'am',
953 siteId: wtotem_site_id,
954 },
955 }
956 let query = `subscription EventsSubscription($input: EventsInput!) {
957 events(input: $input) {
958 siteId hostname status service
959 error {
960 message
961 __typename
962 }
963 __typename
964 }
965 }`;
966 const sub = graphQLSubscriber(wtotem_socket_url, {},
967 (error, subscribe) => {
968 if (!(error || subscribe)) {
969
970 // Normal closure.
971 return
972 }
973 if (error) {
974 wtsec_showNotification(__('Connection is broken, please reload the page','wtotem'),'error');
975 console.error(error);
976 AmplitudeAnalytics.agentInstallConfirm(firewall,antivirus);
977 throw error
978 }
979 const unsubscribe = subscribe(
980 query,
981 variables,
982 null,
983 (error, data) => {
984 console.log(data);
985 if (!(error || subscribe)) {
986 //AmplitudeAnalytics.agentInstallConfirm(firewall,antivirus);
987 // Normal closure
988 return
989 }
990 if (error) {
991 wtsec_showNotification(__('Connection is broken, please reload the page','wtotem'),'error');
992 console.error(error);
993 AmplitudeAnalytics.agentInstallConfirm(firewall,antivirus);
994 throw error
995 }
996
997 if (data.events.status === "waf_installed") {
998 show_hide_in_loop(firewall_selector, false);
999 show_hide(firewall_installed_selector,true);
1000 firewall = true;
1001 } else if (data.events.status === "av_installed") {
1002 show_hide_in_loop(antivirus_selector, false);
1003 show_hide(antivirus_installed_selector,true);
1004 antivirus = true;
1005 } else if (data.events.status === "am_installed") {
1006
1007 } else {
1008 let split = data.events.status.split("_");
1009 if(split.length === 0){
1010 return;
1011 }
1012 let service = split[0];
1013 if (service === "waf") {
1014 show_hide_in_loop(firewall_selector, false);
1015 show_hide(firewall_failed_selector,true);
1016 }
1017 if (service === "av") {
1018 show_hide_in_loop(antivirus_selector, false);
1019 show_hide(antivirus_failed_selector,true);
1020 }
1021 if (service === "am") {
1022
1023 }
1024
1025 AmplitudeAnalytics.agentInstallConfirm(firewall,antivirus);
1026 }
1027
1028 if(firewall && antivirus){
1029 AmplitudeAnalytics.agentInstallConfirm(firewall,antivirus);
1030 }
1031 })
1032
1033 })
1034
1035 }
1036 });
1037 </script>
1038
1039 <?php if($arguments['api_key_activated']):?>
1040 <script>
1041 window.addEventListener('DOMContentLoaded', function () {
1042 AmplitudeAnalytics.apiKeyActivated();
1043 });
1044 </script>
1045 <?php endif; ?>
1046
1047 <script>
1048 window.addEventListener('DOMContentLoaded', function () {
1049 AmplitudeAnalytics.setUser('<?= $arguments['settings']['email'] ?>');
1050 });
1051
1052 var waf_chart = <?php echo $arguments["waf"]["chart"] ?: 'false' ?>;
1053 var serverStatusRam = <?php echo $arguments["serverStatus"]["ramChart"] ?: 'false' ?>;
1054 var serverStatusCpu = <?php echo $arguments["serverStatus"]["cpuChart"] ?: 'false' ?>;
1055 var serverStatusDiscUsage = <?= json_encode($arguments["serverStatus"]["discUsage"])?>;
1056
1057 if(typeof waf_chart == "object" && typeof drawWafChart != 'undefined'){
1058 drawWafChart(waf_chart);
1059 }
1060 if(typeof serverStatusRam == "object" && typeof drawRamChart != 'undefined'){
1061 drawRamChart(serverStatusRam);
1062 }
1063 if(typeof serverStatusCpu == "object" && typeof drawCpuChart != 'undefined') {
1064 drawCpuChart(serverStatusCpu);
1065 }
1066 if(typeof serverStatusDiscUsage == "object" && typeof drawDiskChart != 'undefined') {
1067 drawDiskChart(serverStatusDiscUsage);
1068 }
1069 </script>
1070 <?php else: ?>
1071 <!-- No data block -->
1072 <section class="wtotem_reports-no-data" style="height:300px" >
1073 <h2 class="visually-hidden"><?= __( 'No data', 'wtotem' ) ?></h2>
1074 <p class="wtotem_reports-no-data__text">
1075 <?= __( 'Has no action ready yet', 'wtotem' ) ?>
1076 </p>
1077 </section>
1078 <?php endif; ?>