Skip to content
This repository has been archived by the owner on Jun 10, 2018. It is now read-only.

Commit

Permalink
cleanup sonarqube warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kkretsch committed Dec 28, 2017
1 parent 0e30dac commit 2e0563e
Show file tree
Hide file tree
Showing 15 changed files with 172 additions and 97 deletions.
33 changes: 33 additions & 0 deletions .project
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Lggr</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.php.composer.core.builder.buildPathManagementBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.dltk.core.scriptbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.php.core.PHPNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures>
</projectDescription>
2 changes: 2 additions & 0 deletions .settings/org.eclipse.php.core.prefs
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
include_path=0;/Lggr
@@ -0,0 +1,7 @@
DefaultProjectBasePath=/Lggr
eclipse.preferences.version=1
org.eclipse.php.debug.core.use-project-settings=true
org.eclipse.php.debug.coredefaultPHP=PHP 7.2.0 (CLI)
org.eclipse.php.debug.coreoutput_encoding=UTF-8
org.eclipse.php.debug.corestop_at_first_line_string=true
org.eclipse.php.debug.coretransfer_encoding=UTF-8
2 changes: 2 additions & 0 deletions .settings/org.eclipse.php.server.core.phpServersPrefs.prefs
@@ -0,0 +1,2 @@
defaultPHPServer=Default PHP Web Server
eclipse.preferences.version=1
2 changes: 2 additions & 0 deletions .settings/org.eclipse.php.ui.prefs
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.eclipse.php.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
8 changes: 8 additions & 0 deletions .settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="php.core.component"/>
<fixed facet="php.component"/>
<installed facet="php.core.component" version="1"/>
<installed facet="php.component" version="7.1"/>
<installed facet="php.composer.component" version="1"/>
</faceted-project>
6 changes: 6 additions & 0 deletions .settings/org.sonarlint.eclipse.core.prefs
@@ -0,0 +1,6 @@
autoEnabled=true
eclipse.preferences.version=1
extraProperties=
moduleKey=lggr
projectKey=lggr
serverId=sona.myocastor.de
2 changes: 1 addition & 1 deletion archived.php
Expand Up @@ -39,7 +39,7 @@

<div class="container" id="infoheader">
<?= _('Archived') ?>, <a href="./do.php?a=exportarchive"
target="_blank">export</a> to csv.
target="_blank">export</a> to csv.
</div>

<div class="container">
Expand Down
71 changes: 42 additions & 29 deletions css/lggr.css
@@ -1,79 +1,92 @@
div#infoheader, div#liveheader, div#statsheader {
margin-top: 5em;
margin-top: 5em;
}

@-moz-keyframes spin { 100% { -moz-transform: rotate(360deg); } }
@-webkit-keyframes spin { 100% { -webkit-transform: rotate(360deg); } }
@keyframes spin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } }
@-moz-keyframes spin { 100% {
-moz-transform: rotate(360deg);
}}

@-webkit-keyframes spin { 100% {
-webkit-transform: rotate(360deg);
}}

@keyframes spin { 100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}}

div#liveheader h2 span.glyphicon-refresh {
-webkit-animation: spin 4s linear infinite;
-moz-animation: spin 4s linear infinite;
animation: spin 4s linear infinite;
-webkit-animation: spin 4s linear infinite;
-moz-animation: spin 4s linear infinite;
animation: spin 4s linear infinite;
}

.navbar-brand img {
height: 25px;
height: 25px;
}

p.lggr-level-buttons {
line-height: 250%;
line-height: 250%;
}

#tsfromto {
display: none;
display: none;
}

input.tspick {
width: 9em;
width: 9em;
}

.datarow div {
white-space: nowrap;
overflow: hidden;
white-space: nowrap;
overflow: hidden;
}

.datatitle {
font-weight: bold;
background-color: #a0a0a0;
font-weight: bold;
background-color: #a0a0a0;
}

.datarow:nth-child(even) {
background-color: #e0e0e0;
background-color: #e0e0e0;
}

.datarow:nth-child(odd) {
background-color: #c0c0c0;
background-color: #c0c0c0;
}

.datarow.freshrow {
display: none;
display: none;
}

.datarow .newlog-msg {
cursor: zoom-in;
cursor: zoom-in;
}

span.lggr-notarchived, span.lggr-archived {
cursor: pointer;
cursor: pointer;
}

span.lggr-archived {
color: #f00;
color: #f00;
}

#dialog {
max-height: 500px !important;
overflow: auto;
max-height: 500px !important;
overflow: auto;
}

h4.panel-title span {
float: right;
float: right;
}

#cloudcontainer {
width: 100%;
height: 250px;
width: 100%;
height: 250px;
}

p.debugfooter {
float: right;
color: #999999;
font-size: 75%;
float: right;
color: #999999;
font-size: 75%;
}
29 changes: 16 additions & 13 deletions css/lggr_print.css
@@ -1,33 +1,36 @@
body {
color: #000;
font-family: Verdana, Arial, sans-serif;
color: #000;
font-family: "Verdana", "Arial", sans-serif;
}

a {
color: #000;
color: #000;
}

nav.navbar, #infoheader, ul.pagination {
display: none;
display: none;
}

footer {
font-size: 10px;
font-size: 10px;
}

div.datarow {
border-bottom: 1px solid #999;
margin-bottom: 0.5em;
padding-bottom: 0.5em;
font-size: 10px;
border-bottom: 1px solid #999;
margin-bottom: .5em;
padding-bottom: .5em;
font-size: 10px;
}

code {
font-size: 10px;
font-size: 10px;
}

div.col-md-1, div.col-md-2 {
float: left;
padding-right: 2em;
float: left;
padding-right: 2em;
}

div.col-md-5 {
clear: left;
clear: left;
}
14 changes: 7 additions & 7 deletions ids.php
Expand Up @@ -6,16 +6,16 @@
<meta name="robots" content="noindex">
<style type="text/css">
body {
margin: 0;
padding: 0;
font-family: Verdana, Arial, sans-serif;
background-color: #000;
color: #f00;
margin: 0;
padding: 0;
font-family: Verdana, Arial, sans-serif;
background-color: #000;
color: #f00;
}

#wrapper {
width: 500px;
margin: 0 auto;
width: 500px;
margin: 0 auto;
}
</style>
</head>
Expand Down
30 changes: 14 additions & 16 deletions index.php
Expand Up @@ -392,26 +392,24 @@ class="glyphicon glyphicon-refresh"
<div class="col-md-2 col-xs-12">$program</div>
<div class="col-md-5 col-xs-12 newlog-msg" title="$msg"><tt>{$msg}</tt></div>
</div><!-- row -->
EOL;

} // foreach

if(0 < count($aEvents)) {
include 'tpl/containerhead.inc.php';
}

EOL;
} // foreach

if (0 < count($aEvents)) {
include 'tpl/containerhead.inc.php';
}

?>
<div id="dialog" title="Details">I'm a dialog</div>

<?php
if(!$isSearch && (0 < count($aEvents))) {
include 'tpl/paginate.inc.php';
}
<?php
if (! $isSearch && (0 < count($aEvents))) {
include 'tpl/paginate.inc.php';
}
?>

</div>

<?php
$aPerf = $l->getPerf();
require 'tpl/foot.inc.php'
?>
<?php
$aPerf = $l->getPerf();
require 'tpl/foot.inc.php'?>
8 changes: 5 additions & 3 deletions js/lggr_stat_data.php
Expand Up @@ -9,16 +9,18 @@

session_start();

define('COLORALERT', 'd9534f');

if (isset($_SESSION[LggrState::SESSIONNAME])) {
$state = $_SESSION[LggrState::SESSIONNAME];
} else {
$state = new LggrState();
} // if

$aColors = array(
'emerg' => '#d9534f',
'crit' => '#d9534f',
'err' => '#d9534f',
'emerg' => COLORALERT,
'crit' => COLORALERT,
'err' => COLORALERT,
'warning' => '#f0ad4e',
'notice' => '#337ab7',
'info' => '#5cb85c'
Expand Down
15 changes: 7 additions & 8 deletions live.php
Expand Up @@ -89,12 +89,12 @@ class="glyphicon glyphicon-pause"></span></a>

echo <<<EOL
<div class="row datarow $rowclass" data-id="{$event->id}">
<div class="col-md-2 col-xs-6 newlog-date">{$event->date}</div>
<div class="col-md-1 col-xs-2">{$event->facility}</div>
<div class="col-md-1 col-xs-2">$label</div>
<div class="col-md-1 col-xs-2">$host</div>
<div class="col-md-2 col-xs-12">$program</div>
<div class="col-md-5 col-xs-12 newlog-msg" title="$msg"><tt>{$msg}</tt></div>
<div class="col-md-2 col-xs-6 newlog-date">{$event->date}</div>
<div class="col-md-1 col-xs-2">{$event->facility}</div>
<div class="col-md-1 col-xs-2">$label</div>
<div class="col-md-1 col-xs-2">$host</div>
<div class="col-md-2 col-xs-12">$program</div>
<div class="col-md-5 col-xs-12 newlog-msg" title="$msg"><tt>{$msg}</tt></div>
</div><!-- row -->
EOL;
} // foreach
Expand All @@ -105,5 +105,4 @@ class="glyphicon glyphicon-pause"></span></a>

<?php
$aPerf = $l->getPerf();
require 'tpl/foot.inc.php'
?>
require 'tpl/foot.inc.php'?>

0 comments on commit 2e0563e

Please sign in to comment.