mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2026-03-02 23:44:37 +01:00
ip address
This commit is contained in:
parent
a4a0cea168
commit
00a48a3390
11 changed files with 670 additions and 326 deletions
|
|
@ -18,3 +18,12 @@ input[type="checkbox"]:not(:checked) + label, [type="checkbox"]:checked + label
|
|||
.field-error {
|
||||
border-left: 4px solid rgba(255, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
.no-side-padding {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.no-padding {
|
||||
padding: 0;
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -17,7 +17,8 @@
|
|||
"widgets/luci.input.port",
|
||||
"widgets/luci.input.port.range",
|
||||
"widgets/luci.input.timespan",
|
||||
"widgets/luci.input.radio"
|
||||
"widgets/luci.input.radio",
|
||||
"widgets/luci.input.ipaddress"
|
||||
],
|
||||
"pages": {
|
||||
"overview": {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
<div class="form-group" class="col-md-6" ng-class="{ 'field-error': model.error }" data-toggle="tooltip" data-placement="top" title="{{model.error}}">
|
||||
<div class="col-md-5">
|
||||
<label class="{{labelClass}}">{{label|translate}}</label>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<div class="col-sm-2 no-side-padding col-sm-offset-1">
|
||||
<input type="text" class="form-control input-lg no-padding text-center" ng-model="data.field_1" placeholder="..." maxlength="3" />
|
||||
</div>
|
||||
<div class="col-xs-1 no-side-padding text-center input-lg">
|
||||
<strong>.</strong>
|
||||
</div>
|
||||
<div class="col-sm-2 no-side-padding">
|
||||
<input type="text" class="form-control input-lg no-padding text-center" ng-model="data.field_2" placeholder="..." maxlength="3" />
|
||||
</div>
|
||||
<div class="col-xs-1 no-side-padding text-center input-lg">
|
||||
<strong>.</strong>
|
||||
</div>
|
||||
<div class="col-sm-2 no-side-padding">
|
||||
<input type="text" class="form-control input-lg no-padding text-center" ng-model="data.field_3" placeholder="..." maxlength="3" />
|
||||
</div>
|
||||
<div class="col-xs-1 no-side-padding text-center input-lg">
|
||||
<strong>.</strong>
|
||||
</div>
|
||||
<div class="col-sm-2 no-side-padding">
|
||||
<input type="text" class="form-control input-lg no-padding text-center" ng-model="data.field_4" placeholder="..." maxlength="3" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
$juci.module("core")
|
||||
.directive("luciInputIpAddress", function () {
|
||||
var plugin_root = $juci.module("core").plugin_root;
|
||||
return {
|
||||
templateUrl: plugin_root + "/widgets/luci.input.ipaddress.html",
|
||||
restrict: 'E',
|
||||
replace: true,
|
||||
scope: {
|
||||
id: "@",
|
||||
label: "@",
|
||||
model: "=",
|
||||
labelClass: "@"
|
||||
}
|
||||
//controller: "luciInputIpAddressController"
|
||||
};
|
||||
})
|
||||
.controller("luciInputIpAddressController", function($scope, $log) {
|
||||
//$scope.data = "";
|
||||
//$scope.$watch("data", function(){
|
||||
// $log.debug('model', $scope.model);
|
||||
// $log.debug('data', $scope.data);
|
||||
// if ($scope.model) $scope.model.value = $scope.data;
|
||||
//}, true);
|
||||
});
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<div class="radio radio-info">
|
||||
<input id="{{id}}" name="{{name}}" type="radio" ng-model="model" ng-value="value"/>
|
||||
<label for="{{id}}" class="{{labelClass}}" translate>{{label}}</label>
|
||||
</div>
|
||||
|
|
@ -1,41 +1,40 @@
|
|||
<luci-layout-with-sidebar>
|
||||
<div ng-controller="InternetDNSPageCtrl">
|
||||
<h2 translate>DNS</h2>
|
||||
|
||||
<p translate>The DNS configuration is done automatically when you connect to the network. Alternatively you can manually configure your own DNS settings.</p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-5 col-md-offset-1">
|
||||
<h4 class="detail-strong" translate>DNS configuration</h4>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<luci-input-radio id="auto" name="auto" value="0" model="manualDns" label="'automatically'" label-class="detail-strong-input" inline="true"/>
|
||||
</div>
|
||||
<div class="col-md-2 col-lg-offset-1">
|
||||
<luci-input-radio id="manual" name="manual" value="1" model="manualDns" label="'manually'" label-class="detail-strong-input" inline="true"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="manualDns">
|
||||
<br/>
|
||||
|
||||
<div class="col-md-10 col-md-offset-2">
|
||||
<!--<luci-input-ipaddress id="firstDNSAddress" label="'Domain Name Server (DNS) Address'" label-class="detail-strong-input" model=""/>-->
|
||||
</div>
|
||||
<hr class="col-md-9 col-md-offset-2"/>
|
||||
<div class="col-md-6 col-md-offset-2">
|
||||
<h4 class="detail-strong" translate>Secondary DNS Address (optional)</h4>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 translate>DDNS (Dynamic DNS)</h2>
|
||||
|
||||
<p translate>DDNS allows you to access your EasyBox from the Internet using a domain name instead of IP address. You will need an account on a DDNS service provider.</p>
|
||||
|
||||
<luci-config-section>
|
||||
<luci-config-heading>{{ 'DNS' | translate }}</luci-config-heading>
|
||||
<luci-config-info>{{ 'dns.config.info' | translate }}</luci-config-info>
|
||||
<luci-config-lines>
|
||||
<luci-config-line title="{{'DNS configuration'|translate}}">
|
||||
<div class="col-md-6">
|
||||
<luci-input-radio id="auto" name="auto" value="0" model="$parent.$parent.manualDns" label="'automatically'" label-class="detail-strong-input" inline="true"/>
|
||||
</div>
|
||||
<div class="col-md-5 col-lg-offset-1">
|
||||
<luci-input-radio id="manual" name="manual" value="1" model="$parent.$parent.manualDns" label="'manually'" label-class="detail-strong-input" inline="true"/>
|
||||
</div>
|
||||
</luci-config-line>
|
||||
<div ng-show="manualDns">
|
||||
<br/>
|
||||
<div class="col-md-12">
|
||||
<luci-input-ip-address id="firstDNSAddress" label="Domain Name Server (DNS) Address" label-class="detail-strong-input" />
|
||||
</div>
|
||||
<hr class="col-md-12"/>
|
||||
<div class="col-md-12">
|
||||
<luci-input-ip-address id="secondDNSAddress" label="Secondary DNS Address (optional)" label-class="detail-strong-input" />
|
||||
</div>
|
||||
</div>
|
||||
</luci-config-lines>
|
||||
</luci-config-section>
|
||||
<luci-config-section>
|
||||
<luci-config-heading> </luci-config-heading> <!-- used as spacer -->
|
||||
</luci-config-section>
|
||||
<luci-config-section>
|
||||
<luci-config-heading>{{ 'DDNS (Dynamic DNS)' | translate }}</luci-config-heading>
|
||||
<luci-config-info>{{ 'ddns.config.info' | translate }}</luci-config-info>
|
||||
<luci-config-lines>
|
||||
<luci-config-line title="{{'Dynamic DNS'|translate}}">
|
||||
<switch ng-model="status.wlan.value" class="green" ng-change="onApply()"></switch>
|
||||
</luci-config-line>
|
||||
</luci-config-lines>
|
||||
</luci-config-section>
|
||||
</div>
|
||||
</luci-layout-with-sidebar>
|
||||
|
||||
|
||||
</luci-layout-with-sidebar>
|
||||
|
|
@ -1,4 +1,18 @@
|
|||
$juci.module("internet")
|
||||
.controller("InternetDNSPageCtrl", function($scope){
|
||||
|
||||
});
|
||||
.controller("InternetDNSPageCtrl", function($scope, $uci){
|
||||
|
||||
$uci.sync("network").done( function(){
|
||||
console.log($uci.network.wan.peerdns); });
|
||||
|
||||
$scope.onApply = function(){
|
||||
$scope.busy = 1;
|
||||
$uci.save().done(function(){
|
||||
console.log("Settings saved!");
|
||||
}).fail(function(){
|
||||
console.error("Could not save internet settings!");
|
||||
}).always(function(){
|
||||
$scope.$apply();
|
||||
$scope.busy = 0;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ div.logo {
|
|||
h3.detail-strong,
|
||||
h4.detail-strong{
|
||||
color: #333;
|
||||
font-weight: 700;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h3.detail-strong {
|
||||
|
|
|
|||
|
|
@ -187,3 +187,13 @@ h1, h2 {
|
|||
opacity: 0;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.no-side-padding {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.no-padding {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue