Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame^] | 1 | <?php |
| 2 | require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/prerequisites.inc.php'; |
| 3 | |
| 4 | if (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == "admin") { |
| 5 | require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/header.inc.php'; |
| 6 | $_SESSION['return_to'] = $_SERVER['REQUEST_URI']; |
| 7 | $solr_status = (preg_match("/^([yY][eE][sS]|[yY])+$/", $_ENV["SKIP_SOLR"])) ? false : solr_status(); |
| 8 | $clamd_status = (preg_match("/^([yY][eE][sS]|[yY])+$/", $_ENV["SKIP_CLAMD"])) ? false : true; |
| 9 | ?> |
| 10 | <div class="container"> |
| 11 | |
| 12 | <ul class="nav nav-tabs" role="tablist"> |
| 13 | <li role="presentation" class="active"><a href="#tab-containers" aria-controls="tab-containers" role="tab" data-toggle="tab"><?=$lang['debug']['system_containers'];?></a></li> |
| 14 | <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['debug']['logs'];?> |
| 15 | <span class="caret"></span></a> |
| 16 | <ul class="dropdown-menu"> |
| 17 | <li role="presentation"><span class="dropdown-desc"><?=$lang['debug']['in_memory_logs'];?></span></li> |
| 18 | <li role="presentation"><a href="#tab-postfix-logs" aria-controls="tab-postfix-logs" role="tab" data-toggle="tab">Postfix</a></li> |
| 19 | <li role="presentation"><a href="#tab-dovecot-logs" aria-controls="tab-dovecot-logs" role="tab" data-toggle="tab">Dovecot</a></li> |
| 20 | <li role="presentation"><a href="#tab-sogo-logs" aria-controls="tab-sogo-logs" role="tab" data-toggle="tab">SOGo</a></li> |
| 21 | <li role="presentation"><a href="#tab-netfilter-logs" aria-controls="tab-netfilter-logs" role="tab" data-toggle="tab">Netfilter</a></li> |
| 22 | <li role="presentation"><a href="#tab-autodiscover-logs" aria-controls="tab-autodiscover-logs" role="tab" data-toggle="tab">Autodiscover</a></li> |
| 23 | <li role="presentation"><a href="#tab-watchdog-logs" aria-controls="tab-watchdog-logs" role="tab" data-toggle="tab">Watchdog</a></li> |
| 24 | <li role="presentation"><a href="#tab-acme-logs" aria-controls="tab-acme-logs" role="tab" data-toggle="tab">ACME</a></li> |
| 25 | <li role="presentation"><a href="#tab-api-logs" aria-controls="tab-api-logs" role="tab" data-toggle="tab">API</a></li> |
| 26 | <li role="presentation"><a href="#tab-api-rl" aria-controls="tab-api-rl" role="tab" data-toggle="tab">Ratelimits</a></li> |
| 27 | <li role="presentation"><span class="dropdown-desc"><?=$lang['debug']['external_logs'];?></span></li> |
| 28 | <li role="presentation"><a href="#tab-rspamd-history" aria-controls="tab-rspamd-history" role="tab" data-toggle="tab">Rspamd</a></li> |
| 29 | <li role="presentation"><span class="dropdown-desc"><?=$lang['debug']['static_logs'];?></span></li> |
| 30 | <li role="presentation"><a href="#tab-ui" aria-controls="tab-ui" role="tab" data-toggle="tab">mailcow UI</a></li> |
| 31 | </ul> |
| 32 | </li> |
| 33 | </ul> |
| 34 | |
| 35 | <div class="row"> |
| 36 | <div class="col-md-12"> |
| 37 | <div class="tab-content" style="padding-top:20px"> |
| 38 | <div class="debug-log-info"><?=sprintf($lang['debug']['log_info'], getenv('LOG_LINES') + 1);?></div> |
| 39 | <?php |
| 40 | $exec_fields = array('cmd' => 'system', 'task' => 'df', 'dir' => '/var/vmail'); |
| 41 | $vmail_df = explode(',', json_decode(docker('post', 'dovecot-mailcow', 'exec', $exec_fields), true)); |
| 42 | ?> |
| 43 | <div role="tabpanel" class="tab-pane active" id="tab-containers"> |
| 44 | <div class="panel panel-default"> |
| 45 | <div class="panel-heading"> |
| 46 | <h3 class="panel-title"><?=$lang['debug']['disk_usage'];?></h3> |
| 47 | </div> |
| 48 | <div class="panel-body"> |
| 49 | <div class="row"> |
| 50 | <div class="col-sm-3"> |
| 51 | <p>/var/vmail on <?=$vmail_df[0];?></p> |
| 52 | <p><?=$vmail_df[2];?> / <?=$vmail_df[1];?> (<?=$vmail_df[4];?>)</p> |
| 53 | </div> |
| 54 | <div class="col-sm-9"> |
| 55 | <div class="progress"> |
| 56 | <div class="progress-bar progress-bar-info" role="progressbar" style="width:<?=$vmail_df[4];?>"></div> |
| 57 | </div> |
| 58 | </div> |
| 59 | </div> |
| 60 | </div> |
| 61 | </div> |
| 62 | <div class="panel panel-default"> |
| 63 | <div class="panel-heading"> |
| 64 | <h3 class="panel-title"><?=$lang['debug']['solr_status'];?></h3> |
| 65 | </div> |
| 66 | <div class="panel-body"> |
| 67 | <div class="row"> |
| 68 | <div class="col-sm-3"> |
| 69 | <p><img class="img-responsive" alt="Solr Logo" width="128px" src=" data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAABlCAYAAAAI2qyuAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAXEUAAFxFAbktYiwAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjEuNWRHWFIAABv7SURBVHhe7V0JuBxVlX4JMy6jM4qOC4rp6qWq+jW+ruoXkIjoS1d3EhYXRvNkFHFBYECUAXGAASEOyiLIrigOEpDoACIqwogLiwMSkIghYF4viSFhiUGWCAQIyXuZ/9w+3V3VdXtfee/+33e+16/uqXtv1T2n7j33nnvukIJCP7BjbOzvsgt0O5cyjsymzG9mU8YvcylzIucYT2Ydczt+7xDkGFuR/hf8XplxzHG6d20qauSSkfCSJUOzRWYKCtMBE3uZ/5hxjE9A4K+FEmwuKUFj9Nd1Y9brdwwNzco6xr10DXk8DAX77kTaXEQKx8UoKLz8AGE+D73BcxVC3zBl09HPUz6ZpOHI0kEboXhnrU3H5ogCFRQGHSvmzv17+stf/ZaVA71EppgXFO0Xcp4CYai2LZeKLs2m9BDxKygMHEg4Mynz+kzK2IP+X52KvlEmzI1SPml+kPLB8CyOXmJKxuMnYyvoG7l9Iv9E9yoo9B3Xjg/thC/8cegtnsffFyGcr6TrBWNcJsQNkGPeIjIHkO8yKU9te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3k3AupWATXFTbQLmVaymNkDSkqFKQLoGGUpGgfTZe8EbPC+4UafFHIIhn9vLIYfIGpl6toV6yAcK7+Z0Rst7D2XcSs2nWTVZmdbIm9UDCdy64UpAug2ZWCt164gx06/fgBbtnWRomNNQTuPfXES1+SiQwOm9oaEnvDmOsQOEA08QZqJN0Fq8OPY8v/LUYVjZ8OGdrWDLbLCya+s5h95Nok7vRC7+fby5BKUiPQeE+zeDICPlGURhN9DJfZVvjcijQMnydL6PogRjSnGwER8gWSfPUal8cB2tjyWzy+kUdT4Lg3ADKg9zj/yk80yYMt+7E81xAdlavQ5vSDkTU6aOgM+g4BROE+pyH9/wfZO+R9wC1CbP7QDOVtE+/SDRxwUkKHgwN/T/fvy7K4dvMgwAAAABJRU5ErkJggg==" /></p> |
| 70 | </div> |
| 71 | <div class="col-sm-9"> |
| 72 | <?php |
| 73 | if ($solr_status !== false): |
| 74 | ?> |
| 75 | <div class="progress"> |
| 76 | <div class="progress-bar progress-bar-info" role="progressbar" style="width:<?=round($solr_status['jvm']['memory']['raw']['used%']);?>%"></div> |
| 77 | </div> |
| 78 | <p><?=$lang['debug']['jvm_memory_solr'];?>: <?=$solr_status['jvm']['memory']['total'] - $solr_status['jvm']['memory']['free'];?> / <?=$solr_status['jvm']['memory']['total'];?> |
| 79 | (<?=round($solr_status['jvm']['memory']['raw']['used%']);?>%)</p> |
| 80 | <hr> |
| 81 | <p><?=$lang['debug']['solr_uptime'];?>: ~<?=round($solr_status['status']['dovecot-fts']['uptime'] / 1000 / 60 / 60);?>h</p> |
| 82 | <p><?=$lang['debug']['solr_started_at'];?>: <?=$solr_status['status']['dovecot-fts']['startTime'];?></p> |
| 83 | <p><?=$lang['debug']['solr_last_modified'];?>: <?=$solr_status['status']['dovecot-fts']['index']['lastModified'];?></p> |
| 84 | <p><?=$lang['debug']['solr_size'];?>: <?=$solr_status['status']['dovecot-fts']['index']['size'];?></p> |
| 85 | <p><?=$lang['debug']['solr_docs'];?>: <?=$solr_status['status']['dovecot-fts']['index']['numDocs'];?></p> |
| 86 | <?php |
| 87 | else: |
| 88 | ?> |
| 89 | <p><?=$lang['debug']['solr_dead'];?></p> |
| 90 | <?php |
| 91 | endif; |
| 92 | ?> |
| 93 | </div> |
| 94 | </div> |
| 95 | </div> |
| 96 | </div> |
| 97 | <div class="panel panel-default"> |
| 98 | <div class="panel-heading"> |
| 99 | <h3 class="panel-title"><?=$lang['debug']['containers_info'];?></h3> |
| 100 | </div> |
| 101 | <div class="panel-body"> |
| 102 | <ul class="list-group"> |
| 103 | <?php |
| 104 | $containers = (docker('info')); |
| 105 | ksort($containers); |
| 106 | foreach ($containers as $container => $container_info) { |
| 107 | if ($container == 'clamd-mailcow' && $clamd_status === false) { continue; } |
| 108 | if ($container == 'solr-mailcow' && $solr_status === false) { continue; } |
| 109 | ?> |
| 110 | <li class="list-group-item"> |
| 111 | <?=$container . ' (' . $container_info['Config']['Image'] . ')';?> |
| 112 | <?php |
| 113 | date_default_timezone_set('UTC'); |
| 114 | $StartedAt = date_parse($container_info['State']['StartedAt']); |
| 115 | if ($StartedAt['hour'] !== false) { |
| 116 | $date = new \DateTime(); |
| 117 | $date->setTimestamp(mktime( |
| 118 | $StartedAt['hour'], |
| 119 | $StartedAt['minute'], |
| 120 | $StartedAt['second'], |
| 121 | $StartedAt['month'], |
| 122 | $StartedAt['day'], |
| 123 | $StartedAt['year'])); |
| 124 | $user_tz = new DateTimeZone(getenv('TZ')); |
| 125 | $date->setTimezone($user_tz); |
| 126 | $started = $date->format('r'); |
| 127 | } |
| 128 | else { |
| 129 | $started = '?'; |
| 130 | } |
| 131 | ?> |
| 132 | <small>(<?=$lang['debug']['started_on'];?> <?=$started;?>), |
| 133 | <a href data-toggle="modal" data-container="<?=$container;?>" data-target="#RestartContainer"><?=$lang['debug']['restart_container'];?></a></small> |
| 134 | <span class="pull-right status-indicator label label-<?=($container_info['State'] !== false && !empty($container_info['State'])) ? (($container_info['State']['Running'] == 1) ? 'success' : 'danger') : 'default'; ?>"> </span> |
| 135 | </li> |
| 136 | <?php |
| 137 | } |
| 138 | ?> |
| 139 | </ul> |
| 140 | </div> |
| 141 | </div> |
| 142 | </div> |
| 143 | |
| 144 | <div role="tabpanel" class="tab-pane" id="tab-postfix-logs"> |
| 145 | <div class="panel panel-default"> |
| 146 | <div class="panel-heading">Postfix <span class="badge badge-info table-lines"></span> |
| 147 | <div class="btn-group pull-right"> |
| 148 | <button class="btn btn-xs btn-default add_log_lines" data-post-process="general_syslog" data-table="postfix_log" data-log-url="postfix" data-nrows="100">+ 100</button> |
| 149 | <button class="btn btn-xs btn-default add_log_lines" data-post-process="general_syslog" data-table="postfix_log" data-log-url="postfix" data-nrows="1000">+ 1000</button> |
| 150 | <button class="btn btn-xs btn-default refresh_table" data-draw="draw_postfix_logs" data-table="postfix_log"><?=$lang['admin']['refresh'];?></button> |
| 151 | </div> |
| 152 | </div> |
| 153 | <div class="panel-body"> |
| 154 | <div class="table-responsive"> |
| 155 | <table class="table table-striped table-condensed" id="postfix_log"></table> |
| 156 | </div> |
| 157 | </div> |
| 158 | </div> |
| 159 | </div> |
| 160 | |
| 161 | <div role="tabpanel" class="tab-pane" id="tab-ui"> |
| 162 | <div class="panel panel-default"> |
| 163 | <div class="panel-heading">mailcow UI <span class="badge badge-info table-lines"></span> |
| 164 | <div class="btn-group pull-right"> |
| 165 | <button class="btn btn-xs btn-default add_log_lines" data-post-process="mailcow_ui" data-table="ui_logs" data-log-url="ui" data-nrows="1000">+ 1000</button> |
| 166 | <button class="btn btn-xs btn-default add_log_lines" data-post-process="mailcow_ui" data-table="ui_logs" data-log-url="ui" data-nrows="10000">+ 10000</button> |
| 167 | <button class="btn btn-xs btn-default refresh_table" data-draw="draw_ui_logs" data-table="ui_logs"><?=$lang['admin']['refresh'];?></button> |
| 168 | </div> |
| 169 | </div> |
| 170 | <div class="panel-body"> |
| 171 | <div class="table-responsive"> |
| 172 | <table class="table table-striped table-condensed" id="ui_logs"></table> |
| 173 | </div> |
| 174 | </div> |
| 175 | </div> |
| 176 | </div> |
| 177 | |
| 178 | <div role="tabpanel" class="tab-pane" id="tab-dovecot-logs"> |
| 179 | <div class="panel panel-default"> |
| 180 | <div class="panel-heading">Dovecot <span class="badge badge-info table-lines"></span> |
| 181 | <div class="btn-group pull-right"> |
| 182 | <button class="btn btn-xs btn-default add_log_lines" data-post-process="general_syslog" data-table="dovecot_log" data-log-url="dovecot" data-nrows="100">+ 100</button> |
| 183 | <button class="btn btn-xs btn-default add_log_lines" data-post-process="general_syslog" data-table="dovecot_log" data-log-url="dovecot" data-nrows="1000">+ 1000</button> |
| 184 | <button class="btn btn-xs btn-default refresh_table" data-draw="draw_dovecot_logs" data-table="dovecot_log"><?=$lang['admin']['refresh'];?></button> |
| 185 | </div> |
| 186 | </div> |
| 187 | <div class="panel-body"> |
| 188 | <div class="table-responsive"> |
| 189 | <table class="table table-striped table-condensed" id="dovecot_log"></table> |
| 190 | </div> |
| 191 | </div> |
| 192 | </div> |
| 193 | </div> |
| 194 | |
| 195 | <div role="tabpanel" class="tab-pane" id="tab-sogo-logs"> |
| 196 | <div class="panel panel-default"> |
| 197 | <div class="panel-heading">SOGo <span class="badge badge-info table-lines"></span> |
| 198 | <div class="btn-group pull-right"> |
| 199 | <button class="btn btn-xs btn-default add_log_lines" data-post-process="general_syslog" data-table="sogo_log" data-log-url="sogo" data-nrows="100">+ 100</button> |
| 200 | <button class="btn btn-xs btn-default add_log_lines" data-post-process="general_syslog" data-table="sogo_log" data-log-url="sogo" data-nrows="1000">+ 1000</button> |
| 201 | <button class="btn btn-xs btn-default refresh_table" data-draw="draw_sogo_logs" data-table="sogo_log"><?=$lang['admin']['refresh'];?></button> |
| 202 | </div> |
| 203 | </div> |
| 204 | <div class="panel-body"> |
| 205 | <div class="table-responsive"> |
| 206 | <table class="table table-striped table-condensed" id="sogo_log"></table> |
| 207 | </div> |
| 208 | </div> |
| 209 | </div> |
| 210 | </div> |
| 211 | |
| 212 | <div role="tabpanel" class="tab-pane" id="tab-netfilter-logs"> |
| 213 | <div class="panel panel-default"> |
| 214 | <div class="panel-heading">Netfilter <span class="badge badge-info table-lines"></span> |
| 215 | <div class="btn-group pull-right"> |
| 216 | <button class="btn btn-xs btn-default add_log_lines" data-post-process="general_syslog" data-table="netfilter_log" data-log-url="netfilter" data-nrows="100">+ 100</button> |
| 217 | <button class="btn btn-xs btn-default add_log_lines" data-post-process="general_syslog" data-table="netfilter_log" data-log-url="netfilter" data-nrows="1000">+ 1000</button> |
| 218 | <button class="btn btn-xs btn-default refresh_table" data-draw="draw_netfilter_logs" data-table="netfilter_log"><?=$lang['admin']['refresh'];?></button> |
| 219 | </div> |
| 220 | </div> |
| 221 | <div class="panel-body"> |
| 222 | <div class="table-responsive"> |
| 223 | <table class="table table-striped table-condensed" id="netfilter_log"></table> |
| 224 | </div> |
| 225 | </div> |
| 226 | </div> |
| 227 | </div> |
| 228 | |
| 229 | <div role="tabpanel" class="tab-pane" id="tab-rspamd-history"> |
| 230 | <div class="panel panel-default"> |
| 231 | <div class="panel-heading">Rspamd history <span class="badge badge-info table-lines"></span> |
| 232 | <div class="btn-group pull-right"> |
| 233 | <button class="btn btn-xs btn-default add_log_lines" data-post-process="rspamd_history" data-table="rspamd_history" data-log-url="rspamd-history" data-nrows="100">+ 100</button> |
| 234 | <button class="btn btn-xs btn-default add_log_lines" data-post-process="rspamd_history" data-table="rspamd_history" data-log-url="rspamd-history" data-nrows="1000">+ 1000</button> |
| 235 | <button class="btn btn-xs btn-default refresh_table" data-draw="draw_rspamd_history" data-table="rspamd_history"><?=$lang['admin']['refresh'];?></button> |
| 236 | </div> |
| 237 | </div> |
| 238 | <div class="panel-body"> |
| 239 | <legend><?=$lang['debug']['chart_this_server'];?></legend> |
| 240 | <div id="chart-container"> |
| 241 | <canvas id="rspamd_donut" style="width:100%;height:400px"></canvas> |
| 242 | </div> |
| 243 | <legend><?=$lang['debug']['history_all_servers'];?></legend> |
| 244 | <div class="table-responsive"> |
| 245 | <table class="table table-striped table-condensed log-table" id="rspamd_history"></table> |
| 246 | </div> |
| 247 | </div> |
| 248 | </div> |
| 249 | </div> |
| 250 | |
| 251 | <div role="tabpanel" class="tab-pane" id="tab-autodiscover-logs"> |
| 252 | <div class="panel panel-default"> |
| 253 | <div class="panel-heading">Autodiscover <span class="badge badge-info table-lines"></span> |
| 254 | <div class="btn-group pull-right"> |
| 255 | <button class="btn btn-xs btn-default add_log_lines" data-post-process="autodiscover_log" data-table="autodiscover_log" data-log-url="autodiscover" data-nrows="100">+ 100</button> |
| 256 | <button class="btn btn-xs btn-default add_log_lines" data-post-process="autodiscover_log" data-table="autodiscover_log" data-log-url="autodiscover" data-nrows="1000">+ 1000</button> |
| 257 | <button class="btn btn-xs btn-default refresh_table" data-draw="draw_autodiscover_logs" data-table="autodiscover_log"><?=$lang['admin']['refresh'];?></button> |
| 258 | </div> |
| 259 | </div> |
| 260 | <div class="panel-body"> |
| 261 | <div class="table-responsive"> |
| 262 | <table class="table table-striped table-condensed" id="autodiscover_log"></table> |
| 263 | </div> |
| 264 | </div> |
| 265 | </div> |
| 266 | </div> |
| 267 | |
| 268 | <div role="tabpanel" class="tab-pane" id="tab-watchdog-logs"> |
| 269 | <div class="panel panel-default"> |
| 270 | <div class="panel-heading">Watchdog <span class="badge badge-info table-lines"></span> |
| 271 | <div class="btn-group pull-right"> |
| 272 | <button class="btn btn-xs btn-default add_log_lines" data-post-process="watchdog" data-table="watchdog_log" data-log-url="watchdog" data-nrows="100">+ 100</button> |
| 273 | <button class="btn btn-xs btn-default add_log_lines" data-post-process="watchdog" data-table="watchdog_log" data-log-url="watchdog" data-nrows="1000">+ 1000</button> |
| 274 | <button class="btn btn-xs btn-default refresh_table" data-draw="draw_watchdog_logs" data-table="watchdog_log"><?=$lang['admin']['refresh'];?></button> |
| 275 | </div> |
| 276 | </div> |
| 277 | <div class="panel-body"> |
| 278 | <div class="table-responsive"> |
| 279 | <table class="table table-striped table-condensed" id="watchdog_log"></table> |
| 280 | </div> |
| 281 | </div> |
| 282 | </div> |
| 283 | </div> |
| 284 | |
| 285 | <div role="tabpanel" class="tab-pane" id="tab-acme-logs"> |
| 286 | <div class="panel panel-default"> |
| 287 | <div class="panel-heading">ACME <span class="badge badge-info table-lines"></span> |
| 288 | <div class="btn-group pull-right"> |
| 289 | <button class="btn btn-xs btn-default add_log_lines" data-post-process="general_syslog" data-table="acme_log" data-log-url="acme" data-nrows="100">+ 100</button> |
| 290 | <button class="btn btn-xs btn-default add_log_lines" data-post-process="general_syslog" data-table="acme_log" data-log-url="acme" data-nrows="1000">+ 1000</button> |
| 291 | <button class="btn btn-xs btn-default refresh_table" data-draw="draw_acme_logs" data-table="acme_log"><?=$lang['admin']['refresh'];?></button> |
| 292 | </div> |
| 293 | </div> |
| 294 | <div class="panel-body"> |
| 295 | <div class="table-responsive"> |
| 296 | <table class="table table-striped table-condensed" id="acme_log"></table> |
| 297 | </div> |
| 298 | </div> |
| 299 | </div> |
| 300 | </div> |
| 301 | |
| 302 | <div role="tabpanel" class="tab-pane" id="tab-api-logs"> |
| 303 | <div class="panel panel-default"> |
| 304 | <div class="panel-heading">API <span class="badge badge-info table-lines"></span> |
| 305 | <div class="btn-group pull-right"> |
| 306 | <button class="btn btn-xs btn-default add_log_lines" data-post-process="apilog" data-table="api_log" data-log-url="api" data-nrows="100">+ 100</button> |
| 307 | <button class="btn btn-xs btn-default add_log_lines" data-post-process="apilog" data-table="api_log" data-log-url="api" data-nrows="1000">+ 1000</button> |
| 308 | <button class="btn btn-xs btn-default refresh_table" data-draw="draw_api_logs" data-table="api_log"><?=$lang['admin']['refresh'];?></button> |
| 309 | </div> |
| 310 | </div> |
| 311 | <div class="panel-body"> |
| 312 | <div class="table-responsive"> |
| 313 | <table class="table table-striped table-condensed" id="api_log"></table> |
| 314 | </div> |
| 315 | </div> |
| 316 | </div> |
| 317 | </div> |
| 318 | |
| 319 | <div role="tabpanel" class="tab-pane" id="tab-api-rl"> |
| 320 | <div class="panel panel-default"> |
| 321 | <div class="panel-heading">Ratelimits <span class="badge badge-info table-lines"></span> |
| 322 | <div class="btn-group pull-right"> |
| 323 | <button class="btn btn-xs btn-default add_log_lines" data-post-process="rllog" data-table="rl_log" data-log-url="ratelimited" data-nrows="100">+ 100</button> |
| 324 | <button class="btn btn-xs btn-default add_log_lines" data-post-process="rllog" data-table="rl_log" data-log-url="ratelimited" data-nrows="1000">+ 1000</button> |
| 325 | <button class="btn btn-xs btn-default refresh_table" data-draw="draw_rl_logs" data-table="rl_log"><?=$lang['admin']['refresh'];?></button> |
| 326 | </div> |
| 327 | </div> |
| 328 | <div class="panel-body"> |
| 329 | <p class="help-block"><?=$lang['admin']['hash_remove_info'];?></p> |
| 330 | <div class="table-responsive"> |
| 331 | <table class="table table-striped table-condensed" id="rl_log"></table> |
| 332 | </div> |
| 333 | </div> |
| 334 | </div> |
| 335 | </div> |
| 336 | |
| 337 | </div> <!-- /tab-content --> |
| 338 | </div> <!-- /col-md-12 --> |
| 339 | </div> <!-- /row --> |
| 340 | </div> <!-- /container --> |
| 341 | <?php |
| 342 | require_once $_SERVER['DOCUMENT_ROOT'] . '/modals/debug.php'; |
| 343 | ?> |
| 344 | <script type='text/javascript'> |
| 345 | <?php |
| 346 | $lang_admin = json_encode($lang['admin']); |
| 347 | echo "var lang = ". $lang_admin . ";\n"; |
| 348 | echo "var csrf_token = '". $_SESSION['CSRF']['TOKEN'] . "';\n"; |
| 349 | echo "var log_pagination_size = '". $LOG_PAGINATION_SIZE . "';\n"; |
| 350 | |
| 351 | ?> |
| 352 | </script> |
| 353 | <?php |
| 354 | $js_minifier->add('/web/js/site/debug.js'); |
| 355 | require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/footer.inc.php'; |
| 356 | } |
| 357 | else { |
| 358 | header('Location: /'); |
| 359 | exit(); |
| 360 | } |
| 361 | ?> |