Skip to content

Commit 170cdcd

Browse files
author
Kristan Kenney
committed
Merge branch 'webui-clear-logs' into webui-refresh-winterfell
2 parents 36b750e + ddd842f commit 170cdcd

File tree

2 files changed

+52
-21
lines changed

2 files changed

+52
-21
lines changed

web/delete/log/index.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
// Init
3+
error_reporting(NULL);
4+
session_start();
5+
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
6+
7+
// Check token
8+
if ((!isset($_GET['token'])) || ($_SESSION['token'] != $_GET['token'])) {
9+
header('location: /login/');
10+
exit();
11+
}
12+
13+
// Clear log
14+
header("Location: /list/log/");
15+
$v_username = escapeshellarg($user);
16+
exec (HESTIA_CMD."v-delete-user-log ".$v_username." ".$output, $return_var);
17+
check_return_code($return_var,$output);
18+
unset($output);
19+
20+
// Render page
21+
render_page($user, $TAB, 'list_log');
22+
23+
// Flush session messages
24+
unset($_SESSION['error_msg']);
25+
unset($_SESSION['ok_msg']);
26+
27+
exit;

web/templates/admin/list_log.html

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,31 @@
11
<div class="l-center">
2-
<div class="l-sort clearfix noselect">
3-
<div class="l-unit header" style="padding-top: 6px;">
4-
<div class="l-unit__col l-unit__col--left clearfix">
5-
<div class="text-center jump-small-top"></div>
6-
</div>
7-
8-
<div class="l-unit__col l-unit__col--right">
9-
<div class="clearfix l-unit__stat-col--left small"><b><?=__('Date')?></b></div>
10-
<div class="clearfix l-unit__stat-col--left compact"><b><?=__('Time')?></b></div>
11-
<div class="clearfix l-unit__stat-col--left wide-4"><b><?=__('Value')?></b></div>
12-
</div>
13-
</div>
14-
<div class="l-sort-toolbar clearfix">
15-
</div>
2+
<div class="l-sort clearfix noselect">
3+
<div class="l-unit-toolbar__buttonstrip">
4+
<a class="ui-button cancel" href="/list/server/"><i class="fas fa-arrow-left status-icon-blue"></i> <?=__('Back')?></a>
5+
<a href="/delete/log/?token=<?=$_SESSION['token']?>" class="ui-button cancel" title="<?=__('Clear Log')?>"><i class="fas fa-times-circle status-icon-red"></i> <?=__('Clear Log')?></a>
6+
</div>
7+
<div class="l-sort-toolbar clearfix">
8+
<table>
9+
</table>
1610
</div>
17-
<!-- /.l-sort -->
1811
</div>
12+
<!-- /.l-sort -->
13+
</div>
1914

20-
<div class="l-separator"></div>
21-
<!-- /.l-separator -->
22-
23-
24-
<div class="l-center units animated fadeIn">
15+
<div class="l-separator"></div>
16+
<!-- /.l-separator -->
17+
<div class="l-center units animated fadeIn">
18+
<div class="l-unit header table-header">
19+
<div class="l-unit__col l-unit__col--right step-top">
20+
<div>
21+
<div class="clearfix l-unit__stat-col--left compact">
22+
</div>
23+
<div class="clearfix l-unit__stat-col--left"><b><?php print __('Date');?></b></div>
24+
<div class="clearfix l-unit__stat-col--left"><b><?php print __('Time');?></b></div>
25+
<div class="clearfix l-unit__stat-col--left "><b><?php print __('Value');?></b></div>
26+
</div>
27+
</div>
28+
</div>
2529

2630
<?php
2731
foreach ($data as $key => $value) {
@@ -48,7 +52,7 @@
4852
<!-- /.l-separator -->
4953
<?}?>
5054

51-
</div>-->
55+
</div>
5256

5357
<div id="vstobjects">
5458
<div class="l-separator"></div>

0 commit comments

Comments
 (0)