This is an automated email from the ASF dual-hosted git repository.

pingsutw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git


The following commit(s) were added to refs/heads/master by this push:
     new b61f176  SUBMARINE-649. Disable incomplete pages in 0.5.0
b61f176 is described below

commit b61f1764db67d22ddbce3fb149ccab579d420ff5
Author: Byron <[email protected]>
AuthorDate: Sun Oct 4 23:33:57 2020 +0800

    SUBMARINE-649. Disable incomplete pages in 0.5.0
    
    ### What is this PR for?
    
    1. Redirect root page to experiment/
    2. Disable route and button for data/, model/, workspace/, interpreter/
    
    ### What type of PR is it?
    
    [Hot Fix]
    
    ### Todos
    
    ### What is the Jira issue?
    https://issues.apache.org/jira/browse/SUBMARINE-649
    
    ### How should this be tested?
    https://travis-ci.org/github/ByronHsu/submarine/builds/731919190
    
    ### Screenshots (if appropriate)
    ![Screen Shot 2020-10-01 at 8 35 19 
PM](https://user-images.githubusercontent.com/24364830/94809834-c1673680-0425-11eb-9721-9335968bb676.png)
    
    ### Questions:
    * Does the licenses files need update? No
    * Is there breaking changes for older versions? No
    * Does this needs documentation? No
    
    Author: Byron <[email protected]>
    Author: ByronHsu <[email protected]>
    
    Closes #424 from ByronHsu/SUBMARINE-649 and squashes the following commits:
    
    0f5e20b [Byron] revert workbench ts
    449a389 [ByronHsu] Update 
submarine-workbench/workbench-web-ng/src/app/pages/workbench/workbench.component.html
    ae49a0f [Byron] rebase master and solve weird auto-merge
    b9e1176 [Byron] disable home page
    3c42864 [Byron] fix tslint errors
    32068cd [ByronHsu] Update 
submarine-workbench/workbench-web-ng/src/app/pages/workbench/workbench-routing.module.ts
    32f7b14 [Byron] Disable incomplete page in 0.5.0
---
 .../src/app/pages/workbench/workbench-routing.module.ts       | 11 +++++++++--
 .../src/app/pages/workbench/workbench.component.html          |  4 ++--
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git 
a/submarine-workbench/workbench-web-ng/src/app/pages/workbench/workbench-routing.module.ts
 
b/submarine-workbench/workbench-web-ng/src/app/pages/workbench/workbench-routing.module.ts
index c9fdded..af9b7e3 100644
--- 
a/submarine-workbench/workbench-web-ng/src/app/pages/workbench/workbench-routing.module.ts
+++ 
b/submarine-workbench/workbench-web-ng/src/app/pages/workbench/workbench-routing.module.ts
@@ -29,6 +29,13 @@ import { InterpreterComponent } from 
'./interpreter/interpreter.component';
 import { ModelComponent } from './model/model.component';
 import { WorkspaceComponent } from './workspace/workspace.component';
 
+function disablePage(allRoutes: Routes): Routes {
+  const disabledList: string[] = ['home', 'data', 'model', 'workspace', 
'interpreter'];
+  allRoutes[0].children[0].redirectTo = 'experiment'; // redirect root page to 
experiment
+  allRoutes[0].children = allRoutes[0].children.filter((item) => 
!disabledList.includes(item.path)); // filter pages which are incomplete
+  return allRoutes;
+}
+
 const routes: Routes = [
   {
     path: '',
@@ -86,6 +93,6 @@ const routes: Routes = [
 ];
 
 @NgModule({
-  imports: [RouterModule.forChild(routes)]
+  imports: [RouterModule.forChild(disablePage(routes))]
 })
-export class WorkbenchRoutingModule {}
+export class WorkbenchRoutingModule { }
diff --git 
a/submarine-workbench/workbench-web-ng/src/app/pages/workbench/workbench.component.html
 
b/submarine-workbench/workbench-web-ng/src/app/pages/workbench/workbench.component.html
index 164d743..f0db03b 100644
--- 
a/submarine-workbench/workbench-web-ng/src/app/pages/workbench/workbench.component.html
+++ 
b/submarine-workbench/workbench-web-ng/src/app/pages/workbench/workbench.component.html
@@ -47,8 +47,8 @@
         [nzDisabled]="menu.disabled"
         [nzTitle]="menu.title"
         nzPlacement="right"
-        [nzMatchRouter]="!menu.disabled"
-        [routerLink]="menu.disabled ? null : menu.routerLink"
+        nzMatchRouter
+        [routerLink]="menu.routerLink"
       >
         <i nz-icon [nzType]="menu.iconType"></i>
         <span>{{ menu.title }}</span>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to