Skip to content
This repository has been archived by the owner on Jun 12, 2018. It is now read-only.

Commit

Permalink
Add inbound and outbound uniques to default metrics.
Browse files Browse the repository at this point in the history
  • Loading branch information
hodgestar committed Mar 7, 2016
1 parent 8189d18 commit 0f8374e
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions go/conversation/view_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,18 @@ def build_layout(self, conversation):
'time_range': '1d',
'name': 'Messages Received (24h)',
'target': metrics.get('messages_received').get_target_spec(),
}, {
'type': 'diamondash.widgets.lvalue.LValueWidget',
'time_range': '1d',
'name': 'Unique Recipients (24h)',
'target': metrics.get(
'outbound_unique_addresses').get_target_spec(),
}, {
'type': 'diamondash.widgets.lvalue.LValueWidget',
'time_range': '1d',
'name': 'Unique Senders (24h)',
'target': metrics.get(
'inbound_unique_addresses').get_target_spec(),
}, 'new_row', {
'type': 'diamondash.widgets.graph.GraphWidget',
'name': 'Messages Sent and Received (24h)',
Expand All @@ -761,6 +773,36 @@ def build_layout(self, conversation):
'name': 'Messages Received',
'target': metrics.get('messages_received').get_target_spec(),
}]
}, 'new_row', {
'type': 'diamondash.widgets.graph.GraphWidget',
'name': 'Unique Recipients and Senders (24h)',
'width': 6,
'time_range': '24h',
'bucket_size': '15m',
'metrics': [{
'name': 'Unique Recipients',
'target': metrics.get(
'outbound_unique_addresses').get_target_spec(),
}, {
'name': 'Unique Senders',
'target': metrics.get(
'inbound_unique_addresses').get_target_spec(),
}]
}, {
'type': 'diamondash.widgets.graph.GraphWidget',
'name': 'Unique Recipients and Senders (30d)',
'width': 6,
'time_range': '30d',
'bucket_size': '1d',
'metrics': [{
'name': 'Unique Recipients',
'target': metrics.get(
'outbound_unique_addresses').get_target_spec(),
}, {
'name': 'Unique Senders',
'target': metrics.get(
'inbound_unique_addresses').get_target_spec(),
}]
}])

def on_error(self, e, exc_info):
Expand Down

0 comments on commit 0f8374e

Please sign in to comment.