From 7b6b3c0f32ef78145c62d38734aa675ac3a2bf1f Mon Sep 17 00:00:00 2001 From: Tijana Maksimovic Date: Tue, 10 Jul 2018 17:04:34 +0200 Subject: [PATCH] TT#37655 Customer wants to filter by mac address Change-Id: I147c4e52e35f5fc8540320badacaebc7b2eb1708 --- src/api/pbx-config.js | 4 + .../PbxConfiguration/CscPbxDeviceAddForm.vue | 39 +++-- .../PbxConfiguration/CscPbxDeviceConfig.vue | 2 +- .../pages/PbxConfiguration/CscPbxDevices.vue | 84 ++++++--- .../PbxConfiguration/CscPbxDevicesFilter.vue | 66 +++++++ .../PbxConfiguration/CscPbxDevicesToolbar.vue | 163 ++++++++++++++++++ .../pages/PbxConfiguration/CscPbxMacInput.vue | 93 ++++++++++ .../PbxConfiguration/CscPbxModelSelect.vue | 67 +++++-- src/locales/en.json | 11 +- src/store/pbx-config/actions.js | 11 +- src/store/pbx-config/getters.js | 9 + src/store/pbx-config/mutations.js | 16 +- src/store/pbx-config/state.js | 5 +- src/themes/app.common.styl | 2 +- 14 files changed, 512 insertions(+), 60 deletions(-) create mode 100644 src/components/pages/PbxConfiguration/CscPbxDevicesFilter.vue create mode 100644 src/components/pages/PbxConfiguration/CscPbxDevicesToolbar.vue create mode 100644 src/components/pages/PbxConfiguration/CscPbxMacInput.vue diff --git a/src/api/pbx-config.js b/src/api/pbx-config.js index e53993ce..ca01bc89 100644 --- a/src/api/pbx-config.js +++ b/src/api/pbx-config.js @@ -200,12 +200,16 @@ export function getDeviceList(options) { let params = { page: options.page, profile_id: options.profile_id, + identifier: options.identifier, order_by: PBX_CONFIG_ORDER_BY, order_by_direction: PBX_CONFIG_ORDER_DIRECTION }; if(params.profile_id === null) { delete params['profile_id']; } + if(params.identifier === null) { + delete params['identifier']; + } return getDevices({ params: params }).then((devices)=>{ diff --git a/src/components/pages/PbxConfiguration/CscPbxDeviceAddForm.vue b/src/components/pages/PbxConfiguration/CscPbxDeviceAddForm.vue index 19d664a5..0e624fcc 100644 --- a/src/components/pages/PbxConfiguration/CscPbxDeviceAddForm.vue +++ b/src/components/pages/PbxConfiguration/CscPbxDeviceAddForm.vue @@ -1,6 +1,6 @@ + + + + + + diff --git a/src/components/pages/PbxConfiguration/CscPbxDevicesToolbar.vue b/src/components/pages/PbxConfiguration/CscPbxDevicesToolbar.vue new file mode 100644 index 00000000..25b2c0a0 --- /dev/null +++ b/src/components/pages/PbxConfiguration/CscPbxDevicesToolbar.vue @@ -0,0 +1,163 @@ + + + + + diff --git a/src/components/pages/PbxConfiguration/CscPbxMacInput.vue b/src/components/pages/PbxConfiguration/CscPbxMacInput.vue new file mode 100644 index 00000000..b1d3af64 --- /dev/null +++ b/src/components/pages/PbxConfiguration/CscPbxMacInput.vue @@ -0,0 +1,93 @@ + + + + + diff --git a/src/components/pages/PbxConfiguration/CscPbxModelSelect.vue b/src/components/pages/PbxConfiguration/CscPbxModelSelect.vue index a313d687..4799c671 100644 --- a/src/components/pages/PbxConfiguration/CscPbxModelSelect.vue +++ b/src/components/pages/PbxConfiguration/CscPbxModelSelect.vue @@ -8,10 +8,23 @@ :float-label="label" :after="clearButton" /> - - - + + + @@ -24,16 +37,31 @@ -
- +
+