From bb66e051c9d76c79ec1e588959ef643ea899bdc8 Mon Sep 17 00:00:00 2001 From: Sai Nikhil Date: Thu, 16 Jan 2025 19:00:13 +0530 Subject: [PATCH] fix: Import dashboard latest revamp (#5546) ## Summary by CodeRabbit ## Release Notes - **New Features** - Enhanced dashboard import functionality with a tabbed interface for file and URL imports. - Added support for community dashboard navigation. - **Localization** - Added "Community Dashboards" translation for English language support. - **User Experience** - Streamlined dashboard import process with dynamic input components. - Improved input validation and error handling during dashboard imports. - More robust error feedback for import-related actions. - Updated layout for better user interaction and navigation. --- web/src/composables/shared/router.ts | 2 +- web/src/locales/languages/en.json | 3 +- web/src/views/Dashboards/ImportDashboard.vue | 892 ++++++++++++++----- 3 files changed, 667 insertions(+), 230 deletions(-) diff --git a/web/src/composables/shared/router.ts b/web/src/composables/shared/router.ts index a9de7c9afd..b4a13407ff 100644 --- a/web/src/composables/shared/router.ts +++ b/web/src/composables/shared/router.ts @@ -186,7 +186,7 @@ const useRoutes = () => { component: ImportDashboard, props: true, meta: { - keepAlive: true, + // keepAlive: true, }, beforeEnter(to: any, from: any, next: any) { routeGuard(to, from, next); diff --git a/web/src/locales/languages/en.json b/web/src/locales/languages/en.json index 0bacfa4ca3..8b60d48b1f 100644 --- a/web/src/locales/languages/en.json +++ b/web/src/locales/languages/en.json @@ -731,7 +731,8 @@ "searchMsg": "Search for Dashboards across Folders", "trellisLayout": "Trellis Layout", "numOfColumns": "Columns per Row", - "trellisTooltip": "This is only applicable when breakdown field is available. Add Breakdown Field to enable Trellis Layout" + "trellisTooltip": "This is only applicable when breakdown field is available. Add Breakdown Field to enable Trellis Layout", + "communityDashboard": "Community Dashboards" }, "panel": { "header": "Panel", diff --git a/web/src/views/Dashboards/ImportDashboard.vue b/web/src/views/Dashboards/ImportDashboard.vue index 77a97ae601..9449b9904f 100644 --- a/web/src/views/Dashboards/ImportDashboard.vue +++ b/web/src/views/Dashboards/ImportDashboard.vue @@ -14,15 +14,15 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . --> + +