Skip to content
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

Merged
merged 52 commits into from
Aug 27, 2017
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
bea6b21
Create config-schema.json
Aug 19, 2017
6a38f9f
update dependencies
andibraeu Aug 19, 2017
7eef022
rename antistoererhaftung to internettunnel
andibraeu Aug 19, 2017
6e4e244
add vpn config for internet tunnel
andibraeu Aug 19, 2017
d45aab8
fixes package names
andibraeu Aug 19, 2017
4cbd09a
add required keyword
andibraeu Aug 19, 2017
c55e4bf
remove unused code
andibraeu Aug 19, 2017
f6f49dc
emable upload of vpn configs
andibraeu Aug 20, 2017
bb73e84
fix lint issues
andibraeu Aug 20, 2017
b3cb3d2
fix indentation
andibraeu Aug 20, 2017
97d7f18
set internet tunneltype
andibraeu Aug 20, 2017
c5bb573
add feature to clear all vpn config files
andibraeu Aug 20, 2017
28d3b10
add mesh vpn configuration
andibraeu Aug 20, 2017
f05544f
re-enable vpn provider list
andibraeu Aug 20, 2017
bbcbf57
fix typo
andibraeu Aug 20, 2017
5818a1f
update translations
andibraeu Aug 20, 2017
604f698
fix translations and spacing
andibraeu Aug 20, 2017
804b9ce
Update config-schema.json
andibraeu Aug 20, 2017
678106d
Merge remote-tracking branch 'andi/patch-2' into vpn-config
andibraeu Aug 20, 2017
e3d3c27
add vpn stuff to config schema
andibraeu Aug 20, 2017
4269e69
remove todo and variable initialisation
andibraeu Aug 21, 2017
196df17
refactor upload file component and internet wizard
andibraeu Aug 21, 2017
61aa833
move design elements out of component
andibraeu Aug 22, 2017
845e023
use button instead of span
andibraeu Aug 22, 2017
ea40cc7
fix lint issues
andibraeu Aug 22, 2017
82b33b0
renamed wizard-upload-configfile
andibraeu Aug 22, 2017
d8b0e49
changed translation namespace
andibraeu Aug 22, 2017
d9c9b12
removed vpn prefix from translations
andibraeu Aug 22, 2017
64aeb72
renamed takey to tls-auth
andibraeu Aug 22, 2017
500d2d3
simplify display of success icon
andibraeu Aug 25, 2017
7d5750f
use boolean instead of string
andibraeu Aug 25, 2017
1e54875
update translation
andibraeu Aug 26, 2017
8866de9
i18n: make VPN strings consistent
andrenarchy Aug 26, 2017
42f722b
wizard-internet: allow mesh tunnel without internet sharing
andrenarchy Aug 26, 2017
b9c9f5b
wizard-internet: improve text
andrenarchy Aug 26, 2017
8634a4f
load-file-button: reset button after reading (otherwise prevents from…
andrenarchy Aug 26, 2017
9ecb52a
load-file-form: simplify
andrenarchy Aug 26, 2017
47950c0
wizard-tunnel: create tunnel component
andrenarchy Aug 27, 2017
e9af9fd
load-file-form: add clear button
andrenarchy Aug 27, 2017
8c1a308
wizard-internet: remove wizard-tunnel code
andrenarchy Aug 27, 2017
0b02dc5
components: add wizard-tunnel
andrenarchy Aug 27, 2017
21073eb
package: add lodash
andrenarchy Aug 27, 2017
6880600
i18n: adapt en strings
andrenarchy Aug 27, 2017
23aa6bb
fix linting error
andrenarchy Aug 27, 2017
149ec12
update translations
andibraeu Aug 27, 2017
e8eea74
wizard-internet: fix data handling
andrenarchy Aug 27, 2017
16f00a0
load-file-form: add title to button
andrenarchy Aug 27, 2017
02b9bbd
wizard-tunnel: simplify component
andrenarchy Aug 27, 2017
96f3cd5
i18n: remove unused keys
andrenarchy Aug 27, 2017
88cd61d
wizard-internet: improve speedLimit handling
andrenarchy Aug 27, 2017
77e3598
fix linting error
andrenarchy Aug 27, 2017
349aa74
wizard-tunnel: fix ca property and add file extensions
andrenarchy Aug 27, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
237 changes: 237 additions & 0 deletions config-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {},
"id": "http://example.com/example.json",
"properties": {
"contact": {
"id": "/properties/contact",
"properties": {
"email": {
"id": "/properties/contact/properties/email",
"type": "string"
},
"name": {
"description": "Nodemaintainer ",
"id": "/properties/contact/properties/name",
"type": "string"
},
"sendToMap": {
"description": "Send entered email contact to Freifunkmap",
"id": "/properties/contact/properties/sendToMap",
"type": "boolean"
},
"showOnContactPage": {
"id": "/properties/contact/properties/showOnContactPage",
"type": "boolean"
}
},
"type": "object"
},
"internet": {
"properties": {
"internetTunnel": {
"properties": {
"files": {
"properties": {
"config": {
"description": "VPN configuration file",
"type": "string"
},
"cert": {
"description": "VPN certificate file",
"type": "string"
},
"cacert": {
"description": "VPN ca certificate file",
"type": "string"
},
"takey": {
"description": "TLS Auth key file",
"type": "string"
},
"key": {
"description": "VPN key file",
"type": "string"
}
},
"required": [
"config"
],
"type": "object"
},
"type": {
"description": "type of VPN tunnel",
"enum": [
null,
"openvpn"
],
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
},
"meshTunnel": {
"properties": {
"files": {
"properties": {
"config": {
"description": "VPN configuration file",
"type": "string"
},
"cert": {
"description": "VPN certificate file",
"type": "string"
},
"cacert": {
"description": "VPN ca certificate file",
"type": "string"
},
"takey": {
"description": "TLS Auth key file",
"type": "string"
},
"auth-user-pass": {
"description": "Auth User Pass file",
"type": "string"
},
"secret": {
"description": "secret file",
"type": "string"
},
"key": {
"description": "VPN key file",
"type": "string"
}
},
"required": [
"config"
],
"type": "object"
},
"type": {
"description": "type of VPN tunnel",
"enum": [
null,
"openvpn"
],
"type": "string"
}
},
"type": "object"
},
"share": {
"type": "boolean"
}
},
"type": "object"
},
"ip": {
"id": "/properties/ip",
"properties": {
"distribute": {
"description": "Distribute IP addresses to clients",
"id": "/properties/ip/properties/distribute",
"title": "",
"type": "boolean"
},
"meshLan": {
"id": "/properties/ip/properties/meshLan",
"type": "boolean"
},
"v4": {
"id": "/properties/ip/properties/v4",
"properties": {
"lan": {
"description": "mesh IP for LAN (Lanmesh)",
"id": "/properties/ip/properties/v4/properties/lan",
"type": "string"
},
"radio0": {
"id": "/properties/ip/properties/v4/properties/radio0",
"type": "string"
},
"radio1": {
"id": "/properties/ip/properties/v4/properties/radio1",
"type": "string"
}
},
"type": "object"
},
"v4ClientSubnet": {
"id": "/properties/ip/properties/v4ClientSubnet",
"type": "string"
},
"v6Prefix": {
"id": "/properties/ip/properties/v6Prefix",
"type": "string"
}
},
"type": "object"
},
"location": {
"id": "/properties/location",
"properties": {
"city": {
"id": "/properties/location/properties/city",
"type": "string"
},
"lat": {
"id": "/properties/location/properties/lat",
"type": "number"
},
"lng": {
"description": "alternative lon",
"id": "/properties/location/properties/lng",
"type": "number"
},
"postalCode": {
"id": "/properties/location/properties/postalCode",
"type": "string"
},
"street": {
"id": "/properties/location/properties/street",
"type": "string"
}
},
"type": "object"
},
"monitoring": {
"id": "/properties/monitoring",
"properties": {
"enabled": {
"description": "",
"id": "/properties/monitoring/properties/enabled",
"type": "boolean"
}
},
"type": "object"
},
"router": {
"id": "/properties/router",
"properties": {
"name": {
"id": "/properties/router/properties/name",
"type": "string"
},
"passwordHash": {
"id": "/properties/router/properties/passwordHash",
"type": "string"
},
"sshkeys": {
"id": "/properties/router/properties/sshkeys",
"items": {
"id": "/properties/router/properties/sshkeys/items",
"type": "string"
},
"type": "array"
}
},
"type": "object"
}
},
"type": "object"
}

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,15 @@
"angular-bootstrap": "^0.12.2",
"angular-messages": "^1.6.1",
"angular-sanitize": "^1.6.1",
"angular-simple-logger": "^0.1.7",
"angular-translate": "^2.13.1",
"angular-translate-loader-static-files": "^2.13.1",
"angular-ui-bootstrap": "^2.4.0",
"angular-ui-router": "^1.0.0-beta.3",
"@uirouter/angularjs": "^1.0.6",
"bootstrap": "^3.3.7",
"font-awesome": "^4.7.0",
"ip-address": "^5.0.2",
"leaflet": "^1.2.0",
"nano-md5": "^1.0.3",
"ssh-pub-key-validation": "^1.0.0",
"ui-leaflet": "^2.0.0"
Expand Down
2 changes: 1 addition & 1 deletion src/components/home/home.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { module } from 'angular';
import uiRouter from 'angular-ui-router';
import uiRouter from '@uirouter/angularjs';

export default module('app.components.home', [uiRouter])
.config(($stateProvider) => {
Expand Down
2 changes: 2 additions & 0 deletions src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import wizardIp from './wizard-ip/wizard-ip';
import wizardLocation from './wizard-location/wizard-location';
import wizardMonitoring from './wizard-monitoring/wizard-monitoring';
import wizardRouter from './wizard-router/wizard-router';
import wizardUploadConfigfile from './wizard-upload-configfile/wizard-upload-configfile';

export default module('app.components', [
authenticateModal.name,
Expand All @@ -34,4 +35,5 @@ export default module('app.components', [
wizardLocation.name,
wizardMonitoring.name,
wizardRouter.name,
wizardUploadConfigfile.name,
]);
2 changes: 1 addition & 1 deletion src/components/load-file-button/load-file-button.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<label class="btn btn-default btn-sm">
<div ng-transclude></div>
<input type="file" accept="{{$ctrl.accept}}">
<input type="file" accept="{{$ctrl.accept}}" data-ng-required="{{$ctrl.required}}">
</label>
14 changes: 12 additions & 2 deletions src/components/load-file-button/load-file-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ export default module('app.components.load-file-button', [])
.component('loadFileButton', {
bindings: {
accept: '@',
base64: '@',
required: '@',
onDismiss: '&',
onLoaded: '&',
},
Expand All @@ -22,9 +24,17 @@ export default module('app.components.load-file-button', [])
if (!event.target.files || event.target.files.length === 0) return;
const reader = new this.$window.FileReader();
reader.onload = frEvent => this.$scope.$apply(() => {
this.onLoaded({content: frEvent.target.result});
if (this.base64) {
this.onLoaded({content: frEvent.target.result.split(',')[1]});
} else {
this.onLoaded({content: frEvent.target.result});
}
});
reader.readAsText(event.target.files[0]);
if (this.base64) {
reader.readAsDataURL(event.target.files[0]);
} else {
reader.readAsText(event.target.files[0]);
}
}
},
template: require('./load-file-button.html'),
Expand Down
2 changes: 1 addition & 1 deletion src/components/status-olsr/status-olsr.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { module } from 'angular';
import uiRouter from 'angular-ui-router';
import uiRouter from '@uirouter/angularjs';

export default module('app.components.status-olsr', [uiRouter])
.config(($stateProvider) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/status-system/status-system.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { module } from 'angular';
import uiRouter from 'angular-ui-router';
import uiRouter from '@uirouter/angularjs';

require('./status-system.less');

Expand Down
Loading