From 7b8b2af27a56a030337da5e3e4c7ca9aa3854b17 Mon Sep 17 00:00:00 2001 From: Vitalii Lysak Date: Thu, 30 Jun 2022 15:23:49 +0300 Subject: fix console btns --- src/views/Operations/Kvm/KvmConsole.vue | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/views/Operations/Kvm/KvmConsole.vue b/src/views/Operations/Kvm/KvmConsole.vue index c028a9fc..a9ae4622 100644 --- a/src/views/Operations/Kvm/KvmConsole.vue +++ b/src/views/Operations/Kvm/KvmConsole.vue @@ -14,9 +14,13 @@ - + -- cgit v1.2.3 From 6ff82e9cf2c487f089044e4fbbcf53418134f707 Mon Sep 17 00:00:00 2001 From: Vitalii Lysak Date: Thu, 30 Jun 2022 17:02:53 +0300 Subject: Revert "fix console btns" This reverts commit 7b8b2af27a56a030337da5e3e4c7ca9aa3854b17. --- src/views/Operations/Kvm/KvmConsole.vue | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/views/Operations/Kvm/KvmConsole.vue b/src/views/Operations/Kvm/KvmConsole.vue index a9ae4622..c028a9fc 100644 --- a/src/views/Operations/Kvm/KvmConsole.vue +++ b/src/views/Operations/Kvm/KvmConsole.vue @@ -14,13 +14,9 @@ - + -- cgit v1.2.3 From 573f483675f586fb3655e0c70ddc7cfb230ce09d Mon Sep 17 00:00:00 2001 From: Vitalii Lysak Date: Thu, 30 Jun 2022 18:51:10 +0300 Subject: upd styles for console --- src/views/Operations/Kvm/KvmConsole.vue | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/views/Operations/Kvm/KvmConsole.vue b/src/views/Operations/Kvm/KvmConsole.vue index c028a9fc..02c8f520 100644 --- a/src/views/Operations/Kvm/KvmConsole.vue +++ b/src/views/Operations/Kvm/KvmConsole.vue @@ -2,7 +2,10 @@
- +
{{ $t('pageKvm.status') }}: @@ -14,9 +17,10 @@
- + -- cgit v1.2.3 From 80c7c1e016711952d4d9d8521ee25d11fcde8bbd Mon Sep 17 00:00:00 2001 From: Vitalii Lysak Date: Thu, 30 Jun 2022 19:13:33 +0300 Subject: upd styles for console, part 2 --- src/views/Operations/Kvm/KvmConsole.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/Operations/Kvm/KvmConsole.vue b/src/views/Operations/Kvm/KvmConsole.vue index 02c8f520..de6dd061 100644 --- a/src/views/Operations/Kvm/KvmConsole.vue +++ b/src/views/Operations/Kvm/KvmConsole.vue @@ -1,10 +1,10 @@ + @@ -37,8 +41,12 @@ import PageTitle from '@/components/Global/PageTitle'; import PageSection from '@/components/Global/PageSection'; +import TableFilterMixin from '@/components/Mixins/TableFilterMixin'; +import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin'; + export default { components: { PageTitle, PageSection }, + mixins: [TableFilterMixin, DataFormatterMixin], data() { return { isBusy: true, @@ -72,11 +80,11 @@ export default { tdClass: 'regular-12px bootstrap-rounded-table__td', }, { - key: 'value', + key: 'currentValue', label: 'Номинальная скорость, об/мин', formatter: this.dataFormatter, thClass: 'semi-bold-12px__caps bootstrap-rounded-table__head_bg', - class: `bootstrap-rounded-table__column-last + class: `bootstrap-rounded-table__column-last fans-table-col-third`, tdClass: 'regular-12px bootstrap-rounded-table__td', }, @@ -101,8 +109,32 @@ export default { value: '2400', }, ], + activeFilters: [], }; }, + + computed: { + allSensors() { + return this.$store.getters['sensors/sensors']; + }, + + filteredSensors() { + console.log('wow!'); + console.log('this.allSensors!', this.allSensors); + console.log('this.activeFilters!', this.activeFilters); + console.log( + 'eeeeeeeeeeeeeee!', + this.getFilteredTableData(this.allSensors, this.activeFilters) + ); + return this.getFilteredTableData(this.allSensors, this.activeFilters); + }, + }, + + created() { + this.$store.dispatch('sensors/getAllSensors').finally(() => { + this.isBusy = false; + }); + }, }; -- cgit v1.2.3 From a1609142e4f59a1e731ab6472792d3cfe6014f40 Mon Sep 17 00:00:00 2001 From: Vitalii Lysak Date: Mon, 4 Jul 2022 10:49:11 +0300 Subject: fixs for sensors --- src/locales/ru-RU.json | 12 ++++++------ src/views/Fans/StaticInformation/FansStaticPage.vue | 19 +++++++++++++++++-- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/locales/ru-RU.json b/src/locales/ru-RU.json index 75ff4c1b..6a9f7d50 100644 --- a/src/locales/ru-RU.json +++ b/src/locales/ru-RU.json @@ -41,9 +41,9 @@ }, "date": { "lastHour": "Последний час", - "lastDay": "Последние сутки", + "lastDay": "Последние сутки", "lastWeek": "Последняя неделя", - "lastMounth": "Последний месяц", + "lastMounth": "Последний месяц", "lastYear": "Последний год", "selectDate": "Выбрать период" }, @@ -179,7 +179,7 @@ "ethernetAdapters": "Ethetnet-адаптеры", "fcHbaAdapters": "FC-HBA-адаптеры", "pciDevices": "PCI-устройства", - + "resourceManagement": "Управление ресурсами", "securityAndAccess": "Безопасность и доступ", "sessions": "@:appPageTitle.sessions", @@ -210,7 +210,7 @@ "description": { "configuration": "Конфигурация" } - }, + }, "appPageTitle": { "changePassword": "Изменить пароль", @@ -593,7 +593,6 @@ "upload": "Начать загрузку", "urlAdress": "URL-адрес сервера", "connectionType": "Тип подключения" - }, "pageLdap": { "pageDescription": "Настройка параметров LDAP и управление группами", @@ -1140,7 +1139,8 @@ "outputPower": "Выходная мощность", "voltageWarning": "Пороговое значение предупреждения, B", "voltageShutdown": "Пороговое значениe отказа, B", - "amperage": "Сила тока" + "cpu": "Процессор", + "system": "Системная плата" }, "RAID": { "cache": "Cache RAID-контроллеров", diff --git a/src/views/Fans/StaticInformation/FansStaticPage.vue b/src/views/Fans/StaticInformation/FansStaticPage.vue index ba312384..56a5c183 100644 --- a/src/views/Fans/StaticInformation/FansStaticPage.vue +++ b/src/views/Fans/StaticInformation/FansStaticPage.vue @@ -30,7 +30,7 @@
@@ -115,7 +115,22 @@ export default { computed: { allSensors() { - return this.$store.getters['sensors/sensors']; + let sensors = this.$store.getters['sensors/sensors']; + if (this.isSensorsExist) { + sensors.forEach((sensor) => { + sensor.type = sensor.name.toLowerCase().includes('cpu') + ? this.$t('tablesDescription.cpu') + : this.$t('tablesDescription.system'); + }); + } + return sensors; + }, + + isSensorsExist() { + return ( + this.$store.getters['sensors/sensors'] && + this.$store.getters['sensors/sensors'].length > 0 + ); }, filteredSensors() { -- cgit v1.2.3 From c8d25fd2b9ecb1395fa086a727d238489d568908 Mon Sep 17 00:00:00 2001 From: Vitalii Lysak Date: Mon, 4 Jul 2022 12:01:39 +0300 Subject: fixs for cash of sensors --- src/store/modules/HardwareStatus/SensorsStore.js | 11 ++++++----- src/views/Fans/StaticInformation/FansStaticPage.vue | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/store/modules/HardwareStatus/SensorsStore.js b/src/store/modules/HardwareStatus/SensorsStore.js index f28c50ea..896297e3 100644 --- a/src/store/modules/HardwareStatus/SensorsStore.js +++ b/src/store/modules/HardwareStatus/SensorsStore.js @@ -5,14 +5,19 @@ const SensorsStore = { namespaced: true, state: { sensors: [], + fanSensors: [], }, getters: { sensors: (state) => state.sensors, + fanSensors: (state) => state.fanSensors, }, mutations: { setSensors: (state, sensors) => { state.sensors = uniqBy([...state.sensors, ...sensors], 'name'); }, + setFanSensors: (state, fanSensors) => { + state.fanSensors = uniqBy([...state.fanSensors, ...fanSensors], 'name'); + }, }, actions: { async getAllSensors({ dispatch }) { @@ -95,14 +100,10 @@ const SensorsStore = { name: data.Name, status: data.Status.Health, currentValue: data.Reading, - lowerCaution: data.Thresholds?.LowerCaution?.Reading, - upperCaution: data.Thresholds?.UpperCaution?.Reading, - lowerCritical: data.Thresholds?.LowerCritical?.Reading, - upperCritical: data.Thresholds?.UpperCritical?.Reading, units: data.ReadingUnits, }; }); - commit('setSensors', sensorData); + commit('setFanSensors', sensorData); }) ); }, diff --git a/src/views/Fans/StaticInformation/FansStaticPage.vue b/src/views/Fans/StaticInformation/FansStaticPage.vue index 56a5c183..a9f2d68b 100644 --- a/src/views/Fans/StaticInformation/FansStaticPage.vue +++ b/src/views/Fans/StaticInformation/FansStaticPage.vue @@ -115,7 +115,7 @@ export default { computed: { allSensors() { - let sensors = this.$store.getters['sensors/sensors']; + let sensors = this.$store.getters['sensors/fanSensors']; if (this.isSensorsExist) { sensors.forEach((sensor) => { sensor.type = sensor.name.toLowerCase().includes('cpu') @@ -128,8 +128,8 @@ export default { isSensorsExist() { return ( - this.$store.getters['sensors/sensors'] && - this.$store.getters['sensors/sensors'].length > 0 + this.$store.getters['sensors/fanSensors'] && + this.$store.getters['sensors/fanSensors'].length > 0 ); }, -- cgit v1.2.3