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

feat: new post api for physical reconfiguration #387

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion freepbx/wizard-ui/app/scripts/i18n/locale-en.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,5 +171,6 @@
"extension left": "extension left",
"privacy message notification": "The recording, possession, reproduction, communication or dissemination of telephone conversations outside of the cases permitted by law represents an offense. It is advisable to check that all the protections provided for by the Workers' Statute and the Privacy Code and the relevant applicable regulations have been adopted before activating this functionality.",
"Warning": "Warning",
"Syncing message": "Users are syncing. Wait for the process to complete."
"Syncing message": "Users are syncing. Wait for the process to complete.",
"Reboot": "Reboot"
}
1 change: 1 addition & 0 deletions freepbx/wizard-ui/app/scripts/i18n/locale-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,7 @@
"Select model": "Seleziona il modello",
"Add with copy/paste": "Aggiungi con copia/incolla",
"Reboot": "Riavvio",
"Reconfigure": "Riconfigura",
"Enable delayed reboot": "Abilita riavvio ritardato",
"Reboot time": "Ora riavvio",
"Select all": "Seleziona tutti",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,16 @@ angular.module('nethvoiceWizardUiApp')
});
}

this.setPhoneReconfigure = function (reconfiguretData) {
return $q(function (resolve, reject) {
RestService.post('/phones/reconfigure', reconfiguretData).then(function (res) {
resolve(res);
}, function (err) {
reject(err);
});
});
}

this.deletePhoneDelayedReboot = function (rebootCancelMacs) {
return $q(function (resolve, reject) {
RestService.deleteWithContentTypeJson('/phones/reboot', rebootCancelMacs).then(function (res) {
Expand Down
4 changes: 2 additions & 2 deletions freepbx/wizard-ui/app/views/configurations/preferences.html
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,9 @@ <h1 class="control-label centered" for="textInput-markup">{{'Users Configuration
uib-popover="{{!device.registered ? 'cant_reboot_not_registered' : '' | translate}}">
<button
class="btn btn-default"
ng-click="rebootDevice(device)"
ng-click="reconfigureDevice(device)"
ng-disabled="!device.registered">
{{ 'Reboot' | translate }}
{{ 'Reconfigure' | translate }}
</button>
</div>
<span ng-if="device.rebootInAction == 'ok'" class="pficon vertical-sub pficon-ok fz-18 ml-5 mt-3"></span>
Expand Down
Loading