summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitalii Lysak <v.lysak@dunice.net>2022-08-16 18:44:10 +0300
committerVitalii Lysak <v.lysak@dunice.net>2022-08-16 18:44:10 +0300
commiteabebb2402a1282b447c4aa64a1ed158a05bcf45 (patch)
treef21a0fb43912ebd71b9ab455028e264dd3ba7424
parent143223d899c3c1373c76b851ad6933424277e9bb (diff)
parentebb20c1dcafd8c24be68ccc2331721a418e84a03 (diff)
downloadwebui-vue-eabebb2402a1282b447c4aa64a1ed158a05bcf45.tar.xz
Merge branch 'sila' of git.sila.ru:pub/openbmc/webui-vue into sila
-rw-r--r--src/assets/styles/bmc/_sila/_forms.scss3
-rw-r--r--src/components/_sila/Mixins/LocalTimezoneLabelMixin.js3
-rw-r--r--src/env/components/AppNavigation/sila.js10
-rw-r--r--src/main.js13
4 files changed, 10 insertions, 19 deletions
diff --git a/src/assets/styles/bmc/_sila/_forms.scss b/src/assets/styles/bmc/_sila/_forms.scss
index c8f85db0..044e6635 100644
--- a/src/assets/styles/bmc/_sila/_forms.scss
+++ b/src/assets/styles/bmc/_sila/_forms.scss
@@ -26,6 +26,9 @@ div:not(.search-global) > .form-group {
text-align: right;
margin-right: 10px;
}
+ & .custom-radio + small {
+ text-align: left;
+ }
& label + div > small {
position: absolute;
right: 10px;
diff --git a/src/components/_sila/Mixins/LocalTimezoneLabelMixin.js b/src/components/_sila/Mixins/LocalTimezoneLabelMixin.js
index 6b4141c6..7ef7636b 100644
--- a/src/components/_sila/Mixins/LocalTimezoneLabelMixin.js
+++ b/src/components/_sila/Mixins/LocalTimezoneLabelMixin.js
@@ -4,8 +4,7 @@ const LocalTimezoneLabelMixin = {
methods: {
localOffset() {
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
- const shortTz = this.$options.filters.shortTimeZone(new Date());
- const pattern = `'${shortTz}' O`;
+ const pattern = ' O';
return format(new Date(), pattern, { timezone }).replace('GMT', 'UTC');
},
},
diff --git a/src/env/components/AppNavigation/sila.js b/src/env/components/AppNavigation/sila.js
index 401812a7..31538b98 100644
--- a/src/env/components/AppNavigation/sila.js
+++ b/src/env/components/AppNavigation/sila.js
@@ -31,6 +31,11 @@ const AppNavigationMixin = {
label: this.$t('appNavigation.dateTime'),
route: '/date-time',
},
+ {
+ id: 'pci-devices',
+ label: this.$t('appNavigation.pciDevices'),
+ route: '/pci-devices',
+ },
],
},
{
@@ -225,11 +230,6 @@ const AppNavigationMixin = {
},
],
},
- {
- id: 'pci-devices',
- label: this.$t('appNavigation.pciDevices'),
- route: '/pci-devices',
- },
],
};
},
diff --git a/src/main.js b/src/main.js
index ca17b958..e00d8868 100644
--- a/src/main.js
+++ b/src/main.js
@@ -44,16 +44,6 @@ import { format } from 'date-fns-tz';
import HighchartsVue from 'highcharts-vue';
import VueRandomColor from 'vue-randomcolor';
-// Filters
-Vue.filter('shortTimeZone', function (value) {
- const longTZ = value
- .toString()
- .match(/\((.*)\)/)
- .pop();
- const regexNotUpper = /[*a-z ]/g;
- return longTZ.replace(regexNotUpper, '');
-});
-
Vue.filter('formatDate', function (value) {
const isUtcDisplay = store.getters['global/isUtcDisplay'];
@@ -79,8 +69,7 @@ Vue.filter('formatTime', function (value) {
return `${value.toLocaleTimeString('default', timeOptions)} UTC`;
}
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
- const shortTz = Vue.filter('shortTimeZone')(value);
- const pattern = `HH:mm:ss ('${shortTz}' O)`;
+ const pattern = `HH:mm:ss O`;
return format(value, pattern, { timezone }).replace('GMT', 'UTC');
}
});