diff --git a/nezha-fronted/src/components/chart/chart.vue b/nezha-fronted/src/components/chart/chart.vue index fa79c4b96..39610a7bf 100644 --- a/nezha-fronted/src/components/chart/chart.vue +++ b/nezha-fronted/src/components/chart/chart.vue @@ -29,7 +29,7 @@ > - + > import loading from '@/components/common/loading' import chartAssetInfo from './chart/chartAssetInfo' -import chartAutoCarousel from './chart/chartAutoCarousel' +import chartAutotopology from './chart/chartAutotopology' import chartBar from './chart/chartBar' import chartClock from './chart/chartClock' import chartDiagram from './chart/chartDiagram' @@ -159,7 +159,7 @@ import chartUrl from './chart/chartUrl' import chartValue from './chart/chartValue' import chartHexagon from './chart/chartHexagon' import chartMap from './chart/chartMap' -import { getOption, isTimeSeries, isHexagonFigure, isUrl, isText, isChartPie, isChartBar, isTreemap, isLog, isStat, isDiagram, isGroup, isAutoCarousel, isMap, isAssetInfo, isEndpointInfo, isTable } from './chart/tools' +import { getOption, isTimeSeries, isHexagon, isUrl, isText, isChartPie, isChartBar, isTreemap, isLog, isStat, isDiagram, isGroup, isAutotopology, isMap, isAssetInfo, isEndpointInfo, isTable } from './chart/tools' import lodash from 'lodash' export default { @@ -167,7 +167,7 @@ export default { components: { loading, chartAssetInfo, - chartAutoCarousel, + chartAutotopology, chartBar, chartClock, chartDiagram, @@ -211,7 +211,7 @@ export default { }, methods: { isTimeSeries, - isHexagonFigure, + isHexagon, isChartPie, isChartBar, isUrl, @@ -221,7 +221,7 @@ export default { isStat, isDiagram, isGroup, - isAutoCarousel, + isAutotopology, isAssetInfo, isEndpointInfo, isMap, diff --git a/nezha-fronted/src/components/chart/chart/chartAutoCarousel.vue b/nezha-fronted/src/components/chart/chart/chartAutotopology.vue similarity index 99% rename from nezha-fronted/src/components/chart/chart/chartAutoCarousel.vue rename to nezha-fronted/src/components/chart/chart/chartAutotopology.vue index bd0196864..48600ba15 100644 --- a/nezha-fronted/src/components/chart/chart/chartAutoCarousel.vue +++ b/nezha-fronted/src/components/chart/chart/chartAutotopology.vue @@ -26,7 +26,7 @@ import topology from '@/components/common/project/topologyL5' import chartMixin from '@/components/chart/chartMixin' import bus from '@/libs/bus' export default { - name: 'chartAutoCarousel', + name: 'chartAutotopology', data () { return { topologyLoading: false, diff --git a/nezha-fronted/src/components/chart/chart/tools.js b/nezha-fronted/src/components/chart/chart/tools.js index 099a49b8a..38f977e73 100644 --- a/nezha-fronted/src/components/chart/chart/tools.js +++ b/nezha-fronted/src/components/chart/chart/tools.js @@ -51,8 +51,8 @@ export function isTimeSeries (type) { return type === chartType.line || type === chartType.area || type === chartType.point } -export function isHexagonFigure (type) { - return type === chartType.hexagonFigure +export function isHexagon (type) { + return type === chartType.hexagon } export function isChartPie (type) { return type === chartType.pie @@ -82,8 +82,8 @@ export function isDiagram (type) { export function isGroup (type) { return type === chartType.group } -export function isAutoCarousel (type) { - return type === chartType.carousel +export function isAutotopology (type) { + return type === chartType.topology } export function isAssetInfo (type) { return type === chartType.assetInfo diff --git a/nezha-fronted/src/components/chart/panelChart.vue b/nezha-fronted/src/components/chart/panelChart.vue index d6c7d6bc7..63e0a1ebc 100644 --- a/nezha-fronted/src/components/chart/panelChart.vue +++ b/nezha-fronted/src/components/chart/panelChart.vue @@ -188,7 +188,7 @@ export default { break } case 'misc': { - if (this.chartInfo.type === 'hexagonFigure') { + if (this.chartInfo.type === 'hexagon') { this.getHexagonFigureData().then(res => { this.chartData = res }).finally(() => { @@ -207,8 +207,8 @@ export default { this.chartData = [...this.chartInfo.children] this.groupInit() } - if (this.chartInfo.type === 'carousel') { - this.chartData = ['carousel'] + if (this.chartInfo.type === 'topology') { + this.chartData = ['topology'] } if (this.chartInfo.type === 'map') { this.chartData = ['map'] diff --git a/nezha-fronted/src/components/common/js/constants.js b/nezha-fronted/src/components/common/js/constants.js index e94ec7450..3a121e4a3 100644 --- a/nezha-fronted/src/components/common/js/constants.js +++ b/nezha-fronted/src/components/common/js/constants.js @@ -405,8 +405,7 @@ export const chartType = { endpointInfo: 'endpointInfo', topology: 'topology', map: 'map', - hexagonFigure: 'hexagonFigure', - carousel: 'carousel' + hexagon: 'hexagon' } export const chartLegendPlacement = { diff --git a/nezha-fronted/src/components/common/rightBox/chart/chartTypeShow.js b/nezha-fronted/src/components/common/rightBox/chart/chartTypeShow.js index cc612b4fd..23901a398 100644 --- a/nezha-fronted/src/components/common/rightBox/chart/chartTypeShow.js +++ b/nezha-fronted/src/components/common/rightBox/chart/chartTypeShow.js @@ -138,6 +138,16 @@ export default { return false default: return false } + }, + contentShow (type) { + switch (type) { + case 'group' : + case 'map' : + case 'topology' : + case 'hexagon' : + return false + default: return true + } } } } diff --git a/nezha-fronted/src/components/common/rightBox/chart/otherChartConfig.vue b/nezha-fronted/src/components/common/rightBox/chart/otherChartConfig.vue index 08538b615..41cf2b946 100644 --- a/nezha-fronted/src/components/common/rightBox/chart/otherChartConfig.vue +++ b/nezha-fronted/src/components/common/rightBox/chart/otherChartConfig.vue @@ -101,7 +101,7 @@ -
+
{{$t('dashboard.panel.chartForm.content')}}
@@ -171,11 +171,11 @@ export default { name: this.$t('dashboard.panel.chartForm.typeVal.map.label') }, { - id: 'carousel', - name: this.$t('dashboard.panel.chartForm.typeVal.carousel.label') + id: 'topology', + name: this.$t('dashboard.panel.chartForm.typeVal.topology.label') }, { - id: 'hexagonFigure', + id: 'hexagon', name: this.$t('dashboard.panel.chartForm.typeVal.hexagonFigure.label') } ]