Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Is there any way to create my own views or modify the Login History report page?
Comment | File | Size | Author |
---|---|---|---|
#13 | interdiff-27227711-9-13.txt | 270 bytes | johnnydarkko |
#13 | login_history_views_integration-27227711-13.patch | 2.54 KB | johnnydarkko |
#9 | login_history_views_integration_2727711_9.patch | 2.92 KB | nkoporec |
#7 | interdiff-5-7.txt | 463 bytes | Prashant.c |
#7 | 2727711-7.patch | 2.64 KB | Prashant.c |
Comments
Comment #2
VBN CreditAttribution: VBN as a volunteer commentedAny information?
Comment #3
star-szr@VBN there's no views integration right now for the 8.x version. The 7.x version has a patch for this. I haven't looked at the Views API in D8 to know how/similar different it may be. Patches are welcome :)
Comment #4
DarkstarTom CreditAttribution: DarkstarTom commentedI was very interested in this module until I found there was no views integration. Please add this, thanks!
Comment #5
gnugetHere a patch with the integration.
Comment #6
Prashant.c@gnuget
Great initiative, your patch applies cleanly but it does not seem to be working.
It does not create new group in the views called "Login History" therefore fields are also not available in the views.
Module version : 8.x-1.x
Drupal core version: 8.6.x
Comment #7
Prashant.c@gnuget
Nice work..!!
Sorry my bad i was testing without clearing the cache :).
I tested it again and it works fine, group is also created while creating the view and fields are also available and working fine.
I have made changes to the views group name changing it to
Login History
the patch for consistency purpose and more clarification for the developers/users while creating views for Login history.Thanks.
Comment #8
gnugetHi.
I just reused the same comments from the D7 version thanks for improvement.
If it worked for you, can you please change the status to RTBC?
Thanks!
Comment #9
nkoporecTested the patch, although the patch works as described there is coding standard issues.It's common practice that all views hooks should be implemented in views.inc file.Applying a new patch which moves the code in views.inc file.
Comment #10
Janez Zibelnik CreditAttribution: Janez Zibelnik at Agiledrop - Your Trusted Drupal Teammates commentedTested the patch provided by @nkoporec. Works as expected.
Comment #11
gnugetIt is almost ready, just needs an extra empty line at the end of the file.
Comment #12
Prashant.c@gnuget
Please make the change then we can put the issue into RTBC and wait for the maintainers of the module for their review and commit.
Comment #13
johnnydarkko CreditAttribution: johnnydarkko at Sage Tree Solutions commentedHere's a reroll of the patch from #9 with the coding standards fix suggested in #11.
Updating the status to RTBC as requested in #12.
Comment #14
brooke_heaton CreditAttribution: brooke_heaton commentedI'm a bit confused on this patch. I have a view of users and want to display their login history however I:
Am I doing something wrong, or is the views integration limited to just login data?
Comment #15
brooke_heaton CreditAttribution: brooke_heaton commentedOk, so I think we really need to add a relationship handler to this module. It should be possible to add a Relationship to Login History when displaying users. I'm not sure if we need a full plugin here or just a hook_views_data_alter like thus:
Comment #16
KapilV CreditAttribution: KapilV as a volunteer and at OpenSense Labs commentedComment #17
jcnventura CreditAttribution: jcnventura at 1xINTERNET commentedRTBC++
Comment #19
jcnventura CreditAttribution: jcnventura at 1xINTERNET commented