-
Notifications
You must be signed in to change notification settings - Fork 293
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
OpenVPN Monitor Enhancements #41
base: master
Are you sure you want to change the base?
Conversation
Update instructions to include details of configuration items. Added requirements for raspberryPi Added Alias commands to apache site conf to allow local images to display correctly Acknowledgements for improvement plugins
I have reviewed all codacy bot detections and corrected where possible. For info. Most of the detections are related to the fact that the Control.FullScreen.js file is a plugin, and therefore it has a lot of undefined detections. These are all false as the Leaflet variables are obviously called elsewhere If you are happy with the changes and additions i have made, im also keen to introduce a detection system for update availability on GitHub, and a click to update function. Basically, headless once the server is deployed and control is from the web interface |
Hi, thanks for PR! :) For an quick initial review, it should be possible to use JS links from https://cdnjs.com/ instead of copying JS into the project. See how the other JS and CSS has been done so far. That should also reduce the codacy issues. There were also some minor quantifiedcode issues raised: https://www.quantifiedcode.com/app/project/gh:furlongm:openvpn-monitor/diff/4127f2f103550bb75d481bee8074043fbe8103b4/bb486ed8509e90b7c36f1c2ad3fdaab5f9a993f9/issues For using openvpn-monitor.conf.example , we would have to ensure that this does not break the pip install as it currently does. Would it be possible to break each piece into a smaller single commit? That might make reviewing easier. |
Will work through it and update this once done. Looks like the Spidery is not on cdnjs atm so ill see if we can get it up there |
Could add #noqa for the URL line too long issues? |
Thanks for the tip - added # noqa: E501 to the cdnjs affected lines - tests now passing |
Cool 👍 Could you squash all commits into one, and reset to 7c2b637 ? Then submit smaller pull requests based on added functionality, bugfix per patch etc... (e.g. with |
Unfortunately new to this github thing - might need a bit more to go on than that. How can You submit smaller pull requests when all changes are in the one file? |
git squash COMMIT |
Upload required files to allow: Fullscreen maps Closeby icon management Markers for Server and Monitor. Route lines for connections between client/server Set FavIcon Layer management for markers Correct Variable Capitilization Update README.md Correct Alias for JS and CSS (copy paste issue) Update Control.FullScreen.js Update setup.py Fix Trailing whitespace Update openvpn-monitor.py Fix indent with tab not spaces Update Control.FullScreen.js fix Strings must use doublequote. (quotes) Update Control.FullScreen.js Strings must use doublequote Update Control.FullScreen.js Fix Expected method shorthand Update Control.FullScreen.js Expected method shorthand. (object-shorthand) Update openvpn-monitor.py Fix Found indentation with tabs instead of spaces Fix Unnecessary semicolon Update setup.py Fix Trailing whitespace Update Control.FullScreen.js Move the invocation into the parens that contain the function. (wrap-iife) Update openvpn-monitor.py Fix Found indentation with tabs instead of spaces Update openvpn-monitor.py convert to bool statements to fix: The if statement can be replaced with 'var = bool(test)' if 'marker' in vpn and vpn['marker'] == 'True': Update openvpn-monitor.py Trailing Whitespace Update Control.FullScreen.js Undo shorthand of functions. Testing proved that it broke ie11 (edge is fine) This will be a change in the future when ie11 is removed from support Update README.md removed references to example .conf file removed Alias references for js and css - move to cdnjs Update setup.py Remove os.walk for css and js Delete Control.FullScreen.js move to cdnjs Delete oms.min.js move to cdnjs Delete Control.FullScreen.css move to cdnjs Delete icon-fullscreen-2x.png move to cdnjs Delete icon-fullscreen.png move to cdnjs Delete openvpn-monitor.conf.example remove pending pip testing Update openvpn-monitor.py fix Avoid using "non-Pythonic" variable name cdnjs - spiderfy OverlappingSpidifier-Leaflet cdnjs commit add missing function brackets add git-lint-diff travis checks replace tabs with spaces travis-ci fixes trailing whitespaces travis-ci fixes travis-ci fixes travis-ci fixes travis-ci fixes travis-ci fixes quantified code fix fix codacy travis-ci fixes travis-ci fixes travis-ci fixes travis ci fixes travis-ci syntax travis-ci fixes travis-ci fixes travis-ci fixes travis-ci fixes travis-ci fixes travis-ci fixes travis-ci fixes travis-ci fixes travis-ci noqa
I think i did that right - there are definitely a lot less entries in the PR. Let me know if i need to do anything else. |
Hmm, the first commit seems to contain an already merged change? And the second commit - I was hoping you could break this into smaller commits/PRs with e.g. git add -p; git commit -m "fix readme"; git add -p; git commit -m "fix images"; git add -p; git commit -m "add spiderfy", etc, etc. |
unfortunately most of the fixes are part of the openvpn-monitor.py file so breaking them out is quite difficult. i did most of the changes on my local before forking. what would you like me to do from here. apologies for making this difficult, had never used github as a contributor before so ive obviously made this much harder for you. where would you like me to go from here? |
|
Evening Mate - I have obviously struggled to get this broken into smaller commits, mainly due to all the changes being in the one file. |
It looks like there are still conflicts with master. Did you try with So if you checkout my master, then copy your files on top, you should be able to use Alternatively, you could use |
These changes look great - any updates as to when and if they'll be merged? |
Apologies mate I’ve honestly been flat out with family stuff for that long I hadn’t got around to this. I’m perfectly capable of writing and developing some cool enhancements, unfortunately this is my first crack at GirHubbing and I seem to have made it difficult for furlongm to combine these, not for conflicts etc, more so I have it as one huge commit and he cannot sanity check smaller items as it currently stands. I’ll try and have another crack shortly to get it in format that suits furlongm so he can try and incorporate in the project |
@furlongm i have resolved the commits, but given how closely integrated all the features are its quite difficult to just give you a feature at a time to approve the integration of. If you need that for sanity sake i can go through and add each feature from scratch again, but definitely alot of work involved in that. I've been running this since the original merge request without fault if its any help. Let me know so i can get to work if required for @ndobbs |
@furlongm would be awesome to use these changes. |
@ndobbs: agreed. It should be broken down into smaller commits with I'll stick it on my to-do list and see if I can do it. |
Great contribution! Like very much! 👍 I try it and found what images path changed : -flag = '{0!s}flags/{1!s}.png'
+flag = '{0!s}/images/flags/{1!s}.png' and alias added to http server configuration. Why it done in new way? |
@evadim I found this solved an issue where images were not displayed correctly on a raspberry pi server, and given the addition of the marker icons it made sense to move to an images folder. |
Any update to this yet? I would love to start using this feature. |
I added some of these features to the master branch, but others still need to be added. This branch has conflicts with master now so it doesn't apply cleanly, and requires some work to sync up again. |
Hi fur, I wanna show my icon in the title of openvpn monitor tab , how can i do that ? |
006c651
to
19e9fad
Compare
Thanks for all the work in initial config of site.
I have made a few enhancements to further improve it. I have listed them below and could have missed something as i was surprised at how quickly development moved. Everything i have added in follows your coding model, and I have set off by default and on by choice.
Obviously ask any questions, just enjoyed the base product and wanted to enhance it. Hoping your comfortable with enhancements. While i only just forked the project, i've been running the enhancements for the last week.
Summarised changes follow: