diff --git a/nezha-fronted/src/components/chart/chart/grid/utils.js b/nezha-fronted/src/components/chart/chart/grid/utils.js index 2fa6c35df..732292e8e 100644 --- a/nezha-fronted/src/components/chart/chart/grid/utils.js +++ b/nezha-fronted/src/components/chart/chart/grid/utils.js @@ -291,8 +291,11 @@ export function moveElementAwayFromCollision (layout, collidesWith, itemToMove, // Previously this was optimized to move below the collision directly, but this can cause problems // with cascading moves, as an item may actually leapflog a collision and cause a reversal in order. - - return moveElement(layout, itemToMove, undefined, itemToMove.y + 0.15, preventCollision) + let addY = 0.15 + if (itemToMove.groupId) { + addY = 1 + } + return moveElement(layout, itemToMove, undefined, itemToMove.y + addY, preventCollision) } /** diff --git a/nezha-fronted/src/components/chart/chartList.vue b/nezha-fronted/src/components/chart/chartList.vue index 16735171d..7bb7097dd 100644 --- a/nezha-fronted/src/components/chart/chartList.vue +++ b/nezha-fronted/src/components/chart/chartList.vue @@ -479,6 +479,9 @@ export default { // } catch (e) { // console.info(e) // } + if (item.y < 0) { + item.y = 0 + } height = (item.type === 'group' && item.param.collapse) ? this.headerH : item.height // param.showHeader = true if (param.valueMapping) { diff --git a/nezha-fronted/src/components/page/config/system/apiKeyTable.vue b/nezha-fronted/src/components/page/config/system/apiKeyTable.vue index 24bb7cc6c..171338a4b 100644 --- a/nezha-fronted/src/components/page/config/system/apiKeyTable.vue +++ b/nezha-fronted/src/components/page/config/system/apiKeyTable.vue @@ -39,7 +39,7 @@ - + {{scope.row[item.prop]?scope.row[item.prop].name:'-'}} - + {{scope.row[item.prop]?utcTimeToTimezoneStr(scope.row[item.prop]):$t('config.system.apiKey.noExpire')}} {{scope.row[item.prop]?utcTimeToTimezoneStr(scope.row[item.prop]):$t('config.system.apiKey.noExpire')}} + + + {{scope.row[item.prop].replace(reg, '*')}} + + + {{scope.row[item.prop]}} - @@ -133,12 +139,14 @@ export default { }, { label: this.$t('apiKey.key'), prop: 'token', - show: true - }, { - label: this.$t('profile.role'), - prop: 'role', - show: true - }, { + show: false + }, + // { + // label: this.$t('profile.role'), + // prop: 'role', + // show: true + // }, + { label: this.$t('config.system.apiKey.expireAt'), prop: 'expireAt', show: true @@ -164,7 +172,8 @@ export default { disabledDate (time) { return time.getTime() < Date.now() - 24 * 60 * 60 * 1000 } - } + }, + reg: new RegExp("(?<=.{8}).", 'g') } }, methods: { @@ -203,7 +212,6 @@ export default { } }, mounted () { - } } diff --git a/nezha-fronted/src/components/page/config/system/selfApiKeyTable.vue b/nezha-fronted/src/components/page/config/system/selfApiKeyTable.vue index 324cab568..c41b1c2cc 100644 --- a/nezha-fronted/src/components/page/config/system/selfApiKeyTable.vue +++ b/nezha-fronted/src/components/page/config/system/selfApiKeyTable.vue @@ -40,7 +40,10 @@ {{scope.row[item.prop]?scope.row[item.prop]:'-'}} - {{scope.row[item.prop]?scope.row[item.prop]:'-'}} + + {{scope.row[item.prop]?scope.row[item.prop].replace(reg, '*'):'-'}} + + {{scope.row[item.prop]?utcTimeToTimezoneStr(scope.row[item.prop]):'-'}} @@ -106,7 +109,7 @@ export default { label: this.$t('asset.talon.token'), prop: 'token', minWidth: 180, - show: true + show: false }, { label: this.$t('config.system.apiKey.expireAt'), prop: 'expireAt', @@ -123,7 +126,8 @@ export default { minWidth: 100, show: true } - ] + ], + reg: new RegExp("(?<=.{8}).", 'g') } }, methods: {