diff --git a/src/localization/en.json b/src/localization/en.json index f26987a0..f4c0b083 100644 --- a/src/localization/en.json +++ b/src/localization/en.json @@ -101,7 +101,6 @@ }, "panel": { "not_selected": "No Panel Selected", - "replace": "Replace Panel", "select": "Select Panel", "not_configured": "Panel Not Configured" }, @@ -118,7 +117,7 @@ "config": { "filters": "Event Types", "columns": "Columns", - "show_detail": "Show Detail", + "detail": "Detail", "show_type": "Show Type" }, "no_data": "No data", diff --git a/src/views/Dashboard/Dashboard.vue b/src/views/Dashboard/Dashboard.vue index 8a030644..c7a0046a 100644 --- a/src/views/Dashboard/Dashboard.vue +++ b/src/views/Dashboard/Dashboard.vue @@ -12,7 +12,11 @@ @@ -179,10 +183,16 @@ editRows.value[rowIndex].panels[panelIndex] = panelValue; }; + const handleLiveUpdatePanel = async (rowIndex, panelIndex, panelValue) => { + if (!dashboard.value?.rows?.[rowIndex]?.panels) return; + const rows = JSON.parse(JSON.stringify(dashboard.value.rows)); + rows[rowIndex].panels[panelIndex] = panelValue; + await dashboardStore.updateDashboard(props.id, { rows }); + }; + const handleSave = async () => { const isFirstSave = - dashboardStore.dashboards.length === 1 && - (!dashboard.value?.rows || dashboard.value.rows.length === 0); + dashboardStore.dashboards.length === 1 && (!dashboard.value?.rows || dashboard.value.rows.length === 0); await dashboardStore.updateDashboard(props.id, { name: editName.value.trim() || dashboard.value?.name || 'Dashboard', diff --git a/src/views/Dashboard/components/DashboardPanel.vue b/src/views/Dashboard/components/DashboardPanel.vue index 03cb25a3..fb43909b 100644 --- a/src/views/Dashboard/components/DashboardPanel.vue +++ b/src/views/Dashboard/components/DashboardPanel.vue @@ -9,71 +9,22 @@ @click="emit('remove')"> -
-
- - {{ panelLabel || t('dashboard.panel.not_selected') }} -
- - -
- - - - - -
- - +
+ +
@@ -97,7 +48,7 @@