-
-
Notifications
You must be signed in to change notification settings - Fork 56
compute top page origins for each collection #2483
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
Conversation
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.
Looks good!
A few thoughts:
- I think "Domains" makes sense here as more lay-friendly language than "Origins"
- Will leave table styling comments to Sua, but tab-separated does seem to visually fit in with the kind of minimalist sidebar we have going
- We seem to need a way to populate this. In the past we've had migrations (e.g. 0037) recalculate these stats across all orgs after modifying collections in some way, we could do that again or add an API endpoint to recalculate all of the collection stats in a background job?
origin: str | ||
count: int | ||
|
||
|
||
# ============================================================================ | ||
class Collection(BaseMongoModel): |
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.
Should we include topPageOrigins
in the base Collection model too, since we're storing it there? Might be useful for e.g. org import/export to have it on the base model.
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.
Yeah, perhaps can rename this to domains internally too? We can strip out the https:// with the regex too, but maybe useful to keep since RWP does treat them separately..
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.
Yeah not a bad idea to rename internally, and I would keep the prefix I think
dc26da4
to
25cfe61
Compare
Should this be available in public collections as well? Looks like If it's only meant to be internal for now, seems like it could live in a "Stats" tab? |
Yes, I think it should be available in public collections as well. We could also use some tests to ensure this data is computed and returned as expected. |
- compute as part of existing collection stats compute - store top 10 results in collection - display in collection About sidebar
add migration to compute topPageHosts for all collections
11c9ec5
to
5c81dc0
Compare
@@ -32,7 +32,7 @@ | |||
) = PageOps = BackgroundJobOps = object | |||
|
|||
|
|||
CURR_DB_VERSION = "0043" | |||
CURR_DB_VERSION = "0044" |
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.
Looks like maybe the migration that goes with this version bump hasn't been committed?
Could still use some tests as well, especially with the changes made. Otherwise it's working well in testing! |
Added tests and migration file |
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.
Thanks! :)
It would be useful to have one/some of the following mainly for statistics eg. or to see if you have met success criteria’s for projects/clients/use cases:
maybe a complete simple list to download with pages pr. Domain or a just a view of total domains in the GUI
|
A quick PR to fix #2482:
Screenshot:
Notes: