Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #202 from ActivityWatch/dev/last_updated_buckets_fix
Minor improvements to the Buckets and Bucket views
  • Loading branch information
johan-bjareholt committed Jun 11, 2020
2 parents 09df952 + f08a43b commit 4b08fbd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/components/InputTimeInterval.vue
Expand Up @@ -3,14 +3,14 @@ div
div
table
tr
td.pr-2
th.pr-2
label(for="mode") Interval mode:
td
select(id="mode" v-model="mode")
option(value='last_duration') Last duration
option(value='range') Date range
tr(v-if="mode == 'last_duration'")
td.pr-2
th.pr-2
label(for="duration") Show last:
td
select(id="duration" :value="duration", @change="valueChanged")
Expand All @@ -23,7 +23,7 @@ div
option(:value="12*60*60") 12h
option(:value="24*60*60") 24h
tr(v-if="mode == 'range'")
td.pr-2 Range:
th.pr-2 Range:
td
input(type="date", v-model="start", @input="valueChanged")
input(type="date", v-model="end", @input="valueChanged")
Expand Down
15 changes: 10 additions & 5 deletions src/views/Bucket.vue
Expand Up @@ -4,19 +4,24 @@ div
h3 {{ id }}
table
tr
td Type:
th Type:
td {{ bucket.type }}
tr
td Client:
th Client:
td {{ bucket.client }}
tr
td Hostname:
th Hostname:
td {{ bucket.hostname }}
tr
td Created:
th Created:
td {{ bucket.created | iso8601 }}
tr(v-if="bucket.metadata")
th First/last event:
td
| {{ bucket.metadata.start}} /
| {{ bucket.metadata.end }}
tr
td Eventcount:
th Eventcount:
td {{ eventcount }}

input-timeinterval(v-model="daterange")
Expand Down
4 changes: 4 additions & 0 deletions src/views/Buckets.vue
Expand Up @@ -13,8 +13,12 @@ div
small
| {{ data.item.hostname }}
template(v-slot:cell(last_updated)="data")
// aw-server-python
small(v-if="data.item.last_updated")
| {{ data.item.last_updated | friendlytime }}
// aw-server-rust
small(v-if="data.item.metadata.end")
| {{ data.item.metadata.end | friendlytime }}
template(v-slot:cell(actions)="data")
b-button-toolbar.float-right
b-button-group(size="sm", class="mx-1")
Expand Down

0 comments on commit 4b08fbd

Please sign in to comment.