diff --git a/html/css/dark.css b/html/css/dark.css index 674a91ec13..09ebc4856d 100644 --- a/html/css/dark.css +++ b/html/css/dark.css @@ -17,3 +17,80 @@ .twitter-typeahead .tt-hint { border-color: #000 !important; } + +.pace { + -webkit-pointer-events: none; + pointer-events: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; +} + +.pace-inactive { + display: none; +} + +.pace .pace-progress { + background: #e30613; + position: fixed; + z-index: 2000; + top: 0; + right: 100%; + width: 100%; + height: 2px; +} + +.pace .pace-progress-inner { + display: block; + position: absolute; + right: 0px; + width: 100px; + height: 100%; + box-shadow: 0 0 10px #e30613, 0 0 5px #e30613; + opacity: 1.0; + -webkit-transform: rotate(3deg) translate(0px, -4px); + -moz-transform: rotate(3deg) translate(0px, -4px); + -ms-transform: rotate(3deg) translate(0px, -4px); + -o-transform: rotate(3deg) translate(0px, -4px); + transform: rotate(3deg) translate(0px, -4px); +} + +.pace .pace-activity { + display: block; + position: fixed; + z-index: 2000; + top: 16px; + right: 45px; + width: 20px; + height: 20px; + border: solid 2px transparent; + border-top-color: #e30613; + border-left-color: #e30613; + border-radius: 10px; + -webkit-animation: pace-spinner 400ms linear infinite; + -moz-animation: pace-spinner 400ms linear infinite; + -ms-animation: pace-spinner 400ms linear infinite; + -o-animation: pace-spinner 400ms linear infinite; + animation: pace-spinner 400ms linear infinite; +} + +@-webkit-keyframes pace-spinner { + 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } + 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } +} +@-moz-keyframes pace-spinner { + 0% { -moz-transform: rotate(0deg); transform: rotate(0deg); } + 100% { -moz-transform: rotate(360deg); transform: rotate(360deg); } +} +@-o-keyframes pace-spinner { + 0% { -o-transform: rotate(0deg); transform: rotate(0deg); } + 100% { -o-transform: rotate(360deg); transform: rotate(360deg); } +} +@-ms-keyframes pace-spinner { + 0% { -ms-transform: rotate(0deg); transform: rotate(0deg); } + 100% { -ms-transform: rotate(360deg); transform: rotate(360deg); } +} +@keyframes pace-spinner { + 0% { transform: rotate(0deg); transform: rotate(0deg); } + 100% { transform: rotate(360deg); transform: rotate(360deg); } +} \ No newline at end of file diff --git a/html/css/light.css b/html/css/light.css index b2c3e9747c..93f69e3363 100644 --- a/html/css/light.css +++ b/html/css/light.css @@ -14,3 +14,79 @@ color: #357ebd; } +.pace { + -webkit-pointer-events: none; + pointer-events: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; +} + +.pace-inactive { + display: none; +} + +.pace .pace-progress { + background: #29d; + position: fixed; + z-index: 2000; + top: 0; + right: 100%; + width: 100%; + height: 2px; +} + +.pace .pace-progress-inner { + display: block; + position: absolute; + right: 0px; + width: 100px; + height: 100%; + box-shadow: 0 0 10px #29d, 0 0 5px #29d; + opacity: 1.0; + -webkit-transform: rotate(3deg) translate(0px, -4px); + -moz-transform: rotate(3deg) translate(0px, -4px); + -ms-transform: rotate(3deg) translate(0px, -4px); + -o-transform: rotate(3deg) translate(0px, -4px); + transform: rotate(3deg) translate(0px, -4px); +} + +.pace .pace-activity { + display: block; + position: fixed; + z-index: 2000; + top: 16px; + right: 45px; + width: 20px; + height: 20px; + border: solid 2px transparent; + border-top-color: #29d; + border-left-color: #29d; + border-radius: 10px; + -webkit-animation: pace-spinner 400ms linear infinite; + -moz-animation: pace-spinner 400ms linear infinite; + -ms-animation: pace-spinner 400ms linear infinite; + -o-animation: pace-spinner 400ms linear infinite; + animation: pace-spinner 400ms linear infinite; +} + +@-webkit-keyframes pace-spinner { + 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } + 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } +} +@-moz-keyframes pace-spinner { + 0% { -moz-transform: rotate(0deg); transform: rotate(0deg); } + 100% { -moz-transform: rotate(360deg); transform: rotate(360deg); } +} +@-o-keyframes pace-spinner { + 0% { -o-transform: rotate(0deg); transform: rotate(0deg); } + 100% { -o-transform: rotate(360deg); transform: rotate(360deg); } +} +@-ms-keyframes pace-spinner { + 0% { -ms-transform: rotate(0deg); transform: rotate(0deg); } + 100% { -ms-transform: rotate(360deg); transform: rotate(360deg); } +} +@keyframes pace-spinner { + 0% { transform: rotate(0deg); transform: rotate(0deg); } + 100% { transform: rotate(360deg); transform: rotate(360deg); } +} \ No newline at end of file diff --git a/html/css/mono.css b/html/css/mono.css index be4bcc2624..f96590e4b4 100644 --- a/html/css/mono.css +++ b/html/css/mono.css @@ -17,3 +17,80 @@ .twitter-typeahead .tt-hint { border-color: #000 !important; } + +.pace { + -webkit-pointer-events: none; + pointer-events: none; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; +} + +.pace-inactive { + display: none; +} + +.pace .pace-progress { + background: #fff; + position: fixed; + z-index: 2000; + top: 0; + right: 100%; + width: 100%; + height: 2px; +} + +.pace .pace-progress-inner { + display: block; + position: absolute; + right: 0px; + width: 100px; + height: 100%; + box-shadow: 0 0 10px #d6cdbe, 0 0 5px #d6cdbe; + opacity: 1.0; + -webkit-transform: rotate(3deg) translate(0px, -4px); + -moz-transform: rotate(3deg) translate(0px, -4px); + -ms-transform: rotate(3deg) translate(0px, -4px); + -o-transform: rotate(3deg) translate(0px, -4px); + transform: rotate(3deg) translate(0px, -4px); +} + +.pace .pace-activity { + display: block; + position: fixed; + z-index: 2000; + top: 16px; + right: 45px; + width: 20px; + height: 20px; + border: solid 2px transparent; + border-top-color: #9a968f; + border-left-color: #9a968f; + border-radius: 10px; + -webkit-animation: pace-spinner 400ms linear infinite; + -moz-animation: pace-spinner 400ms linear infinite; + -ms-animation: pace-spinner 400ms linear infinite; + -o-animation: pace-spinner 400ms linear infinite; + animation: pace-spinner 400ms linear infinite; +} + +@-webkit-keyframes pace-spinner { + 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } + 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } +} +@-moz-keyframes pace-spinner { + 0% { -moz-transform: rotate(0deg); transform: rotate(0deg); } + 100% { -moz-transform: rotate(360deg); transform: rotate(360deg); } +} +@-o-keyframes pace-spinner { + 0% { -o-transform: rotate(0deg); transform: rotate(0deg); } + 100% { -o-transform: rotate(360deg); transform: rotate(360deg); } +} +@-ms-keyframes pace-spinner { + 0% { -ms-transform: rotate(0deg); transform: rotate(0deg); } + 100% { -ms-transform: rotate(360deg); transform: rotate(360deg); } +} +@keyframes pace-spinner { + 0% { transform: rotate(0deg); transform: rotate(0deg); } + 100% { transform: rotate(360deg); transform: rotate(360deg); } +} \ No newline at end of file diff --git a/html/images/librenms_logo.png b/html/images/librenms_logo.png index 3c999691c5..fd33619dab 100644 Binary files a/html/images/librenms_logo.png and b/html/images/librenms_logo.png differ diff --git a/html/images/librenms_logo_dark.png b/html/images/librenms_logo_dark.png index 3c999691c5..fd33619dab 100644 Binary files a/html/images/librenms_logo_dark.png and b/html/images/librenms_logo_dark.png differ diff --git a/html/images/librenms_logo_mono.png b/html/images/librenms_logo_mono.png index 3c999691c5..fd33619dab 100644 Binary files a/html/images/librenms_logo_mono.png and b/html/images/librenms_logo_mono.png differ diff --git a/html/includes/modal/delete_device_group.inc.php b/html/includes/modal/delete_device_group.inc.php index 105442935d..42e504cd97 100644 --- a/html/includes/modal/delete_device_group.inc.php +++ b/html/includes/modal/delete_device_group.inc.php @@ -41,7 +41,6 @@ if(is_admin() === false) { + '); } -$icons = array('fanspeed'=>'tachometer','humidity'=>'tint','temperature'=>'fire','current'=>'bolt','frequency'=>'line-chart','power'=>'power-off','voltage'=>'bolt'); +$icons = array('fanspeed'=>'tachometer','humidity'=>'tint','temperature'=>'fire','current'=>'bolt','frequency'=>'line-chart','power'=>'power-off','voltage'=>'bolt','charge'=>'plus-square'); foreach (array('fanspeed','humidity','temperature') as $item) { if (isset($menu_sensors[$item])) diff --git a/html/includes/table/alerts.inc.php b/html/includes/table/alerts.inc.php index f6f2aa6acb..837e30b358 100644 --- a/html/includes/table/alerts.inc.php +++ b/html/includes/table/alerts.inc.php @@ -65,22 +65,22 @@ foreach (dbFetchRows($sql,$param) as $alert) { $ico = "ok"; $col = "green"; $extra = "success"; - $msg = "OK"; + $msg = "ok"; } elseif ( (int) $alert['state'] === 1 || (int) $alert['state'] === 3 || (int) $alert['state'] === 4) { $ico = "volume-up"; $col = "red"; $extra = "danger"; - $msg = "ALERT"; + $msg = "alert"; if ( (int) $alert['state'] === 3) { - $msg = "WORSE"; + $msg = "worse"; } elseif ( (int) $alert['state'] === 4) { - $msg = "BETTER"; + $msg = "better"; } } elseif ( (int) $alert['state'] === 2) { $ico = "volume-off"; $col = "#800080"; $extra = "warning"; - $msg = "MUTED"; + $msg = "muted"; } $alert_checked = ''; $orig_ico = $ico; diff --git a/html/includes/table/syslog.inc.php b/html/includes/table/syslog.inc.php new file mode 100644 index 0000000000..ca041fe2ad --- /dev/null +++ b/html/includes/table/syslog.inc.php @@ -0,0 +1,75 @@ += ?"; + $param[] = $_POST['from']; +} +if( !empty($_POST['to']) ) { + $where .= " AND timestamp <= ?"; + $param[] = $_POST['to']; +} + +if ($_SESSION['userlevel'] >= '5') +{ + $sql = "FROM syslog AS S"; + $sql .= " WHERE ".$where; +} else { + $sql = "FROM syslog AS S, devices_perms AS P"; + $sql .= "WHERE S.device_id = P.device_id AND P.user_id = ?"; + $sql .= $where; + $param = array_merge(array($_SESSION['user_id']), $param); +} + +$count_sql = "SELECT COUNT(timestamp) $sql"; +$total = dbFetchCell($count_sql,$param); +if (empty($total)) { + $total = 0; +} + +if (!isset($sort) || empty($sort)) { + $sort = 'timestamp DESC'; +} + +$sql .= " ORDER BY $sort"; + +if (isset($current)) { + $limit_low = ($current * $rowCount) - ($rowCount); + $limit_high = $rowCount; +} + +if ($rowCount != -1) { + $sql .= " LIMIT $limit_low,$limit_high"; +} + +$sql = "SELECT S.*, DATE_FORMAT(timestamp, '%Y-%m-%d %T') AS date $sql"; + +foreach (dbFetchRows($sql,$param) as $syslog) { + $dev = device_by_id_cache($syslog['device_id']); + $response[] = array('timestamp'=>$syslog['date'], + 'device_id'=>generate_device_link($dev, shorthost($dev['hostname'])), + 'program'=>$syslog['program'], + 'msg'=>htmlspecialchars($syslog['msg'])); +} + +$output = array('current'=>$current,'rowCount'=>$rowCount,'rows'=>$response,'total'=>$total); +echo _json_encode($output); +?> diff --git a/html/index.php b/html/index.php index 71b2c0eaab..3dbb4ea57c 100644 --- a/html/index.php +++ b/html/index.php @@ -50,6 +50,13 @@ if (strpos($_SERVER['PATH_INFO'], "debug")) // Set variables $msg_box = array(); +// Check for install.inc.php +if (!file_exists('../config.php') && $_SERVER['PATH_INFO'] != '/install.php') +{ + // no config.php does so let's redirect to the install + header('Location: /install.php'); + exit; +} include("../includes/defaults.inc.php"); include("../config.php"); @@ -60,14 +67,6 @@ include("includes/vars.inc.php"); include('includes/plugins.inc.php'); Plugins::start(); -// Check for install.inc.php -if (!file_exists('../config.php') && $_SERVER['PATH_INFO'] != '/install.php') -{ - // no config.php does so let's redirect to the install - header('Location: /install.php'); - exit; -} - $runtime_start = utime(); ob_start(); @@ -150,6 +149,7 @@ if (empty($config['favicon'])) { + '); +} else { + +echo(''); + } ?> diff --git a/html/install.php b/html/install.php index 48151d7b48..3f9d319848 100644 --- a/html/install.php +++ b/html/install.php @@ -48,10 +48,10 @@ include("includes/functions.inc.php"); if($stage == 2) { $test_db = mysqli_connect($dbhost,$dbuser,$dbpass,$dbname); - if(mysqli_connect_errno($test_db)) + if(mysqli_connect_error()) { $stage = 1; - $msg = "Couldn't connect to the database, please check your details"; + $msg = "Couldn't connect to the database, please check your details
" . mysqli_connect_error(); } else { @@ -404,7 +404,6 @@ $config_file = <<<"EOD" \$config\['poller-wrapper'\]\['alerter'\] = FALSE; # Uncomment the next line to disable daily updates #\$config\['update'\] = 0; -?> EOD; if(!file_exists("../config.php")) diff --git a/html/js/pace.min.js b/html/js/pace.min.js new file mode 120000 index 0000000000..c728fea6fd --- /dev/null +++ b/html/js/pace.min.js @@ -0,0 +1 @@ +../../lib/pace/pace.min.js \ No newline at end of file diff --git a/html/pages/syslog.inc.php b/html/pages/syslog.inc.php index ed2d098116..f17cc315f7 100644 --- a/html/pages/syslog.inc.php +++ b/html/pages/syslog.inc.php @@ -1,108 +1,106 @@ = '10') { dbFetchCell("TRUNCATE TABLE `syslog`"); } +$no_refresh = TRUE; -print_optionbar_start('25'); +$param = array(); + +if ($vars['action'] == "expunge" && $_SESSION['userlevel'] >= '10') +{ + dbQuery("TRUNCATE TABLE `syslog`"); + print_message("syslog truncated"); +} $pagetitle[] = "Syslog"; - ?> -
- Syslog » - - -