# wt-security/2.2.3/includes/dashboard.php

WebTotem Security, version 2.2.3. 699 lines.

- Page: https://pluginprobe.com/plugins/wt-security/2.2.3/code/includes/dashboard.php
- Raw: https://pluginprobe.com/plugins/wt-security/2.2.3/raw/includes/dashboard.php
- Modified: 2020-11-27T08:50:22+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wt-security/2.2.3/code/includes/dashboard.php#L10-L20`.

```php
<?php defined('ABSPATH') or die("Protected By WT!"); ?>
<?php if (!empty($arguments)): ?>

<div class="wtotem_content">
    <div class="wtotem_container">
        <div class="wtotem_first">
            <div class="wtotem_overall wtotem_first_left wt_card">
                <div class="wtotem_overall__title wtotem_title-info">
                    <h3 class="wtotem_title-info__title">
                        <?= wtsec_locale("score.overall_security_grade") ?>
                        <span class="wtotem_title-info__info" data-tlite="w"
                              title="<?= $arguments["score"]["description"] ?>"> </span>
                    </h3>
                </div>
                <div class="wtotem_overall__body">
                    <div class="wtotem_overall__inner">
                        <div class="wtotem_overall__rectangle wtsec_score_bg_<?= $arguments["score"]["color"] ?>"><?= $arguments["score"]["grade"] ?></div>
                        <div class="wtotem_overall__figures wtsec_score_<?= $arguments["score"]["color"] ?>"><?= $arguments["score"]["total_score"] ?></div>
                    </div>
                    <p class="wtotem_overall__text"><?= $arguments["score"]["information"] ?></p>
                </div>
            </div>

            <div class="wtotem_info wtotem_first_right wt_card">
                <div class="wtotem_info__item">
                    <div class="wtotem_info__block">
                        <div class="wtotem_info__subtitle"><?= wtsec_locale("score.tested_on") ?></div>
                        <div class="wtotem_info__info"><?= $arguments["score"]["tested_on"] ?></div>
                    </div>
                    <div class="wtotem_info__block">
                        <div class="wtotem_info__subtitle"><?= wtsec_locale("score.server_ip") ?></div>
                        <div class="wtotem_info__info"><?= $arguments["score"]["server_ip"] ?></div>
                    </div>
                </div>
                <div class="wtotem_info__item">
                    <div class="wtotem_info__block">
                        <div class="wtotem_info__subtitle"><?= wtsec_locale("score.location") ?></div>
                        <div class="wtotem_info__info"><?= $arguments["score"]["location"] ?></div>
                    </div>
                    <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>
                </div>
            </div>
        </div>

        <?php if ($arguments["am"]["process_status"] !== "installed" || !$arguments["am"]["installed"]): ?>
        <div class="wtotem_unit">
            <div class="wtotem_unit__first section-header-mb">
                <h2 class="title">
                    <?= wtsec_locale("agent_manager_installation") ?>
                </h2>
            </div>
            <div class="wtotem_unit__wrapper wt_card">
                <?php if ($arguments["am"]["process_status"] === "installing"): ?>
                    <div class="wtotem_unit__block wtotem_unit__block_antivirus" id="wtsec_antivirus_block_installed" style="display: none">
                    <div class="wtotem_unit__contain">
                        <div class="wtotem_unit__circle wtotem_unit__circle_success">
                            <img src="<?= wtsec_getImagePath("success.svg") ?>" alt="Success" class="wtotem_unit__img">
                        </div>
                        <h2 class="title">
                            <?= wtsec_locale("remote_antivirus") ?>
                        </h2>
                    </div>
                    <div class="wtotem_unit__expectation wtotem_unit__expectation_success">
                        <?= wtsec_locale("installed") ?>
                    </div>
                </div>
                <div class="wtotem_unit__block wtotem_unit__block_antivirus" id="wtsec_antivirus_block_installing" style="display: none">
                    <div class="wtotem_unit__contain">
                        <div class="wtotem_unit__expectation wtotem_unit__circle_loading">
                            <img src="<?= wtsec_getImagePath("spinner.svg") ?>" alt="Spinner"
                                 class="wtotem_unit__img wtotem_unit__img_spinner"/>
                        </div>
                        <h2 class="title ml-2">
                            <?= wtsec_locale("remote_antivirus") ?>
                        </h2>
                    </div>
                    <div class="wtotem_unit__expectation wtotem_unit__expectation_loading">
                        <?= wtsec_locale("installation_in_progress") ?>...
                    </div>
                </div>
                <div class="wtotem_unit__block wtotem_unit__block_antivirus" id="wtsec_antivirus_block_failed" style="display: none">
                    <div class="wtotem_unit__contain">
                        <div class="wtotem_unit__circle wtotem_unit__circle_error"></div>
                        <h2 class="title">
                            <?= wtsec_locale("remote_antivirus") ?>
                        </h2>
                    </div>
                    <div class="wtotem_unit__expectation wtotem_unit__expectation_error">
                        <?= wtsec_locale("installation_failed") ?>
                    </div>
                </div>

                <div class="wtotem_unit__block wtotem_unit__block_firewall" id="wtsec_firewall_block_installed" style="display: none">
                    <div class="wtotem_unit__contain">
                        <div class="wtotem_unit__circle wtotem_unit__circle_success">
                            <img src="<?= wtsec_getImagePath("success.svg") ?>" alt="Success"
                                 class="wtotem_unit__img">
                        </div>
                        <h2 class="title">
                            <?= wtsec_locale("firewall") ?>
                        </h2>
                    </div>
                    <div class="wtotem_unit__expectation wtotem_unit__expectation_success">
                        <?= wtsec_locale("installed") ?>
                    </div>
                </div>

                <div class="wtotem_unit__block wtotem_unit__block_firewall" id="wtsec_firewall_block_installing" style="display: none">
                    <div class="wtotem_unit__contain">
                        <div class="wtotem_unit__expectation wtotem_unit__circle_loading">
                            <img src="<?= wtsec_getImagePath("spinner.svg") ?>" alt="Spinner"
                                 class="wtotem_unit__img wtotem_unit__img_spinner"/>
                        </div>
                        <h2 class="title ml-2">
                            <?= wtsec_locale("firewall") ?>
                        </h2>
                    </div>
                    <div class="wtotem_unit__expectation wtotem_unit__expectation_loading">
                        <?= wtsec_locale("installation_in_progress") ?>...
                    </div>
                </div>

                <div class="wtotem_unit__block wtotem_unit__block_firewall" id="wtsec_firewall_block_failed" style="display: none">
                    <div class="wtotem_unit__contain">
                        <div class="wtotem_unit__circle wtotem_unit__circle_error"></div>
                        <h2 class="title">
                            <?= wtsec_locale("firewall") ?>
                        </h2>
                    </div>
                    <div class="wtotem_unit__expectation wtotem_unit__expectation_error">
                        <?= wtsec_locale("installation_failed") ?>
                    </div>
                </div>
                <?php elseif(!$arguments["am"]["installed"]): ?>
                <div class="wtotem_unit__block">
                    <div class="wtotem_unit__contain">
                        <div class="wtotem_unit__circle wtotem_unit__circle_error"></div>
                        <h2 class="title">
                            <?= wtsec_locale("agent_manager_failed") ?>
                        </h2>
                    </div>
                    <div class="wtotem_unit__expectation wtotem_unit__expectation_error">
                        <?php if (isset($arguments['am']['actions']['first'])) { ?>
                            <?= $arguments['am']['actions']['first'] ?>
                        <?php } ?>
                    </div>
                </div>
                <?php endif; ?>

            </div>
        </div>
        <?php endif; ?>



        <div class="wtotem_firewall">
            <div class="wtotem_firewall__first section-header-mb">
                <h2 class="title"><?= wtsec_locale("firewall_activity") ?></h2>
                <a href="<?=wtsec_getUrl("waf")?>" class="wtotem_firewall__stats wtotem_print">
                    <span class="wtotem_firewall__icon"></span>
                    <span class="wtotem_firewall__text wtotem_print__label">Full stats</span>
                </a>
            </div>
            <div class="wtotem_firewall__block">
                <div class="wtotem_numbers wt_card">
                    <div class="wtotem_numbers__item">
                        <div class="wtotem_numbers__title"><?= wtsec_locale("attacks") ?></div>
                        <div class="wtotem_numbers__figures"><?= $arguments["waf"]["attacks"] ?></div>
                    </div>

                    <div class="wtotem_numbers__item">
                        <div class="wtotem_numbers__title"><?= wtsec_locale("attacks_blocked") ?></div>
                        <div class="wtotem_numbers__figures"><?= $arguments["waf"]["blocking"] ?></div>
                    </div>

                    <div class="wtotem_numbers__item">
                        <div class="wtotem_numbers__title"><?= wtsec_locale("not_blocked") ?></div>
                        <div class="wtotem_numbers__figures"><?= $arguments["waf"]["non-blocking"] ?></div>
                    </div>
                </div>


                <div class="wtotem_from wt_card">
                    <div class="wtotem_from__svg-wrap">
                        <svg class="wtotem_from__progress">
                            <circle class="wtotem_from__circle" cx="35" cy="35" r="28" stroke-width="20"
                                    stroke="rgb(135,255,222)"/>
                        </svg>
                        <span class="wtotem_from__percent" data-value="<?=$arguments["waf"]["countryAttacks"]['percent']?>">100%</span>
                    </div>

                    <div class="wtotem_from__info">
                        <div class="wtotem_from__title"><?= wtsec_locale("chart.country") ?></div>
                        <div class="wtotem_from__country" >
                            <?= ($arguments["waf"]["countryAttacks"]["country"]) ?
                                    wtsec_locale("chart.attack_from_region",['region' => $arguments["waf"]["countryAttacks"]["country"]]) :
                                    wtsec_locale('statuses.ok') ?>
                        </div>
                    </div>
                    <div class="wtotem_from__arrow-right"></div>
                </div>
            </div>
        </div>

        <div class="wtotem_chart wt_card">
            <div class="wtotem_chart-first">
                <div class="wtotem_chart-first__left">
                    <div class="wtotem_chart-first__all"><?= wtsec_locale("chart.all") ?></div>
                    <div class="wtotem_chart-first__hack wtotem_chart-first__hack_attack">
                        <span></span>
                        <p><?= wtsec_locale("chart.attacks") ?></p>
                    </div>
                    <div class="wtotem_chart-first__hack wtotem_chart-first__hack_blocked">
                        <span></span>
                        <p><?= wtsec_locale("chart.blocked") ?></p>
                    </div>
                </div>

                <div class="wtotem_chart-first__right" id="chart_btn">
                    <div class="wtotem_chart-first__btn" data-days="365"><?= wtsec_locale("chart.yearly") ?></div>
                    <div class="wtotem_chart-first__btn wtotem_chart-first__btn_active" data-days="31"><?= wtsec_locale("chart.monthly") ?></div>
                    <div class="wtotem_chart-first__btn" data-days="7"><?= wtsec_locale("chart.weekly") ?></div>
                    <div class="wtotem_chart-first__btn" data-days="1"><?= wtsec_locale("chart.daily") ?></div>
                </div>
            </div>

            <div id="chart_wrap">
                <div class="wtotem_chart__diagram" data-days="7" id="wtotem_chart_diagram">
                    <div id="line-chart" class="line-chart">
                        <div id="tooltipAttacks" class="line-chart__tooltip">
                            <span id="countAttacks"></span>
                        </div>
                        <div id="tooltipBlocked" class="line-chart__tooltip">
                            <span id="countBlocked"></span>
                        </div>
                    </div>
                </div>

                <div class="wtotem_chart__line"></div>
            </div>


            <div class="wtotem_data">
                <div class="wtotem_data__thead">
                    <div class="wtotem_data__tr">
                        <div
                                class="wtotem_data__th wtotem_data_width_1"
                        >
                            <?= wtsec_locale("chart.type_ip") ?>
                        </div>
                        <div
                                class="wtotem_data__th wtotem_data_width_2"
                        >
                            <?= wtsec_locale("chart.country") ?>
                        </div>
                        <div
                                class="wtotem_data__th wtotem_data_width_3"
                        >
                            <?= wtsec_locale("chart.time") ?>
                        </div>
                        <div
                                class="wtotem_data__th wtotem_data_width_4"
                        >
                            <?= wtsec_locale("chart.attack_location") ?>
                        </div>
                        <div
                                class="wtotem_data__th wtotem_data_width_6"
                        >
                            <?= wtsec_locale("chart.status") ?>
                        </div>
                    </div>
                </div>
                <div class="wtotem_data__tbody">
                    <?php include 'components/_firewall_lazy.php'?>
                </div>
            </div>
            <div class="wtotem_chart__line"></div>
            <div class="wtotem_chart__last">
                <p class="wtotem_chart__text">
                    <?= wtsec_locale("want_more") ?>
                </p>

                <a href="<?=wtsec_getUrl("waf")?>" class="wtotem_chart__btn">
                    <?= wtsec_locale("read_more") ?>
                </a>
            </div>
        </div>

        <div class="wtotem_antivirus">
            <div class="wtotem_antivirus__first section-header-mb">
                <h2 class="title">
                    <?= wtsec_locale("remote_antivirus") ?>
                </h2>
                <a href="<?=wtsec_getUrl("vc")?>" class="arrow-right">
                    <?= wtsec_locale("learn_more") ?>
                </a>
            </div>
            <div class="wtotem_antivirus__block wt_card">
                <div class="wtotem_antivirus__item">
                    <div class="wtotem_antivirus__figures wtotem_antivirus__figures_green">
                        <?= $arguments["vc"]["scanned"] ?>
                    </div>
                    <div class="wtotem_antivirus__title">
                        <?= wtsec_locale("antivirus.scanned") ?>
                    </div>
                </div>

                <div class="wtotem_antivirus__item">
                    <div class="wtotem_antivirus__figures wtotem_antivirus__figures_yellow">
                        <?= $arguments["vc"]["changes"] ?>
                    </div>
                    <div class="wtotem_antivirus__title">
                        <?= wtsec_locale("antivirus.changed") ?>
                    </div>
                </div>

                <div class="wtotem_antivirus__item">
                    <div class="wtotem_antivirus__figures wtotem_antivirus__figures_orange">
                        <?= $arguments["vc"]["signatures"] ?>
                    </div>
                    <div class="wtotem_antivirus__title"><?= wtsec_locale("antivirus.infected") ?></div>
                </div>

                <div class="wtotem_antivirus__item">
                    <div class="wtotem_antivirus__figures wtotem_antivirus__figures_black"><?= $arguments["vc"]["deleted"] ?></div>
                    <div class="wtotem_antivirus__title"><?= wtsec_locale("antivirus.deleted") ?></div>
                </div>
            </div>
        </div>

        <div class="wtotem_monitoring">
            <div class="wtotem_monitoring__first section-header-mb">
                <h2 class="title">
                    <?= wtsec_locale("monitoring") ?>
                </h2>
            </div>
            <div class="wtotem_table wt_card">
                <div class="wtotem_table__row">
                    <div class="wtotem_table__col">
                        <div class="wtotem_table__th">
                            <h3 class="wtotem_table__title wtotem_title-info__title">
                                <?= wtsec_locale("ssl") ?>
                                <span class="wtotem_title-info__info" data-tlite="w"
                                      title="<?= $arguments["ssl"]["description"] ?>"></span>
                            </h3>
                        </div>
                        <div class="wtotem_table__td">
                            <div class="wtotem_table__expired">
                                <?= $arguments["ssl"]["status"]["text"] ?>
                            </div>
                            <div class="wtotem_table__solve">
                                <?= $arguments["ssl"]["solve_it"] ?>
                            </div>
                        </div>
                        <?php if (!empty($arguments["ssl"]["days_left"])): ?>
                            <div class="wtotem_table__info">
                                <h3 class="wtotem_table__subject">
                                    <?= wtsec_locale("days_left") ?>
                                </h3>
                                <div class="wtotem_table__text">
                                    <?= $arguments["ssl"]["days_left"] ?>
                                </div>
                            </div>
                        <?php endif; ?>
                        <?php if (!empty($arguments["ssl"]["issue_date"])): ?>
                            <div class="wtotem_table__info">
                                <h3 class="wtotem_table__subject">
                                    <?= wtsec_locale("issue_date") ?>
                                </h3>
                                <div class="wtotem_table__text">
                                    <?= $arguments["ssl"]["issue_date"] ?>
                                </div>
                            </div>
                        <?php endif; ?>
                        <?php if (!empty($arguments["ssl"]["expiry_date"])): ?>
                            <div class="wtotem_table__info">
                                <h3 class="wtotem_table__subject">
                                    <?= wtsec_locale("expiry_date") ?>
                                </h3>
                                <div class="wtotem_table__text">
                                    <?= $arguments["ssl"]["expiry_date"] ?>
                                </div>
                            </div>
                        <?php endif; ?>

                    </div>
                    <div class="wtotem_table__col">
                        <div class="wtotem_table__th">
                            <h3 class="wtotem_table__title wtotem_title-info__title">
                                <?= wtsec_locale("availability") ?>
                                <span class="wtotem_title-info__info" data-tlite="w"
                                      title="<?= $arguments["wa"]["description"] ?>"></span>
                            </h3>
                        </div>
                        <div class="wtotem_table__td">
                            <div class="wtotem_table__perfomance">
                                <?= wtsec_locale("performance") ?>
                            </div>
                            <div class="wtotem_table__right wtotem_table__right_progress-wrap">
                                <span class="wtotem_table__initial-value">0%</span>
                                <div class="wtotem_table__stick-progress">
                                    <div class="wtotem_table__message"><span
                                                class="wtotem_table__percent"><?= $arguments["wa"]["availability_percent"] ?>%</span><span
                                                class="wtotem_table__triangle"></span>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="wtotem_table__info">
                            <h3 class="wtotem_table__subject"><?= wtsec_locale("status") ?></h3>
                            <div class="wtotem_table__status"><?= $arguments["wa"]["status"]["text"] ?></div>
                        </div>
                        <div class="wtotem_table__info">
                            <h3 class="wtotem_table__subject"><?= wtsec_locale("response_time") ?></h3>
                            <div class="wtotem_table__text"><?= $arguments["wa"]["response_time"] ?></div>
                        </div>
                        <div class="wtotem_table__info">
                            <h3 class="wtotem_table__subject"><?= wtsec_locale("downtime") ?></h3>
                            <div class="wtotem_table__text"><?= $arguments["wa"]["downtime"] ?></div>
                        </div>
                        <div class="wtotem_table__info">
                            <h3 class="wtotem_table__subject"><?= wtsec_locale("last_test") ?></h3>
                            <div class="wtotem_table__text"><?= $arguments["wa"]["last_test"] ?></div>
                        </div>
                    </div>
                    <div class="wtotem_table__col">
                        <div class="wtotem_table__th">
                            <h3 class="wtotem_table__title wtotem_title-info__title"><?= wtsec_locale("reputation") ?>
                                <span class="wtotem_title-info__info" data-tlite="w"
                                      title="<?= $arguments["av"]["description"] ?>"></span></h3>
                        </div>
                        <div class="wtotem_table__td">
                            <div class="wtotem_table__wrap">
                                <?php if($arguments["dc"]["status"]["image"]):?>
                                <img src="<?= wtsec_getImagePath($arguments["dc"]["status"]["image"]) ?>" alt="Check mark icon"
                                     class="wtotem_table__img"/>
                                <?php endif; ?>
                            </div>

                            <div class="wtotem_table__perfomance wtotem_table__perfomance_long ml-2"><?= $arguments["av"]["reputation"] ?></div>
                        </div>
                        <div class="wtotem_table__info">
                            <h3 class="wtotem_table__subject"><?= wtsec_locale("status") ?></h3>
                            <div class="wtotem_table__status"><?= $arguments["av"]["status"]["text"] ?></div>
                        </div>
                        <div class="wtotem_table__info">
                            <h3 class="wtotem_table__subject">
                                <?= wtsec_locale("blacklists_entries") ?>
                            </h3>
                            <div class="wtotem_table__text">
                                <?= $arguments["av"]["blacklists_entries"] ?>
                            </div>
                        </div>
                        <div class="wtotem_table__info">
                            <h3 class="wtotem_table__subject">
                                <?= wtsec_locale("last_test") ?>
                            </h3>
                            <div class="wtotem_table__text">
                                <?= $arguments["av"]["time_of_the_last_test"] ?>
                            </div>
                        </div>
                        <div class="wtotem_table__info"></div>
                    </div>
                </div>
                <div class="wtotem_table__footer">
                    <a target="_blank" href="https://wtotem.com/faq/#hs-chat-open" class="wtotem_table__link">
                        <div class="wtotem_table__perfomance">
                            <?= wtsec_locale("need_more_support") ?>
                            <span><?= wtsec_locale("lets_talk") ?></span>
                        </div>
                    </a>
                </div>
            </div>
        </div>

        <div class="wtotem_scanning">
            <div class="wtotem_scanning__first section-header-mb">
                <h2 class="title">
                    <?= wtsec_locale("scanning") ?>
                </h2>
            </div>
            <div class="wtotem_table wt_card">
                <div class="wtotem_table__row">
                    <div class="wtotem_table__col">
                        <div class="wtotem_table__th">
                            <h3 class="wtotem_table__title wtotem_title-info__title">
                                <?= wtsec_locale("port_scanner") ?>
                                <span class="wtotem_title-info__info" data-tlite="w"
                                      title="<?= $arguments["dc"]["description"] ?>"></span>
                            </h3>
                        </div>
                        <div class="wtotem_table__info">
                            <h3 class="wtotem_table__subject">
                                <?= wtsec_locale("status") ?>
                            </h3>
                            <div class="wtotem_table__status"><?= $arguments["ps"]["status"]["text"] ?></div>
                        </div>
                        <div class="wtotem_table__info">
                            <h3 class="wtotem_table__subject"><?= wtsec_locale("ip_address") ?></h3>
                            <div class="wtotem_table__text"><?= $arguments["ps"]["ip"] ?></div>
                        </div>
                        <?php if (!empty($arguments["ps"]["tcp"])): ?>
                            <div class="wtotem_table__info">
                                <h3 class="wtotem_table__subject">
                                    <?= wtsec_locale("tcp") ?>
                                </h3>
                                <div class="wtotem_table__text">
                                    <?= $arguments["ps"]["tcp"] ?>
                                </div>
                            </div>
                        <?php endif; ?>
                        <div class="wtotem_table__info">
                            <h3 class="wtotem_table__subject">
                                <?= wtsec_locale("last_test") ?>
                            </h3>
                            <div class="wtotem_table__text">
                                <?= $arguments["ps"]["last_test"] ?>
                            </div>
                        </div>
                    </div>

                    <div class="wtotem_table__col">
                        <div class="wtotem_table__th wtotem_overall__title">
                            <h3 class="wtotem_table__title wtotem_title-info__title">
                                <?= wtsec_locale("deface_scanner") ?>
                                <span class="wtotem_title-info__info" data-tlite="w"
                                      title="<?= $arguments["dc"]["description"] ?>"></span>
                            </h3>
                        </div>
                        <div class="wtotem_table__item">
                            <div class="wtotem_table__wrap_big">
                                <?php if($arguments["dc"]["status"]["image"]):?>
                                <img src="<?= wtsec_getImagePath($arguments["dc"]["status"]["image"]) ?>" alt="Check mark icon"
                                     class="wtotem_table__img"/>
                                <?php endif; ?>
                            </div>
                        </div>

                        <div class="wtotem_table__info">
                            <h3 class="wtotem_table__subject">
                                <?= wtsec_locale("status") ?>
                            </h3>
                            <div class="wtotem_table__status">
                                <?= $arguments["dc"]["status"]["text"] ?>
                            </div>
                        </div>
                        <div class="wtotem_table__info">
                            <h3 class="wtotem_table__subject">
                                <?= wtsec_locale("number") ?>
                            </h3>
                            <div class="wtotem_table__text">
                                <?= $arguments["dc"]["number"] ?>
                            </div>
                        </div>
                        <div class="wtotem_table__info">
                            <h3 class="wtotem_table__subject">
                                <?= wtsec_locale("last_test") ?>
                            </h3>
                            <div class="wtotem_table__text">
                                <?= $arguments["dc"]["time_of_the_last_test"] ?>
                            </div>
                        </div>
                    </div>

                </div>

                <div class="wtotem_table__footer">
                    <a target="_blank" href="https://wtotem.com/faq/#hs-chat-open" class="wtotem_table__link">
                        <div class="wtotem_table__perfomance">
                            <?= wtsec_locale("need_more_support") ?>
                            <span><?= wtsec_locale("lets_talk") ?></span>
                        </div>
                    </a>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
    var availability_percent = "<?=$arguments["wa"]["availability_percent"]?>";
    var waf_chart = <?=$arguments["waf"]["chart"]?>;
</script>
<script>
    var wtotem_token = "<?=$arguments["settings"]["token"]?>";
    var wtotem_site_id = "<?=$arguments["settings"]["site_id"]?>";
    var wtotem_am_process_status = "<?=$arguments["am"]["process_status"]?>";
    var wtotem_locale_installed = "<?= wtsec_locale("installed") ?>";
    var wtotem_locale_installing = "<?= wtsec_locale("installation_in_progress") ?>";
    var wtotem_locale_failed = "<?= wtsec_locale("failed") ?>";
    var wtotem_socket_url = "wss://api.wtotem.com/graphql";
    // var wtotem_socket_url = "wss://api-1.2ke2xgwx4.wtotem.com/graphql";
    // var wtotem_socket_url = "wss://api.webtotem.kz/graphql";
    document.addEventListener('DOMContentLoaded', function () {
        if (wtotem_am_process_status === "installing") {
            let firewall_selector = document.getElementsByClassName("wtotem_unit__block_firewall");
            let firewall_installed_selector = document.getElementById("wtsec_firewall_block_installed");
            let firewall_installing_selector = document.getElementById("wtsec_firewall_block_installing");
            let firewall_failed_selector = document.getElementById("wtsec_firewall_block_failed");
            let antivirus_selector = document.getElementsByClassName("wtotem_unit__block_antivirus");
            let antivirus_installed_selector = document.getElementById("wtsec_antivirus_block_installed");
            let antivirus_installing_selector = document.getElementById("wtsec_antivirus_block_installing");
            let antivirus_failed_selector = document.getElementById("wtsec_antivirus_block_failed");

            function show_hide(selector,show = true){
                if(show){
                    selector.style.display = "flex";
                }else{
                    selector.style.display = "none";
                }
            }

            function show_hide_in_loop(selectors,show = true){
                for(let selector of selectors){
                    show_hide(selector,show);
                }
            }

            show_hide(firewall_installing_selector,true);
            show_hide(antivirus_installing_selector,true);
            let variables = {
                input: {
                    token: wtotem_token,
                    service: 'am',
                    siteId: wtotem_site_id,
                },
            }
            let query = `subscription EventsSubscription($input: EventsInput!) {
                events(input: $input) {
                  siteId
                  hostname
                  status
                  service
                  error {
                    message
                    __typename
                  }
                __typename
                }
            }`;
            const sub = graphQLSubscriber(wtotem_socket_url, {},
                (error, subscribe) => {
                    if (!(error || subscribe)) {
                        // Normal closure.
                        return
                    }
                    if (error) {
                        console.error(error)
                        throw error
                    }
                    const unsubscribe = subscribe(
                        query,
                        variables,
                        null,
                        (error, data) => {
                            console.log(data);
                            if (!(error || subscribe)) {
                                // Normal closure
                                return
                            }
                            if (error) {
                                console.error(error)
                                throw error
                            }

                            if (data.events.status === "waf_installed") {
                                show_hide_in_loop(firewall_selector, false);
                                show_hide(firewall_installed_selector,true);
                            } else if (data.events.status === "av_installed") {
                                show_hide_in_loop(antivirus_selector, false);
                                show_hide(antivirus_installed_selector,true);
                            } else if (data.events.status === "am_installed") {

                            } else {
                                let split = data.events.status.split("_");
                                if(split.length === 0){
                                    return;
                                }
                                let service = split[0];
                                if (service === "waf") {
                                    show_hide_in_loop(firewall_selector, false);
                                    show_hide(firewall_failed_selector,true);
                                }
                                if (service === "av") {
                                    show_hide_in_loop(antivirus_selector, false);
                                    show_hide(antivirus_failed_selector,true);
                                }
                                if (service === "am") {

                                }
                            }
                        })
                })
        }
    });
</script>
<?php else: ?>
<?php //show error here ?>
<?php endif; ?>
```
