diff --git a/src/components/Graph.vue b/src/components/Graph.vue index d31ab21a..f038a91c 100644 --- a/src/components/Graph.vue +++ b/src/components/Graph.vue @@ -16,13 +16,12 @@ limitations under the License. -->
diff --git a/src/hooks/useEcharts.ts b/src/hooks/useEcharts.ts index 052b751e..e219094c 100644 --- a/src/hooks/useEcharts.ts +++ b/src/hooks/useEcharts.ts @@ -116,6 +116,7 @@ export function useECharts( } function resize() { + console.log("resize"); chartInstance?.resize(); } diff --git a/src/store/modules/dashboard.ts b/src/store/modules/dashboard.ts index 5bda837e..20d28df1 100644 --- a/src/store/modules/dashboard.ts +++ b/src/store/modules/dashboard.ts @@ -51,10 +51,22 @@ export const dashboardStore = defineStore({ w: 24, h: 12, i: String(this.layout.length), + metrics: ["service_resp_time"], + queryMetricType: "readMetricsValues", type: "Widget", - widget: {}, - graph: {}, - standard: {}, + widget: { + title: "Title123", + tips: "Tooltip123", + }, + graph: { + showBackground: true, + barWidth: 30, + type: "Line", + }, + standard: { + sortOrder: "DEC", + unit: "s", + }, }; this.layout = this.layout.map((d: LayoutConfig) => { d.y = d.y + newWidget.h; @@ -119,10 +131,22 @@ export const dashboardStore = defineStore({ w: 24, h: 12, i: String(children.length), + metrics: ["service_resp_time"], + queryMetricType: "readMetricsValues", type: "Widget", - widget: {}, - graph: {}, - standard: {}, + widget: { + title: "Title123", + tips: "Tooltip123", + }, + graph: { + showBackground: true, + barWidth: 30, + type: "Line", + }, + standard: { + sortOrder: "DEC", + unit: "s", + }, }; if (this.layout[idx].children) { const items = children.map((d: LayoutConfig) => { diff --git a/src/views/dashboard/controls/Widget.vue b/src/views/dashboard/controls/Widget.vue index b89b95cf..17cfca2e 100644 --- a/src/views/dashboard/controls/Widget.vue +++ b/src/views/dashboard/controls/Widget.vue @@ -24,7 +24,7 @@ limitations under the License. -->