From d9b86af578392ba6edaf677299ed8772d4001682 Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch> Date: Fri, 20 May 2022 16:46:41 +0200 Subject: [PATCH] update admin ui --- public_html/admin/index.php | 22 ++++++++++++++-------- public_html/admin/main.css | 7 ++++--- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/public_html/admin/index.php b/public_html/admin/index.php index ebddf14..691e8de 100644 --- a/public_html/admin/index.php +++ b/public_html/admin/index.php @@ -44,10 +44,12 @@ if (!$oR->isEnabled()){ // ---------- SHOW ERRORS if(count($aHosts['_errors'])) { - $sHtml.= '<h2>Found errors</h2>' - .'<ol class="error">' - .'<li>' . implode('</li></li>', $aHosts['_errors']).'</li>' - .'</ol>' + $sHtml.= '<h2>🔔 Found errors</h2>' + .'<div class="content">' + .'<ol class="error">' + .'<li>' . implode('</li></li>', $aHosts['_errors']).'</li>' + .'</ol>' + .'</div>' ; } unset($aHosts['_errors']); @@ -55,13 +57,17 @@ if (!$oR->isEnabled()){ // ---------- LOOP OVER ALL ENTRIES $sHtml.=' + <h2>✔️ Http head tester</h2> + <div class="content"> <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> </form> + </div> <br> - <h2>Domains and their redirects</h2> + <h2>🛠️ Domains and their redirects</h2> + <div class="content"> <table class="mydatatable"><thead> <tr> @@ -76,7 +82,7 @@ if (!$oR->isEnabled()){ </thead><tbody>'; foreach($aHosts as $sHost => $aCfg){ $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>' .($aCfg['ip'] ? $aCfg['ip'] : '<span class="error">ERROR: unknown host</span>') .'</td>' @@ -107,7 +113,7 @@ if (!$oR->isEnabled()){ } } - $sHtml.='</tbody></table>' + $sHtml.='</tbody></table></div>' /* .'<h2>Config array</h2> <pre>'.print_r($aHosts, 1).'</pre>' diff --git a/public_html/admin/main.css b/public_html/admin/main.css index a24ba6c..e77811b 100644 --- a/public_html/admin/main.css +++ b/public_html/admin/main.css @@ -1,14 +1,15 @@ 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 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; } 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;} -.cfgtype-alias{color:#89a; } +.cfgtype-alias{color:#89a;} .http-301::after{color:#a55; content: ' (Moved Permanently)'} .http-307::after{color:#488; content: ' (Temporary Redirect)'} .http-308::after{color:#a95; content: ' (Permanent Redirect)'} -- GitLab