@@ -26,6 +26,7 @@ import {
2626 NavTabList ,
2727 type NavTabItem ,
2828 SlideTransition ,
29+ LoadingOverlay ,
2930} from '@deephaven/components' ;
3031import { SHORTCUTS as IRIS_GRID_SHORTCUTS } from '@deephaven/iris-grid' ;
3132import {
@@ -88,13 +89,8 @@ import {
8889} from '@deephaven/utils' ;
8990import GoldenLayout from '@deephaven/golden-layout' ;
9091import type { ItemConfigType } from '@deephaven/golden-layout' ;
91- import {
92- type DashboardPlugin ,
93- isDashboardPlugin ,
94- type LegacyDashboardPlugin ,
95- isLegacyDashboardPlugin ,
96- type PluginModuleMap ,
97- } from '@deephaven/plugin' ;
92+ import { type PluginModuleMap , getDashboardPlugins } from '@deephaven/plugin' ;
93+ import { AppDashboards } from '@deephaven/app-utils' ;
9894import JSZip from 'jszip' ;
9995import SettingsMenu from '../settings/SettingsMenu' ;
10096import AppControlsMenu from './AppControlsMenu' ;
@@ -103,8 +99,8 @@ import './AppMainContainer.scss';
10399import WidgetList , { WindowMouseEvent } from './WidgetList' ;
104100import UserLayoutUtils from './UserLayoutUtils' ;
105101import LayoutStorage from '../storage/LayoutStorage' ;
106- import AppDashboards from './AppDashboards' ;
107102import { getFormattedVersionInfo } from '../settings/SettingsUtils' ;
103+ import EmptyDashboard from './EmptyDashboard' ;
108104
109105const log = Log . module ( 'AppMainContainer' ) ;
110106
@@ -783,22 +779,9 @@ export class AppMainContainer extends Component<
783779 } ) ;
784780 }
785781
786- getDashboardPlugins = memoize ( ( plugins : PluginModuleMap ) => {
787- const dashboardPlugins = [ ...plugins . entries ( ) ] . filter (
788- ( [ , plugin ] ) =>
789- isDashboardPlugin ( plugin ) || isLegacyDashboardPlugin ( plugin )
790- ) as [ string , DashboardPlugin | LegacyDashboardPlugin ] [ ] ;
791-
792- return dashboardPlugins . map ( ( [ name , plugin ] ) => {
793- if ( isLegacyDashboardPlugin ( plugin ) ) {
794- const { DashboardPlugin : DPlugin } = plugin ;
795- return < DPlugin key = { name } /> ;
796- }
797-
798- const { component : DPlugin } = plugin ;
799- return < DPlugin key = { name } /> ;
800- } ) ;
801- } ) ;
782+ getDashboardPlugins = memoize ( ( plugins : PluginModuleMap ) =>
783+ getDashboardPlugins ( plugins )
784+ ) ;
802785
803786 handleHomeClick ( ) : void {
804787 this . handleTabSelect ( DEFAULT_DASHBOARD_ID ) ;
@@ -995,7 +978,13 @@ export class AppMainContainer extends Component<
995978 dashboards = { this . getDashboards ( ) }
996979 activeDashboard = { activeTabKey }
997980 onGoldenLayoutChange = { this . handleGoldenLayoutChange }
998- onAutoFillClick = { this . handleAutoFillClick }
981+ emptyDashboard = {
982+ activeTabKey === DEFAULT_DASHBOARD_ID ? (
983+ < EmptyDashboard onAutoFillClick = { this . handleAutoFillClick } />
984+ ) : (
985+ < LoadingOverlay />
986+ )
987+ }
999988 plugins = { [
1000989 < ConsolePlugin
1001990 key = "ConsolePlugin"
0 commit comments