mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2026-03-11 11:38:41 +01:00
Ringing schedule
This commit is contained in:
parent
174b5a7e69
commit
9788b0383b
6 changed files with 19 additions and 11 deletions
|
|
@ -85,12 +85,12 @@
|
|||
<tr>
|
||||
<td>
|
||||
<div class="col-md-2"><i class="fa fa-calendar fa-2x"></i></div>
|
||||
<div class="col-md-10"><strong><a href="#!/phone-ringing-schedule">Schedule</a> is <a class="label label-{{(wifi.status.wps.value)?'success':'default'}} pull-right" href="" ng-click="onWPSToggle()">{{wifiWPSStatus | translate}}</a></strong></div>
|
||||
<div class="col-md-10"><strong><a href="#!/phone-ringing-schedule">Schedule</a> <a class="label label-{{(wifi.status.wps.value)?'success':'default'}} pull-right" href="" ng-click="onWPSToggle()">{{wifiWPSStatus | translate}}</a></strong></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr ng-repeat="sip in sipAccounts track by $index">
|
||||
<td ng-show="sip.user.value">
|
||||
<div class="col-md-2"><strong style="font-size: 1.2em">U{{$index}}</strong></div>
|
||||
<div class="col-md-2"><strong style="font-size: 1.2em">{{sip.name.value}}: </strong></div>
|
||||
<div class="col-md-8"><strong>{{sip.user.value}}</strong></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -13,15 +13,15 @@ $juci.module("internet")
|
|||
if($scope.firewallSwitchState) {
|
||||
$uci.firewall["@zone"].map(function(zone){
|
||||
if(zone.name.value == "wan"){
|
||||
zone.input.value = "ACCEPT";
|
||||
zone.forward.value = "ACCEPT";
|
||||
zone.input.value = "REJECT";
|
||||
zone.forward.value = "REJECT";
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$uci.firewall["@zone"].map(function(zone){
|
||||
if(zone.name.value == "wan"){
|
||||
zone.input.value = "REJECT";
|
||||
zone.forward.value = "REJECT";
|
||||
zone.input.value = "ACCEPT";
|
||||
zone.forward.value = "ACCEPT";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<luci-config-line title="{{'Ringing Schedule'|translate}}">
|
||||
<switch id="enabled" name="enabled" ng-model="settings.enabled.value" class="green"></switch>
|
||||
</luci-config-line>
|
||||
<luci-config-line title="{{'During this time ringing is '|translate}}">
|
||||
<luci-config-line title="{{'During this time ringing is '|translate}}" ng-show="settings.enabled.value">
|
||||
<switch id="enabled" name="enabled" ng-model="settings.status.value" class="green"></switch>
|
||||
</luci-config-line>
|
||||
</luci-config-lines>
|
||||
|
|
@ -17,6 +17,7 @@
|
|||
<th translate>Day</th>
|
||||
<th translate>Time</th>
|
||||
<th translate>Number</th>
|
||||
<th translate>Status</th>
|
||||
<!--<th translate>Status</th>-->
|
||||
<th></th>
|
||||
<th></th>
|
||||
|
|
@ -26,6 +27,7 @@
|
|||
<td>{{ item.days.value.join(",") }}</td>
|
||||
<td>{{ item.time.value }}</td>
|
||||
<td>{{ allSipAccountsMap[item.sip_service_provider.value].name.value }}</td>
|
||||
<td>{{ ((settings.status.value)?"Enabled":"Disabled") | translate}}</td>
|
||||
<!--<td>{{ item.enabled.value }}</td>-->
|
||||
<td style="width: 1%"><button class="btn btn-default" ng-click="onEditSchedule(item)"><i class="fa fa-pencil" style="{{editColor}}"></i></button></td>
|
||||
<td style="width: 1%"><button class="btn btn-default" ng-click="onDeleteSchedule(item)"><i class="fa fa-trash-o"></i></button></td>
|
||||
|
|
|
|||
|
|
@ -25,8 +25,14 @@ $juci.module("phone")
|
|||
$scope.allSipAccountsMap = {};
|
||||
|
||||
$uci.sync(["voice_client"]).done(function(){
|
||||
// TODO add config for phone
|
||||
$scope.settings = $uci.voice_client.RINGING_STATUS;
|
||||
if(!$uci.voice_client.RINGING_STATUS){
|
||||
$uci.voice_client.create({".type": "ringing_status", ".name": "RINGING_STATUS"}).done(function(section){
|
||||
$scope.settings = $uci.voice_client.RINGING_STATUS;
|
||||
$scope.$apply();
|
||||
});
|
||||
} else {
|
||||
$scope.settings = $uci.voice_client.RINGING_STATUS;
|
||||
}
|
||||
$scope.schedules = $uci.voice_client["@ringing_schedule"];
|
||||
$scope.allSipAccountsMap = {};
|
||||
$scope.allSipAccounts = $uci.voice_client["@sip_service_provider"].map(function(x){
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@
|
|||
</luci-config-lines>
|
||||
</luci-config-section>
|
||||
</luci-config>
|
||||
<modal title="{{'Attempting to Pair'|translate}}" ng-show="progress != 0 && progress != 2" dismiss-label="Cancel" on-dismiss="onCancelWPS()">
|
||||
<modal title="{{'Attempting to Pair'|translate}}" ng-show="progress != 0 && progress != 2 && progress < 10" dismiss-label="Cancel" on-dismiss="onCancelWPS()">
|
||||
<div style="text-align: center;">
|
||||
<div ng-show="progress != 0" >
|
||||
<i class="fa fa-spinner fa-spin fa-3x"/>
|
||||
|
|
|
|||
|
|
@ -292,7 +292,7 @@ rpc_luci2_system_log(struct ubus_context *ctx, struct ubus_object *obj,
|
|||
|
||||
if (!(log = popen("logread", "r")))
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
|
||||
blob_buf_init(&buf, 0);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue