diff --git a/src/dashboard/components/Chart.svelte b/src/dashboard/components/Chart.svelte
index a3a1434..38fbb41 100644
--- a/src/dashboard/components/Chart.svelte
+++ b/src/dashboard/components/Chart.svelte
@@ -1,38 +1,24 @@
diff --git a/src/dashboard/components/Dev.svelte b/src/dashboard/components/Dev.svelte
index 5ac236e..23de26c 100644
--- a/src/dashboard/components/Dev.svelte
+++ b/src/dashboard/components/Dev.svelte
@@ -3,14 +3,14 @@
import day from 'dayjs'
import { range, random } from 'lodash'
- import { insertLog, normalizeTimestamp, DB } from '../../shared/db'
+ import { insertLog, normalizeTimestamp, DB, clear as clearDB } from '../../shared/db'
let loading = false
async function fill() {
try {
loading = true
- const start = day().subtract('7', 'days').valueOf()
+ const start = day().subtract(2, 'weeks').valueOf()
const end = Date.now()
for (const n of range(20)) {
const host = faker.internet.domainName()
@@ -29,8 +29,7 @@
async function clear() {
try {
loading = true
- await DB.limits.clear()
- await DB.logs.clear()
+ await clearDB()
} finally {
loading = false
}
diff --git a/src/dashboard/components/RangeChooser.svelte b/src/dashboard/components/RangeChooser.svelte
index 6fa21ed..5dd46df 100644
--- a/src/dashboard/components/RangeChooser.svelte
+++ b/src/dashboard/components/RangeChooser.svelte
@@ -29,7 +29,6 @@
}
-
diff --git a/src/dashboard/pages/Dashboard.svelte b/src/dashboard/pages/Dashboard.svelte
index e509e05..f3a6c0d 100644
--- a/src/dashboard/pages/Dashboard.svelte
+++ b/src/dashboard/pages/Dashboard.svelte
@@ -7,10 +7,11 @@
import { data, countInGroup } from '../../shared/lib'
let top = 15
- let full = 50
+ let full = 100
let loading = true
let counted = []
+ let table = []
let timeout
let start
@@ -37,13 +38,37 @@
timeout = setTimeout(calculate, 5)
}
+ $: {
+ let lastHuman = null
+ table = counted.map((entry) => {
+ const same = lastHuman === entry.human
+ if (!same) lastHuman = entry.human
+ return {
+ ...entry,
+ same,
+ }
+ })
+ }
+
onMount(calculate)
-
+
@@ -52,16 +77,16 @@
{:else if counted}
-
diff --git a/src/options/App.svelte b/src/options/App.svelte
index eec6179..7b87790 100644
--- a/src/options/App.svelte
+++ b/src/options/App.svelte
@@ -1,43 +1,85 @@
-
-
+
-
Dashboard
Top {top}
Top {full}
+Top {full}
Time Spent | Host | ||
---|---|---|---|
{human} | -{host} | +{human} | +{host} |