summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitalii Lysak <v.lysak@dunice.net>2022-07-04 18:31:58 +0300
committerVitalii Lysak <v.lysak@dunice.net>2022-07-04 18:31:58 +0300
commit83b1f3104e0564ca40bdeaf08f7f728e423e7f85 (patch)
tree77169f2a7747b49946387bc8cfe14fa4390c16a3
parent62460aec15fd7bd4086810b74f8efddeb4a4cf7a (diff)
downloadwebui-vue-83b1f3104e0564ca40bdeaf08f7f728e423e7f85.tar.xz
add other tabs
-rw-r--r--src/components/AppNavigation/AppNavigationMixin.js102
-rw-r--r--src/views/Fans/DynamicInformation/IndicatorsTable.vue41
2 files changed, 90 insertions, 53 deletions
diff --git a/src/components/AppNavigation/AppNavigationMixin.js b/src/components/AppNavigation/AppNavigationMixin.js
index fc34b3af..36d9217b 100644
--- a/src/components/AppNavigation/AppNavigationMixin.js
+++ b/src/components/AppNavigation/AppNavigationMixin.js
@@ -95,40 +95,40 @@ export const AppNavigationMixin = {
// },
// ],
// },
- // {
- // id: 'power',
- // label: this.$t('appNavigation.powerSupplies'),
- // icon: 'iconChevronUp',
- // children: [
- // {
- // id: 'power-specification',
- // label: this.$t('appNavigation.specification'),
- // route: '/power-specification',
- // },
- // {
- // id: 'power-dynamic-info',
- // label: this.$t('appNavigation.analyticalPanel'),
- // route: '/power-dynamic-info',
- // },
- // ],
- // },
- // {
- // id: 'memory',
- // label: this.$t('appNavigation.memoryModules'),
- // icon: 'iconChevronUp',
- // children: [
- // {
- // id: 'memory-specification',
- // label: this.$t('appNavigation.specification'),
- // route: '/memory-specification',
- // },
- // {
- // id: 'memory-dynamic-info',
- // label: this.$t('appNavigation.analyticalPanel'),
- // route: '/memory-dynamic-info',
- // },
- // ],
- // },
+ {
+ id: 'power',
+ label: this.$t('appNavigation.powerSupplies'),
+ icon: 'iconChevronUp',
+ children: [
+ {
+ id: 'power-specification',
+ label: this.$t('appNavigation.specification'),
+ route: '/power-specification',
+ },
+ {
+ id: 'power-dynamic-info',
+ label: this.$t('appNavigation.analyticalPanel'),
+ route: '/power-dynamic-info',
+ },
+ ],
+ },
+ {
+ id: 'memory',
+ label: this.$t('appNavigation.memoryModules'),
+ icon: 'iconChevronUp',
+ children: [
+ {
+ id: 'memory-specification',
+ label: this.$t('appNavigation.specification'),
+ route: '/memory-specification',
+ },
+ {
+ id: 'memory-dynamic-info',
+ label: this.$t('appNavigation.analyticalPanel'),
+ route: '/memory-dynamic-info',
+ },
+ ],
+ },
{
id: 'fans',
label: this.$t('appNavigation.fans'),
@@ -168,23 +168,23 @@ export const AppNavigationMixin = {
// label: this.$t('appNavigation.virtualDrivers'),
// route: '/virtual-drivers',
// },
- // {
- // id: 'motherboard',
- // label: this.$t('appNavigation.motherboard'),
- // icon: 'iconChevronUp',
- // children: [
- // {
- // id: 'motherboard-specification',
- // label: this.$t('appNavigation.specification'),
- // route: '/motherboard-specification',
- // },
- // {
- // id: 'motherboard-dynamic-info',
- // label: this.$t('appNavigation.analyticalPanel'),
- // route: '/motherboard-dynamic-info',
- // },
- // ],
- // },
+ {
+ id: 'motherboard',
+ label: this.$t('appNavigation.motherboard'),
+ icon: 'iconChevronUp',
+ children: [
+ {
+ id: 'motherboard-specification',
+ label: this.$t('appNavigation.specification'),
+ route: '/motherboard-specification',
+ },
+ {
+ id: 'motherboard-dynamic-info',
+ label: this.$t('appNavigation.analyticalPanel'),
+ route: '/motherboard-dynamic-info',
+ },
+ ],
+ },
// {
// id: 'network-adapters',
// label: this.$t('appNavigation.networkAdapters'),
diff --git a/src/views/Fans/DynamicInformation/IndicatorsTable.vue b/src/views/Fans/DynamicInformation/IndicatorsTable.vue
index de0823c0..22789bc3 100644
--- a/src/views/Fans/DynamicInformation/IndicatorsTable.vue
+++ b/src/views/Fans/DynamicInformation/IndicatorsTable.vue
@@ -6,7 +6,8 @@
<b-table
responsive="md"
class="bootstrap-fans-table bootstrap-fans-table__stripes"
- :items="items"
+ :items="filteredSensors"
+ :busy="isBusy"
:fields="fields"
>
<template #cell(name)="{ value, index }">
@@ -42,10 +43,15 @@
import PageSection from '@/components/Global/PageSection';
import { colors } from './helpers';
+import TableFilterMixin from '@/components/Mixins/TableFilterMixin';
+import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin';
+
export default {
components: { PageSection },
+ mixins: [TableFilterMixin, DataFormatterMixin],
data() {
return {
+ isBusy: true,
colors,
fields: [
{
@@ -56,7 +62,7 @@ export default {
tdClass: 'bootstrap-fans-table__td light-12px',
},
{
- key: 'currentSpeed',
+ key: 'currentValue',
label: 'Текущая',
formatter: this.dataFormatter,
thClass: 'bootstrap-fans-table__th medium-12px',
@@ -156,6 +162,37 @@ export default {
],
};
},
+
+ computed: {
+ allSensors() {
+ let sensors = this.$store.getters['sensors/fanSensors'];
+ 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/fanSensors'] &&
+ this.$store.getters['sensors/fanSensors'].length > 0
+ );
+ },
+
+ filteredSensors() {
+ return this.getFilteredTableData(this.allSensors, this.activeFilters);
+ },
+ },
+
+ created() {
+ this.$store.dispatch('sensors/getFanSensors').finally(() => {
+ this.isBusy = false;
+ });
+ },
};
</script>
<style lang="scss">