diff options
author | Vitalii Lysak <v.lysak@dunice.net> | 2022-08-03 11:09:45 +0300 |
---|---|---|
committer | Vitalii Lysak <v.lysak@dunice.net> | 2022-08-03 11:09:45 +0300 |
commit | 70c9b5d3c005b88d70b9baee23a66e8fe3ac6add (patch) | |
tree | c375f400c5211a8ef5d858e054477aaaedcce4c3 /src/views/_sila | |
parent | 7721bc3be40731c87003af5cc17c78b6001c0bc1 (diff) | |
parent | 2bc1f8e8b37913d39cc2476c9f18869f1692b3a7 (diff) | |
download | webui-vue-70c9b5d3c005b88d70b9baee23a66e8fe3ac6add.tar.xz |
Merge branch 'sila-ui' into sila
Diffstat (limited to 'src/views/_sila')
90 files changed, 1925 insertions, 458 deletions
diff --git a/src/views/_sila/ChangePassword/ChangePassword.vue b/src/views/_sila/ChangePassword/ChangePassword.vue index 2440ace1..9bd243d1 100644 --- a/src/views/_sila/ChangePassword/ChangePassword.vue +++ b/src/views/_sila/ChangePassword/ChangePassword.vue @@ -73,10 +73,10 @@ <script> import { required, sameAs } from 'vuelidate/lib/validators'; -import Alert from '@/components/Global/Alert'; -import VuelidateMixin from '@/components/Mixins/VuelidateMixin'; -import InputPasswordToggle from '@/components/Global/InputPasswordToggle'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; +import Alert from '@/components/_sila/Global/Alert'; +import VuelidateMixin from '@/components/_sila/Mixins/VuelidateMixin'; +import InputPasswordToggle from '@/components/_sila/Global/InputPasswordToggle'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; export default { name: 'ChangePassword', diff --git a/src/views/_sila/Fans/Dynamic/FanSpeed.vue b/src/views/_sila/Fans/Dynamic/FanSpeed.vue new file mode 100644 index 00000000..d2ecde50 --- /dev/null +++ b/src/views/_sila/Fans/Dynamic/FanSpeed.vue @@ -0,0 +1,227 @@ +<template> + <div> + <b-col class="d-flex flex-nowrap align-items-center page-divider"> + <img src="@/assets/images/_sila/collapsed/fan.svg" /> + {{ $t('pageFans.speed') }} + </b-col> + <b-row class="align-items-end limit-container"> + <b-col xs="12" sm="6" md="4" class="pt-2"> + <b-form-group :label="$t('pageFans.labels.warning')"> + <b-form-input v-model="warning" type="number" :min="0" :max="3150"> + </b-form-input> + </b-form-group> + </b-col> + <b-col xs="12" sm="6" md="4" class="pt-2"> + <b-form-group :label="$t('pageFans.labels.shutdown')"> + <b-form-input + v-model="shutdown" + :min="warning" + :max="4000" + type="number" + ></b-form-input> + </b-form-group> + </b-col> + <b-col xs="12" sm="6" md="4" class="pt-2"> + <b-button variant="primary" style="height: 35px"> + {{ $t('global.action.save') }} + </b-button> + </b-col> + </b-row> + <chart + type="fans" + :colors="colors" + :time-scale="timeScale" + :data="filteredSensors" + :warning="warning" + :shutdown="shutdown" + ></chart> + + <b-table + v-if="items && items.length > 0" + responsive="md" + show-empty + table-variant="accessory" + hover + :items="items" + :fields="fields" + :empty-text="$t('global.table.emptyMessage')" + > + <template #cell(name)="{ value, index }"> + <div + class="item-color" + :style="`background-color: ${colors[index]}`" + ></div> + {{ value }} + </template> + <template #cell(minDate)="{ value }"> + <span style="color: rgb(12, 28, 41)"> + {{ value.time }} + </span> + <span> + {{ value.date }} + </span> + </template> + <template #cell(maxDate)="{ value }"> + <span style="color: rgb(12, 28, 41)"> + {{ value.time }} + </span> + <span> + {{ value.date }} + </span> + </template> + <template #cell(pwm)="{ value }"> + <span> + {{ `${value}%` }} + </span> + </template> + </b-table> + </div> +</template> +<script> +import Chart from '@/components/_sila/Global/Chart'; + +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; +import TableFilterMixin from '@/components/_sila/Mixins/TableFilterMixin'; + +import { getItems } from '@/utilities/_sila/metricProperties'; + +export default { + components: { Chart }, + mixins: [DataFormatterMixin, LoadingBarMixin, TableFilterMixin], + props: { + timeScale: { + type: String, + default: 'hour', + }, + }, + data() { + return { + warning: 2450, + shutdown: 3150, + fields: [ + { + key: 'name', + label: this.$t('pageFans.table.name'), + }, + { + key: 'current', + label: this.$t('pageFans.table.current'), + }, + { + key: 'middle', + label: this.$t('pageFans.table.middle'), + }, + { + key: 'pwm', + label: this.$t('pageFans.table.pwm'), + }, + { + key: 'min', + label: this.$t('pageFans.table.min'), + }, + { + key: 'minDate', + label: this.$t('pageFans.table.minDate'), + }, + { + key: 'max', + label: this.$t('pageFans.table.max'), + }, + { + key: 'maxDate', + label: this.$t('pageFans.table.maxDate'), + }, + ], + }; + }, + + computed: { + items() { + const allArr = getItems(this.filteredSensors); + + let pwmArr = allArr.filter((item) => { + return item.name.toLowerCase().includes('pwm'); + }); + + let cpuArr = allArr.filter((item) => { + return !item.name.toLowerCase().includes('pwm'); + }); + + return cpuArr.map((cpu) => { + let pwm = pwmArr.find((pwm) => pwm.name === this.getPwmByCpu(cpu.name)) + .middle; + return { + pwm, + ...cpu, + }; + }); + }, + + allSensors() { + return this.timeScale === 'hour' + ? this.$store.getters['fan/fansLastHour'] + : this.$store.getters['fan/fans']; + }, + + filteredSensors() { + return this.getFilteredTableData(this.allSensors, this.activeFilters); + }, + + colors() { + return this.$randomColor({ + count: this.items?.length, + hue: 'random', + luminosity: 'random', + }); + }, + }, + + watch: { + timeScale() { + this.loadData(); + }, + }, + + created() { + this.loadData(); + }, + + methods: { + getPwmByCpu(cpu) { + switch (cpu) { + case 'System_Fan_1': + return 'Pwm_1'; + case 'System_Fan_2': + return 'Pwm_5'; + case 'System_Fan_3': + return 'Pwm_6'; + case 'CPU1_Fan': + return 'Pwm_7'; + case 'CPU2_Fan': + return 'Pwm_8'; + default: + return null; + } + }, + + onOpened(state) { + if (state) { + this.loadData(); + } + }, + + loadData() { + let payload = { lastHour: false }; + if (this.timeScale === 'hour') { + payload = { lastHour: true }; + } + + this.startLoader(); + this.$store.dispatch('fan/getFansDynamic', payload).finally(() => { + this.endLoader(); + }); + }, + }, +}; +</script> diff --git a/src/views/_sila/Fans/Dynamic/FansDynamicPage.vue b/src/views/_sila/Fans/Dynamic/FansDynamicPage.vue new file mode 100644 index 00000000..dda22dfb --- /dev/null +++ b/src/views/_sila/Fans/Dynamic/FansDynamicPage.vue @@ -0,0 +1,43 @@ +<template> + <b-container fluid="xl"> + <page-title :description="$t('appPageTitle.dynamicInformation')" /> + <table-date-picker :time-scale="timeScale" @changePeriod="onChangePeriod" /> + <fan-speed :time-scale="timeScale"></fan-speed> + </b-container> +</template> + +<script> +import PageTitle from '@/components/_sila/Global/PageTitle'; +import TableDatePicker from '@/components/_sila/Global/TableDatePicker'; + +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; +import TableFilterMixin from '@/components/_sila/Mixins/TableFilterMixin'; + +import FanSpeed from './FanSpeed'; + +export default { + components: { FanSpeed, PageTitle, TableDatePicker }, + mixins: [DataFormatterMixin, LoadingBarMixin, TableFilterMixin], + data() { + return { + timeScale: 'hour', + }; + }, + + methods: { + resetZoom() { + const resetButton = document.querySelector('.highcharts-reset-zoom'); + if (!resetButton) { + return; + } + + resetButton.dispatchEvent(new Event('click')); + }, + onChangePeriod(period) { + this.timeScale = period; + this.resetZoom(); + }, + }, +}; +</script> diff --git a/src/views/_sila/Fans/Dynamic/index.js b/src/views/_sila/Fans/Dynamic/index.js new file mode 100644 index 00000000..a3dadd5a --- /dev/null +++ b/src/views/_sila/Fans/Dynamic/index.js @@ -0,0 +1,2 @@ +import FansDynamicPage from './FansDynamicPage.vue'; +export default FansDynamicPage; diff --git a/src/views/_sila/Fans/Static/FansStaticPage.vue b/src/views/_sila/Fans/Static/FansStaticPage.vue new file mode 100644 index 00000000..dba6edb1 --- /dev/null +++ b/src/views/_sila/Fans/Static/FansStaticPage.vue @@ -0,0 +1,82 @@ +<template> + <b-container fluid="xl"> + <page-title :description="$t('appPageTitle.specification')" /> + <page-section :section-title="$t('pageFans.installedFans')"> + <b-table + responsive="md" + show-empty + hover + :items="fans" + :busy="isBusy" + :fields="fields" + :empty-text="$t('global.table.emptyMessage')" + > + <template #cell(health)="{ value }"> + <status-icon :status="statusIcon(value)" /> + {{ value }} + </template> + </b-table> + </page-section> + </b-container> +</template> + +<script> +import PageTitle from '@/components/_sila/Global/PageTitle'; +import PageSection from '@/components/_sila/Global/PageSection'; + +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; + +import StatusIcon from '@/components/_sila//Global/StatusIcon'; + +export default { + components: { PageTitle, PageSection, StatusIcon }, + mixins: [DataFormatterMixin, LoadingBarMixin], + data() { + return { + isBusy: true, + fields: [ + { + key: 'name', + label: this.$t('pageFans.table.name'), + formatter: this.dataFormatter, + thStyle: { width: '25%' }, + }, + { + key: 'health', + label: this.$t('pageFans.table.health'), + formatter: this.dataFormatter, + thStyle: { width: '25%' }, + tdClass: 'text-nowrap', + }, + { + key: 'type', + label: this.$t('pageFans.table.type'), + formatter: this.dataFormatter, + thStyle: { width: '25%' }, + }, + { + key: 'speedRPM', + label: this.$t('pageFans.table.currentValue'), + formatter: this.dataFormatter, + thStyle: { width: '25%' }, + }, + ], + }; + }, + + computed: { + fans() { + return this.$store.getters['fan/fans']; + }, + }, + + created() { + this.startLoader(); + this.$store.dispatch('fan/getFanInfo').finally(() => { + this.endLoader(); + this.isBusy = false; + }); + }, +}; +</script> diff --git a/src/views/_sila/Fans/Static/index.js b/src/views/_sila/Fans/Static/index.js new file mode 100644 index 00000000..9a5d913d --- /dev/null +++ b/src/views/_sila/Fans/Static/index.js @@ -0,0 +1,2 @@ +import FansStaticPage from './FansStaticPage.vue'; +export default FansStaticPage; diff --git a/src/views/_sila/HardwareStatus/Sensors/Sensors.vue b/src/views/_sila/HardwareStatus/Sensors/Sensors.vue index 6329d9d8..3f9cf6c3 100644 --- a/src/views/_sila/HardwareStatus/Sensors/Sensors.vue +++ b/src/views/_sila/HardwareStatus/Sensors/Sensors.vue @@ -2,26 +2,26 @@ <b-container fluid="xl"> <page-title /> <b-row class="align-items-end"> - <b-col sm="6" md="5" xl="4"> + <b-col sm="8" xl="6" class="search-block d-sm-flex align-items-end mb-4"> <search :placeholder="$t('pageSensors.searchForSensors')" data-test-id="sensors-input-searchForSensors" @change-search="onChangeSearchInput" @clear-search="onClearSearchInput" /> + <div class="ml-sm-4"> + <table-cell-count + :filtered-items-count="filteredRows" + :total-number-of-cells="allSensors.length" + ></table-cell-count> + </div> </b-col> - <b-col sm="3" md="3" xl="2"> - <table-cell-count - :filtered-items-count="filteredRows" - :total-number-of-cells="allSensors.length" - ></table-cell-count> - </b-col> - <b-col sm="3" md="4" xl="6" class="text-right"> + <b-col class="text-right"> <table-filter :filters="tableFilters" @filter-change="onFilterChange" /> </b-col> </b-row> - <b-row> - <b-col xl="12"> + <b-row class="m-0 p-0"> + <b-col class="full-table-container m-0 p-0" xl="12"> <table-toolbar ref="toolbar" :selected-items-count="selectedRows.length" @@ -37,12 +37,12 @@ <b-table ref="table" responsive="md" + table-variant="full" selectable no-select-on-click sort-icon-left hover no-sort-reset - sticky-header="75vh" sort-by="status" show-empty :no-border-collapse="true" @@ -101,26 +101,26 @@ </template> <script> -import PageTitle from '@/components/Global/PageTitle'; -import Search from '@/components/Global/Search'; -import StatusIcon from '@/components/Global/StatusIcon'; -import TableFilter from '@/components/Global/TableFilter'; -import TableToolbar from '@/components/Global/TableToolbar'; -import TableToolbarExport from '@/components/Global/TableToolbarExport'; -import TableCellCount from '@/components/Global/TableCellCount'; +import PageTitle from '@/components/_sila/Global/PageTitle'; +import Search from '@/components/_sila/Global/Search'; +import StatusIcon from '@/components/_sila/Global/StatusIcon'; +import TableFilter from '@/components/_sila/Global/TableFilter'; +import TableToolbar from '@/components/_sila/Global/TableToolbar'; +import TableToolbarExport from '@/components/_sila/Global/TableToolbarExport'; +import TableCellCount from '@/components/_sila/Global/TableCellCount'; import BVTableSelectableMixin, { selectedRows, tableHeaderCheckboxModel, tableHeaderCheckboxIndeterminate, -} from '@/components/Mixins/BVTableSelectableMixin'; -import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin'; -import TableFilterMixin from '@/components/Mixins/TableFilterMixin'; -import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin'; -import TableSortMixin from '@/components/Mixins/TableSortMixin'; +} from '@/components/_sila/Mixins/BVTableSelectableMixin'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; +import TableFilterMixin from '@/components/_sila/Mixins/TableFilterMixin'; +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; +import TableSortMixin from '@/components/_sila/Mixins/TableSortMixin'; import SearchFilterMixin, { searchFilter, -} from '@/components/Mixins/SearchFilterMixin'; +} from '@/components/_sila/Mixins/SearchFilterMixin'; export default { name: 'Sensors', diff --git a/src/views/_sila/Login/Login.vue b/src/views/_sila/Login/Login.vue index 8d96573a..b3bd37c8 100644 --- a/src/views/_sila/Login/Login.vue +++ b/src/views/_sila/Login/Login.vue @@ -65,10 +65,10 @@ <script> import { required } from 'vuelidate/lib/validators'; -import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js'; +import VuelidateMixin from '@/components/_sila/Mixins/VuelidateMixin.js'; import i18n from '@/i18n'; -import Alert from '@/components/Global/Alert'; -import InputPasswordToggle from '@/components/Global/InputPasswordToggle'; +import Alert from '@/components/_sila/Global/Alert'; +import InputPasswordToggle from '@/components/_sila/Global/InputPasswordToggle'; export default { name: 'Login', @@ -87,10 +87,6 @@ export default { text: 'English', }, { - value: 'es', - text: 'Español', - }, - { value: 'ru-RU', text: 'Русский', }, @@ -133,9 +129,9 @@ export default { }) .then((passwordChangeRequired) => { if (passwordChangeRequired) { - this.$router.push('/change-password'); + window.location.href = '/change-password'; } else { - this.$router.push('/'); + window.location.href = '/'; } }) .catch((error) => console.log(error)) diff --git a/src/views/_sila/Logs/Dumps/Dumps.vue b/src/views/_sila/Logs/Dumps/Dumps.vue index 81c9de04..523d36d0 100644 --- a/src/views/_sila/Logs/Dumps/Dumps.vue +++ b/src/views/_sila/Logs/Dumps/Dumps.vue @@ -147,30 +147,30 @@ import IconDelete from '@carbon/icons-vue/es/trash-can/20'; import IconDownload from '@carbon/icons-vue/es/download/20'; import DumpsForm from './DumpsForm'; -import PageSection from '@/components/Global/PageSection'; -import PageTitle from '@/components/Global/PageTitle'; -import Search from '@/components/Global/Search'; -import TableCellCount from '@/components/Global/TableCellCount'; -import TableDateFilter from '@/components/Global/TableDateFilter'; -import TableRowAction from '@/components/Global/TableRowAction'; -import TableToolbar from '@/components/Global/TableToolbar'; +import PageSection from '@/components/_sila/Global/PageSection'; +import PageTitle from '@/components/_sila/Global/PageTitle'; +import Search from '@/components/_sila/Global/Search'; +import TableCellCount from '@/components/_sila/Global/TableCellCount'; +import TableDateFilter from '@/components/_sila/Global/TableDateFilter'; +import TableRowAction from '@/components/_sila/Global/TableRowAction'; +import TableToolbar from '@/components/_sila/Global/TableToolbar'; import BVTableSelectableMixin, { selectedRows, tableHeaderCheckboxModel, tableHeaderCheckboxIndeterminate, -} from '@/components/Mixins/BVTableSelectableMixin'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; +} from '@/components/_sila/Mixins/BVTableSelectableMixin'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; import BVPaginationMixin, { currentPage, perPage, itemsPerPageOptions, -} from '@/components/Mixins/BVPaginationMixin'; -import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin'; +} from '@/components/_sila/Mixins/BVPaginationMixin'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; import SearchFilterMixin, { searchFilter, -} from '@/components/Mixins/SearchFilterMixin'; -import TableFilter from '@/components/Global/TableFilter'; -import TableFilterMixin from '@/components/Mixins/TableFilterMixin'; +} from '@/components/_sila/Mixins/SearchFilterMixin'; +import TableFilter from '@/components/_sila/Global/TableFilter'; +import TableFilterMixin from '@/components/_sila/Mixins/TableFilterMixin'; export default { components: { diff --git a/src/views/_sila/Logs/Dumps/DumpsForm.vue b/src/views/_sila/Logs/Dumps/DumpsForm.vue index 07f4a060..acd755c7 100644 --- a/src/views/_sila/Logs/Dumps/DumpsForm.vue +++ b/src/views/_sila/Logs/Dumps/DumpsForm.vue @@ -35,9 +35,9 @@ <script> import { required } from 'vuelidate/lib/validators'; import ModalConfirmation from './DumpsModalConfirmation'; -import Alert from '@/components/Global/Alert'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; -import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js'; +import Alert from '@/components/_sila/Global/Alert'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; +import VuelidateMixin from '@/components/_sila/Mixins/VuelidateMixin.js'; export default { components: { Alert, ModalConfirmation }, diff --git a/src/views/_sila/Logs/Dumps/DumpsModalConfirmation.vue b/src/views/_sila/Logs/Dumps/DumpsModalConfirmation.vue index f8e20cfd..49ef960e 100644 --- a/src/views/_sila/Logs/Dumps/DumpsModalConfirmation.vue +++ b/src/views/_sila/Logs/Dumps/DumpsModalConfirmation.vue @@ -38,8 +38,8 @@ </template> <script> -import StatusIcon from '@/components/Global/StatusIcon'; -import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js'; +import StatusIcon from '@/components/_sila/Global/StatusIcon'; +import VuelidateMixin from '@/components/_sila/Mixins/VuelidateMixin.js'; export default { components: { StatusIcon }, diff --git a/src/views/_sila/Logs/EventLogs/EventLogs.vue b/src/views/_sila/Logs/EventLogs/EventLogs.vue index 5b8ca110..bc276b29 100644 --- a/src/views/_sila/Logs/EventLogs/EventLogs.vue +++ b/src/views/_sila/Logs/EventLogs/EventLogs.vue @@ -2,7 +2,7 @@ <b-container fluid="xl"> <page-title /> <b-row class="align-items-start"> - <b-col sm="8" xl="6" class="d-sm-flex align-items-end mb-4"> + <b-col sm="8" xl="6" class="search-block d-sm-flex align-items-end mb-4"> <search :placeholder="$t('pageEventLogs.table.searchLogs')" data-test-id="eventLogs-input-searchLogs" @@ -16,11 +16,11 @@ ></table-cell-count> </div> </b-col> - <b-col sm="8" md="7" xl="6"> + </b-row> + <b-row class="align-items-center date-filter"> + <b-col> <table-date-filter @change="onChangeDateTimeFilter" /> </b-col> - </b-row> - <b-row> <b-col class="text-right"> <table-filter :filters="tableFilters" @filter-change="onFilterChange" /> <b-button @@ -40,8 +40,8 @@ </b-button> </b-col> </b-row> - <b-row> - <b-col> + <b-row class="m-0 p-0"> + <b-col class="full-table-container m-0 p-0"> <table-toolbar ref="toolbar" :selected-items-count="selectedRows.length" @@ -66,6 +66,7 @@ id="table-event-logs" ref="table" responsive="md" + table-variant="full" selectable no-select-on-click sort-icon-left @@ -247,37 +248,37 @@ import IconChevron from '@carbon/icons-vue/es/chevron--down/20'; import IconDownload from '@carbon/icons-vue/es/download/20'; import { omit } from 'lodash'; -import PageTitle from '@/components/Global/PageTitle'; -import StatusIcon from '@/components/Global/StatusIcon'; -import Search from '@/components/Global/Search'; -import TableCellCount from '@/components/Global/TableCellCount'; -import TableDateFilter from '@/components/Global/TableDateFilter'; -import TableFilter from '@/components/Global/TableFilter'; -import TableRowAction from '@/components/Global/TableRowAction'; -import TableToolbar from '@/components/Global/TableToolbar'; -import TableToolbarExport from '@/components/Global/TableToolbarExport'; +import PageTitle from '@/components/_sila/Global/PageTitle'; +import StatusIcon from '@/components/_sila/Global/StatusIcon'; +import Search from '@/components/_sila/Global/Search'; +import TableCellCount from '@/components/_sila/Global/TableCellCount'; +import TableDateFilter from '@/components/_sila/Global/TableDateFilter'; +import TableFilter from '@/components/_sila/Global/TableFilter'; +import TableRowAction from '@/components/_sila/Global/TableRowAction'; +import TableToolbar from '@/components/_sila/Global/TableToolbar'; +import TableToolbarExport from '@/components/_sila/Global/TableToolbarExport'; -import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin'; -import TableFilterMixin from '@/components/Mixins/TableFilterMixin'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; +import TableFilterMixin from '@/components/_sila/Mixins/TableFilterMixin'; import BVPaginationMixin, { currentPage, perPage, itemsPerPageOptions, -} from '@/components/Mixins/BVPaginationMixin'; +} from '@/components/_sila/Mixins/BVPaginationMixin'; import BVTableSelectableMixin, { selectedRows, tableHeaderCheckboxModel, tableHeaderCheckboxIndeterminate, -} from '@/components/Mixins/BVTableSelectableMixin'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; -import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin'; -import TableSortMixin from '@/components/Mixins/TableSortMixin'; +} from '@/components/_sila/Mixins/BVTableSelectableMixin'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; +import TableSortMixin from '@/components/_sila/Mixins/TableSortMixin'; import TableRowExpandMixin, { expandRowLabel, -} from '@/components/Mixins/TableRowExpandMixin'; +} from '@/components/_sila/Mixins/TableRowExpandMixin'; import SearchFilterMixin, { searchFilter, -} from '@/components/Mixins/SearchFilterMixin'; +} from '@/components/_sila/Mixins/SearchFilterMixin'; export default { components: { diff --git a/src/views/_sila/Logs/PostCodeLogs/PostCodeLogs.vue b/src/views/_sila/Logs/PostCodeLogs/PostCodeLogs.vue index d116d2ed..63b74bc9 100644 --- a/src/views/_sila/Logs/PostCodeLogs/PostCodeLogs.vue +++ b/src/views/_sila/Logs/PostCodeLogs/PostCodeLogs.vue @@ -2,7 +2,7 @@ <b-container fluid="xl"> <page-title /> <b-row class="align-items-start"> - <b-col sm="8" xl="6" class="d-sm-flex align-items-end mb-4"> + <b-col sm="8" xl="6" class="search-block d-sm-flex align-items-end mb-4"> <search :placeholder="$t('pagePostCodeLogs.table.searchLogs')" @change-search="onChangeSearchInput" @@ -15,12 +15,12 @@ ></table-cell-count> </div> </b-col> - <b-col sm="8" md="7" xl="6"> + </b-row> + <b-row class="align-items-center date-filter"> + <b-col> <table-date-filter @change="onChangeDateTimeFilter" /> </b-col> - </b-row> - <b-row> - <b-col xl="12" class="text-right"> + <b-col class="text-right"> <b-button variant="primary" :disabled="allLogs.length === 0" @@ -31,8 +31,8 @@ </b-button> </b-col> </b-row> - <b-row> - <b-col> + <b-row class="m-0 p-0"> + <b-col class="full-table-container m-0 p-0"> <table-toolbar ref="toolbar" :selected-items-count="selectedRows.length" @@ -49,6 +49,7 @@ id="table-post-code-logs" ref="table" responsive="md" + table-variant="full" selectable no-select-on-click sort-icon-left @@ -151,33 +152,33 @@ import IconDownload from '@carbon/icons-vue/es/download/20'; import IconExport from '@carbon/icons-vue/es/document--export/20'; import { omit } from 'lodash'; -import PageTitle from '@/components/Global/PageTitle'; -import Search from '@/components/Global/Search'; -import TableCellCount from '@/components/Global/TableCellCount'; -import TableDateFilter from '@/components/Global/TableDateFilter'; -import TableRowAction from '@/components/Global/TableRowAction'; -import TableToolbar from '@/components/Global/TableToolbar'; -import TableToolbarExport from '@/components/Global/TableToolbarExport'; -import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin'; -import TableFilterMixin from '@/components/Mixins/TableFilterMixin'; +import PageTitle from '@/components/_sila/Global/PageTitle'; +import Search from '@/components/_sila/Global/Search'; +import TableCellCount from '@/components/_sila/Global/TableCellCount'; +import TableDateFilter from '@/components/_sila/Global/TableDateFilter'; +import TableRowAction from '@/components/_sila/Global/TableRowAction'; +import TableToolbar from '@/components/_sila/Global/TableToolbar'; +import TableToolbarExport from '@/components/_sila/Global/TableToolbarExport'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; +import TableFilterMixin from '@/components/_sila/Mixins/TableFilterMixin'; import BVPaginationMixin, { currentPage, perPage, itemsPerPageOptions, -} from '@/components/Mixins/BVPaginationMixin'; +} from '@/components/_sila/Mixins/BVPaginationMixin'; import BVTableSelectableMixin, { selectedRows, tableHeaderCheckboxModel, tableHeaderCheckboxIndeterminate, -} from '@/components/Mixins/BVTableSelectableMixin'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; -import TableSortMixin from '@/components/Mixins/TableSortMixin'; +} from '@/components/_sila/Mixins/BVTableSelectableMixin'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; +import TableSortMixin from '@/components/_sila/Mixins/TableSortMixin'; import TableRowExpandMixin, { expandRowLabel, -} from '@/components/Mixins/TableRowExpandMixin'; +} from '@/components/_sila/Mixins/TableRowExpandMixin'; import SearchFilterMixin, { searchFilter, -} from '@/components/Mixins/SearchFilterMixin'; +} from '@/components/_sila/Mixins/SearchFilterMixin'; export default { components: { diff --git a/src/views/_sila/Memory/Dynamic/MemoryDynamicPage.vue b/src/views/_sila/Memory/Dynamic/MemoryDynamicPage.vue new file mode 100644 index 00000000..10496829 --- /dev/null +++ b/src/views/_sila/Memory/Dynamic/MemoryDynamicPage.vue @@ -0,0 +1,43 @@ +<template> + <b-container fluid="xl"> + <page-title :description="$t('appPageTitle.dynamicInformation')" /> + <table-date-picker :time-scale="timeScale" @changePeriod="onChangePeriod" /> + <memory-temp :time-scale="timeScale"></memory-temp> + </b-container> +</template> + +<script> +import PageTitle from '@/components/_sila/Global/PageTitle'; +import TableDatePicker from '@/components/_sila/Global/TableDatePicker'; + +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; +import TableFilterMixin from '@/components/_sila/Mixins/TableFilterMixin'; + +import MemoryTemp from './MemoryTemp'; + +export default { + components: { MemoryTemp, PageTitle, TableDatePicker }, + mixins: [DataFormatterMixin, LoadingBarMixin, TableFilterMixin], + data() { + return { + timeScale: 'hour', + }; + }, + + methods: { + resetZoom() { + const resetButton = document.querySelector('.highcharts-reset-zoom'); + if (!resetButton) { + return; + } + + resetButton.dispatchEvent(new Event('click')); + }, + onChangePeriod(period) { + this.timeScale = period; + this.resetZoom(); + }, + }, +}; +</script> diff --git a/src/views/_sila/Memory/Dynamic/MemoryTemp.vue b/src/views/_sila/Memory/Dynamic/MemoryTemp.vue new file mode 100644 index 00000000..2e30683a --- /dev/null +++ b/src/views/_sila/Memory/Dynamic/MemoryTemp.vue @@ -0,0 +1,195 @@ +<template> + <div> + <b-col class="d-flex flex-nowrap align-items-center page-divider"> + <img src="@/assets/images/_sila/collapsed/temperature.svg" /> + {{ $t('pageMemory.temperature') }} + </b-col> + <b-row class="align-items-end limit-container"> + <b-col xs="12" md="6" lg="3" class="pt-2"> + <b-form-group :label="$t('pageMemory.labels.notNormal')"> + <b-form-input + v-model="notNormal" + type="number" + :min="0" + :max="critical" + ></b-form-input> + </b-form-group> + </b-col> + <b-col xs="12" md="6" lg="3" class="pt-2"> + <b-form-group :label="$t('pageMemory.labels.critical')"> + <b-form-input + v-model="critical" + type="number" + :min="notNormal" + :max="warning" + > + </b-form-input> + </b-form-group> + </b-col> + <b-col xs="12" md="6" lg="3" class="pt-2"> + <b-form-group :label="$t('pageMemory.labels.warning')"> + <b-form-input + v-model="warning" + type="number" + :min="critical" + :max="100" + > + </b-form-input> + </b-form-group> + </b-col> + <b-col xs="12" md="6" lg="3" class="pt-2"> + <b-button variant="primary" style="height: 35px"> + {{ $t('global.action.save') }} + </b-button> + </b-col> + </b-row> + <chart + type="memory" + :colors="colors" + :time-scale="timeScale" + :data="filteredSensors" + :warning="warning" + :not-normal="notNormal" + :critical="critical" + ></chart> + <b-table + v-if="items && items.length > 0" + responsive="md" + show-empty + table-variant="accessory" + hover + :items="items" + :fields="fields" + :empty-text="$t('global.table.emptyMessage')" + > + <template #cell(name)="{ value, index }"> + <div + class="item-color" + :style="`background-color: ${colors[index]}`" + ></div> + {{ value }} + </template> + <template #cell(minDate)="{ value }"> + <span style="color: rgb(12, 28, 41)"> + {{ value.time }} + </span> + <span> + {{ value.date }} + </span> + </template> + <template #cell(maxDate)="{ value }"> + <span style="color: rgb(12, 28, 41)"> + {{ value.time }} + </span> + <span> + {{ value.date }} + </span> + </template> + </b-table> + </div> +</template> +<script> +import Chart from '@/components/_sila/Global/Chart'; + +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; +import TableFilterMixin from '@/components/_sila/Mixins/TableFilterMixin'; + +import { getItems } from '@/utilities/_sila/metricProperties'; + +export default { + components: { Chart }, + mixins: [DataFormatterMixin, LoadingBarMixin, TableFilterMixin], + props: { + timeScale: { + type: String, + default: 'hour', + }, + }, + data() { + return { + warning: 72, + notNormal: 44, + critical: 55, + fields: [ + { + key: 'name', + label: this.$t('pageMemory.table.name'), + }, + { + key: 'current', + label: this.$t('pageMemory.table.currentTemperature'), + }, + { + key: 'middle', + label: this.$t('pageMemory.table.middleTemperature'), + }, + { + key: 'min', + label: this.$t('pageMemory.table.minTemperature'), + }, + { + key: 'minDate', + label: this.$t('pageMemory.table.minDate'), + }, + { + key: 'max', + label: this.$t('pageMemory.table.maxTemperature'), + }, + { + key: 'maxDate', + label: this.$t('pageMemory.table.maxDate'), + }, + ], + }; + }, + + computed: { + items() { + return getItems(this.filteredSensors); + }, + + allSensors() { + return this.timeScale === 'hour' + ? this.$store.getters['memory/dimmsLastHour'] + : this.$store.getters['memory/dimms']; + }, + + filteredSensors() { + return this.getFilteredTableData(this.allSensors, this.activeFilters); + }, + + colors() { + return this.$randomColor({ + count: this.items?.length, + hue: 'random', + luminosity: 'random', + }); + }, + }, + + watch: { + timeScale() { + this.loadData(); + }, + }, + + created() { + this.loadData(); + }, + + methods: { + loadData() { + let payload = { lastHour: false }; + if (this.timeScale === 'hour') { + payload = { lastHour: true }; + } + + this.startLoader(); + this.$store.dispatch('memory/getMemoryDynamic', payload).finally(() => { + this.endLoader(); + }); + }, + }, +}; +</script> diff --git a/src/views/_sila/Memory/Dynamic/index.js b/src/views/_sila/Memory/Dynamic/index.js new file mode 100644 index 00000000..b840772c --- /dev/null +++ b/src/views/_sila/Memory/Dynamic/index.js @@ -0,0 +1,2 @@ +import MemoryDynamicPage from './MemoryDynamicPage.vue'; +export default MemoryDynamicPage; diff --git a/src/views/_sila/Motherboard/Dynamic/MotherboardDynamicPage.vue b/src/views/_sila/Motherboard/Dynamic/MotherboardDynamicPage.vue new file mode 100644 index 00000000..c5562f2b --- /dev/null +++ b/src/views/_sila/Motherboard/Dynamic/MotherboardDynamicPage.vue @@ -0,0 +1,43 @@ +<template> + <b-container fluid="xl"> + <page-title :description="$t('appPageTitle.dynamicInformation')" /> + <table-date-picker :time-scale="timeScale" @changePeriod="onChangePeriod" /> + <motherboard-temp :time-scale="timeScale"></motherboard-temp> + </b-container> +</template> + +<script> +import PageTitle from '@/components/_sila/Global/PageTitle'; +import TableDatePicker from '@/components/_sila/Global/TableDatePicker'; + +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; +import TableFilterMixin from '@/components/_sila/Mixins/TableFilterMixin'; + +import MotherboardTemp from './MotherboardTemp'; + +export default { + components: { MotherboardTemp, PageTitle, TableDatePicker }, + mixins: [DataFormatterMixin, LoadingBarMixin, TableFilterMixin], + data() { + return { + timeScale: 'hour', + }; + }, + + methods: { + resetZoom() { + const resetButton = document.querySelector('.highcharts-reset-zoom'); + if (!resetButton) { + return; + } + + resetButton.dispatchEvent(new Event('click')); + }, + onChangePeriod(period) { + this.timeScale = period; + this.resetZoom(); + }, + }, +}; +</script> diff --git a/src/views/_sila/Motherboard/Dynamic/MotherboardTemp.vue b/src/views/_sila/Motherboard/Dynamic/MotherboardTemp.vue new file mode 100644 index 00000000..77acc7bd --- /dev/null +++ b/src/views/_sila/Motherboard/Dynamic/MotherboardTemp.vue @@ -0,0 +1,172 @@ +<template> + <div> + <b-col class="d-flex flex-nowrap align-items-center page-divider"> + <img src="@/assets/images/_sila/collapsed/temperature.svg" /> + {{ $t('pageMotherboard.temperature') }} + </b-col> + + <b-row class="align-items-end limit-container"> + <b-col xs="12" sm="3" class="pt-4"> + <b-form-group :label="$t('pageMotherboard.labels.warning')"> + <b-form-input + v-model="warning" + type="number" + :min="0" + :max="100" + ></b-form-input> + </b-form-group> + </b-col> + <b-col xs="12" sm="6" class="pt-2"> + <b-button variant="primary" style="height: 35px"> + {{ $t('global.action.save') }} + </b-button> + </b-col> + </b-row> + <chart + type="motherboard" + :time-scale="timeScale" + :colors="colors" + :data="filteredSensors" + :warning="warning" + ></chart> + <b-table + v-if="items && items.length > 0" + responsive="md" + show-empty + table-variant="accessory" + hover + :items="items" + :fields="fields" + :empty-text="$t('global.table.emptyMessage')" + > + <template #cell(name)="{ value, index }"> + <div + class="item-color" + :style="`background-color: ${colors[index]}`" + ></div> + {{ value }} + </template> + <template #cell(minDate)="{ value }"> + <span style="color: rgb(12, 28, 41)"> + {{ value.time }} + </span> + <span> + {{ value.date }} + </span> + </template> + <template #cell(maxDate)="{ value }"> + <span style="color: rgb(12, 28, 41)"> + {{ value.time }} + </span> + <span> + {{ value.date }} + </span> + </template> + </b-table> + </div> +</template> +<script> +import Chart from '@/components/_sila/Global/Chart'; + +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; +import TableFilterMixin from '@/components/_sila/Mixins/TableFilterMixin'; + +import { getItems } from '@/utilities/_sila/metricProperties'; + +export default { + components: { Chart }, + mixins: [DataFormatterMixin, LoadingBarMixin, TableFilterMixin], + props: { + timeScale: { + type: String, + default: 'hour', + }, + }, + data() { + return { + warning: 72, + fields: [ + { + key: 'name', + label: this.$t('pageMemory.table.name'), + }, + { + key: 'current', + label: this.$t('pageMemory.table.currentTemperature'), + }, + { + key: 'middle', + label: this.$t('pageMemory.table.middleTemperature'), + }, + { + key: 'min', + label: this.$t('pageMemory.table.minTemperature'), + }, + { + key: 'minDate', + label: this.$t('pageMemory.table.minDate'), + }, + { + key: 'max', + label: this.$t('pageMemory.table.maxTemperature'), + }, + { + key: 'maxDate', + label: this.$t('pageMemory.table.maxDate'), + }, + ], + }; + }, + + computed: { + items() { + return getItems(this.filteredSensors); + }, + + allSensors() { + return this.timeScale === 'hour' + ? this.$store.getters['motherboard/motherboardLastHour'] + : this.$store.getters['motherboard/motherboard']; + }, + + filteredSensors() { + return this.getFilteredTableData(this.allSensors, this.activeFilters); + }, + + colors() { + return this.$randomColor({ + count: this.items?.length, + hue: 'random', + luminosity: 'random', + }); + }, + }, + + watch: { + timeScale() { + this.loadData(); + }, + }, + + created() { + this.loadData(); + }, + + methods: { + loadData() { + let payload = { lastHour: false }; + if (this.timeScale === 'hour') { + payload = { lastHour: true }; + } + + this.startLoader(); + this.$store + .dispatch('motherboard/getMotherboardDynamic', payload) + .finally(() => { + this.endLoader(); + }); + }, + }, +}; +</script> diff --git a/src/views/_sila/Motherboard/Dynamic/index.js b/src/views/_sila/Motherboard/Dynamic/index.js new file mode 100644 index 00000000..bd155997 --- /dev/null +++ b/src/views/_sila/Motherboard/Dynamic/index.js @@ -0,0 +1,2 @@ +import MotherboardDynamicPage from './MotherboardDynamicPage.vue'; +export default MotherboardDynamicPage; diff --git a/src/views/_sila/Operations/FactoryReset/FactoryReset.vue b/src/views/_sila/Operations/FactoryReset/FactoryReset.vue index 897348fc..4e315619 100644 --- a/src/views/_sila/Operations/FactoryReset/FactoryReset.vue +++ b/src/views/_sila/Operations/FactoryReset/FactoryReset.vue @@ -56,9 +56,9 @@ </template> <script> -import PageTitle from '@/components/Global/PageTitle'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; -import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin'; +import PageTitle from '@/components/_sila/Global/PageTitle'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; import ModalReset from './FactoryResetModal'; export default { diff --git a/src/views/_sila/Operations/FactoryReset/FactoryResetModal.vue b/src/views/_sila/Operations/FactoryReset/FactoryResetModal.vue index 170bf284..be2927f3 100644 --- a/src/views/_sila/Operations/FactoryReset/FactoryResetModal.vue +++ b/src/views/_sila/Operations/FactoryReset/FactoryResetModal.vue @@ -3,7 +3,6 @@ id="modal-reset" ref="modal" :title="$t(`pageFactoryReset.modal.${resetType}Title`)" - title-tag="h2" @hidden="resetConfirm" > <p class="mb-2"> @@ -64,8 +63,8 @@ </b-modal> </template> <script> -import StatusIcon from '@/components/Global/StatusIcon'; -import VuelidateMixin from '@/components/Mixins/VuelidateMixin'; +import StatusIcon from '@/components/_sila/Global/StatusIcon'; +import VuelidateMixin from '@/components/_sila/Mixins/VuelidateMixin'; export default { components: { StatusIcon }, diff --git a/src/views/_sila/Operations/Firmware/Firmware.vue b/src/views/_sila/Operations/Firmware/Firmware.vue index a2acb9b0..0497376d 100644 --- a/src/views/_sila/Operations/Firmware/Firmware.vue +++ b/src/views/_sila/Operations/Firmware/Firmware.vue @@ -39,10 +39,12 @@ import AlertsServerPower from './FirmwareAlertServerPower'; import BmcCards from './FirmwareCardsBmc'; import FormUpdate from './FirmwareFormUpdate'; import HostCards from './FirmwareCardsHost'; -import PageSection from '@/components/Global/PageSection'; -import PageTitle from '@/components/Global/PageTitle'; +import PageSection from '@/components/_sila/Global/PageSection'; +import PageTitle from '@/components/_sila/Global/PageTitle'; -import LoadingBarMixin, { loading } from '@/components/Mixins/LoadingBarMixin'; +import LoadingBarMixin, { + loading, +} from '@/components/_sila/Mixins/LoadingBarMixin'; export default { name: 'FirmwareSingleImage', diff --git a/src/views/_sila/Operations/Firmware/FirmwareAlertServerPower.vue b/src/views/_sila/Operations/Firmware/FirmwareAlertServerPower.vue index 24aa1d69..471ccfac 100644 --- a/src/views/_sila/Operations/Firmware/FirmwareAlertServerPower.vue +++ b/src/views/_sila/Operations/Firmware/FirmwareAlertServerPower.vue @@ -31,7 +31,7 @@ </template> <script> -import Alert from '@/components/Global/Alert'; +import Alert from '@/components/_sila/Global/Alert'; export default { components: { Alert }, diff --git a/src/views/_sila/Operations/Firmware/FirmwareCardsBmc.vue b/src/views/_sila/Operations/Firmware/FirmwareCardsBmc.vue index d79a8769..23c263d9 100644 --- a/src/views/_sila/Operations/Firmware/FirmwareCardsBmc.vue +++ b/src/views/_sila/Operations/Firmware/FirmwareCardsBmc.vue @@ -53,9 +53,11 @@ <script> import IconSwitch from '@carbon/icons-vue/es/arrows--horizontal/20'; -import PageSection from '@/components/Global/PageSection'; -import LoadingBarMixin, { loading } from '@/components/Mixins/LoadingBarMixin'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; +import PageSection from '@/components/_sila/Global/PageSection'; +import LoadingBarMixin, { + loading, +} from '@/components/_sila/Mixins/LoadingBarMixin'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; import ModalSwitchToRunning from './FirmwareModalSwitchToRunning'; diff --git a/src/views/_sila/Operations/Firmware/FirmwareCardsHost.vue b/src/views/_sila/Operations/Firmware/FirmwareCardsHost.vue index b4a8e90d..03a25ee5 100644 --- a/src/views/_sila/Operations/Firmware/FirmwareCardsHost.vue +++ b/src/views/_sila/Operations/Firmware/FirmwareCardsHost.vue @@ -37,7 +37,7 @@ </template> <script> -import PageSection from '@/components/Global/PageSection'; +import PageSection from '@/components/_sila/Global/PageSection'; export default { components: { PageSection }, diff --git a/src/views/_sila/Operations/Firmware/FirmwareFormUpdate.vue b/src/views/_sila/Operations/Firmware/FirmwareFormUpdate.vue index ac4b23fc..23fe90f2 100644 --- a/src/views/_sila/Operations/Firmware/FirmwareFormUpdate.vue +++ b/src/views/_sila/Operations/Firmware/FirmwareFormUpdate.vue @@ -75,11 +75,13 @@ <script> import { requiredIf } from 'vuelidate/lib/validators'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; -import LoadingBarMixin, { loading } from '@/components/Mixins/LoadingBarMixin'; -import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; +import LoadingBarMixin, { + loading, +} from '@/components/_sila/Mixins/LoadingBarMixin'; +import VuelidateMixin from '@/components/_sila/Mixins/VuelidateMixin.js'; -import FormFile from '@/components/Global/FormFile'; +import FormFile from '@/components/_sila/Global/FormFile'; import ModalUpdateFirmware from './FirmwareModalUpdateFirmware'; export default { diff --git a/src/views/_sila/Operations/KeyClear/KeyClear.vue b/src/views/_sila/Operations/KeyClear/KeyClear.vue index 2524da10..8955f6cd 100644 --- a/src/views/_sila/Operations/KeyClear/KeyClear.vue +++ b/src/views/_sila/Operations/KeyClear/KeyClear.vue @@ -65,10 +65,10 @@ </template> <script> -import PageTitle from '@/components/Global/PageTitle'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; -import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin'; -import Alert from '@/components/Global/Alert'; +import PageTitle from '@/components/_sila/Global/PageTitle'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; +import Alert from '@/components/_sila/Global/Alert'; export default { name: 'KeyClear', diff --git a/src/views/_sila/Operations/Kvm/Kvm.vue b/src/views/_sila/Operations/Kvm/Kvm.vue index 1a41baaf..ede24608 100644 --- a/src/views/_sila/Operations/Kvm/Kvm.vue +++ b/src/views/_sila/Operations/Kvm/Kvm.vue @@ -8,7 +8,7 @@ </template> <script> -import PageTitle from '@/components/Global/PageTitle'; +import PageTitle from '@/components/_sila/Global/PageTitle'; import KvmConsole from './KvmConsole'; export default { diff --git a/src/views/_sila/Operations/Kvm/KvmConsole.vue b/src/views/_sila/Operations/Kvm/KvmConsole.vue index c028a9fc..50cbff7f 100644 --- a/src/views/_sila/Operations/Kvm/KvmConsole.vue +++ b/src/views/_sila/Operations/Kvm/KvmConsole.vue @@ -42,7 +42,7 @@ <script> import RFB from '@novnc/novnc/core/rfb'; -import StatusIcon from '@/components/Global/StatusIcon'; +import StatusIcon from '@/components/_sila/Global/StatusIcon'; import IconLaunch from '@carbon/icons-vue/es/launch/20'; import IconArrowDown from '@carbon/icons-vue/es/arrow--down/16'; import { throttle } from 'lodash'; diff --git a/src/views/_sila/Operations/RebootBmc/RebootBmc.vue b/src/views/_sila/Operations/RebootBmc/RebootBmc.vue index 900619cd..fa16f55e 100644 --- a/src/views/_sila/Operations/RebootBmc/RebootBmc.vue +++ b/src/views/_sila/Operations/RebootBmc/RebootBmc.vue @@ -34,10 +34,10 @@ </template> <script> -import PageTitle from '@/components/Global/PageTitle'; -import PageSection from '@/components/Global/PageSection'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; -import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin'; +import PageTitle from '@/components/_sila/Global/PageTitle'; +import PageSection from '@/components/_sila/Global/PageSection'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; export default { name: 'RebootBmc', diff --git a/src/views/_sila/Operations/SerialOverLan/SerialOverLan.vue b/src/views/_sila/Operations/SerialOverLan/SerialOverLan.vue index 48a68345..22824772 100644 --- a/src/views/_sila/Operations/SerialOverLan/SerialOverLan.vue +++ b/src/views/_sila/Operations/SerialOverLan/SerialOverLan.vue @@ -9,8 +9,8 @@ </template> <script> -import PageTitle from '@/components/Global/PageTitle'; -import PageSection from '@/components/Global/PageSection'; +import PageTitle from '@/components/_sila/Global/PageTitle'; +import PageSection from '@/components/_sila/Global/PageSection'; import SerialOverLanConsole from './SerialOverLanConsole'; export default { diff --git a/src/views/_sila/Operations/SerialOverLan/SerialOverLanConsole.vue b/src/views/_sila/Operations/SerialOverLan/SerialOverLanConsole.vue index 694083fd..b1087805 100644 --- a/src/views/_sila/Operations/SerialOverLan/SerialOverLanConsole.vue +++ b/src/views/_sila/Operations/SerialOverLan/SerialOverLanConsole.vue @@ -38,13 +38,13 @@ </template> <script> -import Alert from '@/components/Global/Alert'; +import Alert from '@/components/_sila/Global/Alert'; import { AttachAddon } from 'xterm-addon-attach'; import { FitAddon } from 'xterm-addon-fit'; import { Terminal } from 'xterm'; import { throttle } from 'lodash'; import IconLaunch from '@carbon/icons-vue/es/launch/20'; -import StatusIcon from '@/components/Global/StatusIcon'; +import StatusIcon from '@/components/_sila/Global/StatusIcon'; export default { name: 'SerialOverLanConsole', @@ -98,6 +98,8 @@ export default { // Refer https://github.com/xtermjs/xterm.js/ for xterm implementation and addons. this.term = new Terminal({ + cols: 96, + rows: 44, fontSize: 15, fontFamily: 'SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace', diff --git a/src/views/_sila/Operations/ServerPowerOperations/BootSettings.vue b/src/views/_sila/Operations/ServerPowerOperations/BootSettings.vue index 4896286b..8d74e381 100644 --- a/src/views/_sila/Operations/ServerPowerOperations/BootSettings.vue +++ b/src/views/_sila/Operations/ServerPowerOperations/BootSettings.vue @@ -51,8 +51,8 @@ <script> import { mapState } from 'vuex'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; -import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; export default { name: 'BootSettings', diff --git a/src/views/_sila/Operations/ServerPowerOperations/ServerPowerOperations.vue b/src/views/_sila/Operations/ServerPowerOperations/ServerPowerOperations.vue index 9e030837..e848215f 100644 --- a/src/views/_sila/Operations/ServerPowerOperations/ServerPowerOperations.vue +++ b/src/views/_sila/Operations/ServerPowerOperations/ServerPowerOperations.vue @@ -146,12 +146,12 @@ </template> <script> -import PageTitle from '@/components/Global/PageTitle'; -import PageSection from '@/components/Global/PageSection'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; +import PageTitle from '@/components/_sila/Global/PageTitle'; +import PageSection from '@/components/_sila/Global/PageSection'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; import BootSettings from './BootSettings'; -import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin'; -import Alert from '@/components/Global/Alert'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; +import Alert from '@/components/_sila/Global/Alert'; export default { name: 'ServerPowerOperations', diff --git a/src/views/_sila/Operations/VirtualMedia/ModalConfigureConnection.vue b/src/views/_sila/Operations/VirtualMedia/ModalConfigureConnection.vue index b0bcfb2b..9886eff5 100644 --- a/src/views/_sila/Operations/VirtualMedia/ModalConfigureConnection.vue +++ b/src/views/_sila/Operations/VirtualMedia/ModalConfigureConnection.vue @@ -71,7 +71,7 @@ <script> import { required } from 'vuelidate/lib/validators'; -import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js'; +import VuelidateMixin from '@/components/_sila/Mixins/VuelidateMixin.js'; export default { mixins: [VuelidateMixin], diff --git a/src/views/_sila/Operations/VirtualMedia/VirtualMedia.vue b/src/views/_sila/Operations/VirtualMedia/VirtualMedia.vue index 8a3d5add..8b396f41 100644 --- a/src/views/_sila/Operations/VirtualMedia/VirtualMedia.vue +++ b/src/views/_sila/Operations/VirtualMedia/VirtualMedia.vue @@ -8,7 +8,11 @@ > <b-row> <b-col v-for="(dev, $index) in proxyDevices" :key="$index" md="6"> - <b-form-group :label="dev.id" label-class="bold"> + <b-form-group + :label="dev.id" + label-class="bold" + :style="{ 'margin-bottom': dev.isActive ? '0' : '1rem' }" + > <form-file v-if="!dev.isActive" :id="concatId(dev.id)" @@ -21,6 +25,15 @@ </template> </form-file> </b-form-group> + + <div + v-if="dev.isActive && dev.file && dev.file.name" + class="clear-selected-file px-3" + :style="{ 'margin-bottom': '1rem' }" + > + {{ dev.file.name }} + </div> + <b-button v-if="!dev.isActive" variant="primary" @@ -65,25 +78,22 @@ > {{ $t('pageVirtualMedia.configureConnection') }} </b-button> - - <b-button - v-if="!device.isActive" - variant="primary" - class="float-right" - :disabled="!device.serverUri" - @click="startLegacy(device)" - > - {{ $t('pageVirtualMedia.start') }} - </b-button> - <b-button - v-if="device.isActive" - variant="primary" - class="float-right" - @click="stopLegacy(device)" - > - {{ $t('pageVirtualMedia.stop') }} - </b-button> </b-form-group> + <b-button + v-if="!device.isActive" + variant="primary" + :disabled="!device.serverUri" + @click="startLegacy(device)" + > + {{ $t('pageVirtualMedia.start') }} + </b-button> + <b-button + v-if="device.isActive" + variant="primary" + @click="stopLegacy(device)" + > + {{ $t('pageVirtualMedia.stop') }} + </b-button> </b-col> </b-row> </page-section> @@ -97,13 +107,13 @@ </template> <script> -import PageTitle from '@/components/Global/PageTitle'; -import PageSection from '@/components/Global/PageSection'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; -import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin'; +import PageTitle from '@/components/_sila/Global/PageTitle'; +import PageSection from '@/components/_sila/Global/PageSection'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; import ModalConfigureConnection from './ModalConfigureConnection'; import NbdServer from '@/utilities/NBDServer'; -import FormFile from '@/components/Global/FormFile'; +import FormFile from '@/components/_sila/Global/FormFile'; export default { name: 'VirtualMedia', diff --git a/src/views/_sila/Settings/DateTime/DateTime.vue b/src/views/_sila/Overview/DateTime/DateTime.vue index f5e063d1..66871699 100644 --- a/src/views/_sila/Settings/DateTime/DateTime.vue +++ b/src/views/_sila/Overview/DateTime/DateTime.vue @@ -197,15 +197,17 @@ </template> <script> -import Alert from '@/components/Global/Alert'; +import Alert from '@/components/_sila/Global/Alert'; import IconCalendar from '@carbon/icons-vue/es/calendar/20'; -import PageTitle from '@/components/Global/PageTitle'; -import PageSection from '@/components/Global/PageSection'; +import PageTitle from '@/components/_sila/Global/PageTitle'; +import PageSection from '@/components/_sila/Global/PageSection'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; -import LoadingBarMixin, { loading } from '@/components/Mixins/LoadingBarMixin'; -import LocalTimezoneLabelMixin from '@/components/Mixins/LocalTimezoneLabelMixin'; -import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; +import LoadingBarMixin, { + loading, +} from '@/components/_sila/Mixins/LoadingBarMixin'; +import LocalTimezoneLabelMixin from '@/components/_sila/Mixins/LocalTimezoneLabelMixin'; +import VuelidateMixin from '@/components/_sila/Mixins/VuelidateMixin.js'; import { mapState } from 'vuex'; import { requiredIf, helpers } from 'vuelidate/lib/validators'; diff --git a/src/views/_sila/Settings/DateTime/index.js b/src/views/_sila/Overview/DateTime/index.js index 2df21eae..2df21eae 100644 --- a/src/views/_sila/Settings/DateTime/index.js +++ b/src/views/_sila/Overview/DateTime/index.js diff --git a/src/views/_sila/HardwareStatus/Inventory/Inventory.vue b/src/views/_sila/Overview/Inventory/Inventory.vue index fcdbf8d2..a8db953d 100644 --- a/src/views/_sila/HardwareStatus/Inventory/Inventory.vue +++ b/src/views/_sila/Overview/Inventory/Inventory.vue @@ -15,7 +15,7 @@ :data-ref="item.dataRef" @click.prevent="scrollToOffset" > - <jump-link /> {{ item.linkText }} + {{ item.linkText }} </b-link> </div> </b-col> @@ -23,33 +23,33 @@ </page-section> <!-- System table --> - <table-system ref="system" /> + <table-system ref="system" class="inventory-scroll" /> <!-- BMC manager table --> - <table-bmc-manager ref="bmc" /> + <table-bmc-manager ref="bmc" class="inventory-scroll" /> <!-- Chassis table --> - <table-chassis ref="chassis" /> + <table-chassis ref="chassis" class="inventory-scroll" /> <!-- DIMM slot table --> - <table-dimm-slot ref="dimms" /> + <table-dimm-slot ref="dimms" class="inventory-scroll" /> <!-- Fans table --> - <table-fans ref="fans" /> + <table-fans ref="fans" class="inventory-scroll" /> <!-- Power supplies table --> - <table-power-supplies ref="powerSupply" /> + <table-power-supplies ref="powerSupply" class="inventory-scroll" /> <!-- Processors table --> - <table-processors ref="processors" /> + <table-processors ref="processors" class="inventory-scroll" /> <!-- Assembly table --> - <table-assembly ref="assembly" /> + <table-assembly ref="assembly" class="inventory-scroll" /> </b-container> </template> <script> -import PageTitle from '@/components/Global/PageTitle'; +import PageTitle from '@/components/_sila/Global/PageTitle'; import ServiceIndicator from './InventoryServiceIndicator'; import TableSystem from './InventoryTableSystem'; import TablePowerSupplies from './InventoryTablePowerSupplies'; @@ -59,10 +59,9 @@ import TableBmcManager from './InventoryTableBmcManager'; import TableChassis from './InventoryTableChassis'; import TableProcessors from './InventoryTableProcessors'; import TableAssembly from './InventoryTableAssembly'; -import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin'; -import PageSection from '@/components/Global/PageSection'; -import JumpLink16 from '@carbon/icons-vue/es/jump-link/16'; -import JumpLinkMixin from '@/components/Mixins/JumpLinkMixin'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; +import PageSection from '@/components/_sila/Global/PageSection'; +import JumpLinkMixin from '@/components/_sila/Mixins/JumpLinkMixin'; import { chunk } from 'lodash'; export default { @@ -78,7 +77,6 @@ export default { TableProcessors, TableAssembly, PageSection, - JumpLink: JumpLink16, }, mixins: [LoadingBarMixin, JumpLinkMixin], beforeRouteLeave(to, from, next) { @@ -148,6 +146,7 @@ export default { }, }, created() { + console.log(123456, process.env.VUE_APP_ENV_NAME); this.startLoader(); const bmcManagerTablePromise = new Promise((resolve) => { this.$root.$on('hardware-status-bmc-manager-complete', () => resolve()); diff --git a/src/views/_sila/HardwareStatus/Inventory/InventoryServiceIndicator.vue b/src/views/_sila/Overview/Inventory/InventoryServiceIndicator.vue index 01f4a446..b4531be7 100644 --- a/src/views/_sila/HardwareStatus/Inventory/InventoryServiceIndicator.vue +++ b/src/views/_sila/Overview/Inventory/InventoryServiceIndicator.vue @@ -38,8 +38,8 @@ </page-section> </template> <script> -import PageSection from '@/components/Global/PageSection'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; +import PageSection from '@/components/_sila/Global/PageSection'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; export default { components: { PageSection }, diff --git a/src/views/_sila/HardwareStatus/Inventory/InventoryTableAssembly.vue b/src/views/_sila/Overview/Inventory/InventoryTableAssembly.vue index b4010bfe..9c284533 100644 --- a/src/views/_sila/HardwareStatus/Inventory/InventoryTableAssembly.vue +++ b/src/views/_sila/Overview/Inventory/InventoryTableAssembly.vue @@ -69,13 +69,13 @@ </template> <script> -import PageSection from '@/components/Global/PageSection'; +import PageSection from '@/components/_sila/Global/PageSection'; import IconChevron from '@carbon/icons-vue/es/chevron--down/20'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; import TableRowExpandMixin, { expandRowLabel, -} from '@/components/Mixins/TableRowExpandMixin'; -import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin'; +} from '@/components/_sila/Mixins/TableRowExpandMixin'; +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; export default { components: { IconChevron, PageSection }, diff --git a/src/views/_sila/HardwareStatus/Inventory/InventoryTableBmcManager.vue b/src/views/_sila/Overview/Inventory/InventoryTableBmcManager.vue index 48b914f4..e3375d57 100644 --- a/src/views/_sila/HardwareStatus/Inventory/InventoryTableBmcManager.vue +++ b/src/views/_sila/Overview/Inventory/InventoryTableBmcManager.vue @@ -162,14 +162,14 @@ </template> <script> -import PageSection from '@/components/Global/PageSection'; +import PageSection from '@/components/_sila/Global/PageSection'; import IconChevron from '@carbon/icons-vue/es/chevron--down/20'; -import StatusIcon from '@/components/Global/StatusIcon'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; +import StatusIcon from '@/components/_sila/Global/StatusIcon'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; import TableRowExpandMixin, { expandRowLabel, -} from '@/components/Mixins/TableRowExpandMixin'; -import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin'; +} from '@/components/_sila/Mixins/TableRowExpandMixin'; +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; export default { components: { IconChevron, PageSection, StatusIcon }, diff --git a/src/views/_sila/HardwareStatus/Inventory/InventoryTableChassis.vue b/src/views/_sila/Overview/Inventory/InventoryTableChassis.vue index b49cec7f..a5eb5ae6 100644 --- a/src/views/_sila/HardwareStatus/Inventory/InventoryTableChassis.vue +++ b/src/views/_sila/Overview/Inventory/InventoryTableChassis.vue @@ -114,15 +114,15 @@ </template> <script> -import PageSection from '@/components/Global/PageSection'; +import PageSection from '@/components/_sila/Global/PageSection'; import IconChevron from '@carbon/icons-vue/es/chevron--down/20'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; -import StatusIcon from '@/components/Global/StatusIcon'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; +import StatusIcon from '@/components/_sila/Global/StatusIcon'; import TableRowExpandMixin, { expandRowLabel, -} from '@/components/Mixins/TableRowExpandMixin'; -import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin'; +} from '@/components/_sila/Mixins/TableRowExpandMixin'; +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; export default { components: { IconChevron, PageSection, StatusIcon }, diff --git a/src/views/_sila/HardwareStatus/Inventory/InventoryTableDimmSlot.vue b/src/views/_sila/Overview/Inventory/InventoryTableDimmSlot.vue index 65994810..f1858ae9 100644 --- a/src/views/_sila/HardwareStatus/Inventory/InventoryTableDimmSlot.vue +++ b/src/views/_sila/Overview/Inventory/InventoryTableDimmSlot.vue @@ -52,17 +52,19 @@ </template> <!-- Toggle identify LED --> <template #cell(identifyLed)="row"> - <b-form-checkbox - v-model="row.item.identifyLed" - name="switch" - switch - @change="toggleIdentifyLedValue(row.item)" - > - <span v-if="row.item.identifyLed"> - {{ $t('global.status.on') }} - </span> - <span v-else> {{ $t('global.status.off') }} </span> - </b-form-checkbox> + <div class="disabledDiv"> + <b-form-checkbox + v-model="row.item.identifyLed" + name="switch" + switch + @change="toggleIdentifyLedValue(row.item)" + > + <span v-if="row.item.identifyLed"> + {{ $t('global.status.on') }} + </span> + <span v-else> {{ $t('global.status.off') }} </span> + </b-form-checkbox> + </div> </template> <template #row-details="{ item }"> <b-container fluid> @@ -156,21 +158,21 @@ </template> <script> -import PageSection from '@/components/Global/PageSection'; +import PageSection from '@/components/_sila/Global/PageSection'; import IconChevron from '@carbon/icons-vue/es/chevron--down/20'; -import StatusIcon from '@/components/Global/StatusIcon'; -import TableCellCount from '@/components/Global/TableCellCount'; +import StatusIcon from '@/components/_sila/Global/StatusIcon'; +import TableCellCount from '@/components/_sila/Global/TableCellCount'; -import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin'; -import TableSortMixin from '@/components/Mixins/TableSortMixin'; -import Search from '@/components/Global/Search'; +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; +import TableSortMixin from '@/components/_sila/Mixins/TableSortMixin'; +import Search from '@/components/_sila/Global/Search'; import SearchFilterMixin, { searchFilter, -} from '@/components/Mixins/SearchFilterMixin'; +} from '@/components/_sila/Mixins/SearchFilterMixin'; import TableRowExpandMixin, { expandRowLabel, -} from '@/components/Mixins/TableRowExpandMixin'; +} from '@/components/_sila/Mixins/TableRowExpandMixin'; export default { components: { IconChevron, PageSection, StatusIcon, Search, TableCellCount }, @@ -243,6 +245,13 @@ export default { this.searchTotalFilteredRows = filteredItems.length; }, toggleIdentifyLedValue(row) { + // dimms don't have leds, then + // eslint-disable-next-line no-constant-condition + if (true) { + row.identifyLed = false; + return; + } + this.$store .dispatch('memory/updateIdentifyLedValue', { uri: row.uri, diff --git a/src/views/_sila/HardwareStatus/Inventory/InventoryTableFans.vue b/src/views/_sila/Overview/Inventory/InventoryTableFans.vue index fe788c53..1012b8a9 100644 --- a/src/views/_sila/HardwareStatus/Inventory/InventoryTableFans.vue +++ b/src/views/_sila/Overview/Inventory/InventoryTableFans.vue @@ -96,20 +96,20 @@ </template> <script> -import PageSection from '@/components/Global/PageSection'; +import PageSection from '@/components/_sila/Global/PageSection'; import IconChevron from '@carbon/icons-vue/es/chevron--down/20'; -import TableCellCount from '@/components/Global/TableCellCount'; +import TableCellCount from '@/components/_sila/Global/TableCellCount'; -import StatusIcon from '@/components/Global/StatusIcon'; -import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin'; -import TableSortMixin from '@/components/Mixins/TableSortMixin'; -import Search from '@/components/Global/Search'; +import StatusIcon from '@/components/_sila/Global/StatusIcon'; +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; +import TableSortMixin from '@/components/_sila/Mixins/TableSortMixin'; +import Search from '@/components/_sila/Global/Search'; import SearchFilterMixin, { searchFilter, -} from '@/components/Mixins/SearchFilterMixin'; +} from '@/components/_sila/Mixins/SearchFilterMixin'; import TableRowExpandMixin, { expandRowLabel, -} from '@/components/Mixins/TableRowExpandMixin'; +} from '@/components/_sila/Mixins/TableRowExpandMixin'; export default { components: { IconChevron, PageSection, StatusIcon, Search, TableCellCount }, @@ -130,7 +130,7 @@ export default { sortable: false, }, { - key: 'id', + key: 'name', label: this.$t('pageInventory.table.id'), formatter: this.dataFormatter, sortable: true, diff --git a/src/views/_sila/HardwareStatus/Inventory/InventoryTablePowerSupplies.vue b/src/views/_sila/Overview/Inventory/InventoryTablePowerSupplies.vue index aed7871a..a55b3e5e 100644 --- a/src/views/_sila/HardwareStatus/Inventory/InventoryTablePowerSupplies.vue +++ b/src/views/_sila/Overview/Inventory/InventoryTablePowerSupplies.vue @@ -114,20 +114,20 @@ </template> <script> -import PageSection from '@/components/Global/PageSection'; +import PageSection from '@/components/_sila/Global/PageSection'; import IconChevron from '@carbon/icons-vue/es/chevron--down/20'; -import StatusIcon from '@/components/Global/StatusIcon'; -import TableCellCount from '@/components/Global/TableCellCount'; -import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin'; -import TableSortMixin from '@/components/Mixins/TableSortMixin'; -import Search from '@/components/Global/Search'; +import StatusIcon from '@/components/_sila/Global/StatusIcon'; +import TableCellCount from '@/components/_sila/Global/TableCellCount'; +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; +import TableSortMixin from '@/components/_sila/Mixins/TableSortMixin'; +import Search from '@/components/_sila/Global/Search'; import SearchFilterMixin, { searchFilter, -} from '@/components/Mixins/SearchFilterMixin'; +} from '@/components/_sila/Mixins/SearchFilterMixin'; import TableRowExpandMixin, { expandRowLabel, -} from '@/components/Mixins/TableRowExpandMixin'; +} from '@/components/_sila/Mixins/TableRowExpandMixin'; export default { components: { IconChevron, PageSection, StatusIcon, Search, TableCellCount }, diff --git a/src/views/_sila/HardwareStatus/Inventory/InventoryTableProcessors.vue b/src/views/_sila/Overview/Inventory/InventoryTableProcessors.vue index 7d5dd700..27633495 100644 --- a/src/views/_sila/HardwareStatus/Inventory/InventoryTableProcessors.vue +++ b/src/views/_sila/Overview/Inventory/InventoryTableProcessors.vue @@ -1,5 +1,8 @@ <template> - <page-section :section-title="$t('pageInventory.processors')"> + <page-section + v-if="processors && processors.length > 0" + :section-title="$t('pageInventory.processors')" + > <!-- Search --> <b-row class="align-items-end"> <b-col sm="6" md="5" xl="4"> @@ -147,20 +150,20 @@ </template> <script> -import PageSection from '@/components/Global/PageSection'; +import PageSection from '@/components/_sila/Global/PageSection'; import IconChevron from '@carbon/icons-vue/es/chevron--down/20'; -import StatusIcon from '@/components/Global/StatusIcon'; -import TableCellCount from '@/components/Global/TableCellCount'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; -import TableSortMixin from '@/components/Mixins/TableSortMixin'; -import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin'; -import Search from '@/components/Global/Search'; +import StatusIcon from '@/components/_sila/Global/StatusIcon'; +import TableCellCount from '@/components/_sila/Global/TableCellCount'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; +import TableSortMixin from '@/components/_sila/Mixins/TableSortMixin'; +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; +import Search from '@/components/_sila/Global/Search'; import SearchFilterMixin, { searchFilter, -} from '@/components/Mixins/SearchFilterMixin'; +} from '@/components/_sila/Mixins/SearchFilterMixin'; import TableRowExpandMixin, { expandRowLabel, -} from '@/components/Mixins/TableRowExpandMixin'; +} from '@/components/_sila/Mixins/TableRowExpandMixin'; export default { components: { IconChevron, PageSection, StatusIcon, Search, TableCellCount }, @@ -219,7 +222,7 @@ export default { : this.processors.length; }, processors() { - return this.$store.getters['processors/processors']; + return this.$store.getters['processors/cpuTemp']; }, }, created() { diff --git a/src/views/_sila/HardwareStatus/Inventory/InventoryTableSystem.vue b/src/views/_sila/Overview/Inventory/InventoryTableSystem.vue index cf2cf020..eacc4a06 100644 --- a/src/views/_sila/HardwareStatus/Inventory/InventoryTableSystem.vue +++ b/src/views/_sila/Overview/Inventory/InventoryTableSystem.vue @@ -147,16 +147,16 @@ </template> <script> -import BVToastMixin from '@/components/Mixins/BVToastMixin'; -import PageSection from '@/components/Global/PageSection'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; +import PageSection from '@/components/_sila/Global/PageSection'; import IconChevron from '@carbon/icons-vue/es/chevron--down/20'; -import StatusIcon from '@/components/Global/StatusIcon'; +import StatusIcon from '@/components/_sila/Global/StatusIcon'; import TableRowExpandMixin, { expandRowLabel, -} from '@/components/Mixins/TableRowExpandMixin'; -import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin'; +} from '@/components/_sila/Mixins/TableRowExpandMixin'; +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; export default { components: { IconChevron, PageSection, StatusIcon }, diff --git a/src/views/_sila/HardwareStatus/Inventory/index.js b/src/views/_sila/Overview/Inventory/index.js index c9fde8d2..c9fde8d2 100644 --- a/src/views/_sila/HardwareStatus/Inventory/index.js +++ b/src/views/_sila/Overview/Inventory/index.js diff --git a/src/views/_sila/Settings/Network/ModalDns.vue b/src/views/_sila/Overview/Network/ModalDns.vue index 7f127173..82edb1e8 100644 --- a/src/views/_sila/Settings/Network/ModalDns.vue +++ b/src/views/_sila/Overview/Network/ModalDns.vue @@ -7,7 +7,7 @@ > <b-form id="form-dns" @submit.prevent="handleSubmit"> <b-row> - <b-col sm="6"> + <b-col> <b-form-group :label="$t('pageNetwork.modal.staticDns')" label-for="staticDns" @@ -43,7 +43,7 @@ </template> <script> -import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js'; +import VuelidateMixin from '@/components/_sila/Mixins/VuelidateMixin.js'; import { ipAddress, required } from 'vuelidate/lib/validators'; export default { diff --git a/src/views/_sila/Settings/Network/ModalHostname.vue b/src/views/_sila/Overview/Network/ModalHostname.vue index f3221ec7..3ad152c1 100644 --- a/src/views/_sila/Settings/Network/ModalHostname.vue +++ b/src/views/_sila/Overview/Network/ModalHostname.vue @@ -48,7 +48,7 @@ </template> <script> -import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js'; +import VuelidateMixin from '@/components/_sila/Mixins/VuelidateMixin.js'; import { required, helpers } from 'vuelidate/lib/validators'; const validateHostname = helpers.regex('validateHostname', /^\S{0,64}$/); diff --git a/src/views/_sila/Settings/Network/ModalIpv4.vue b/src/views/_sila/Overview/Network/ModalIpv4.vue index dcf4a579..00742a11 100644 --- a/src/views/_sila/Settings/Network/ModalIpv4.vue +++ b/src/views/_sila/Overview/Network/ModalIpv4.vue @@ -89,7 +89,7 @@ </template> <script> -import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js'; +import VuelidateMixin from '@/components/_sila/Mixins/VuelidateMixin.js'; import { ipAddress, required } from 'vuelidate/lib/validators'; export default { diff --git a/src/views/_sila/Settings/Network/ModalMacAddress.vue b/src/views/_sila/Overview/Network/ModalMacAddress.vue index d563f4ce..98f4b019 100644 --- a/src/views/_sila/Settings/Network/ModalMacAddress.vue +++ b/src/views/_sila/Overview/Network/ModalMacAddress.vue @@ -49,7 +49,7 @@ </template> <script> -import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js'; +import VuelidateMixin from '@/components/_sila/Mixins/VuelidateMixin.js'; import { macAddress, required } from 'vuelidate/lib/validators'; export default { diff --git a/src/views/_sila/Settings/Network/Network.vue b/src/views/_sila/Overview/Network/Network.vue index 2abbcd7a..2321b1bd 100644 --- a/src/views/_sila/Settings/Network/Network.vue +++ b/src/views/_sila/Overview/Network/Network.vue @@ -40,17 +40,19 @@ </template> <script> -import BVToastMixin from '@/components/Mixins/BVToastMixin'; -import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin'; -import LoadingBarMixin, { loading } from '@/components/Mixins/LoadingBarMixin'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; +import LoadingBarMixin, { + loading, +} from '@/components/_sila/Mixins/LoadingBarMixin'; import ModalMacAddress from './ModalMacAddress.vue'; import ModalHostname from './ModalHostname.vue'; import ModalIpv4 from './ModalIpv4.vue'; import ModalDns from './ModalDns.vue'; import NetworkGlobalSettings from './NetworkGlobalSettings.vue'; import NetworkInterfaceSettings from './NetworkInterfaceSettings.vue'; -import PageSection from '@/components/Global/PageSection'; -import PageTitle from '@/components/Global/PageTitle'; +import PageSection from '@/components/_sila/Global/PageSection'; +import PageTitle from '@/components/_sila/Global/PageTitle'; import TableIpv4 from './TableIpv4.vue'; import TableDns from './TableDns.vue'; import { mapState } from 'vuex'; diff --git a/src/views/_sila/Settings/Network/NetworkGlobalSettings.vue b/src/views/_sila/Overview/Network/NetworkGlobalSettings.vue index 30287673..44035ae6 100644 --- a/src/views/_sila/Settings/Network/NetworkGlobalSettings.vue +++ b/src/views/_sila/Overview/Network/NetworkGlobalSettings.vue @@ -77,10 +77,10 @@ </template> <script> -import BVToastMixin from '@/components/Mixins/BVToastMixin'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; import IconEdit from '@carbon/icons-vue/es/edit/16'; -import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin'; -import PageSection from '@/components/Global/PageSection'; +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; +import PageSection from '@/components/_sila/Global/PageSection'; import { mapState } from 'vuex'; export default { diff --git a/src/views/_sila/Settings/Network/NetworkInterfaceSettings.vue b/src/views/_sila/Overview/Network/NetworkInterfaceSettings.vue index 023d29bc..657a2270 100644 --- a/src/views/_sila/Settings/Network/NetworkInterfaceSettings.vue +++ b/src/views/_sila/Overview/Network/NetworkInterfaceSettings.vue @@ -57,10 +57,10 @@ </template> <script> -import BVToastMixin from '@/components/Mixins/BVToastMixin'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; import IconEdit from '@carbon/icons-vue/es/edit/16'; -import PageSection from '@/components/Global/PageSection'; -import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin'; +import PageSection from '@/components/_sila/Global/PageSection'; +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; import { mapState } from 'vuex'; export default { diff --git a/src/views/_sila/Settings/Network/TableDns.vue b/src/views/_sila/Overview/Network/TableDns.vue index 569109f1..3b3cc4b4 100644 --- a/src/views/_sila/Settings/Network/TableDns.vue +++ b/src/views/_sila/Overview/Network/TableDns.vue @@ -39,12 +39,12 @@ </template> <script> -import BVToastMixin from '@/components/Mixins/BVToastMixin'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; import IconAdd from '@carbon/icons-vue/es/add--alt/20'; import IconEdit from '@carbon/icons-vue/es/edit/20'; import IconTrashcan from '@carbon/icons-vue/es/trash-can/20'; -import PageSection from '@/components/Global/PageSection'; -import TableRowAction from '@/components/Global/TableRowAction'; +import PageSection from '@/components/_sila/Global/PageSection'; +import TableRowAction from '@/components/_sila/Global/TableRowAction'; import { mapState } from 'vuex'; export default { diff --git a/src/views/_sila/Settings/Network/TableIpv4.vue b/src/views/_sila/Overview/Network/TableIpv4.vue index ddabca01..2fa3d1f3 100644 --- a/src/views/_sila/Settings/Network/TableIpv4.vue +++ b/src/views/_sila/Overview/Network/TableIpv4.vue @@ -42,13 +42,13 @@ </template> <script> -import BVToastMixin from '@/components/Mixins/BVToastMixin'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; import IconAdd from '@carbon/icons-vue/es/add--alt/20'; import IconEdit from '@carbon/icons-vue/es/edit/20'; import IconTrashcan from '@carbon/icons-vue/es/trash-can/20'; -import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin'; -import PageSection from '@/components/Global/PageSection'; -import TableRowAction from '@/components/Global/TableRowAction'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; +import PageSection from '@/components/_sila/Global/PageSection'; +import TableRowAction from '@/components/_sila/Global/TableRowAction'; import { mapState } from 'vuex'; export default { diff --git a/src/views/_sila/Settings/Network/index.js b/src/views/_sila/Overview/Network/index.js index 97bf0397..97bf0397 100644 --- a/src/views/_sila/Settings/Network/index.js +++ b/src/views/_sila/Overview/Network/index.js diff --git a/src/views/_sila/Overview/Overview.vue b/src/views/_sila/Overview/Overview.vue index 9960f373..9f97fb3e 100644 --- a/src/views/_sila/Overview/Overview.vue +++ b/src/views/_sila/Overview/Overview.vue @@ -26,7 +26,7 @@ </template> <script> -import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; import OverviewDumps from './OverviewDumps.vue'; import OverviewEvents from './OverviewEvents.vue'; import OverviewFirmware from './OverviewFirmware.vue'; @@ -35,8 +35,8 @@ import OverviewNetwork from './OverviewNetwork'; import OverviewPower from './OverviewPower'; import OverviewQuickLinks from './OverviewQuickLinks'; import OverviewServer from './OverviewServer'; -import PageSection from '@/components/Global/PageSection'; -import PageTitle from '@/components/Global/PageTitle'; +import PageSection from '@/components/_sila/Global/PageSection'; +import PageTitle from '@/components/_sila/Global/PageTitle'; export default { name: 'Overview', diff --git a/src/views/_sila/Overview/OverviewDumps.vue b/src/views/_sila/Overview/OverviewDumps.vue index a2ae4e4e..27f5067d 100644 --- a/src/views/_sila/Overview/OverviewDumps.vue +++ b/src/views/_sila/Overview/OverviewDumps.vue @@ -20,7 +20,7 @@ <script> import OverviewCard from './OverviewCard'; -import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin'; +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; export default { name: 'Dumps', diff --git a/src/views/_sila/Overview/OverviewEvents.vue b/src/views/_sila/Overview/OverviewEvents.vue index b73c0b48..c54bc5b9 100644 --- a/src/views/_sila/Overview/OverviewEvents.vue +++ b/src/views/_sila/Overview/OverviewEvents.vue @@ -32,8 +32,8 @@ <script> import OverviewCard from './OverviewCard'; -import StatusIcon from '@/components/Global/StatusIcon'; -import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin'; +import StatusIcon from '@/components/_sila/Global/StatusIcon'; +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; export default { name: 'Events', diff --git a/src/views/_sila/Overview/OverviewFirmware.vue b/src/views/_sila/Overview/OverviewFirmware.vue index f1f9ce53..9167c75c 100644 --- a/src/views/_sila/Overview/OverviewFirmware.vue +++ b/src/views/_sila/Overview/OverviewFirmware.vue @@ -18,7 +18,7 @@ <script> import OverviewCard from './OverviewCard'; -import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin'; +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; export default { name: 'Firmware', diff --git a/src/views/_sila/Overview/OverviewNetwork.vue b/src/views/_sila/Overview/OverviewNetwork.vue index b81e5c73..7010b991 100644 --- a/src/views/_sila/Overview/OverviewNetwork.vue +++ b/src/views/_sila/Overview/OverviewNetwork.vue @@ -49,7 +49,7 @@ <script> import OverviewCard from './OverviewCard'; -import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin'; +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; export default { name: 'Network', diff --git a/src/views/_sila/Overview/OverviewPower.vue b/src/views/_sila/Overview/OverviewPower.vue index 0d84c76c..ffda495f 100644 --- a/src/views/_sila/Overview/OverviewPower.vue +++ b/src/views/_sila/Overview/OverviewPower.vue @@ -24,7 +24,7 @@ <script> import OverviewCard from './OverviewCard'; -import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin'; +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; import { mapGetters } from 'vuex'; export default { diff --git a/src/views/_sila/Overview/OverviewQuickLinks.vue b/src/views/_sila/Overview/OverviewQuickLinks.vue index bc579b03..6f74fd91 100644 --- a/src/views/_sila/Overview/OverviewQuickLinks.vue +++ b/src/views/_sila/Overview/OverviewQuickLinks.vue @@ -27,7 +27,7 @@ <script> import ArrowRight16 from '@carbon/icons-vue/es/arrow--right/16'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; export default { name: 'QuickLinks', diff --git a/src/views/_sila/Overview/OverviewServer.vue b/src/views/_sila/Overview/OverviewServer.vue index d066d391..7dded5ba 100644 --- a/src/views/_sila/Overview/OverviewServer.vue +++ b/src/views/_sila/Overview/OverviewServer.vue @@ -1,7 +1,7 @@ <template> <overview-card :title="$t('pageOverview.serverInformation')" - :to="`/hardware-status/inventory`" + :to="`/hardware-inventory`" > <b-row class="mt-3"> <b-col lg="6"> @@ -18,7 +18,7 @@ <script> import OverviewCard from './OverviewCard'; -import DataFormatterMixin from '@/components/Mixins/DataFormatterMixin'; +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; import { mapState } from 'vuex'; export default { diff --git a/src/views/_sila/PageNotFound/PageNotFound.vue b/src/views/_sila/PageNotFound/PageNotFound.vue index 91341dbb..bce56016 100644 --- a/src/views/_sila/PageNotFound/PageNotFound.vue +++ b/src/views/_sila/PageNotFound/PageNotFound.vue @@ -4,7 +4,7 @@ </b-container> </template> <script> -import PageTitle from '@/components/Global/PageTitle'; +import PageTitle from '@/components/_sila/Global/PageTitle'; export default { name: 'PageNotFound', components: { PageTitle }, diff --git a/src/views/_sila/Power/Static/PowerStaticPage.vue b/src/views/_sila/Power/Static/PowerStaticPage.vue new file mode 100644 index 00000000..8021b1d8 --- /dev/null +++ b/src/views/_sila/Power/Static/PowerStaticPage.vue @@ -0,0 +1,131 @@ +<template> + <b-container fluid="xl"> + <page-title :description="$t('appPageTitle.specification')" /> + <supply-tabs + :slots="supplies" + :current-slot="currentSlot" + :switch-tab="switchTab" + ></supply-tabs> + <page-section :section-title="$t('pagePowerSup.supplies')" class="pt-3"> + <b-table + responsive="md" + show-empty + hover + :items="items" + :busy="isBusy" + :fields="fields" + :empty-text="$t('global.table.emptyMessage')" + > + <template #cell(value)="{ index, value }"> + <status-icon v-if="index === 1" :status="statusIcon(value)" /> + {{ value }} + </template> + </b-table> + </page-section> + </b-container> +</template> + +<script> +import PageTitle from '@/components/_sila/Global/PageTitle'; +import PageSection from '@/components/_sila/Global/PageSection'; +import SupplyTabs from './SupplyTabs'; + +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; + +import StatusIcon from '@/components/_sila//Global/StatusIcon'; + +export default { + components: { PageTitle, PageSection, SupplyTabs, StatusIcon }, + mixins: [DataFormatterMixin, LoadingBarMixin], + data() { + return { + currentSlot: null, + isBusy: true, + fields: [ + { + key: 'param', + label: this.$t('pagePowerSup.table.param'), + formatter: this.dataFormatter, + thStyle: { width: '50%' }, + }, + { + key: 'value', + label: this.$t('pagePowerSup.table.value'), + formatter: this.dataFormatter, + thStyle: { width: '50%' }, + tdClass: 'text-nowrap', + }, + ], + }; + }, + computed: { + supplies() { + return this.$store.getters['powerSupply/powerSupplies']; + }, + currentItem() { + return this.supplies?.find((el) => { + if (el.id === this.currentSlot) return el; + }); + }, + items() { + return [ + { + param: this.$t('pagePowerSup.table.name'), + value: this.currentItem?.name, + }, + { + param: this.$t('pagePowerSup.table.health'), + value: this.currentItem?.health, + }, + { + param: this.$t('pagePowerSup.table.statusState'), + value: this.currentItem?.statusState, + }, + { + param: this.$t('pagePowerSup.table.serialNumber'), + value: this.currentItem?.serialNumber, + }, + { + param: this.$t('pagePowerSup.table.manufacturer'), + value: this.currentItem?.manufacturer, + }, + { + param: this.$t('pagePowerSup.table.model'), + value: this.currentItem?.model, + }, + { + param: this.$t('pagePowerSup.table.efficiencyPercent'), + value: this.currentItem?.efficiencyPercent, + }, + { + param: this.$t('pagePowerSup.table.powerInputWatts'), + value: this.currentItem?.powerInputWatts, + }, + ]; + }, + }, + + watch: { + supplies() { + if (this.currentSlot === null) { + this.currentSlot = this.supplies[0]?.id; + } + }, + }, + + created() { + this.startLoader(); + this.$store.dispatch('powerSupply/getAllPowerSupplies').finally(() => { + this.endLoader(); + this.isBusy = false; + }); + }, + + methods: { + switchTab(id) { + this.currentSlot = id; + }, + }, +}; +</script> diff --git a/src/views/_sila/Power/Static/SupplyTabs.vue b/src/views/_sila/Power/Static/SupplyTabs.vue new file mode 100644 index 00000000..7a1ea20d --- /dev/null +++ b/src/views/_sila/Power/Static/SupplyTabs.vue @@ -0,0 +1,70 @@ +<template> + <b-col + ref="content" + class="d-flex align-items-center data-tab" + @wheel.prevent="wheelItBetter($event)" + > + <span + v-for="item in slots" + :key="item.id" + :class="{ 'tab-active': currentSlot === item.id }" + @click="switchTab(item.id)" + >{{ item.id }}</span + > + </b-col> +</template> + +<script> +export default { + props: { + slots: { + type: Array, + default: null, + }, + currentSlot: { + type: String, + default: null, + }, + switchTab: { + type: Function, + required: true, + }, + }, + data() { + return { + container: this.$refs.content, + }; + }, + methods: { + wheelItBetter(event) { + if (event.deltaY < 0) { + this.$refs.content.scrollLeft -= 25; + } else { + this.$refs.content.scrollLeft += 25; + } + }, + }, +}; +</script> +<style lang="scss" scoped> +.data-tab { + height: 48px; + max-width: 150%; + width: auto; + margin: -2rem -1.95rem 0px -2rem; + padding-left: 2rem; + overflow-x: auto; + @include media-breakpoint-down(md) { + padding-left: 1rem; + padding-right: 1rem; + margin-left: -0.95rem; + } + border-bottom: 1px solid $gray-10; + gap: 24px; +} + +.tab-active { + color: $primary; + transition: ease-in 0.15s; +} +</style> diff --git a/src/views/_sila/Power/Static/index.js b/src/views/_sila/Power/Static/index.js new file mode 100644 index 00000000..14c4ef64 --- /dev/null +++ b/src/views/_sila/Power/Static/index.js @@ -0,0 +1,2 @@ +import PowerStaticPage from './PowerStaticPage.vue'; +export default PowerStaticPage; diff --git a/src/views/_sila/Processors/Dynamic/CpuPower.vue b/src/views/_sila/Processors/Dynamic/CpuPower.vue new file mode 100644 index 00000000..14ed667c --- /dev/null +++ b/src/views/_sila/Processors/Dynamic/CpuPower.vue @@ -0,0 +1,168 @@ +<template> + <collapse + id="collapse_power" + :title="$t('pageProcessors.power')" + @opened="onOpened" + > + <template #image> + <img src="@/assets/images/_sila/collapsed/power.svg" /> + </template> + <page-section> + <b-row class="align-items-end p-2"> + <b-col xs="12" md="6" lg="3" class="pt-2"> + <b-form-group :label="$t('pageProcessors.labels.warning')"> + <b-form-input + v-model="warning" + type="number" + :min="0" + :max="100" + ></b-form-input> + </b-form-group> + </b-col> + <b-col xs="12" md="6" lg="3" class="pt-2"> + <b-form-group :label="$t('pageProcessors.labels.shutdown')"> + <b-form-input v-model="shutdown" type="number" :min="0" :max="100"> + </b-form-input> + </b-form-group> + </b-col> + <b-col xs="12" md="6" lg="3" class="pt-2"> + <b-button variant="primary" style="height: 35px"> + {{ $t('global.action.save') }} + </b-button> + </b-col> + </b-row> + <chart + type="power" + :time-scale="timeScale" + :data="filteredSensors" + :colors="colors" + :warning="+warning" + :shutdown="+shutdown" + ></chart> + <b-table + v-if="items && items.length > 0" + responsive="md" + show-empty + table-variant="accessory" + hover + :items="items" + :fields="fields" + :empty-text="$t('global.table.emptyMessage')" + > + <template #cell(name)="{ value, index }"> + <div + class="item-color" + :style="`background-color: ${colors[index]}`" + ></div> + {{ value }} + </template> + <template #cell(minDate)="{ value }"> + <span style="color: rgb(12, 28, 41)"> + {{ value.time }} + </span> + <span> + {{ value.date }} + </span> + </template> + <template #cell(maxDate)="{ value }"> + <span style="color: rgb(12, 28, 41)"> + {{ value.time }} + </span> + <span> + {{ value.date }} + </span> + </template> + </b-table> + </page-section> + </collapse> +</template> +<script> +import Chart from '@/components/_sila/Global/Chart'; +import PageSection from '@/components/Global/PageSection'; + +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; +import TableFilterMixin from '@/components/_sila/Mixins/TableFilterMixin'; +import Collapse from '@/components/_sila/Global/Collapse'; + +import { getItems } from '@/utilities/_sila/metricProperties'; + +export default { + components: { PageSection, Chart, Collapse }, + mixins: [DataFormatterMixin, LoadingBarMixin, TableFilterMixin], + props: { + timeScale: { + type: String, + default: 'hour', + }, + }, + data() { + return { + warning: 66, + shutdown: 88, + fields: [ + { + key: 'name', + label: this.$t('pageProcessors.table.power.name'), + thStyle: { width: '25%' }, + }, + { + key: 'current', + label: this.$t('pageProcessors.table.power.current'), + }, + ], + }; + }, + + computed: { + items() { + return getItems(this.filteredSensors); + }, + + allSensors() { + return this.timeScale === 'hour' + ? this.$store.getters['processors/cpuPowerLastHour'] + : this.$store.getters['processors/cpuPower']; + }, + + filteredSensors() { + return this.getFilteredTableData(this.allSensors, this.activeFilters); + }, + + colors() { + return this.$randomColor({ + count: this.items?.length, + hue: 'random', + luminosity: 'random', + }); + }, + }, + watch: { + timeScale() { + this.loadData(); + }, + }, + + methods: { + onOpened(state) { + if (state) { + this.loadData(); + } + }, + + loadData() { + let payload = { lastHour: false }; + if (this.timeScale === 'hour') { + payload = { lastHour: true }; + } + + this.startLoader(); + this.$store + .dispatch('processors/getCpuPowerDynamic', payload) + .finally(() => { + this.endLoader(); + }); + }, + }, +}; +</script> diff --git a/src/views/_sila/Processors/Dynamic/CpuTemp.vue b/src/views/_sila/Processors/Dynamic/CpuTemp.vue new file mode 100644 index 00000000..d934acc3 --- /dev/null +++ b/src/views/_sila/Processors/Dynamic/CpuTemp.vue @@ -0,0 +1,197 @@ +<template> + <collapse + id="collapse_temp" + :title="$t('pageProcessors.temperature')" + @opened="onOpened" + > + <template #image> + <img src="@/assets/images/_sila/collapsed/temperature.svg" /> + </template> + <page-section> + <b-row class="align-items-end p-2"> + <b-col xs="12" md="6" lg="3" class="pt-2"> + <b-form-group :label="$t('pageProcessors.labels.notNormal')"> + <b-form-input + v-model="notNormal" + type="number" + :min="0" + :max="100" + ></b-form-input> + </b-form-group> + </b-col> + <b-col xs="12" md="6" lg="3" class="pt-2"> + <b-form-group :label="$t('pageProcessors.labels.critical')"> + <b-form-input v-model="critical" type="number" :min="0" :max="100"> + </b-form-input> + </b-form-group> + </b-col> + <b-col xs="12" md="6" lg="3" class="pt-2"> + <b-form-group :label="$t('pageProcessors.labels.warning')"> + <b-form-input v-model="warning" type="number" :min="0" :max="100"> + </b-form-input> + </b-form-group> + </b-col> + <b-col xs="12" md="6" lg="3" class="pt-2"> + <b-button variant="primary" style="height: 35px"> + {{ $t('global.action.save') }} + </b-button> + </b-col> + </b-row> + <chart + type="processors" + :time-scale="timeScale" + :data="filteredSensors" + :colors="colors" + :warning="+warning" + :not-normal="+notNormal" + :critical="+critical" + ></chart> + <b-table + v-if="items && items.length > 0" + responsive="md" + show-empty + table-variant="accessory" + hover + :items="items" + :fields="fields" + :empty-text="$t('global.table.emptyMessage')" + > + <template #cell(name)="{ value, index }"> + <div + class="item-color" + :style="`background-color: ${colors[index]}`" + ></div> + {{ value }} + </template> + <template #cell(minDate)="{ value }"> + <span style="color: rgb(12, 28, 41)"> + {{ value.time }} + </span> + <span> + {{ value.date }} + </span> + </template> + <template #cell(maxDate)="{ value }"> + <span style="color: rgb(12, 28, 41)"> + {{ value.time }} + </span> + <span> + {{ value.date }} + </span> + </template> + </b-table> + </page-section> + </collapse> +</template> +<script> +import Chart from '@/components/_sila/Global/Chart'; +import PageSection from '@/components/Global/PageSection'; + +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; +import TableFilterMixin from '@/components/_sila/Mixins/TableFilterMixin'; +import Collapse from '@/components/_sila/Global/Collapse'; + +import { getItems } from '@/utilities/_sila/metricProperties'; + +export default { + components: { PageSection, Chart, Collapse }, + mixins: [DataFormatterMixin, LoadingBarMixin, TableFilterMixin], + props: { + timeScale: { + type: String, + default: 'hour', + }, + }, + data() { + return { + warning: 72, + notNormal: 44, + critical: 55, + fields: [ + { + key: 'name', + label: this.$t('pageProcessors.table.temperature.name'), + thStyle: { width: '25%' }, + }, + { + key: 'current', + label: this.$t('pageProcessors.table.temperature.current'), + }, + { + key: 'middle', + label: this.$t('pageProcessors.table.temperature.middle'), + }, + { + key: 'min', + label: this.$t('pageProcessors.table.temperature.min'), + }, + { + key: 'minDate', + label: this.$t('pageProcessors.table.temperature.minDate'), + }, + { + key: 'max', + label: this.$t('pageProcessors.table.temperature.max'), + }, + { + key: 'maxDate', + label: this.$t('pageProcessors.table.temperature.maxDate'), + }, + ], + }; + }, + + computed: { + items() { + return getItems(this.filteredSensors); + }, + + allSensors() { + return this.timeScale === 'hour' + ? this.$store.getters['processors/cpuTempLastHour'] + : this.$store.getters['processors/cpuTemp']; + }, + + filteredSensors() { + return this.getFilteredTableData(this.allSensors, this.activeFilters); + }, + + colors() { + return this.$randomColor({ + count: this.items?.length, + hue: 'random', + luminosity: 'random', + }); + }, + }, + + watch: { + timeScale() { + this.loadData(); + }, + }, + + methods: { + onOpened(state) { + if (state) { + this.loadData(); + } + }, + + loadData() { + let payload = { lastHour: false }; + if (this.timeScale === 'hour') { + payload = { lastHour: true }; + } + + this.startLoader(); + this.$store + .dispatch('processors/getCpuTempDynamic', payload) + .finally(() => { + this.endLoader(); + }); + }, + }, +}; +</script> diff --git a/src/views/_sila/Processors/Dynamic/ProcessorsDynamicPage.vue b/src/views/_sila/Processors/Dynamic/ProcessorsDynamicPage.vue new file mode 100644 index 00000000..ff9feb2e --- /dev/null +++ b/src/views/_sila/Processors/Dynamic/ProcessorsDynamicPage.vue @@ -0,0 +1,49 @@ +<template> + <b-container fluid="xl"> + <page-title :description="$t('appPageTitle.dynamicInformation')" /> + <table-date-picker :time-scale="timeScale" @changePeriod="onChangePeriod" /> + <cpu-temp :time-scale="timeScale"></cpu-temp> + <cpu-power :time-scale="timeScale"></cpu-power> + </b-container> +</template> +<script> +import PageTitle from '@/components/_sila/Global/PageTitle'; + +import DataFormatterMixin from '@/components/_sila/Mixins/DataFormatterMixin'; +import TableDatePicker from '@/components/_sila/Global/TableDatePicker'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; +import TableFilterMixin from '@/components/_sila/Mixins/TableFilterMixin'; + +import CpuPower from './CpuPower'; +import CpuTemp from './CpuTemp'; + +export default { + components: { + CpuPower, + CpuTemp, + PageTitle, + TableDatePicker, + }, + mixins: [DataFormatterMixin, LoadingBarMixin, TableFilterMixin], + data() { + return { + timeScale: 'hour', + }; + }, + + methods: { + resetZoom() { + const resetButton = document.querySelector('.highcharts-reset-zoom'); + if (!resetButton) { + return; + } + + resetButton.dispatchEvent(new Event('click')); + }, + onChangePeriod(period) { + this.timeScale = period; + this.resetZoom(); + }, + }, +}; +</script> diff --git a/src/views/_sila/Processors/Dynamic/index.js b/src/views/_sila/Processors/Dynamic/index.js new file mode 100644 index 00000000..121c0316 --- /dev/null +++ b/src/views/_sila/Processors/Dynamic/index.js @@ -0,0 +1,2 @@ +import ProcessorsDynamicPage from './ProcessorsDynamicPage.vue'; +export default ProcessorsDynamicPage; diff --git a/src/views/_sila/ProfileSettings/ProfileSettings.vue b/src/views/_sila/ProfileSettings/ProfileSettings.vue index 8f01c59b..bc2b4702 100644 --- a/src/views/_sila/ProfileSettings/ProfileSettings.vue +++ b/src/views/_sila/ProfileSettings/ProfileSettings.vue @@ -128,14 +128,14 @@ </template> <script> -import BVToastMixin from '@/components/Mixins/BVToastMixin'; -import InputPasswordToggle from '@/components/Global/InputPasswordToggle'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; +import InputPasswordToggle from '@/components/_sila/Global/InputPasswordToggle'; import { maxLength, minLength, sameAs } from 'vuelidate/lib/validators'; -import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin'; -import LocalTimezoneLabelMixin from '@/components/Mixins/LocalTimezoneLabelMixin'; -import PageTitle from '@/components/Global/PageTitle'; -import PageSection from '@/components/Global/PageSection'; -import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; +import LocalTimezoneLabelMixin from '@/components/_sila/Mixins/LocalTimezoneLabelMixin'; +import PageTitle from '@/components/_sila/Global/PageTitle'; +import PageSection from '@/components/_sila/Global/PageSection'; +import VuelidateMixin from '@/components/_sila/Mixins/VuelidateMixin.js'; export default { name: 'ProfileSettings', diff --git a/src/views/_sila/ResourceManagement/Power.vue b/src/views/_sila/ResourceManagement/Power.vue index cc0cc993..3c1e6412 100644 --- a/src/views/_sila/ResourceManagement/Power.vue +++ b/src/views/_sila/ResourceManagement/Power.vue @@ -34,7 +34,7 @@ </b-row> <b-row> - <b-col sm="8" md="6" xl="3"> + <b-col sm="8" md="6" xl="4"> <b-form-group id="input-group-1" :label="$t('pagePower.powerCapLabel')" @@ -84,10 +84,12 @@ </template> <script> -import PageTitle from '@/components/Global/PageTitle'; -import LoadingBarMixin, { loading } from '@/components/Mixins/LoadingBarMixin'; -import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; +import PageTitle from '@/components/_sila/Global/PageTitle'; +import LoadingBarMixin, { + loading, +} from '@/components/_sila/Mixins/LoadingBarMixin'; +import VuelidateMixin from '@/components/_sila/Mixins/VuelidateMixin.js'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; import { requiredIf, between } from 'vuelidate/lib/validators'; import { mapGetters } from 'vuex'; diff --git a/src/views/_sila/SecurityAndAccess/Certificates/Certificates.vue b/src/views/_sila/SecurityAndAccess/Certificates/Certificates.vue index 0113b80a..27950b76 100644 --- a/src/views/_sila/SecurityAndAccess/Certificates/Certificates.vue +++ b/src/views/_sila/SecurityAndAccess/Certificates/Certificates.vue @@ -106,13 +106,13 @@ import IconTrashcan from '@carbon/icons-vue/es/trash-can/20'; import ModalGenerateCsr from './ModalGenerateCsr'; import ModalUploadCertificate from './ModalUploadCertificate'; -import PageTitle from '@/components/Global/PageTitle'; -import TableRowAction from '@/components/Global/TableRowAction'; -import StatusIcon from '@/components/Global/StatusIcon'; -import Alert from '@/components/Global/Alert'; +import PageTitle from '@/components/_sila/Global/PageTitle'; +import TableRowAction from '@/components/_sila/Global/TableRowAction'; +import StatusIcon from '@/components/_sila/Global/StatusIcon'; +import Alert from '@/components/_sila/Global/Alert'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; -import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; export default { name: 'Certificates', diff --git a/src/views/_sila/SecurityAndAccess/Certificates/ModalGenerateCsr.vue b/src/views/_sila/SecurityAndAccess/Certificates/ModalGenerateCsr.vue index d76f9fe1..63258a40 100644 --- a/src/views/_sila/SecurityAndAccess/Certificates/ModalGenerateCsr.vue +++ b/src/views/_sila/SecurityAndAccess/Certificates/ModalGenerateCsr.vue @@ -3,7 +3,6 @@ <b-modal id="generate-csr" ref="modal" - size="lg" no-stacking :title="$t('pageCertificates.modal.generateACertificateSigningRequest')" @ok="onOkGenerateCsrModal" @@ -13,7 +12,88 @@ <b-form id="generate-csr-form" novalidate @submit.prevent="handleSubmit"> <b-container fluid> <b-row> - <b-col lg="9"> + <b-col lg="12"> + <b-row> + <b-col lg="12"> + <p class="col-form-label"> + {{ $t('pageCertificates.modal.privateKey') }} + </p> + <b-form-group + :label="$t('pageCertificates.modal.keyPairAlgorithm')" + label-for="key-pair-algorithm" + > + <b-form-select + id="key-pair-algorithm" + v-model="form.keyPairAlgorithm" + data-test-id="modalGenerateCsr-select-keyPairAlgorithm" + :options="keyPairAlgorithmOptions" + :state="getValidationState($v.form.keyPairAlgorithm)" + @input="$v.form.keyPairAlgorithm.$touch()" + > + <template #first> + <b-form-select-option :value="null" disabled> + {{ $t('global.form.selectAnOption') }} + </b-form-select-option> + </template> + </b-form-select> + <b-form-invalid-feedback role="alert"> + {{ $t('global.form.fieldRequired') }} + </b-form-invalid-feedback> + </b-form-group> + </b-col> + </b-row> + <b-row> + <b-col lg="12"> + <template v-if="$v.form.keyPairAlgorithm.$model === 'EC'"> + <b-form-group + :label="$t('pageCertificates.modal.keyCurveId')" + label-for="key-curve-id" + > + <b-form-select + id="key-curve-id" + v-model="form.keyCurveId" + data-test-id="modalGenerateCsr-select-keyCurveId" + :options="keyCurveIdOptions" + :state="getValidationState($v.form.keyCurveId)" + @input="$v.form.keyCurveId.$touch()" + > + <template #first> + <b-form-select-option :value="null" disabled> + {{ $t('global.form.selectAnOption') }} + </b-form-select-option> + </template> + </b-form-select> + <b-form-invalid-feedback role="alert"> + {{ $t('global.form.fieldRequired') }} + </b-form-invalid-feedback> + </b-form-group> + </template> + <template v-if="$v.form.keyPairAlgorithm.$model === 'RSA'"> + <b-form-group + :label="$t('pageCertificates.modal.keyBitLength')" + label-for="key-bit-length" + > + <b-form-select + id="key-bit-length" + v-model="form.keyBitLength" + data-test-id="modalGenerateCsr-select-keyBitLength" + :options="keyBitLengthOptions" + :state="getValidationState($v.form.keyBitLength)" + @input="$v.form.keyBitLength.$touch()" + > + <template #first> + <b-form-select-option :value="null" disabled> + {{ $t('global.form.selectAnOption') }} + </b-form-select-option> + </template> + </b-form-select> + <b-form-invalid-feedback role="alert"> + {{ $t('global.form.fieldRequired') }} + </b-form-invalid-feedback> + </b-form-group> + </template> + </b-col> + </b-row> <b-row> <b-col lg="6"> <b-form-group @@ -241,89 +321,6 @@ </b-col> </b-row> </b-col> - <b-col lg="3"> - <b-row> - <b-col lg="12"> - <p class="col-form-label"> - {{ $t('pageCertificates.modal.privateKey') }} - </p> - <b-form-group - :label="$t('pageCertificates.modal.keyPairAlgorithm')" - label-for="key-pair-algorithm" - > - <b-form-select - id="key-pair-algorithm" - v-model="form.keyPairAlgorithm" - data-test-id="modalGenerateCsr-select-keyPairAlgorithm" - :options="keyPairAlgorithmOptions" - :state="getValidationState($v.form.keyPairAlgorithm)" - @input="$v.form.keyPairAlgorithm.$touch()" - > - <template #first> - <b-form-select-option :value="null" disabled> - {{ $t('global.form.selectAnOption') }} - </b-form-select-option> - </template> - </b-form-select> - <b-form-invalid-feedback role="alert"> - {{ $t('global.form.fieldRequired') }} - </b-form-invalid-feedback> - </b-form-group> - </b-col> - </b-row> - <b-row> - <b-col lg="12"> - <template v-if="$v.form.keyPairAlgorithm.$model === 'EC'"> - <b-form-group - :label="$t('pageCertificates.modal.keyCurveId')" - label-for="key-curve-id" - > - <b-form-select - id="key-curve-id" - v-model="form.keyCurveId" - data-test-id="modalGenerateCsr-select-keyCurveId" - :options="keyCurveIdOptions" - :state="getValidationState($v.form.keyCurveId)" - @input="$v.form.keyCurveId.$touch()" - > - <template #first> - <b-form-select-option :value="null" disabled> - {{ $t('global.form.selectAnOption') }} - </b-form-select-option> - </template> - </b-form-select> - <b-form-invalid-feedback role="alert"> - {{ $t('global.form.fieldRequired') }} - </b-form-invalid-feedback> - </b-form-group> - </template> - <template v-if="$v.form.keyPairAlgorithm.$model === 'RSA'"> - <b-form-group - :label="$t('pageCertificates.modal.keyBitLength')" - label-for="key-bit-length" - > - <b-form-select - id="key-bit-length" - v-model="form.keyBitLength" - data-test-id="modalGenerateCsr-select-keyBitLength" - :options="keyBitLengthOptions" - :state="getValidationState($v.form.keyBitLength)" - @input="$v.form.keyBitLength.$touch()" - > - <template #first> - <b-form-select-option :value="null" disabled> - {{ $t('global.form.selectAnOption') }} - </b-form-select-option> - </template> - </b-form-select> - <b-form-invalid-feedback role="alert"> - {{ $t('global.form.fieldRequired') }} - </b-form-invalid-feedback> - </b-form-group> - </template> - </b-col> - </b-row> - </b-col> </b-row> </b-container> </b-form> @@ -380,8 +377,8 @@ import { required, requiredIf } from 'vuelidate/lib/validators'; import { COUNTRY_LIST } from './CsrCountryCodes'; import { CERTIFICATE_TYPES } from '@/store/modules/SecurityAndAccess/CertificatesStore'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; -import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; +import VuelidateMixin from '@/components/_sila/Mixins/VuelidateMixin.js'; export default { name: 'ModalGenerateCsr', diff --git a/src/views/_sila/SecurityAndAccess/Certificates/ModalUploadCertificate.vue b/src/views/_sila/SecurityAndAccess/Certificates/ModalUploadCertificate.vue index f4db7a26..5d58018f 100644 --- a/src/views/_sila/SecurityAndAccess/Certificates/ModalUploadCertificate.vue +++ b/src/views/_sila/SecurityAndAccess/Certificates/ModalUploadCertificate.vue @@ -70,9 +70,9 @@ <script> import { required, requiredIf } from 'vuelidate/lib/validators'; -import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js'; +import VuelidateMixin from '@/components/_sila/Mixins/VuelidateMixin.js'; -import FormFile from '@/components/Global/FormFile'; +import FormFile from '@/components/_sila/Global/FormFile'; export default { components: { FormFile }, diff --git a/src/views/_sila/SecurityAndAccess/Ldap/Ldap.vue b/src/views/_sila/SecurityAndAccess/Ldap/Ldap.vue index 1f2108de..6800ead5 100644 --- a/src/views/_sila/SecurityAndAccess/Ldap/Ldap.vue +++ b/src/views/_sila/SecurityAndAccess/Ldap/Ldap.vue @@ -28,7 +28,7 @@ :disabled="!form.ldapAuthenticationEnabled || loading" > <b-row> - <b-col md="3" lg="4" xl="3"> + <b-col md="4" lg="5" xl="7"> <b-form-group class="mb-4" :label="$t('pageLdap.form.secureLdapUsingSsl')" @@ -234,13 +234,15 @@ import { mapGetters } from 'vuex'; import { find } from 'lodash'; import { requiredIf } from 'vuelidate/lib/validators'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; -import VuelidateMixin from '@/components/Mixins/VuelidateMixin'; -import LoadingBarMixin, { loading } from '@/components/Mixins/LoadingBarMixin'; -import InputPasswordToggle from '@/components/Global/InputPasswordToggle'; -import PageTitle from '@/components/Global/PageTitle'; -import PageSection from '@/components/Global/PageSection'; -import InfoTooltip from '@/components/Global/InfoTooltip'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; +import VuelidateMixin from '@/components/_sila/Mixins/VuelidateMixin'; +import LoadingBarMixin, { + loading, +} from '@/components/_sila/Mixins/LoadingBarMixin'; +import InputPasswordToggle from '@/components/_sila/Global/InputPasswordToggle'; +import PageTitle from '@/components/_sila/Global/PageTitle'; +import PageSection from '@/components/_sila/Global/PageSection'; +import InfoTooltip from '@/components/_sila/Global/InfoTooltip'; import TableRoleGroups from './TableRoleGroups'; export default { diff --git a/src/views/_sila/SecurityAndAccess/Ldap/ModalAddRoleGroup.vue b/src/views/_sila/SecurityAndAccess/Ldap/ModalAddRoleGroup.vue index 6ea2561a..aa294ce3 100644 --- a/src/views/_sila/SecurityAndAccess/Ldap/ModalAddRoleGroup.vue +++ b/src/views/_sila/SecurityAndAccess/Ldap/ModalAddRoleGroup.vue @@ -81,7 +81,7 @@ <script> import { required, requiredIf } from 'vuelidate/lib/validators'; -import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js'; +import VuelidateMixin from '@/components/_sila/Mixins/VuelidateMixin.js'; export default { mixins: [VuelidateMixin], diff --git a/src/views/_sila/SecurityAndAccess/Ldap/TableRoleGroups.vue b/src/views/_sila/SecurityAndAccess/Ldap/TableRoleGroups.vue index 5ae3e3d1..ca52da13 100644 --- a/src/views/_sila/SecurityAndAccess/Ldap/TableRoleGroups.vue +++ b/src/views/_sila/SecurityAndAccess/Ldap/TableRoleGroups.vue @@ -97,17 +97,17 @@ import IconTrashcan from '@carbon/icons-vue/es/trash-can/20'; import IconAdd from '@carbon/icons-vue/es/add--alt/20'; import { mapGetters } from 'vuex'; -import Alert from '@/components/Global/Alert'; -import TableToolbar from '@/components/Global/TableToolbar'; -import TableRowAction from '@/components/Global/TableRowAction'; +import Alert from '@/components/_sila/Global/Alert'; +import TableToolbar from '@/components/_sila/Global/TableToolbar'; +import TableRowAction from '@/components/_sila/Global/TableRowAction'; import BVTableSelectableMixin, { selectedRows, tableHeaderCheckboxModel, tableHeaderCheckboxIndeterminate, -} from '@/components/Mixins/BVTableSelectableMixin'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; +} from '@/components/_sila/Mixins/BVTableSelectableMixin'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; import ModalAddRoleGroup from './ModalAddRoleGroup'; -import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; export default { components: { diff --git a/src/views/_sila/SecurityAndAccess/Policies/Policies.vue b/src/views/_sila/SecurityAndAccess/Policies/Policies.vue index 1dc197c7..0de80de2 100644 --- a/src/views/_sila/SecurityAndAccess/Policies/Policies.vue +++ b/src/views/_sila/SecurityAndAccess/Policies/Policies.vue @@ -2,9 +2,9 @@ <b-container fluid="xl"> <page-title /> <b-row> - <b-col md="8"> + <b-col md="9"> <b-row v-if="!modifySSHPolicyDisabled" class="setting-section"> - <b-col class="d-flex align-items-center justify-content-between"> + <b-col class="d-flex align-items-center justify-content"> <dl class="mr-3 w-75"> <dt>{{ $t('pagePolicies.ssh') }}</dt> <dd> @@ -29,7 +29,7 @@ </b-col> </b-row> <b-row class="setting-section"> - <b-col class="d-flex align-items-center justify-content-between"> + <b-col class="d-flex align-items-center justify-content"> <dl class="mt-3 mr-3 w-75"> <dt>{{ $t('pagePolicies.ipmi') }}</dt> <dd> @@ -54,7 +54,7 @@ </b-col> </b-row> <b-row class="setting-section"> - <b-col class="d-flex align-items-center justify-content-between"> + <b-col class="d-flex align-items-center justify-content"> <dl class="mt-3 mr-3 w-75"> <dt>{{ $t('pagePolicies.vtpm') }}</dt> <dd> @@ -79,7 +79,7 @@ </b-col> </b-row> <b-row class="setting-section"> - <b-col class="d-flex align-items-center justify-content-between"> + <b-col class="d-flex align-items-center justify-content"> <dl class="mt-3 mr-3 w-75"> <dt>{{ $t('pagePolicies.rtad') }}</dt> <dd> @@ -109,10 +109,10 @@ </template> <script> -import PageTitle from '@/components/Global/PageTitle'; +import PageTitle from '@/components/_sila/Global/PageTitle'; -import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; export default { name: 'Policies', diff --git a/src/views/_sila/SecurityAndAccess/Sessions/Sessions.vue b/src/views/_sila/SecurityAndAccess/Sessions/Sessions.vue index 07ee725d..057fc827 100644 --- a/src/views/_sila/SecurityAndAccess/Sessions/Sessions.vue +++ b/src/views/_sila/SecurityAndAccess/Sessions/Sessions.vue @@ -1,20 +1,20 @@ <template> <b-container fluid="xl"> <page-title /> - <b-row class="align-items-end"> - <b-col sm="6" md="5" xl="4"> + <b-row class="align-items-center"> + <b-col sm="8" xl="6" class="search-block d-sm-flex align-items-end mb-4"> <search :placeholder="$t('pageSessions.table.searchSessions')" data-test-id="sessions-input-searchSessions" @change-search="onChangeSearchInput" @clear-search="onClearSearchInput" /> - </b-col> - <b-col sm="3" md="3" xl="2"> - <table-cell-count - :filtered-items-count="filteredRows" - :total-number-of-cells="allConnections.length" - ></table-cell-count> + <div class="ml-sm-4"> + <table-cell-count + :filtered-items-count="filteredRows" + :total-number-of-cells="allConnections.length" + ></table-cell-count> + </div> </b-col> </b-row> <b-row> @@ -35,6 +35,7 @@ no-select-on-click hover show-empty + no-border-collapse sort-by="clientID" :busy="isBusy" :fields="fields" @@ -85,16 +86,18 @@ </b-row> <!-- Table pagination --> - <b-row> + <b-row class="bootstrap-table__section"> <b-col sm="6"> <b-form-group class="table-pagination-select" :label="$t('global.table.itemsPerPage')" + label-class="semi-bold-16px" label-for="pagination-items-per-page" > <b-form-select id="pagination-items-per-page" v-model="perPage" + class="select-per-page semi-bold-16px" :options="itemsPerPageOptions" /> </b-form-group> @@ -114,27 +117,27 @@ </template> <script> -import PageTitle from '@/components/Global/PageTitle'; -import Search from '@/components/Global/Search'; -import TableCellCount from '@/components/Global/TableCellCount'; -import TableRowAction from '@/components/Global/TableRowAction'; -import TableToolbar from '@/components/Global/TableToolbar'; +import PageTitle from '@/components/_sila/Global/PageTitle'; +import Search from '@/components/_sila/Global/Search'; +import TableCellCount from '@/components/_sila/Global/TableCellCount'; +import TableRowAction from '@/components/_sila/Global/TableRowAction'; +import TableToolbar from '@/components/_sila/Global/TableToolbar'; -import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; import BVPaginationMixin, { currentPage, perPage, itemsPerPageOptions, -} from '@/components/Mixins/BVPaginationMixin'; +} from '@/components/_sila/Mixins/BVPaginationMixin'; import BVTableSelectableMixin, { selectedRows, tableHeaderCheckboxModel, tableHeaderCheckboxIndeterminate, -} from '@/components/Mixins/BVTableSelectableMixin'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; +} from '@/components/_sila/Mixins/BVTableSelectableMixin'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; import SearchFilterMixin, { searchFilter, -} from '@/components/Mixins/SearchFilterMixin'; +} from '@/components/_sila/Mixins/SearchFilterMixin'; export default { components: { @@ -163,6 +166,7 @@ export default { fields: [ { key: 'checkbox', + thStyle: { width: '3%' }, }, { key: 'clientID', diff --git a/src/views/_sila/SecurityAndAccess/UserManagement/ModalSettings.vue b/src/views/_sila/SecurityAndAccess/UserManagement/ModalSettings.vue index 0f05123c..bbe3f53c 100644 --- a/src/views/_sila/SecurityAndAccess/UserManagement/ModalSettings.vue +++ b/src/views/_sila/SecurityAndAccess/UserManagement/ModalSettings.vue @@ -122,7 +122,7 @@ </template> <script> -import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js'; +import VuelidateMixin from '@/components/_sila/Mixins/VuelidateMixin.js'; import { required, requiredIf, diff --git a/src/views/_sila/SecurityAndAccess/UserManagement/ModalUser.vue b/src/views/_sila/SecurityAndAccess/UserManagement/ModalUser.vue index 0f8757ce..c7aa56bb 100644 --- a/src/views/_sila/SecurityAndAccess/UserManagement/ModalUser.vue +++ b/src/views/_sila/SecurityAndAccess/UserManagement/ModalUser.vue @@ -231,9 +231,9 @@ import { helpers, requiredIf, } from 'vuelidate/lib/validators'; -import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js'; -import InputPasswordToggle from '@/components/Global/InputPasswordToggle'; -import Alert from '@/components/Global/Alert'; +import VuelidateMixin from '@/components/_sila/Mixins/VuelidateMixin.js'; +import InputPasswordToggle from '@/components/_sila/Global/InputPasswordToggle'; +import Alert from '@/components/_sila/Global/Alert'; export default { components: { Alert, InputPasswordToggle }, diff --git a/src/views/_sila/SecurityAndAccess/UserManagement/TableRoles.vue b/src/views/_sila/SecurityAndAccess/UserManagement/TableRoles.vue index 61ef1ee8..b29fa20d 100644 --- a/src/views/_sila/SecurityAndAccess/UserManagement/TableRoles.vue +++ b/src/views/_sila/SecurityAndAccess/UserManagement/TableRoles.vue @@ -1,5 +1,5 @@ <template> - <b-table stacked="sm" hover small :items="items" :fields="fields"> + <b-table stacked="sm" hover :items="items" :fields="fields"> <template #cell(administrator)="data"> <template v-if="data.value"> <checkmark20 /> diff --git a/src/views/_sila/SecurityAndAccess/UserManagement/UserManagement.vue b/src/views/_sila/SecurityAndAccess/UserManagement/UserManagement.vue index c6c556c8..ae8c5209 100644 --- a/src/views/_sila/SecurityAndAccess/UserManagement/UserManagement.vue +++ b/src/views/_sila/SecurityAndAccess/UserManagement/UserManagement.vue @@ -86,12 +86,12 @@ </b-col> </b-row> <b-row> - <b-col xl="8"> + <b-col xl="9"> <b-button v-b-toggle.collapse-role-table data-test-id="userManagement-button-viewPrivilegeRoleDescriptions" variant="link" - class="mt-3" + class="mt-3 pl-0 pr-1" > <icon-chevron /> {{ $t('pageUserManagement.viewPrivilegeRoleDescriptions') }} @@ -121,18 +121,18 @@ import IconChevron from '@carbon/icons-vue/es/chevron--up/20'; import ModalUser from './ModalUser'; import ModalSettings from './ModalSettings'; -import PageTitle from '@/components/Global/PageTitle'; +import PageTitle from '@/components/_sila/Global/PageTitle'; import TableRoles from './TableRoles'; -import TableToolbar from '@/components/Global/TableToolbar'; -import TableRowAction from '@/components/Global/TableRowAction'; +import TableToolbar from '@/components/_sila/Global/TableToolbar'; +import TableRowAction from '@/components/_sila/Global/TableRowAction'; import BVTableSelectableMixin, { selectedRows, tableHeaderCheckboxModel, tableHeaderCheckboxIndeterminate, -} from '@/components/Mixins/BVTableSelectableMixin'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; -import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin'; +} from '@/components/_sila/Mixins/BVTableSelectableMixin'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; export default { name: 'UserManagement', diff --git a/src/views/_sila/Settings/PowerRestorePolicy/PowerRestorePolicy.vue b/src/views/_sila/Settings/PowerRestorePolicy/PowerRestorePolicy.vue index 06e30f3e..c357d47a 100644 --- a/src/views/_sila/Settings/PowerRestorePolicy/PowerRestorePolicy.vue +++ b/src/views/_sila/Settings/PowerRestorePolicy/PowerRestorePolicy.vue @@ -21,10 +21,10 @@ </template> <script> -import PageTitle from '@/components/Global/PageTitle'; -import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin'; -import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js'; -import BVToastMixin from '@/components/Mixins/BVToastMixin'; +import PageTitle from '@/components/_sila/Global/PageTitle'; +import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; +import VuelidateMixin from '@/components/_sila/Mixins/VuelidateMixin.js'; +import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; export default { name: 'PowerRestorePolicy', |