-
Notifications
You must be signed in to change notification settings - Fork 7
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
add vpn config to wizard #100
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.
There are a few minor things in the comments.
The most important thing is that we should decide how to proceed with the mesh tunnel. It doesn't fit where it is right now. Any ideas?
{ | ||
fileExtensions: '.ovpn,.cnf,text/*', | ||
property: 'config', | ||
tunnelType: 'internettunnel', |
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 repeated in every element here so we should remove it. If we really need it for the ids then we can pass it as an extra binding to the wizard-upload-file 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.
done
{ | ||
fileExtensions: '.crt,text/*', | ||
tunnelType: 'internettunnel', | ||
property: 'cacert', |
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 should be 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.
done
{ | ||
fileExtensions: '.key,text/*', | ||
tunnelType: 'internettunnel', | ||
property: 'takey', |
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.
tls auth key
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.
Ah, this is called tls-auth
. We have to match the openvpn option names here, there is no additional translation of these options in the backend.
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.
done
constructor($scope) { | ||
'ngInject'; | ||
|
||
this.newInternet = {}; | ||
this.internetTunnelEnabled = false; | ||
this.meshTunnelEnabled = false; | ||
this.internetTunnelConf = [ |
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.
We could call this tunnelFiles
because it's independent of the tunnelType
if we decide to remove this (see below)
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.
done
}, | ||
]; | ||
|
||
this.internetTunnelConfSecret = [ |
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.
why are these separate? Can't we simply include them above?
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.
it is for display reasons, to seperate it and show a help text in between
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.
Hmm, we don't have a help text for the others either. The configs can be arbitrarily complex and we can't document all of them. We could explain the most common combinations in the proposed wiki page, what do you think?
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.
who will write the wiki page? :)
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 added #102 to solve this
<div ng-click="toggleVpnList()"> | ||
<span ng-show="!state.internet.showVpnList">►</span> | ||
<span ng-show="state.internet.showVpnList">▼</span> | ||
<div ng-click="$ctrl.toggleVpnList()"> |
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 think we should just link to a wiki page and remove the list from the wizard. The wiki page can also go into more detail.
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 created #101 to solve this
constructor($scope) { | ||
'ngInject'; | ||
|
||
this.newInternet = {}; | ||
this.internetTunnelEnabled = false; | ||
this.meshTunnelEnabled = false; |
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.
it's not wrong to initialize these here but we don't need to. They're undefined
by default and updateFromInput()
will set them anyway.
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.
stupid javascript ;)
but done
@@ -8,17 +8,128 @@ export default module('app.components.wizard-internet', []) | |||
}, | |||
// TODO: handle vpn |
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.
remove this comment :)
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.
done
accept="{{$ctrl.details.fileExtensions}}" | ||
base64="true" | ||
on-loaded="$ctrl.uploadContent(content)" | ||
required="{{$ctrl.details.required}}"> |
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.
without {{}}
(unless you really want a string here which I doubt)
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.
in fact we need a string here, for conditions like !ctrl.internet.share
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 don't understand this one. Can you explain?
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.
you're right, it would be just true or false... done
|
||
setMeshTunnelType(type) { | ||
if (!this.newInternet.meshTunnel) { | ||
this.newInternet.meshTunnel = {}; |
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.
It's still a bit weird to have the mesh tunnel in the Internet sharing section and in the internet
object. Any idea where we should put it? We can also create a new section for this or for mesh-related things in general. Could also be an advanced feature? Any opinions?
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 sure. On the other hand, mesh vpn doesn't make sense without internet sharing. Should we discuss it in a separate issue?
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 think it does make sense without internet sharing. But yeah, let's discuss it in a separate issue. What do you think about removing mesh tunnel for now from the UI?
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.
Why do we need mesh vpn when we don't have internet access?
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'd like to let it here for now, so we don't forget it later
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.
opened #103 for 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.
Share internet is not about having internet access but about sharing your internet connection. Even if you don't want to share it your router may be connected to the internet and you may want to connect with other mesh nodes via a tunnel, right?
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.
sounds like an edge case :)
I'd like to let it here for now, until we have another solution, i.e. something for advanced or mesh settings, as I think this feature should be supported
import {copy, fromJson, module} from 'angular'; | ||
|
||
export default module('app.components.wizard-upload-configfile', []) | ||
.component('wizardUploadConfigfile', { |
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 component looks fairly generic now and maybe we also want to use it outside of the wizard or for other than config files. What do you think about renaming it to load-file-form
(it basically wraps load-file-button
for use in a form)?
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.
done
… uploading same file twice)
@andibraeu can you test this one last time please? I did some refactoring and fixed the data flow (had non-terminating angular digest cycles)... And I didn't change any of the DE translations yet. |
Am 27.08.2017 um 02:16 schrieb André Gaul ***@***.*** ***@***.***>>:
@andibraeu <https://github.com/andibraeu> can you test this one last time please? I did some refactoring and fixed the data flow (had non-terminating angular digest cycles)... And I didn't change any of the DE translations yet.
I did the translations and tested.
Unfortunately file uploads don’t work anymore for me. I don’t see any success hints and the downloaded file doesn’t contain any content of these files. The checkboxes aren’t set, too, when I select Internet Sharing and Internet tunnel. (maybe it’s just deleted when updated?)
The clear all files button is missing, too.
|
You can clear files individually now so we don't need the clear all button anymore. Did you use Firefox? Will check this in ~30min. |
I used Chromium |
Does it work with mesh tunnel? |
I can reproduce it here. Will work on it later. :) |
Fixed. @andibraeu can you verify? |
not it works! do you press the button, please? Reinhold! |
With pleasure :) |
No description provided.