From 9dba83643e0e03b06103acb3a80eb33d49213ff4 Mon Sep 17 00:00:00 2001 From: Qiuxia Fan Date: Thu, 17 Mar 2022 21:52:13 +0800 Subject: [PATCH] fix metric config --- src/views/dashboard/Edit.vue | 7 + src/views/dashboard/configuration/Widget.vue | 2 +- .../configuration/widget/MetricOptions.vue | 120 +++++++++++------- src/views/dashboard/controls/Widget.vue | 4 +- src/views/dashboard/data.ts | 4 +- src/views/dashboard/graphs/Table.vue | 36 ++++-- 6 files changed, 107 insertions(+), 66 deletions(-) diff --git a/src/views/dashboard/Edit.vue b/src/views/dashboard/Edit.vue index 1b55b6a9..f780a3f9 100644 --- a/src/views/dashboard/Edit.vue +++ b/src/views/dashboard/Edit.vue @@ -65,6 +65,13 @@ async function setTemplate() { dashboardStore.setLayout(layout.children || []); appStore.setPageTitle(layout.name); + if (!dashboardStore.currentDashboard) { + dashboardStore.setCurrentDashboard({ + layer: p.layerId, + entity: p.layerId, + name: p.name, + }); + } } function handleClick(e: any) { e.stopPropagation(); diff --git a/src/views/dashboard/configuration/Widget.vue b/src/views/dashboard/configuration/Widget.vue index 9ca4b448..48fc4ee2 100644 --- a/src/views/dashboard/configuration/Widget.vue +++ b/src/views/dashboard/configuration/Widget.vue @@ -53,7 +53,7 @@ limitations under the License. --> - + diff --git a/src/views/dashboard/configuration/widget/MetricOptions.vue b/src/views/dashboard/configuration/widget/MetricOptions.vue index 15e062aa..29a423eb 100644 --- a/src/views/dashboard/configuration/widget/MetricOptions.vue +++ b/src/views/dashboard/configuration/widget/MetricOptions.vue @@ -13,11 +13,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -->