diff --git a/nezha-fronted/src/components/chart/chart/options/chartClock.js b/nezha-fronted/src/components/chart/chart/options/chartClock.js index 9d68d58a5..063971dc9 100644 --- a/nezha-fronted/src/components/chart/chart/options/chartClock.js +++ b/nezha-fronted/src/components/chart/chart/options/chartClock.js @@ -9,39 +9,27 @@ const chartClockOption = { max: 12, splitNumber: 12, clockwise: true, + radius: '88%', + center: ['50%', '50%'], axisLine: { - lineStyle: { - width: 15, - color: [[1, 'rgba(0,0,0,0.7)']], - shadowColor: 'rgba(0, 0, 0, 0.5)', - shadowBlur: 15 - } + show: false + }, + axisLabel: { + show: false }, splitLine: { lineStyle: { shadowColor: 'rgba(0, 0, 0, 0.3)', - shadowBlur: 3, - shadowOffsetX: 1, - shadowOffsetY: 2 - } - }, - axisLabel: { - fontSize: 14, - distance: 25, - formatter: function (value) { - if (value === 0) { - return '' - } - return value + '' + width: 5 } }, pointer: { icon: 'path://M2.9,0.7L2.9,0.7c1.4,0,2.6,1.2,2.6,2.6v115c0,1.4-1.2,2.6-2.6,2.6l0,0c-1.4,0-2.6-1.2-2.6-2.6V3.3C0.3,1.9,1.4,0.7,2.9,0.7z', - width: 12, + width: 9, length: '55%', offsetCenter: [0, '8%'], itemStyle: { - color: '#C0911F', + color: '#202f3f', shadowColor: 'rgba(0, 0, 0, 0.3)', shadowBlur: 8, shadowOffsetX: 2, @@ -51,9 +39,6 @@ const chartClockOption = { detail: { show: false }, - title: { - offsetCenter: [0, '30%'] - }, data: [ { value: 0 @@ -82,24 +67,11 @@ const chartClockOption = { }, pointer: { icon: 'path://M2.9,0.7L2.9,0.7c1.4,0,2.6,1.2,2.6,2.6v115c0,1.4-1.2,2.6-2.6,2.6l0,0c-1.4,0-2.6-1.2-2.6-2.6V3.3C0.3,1.9,1.4,0.7,2.9,0.7z', - width: 8, + width: 6, length: '70%', offsetCenter: [0, '8%'], itemStyle: { - color: '#C0911F', - shadowColor: 'rgba(0, 0, 0, 0.3)', - shadowBlur: 8, - shadowOffsetX: 2, - shadowOffsetY: 4 - } - }, - anchor: { - show: true, - size: 20, - showAbove: false, - itemStyle: { - borderWidth: 15, - borderColor: '#C0911F', + color: '#202f3f', shadowColor: 'rgba(0, 0, 0, 0.3)', shadowBlur: 8, shadowOffsetX: 2, @@ -109,9 +81,6 @@ const chartClockOption = { detail: { show: false }, - title: { - offsetCenter: ['0%', '-40%'] - }, data: [ { value: 0 @@ -125,7 +94,6 @@ const chartClockOption = { endAngle: -270, min: 0, max: 60, - animationEasingUpdate: 'bounceOut', clockwise: true, axisLine: { show: false @@ -141,11 +109,11 @@ const chartClockOption = { }, pointer: { icon: 'path://M2.9,0.7L2.9,0.7c1.4,0,2.6,1.2,2.6,2.6v115c0,1.4-1.2,2.6-2.6,2.6l0,0c-1.4,0-2.6-1.2-2.6-2.6V3.3C0.3,1.9,1.4,0.7,2.9,0.7z', - width: 4, + width: 3, length: '85%', offsetCenter: [0, '8%'], itemStyle: { - color: '#C0911F', + color: '#fa901c', shadowColor: 'rgba(0, 0, 0, 0.3)', shadowBlur: 8, shadowOffsetX: 2, @@ -157,7 +125,7 @@ const chartClockOption = { size: 15, showAbove: true, itemStyle: { - color: '#C0911F', + color: '#fa901c', shadowColor: 'rgba(0, 0, 0, 0.3)', shadowBlur: 8, shadowOffsetX: 2, @@ -167,9 +135,6 @@ const chartClockOption = { detail: { show: false }, - title: { - offsetCenter: ['0%', '-40%'] - }, data: [ { value: 0 diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/endpointQuery.vue b/nezha-fronted/src/components/common/bottomBox/tabs/endpointQuery.vue index 1737c0b24..f3eebc55f 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/endpointQuery.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/endpointQuery.vue @@ -30,7 +30,8 @@ clearable :time-arrow-control="true" placeholder="Moment" - value-format="yyyy-MM-dd HH:mm:ss" + :value-format="endpointQueryTime" + :format="endpointQueryTime" > @@ -125,7 +126,8 @@ export default { dropdownShow: false, timeout: null, formatTime: '', - hideSameLabels: true + hideSameLabels: true, + endpointQueryTime: localStorage.getItem('nz-default-dateFormat') ? localStorage.getItem('nz-default-dateFormat') : 'yyyy-MM-dd hh:mm:ss' } }, methods: { diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/endpointQueryTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/endpointQueryTab.vue index 9935046ba..2ba910315 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/endpointQueryTab.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/endpointQueryTab.vue @@ -40,7 +40,8 @@ clearable :time-arrow-control="true" placeholder="Moment" - value-format="yyyy-MM-dd HH:mm:ss" + :value-format="endpointQueryTabTime" + :format="endpointQueryTabTime" @change="pickTime" > @@ -173,7 +174,8 @@ export default { plTableSHow: true, scrollTop: 0, scrollbarWrap: null, - minusTime: 0 + minusTime: 0, + endpointQueryTabTime: localStorage.getItem('nz-default-dateFormat') ? localStorage.getItem('nz-default-dateFormat') : 'yyyy-MM-dd hh:mm:ss' } }, methods: { diff --git a/nezha-fronted/src/components/common/multipleTime.vue b/nezha-fronted/src/components/common/multipleTime.vue index e44a367d7..f4a66bba6 100644 --- a/nezha-fronted/src/components/common/multipleTime.vue +++ b/nezha-fronted/src/components/common/multipleTime.vue @@ -4,7 +4,7 @@
@@ -159,7 +159,8 @@ export default { }, isPopoverDisabled: false, isCustom: false, - valueArr: [] + valueArr: [], + multipleTime: localStorage.getItem('nz-default-dateFormat') ? localStorage.getItem('nz-default-dateFormat') : 'yyyy-MM-dd hh:mm:ss' } }, watch: { @@ -170,8 +171,8 @@ export default { if (this.showTime.value) { this.setSearchTime(this.showTime.type, this.showTime.value) } else { - const startTime = bus.timeFormate(this.searchTime[0], 'yyyy-MM-dd hh:mm:ss') - const endTime = bus.timeFormate(new Date(this.searchTime[0]).getTime() + new Date(this.stepSearchTime[1]).getTime() - new Date(this.stepSearchTime[0]).getTime(), 'yyyy-MM-dd hh:mm:ss') + const startTime = bus.timeFormate(this.searchTime[0], this.multipleTime) + const endTime = bus.timeFormate(new Date(this.searchTime[0]).getTime() + new Date(this.stepSearchTime[1]).getTime() - new Date(this.stepSearchTime[0]).getTime(), this.multipleTime) this.$set(this.searchTime, 0, startTime) this.$set(this.searchTime, 1, endTime) } @@ -197,8 +198,8 @@ export default { }, methods: { dateChange (val) { - const startTime = bus.timeFormate(val, 'yyyy-MM-dd hh:mm:ss') - const endTime = bus.timeFormate(new Date(val).getTime() + new Date(this.stepSearchTime[1]).getTime() - new Date(this.stepSearchTime[0]).getTime(), 'yyyy-MM-dd hh:mm:ss') + const startTime = bus.timeFormate(val, this.multipleTime) + const endTime = bus.timeFormate(new Date(val).getTime() + new Date(this.stepSearchTime[1]).getTime() - new Date(this.stepSearchTime[0]).getTime(), this.multipleTime) this.$set(this.searchTime, 0, startTime) this.$set(this.searchTime, 1, endTime) @@ -268,20 +269,20 @@ export default { }, setSearchTime (type, val) { if (type === 'minute') { - const startTime = bus.timeFormate(new Date(this.stepSearchTime[0]).getTime() - val * 60 * 1000, 'yyyy-MM-dd hh:mm:ss') - const endTime = bus.timeFormate(new Date(this.stepSearchTime[1]).getTime() - val * 60 * 1000, 'yyyy-MM-dd hh:mm:ss') + const startTime = bus.timeFormate(new Date(this.stepSearchTime[0]).getTime() - val * 60 * 1000, this.multipleTime) + const endTime = bus.timeFormate(new Date(this.stepSearchTime[1]).getTime() - val * 60 * 1000, this.multipleTime) this.$set(this.searchTime, 0, startTime) this.$set(this.searchTime, 1, endTime) this.$set(this.searchTime, 2, val + 'm') } else if (type === 'hour') { - const startTime = bus.timeFormate(new Date(this.stepSearchTime[0]).getTime() - val * 60 * 60 * 1000, 'yyyy-MM-dd hh:mm:ss') - const endTime = bus.timeFormate(new Date(this.stepSearchTime[1]).getTime() - val * 60 * 60 * 1000, 'yyyy-MM-dd hh:mm:ss') + const startTime = bus.timeFormate(new Date(this.stepSearchTime[0]).getTime() - val * 60 * 60 * 1000, this.multipleTime) + const endTime = bus.timeFormate(new Date(this.stepSearchTime[1]).getTime() - val * 60 * 60 * 1000, this.multipleTime) this.$set(this.searchTime, 0, startTime) this.$set(this.searchTime, 1, endTime) this.$set(this.searchTime, 2, val + 'h') } else if (type === 'date') { - const startTime = bus.timeFormate(new Date(this.stepSearchTime[0]).getTime() - val * 24 * 60 * 60 * 1000, 'yyyy-MM-dd hh:mm:ss') - const endTime = bus.timeFormate(new Date(this.stepSearchTime[1]).getTime() - val * 24 * 60 * 60 * 1000, 'yyyy-MM-dd hh:mm:ss') + const startTime = bus.timeFormate(new Date(this.stepSearchTime[0]).getTime() - val * 24 * 60 * 60 * 1000, this.multipleTime) + const endTime = bus.timeFormate(new Date(this.stepSearchTime[1]).getTime() - val * 24 * 60 * 60 * 1000, this.multipleTime) this.$set(this.searchTime, 0, startTime) this.$set(this.searchTime, 1, endTime) this.$set(this.searchTime, 2, val + 'd') diff --git a/nezha-fronted/src/components/common/rightBox/alertSilenceBox.vue b/nezha-fronted/src/components/common/rightBox/alertSilenceBox.vue index 1ee6a1472..666a7dcba 100644 --- a/nezha-fronted/src/components/common/rightBox/alertSilenceBox.vue +++ b/nezha-fronted/src/components/common/rightBox/alertSilenceBox.vue @@ -38,7 +38,7 @@
{{ $t("overall.startTime") }} {{ $t("overall.endTime") }}
diff --git a/nezha-fronted/src/components/page/config/system/apiKeyTable.vue b/nezha-fronted/src/components/page/config/system/apiKeyTable.vue index b58845642..8487ef11a 100644 --- a/nezha-fronted/src/components/page/config/system/apiKeyTable.vue +++ b/nezha-fronted/src/components/page/config/system/apiKeyTable.vue @@ -55,8 +55,8 @@ style="width: 100%;" v-model="scope.row[item.prop]" prefix-icon=" " size="small" ref="calendar" - format="yyyy-MM-dd HH:mm:ss" - value-format="yyyy-MM-dd HH:mm:ss" + :format="apiKeyTableTime" + :value-format="apiKeyTableTime" type="datetime" popper-class="item-system-table right-public-box-dropdown-top right-box-select-top" :picker-options="pickerOptions" @@ -165,7 +165,8 @@ export default { disabledDate (time) { return time.getTime() < Date.now() - 24 * 60 * 60 * 1000 } - } + }, + apiKeyTableTime: localStorage.getItem('nz-default-dateFormat') ? localStorage.getItem('nz-default-dateFormat') : 'yyyy-MM-dd hh:mm:ss' } }, methods: { diff --git a/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue b/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue index 45ab3dd01..357cb64c7 100644 --- a/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue +++ b/nezha-fronted/src/components/page/dashboard/explore/exploreItem.vue @@ -131,7 +131,13 @@ :resizable="false" min-width="110px" show-overflow-tooltip - > + > + +