Skip to content

Commit 4b08fbd

Browse files
Merge pull request #202 from ActivityWatch/dev/last_updated_buckets_fix
Minor improvements to the Buckets and Bucket views
2 parents 09df952 + f08a43b commit 4b08fbd

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

src/components/InputTimeInterval.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ div
33
div
44
table
55
tr
6-
td.pr-2
6+
th.pr-2
77
label(for="mode") Interval mode:
88
td
99
select(id="mode" v-model="mode")
1010
option(value='last_duration') Last duration
1111
option(value='range') Date range
1212
tr(v-if="mode == 'last_duration'")
13-
td.pr-2
13+
th.pr-2
1414
label(for="duration") Show last:
1515
td
1616
select(id="duration" :value="duration", @change="valueChanged")
@@ -23,7 +23,7 @@ div
2323
option(:value="12*60*60") 12h
2424
option(:value="24*60*60") 24h
2525
tr(v-if="mode == 'range'")
26-
td.pr-2 Range:
26+
th.pr-2 Range:
2727
td
2828
input(type="date", v-model="start", @input="valueChanged")
2929
input(type="date", v-model="end", @input="valueChanged")

src/views/Bucket.vue

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,24 @@ div
44
h3 {{ id }}
55
table
66
tr
7-
td Type:
7+
th Type:
88
td {{ bucket.type }}
99
tr
10-
td Client:
10+
th Client:
1111
td {{ bucket.client }}
1212
tr
13-
td Hostname:
13+
th Hostname:
1414
td {{ bucket.hostname }}
1515
tr
16-
td Created:
16+
th Created:
1717
td {{ bucket.created | iso8601 }}
18+
tr(v-if="bucket.metadata")
19+
th First/last event:
20+
td
21+
| {{ bucket.metadata.start}} /
22+
| {{ bucket.metadata.end }}
1823
tr
19-
td Eventcount:
24+
th Eventcount:
2025
td {{ eventcount }}
2126

2227
input-timeinterval(v-model="daterange")

src/views/Buckets.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@ div
1313
small
1414
| {{ data.item.hostname }}
1515
template(v-slot:cell(last_updated)="data")
16+
// aw-server-python
1617
small(v-if="data.item.last_updated")
1718
| {{ data.item.last_updated | friendlytime }}
19+
// aw-server-rust
20+
small(v-if="data.item.metadata.end")
21+
| {{ data.item.metadata.end | friendlytime }}
1822
template(v-slot:cell(actions)="data")
1923
b-button-toolbar.float-right
2024
b-button-group(size="sm", class="mx-1")

0 commit comments

Comments
 (0)