@@ -108,6 +109,7 @@ import * as echarts from 'echarts'
import chartConfig from '@/components/page/dashboard/overview/chartConfig'
import { dealLegendAlias } from '@/components/common/js/tools'
import bus from '@/libs/bus'
+import chart from '../overview/chart'
export default {
name: 'logTab',
props: {
@@ -120,7 +122,12 @@ export default {
loadingBottom: Boolean,
exploreLogTable: Boolean,
exploreItem: Boolean,
- timeRange: {}
+ timeRange: {},
+ logChartData: Array,
+ unit: { type: Number, default: 5 }
+ },
+ components: {
+ chart
},
computed: {
tableTimeFormat () {
diff --git a/nezha-fronted/src/components/page/dashboard/overview/chart.vue b/nezha-fronted/src/components/page/dashboard/overview/chart.vue
index ce840a534..0cc866f79 100644
--- a/nezha-fronted/src/components/page/dashboard/overview/chart.vue
+++ b/nezha-fronted/src/components/page/dashboard/overview/chart.vue
@@ -621,6 +621,14 @@ export default {
this.colors = Object.assign([], colors)
this.$set(this.option, 'color', colors)
},
+ setLogColor: function (num) {
+ const colors = []
+ for (let i = 0; i < num; i++) {
+ colors.push('#bdc4cd')
+ }
+ this.colors = Object.assign([], colors)
+ this.$set(this.option, 'color', colors)
+ },
startLoading: function () {
this.$refs.loading.startLoading()
this.$emit('is-loading', true)