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

add jquery, config file

parent ab7ef00b
No related branches found
No related tags found
No related merge requests found
public_html/javascript/inc_config.js
...@@ -4,8 +4,9 @@ ...@@ -4,8 +4,9 @@
<title>Dashboard</title> <title>Dashboard</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<meta http-equiv="refresh" content="3600"> <meta http-equiv="refresh" content="3600">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link rel="stylesheet" href="main.css"> <link rel="stylesheet" href="main.css">
<script src="javascript/functions.js" type="text/javascript"></script>
<body> <body>
<header> <header>
...@@ -15,4 +16,11 @@ ...@@ -15,4 +16,11 @@
<section id="app-section"><h2>📦 fetching...</h2></section> <section id="app-section"><h2>📦 fetching...</h2></section>
<section id="msg-section"><h2>🛎️ fetching...</h2></section> <section id="msg-section"><h2>🛎️ fetching...</h2></section>
<footer>
POC :: &copy; IML 2022
</footer>
<script src="javascript/inc_config.js" type="text/javascript"></script>
<script src="javascript/functions.js" type="text/javascript"></script>
</html> </html>
\ No newline at end of file
...@@ -15,10 +15,6 @@ const AM_RESULTS={ ...@@ -15,10 +15,6 @@ const AM_RESULTS={
3: 'error' 3: 'error'
}; };
const AM_SERVER_URL='http://localhost:8001/server/get.php?';
const AM_URLS=[
'&item=apps&appid=60b1104800798cd79b694ca6f6764c15&what=all'
];
const OUT_ID_APPS='app-section'; const OUT_ID_APPS='app-section';
...@@ -57,15 +53,17 @@ function _getSingleAppStatus(sData){ ...@@ -57,15 +53,17 @@ function _getSingleAppStatus(sData){
// ----- generate output // ----- generate output
let sReturn='<div class="app result'+ aData.meta.result +'">' let sReturn='<div class="app result'+ aData.meta.result +'">'
+'<div class="title">' +'<div class="title" onclick="$(this).next().toggle()">'
+'<span class="float-right">'+AM_RESULTS[aData.meta.result]+'</span>' +'<span class="float-right">'+AM_RESULTS[aData.meta.result]+'</span>'
+aData.meta.website +aData.meta.website
+'</div>' +'</div>'
+'<table>' ;
// age of the result data
let iAge=Math.round((new Date()).getTime() / 1000)- aData.result.ts; let iAge=Math.round((new Date()).getTime() / 1000)- aData.result.ts;
sReturn+='' sReturn+=''
+'<table class="details">'
+_appItem('Summary', 'Application status: '+ AM_RESULTS[aData.meta.result] +_appItem('Summary', 'Application status: '+ AM_RESULTS[aData.meta.result]
+ ' | Checks: ' + aData.checks.length + ' | Checks: ' + aData.checks.length
+ ' | Age: ' + iAge + ' sec' + ' | Age: ' + iAge + ' sec'
......
...@@ -19,6 +19,7 @@ body{ ...@@ -19,6 +19,7 @@ body{
font-family: verdana,arial; font-family: verdana,arial;
} }
footer{ position: fixed; bottom: 0; left: 0; width: 100%; padding: 1em; background: #eee; text-align: center;}
h1{color: var(--color-h1)} h1{color: var(--color-h1)}
h2{color: var(--color-h2)} h2{color: var(--color-h2)}
...@@ -40,7 +41,9 @@ td{vertical-align: top;} ...@@ -40,7 +41,9 @@ td{vertical-align: top;}
.float-right{float: right;} .float-right{float: right;}
.app .title{font-weight: bold; font-size: 130%; } .app .title{font-weight: bold; font-size: 130%; cursor: pointer;}
.app .details{display: none;}
.result0{background:#dfd !important; background: linear-gradient(#dfd,#beb)!important; color:#080} .result0{background:#dfd !important; background: linear-gradient(#dfd,#beb)!important; color:#080}
.result1{background:#eee !important; background: linear-gradient(#eee,#ddd)!important; color:#666;} .result1{background:#eee !important; background: linear-gradient(#eee,#ddd)!important; color:#666;}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment