diff --git a/nezha-fronted/src/assets/css/components/chart/chart.scss b/nezha-fronted/src/assets/css/components/chart/chart.scss index e3094f8fd..231e3301d 100644 --- a/nezha-fronted/src/assets/css/components/chart/chart.scss +++ b/nezha-fronted/src/assets/css/components/chart/chart.scss @@ -507,6 +507,7 @@ font-weight: bold; } } + .endpoint-query-metrics.chart-fullscreen.nz-dialog,.recordRules-query-metrics.chart-fullscreen.nz-dialog { .chart-screen-header .chart-header__tools #browser-go { margin-left: 5px; @@ -683,8 +684,8 @@ } .chart-dataLink-tooltip{ - position: absolute; - padding-bottom: 2px; + position: absolute !important; + padding-bottom: 2px !important; z-index: 999999999; pointer-events: auto; .chart-dataLink-list{ @@ -717,6 +718,23 @@ } } +.chart-expolre-tooltip{ + display: block; + border-style: solid; + white-space: nowrap; + will-change: transform; + box-shadow: rgba(0, 0, 0, 0.2) 1px 2px 10px; + transition: opacity 0.2s cubic-bezier(0.23, 1, 0.32, 1) 0s, visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1) 0s, transform 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s; + background-color: $--background-color-empty; + border-width: 1px; + border-radius: 4px; + color: rgb(0, 0, 0); + font: 14px / 21px "Microsoft YaHei"; + padding: 10px; + border-color: rgb(221, 228, 237); + color: $--color-text-regular !important; +} + .graph-icon-info-box{ position: absolute; top: 50%; @@ -854,4 +872,4 @@ .chart-canvas-tooltip{ height: auto !important; } -} \ No newline at end of file +} diff --git a/nezha-fronted/src/assets/css/components/cli/webSSHNew.scss b/nezha-fronted/src/assets/css/components/cli/webSSHNew.scss index d7ac7d739..a0d798bcc 100644 --- a/nezha-fronted/src/assets/css/components/cli/webSSHNew.scss +++ b/nezha-fronted/src/assets/css/components/cli/webSSHNew.scss @@ -312,8 +312,31 @@ .terminal-menu { position: fixed; width: 150px; - border-radius: 2px; + border-radius: 4px; z-index: 1000; + padding: 10px 15px; + .nz-icon { + margin-right: 5px; + } + .terminal-menu-item-disabled { + //background: $--background-color-disabled; + cursor: not-allowed !important; + color: $--color-text-disabled; + } + } +} +.terminal-setting { + .system-title { + background: $--background-color-base; + padding: 7px 10px !important; + box-sizing: border-box; + border-radius: 2px; + } + .el-form-item__tip { + margin: 8px 0 15px 0; + } + .terminal-setting-item { + margin-bottom: 40px; } } diff --git a/nezha-fronted/src/assets/css/components/page/dashboard/explore/explore.scss b/nezha-fronted/src/assets/css/components/page/dashboard/explore/explore.scss index 4cedeff72..0352a8215 100644 --- a/nezha-fronted/src/assets/css/components/page/dashboard/explore/explore.scss +++ b/nezha-fronted/src/assets/css/components/page/dashboard/explore/explore.scss @@ -283,6 +283,7 @@ .chart-room { width: 100%; height: 300px; + position: relative; } .introduce-view { .info-room { diff --git a/nezha-fronted/src/components/chart/chart/chartTimeSeries.vue b/nezha-fronted/src/components/chart/chart/chartTimeSeries.vue index 7b74b1603..7e8448734 100644 --- a/nezha-fronted/src/components/chart/chart/chartTimeSeries.vue +++ b/nezha-fronted/src/components/chart/chart/chartTimeSeries.vue @@ -179,6 +179,18 @@ export default { this.legends = [] this.series = chartOption.series = this.handleTimeSeries(this.chartInfo, chartOption.series[0], this.chartData) // 生成series和legends + const styleOption = this.$lodash.get(this.chartInfo, 'param.option') + if (styleOption) { + chartOption.series.forEach(item => { + if (item.lineStyle && styleOption.lineWidth != undefined) { + item.lineStyle.width = styleOption.lineWidth + } + if (styleOption.pointSize != undefined) { + item.symbolSize = styleOption.pointSize + } + }) + } + this.isGrey = this.legends.map(() => false) chartOption.color = this.colorList if (!this.series.length) { @@ -265,12 +277,11 @@ export default { if (this.tooltip.activeIndex != params.seriesIndex) { const option = myChart.getOption() option.series[params.seriesIndex].symbol = 'circle' - option.series[params.seriesIndex].emphasis.itemStyle = { - opacity: 1, + option.series[params.seriesIndex].itemStyle = { borderColor: this.hexToRgb(params.color, 0.4), - borderWidth: 6 + borderWidth: 5 } - myChart.setOption(option, true) + myChart.setOption(option) } } this.tooltip.activeIndex = params.seriesIndex @@ -280,11 +291,8 @@ export default { const option = myChart.getOption() option.series.forEach(item => { item.symbol = 'emptyCircle' - item.emphasis.itemStyle = { - opacity: 1 - } }) - myChart.setOption(option, true) + myChart.setOption(option) } this.tooltip.activeIndex = undefined }) diff --git a/nezha-fronted/src/components/chart/chart/legend.vue b/nezha-fronted/src/components/chart/chart/legend.vue index 0c9ffcea4..6968fee1c 100644 --- a/nezha-fronted/src/components/chart/chart/legend.vue +++ b/nezha-fronted/src/components/chart/chart/legend.vue @@ -129,11 +129,6 @@ export default { } }, methods: { - onCopy (txt) { - this.$copyText(txt).then(() => { - this.$message.success({ message: this.$t('overall.copySuccess') }) - }) - }, clickLegend (legendName, index) { /* 点击legend * 1.当前如果是全高亮状态,则全部置灰,只留被点击的legend高亮 diff --git a/nezha-fronted/src/components/chart/chart/options/chartTimeSeries.js b/nezha-fronted/src/components/chart/chart/options/chartTimeSeries.js index c10ebc33b..65b859d54 100644 --- a/nezha-fronted/src/components/chart/chart/options/chartTimeSeries.js +++ b/nezha-fronted/src/components/chart/chart/options/chartTimeSeries.js @@ -152,26 +152,23 @@ export const chartTimeSeriesLineOption = { type: 'line', symbol: 'emptyCircle', // 去掉点 connectNulls: true, - symbolSize: [6, 6], + symbolSize: 6, smooth: 0.2, // 曲线变平滑 - // showSymbol: false, - itemStyle: { - opacity: 0.001 - }, + showSymbol: false, data: [], lineStyle: { width: 1, opacity: 0.9 }, emphasis: { - focus: 'series', - itemStyle: { - opacity: 1 - } + focus: 'series' }, blur: { lineStyle: { opacity: 0.3 + }, + itemStyle: { + opacity: 1 } } }], diff --git a/nezha-fronted/src/components/chart/renderChart.js b/nezha-fronted/src/components/chart/renderChart.js index f529d70c9..3dc1bbe41 100644 --- a/nezha-fronted/src/components/chart/renderChart.js +++ b/nezha-fronted/src/components/chart/renderChart.js @@ -45,7 +45,7 @@ export default { if (!leftInfo.copies) { chartOption.yAxis[0].min = 0 chartOption.yAxis[0].max = 1 - } else { + } else if (!chartOption.yAxis[0].max) { chartOption.yAxis[0].max = undefined } if (leftInfo.unit.type == 'Time' || chartOption.yAxis[0].maxInterval === 1) { @@ -79,7 +79,7 @@ export default { if (!rightInfo.copies) { chartOption.yAxis[1].min = 0 chartOption.yAxis[1].max = 1 - } else { + } else if (!chartOption.yAxis[1].max) { chartOption.yAxis[1].max = undefined } if (rightInfo.unit.type == 'Time' || chartOption.yAxis[1].maxInterval === 1) { @@ -92,6 +92,7 @@ export default { delete chartOption.yAxis[1].max } } + console.log(chartOption) return chartOption }, getMinMaxFromData (originalDatas, chartUnit = 2, params) { diff --git a/nezha-fronted/src/components/cli/consoleNew.vue b/nezha-fronted/src/components/cli/consoleNew.vue index 1c536163f..c99714ee1 100644 --- a/nezha-fronted/src/components/cli/consoleNew.vue +++ b/nezha-fronted/src/components/cli/consoleNew.vue @@ -10,21 +10,21 @@ top: menuPosition.top + 'px' }" > -