mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-06-29 21:52:06 -07:00
Fix all issues in npm run check
This commit is contained in:
committed by
Will Greenberg
parent
27408dd64a
commit
97cbe62f42
@@ -51,7 +51,7 @@
|
||||
|
||||
<button class="flex flex-row gap-1 lg:gap-2" disabled={!ready} {onclick}>
|
||||
<span
|
||||
class="{button_class} {entry.get_num_warnings() < 1
|
||||
class="{button_class} {(entry.get_num_warnings() || 0) < 1
|
||||
? 'text-green-700 border-green-500 bg-green-200'
|
||||
: 'text-red-700 border-red-500 bg-red-200'}">{summary}</span
|
||||
>
|
||||
|
||||
@@ -81,9 +81,9 @@
|
||||
>
|
||||
</div>
|
||||
<div class="flex flex-row justify-between lg:justify-end gap-2 mt-2">
|
||||
<DownloadLink url={entry.get_pcap_url()} text="pcap" full_button="true" />
|
||||
<DownloadLink url={entry.get_qmdl_url()} text="qmdl" full_button="true" />
|
||||
<DownloadLink url={entry.get_zip_url()} text="zip" full_button="true" />
|
||||
<DownloadLink url={entry.get_pcap_url()} text="pcap" full_button />
|
||||
<DownloadLink url={entry.get_qmdl_url()} text="qmdl" full_button />
|
||||
<DownloadLink url={entry.get_zip_url()} text="zip" full_button />
|
||||
{#if current}
|
||||
<RecordingControls {server_is_recording} />
|
||||
{:else}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</table>
|
||||
<!--For smaller screens we use cards-->
|
||||
<div class="lg:hidden flex flex-col gap-4">
|
||||
{#each entries as entry, i}
|
||||
<Card {entry} current={false} {i} {server_is_recording} />
|
||||
{#each entries as entry}
|
||||
<Card {entry} current={false} {server_is_recording} />
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
@@ -72,7 +72,7 @@ export class ManifestEntry {
|
||||
get_readable_qmdl_size(): string {
|
||||
if (this.qmdl_size_bytes === 0) return '0 Bytes';
|
||||
const k = 1024;
|
||||
const dm = 2 || 2;
|
||||
const dm = 2;
|
||||
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
||||
const i = Math.floor(Math.log(this.qmdl_size_bytes) / Math.log(k));
|
||||
return `${Number.parseFloat((this.qmdl_size_bytes / k ** i).toFixed(dm))} ${sizes[i]}`;
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
|
||||
let manager: AnalysisManager = new AnalysisManager();
|
||||
let loaded = $state(false);
|
||||
let recording = $state(false);
|
||||
let entries: ManifestEntry[] = $state([]);
|
||||
let current_entry: ManifestEntry | undefined = $state(undefined);
|
||||
let system_stats: SystemStats | undefined = $state(undefined);
|
||||
@@ -23,7 +22,6 @@
|
||||
await new_manifest.set_analysis_status(manager);
|
||||
entries = new_manifest.entries;
|
||||
current_entry = new_manifest.current_entry;
|
||||
recording = current_entry !== undefined;
|
||||
|
||||
system_stats = await get_system_stats();
|
||||
loaded = true;
|
||||
@@ -34,7 +32,8 @@
|
||||
</script>
|
||||
|
||||
<div class="p-4 xl:px-8 bg-rayhunter-blue drop-shadow flex flex-row justify-between items-center">
|
||||
<img src="/rayhunter_text.png" class="h-10 xl:h-12" />
|
||||
<!-- https://www.w3.org/WAI/tutorials/images/decorative/ -->
|
||||
<img src="/rayhunter_text.png" alt="" class="h-10 xl:h-12" />
|
||||
<div class="flex flex-row gap-4">
|
||||
<a
|
||||
class="flex flex-row gap-1 group"
|
||||
@@ -87,8 +86,8 @@
|
||||
<div class="m-4 xl:mx-8 flex flex-col gap-4">
|
||||
{#if loaded}
|
||||
<div class="flex flex-col lg:flex-row gap-4">
|
||||
{#if recording}
|
||||
<Card entry={current_entry} current={true} i={0} server_is_recording={recording} />
|
||||
{#if current_entry}
|
||||
<Card entry={current_entry} current={true} server_is_recording={!!current_entry} />
|
||||
{:else}
|
||||
<div
|
||||
class="bg-red-100 border-red-100 drop-shadow p-4 flex flex-col gap-2 border rounded-md flex-1 justify-between"
|
||||
@@ -117,7 +116,7 @@
|
||||
>Rayhunter is not currently running and will not detect abnormal behavior!</span
|
||||
>
|
||||
<div class="flex flex-row justify-end mt-2">
|
||||
<RecordingControls {recording} />
|
||||
<RecordingControls server_is_recording={!!current_entry} />
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
@@ -125,13 +124,14 @@
|
||||
</div>
|
||||
<div class="flex flex-col gap-2">
|
||||
<span class="text-xl">History</span>
|
||||
<ManifestTable {entries} server_is_recording={recording} />
|
||||
<ManifestTable {entries} server_is_recording={!!current_entry} />
|
||||
</div>
|
||||
<DeleteAllButton />
|
||||
<ConfigForm />
|
||||
{:else}
|
||||
<div class="flex flex-col justify-center items-center">
|
||||
<img src="/rayhunter_orca_only.png" class="h-48 animate-spin" />
|
||||
<!-- https://www.w3.org/WAI/tutorials/images/decorative/ -->
|
||||
<img src="/rayhunter_orca_only.png" alt="" class="h-48 animate-spin" />
|
||||
<p class="text-xl">Loading...</p>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user