Browse Source

cleanup sonarqube warnings

Kai Kretschmann 11 months ago
parent
commit
2e0563ea8b

+ 33
- 0
.project View File

@@ -0,0 +1,33 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<projectDescription>
3
+	<name>Lggr</name>
4
+	<comment></comment>
5
+	<projects>
6
+	</projects>
7
+	<buildSpec>
8
+		<buildCommand>
9
+			<name>org.eclipse.php.composer.core.builder.buildPathManagementBuilder</name>
10
+			<arguments>
11
+			</arguments>
12
+		</buildCommand>
13
+		<buildCommand>
14
+			<name>org.eclipse.wst.common.project.facet.core.builder</name>
15
+			<arguments>
16
+			</arguments>
17
+		</buildCommand>
18
+		<buildCommand>
19
+			<name>org.eclipse.wst.validation.validationbuilder</name>
20
+			<arguments>
21
+			</arguments>
22
+		</buildCommand>
23
+		<buildCommand>
24
+			<name>org.eclipse.dltk.core.scriptbuilder</name>
25
+			<arguments>
26
+			</arguments>
27
+		</buildCommand>
28
+	</buildSpec>
29
+	<natures>
30
+		<nature>org.eclipse.php.core.PHPNature</nature>
31
+		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
32
+	</natures>
33
+</projectDescription>

+ 2
- 0
.settings/org.eclipse.php.core.prefs View File

@@ -0,0 +1,2 @@
1
+eclipse.preferences.version=1
2
+include_path=0;/Lggr

+ 7
- 0
.settings/org.eclipse.php.debug.core.Debug_Process_Preferences.prefs View File

@@ -0,0 +1,7 @@
1
+DefaultProjectBasePath=/Lggr
2
+eclipse.preferences.version=1
3
+org.eclipse.php.debug.core.use-project-settings=true
4
+org.eclipse.php.debug.coredefaultPHP=PHP 7.2.0 (CLI)
5
+org.eclipse.php.debug.coreoutput_encoding=UTF-8
6
+org.eclipse.php.debug.corestop_at_first_line_string=true
7
+org.eclipse.php.debug.coretransfer_encoding=UTF-8

+ 2
- 0
.settings/org.eclipse.php.server.core.phpServersPrefs.prefs View File

@@ -0,0 +1,2 @@
1
+defaultPHPServer=Default PHP Web Server
2
+eclipse.preferences.version=1

+ 2
- 0
.settings/org.eclipse.php.ui.prefs View File

@@ -0,0 +1,2 @@
1
+eclipse.preferences.version=1
2
+org.eclipse.php.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>

+ 8
- 0
.settings/org.eclipse.wst.common.project.facet.core.xml View File

@@ -0,0 +1,8 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<faceted-project>
3
+  <fixed facet="php.core.component"/>
4
+  <fixed facet="php.component"/>
5
+  <installed facet="php.core.component" version="1"/>
6
+  <installed facet="php.component" version="7.1"/>
7
+  <installed facet="php.composer.component" version="1"/>
8
+</faceted-project>

+ 6
- 0
.settings/org.sonarlint.eclipse.core.prefs View File

@@ -0,0 +1,6 @@
1
+autoEnabled=true
2
+eclipse.preferences.version=1
3
+extraProperties=
4
+moduleKey=lggr
5
+projectKey=lggr
6
+serverId=sona.myocastor.de

+ 1
- 1
archived.php View File

@@ -39,7 +39,7 @@ require 'tpl/nav.inc.php';
39 39
 
40 40
 <div class="container" id="infoheader">
41 41
 	<?= _('Archived') ?>, <a href="./do.php?a=exportarchive"
42
-		target="_blank">export</a> to csv.
42
+        target="_blank">export</a> to csv.
43 43
 </div>
44 44
 
45 45
 <div class="container">

+ 42
- 29
css/lggr.css View File

@@ -1,79 +1,92 @@
1 1
 div#infoheader, div#liveheader, div#statsheader {
2
-  margin-top: 5em;
2
+    margin-top: 5em;
3 3
 }
4 4
 
5
-@-moz-keyframes spin { 100% { -moz-transform: rotate(360deg); } }
6
-@-webkit-keyframes spin { 100% { -webkit-transform: rotate(360deg); } }
7
-@keyframes spin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } }
5
+@-moz-keyframes spin { 100% {
6
+    -moz-transform: rotate(360deg);
7
+}}
8
+
9
+@-webkit-keyframes spin { 100% {
10
+    -webkit-transform: rotate(360deg);
11
+}}
12
+
13
+@keyframes spin { 100% {
14
+    -webkit-transform: rotate(360deg);
15
+    transform: rotate(360deg);
16
+}}
17
+
8 18
 div#liveheader h2 span.glyphicon-refresh {
9
-  -webkit-animation: spin 4s linear infinite;
10
-  -moz-animation: spin 4s linear infinite;
11
-  animation: spin 4s linear infinite;
19
+    -webkit-animation: spin 4s linear infinite;
20
+    -moz-animation: spin 4s linear infinite;
21
+    animation: spin 4s linear infinite;
12 22
 }
13 23
 
14 24
 .navbar-brand img {
15
-  height: 25px;
25
+    height: 25px;
16 26
 }
17 27
 
18 28
 p.lggr-level-buttons {
19
-  line-height: 250%;
29
+    line-height: 250%;
20 30
 }
21 31
 
22 32
 #tsfromto {
23
-  display: none;
33
+    display: none;
24 34
 }
35
+
25 36
 input.tspick {
26
-  width: 9em;
37
+    width: 9em;
27 38
 }
28 39
 
29 40
 .datarow div {
30
-  white-space: nowrap;
31
-  overflow: hidden;
41
+    white-space: nowrap;
42
+    overflow: hidden;
32 43
 }
33 44
 
34 45
 .datatitle {
35
-  font-weight: bold;
36
-  background-color: #a0a0a0;
46
+    font-weight: bold;
47
+    background-color: #a0a0a0;
37 48
 }
38 49
 
39 50
 .datarow:nth-child(even) {
40
-  background-color: #e0e0e0;
51
+    background-color: #e0e0e0;
41 52
 }
53
+
42 54
 .datarow:nth-child(odd) {
43
-  background-color: #c0c0c0;
55
+    background-color: #c0c0c0;
44 56
 }
45 57
 
46 58
 .datarow.freshrow {
47
-  display: none;
59
+    display: none;
48 60
 }
49 61
 
50 62
 .datarow .newlog-msg {
51
-  cursor: zoom-in;
63
+    cursor: zoom-in;
52 64
 }
53 65
 
54 66
 span.lggr-notarchived, span.lggr-archived {
55
-	cursor: pointer;
67
+    cursor: pointer;
56 68
 }
69
+
57 70
 span.lggr-archived {
58
-	color: #f00;
71
+    color: #f00;
59 72
 }
60 73
 
61 74
 #dialog {
62
-	max-height: 500px !important;
63
-	overflow: auto;
75
+    max-height: 500px !important;
76
+    overflow: auto;
64 77
 }
65 78
 
66 79
 h4.panel-title span {
67
-	float: right;
80
+    float: right;
68 81
 }
69 82
 
70 83
 #cloudcontainer {
71
-	width: 100%;
72
-	height: 250px;
84
+    width: 100%;
85
+    height: 250px;
73 86
 }
74 87
 
75 88
 p.debugfooter {
76
-	float: right;
77
-	color: #999999;
78
-	font-size: 75%;
89
+    float: right;
90
+    color: #999999;
91
+    font-size: 75%;
79 92
 }

+ 16
- 13
css/lggr_print.css View File

@@ -1,33 +1,36 @@
1 1
 body {
2
-	color: #000;
3
-	font-family: Verdana, Arial, sans-serif;
2
+    color: #000;
3
+    font-family: "Verdana", "Arial", sans-serif;
4 4
 }
5 5
 
6 6
 a {
7
-	color: #000;
7
+    color: #000;
8 8
 }
9 9
 
10 10
 nav.navbar, #infoheader, ul.pagination {
11
-	display: none;
11
+    display: none;
12 12
 }
13
+
13 14
 footer {
14
-	font-size: 10px;
15
+    font-size: 10px;
15 16
 }
16 17
 
17 18
 div.datarow {
18
-	border-bottom: 1px solid #999;
19
-	margin-bottom: 0.5em;
20
-	padding-bottom: 0.5em;
21
-	font-size: 10px;
19
+    border-bottom: 1px solid #999;
20
+    margin-bottom: .5em;
21
+    padding-bottom: .5em;
22
+    font-size: 10px;
22 23
 }
24
+
23 25
 code {
24
-	font-size: 10px;
26
+    font-size: 10px;
25 27
 }
26 28
 
27 29
 div.col-md-1, div.col-md-2 {
28
-	float: left;
29
-	padding-right: 2em;
30
+    float: left;
31
+    padding-right: 2em;
30 32
 }
33
+
31 34
 div.col-md-5 {
32
-	clear: left;
35
+    clear: left;
33 36
 }

+ 7
- 7
ids.php View File

@@ -6,16 +6,16 @@
6 6
 <meta name="robots" content="noindex">
7 7
 <style type="text/css">
8 8
 body {
9
-	margin: 0;
10
-	padding: 0;
11
-	font-family: Verdana, Arial, sans-serif;
12
-	background-color: #000;
13
-	color: #f00;
9
+    margin: 0;
10
+    padding: 0;
11
+    font-family: Verdana, Arial, sans-serif;
12
+    background-color: #000;
13
+    color: #f00;
14 14
 }
15 15
 
16 16
 #wrapper {
17
-	width: 500px;
18
-	margin: 0 auto;
17
+    width: 500px;
18
+    margin: 0 auto;
19 19
 }
20 20
 </style>
21 21
 </head>

+ 14
- 16
index.php View File

@@ -392,26 +392,24 @@ foreach ($aEvents as $event) {
392 392
 	<div class="col-md-2 col-xs-12">$program</div>
393 393
 	<div class="col-md-5 col-xs-12 newlog-msg" title="$msg"><tt>{$msg}</tt></div>
394 394
 </div><!-- row -->
395
-EOL;
396
-
397
-} // foreach
398
-
399
-if(0 < count($aEvents)) {
400
-	include 'tpl/containerhead.inc.php';
401
-}
402
-
395
+EOL;
396
+} // foreach
397
+
398
+if (0 < count($aEvents)) {
399
+    include 'tpl/containerhead.inc.php';
400
+}
401
+
403 402
 ?>
404 403
 <div id="dialog" title="Details">I'm a dialog</div>
405 404
 
406
-<?php
407
-if(!$isSearch && (0 < count($aEvents))) {
408
-	include 'tpl/paginate.inc.php';
409
-}
405
+<?php
406
+if (! $isSearch && (0 < count($aEvents))) {
407
+    include 'tpl/paginate.inc.php';
408
+}
410 409
 ?>
411 410
 
412 411
 </div>
413 412
 
414
-<?php
415
-$aPerf = $l->getPerf();
416
-require 'tpl/foot.inc.php'
417
-?>
413
+<?php
414
+$aPerf = $l->getPerf();
415
+require 'tpl/foot.inc.php'?>

+ 5
- 3
js/lggr_stat_data.php View File

@@ -9,6 +9,8 @@ $searchvalue = '';
9 9
 
10 10
 session_start();
11 11
 
12
+define('COLORALERT', 'd9534f');
13
+
12 14
 if (isset($_SESSION[LggrState::SESSIONNAME])) {
13 15
     $state = $_SESSION[LggrState::SESSIONNAME];
14 16
 } else {
@@ -16,9 +18,9 @@ if (isset($_SESSION[LggrState::SESSIONNAME])) {
16 18
 } // if
17 19
 
18 20
 $aColors = array(
19
-    'emerg' => '#d9534f',
20
-    'crit' => '#d9534f',
21
-    'err' => '#d9534f',
21
+    'emerg' => COLORALERT,
22
+    'crit' => COLORALERT,
23
+    'err' => COLORALERT,
22 24
     'warning' => '#f0ad4e',
23 25
     'notice' => '#337ab7',
24 26
     'info' => '#5cb85c'

+ 7
- 8
live.php View File

@@ -89,12 +89,12 @@ foreach ($aEvents as $event) {
89 89
     
90 90
     echo <<<EOL
91 91
 <div class="row datarow $rowclass" data-id="{$event->id}">
92
-	<div class="col-md-2 col-xs-6 newlog-date">{$event->date}</div>
93
-	<div class="col-md-1 col-xs-2">{$event->facility}</div>
94
-	<div class="col-md-1 col-xs-2">$label</div>
95
-	<div class="col-md-1 col-xs-2">$host</div>
96
-	<div class="col-md-2 col-xs-12">$program</div>
97
-	<div class="col-md-5 col-xs-12 newlog-msg" title="$msg"><tt>{$msg}</tt></div>
92
+    <div class="col-md-2 col-xs-6 newlog-date">{$event->date}</div>
93
+    <div class="col-md-1 col-xs-2">{$event->facility}</div>
94
+    <div class="col-md-1 col-xs-2">$label</div>
95
+    <div class="col-md-1 col-xs-2">$host</div>
96
+    <div class="col-md-2 col-xs-12">$program</div>
97
+    <div class="col-md-5 col-xs-12 newlog-msg" title="$msg"><tt>{$msg}</tt></div>
98 98
 </div><!-- row -->
99 99
 EOL;
100 100
 } // foreach
@@ -105,5 +105,4 @@ EOL;
105 105
 
106 106
 <?php
107 107
 $aPerf = $l->getPerf();
108
-require 'tpl/foot.inc.php'
109
-?>
108
+require 'tpl/foot.inc.php'?>

+ 20
- 20
tpl/head.inc.php View File

@@ -14,15 +14,15 @@ if (defined('TITLE')) {
14 14
     <title>Lggr.io <?= $title ?></title>
15 15
 <!-- Bootstrap -->
16 16
 <link href="<?= $config->getUrlBootstrap() ?>css/bootstrap.min.css"
17
-	rel="stylesheet" media="screen">
17
+    rel="stylesheet" media="screen">
18 18
 <link rel="stylesheet"
19
-	href="<?= $config->getUrlJqueryui() ?>themes/smoothness/jquery-ui.css"
20
-	media="screen">
19
+    href="<?= $config->getUrlJqueryui() ?>themes/smoothness/jquery-ui.css"
20
+    media="screen">
21 21
 <link rel="stylesheet"
22
-	href="<?= $config->getUrlJAtimepicker() ?>jquery-ui-timepicker-addon.min.css"
23
-	media="screen">
22
+    href="<?= $config->getUrlJAtimepicker() ?>jquery-ui-timepicker-addon.min.css"
23
+    media="screen">
24 24
 <link rel="stylesheet"
25
-	href="<?= $config->getUrlJQCloud() ?>jqcloud.min.css" media="screen">
25
+    href="<?= $config->getUrlJQCloud() ?>jqcloud.min.css" media="screen">
26 26
 <link href="css/lggr.css" rel="stylesheet" media="screen">
27 27
 <link href="css/lggr_print.css" rel="stylesheet" media="print">
28 28
 <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
@@ -32,33 +32,33 @@ if (defined('TITLE')) {
32 32
       <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
33 33
     <![endif]-->
34 34
 <link rel="apple-touch-icon" sizes="57x57"
35
-	href="/icos/apple-touch-icon-57x57.png">
35
+    href="/icos/apple-touch-icon-57x57.png">
36 36
 <link rel="apple-touch-icon" sizes="60x60"
37
-	href="/icos/apple-touch-icon-60x60.png">
37
+    href="/icos/apple-touch-icon-60x60.png">
38 38
 <link rel="apple-touch-icon" sizes="72x72"
39
-	href="/icos/apple-touch-icon-72x72.png">
39
+    href="/icos/apple-touch-icon-72x72.png">
40 40
 <link rel="apple-touch-icon" sizes="76x76"
41
-	href="/icos/apple-touch-icon-76x76.png">
41
+    href="/icos/apple-touch-icon-76x76.png">
42 42
 <link rel="apple-touch-icon" sizes="114x114"
43
-	href="/icos/apple-touch-icon-114x114.png">
43
+    href="/icos/apple-touch-icon-114x114.png">
44 44
 <link rel="apple-touch-icon" sizes="120x120"
45
-	href="/icos/apple-touch-icon-120x120.png">
45
+    href="/icos/apple-touch-icon-120x120.png">
46 46
 <link rel="apple-touch-icon" sizes="144x144"
47
-	href="/icos/apple-touch-icon-144x144.png">
47
+    href="/icos/apple-touch-icon-144x144.png">
48 48
 <link rel="apple-touch-icon" sizes="152x152"
49
-	href="/icos/apple-touch-icon-152x152.png">
49
+    href="/icos/apple-touch-icon-152x152.png">
50 50
 <link rel="apple-touch-icon" sizes="180x180"
51
-	href="/icos/apple-touch-icon-180x180.png">
51
+    href="/icos/apple-touch-icon-180x180.png">
52 52
 <link rel="icon" type="image/png" href="/icos/favicon-32x32.png"
53
-	sizes="32x32">
53
+    sizes="32x32">
54 54
 <link rel="icon" type="image/png" href="/icos/favicon-194x194.png"
55
-	sizes="194x194">
55
+    sizes="194x194">
56 56
 <link rel="icon" type="image/png" href="/icos/favicon-96x96.png"
57
-	sizes="96x96">
57
+    sizes="96x96">
58 58
 <link rel="icon" type="image/png"
59
-	href="/icos/android-chrome-192x192.png" sizes="192x192">
59
+    href="/icos/android-chrome-192x192.png" sizes="192x192">
60 60
 <link rel="icon" type="image/png" href="/icos/favicon-16x16.png"
61
-	sizes="16x16">
61
+    sizes="16x16">
62 62
 <link rel="manifest" href="/icos/manifest.json">
63 63
 <meta name="msapplication-TileColor" content="#ffc40d">
64 64
 <meta name="msapplication-TileImage" content="/icos/mstile-144x144.png">

Loading…
Cancel
Save
Social stuff:
Mastodon