Skip to content

Commit

Permalink
wizard_ui. Added proxy for physical trunks modal
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyco97 committed Feb 27, 2024
1 parent 88e5695 commit 174ecb9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
9 changes: 9 additions & 0 deletions wizard/app/scripts/controllers/trunks/physical.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ angular.module('nethvoiceWizardUiApp')
$scope.onSave = false;
$scope.users = [];
$scope.physicalLimit = {};
$scope.exampleInputProxy = ''
$scope.exampleIpv4_green = ''
$scope.stringToCheckGrandstream = "grandstream";
var limitLength = 20;

Expand Down Expand Up @@ -85,6 +87,11 @@ angular.module('nethvoiceWizardUiApp')
DeviceService.gatewayModelList().then(function (res) {
$scope.allModels = res.data;
$scope.allVendors = Object.keys($scope.allModels);
var firstModel = Object.values($scope.allModels)[0][0];
$scope.exampleInputProxy = firstModel.proxy;
$scope.exampleIpv4_green = firstModel.ipv4_green;
$scope.newGateway.proxy = $scope.exampleInputProxy;
$scope.newGateway.ipv4_green = $scope.exampleIpv4_green;
}, function (err) {
console.log(err);
});
Expand Down Expand Up @@ -171,6 +178,8 @@ angular.module('nethvoiceWizardUiApp')

$scope.hideGatewayDialog = function () {
$scope.newGateway = {};
$scope.newGateway.proxy = $scope.exampleInputProxy;
$scope.newGateway.ipv4_green = $scope.exampleIpv4_green;
$('#newGwDialog').modal('hide');
};

Expand Down
1 change: 1 addition & 0 deletions wizard/app/scripts/i18n/locale-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"Extension linked correctly to user": "Interno associato correttamente all'utente",
"Physical lines configuration": "Configurazione Fasci Fisici",
"PBX IP": "IP PBX",
"Proxy address": "Indirizzo proxy",
"Network mask": "Maschera di rete",
"Delete": "Elimina",
"Model": "Modello",
Expand Down
16 changes: 15 additions & 1 deletion wizard/app/views/trunks/physical.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,13 @@ <h1 class="control-label config-title-user" for="textInput-markup">
</div>
</div>

<div class="form-group">
<label class="col-sm-3 control-label">{{'Proxy address' | translate}}</label>
<div class="col-sm-9">
<input type="text" ng-model="selectedDevice.proxy" class="form-control" ng-disabled="selectedDevice.isConfigured">
</div>
</div>

<div class="form-group" ng-repeat="trunk in selectedDevice.trunks_isdn">
<label class="col-sm-3 control-label">{{'Port' | translate}} ISDN {{trunk.name}}</label>
<div class="col-sm-9">
Expand Down Expand Up @@ -272,7 +279,14 @@ <h4 class="modal-title">{{'New Gateway' | translate}}</h4>
<div class="form-group">
<label class="col-sm-3 control-label">{{'PBX IP' | translate}}</label>
<div class="col-sm-9">
<input type="text" ng-model="newGateway.ipv4_green" class="form-control" required pattern="((^|\.)((25[0-5])|(2[0-4]\d)|(1\d\d)|([1-9]?\d))){4}$">
<input type="text" ng-model="newGateway.ipv4_green" class="form-control">
</div>
</div>

<div class="form-group">
<label class="col-sm-3 control-label">{{'Proxy address' | translate}}</label>
<div class="col-sm-9">
<input type="text" ng-model="newGateway.proxy" class="form-control">
</div>
</div>

Expand Down

0 comments on commit 174ecb9

Please sign in to comment.