-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data dashboard GraphQL API #2077
Draft
caiosba
wants to merge
16
commits into
develop
Choose a base branch
from
epic/CV2-4111-workspace-analytics
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+1,061
−18
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…lementing one more data point
@@ -0,0 +1,267 @@ | |||
class TeamStatistics | |||
PERIODS = ['last_day', 'last_week', 'last_month', 'last_year'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've implemented the frontend period select but noticed the the ticket specifies these time windows:
- Past Week
- Past 2 Weeks
- Past Month (this is the default set)
- Past 3 Months
- Past 6 Months
- Year to Date
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
GraphQL API responsible for returning the workspace statistics for the data dashboard. Steps:
TeamType
, which returns an object of a new GraphQL typeTeamStatisticsType
TeamStatistics
, which is exposed in GraphQL by the typeTeamStatisticsType
, which implements one method for each data pointnumber_of_articles_created_by_date
number_of_articles_updated_by_date
number_of_explainers_created
number_of_fact_checks_created
number_of_published_fact_checks
number_of_fact_checks_by_rating
top_articles_sent
top_articles_tags
number_of_messages
number_of_conversations
number_of_messages_by_date
number_of_conversations_by_date
number_of_search_results_by_type
average_response_time
number_of_unique_users
number_of_total_users
number_of_returning_users
number_of_subscribers
number_of_newsletters_sent
number_of_newsletters_delivered
top_media_tags
top_requested_media_clusters
number_of_media_received_by_type
number_of_articles_sent
number_of_matched_results
References: CV2-5389, CV2-4111.
How has this been tested?
Automated tests implemented for all methods.
Checklist