1717 * under the License.
1818 */
1919
20- import { inject , NgModule } from "@angular/core" ;
21- import { CanActivateFn , Router , RouterModule , Routes } from "@angular/router" ;
20+ import { NgModule } from "@angular/core" ;
21+ import { RouterModule , Routes } from "@angular/router" ;
2222import { DashboardComponent } from "./dashboard/component/dashboard.component" ;
2323import { UserWorkflowComponent } from "./dashboard/component/user/user-workflow/user-workflow.component" ;
2424import { UserQuotaComponent } from "./dashboard/component/user/user-quota/user-quota.component" ;
@@ -38,28 +38,21 @@ import { DatasetDetailComponent } from "./dashboard/component/user/user-dataset/
3838import { UserDatasetComponent } from "./dashboard/component/user/user-dataset/user-dataset.component" ;
3939import { HubWorkflowDetailComponent } from "./hub/component/workflow/detail/hub-workflow-detail.component" ;
4040import { LandingPageComponent } from "./hub/component/landing-page/landing-page.component" ;
41- import { DASHBOARD_ABOUT , DASHBOARD_USER_WORKFLOW } from "./app-routing.constant" ;
41+ import { DASHBOARD_USER_WORKFLOW } from "./app-routing.constant" ;
4242import { HubSearchResultComponent } from "./hub/component/hub-search-result/hub-search-result.component" ;
4343import { AdminSettingsComponent } from "./dashboard/component/admin/settings/admin-settings.component" ;
44- import { GuiConfigService } from "./common/service/gui-config.service" ;
45-
46- const rootRedirectGuard : CanActivateFn = ( ) => {
47- const config = inject ( GuiConfigService ) ;
48- const router = inject ( Router ) ;
49- try {
50- return router . parseUrl ( DASHBOARD_ABOUT ) ;
51- } catch {
52- // config not loaded yet, swallow the error and let the app handle it
53- }
54- return true ;
55- } ;
5644
5745const routes : Routes = [ ] ;
5846
5947routes . push ( {
60- path : "dashboard " ,
48+ path : "" ,
6149 component : DashboardComponent ,
6250 children : [
51+ {
52+ path : "" ,
53+ redirectTo : "about" ,
54+ pathMatch : "full" ,
55+ } ,
6356 {
6457 path : "home" ,
6558 component : LandingPageComponent ,
@@ -174,14 +167,6 @@ routes.push({
174167 ] ,
175168} ) ;
176169
177- // default route renders the workspace editor directly; if userSystem is enabled at runtime,
178- // AppComponent will navigate to DASHBOARD_ABOUT instead.
179- routes . push ( {
180- path : "" ,
181- component : WorkspaceComponent ,
182- canActivate : [ rootRedirectGuard ] ,
183- } ) ;
184-
185170// redirect all other paths to index.
186171routes . push ( {
187172 path : "**" ,
0 commit comments