Skip to content

Commit

Permalink
revert delay graph
Browse files Browse the repository at this point in the history
  • Loading branch information
victorDigital committed Dec 8, 2023
1 parent 40d70e1 commit 1b3279a
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 182 deletions.
6 changes: 1 addition & 5 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[build]
command = "npm run build"
publish = "build"


[functions."lectiodelay"]
schedule = "@hourly"
publish = "build"
116 changes: 0 additions & 116 deletions netlify/functions/lectiodelay.mjs

This file was deleted.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 0 additions & 36 deletions src/routes/api/getdelay/+server.js

This file was deleted.

24 changes: 1 addition & 23 deletions src/routes/auth/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,6 @@
console.log(`Error scanning file. Reason: ${err}`);
});
}
let delayGraphUrl = '';
let delayGraphAvailable = false;
let delay = 0;
fetch('/api/getdelay').then(res => res.json()).then(json => {
delayGraphUrl = json.imgUrl;
delay = json.delay;
console.log(delayGraphUrl);
if (delayGraphUrl !== '' && delayGraphUrl.includes('https://quickchart.io/chart?c=')) delayGraphAvailable = true;
});
</script>

<div class="flex items-center justify-center md:h-[75vh]">
Expand Down Expand Up @@ -257,19 +247,7 @@
<a class="font-medium text-blue-600 hover:underline dark:text-blue-500" href="/tos">Servicevilkår & Privatlivspolitik</a>
</p>
<div class="divider" />
<div class="flex {delayGraphAvailable ? 'justify-between' : 'justify-end'}">
{#if delayGraphAvailable}
{#key delayGraphUrl}
<div class="flex gap-2">
<img src={delayGraphUrl} alt="" class="h-12 border-2 border-base-content rounded-xl" height="44" width="91"/>
<div>
<p class="py-0 my-0 text-xs">{delay} ms</p>
<p class="py-0 my-0 text-xs text-base-content/50">gns. Lectio responstid</p>
<p class="py-0 my-0 text-xs text-base-content/50">Graf over de sidste 50 timer</p>
</div>
</div>
{/key}
{/if}
<div class="flex justify-end">
<button tabindex="0" type="submit" class="btn-primary btn group">
<p>Log ind</p>
<label class="swap {$delayed ? 'swap-active' : ''} " for="login">
Expand Down

0 comments on commit 1b3279a

Please sign in to comment.