-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #100 from freifunk-berlin/vpn-config
add vpn config to wizard
- Loading branch information
Showing
20 changed files
with
762 additions
and
446 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<div class="form-group has-feedback" | ||
ng-class="formFeedback('{{$ctrl.idPrefix}}.{{$ctrl.details.property}}')"> | ||
<label for="{{$ctrl.idPrefix}}.{{$ctrl.details.property}}" class="col-xs-6 control-label"> | ||
{{'load-file-form.' + $ctrl.details.property + '.label' | translate}} | ||
</label> | ||
<div class="col-xs-6"> | ||
<load-file-button | ||
ng-if="!$ctrl.fileContent" | ||
id="{{$ctrl.idPrefix}}.{{$ctrl.details.property}}" | ||
accept="{{$ctrl.details.fileExtensions}}" | ||
base64="true" | ||
on-loaded="$ctrl.fileContent = content" | ||
required="$ctrl.details.required" | ||
> | ||
<span>{{'load-file-form.' + $ctrl.details.property + '.select' | translate}}</span> | ||
</load-file-button> | ||
<div ng-if="$ctrl.fileContent"> | ||
<i class="fa fa-fw fa-check text-success" aria-hidden="true"></i> | ||
<button type="button" class="btn btn-sm btn-danger" ng-click="$ctrl.fileContent = undefined" title="Remove file"> | ||
<i class="fa fa-fw fa-trash-o" aria-hidden="true"></i> | ||
</buton> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { module } from 'angular'; | ||
|
||
export default module('app.components.load-file-form', []) | ||
.component('loadFileForm', { | ||
bindings: { | ||
details: '<', | ||
onUpdate: '&', | ||
fileContent: '<', | ||
idPrefix: '@', | ||
}, | ||
controller: class WizardTunnelCtrl { | ||
constructor($scope) { | ||
'ngInject'; | ||
|
||
$scope.$watch('$ctrl.fileContent', this.update.bind(this)); | ||
} | ||
|
||
update() { | ||
this.onUpdate({fileContent: this.fileContent}); | ||
} | ||
}, | ||
template: require('./load-file-form.html'), | ||
transclude: true, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.