FleetbaseFleetbase

ActivityLog

<ActivityLog> renders a feed of activity records — auto-fetches from the `activity` model, groups by day, supports date-range filtering.

<ActivityLog>

<ActivityLog> renders a feed of activity records (user and system actions). It auto-fetches activities from the activity Ember Data model, groups them by day, and includes a built-in date-range filter and refresh button.

Basic Usage

<ActivityLog @subjectId={{this.order.id}} />

This loads activities where subject_id = order.id and renders them grouped by day.

Filtering

<ActivityLog
  @subjectId={{this.order.id}}
  @causerId={{this.user.id}}
/>

Activities are loaded from the API with subject_id and/or causer_id query params plus the date-range filter the user picks.

Arguments

Filtering

ArgumentTypeDescription
@subjectIdstringFilter to activities about a specific record
@causerIdstringFilter to activities caused by a specific user

Visual

ArgumentTypeDefaultDescription
@densitystringcompactcompact or cozy
@showAvatarsbooleantrueShow user avatars
@showBadgesbooleantrueShow activity-type badges
@dateFilterButtonsarrayQuick-pick buttons for the date filter (e.g. "Last 7 days")
@autoClosebooleanClose the date picker after selection
@toggleSelectedbooleanToggle behavior on the date picker

Class Hooks

ArgumentDescription
@headerWrapperClassHeader row
@groupClassEach day group
@groupLabelClassDay label
@itemClassEach activity item

Callbacks

ArgumentSignatureDescription
@onCauserClick(causer)Called when a user link in an activity is clicked
@onSubjectClick(subject)Called when a subject link is clicked

Yielded Block

BlockPurpose
:filtersRender extra filter controls in the header

Real-World Example

{{!-- Inside an order detail overlay --}}
<ContentPanel @title="Activity Log" @open={{true}}>
  <ActivityLog
    @subjectId={{this.order.id}}
    @density="compact"
    @onCauserClick={{this.openUser}}
  />
</ContentPanel>

Source

FileDescription
addon/components/activity-log.hbsTemplate
addon/components/activity-log.jsClass — queries the activity Ember Data model
ActivityLog | Fleetbase