-
Notifications
You must be signed in to change notification settings - Fork 177
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
[Login] Summary Statistics #9518
[Login] Summary Statistics #9518
Conversation
The configuration for the summary statistics is currently done in two ways:
I had really liked the datadict integration, but after finishing I tried to test out some queries that we have on CCNA and realized they weren't possible. For instance, getting the distinct amount of sites with sessions for each project. I then added the ability to add SQL patches, which is a lot more simple. This PR needs discussion on whether I should just stick with the SQL files, or also keep the ability to pin queries from the DQT before I continue work on this. |
From loris meeting Jan 7:
|
…com/skarya22/Loris into 2024_12_20_Login_Summary_Statistics
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.
LGTM
color: '#104985', | ||
}} | ||
> | ||
{statistic.Value.toLocaleString('fr-CA')}{' '} |
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.
What is this hardcoded fr-CA for?
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.
This is for showing numbers as: 100 000
instead of 100000
* @author Saagar Arya | ||
* @version 1.0.0 | ||
*/ | ||
class SummaryStatistics extends Component { |
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'm not going to block over it but I don't think it's a good idea to be making new class based components.
@@ -0,0 +1,16 @@ | |||
DROP TABLE IF EXISTS Login_Summary_Statistics; |
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.
Don't drop tables in release patches. If something needs to be dropped (doesn't seem to be since it's created below), it should go in a cleanup patch.
ALTER TABLE Project | ||
ADD COLUMN showSummaryOnLogin BOOLEAN DEFAULT TRUE; | ||
|
||
UPDATE Project SET showSummaryOnLogin = FALSE WHERE Name = 'DCP'; |
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.
What is this?
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.
the show showSummaryOnLogin
column is for projects to be able to opt-out from being displayed on the login page, and then DCP is added as an example of how to do that in raisinbread
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.
But this patch is going to the release patch, not raisinbread. Can you remove this RB specific line?
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.
see comments
ALTER TABLE Project | ||
ADD COLUMN showSummaryOnLogin BOOLEAN DEFAULT TRUE; | ||
|
||
UPDATE Project SET showSummaryOnLogin = FALSE WHERE Name = 'DCP'; |
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.
But this patch is going to the release patch, not raisinbread. Can you remove this RB specific line?
Brief summary of changes
showSummaryOnLogin
as true in the Project database table.tools/update_login_summary_statistics.php
. It must be run for the data in the summary to be updated. Can be added to a project's nightly cron, or at each releaseTesting instructions (if applicable)
SQL/Login_Summary_Statistics
have appeared.Male Participant
instead ofMale Participants
).showSummaryOnLogin
= FALSE in the Project SQL table.project/tools/Login_Summary_Statistics
and see that the default queries have disappeared as it is now overridden.01_Site.txt
CCNA OVERRIDE PR