[GSOC 19] Weekly Progress about React based WiFi Login Page with Auto-Login Feature

131 views
Skip to first unread message

Vivek Chand

unread,
May 19, 2019, 8:08:36 AM5/19/19
to OpenWISP
5.12 - 5.18
Currently working on adding Django 2.2 support to Django freeradius.
Fixed a bug related to merging of form media assets that was breaking checks and replies page.
Working on a bug related to admin actions that is yet to be resolved. After the introduction of (admin.E130) check names of the admin actions needs to be unique so simply overwriting the 'delete selected' action with custom checks isn't working. Creating an action with a different name and adding the custom checks and calling the default delete selected action inside it produces two different actions in the select menu of the admin site. The default and the custom 'delete selected', both the options are available to the user. Though removing the default 'delete selected' from the actions dict removes the default 'delete selected' from the select menu, it introduces a new bug and the 'delete selected' called inside out custom action stops working. I'm yet to figure out why.

Federico Capoano

unread,
May 19, 2019, 2:13:46 PM5/19/19
to OpenWISP
Hi Vivek,

I reviewed, tested and merged your PR. Is there anything else to be done on django-freeradius  to support django 2.2?

What is your next step?
How is the planning of issues and kanban board going?

Federico

Vivek Chand

unread,
May 20, 2019, 8:32:36 AM5/20/19
to OpenWISP
Hi Fed,
There are a few that needs to be done to support django 2.2 which I'm working on.
My next step is to add RadiusToken model to the django-freeradius.
I've planned the workflow and will add the issues to the board in a day or two.

Vivek

Vivek Chand

unread,
May 24, 2019, 12:52:34 PM5/24/19
to OpenWISP
Weekly progress 5.19-5.25 :

  • Worked on pull/235 and fixed bugs to improve support for Django 2.2
  • Worked on pull/237 and added RadiusToken to Django-freeradius along with Admin site view and tests for model and admin site view.
  • Working on issues/1 to set up a boilerplate for the project.
Next:
  • I'll be working on preparing a boilerplate, setting up ESLint, Jest with enzyme and other dependencies required for the project.
  • Will add API endpoints for the RadiusToken.
Vivek



Federico Capoano

unread,
May 24, 2019, 7:56:52 PM5/24/19
to OpenWISP
Hey Vivek,

On Fri, May 24, 2019 at 12:52 PM Vivek Chand <v.raj...@gmail.com> wrote:
Weekly progress 5.19-5.25 :

  • Worked on pull/235 and fixed bugs to improve support for Django 2.2

Reviewed
 
  • Worked on pull/237 and added RadiusToken to Django-freeradius along with Admin site view and tests for model and admin site view.

Reviewed
 
  • Working on issues/1 to set up a boilerplate for the project.

Ok
 
Next:
  • I'll be working on preparing a boilerplate, setting up ESLint, Jest with enzyme and other dependencies required for the project.

Ok
 
  • Will add API endpoints for the RadiusToken.
I don't think we need an endpoint for this, I explained what we need in the pull request.

I think the project board is still not completed, the issue list looks too short to me:

Please make sure all the important features we have to implement are listed there.

Federico
 


Vivek Chand

unread,
May 31, 2019, 6:03:51 PM5/31/19
to OpenWISP
Weekly progress 5.26-6.01 :
  • Implemented authorisation API using the RadiusToken model here.
  • I have configured my project and both the node and development server is functional. I also configured ESLint and editorconfig and Travis. I have updated the readme with instructions to install and run the project. 
  • Currently working on issues/5
Next:
  • Will work on issues/4 to discover the organization configurations and generate a config.json file and create directories for the assets.
  • Will write default configuration for the organizations, issues/8. Will take variables listed in ansible-freeitaliawifi-login-page as reference. Please suggest additions/deletions.
  • Will write some of the proxy API endpoints, issues/9.
Vivek

Federico Capoano

unread,
Jun 3, 2019, 9:29:04 PM6/3/19
to OpenWISP
Thanks for the update, we already communicated via IM and github, let me know if there's anything else you need.

Fed

--
You received this message because you are subscribed to the Google Groups "OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openwisp+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/b10783b8-6e55-49b7-9dbe-139050ab4353%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vivek Chand

unread,
Jun 9, 2019, 3:35:55 AM6/9/19
to OpenWISP
Weekly progress 6.02-6.08:
  • Made the requested changes in the django-freeradius RadiusToken which need to be reviewed here.
  • Configured Jest with Enzyme for testing purpose. here
  • Wrote default config and a script to discover the org configs. I also wrote the password reset view using the config I wrote. Opened a PR which needs to be reviewed
Next:
  • Will do the changes required in both the PRs.
  • Try to finalize the default-config for backend and write all the views.
Vivek

Federico Capoano

unread,
Jun 12, 2019, 10:30:26 AM6/12/19
to OpenWISP
Good progress Vivek,

I'm reviewing the PRs, can you add support for the RadiusToken model in openwisp-radius please?

If I merge the PR on django-freeradius for the RadiusToken model I will break openwisp-radius right now.

--
You received this message because you are subscribed to the Google Groups "OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openwisp+u...@googlegroups.com.

Vivek Chand

unread,
Jun 15, 2019, 3:22:50 AM6/15/19
to OpenWISP
Weekly progress 6.09-6.15:
PRs that needs review
  • pull/235 This PR needs to be reviewed asap as the current master branch has bugs because of last merged PR.
  • pull/52
Vivek

Federico Capoano

unread,
Jun 17, 2019, 1:56:26 PM6/17/19
to OpenWISP

Vivek Chand

unread,
Jun 21, 2019, 5:03:41 PM6/21/19
to OpenWISP
Weekly progress 6.16-6.22:
  •  Backend is almost complete, I wrote proxy endpoints for all the existing urls with with default time out of 2 seconds configurable at organization level. Also the tokens are stored in signed cookies with an expiry duration of 24hrs (If this also needs to be configurable, let me know I'll change it). Also currently user will not be automatically signed in after registration, if we want to sign him in after registration, we'll need to make changes to registration api in openwisp radius as it currently only returns auth token and not radius token. Now a view to validate user token needs to be added to the django-freeradius and openwisp-radius to validate the auth user token. Review the PR here.
  • I have configured the frontend app and and have started working on the components. Review the PR here 
 PRs that needs to be reviewed

Federico Capoano

unread,
Jun 23, 2019, 10:28:59 AM6/23/19
to OpenWISP
On Fri, Jun 21, 2019 at 5:03 PM Vivek Chand <v.raj...@gmail.com> wrote:
Weekly progress 6.16-6.22:
  •  Backend is almost complete, I wrote proxy endpoints for all the existing urls with with default time out of 2 seconds configurable at organization level. Also the tokens are stored in signed cookies with an expiry duration of 24hrs (If this also needs to be configurable, let me know I'll change it). Also currently user will not be automatically signed in after registration, if we want to sign him in after registration, we'll need to make changes to registration api in openwisp radius as it currently only returns auth token and not radius token. Now a view to validate user token needs to be added to the django-freeradius and openwisp-radius to validate the auth user token. Review the PR here.
  • I have configured the frontend app and and have started working on the components. Review the PR here 
Great, taking a look. 
Looks good, although there's one minor improvement I suggested, please take a look and let me know when ready.
 

Looks good, I will restart the travis build once https://github.com/openwisp/django-freeradius/pull/237 is merged.

Thanks
Fed

Vivek Chand

unread,
Jun 28, 2019, 5:42:50 PM6/28/19
to OpenWISP
Weekly progress 6.22-6.28:
I updated the https://github.com/openwisp/openwisp-wifi-login-pages/pull/16 with a new commit which has many file changes, so I'll be explaining all that is going on in this mail.

Firstly proxy backend is almost complete with few things remaining:
I have used deep merge to generate the org-configurations. It takes two objects and merges them into one object. When a property is defined in both the objects, the later one will take the precedence. When a property is present only in the first or the second object, it will be copied as it is. Thus when we will write new configurations, we can start that by only defining the most important properties like a slug, host etc. All other properties will be copied from the default. Also, English texts will be taken from the default which means new org config can define text only in their additional language and they will have English + additional language in the website.
For arrays found in objects, it simply takes the array in the latest object so header links, footer links etc are placed in an array and will not copy default links if not provided.

For the frontend part, I've added the following functionalities in the past week:
  • Header component is ready
  • Footer component is ready
  • Added favicon, css_path, title and logo fields to the org-configurations. If they are provided respective properties will be set for the Org. All the org will have a folder inside <root>/client/assets/ by org-slug name, and all the paths in the config file will be relative to that directory. Like for a CSS file stored in `<root>/client/assets/org1/css/index.css` css_path will be `css/index.css`.
  • Added a very basic 404 page which is rendered when the org_slug provided in the url is not found.
  • Added the registration form with all the functionalities. Things that remain in the registration form:
    • All the error are being handled perfectly but I don't know what to do on success. The backend will return auth-token on registration but what should we do on the frontend? Should I auto-login the registered user or redirect to the login page or show a page to confirm email?
    • Also, All the text in the form supports multiple languages except for response from the server. What should we do about it?
  •  Also rendering text and generating asset path is done using the functions, so there won't be a problem if we decide to make some changes in their logic in future :)
You can test the fronted by writing additional config file and starting server using `npm run start`
Register route /:org_slug/register
The build is failing as I'm not done writing the tests yet. Will update the PR with tests soon.

Vivek

Vivek Chand

unread,
Jul 13, 2019, 7:37:53 PM7/13/19
to OpenWISP
Weekly progress 6.06-6.12:
  • worked on openwisp-users/pull/80
  • worked on openwisp-users/pull/78
  • working on django-freeradius/pull/240 to fix the failing tests in openwisp_radius
  • working on openwisp radius to add the functionality to skip adding users from csv is email already exists and add user to the organization where csv file is being uploaded. Also working on tests to fix the failing build.
  • wrote tests for the Header, Footer And Registration Component. openwisp-wifi-login-pages/pull/16
  • Working on the login component currently. I need your feedback on how to proceed after registration is successful.
Vivek

Federico Capoano

unread,
Jul 15, 2019, 4:25:03 PM7/15/19
to OpenWISP
On Sat, Jul 13, 2019 at 7:37 PM Vivek Chand <v.raj...@gmail.com> wrote:
Weekly progress 6.06-6.12:
 All these PRs have been reviewed/merged.
  • Working on the login component currently. I need your feedback on how to proceed after registration is successful.
When the registration form is sent, store the password in a JS variable (make sure is a local variable and not a global variable accessible via the window object, for security), if the registration is successful you can then use the login details to trigger an automatic login. Is it clear?

Fed

Vivek Chand

unread,
Jul 19, 2019, 12:54:00 PM7/19/19
to OpenWISP
Weekly progress 6.13-6.18:

Vivek Chand

unread,
Jul 27, 2019, 3:33:10 PM7/27/19
to OpenWISP
Weekly progress 6.20-6.26:

Federico Capoano

unread,
Aug 1, 2019, 8:43:04 PM8/1/19
to OpenWISP
Thanks Vivek,

I left you one comment on your PR on openwisp-radius.

Please follow up on the points we discussed the other day during our call:

- step by step instructions in the README to install and run the frontend app 
- css: we should reuse the css of the old project (https://github.com/openwisp/ansible-freeitaliawifi-login-page) and even better, the css of the login page I passed to you privately as much as possible, because that has been battle tested for a while now and from many users

Proceed with these steps and then the remaining features asap, in the meanwhile I will be testing a local setup once you give me precise instructions to install and run the app correctly so that I can find out if there's any issue and inform you promptly so you can fix it.

Keep me informed please.

Federico

Vivek Chand

unread,
Aug 3, 2019, 7:42:24 PM8/3/19
to OpenWISP
Weekly progress 7.27-8.02:
  • Implemented the autologin feature. By default, auto-login will be true for all the orgs and if auto-login is set to false, users will be logged out once the user leaves the page.
  • Implemented the authentication in the frontend apps, first url of the organization redirects to login page if logged out and to status page if logged in.
  • implemented the status page and contact box components accourding to the stylesheet of brandfi.
  • I have updated the online instance to the lastest changes and can pe tested at  frontend
PRs pending:

Vivek Chand

unread,
Aug 10, 2019, 4:33:15 PM8/10/19
to OpenWISP
Weekly progress 8.03-8.09:
  • I added the privacy policies and terms and conditions components. here
  • Wrote tests for the status page and authentication.
  • I'm currently restyling the components, the functionalities of the app is almost complete and can be tested.

Reply all
Reply to author
Forward
0 new messages