Skip to content
Snippets Groups Projects
Commit d9b86af5 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

update admin ui

parent 7200d2e3
No related branches found
No related tags found
No related merge requests found
...@@ -44,10 +44,12 @@ if (!$oR->isEnabled()){ ...@@ -44,10 +44,12 @@ if (!$oR->isEnabled()){
// ---------- SHOW ERRORS // ---------- SHOW ERRORS
if(count($aHosts['_errors'])) { if(count($aHosts['_errors'])) {
$sHtml.= '<h2>Found errors</h2>' $sHtml.= '<h2>🔔 Found errors</h2>'
.'<ol class="error">' .'<div class="content">'
.'<li>' . implode('</li></li>', $aHosts['_errors']).'</li>' .'<ol class="error">'
.'</ol>' .'<li>' . implode('</li></li>', $aHosts['_errors']).'</li>'
.'</ol>'
.'</div>'
; ;
} }
unset($aHosts['_errors']); unset($aHosts['_errors']);
...@@ -55,13 +57,17 @@ if (!$oR->isEnabled()){ ...@@ -55,13 +57,17 @@ if (!$oR->isEnabled()){
// ---------- LOOP OVER ALL ENTRIES // ---------- LOOP OVER ALL ENTRIES
$sHtml.=' $sHtml.='
<h2>✔️ Http head tester</h2>
<div class="content">
<form> <form>
🌐 <input type="text" name="url" size="100" value="'.$sUrl.'" /> 🌐 <input type="text" name="url" size="100" value="'.$sUrl.'" placeholder="Enter url or click a link in the table below."/>
<button>Http HEAD</button> <button>Http HEAD</button>
</form> </form>
</div>
<br> <br>
<h2>Domains and their redirects</h2> <h2>🛠️ Domains and their redirects</h2>
<div class="content">
<table class="mydatatable"><thead> <table class="mydatatable"><thead>
<tr> <tr>
...@@ -76,7 +82,7 @@ if (!$oR->isEnabled()){ ...@@ -76,7 +82,7 @@ if (!$oR->isEnabled()){
</thead><tbody>'; </thead><tbody>';
foreach($aHosts as $sHost => $aCfg){ foreach($aHosts as $sHost => $aCfg){
$sTdFirst='<tr class="cfgtype-'.$aCfg['type'].'">' $sTdFirst='<tr class="cfgtype-'.$aCfg['type'].'">'
.'<td><a href="?url=http://'.$sHost.'/">'.$sHost.'</a></td>' .'<td>🔷 <a href="?url=http://'.$sHost.'/">'.$sHost.'</a></td>'
.'<td>' .'<td>'
.($aCfg['ip'] ? $aCfg['ip'] : '<span class="error">ERROR: unknown host</span>') .($aCfg['ip'] ? $aCfg['ip'] : '<span class="error">ERROR: unknown host</span>')
.'</td>' .'</td>'
...@@ -107,7 +113,7 @@ if (!$oR->isEnabled()){ ...@@ -107,7 +113,7 @@ if (!$oR->isEnabled()){
} }
} }
$sHtml.='</tbody></table>' $sHtml.='</tbody></table></div>'
/* /*
.'<h2>Config array</h2> .'<h2>Config array</h2>
<pre>'.print_r($aHosts, 1).'</pre>' <pre>'.print_r($aHosts, 1).'</pre>'
......
a{color:royalblue;} a{color:royalblue;}
body{background: #f8f8f8; color: #234; font-family: arial;} body{background: #f8f8f8; color: #234; font-family: arial; margin: 0;}
h1{background:rgba(0,0,0,0.05); margin: 0 0 1em;; padding: 0.5em;} h1{background:rgba(0,0,0,0.05); margin: 0 0 1em;; padding: 0.5em;}
h1 a{color:#234; text-decoration: none;} h1 a{color:#234; text-decoration: none;}
h2{background:rgba(0,0,0,0.02); color:#458; margin: 0;} h2{background:rgba(0,0,0,0.02); color:#458; margin: 1em 0 0.5em; border-top: 2px solid #fff; border-left: 5px solid #fff; border-top-left-radius: 0.5em; padding: 0.5em; }
h2 a{color:#458; text-decoration: none; } h2 a{color:#458; text-decoration: none; }
pre{background: rgba(0,0,0,0.02);padding: 0.3em 1em; border: 1px solid rgba(0,0,0,0.1); margin-bottom: 2em;} pre{background: rgba(0,0,0,0.02);padding: 0.3em 1em; border: 1px solid rgba(0,0,0,0.1); margin-bottom: 2em;}
.content{margin: 0 1em;}
.error{background: #fcc;} .error{background: #fcc;}
.cfgtype-alias{color:#89a; } .cfgtype-alias{color:#89a;}
.http-301::after{color:#a55; content: ' (Moved Permanently)'} .http-301::after{color:#a55; content: ' (Moved Permanently)'}
.http-307::after{color:#488; content: ' (Temporary Redirect)'} .http-307::after{color:#488; content: ' (Temporary Redirect)'}
.http-308::after{color:#a95; content: ' (Permanent Redirect)'} .http-308::after{color:#a95; content: ' (Permanent Redirect)'}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment