Skip to content

Commit

Permalink
feat: add new phone model NP-V61 to wizard UI auto discovery (#195)
Browse files Browse the repository at this point in the history
- Added support for NP-V61 model in the wizard UI
- Related issue: NethServer/dev#7032
  • Loading branch information
andrea-marchionni authored Nov 7, 2024
1 parent a9d432b commit 8717724
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions wizard/app/scripts/controllers/devices/inventory.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ angular.module('nethvoiceWizardUiApp')
const npx3Digits = "00"
const npx5Digits = "01"
const npx210Digits = "02"
const npv61Digits = "03"
const npx3Name = "nethesis-NPX3"
const npx5Name = "nethesis-NPX5"
const npx210Name = "nethesis-NPX210"
const npv61Name = "nethesis-NPV61"

function gotModels(models) {
$scope.models = models;
Expand Down Expand Up @@ -242,6 +244,8 @@ angular.module('nethvoiceWizardUiApp')
$scope.manualModel = $scope.manualFilteredModels.find(( model ) => { return model.name === npx5Name })
} else if (mac.toUpperCase().split("-")[modelDigitsKey] === npx210Digits) {
$scope.manualModel = $scope.manualFilteredModels.find(( model ) => { return model.name === npx210Name })
} else if (mac.toUpperCase().split("-")[modelDigitsKey] === npv61Digits) {
$scope.manualModel = $scope.manualFilteredModels.find(( model ) => { return model.name === npv61Name })
}
}
} else {
Expand Down Expand Up @@ -732,6 +736,8 @@ angular.module('nethvoiceWizardUiApp')
phone.model = phone.filteredModels.find(( model ) => { return model.name === npx5Name })
} else if (mac.toUpperCase().split("-")[modelDigitsKey] === npx210Digits) {
phone.model = phone.filteredModels.find(( model ) => { return model.name === npx210Name })
} else if (mac.toUpperCase().split("-")[modelDigitsKey] === npv61Digits) {
phone.model = phone.filteredModels.find(( model ) => { return model.name === npv61Name })
}
}
} else {
Expand Down

0 comments on commit 8717724

Please sign in to comment.