diff --git a/src/api/common.js b/src/api/common.js index 4bcfb249..9883ee72 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -87,8 +87,8 @@ export async function getList (options) { const requestConfig = _.merge({ all: false, params: { - page: LIST_DEFAULT_PAGE, - rows: LIST_DEFAULT_ROWS + page: options.page || LIST_DEFAULT_PAGE, + rows: options.rows || LIST_DEFAULT_ROWS }, headers: GET_HEADERS }, options) diff --git a/src/api/pbx-config.js b/src/api/pbx-config.js index d7577902..73509e9e 100644 --- a/src/api/pbx-config.js +++ b/src/api/pbx-config.js @@ -48,8 +48,10 @@ export function getProfiles (options) { } export function getAllProfiles () { + // Replace 1000 rows with 300 as we expect to have max 150 profiles. return getProfiles({ - all: true + page: 1, + rows: 300 }) } diff --git a/src/components/pages/PbxConfiguration/CscPbxDevice.vue b/src/components/pages/PbxConfiguration/CscPbxDevice.vue index 6216615f..b62610db 100644 --- a/src/components/pages/PbxConfiguration/CscPbxDevice.vue +++ b/src/components/pages/PbxConfiguration/CscPbxDevice.vue @@ -9,10 +9,21 @@ center no-wrap > - + + + + diff --git a/src/components/pages/PbxConfiguration/CscPbxDeviceFilters.vue b/src/components/pages/PbxConfiguration/CscPbxDeviceFilters.vue index 3b30b98e..9dcdb34d 100644 --- a/src/components/pages/PbxConfiguration/CscPbxDeviceFilters.vue +++ b/src/components/pages/PbxConfiguration/CscPbxDeviceFilters.vue @@ -119,8 +119,8 @@ export default { 'deviceProfileMap', 'deviceProfileList', 'subscriberList', - 'subcriberListState', - 'subcriberListError' + 'subscriberListState', + 'subscriberListError' ]), subscribersOptions () { const options = [] @@ -196,9 +196,9 @@ export default { filterTypeModel () { this.typedFilter = null }, - subcriberListState (state) { + subscriberListState (state) { if (state === RequestState.failed) { - showGlobalError(this.subcriberListError) + showGlobalError(this.subscriberListError) } } }, diff --git a/src/components/pages/PbxConfiguration/CscPbxModelSelect.vue b/src/components/pages/PbxConfiguration/CscPbxModelSelect.vue index 3fad2556..ad8e4985 100644 --- a/src/components/pages/PbxConfiguration/CscPbxModelSelect.vue +++ b/src/components/pages/PbxConfiguration/CscPbxModelSelect.vue @@ -49,10 +49,11 @@ > - + /> @@ -118,15 +119,11 @@ export default { return _.get(this.deviceModelImageSmallMap, `${deviceModelId}.url`, null) }, options () { - const options = [] - this.profiles.forEach((profile) => { - options.push({ - label: profile.name, - value: profile.id, - model: profile.device_id - }) - }) - return options + return this.profiles.map((profile) => ({ + label: profile.name, + value: profile.id, + model: profile.device_id + })) } }, watch: { diff --git a/src/pages/CscPagePbxCallQueues.vue b/src/pages/CscPagePbxCallQueues.vue index c71d6f2a..dde0805a 100644 --- a/src/pages/CscPagePbxCallQueues.vue +++ b/src/pages/CscPagePbxCallQueues.vue @@ -154,8 +154,8 @@ export default { 'getCallQueueRemovalToastMessage' ]), ...mapState('pbx', [ - 'subcriberListState', - 'subcriberListError' + 'subscriberListState', + 'subscriberListError' ]) }, watch: { @@ -187,9 +187,9 @@ export default { showGlobalError(this.callQueueListError) } }, - subcriberListState (state) { + subscriberListState (state) { if (state === RequestState.failed) { - showGlobalError(this.subcriberListError) + showGlobalError(this.subscriberListError) } } }, diff --git a/src/pages/CscPagePbxDeviceDetails.vue b/src/pages/CscPagePbxDeviceDetails.vue index db86eb59..d1e7ca2b 100644 --- a/src/pages/CscPagePbxDeviceDetails.vue +++ b/src/pages/CscPagePbxDeviceDetails.vue @@ -175,10 +175,11 @@ v-if="!deviceSelected" /> { + const newProfile = this.deviceProfileMap[this.changes.profile_id] + if (newProfile && newProfile.device_id) { + this.loadDeviceModel({ + type: 'all', + deviceId: newProfile.device_id + }) + } }) } if (this.hasAdminNameChanged) { diff --git a/src/pages/CscPagePbxDevices.vue b/src/pages/CscPagePbxDevices.vue index 65e614cf..8785c620 100644 --- a/src/pages/CscPagePbxDevices.vue +++ b/src/pages/CscPagePbxDevices.vue @@ -3,9 +3,7 @@ id="csc-page-pbx-devices" class="q-pa-lg" > - + -