@@ -10,6 +10,7 @@ import userguide from '@assets/images/developer_guide.svg';
1010import apilink from '@assets/images/api.svg' ;
1111import python from '@assets/images/python.svg' ;
1212import convert from '@assets/images/convert.svg' ;
13+ import dashboard from '@assets/images/dashboard.svg' ;
1314import forum from '@assets/images/forum.svg' ;
1415import cirriculum from '@assets/images/cirriculum.svg' ;
1516import changelog from '@assets/images/changelog.svg' ;
@@ -54,6 +55,7 @@ import UpdateDlg from './dialogs/updatedlg';
5455import React from 'react' ;
5556import { CreateEditorTab } from '@/utils/editorUtils' ;
5657import ChangeLogDlg from './dialogs/changelog' ;
58+ import { IJsonTabNode } from 'flexlayout-react' ;
5759
5860type NavBarProps = {
5961 // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -466,6 +468,21 @@ function NavBar({ layoutref }: NavBarProps) {
466468 AppMgr . getInstance ( ) . emit ( EventType . EVENT_FONTCHANGE , FontSize . DESCREASE ) ;
467469 }
468470
471+ /**
472+ * viewDashboard - view the dashboard
473+ */
474+ function viewDashboard ( ) {
475+ console . log ( i18n . t ( 'dashboard' ) ) ;
476+ const tabInfo : IJsonTabNode = {
477+ component : 'dashboard' ,
478+ name : 'Dashboard' ,
479+ id : 'DashboardId' ,
480+ helpText : 'Dashboard' ,
481+ } ;
482+ layoutref ! . current ?. addTabToTabSet ( Constants . EDITOR_TABSET_ID , tabInfo ) ;
483+ setActiveTab ( 'Dashboard' ) ;
484+ }
485+
469486 /**
470487 * onConnectionSelected - process seected connection
471488 * @param connType
@@ -638,6 +655,12 @@ function NavBar({ layoutref }: NavBarProps) {
638655 clicked : ConvertToPython ,
639656 isView : true ,
640657 } ,
658+ {
659+ label : i18n . t ( 'dashboard' ) ,
660+ iconImage : dashboard ,
661+ clicked : viewDashboard ,
662+ isView : true ,
663+ }
641664 ] ,
642665 childrenExt : [
643666 {
0 commit comments