PluginProbe
WebTotem Security / 3.0.0
WebTotem Security v3.0.0
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 / templates / agents.html.twig

agents.html.twig in WebTotem Security 3.0.0, at includes/templates/agents.html.twig

44 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 {% if process_status %}
2 <script type="text/javascript">
3
4 jQuery(document).ready(function ($) {
5
6 let ajax_execute = () => {
7 jQuery.post(ajaxurl, {
8
9 action: 'wtotem_ajax',
10 ajax_action: 'agents_installation',
11 wtotem_page_nonce: '{{ page_nonce }}',
12
13 }, function (data) {
14 if(data.agents_statuses){
15 clearInterval(wtotem_check_agents_status);
16 }
17 jQuery('#wtotem_agents_wrap').html(data.agents);
18 jQuery('#wtotem_notifications').html(data.notifications);
19 });
20 };
21
22 /* run the check every 10 seconds */
23 let wtotem_check_agents_status = setInterval(() => ajax_execute(), 10000);
24
25 /* stop check after 30 min */
26 setTimeout(() => { clearInterval(wtotem_check_agents_status); }, 1800000);
27
28 });
29
30 </script>
31
32 <div class="wtotem_unit">
33 <div class="wtotem_unit__first section-header-mb">
34 <h2 class="h2 title">
35 {{ 'Agent manager installation' | trans }}
36 </h2>
37 </div>
38
39 <div class="wtotem_unit__wrapper wt_card" id="wtotem_agents_wrap">
40 {% include 'agents_installation.html.twig' with {'process_status': process_status, 'images_path': images_path} %}
41 </div>
42 </div>
43 {% endif %}
44