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

kuanhsun 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 f29f676  SUBMARINE-1132. Upgrade model UI and complete fetching 
functionality
f29f676 is described below

commit f29f6768dddf66db3a43bb67bb1a977a6a6f8dd5
Author: andybi7676 <[email protected]>
AuthorDate: Tue Dec 21 15:45:58 2021 +0800

    SUBMARINE-1132. Upgrade model UI and complete fetching functionality
    
    ### What is this PR for?
    <!-- A few sentences describing the overall goals of the pull request's 
commits.
    First time? Check out the contributing guide - 
https://submarine.apache.org/contribution/contributions.html
    -->
    Upgrade model UI pages and complete routing & fetching functionality.
    
    ### What type of PR is it?
    Improvement | Feature
    
    ### Todos
    * [x] - Fetching functionality in model information page.
    * [x] - Enable routing by breadcrumbs.
    * [x] - Improve UI looking.
    * [x] - Loading icon in every page.
    * [x] - Reorganize / Rename some components.
    
    ### What is the Jira issue?
    <!-- * Open an issue on Jira 
https://issues.apache.org/jira/browse/SUBMARINE/
    * Put link here, and add [SUBMARINE-*Jira number*] in PR title, eg. 
`SUBMARINE-23. PR title`
    -->
    https://issues.apache.org/jira/browse/SUBMARINE-1132
    ### How should this be tested?
    <!--
    * First time? Setup Travis CI as described on 
https://submarine.apache.org/contribution/contributions.html#continuous-integration
    * Strongly recommended: add automated unit tests for any new or changed 
behavior
    * Outline any manual steps to test the PR here.
    -->
    See screenshots.
    ### Screenshots (if appropriate)
    
    
https://user-images.githubusercontent.com/59821107/146330254-e581903b-cb5a-483a-b246-807c6bd0a1b3.mp4
    
    ### Questions:
    * Do the license files need updating? No
    * Are there breaking changes for older versions? No
    * Does this need new documentation? No
    
    Author: andybi7676 <[email protected]>
    
    Signed-off-by: kuanhsun <[email protected]>
    
    Closes #832 from andybi7676/SUBMARINE-1132 and squashes the following 
commits:
    
    35cd64bb [andybi7676] SUBMARINE-1132. upgrade model page UI
    35a85af3 [andybi7676] SUBMARINE-1132. Upgrade model UI page and complete 
fetching functionality
---
 .../model/model-info/model-info.component.html     | 80 ++++++++++++++++++++++
 .../model/model-info/model-info.component.scss     | 18 +++++
 .../model/model-info/model-info.component.ts       | 72 +++++++++++++++++++
 .../pages/workbench/model/model-routing.module.ts  |  4 +-
 .../model-tag/model-tag.component.html             |  0
 .../model-tag/model-tag.component.scss             |  0
 .../model-tag/model-tag.component.ts               |  0
 .../model-version/model-version.component.html     | 62 ++++++++++++-----
 .../model/model-version/model-version.component.ts | 17 ++---
 .../app/pages/workbench/model/model.component.html |  7 +-
 .../app/pages/workbench/model/model.component.ts   |  5 +-
 .../src/app/pages/workbench/model/model.module.ts  |  6 +-
 .../registered-model.component.html                | 71 -------------------
 .../registered-model.component.scss                | 79 ---------------------
 .../registered-model/registered-model.component.ts | 37 ----------
 .../src/app/services/model-version.service.ts      | 35 +++++++---
 .../src/app/services/model.service.ts              |  2 +-
 17 files changed, 264 insertions(+), 231 deletions(-)

diff --git 
a/submarine-workbench/workbench-web/src/app/pages/workbench/model/model-info/model-info.component.html
 
b/submarine-workbench/workbench-web/src/app/pages/workbench/model/model-info/model-info.component.html
new file mode 100644
index 0000000..8ad2d4a
--- /dev/null
+++ 
b/submarine-workbench/workbench-web/src/app/pages/workbench/model/model-info/model-info.component.html
@@ -0,0 +1,80 @@
+<!--
+  ~ Licensed to tde Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See tde NOTICE file
+  ~ distributed witd tdis work for additional information
+  ~ regarding copyright ownership.  tde ASF licenses tdis file
+  ~ to you under tde Apache License, Version 2.0 (tde
+  ~ "License"); you may not use tdis file except in compliance
+  ~ witd tde License.  You may obtain a copy of tde License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under tde License is distributed on an
+  ~ "AS IS" BASIS, WItdOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, eitder express or implied.  See tde License for tde
+  ~ specific language governing permissions and limitations
+  ~ under tde License.
+  -->
+<div style="margin: 15px; padding: 15px; background-color: white">
+  <nz-spin [nzSpinning]="isModelInfoLoading">
+    <article nz-typography>
+      <h3 nz-typography>{{modelName}}</h3>
+      <p nz-typography>
+        <span><strong>Creation Time: </strong></span>
+        {{ isModelInfoLoading ? null : selectedModelInfo.creationTime }}
+      </p>
+      <p nz-typography>
+        <span><strong>Last Updated Time: </strong></span>
+        {{ isModelInfoLoading ? null : selectedModelInfo.lastUpdatedTime }}
+      </p>
+      <p nz-typography>
+        <span><strong>Tags: </strong></span>
+        <span *ngIf="!isModelInfoLoading">
+          <submarine-model-tag *ngFor="let tag of selectedModelInfo.tags" 
[tag]="tag" [cssType]="'default'"></submarine-model-tag>
+        </span>
+      </p>
+      <p nz-typography>
+        <span><strong>Description: </strong></span>
+        {{ isModelInfoLoading ? null : selectedModelInfo.description }}
+      </p>
+    </article>
+  </nz-spin>
+  <nz-divider [nzText]="text" nzOrientation="left">
+    <ng-template #text>
+      Model Versions
+      <i nz-icon nzType="form"></i>
+    </ng-template>
+  </nz-divider>
+  <nz-table
+    id="modelVersionsTable"
+    nzBordered
+    #basicTable
+    [nzData]="modelVersions"
+    [nzNoResult]="'No data'"
+    [nzLoading]="isModelVersionsLoading"
+  >
+    <thead>
+      <tr>
+        <th>Version</th>
+        <th>Stage</th>
+        <th>Created</th>
+        <th>Updated</th>
+        <th>Tags</th>
+        <th>Description</th>
+      </tr>
+    </thead>
+    <tbody>
+      <tr *ngFor="let data of basicTable.data; let i = index">
+        <td><a [routerLink]="data.version">{{ data.version }}</a></td>
+        <td>{{ data.currentStage }}</td>
+        <td>{{ data.creationTime | date: 'M/d/yyyy, h:mm a' }}</td>
+        <td>{{ data.lastUpdatedTime | date: 'M/d/yyyy, h:mm a' }}</td>
+        <td>
+          <submarine-model-tag *ngFor="let tag of data.tags" [tag]="tag" 
[cssType]="'default'"></submarine-model-tag>
+        </td>
+        <td>{{ data.description }}</td>
+      </tr>
+    </tbody>
+  </nz-table>
+</div>
\ No newline at end of file
diff --git 
a/submarine-workbench/workbench-web/src/app/pages/workbench/model/model-info/model-info.component.scss
 
b/submarine-workbench/workbench-web/src/app/pages/workbench/model/model-info/model-info.component.scss
new file mode 100644
index 0000000..9a1f91c
--- /dev/null
+++ 
b/submarine-workbench/workbench-web/src/app/pages/workbench/model/model-info/model-info.component.scss
@@ -0,0 +1,18 @@
+// /*!
+//  * Licensed to the Apache Software Foundation (ASF) under one
+//  * or more contributor license agreements.  See the NOTICE file
+//  * distributed with this work for additional information
+//  * regarding copyright ownership.  The ASF licenses this file
+//  * to you under the Apache License, Version 2.0 (the
+//  * "License"); you may not use this file except in compliance
+//  * with the License.  You may obtain a copy of the License at
+//  *
+//  *   http://www.apache.org/licenses/LICENSE-2.0
+//  *
+//  * Unless required by applicable law or agreed to in writing,
+//  * software distributed under the License is distributed on an
+//  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+//  * KIND, either express or implied.  See the License for the
+//  * specific language governing permissions and limitations
+//  * under the License.
+//  */
\ No newline at end of file
diff --git 
a/submarine-workbench/workbench-web/src/app/pages/workbench/model/model-info/model-info.component.ts
 
b/submarine-workbench/workbench-web/src/app/pages/workbench/model/model-info/model-info.component.ts
new file mode 100644
index 0000000..f4f884e
--- /dev/null
+++ 
b/submarine-workbench/workbench-web/src/app/pages/workbench/model/model-info/model-info.component.ts
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { Component, Input, OnInit } from '@angular/core';
+import { ActivatedRoute, Router } from '@angular/router';
+import { ModelVersionService } from 
'@submarine/services/model-version.service';
+import { ModelService } from '@submarine/services/model.service';
+import { ModelInfo } from '@submarine/interfaces/model-info';
+import { ModelVersionInfo } from '@submarine/interfaces/model-version-info';
+
+@Component({
+  selector: 'submarine-model-info',
+  templateUrl: './model-info.component.html',
+  styleUrls: ['./model-info.component.scss'],
+})
+export class ModelInfoComponent implements OnInit {
+  isModelInfoLoading: boolean = true;
+  isModelVersionsLoading: boolean = true;
+  modelName: string;
+  selectedModelInfo: ModelInfo; 
+  modelVersions: ModelVersionInfo[];
+
+  constructor(
+    private router: Router, 
+    private route: ActivatedRoute, 
+    private modelVersionService: ModelVersionService, 
+    private modelService: ModelService
+  ) {}
+
+  ngOnInit(): void {
+    this.modelName = this.route.snapshot.params.name;
+    this.modelService.emitInfo(this.modelName);
+    this.fetchSpecificRegisteredModel();
+    this.fetchModelAllVersions();
+  }
+
+  fetchSpecificRegisteredModel = () => {
+    this.modelService.querySpecificModel(this.modelName).subscribe(
+      (res) => {
+        this.selectedModelInfo = res;
+        console.log(this.selectedModelInfo);
+        this.isModelInfoLoading = false;
+      }
+    )
+  }
+
+  fetchModelAllVersions = () => {
+    this.modelVersionService.queryModelAllVersions(this.modelName).subscribe(
+      (res) => {
+        console.log(res);
+        this.modelVersions = res;
+        this.isModelVersionsLoading = false;
+      }
+    );
+  }
+}
diff --git 
a/submarine-workbench/workbench-web/src/app/pages/workbench/model/model-routing.module.ts
 
b/submarine-workbench/workbench-web/src/app/pages/workbench/model/model-routing.module.ts
index 419e16f..801209b 100644
--- 
a/submarine-workbench/workbench-web/src/app/pages/workbench/model/model-routing.module.ts
+++ 
b/submarine-workbench/workbench-web/src/app/pages/workbench/model/model-routing.module.ts
@@ -22,7 +22,7 @@ import { RouterModule, Routes } from '@angular/router';
 import { ModelComponent } from './model.component';
 import { ModelVersionComponent } from 
'./model-version/model-version.component';
 import { ModelHomeComponent } from './model-home/model-home.component';
-import { RegisteredModelComponent } from 
'./registered-model/registered-model.component';
+import { ModelInfoComponent } from './model-info/model-info.component';
 
 const routes: Routes = [
   {
@@ -36,7 +36,7 @@ const routes: Routes = [
       },
       {
         path: ':name',
-        component: RegisteredModelComponent,
+        component: ModelInfoComponent,
       },
       {
         path: ':name/:version',
diff --git 
a/submarine-workbench/workbench-web/src/app/pages/workbench/model/model-home/model-cards/model-card/model-tag/model-tag.component.html
 
b/submarine-workbench/workbench-web/src/app/pages/workbench/model/model-tag/model-tag.component.html
similarity index 100%
rename from 
submarine-workbench/workbench-web/src/app/pages/workbench/model/model-home/model-cards/model-card/model-tag/model-tag.component.html
rename to 
submarine-workbench/workbench-web/src/app/pages/workbench/model/model-tag/model-tag.component.html
diff --git 
a/submarine-workbench/workbench-web/src/app/pages/workbench/model/model-home/model-cards/model-card/model-tag/model-tag.component.scss
 
b/submarine-workbench/workbench-web/src/app/pages/workbench/model/model-tag/model-tag.component.scss
similarity index 100%
rename from 
submarine-workbench/workbench-web/src/app/pages/workbench/model/model-home/model-cards/model-card/model-tag/model-tag.component.scss
rename to 
submarine-workbench/workbench-web/src/app/pages/workbench/model/model-tag/model-tag.component.scss
diff --git 
a/submarine-workbench/workbench-web/src/app/pages/workbench/model/model-home/model-cards/model-card/model-tag/model-tag.component.ts
 
b/submarine-workbench/workbench-web/src/app/pages/workbench/model/model-tag/model-tag.component.ts
similarity index 100%
rename from 
submarine-workbench/workbench-web/src/app/pages/workbench/model/model-home/model-cards/model-card/model-tag/model-tag.component.ts
rename to 
submarine-workbench/workbench-web/src/app/pages/workbench/model/model-tag/model-tag.component.ts
diff --git 
a/submarine-workbench/workbench-web/src/app/pages/workbench/model/model-version/model-version.component.html
 
b/submarine-workbench/workbench-web/src/app/pages/workbench/model/model-version/model-version.component.html
index 548b164..fd3cd01 100644
--- 
a/submarine-workbench/workbench-web/src/app/pages/workbench/model/model-version/model-version.component.html
+++ 
b/submarine-workbench/workbench-web/src/app/pages/workbench/model/model-version/model-version.component.html
@@ -16,20 +16,50 @@
   ~ specific language governing permissions and limitations
   ~ under the License.
   -->
-
 <div style="margin: 15px; padding: 15px; background-color: white">
-  <p>Version: {{ modelVersion }}</p>
-  <p>Description: {{ modelVersionInfo.description }}</p>
-  <p>Tags: {{ modelVersionInfo.tags }}</p>
-  <p>Stage: {{ modelVersionInfo.currentStage }}</p>
-  <h3>Model version info</h3>
-  <p>User id: {{ modelVersionInfo.userId }}</p>
-  <p>
-    Experiment id:
-    <a href="/workbench/experiment/info/{{modelVersionInfo.experimentId}}">{{ 
modelVersionInfo.experimentId }}</a>
-  </p>
-  <p>Dataset: {{ modelVersionInfo.dataset }}</p>
-  <p>Created: {{ modelVersionInfo.creationTime }}</p>
-  <p>Updated: {{ modelVersionInfo.lastUpdatedTime }}</p>
-  <p>Source: {{ modelVersionInfo.source }}</p>
-</div>
+  <nz-spin [nzSpinning]="isLoading">
+    <article nz-typography>
+      <h3 nz-typography>Version {{ modelVersion }}</h3>
+      <p nz-typography>
+        <span><strong>Stage: </strong></span>
+        {{ isLoading ? null : modelVersionInfo.currentStage }}
+      </p>
+      <p nz-typography>
+        <span><strong>User id: </strong></span>
+        {{ isLoading ? null : modelVersionInfo.userId }}
+      </p>
+      <p nz-typography>
+        <span><strong>Experiment id: </strong></span>
+        <span *ngIf="!isLoading">
+          <a 
href="/workbench/experiment/info/{{modelVersionInfo.experimentId}}">{{ 
modelVersionInfo.experimentId }}</a>
+        </span>
+      </p>
+      <p nz-typography>
+        <span><strong>Dataset: </strong></span>
+        {{ isLoading ? null : modelVersionInfo.dataset }}
+      </p>
+      <p nz-typography>
+        <span><strong>Created: </strong></span>
+        {{ isLoading ? null : modelVersionInfo.creationTime }}
+      </p>
+      <p nz-typography>
+        <span><strong>Updated: </strong></span>
+        {{ isLoading ? null : modelVersionInfo.lastUpdatedTime }}
+      </p>
+      <p nz-typography>
+        <span><strong>Source: </strong></span>
+        {{ isLoading ? null : modelVersionInfo.source }}
+      </p>
+      <p nz-typography>
+        <span><strong>Tags: </strong></span>
+        <span  *ngIf="!isLoading">
+          <submarine-model-tag *ngFor="let tag of modelVersionInfo.tags" 
[tag]="tag" [cssType]="'default'"></submarine-model-tag>
+        </span>
+      </p>
+      <p nz-typography>
+        <span><strong>Description: </strong></span>
+        {{ isLoading ? null : modelVersionInfo.description }}
+      </p>
+    </article>
+  </nz-spin>
+</div>
\ No newline at end of file
diff --git 
a/submarine-workbench/workbench-web/src/app/pages/workbench/model/model-version/model-version.component.ts
 
b/submarine-workbench/workbench-web/src/app/pages/workbench/model/model-version/model-version.component.ts
index df1b0dd..53674fa 100644
--- 
a/submarine-workbench/workbench-web/src/app/pages/workbench/model/model-version/model-version.component.ts
+++ 
b/submarine-workbench/workbench-web/src/app/pages/workbench/model/model-version/model-version.component.ts
@@ -19,10 +19,9 @@
 
 import { Component, OnInit, ViewChild } from '@angular/core';
 import { ActivatedRoute, Router } from '@angular/router';
-import { ExperimentService } from '@submarine/services/experiment.service';
 import { ModelVersionInfo } from '@submarine/interfaces/model-version-info';
+import { ModelService } from '@submarine/services/model.service';
 import { ModelVersionService } from 
'@submarine/services/model-version.service';
-import { isThisSecond } from 'date-fns';
 
 @Component({
   selector: 'submarine-model-version',
@@ -30,25 +29,27 @@ import { isThisSecond } from 'date-fns';
   styleUrls: ['./model-version.component.scss'],
 })
 export class ModelVersionComponent implements OnInit {
-  isLoading = true;
-  modelName;
-  modelVersion;
+  isLoading: boolean = true;
+  modelName: string = null;
+  modelVersion: string = null;
   modelVersionInfo: ModelVersionInfo;
 
   constructor(
     private router: Router, 
     private route: ActivatedRoute, 
-    private experimentService: ExperimentService,
-    private modelVersionService: ModelVersionService
+    private modelVersionService: ModelVersionService,
+    private modelService: ModelService,
   ) {}
 
   ngOnInit() {
     this.modelName = this.route.snapshot.params.name;
     this.modelVersion = this.route.snapshot.params.version;
-    this.experimentService.emitInfo(this.modelName);
+    this.modelService.emitInfo(this.modelName);
+    this.modelVersionService.emitInfo(this.modelVersion);
     this.modelVersionService.querySpecificModel(this.modelName, 
this.modelVersion).subscribe(
       (item) => {
         this.modelVersionInfo = item;
+        this.isLoading = false;
       }
     );
   }
diff --git 
a/submarine-workbench/workbench-web/src/app/pages/workbench/model/model.component.html
 
b/submarine-workbench/workbench-web/src/app/pages/workbench/model/model.component.html
index 98c447a..6624825 100644
--- 
a/submarine-workbench/workbench-web/src/app/pages/workbench/model/model.component.html
+++ 
b/submarine-workbench/workbench-web/src/app/pages/workbench/model/model.component.html
@@ -24,10 +24,13 @@
         <a>Home</a>
       </nz-breadcrumb-item>
       <nz-breadcrumb-item>
-        <a [routerLink]="['/', 'workbench', 'model']" (click)="modelName = 
null">model</a>
+        <a [routerLink]="['/', 'workbench', 'model']" (click)="modelName = 
null; modelVersion=null;">model</a>
       </nz-breadcrumb-item>
       <nz-breadcrumb-item *ngIf="modelName != null">
-        {{ modelName }}
+        <a [routerLink]="['/', 'workbench', 'model', modelName]" 
(click)="modelVersion = null;">{{ modelName }}</a>
+      </nz-breadcrumb-item>
+      <nz-breadcrumb-item *ngIf="modelVersion != null">
+        {{ modelVersion }}
       </nz-breadcrumb-item>
     </nz-breadcrumb>
     <div *ngIf="modelName == null">
diff --git 
a/submarine-workbench/workbench-web/src/app/pages/workbench/model/model.component.ts
 
b/submarine-workbench/workbench-web/src/app/pages/workbench/model/model.component.ts
index 78d15cb..363d3ca 100644
--- 
a/submarine-workbench/workbench-web/src/app/pages/workbench/model/model.component.ts
+++ 
b/submarine-workbench/workbench-web/src/app/pages/workbench/model/model.component.ts
@@ -19,6 +19,7 @@
 
 import { Component, OnInit } from '@angular/core';
 import { ModelService } from '@submarine/services/model.service';
+import { ModelVersionService } from 
'@submarine/services/model-version.service';
 import { delay } from 'rxjs/operators';
 
 @Component({
@@ -28,10 +29,12 @@ import { delay } from 'rxjs/operators';
 })
 export class ModelComponent implements OnInit {
   modelName: string = null;
+  modelVersion: string = null;
 
-  constructor(private modelService: ModelService) {}
+  constructor(private modelService: ModelService, private modelVersionService: 
ModelVersionService) {}
 
   ngOnInit() {
     this.modelService.infoEmitted$.pipe(delay(0)).subscribe((name) => 
(this.modelName = name));
+    this.modelVersionService.infoEmitted$.pipe(delay(0)).subscribe((version) 
=> this.modelVersion = version);
   }
 }
diff --git 
a/submarine-workbench/workbench-web/src/app/pages/workbench/model/model.module.ts
 
b/submarine-workbench/workbench-web/src/app/pages/workbench/model/model.module.ts
index 9a8f5d2..736482e 100644
--- 
a/submarine-workbench/workbench-web/src/app/pages/workbench/model/model.module.ts
+++ 
b/submarine-workbench/workbench-web/src/app/pages/workbench/model/model.module.ts
@@ -29,8 +29,8 @@ import { PipeSharedModule } from 
'@submarine/pipe/pipe-shared.module';
 import { ModelHomeComponent } from './model-home/model-home.component';
 import { ModelCardsComponent } from 
'./model-home/model-cards/model-cards.component';
 import { ModelCardComponent } from 
'./model-home/model-cards/model-card/model-card.component';
-import { ModelTagComponent } from 
'./model-home/model-cards/model-card/model-tag/model-tag.component';
-import { RegisteredModelComponent } from 
'./registered-model/registered-model.component';
+import { ModelTagComponent } from './model-tag/model-tag.component';
+import { ModelInfoComponent } from './model-info/model-info.component';
 
 @NgModule({
   declarations: [
@@ -40,7 +40,7 @@ import { RegisteredModelComponent } from 
'./registered-model/registered-model.co
     ModelCardsComponent,
     ModelCardComponent,
     ModelTagComponent,
-    RegisteredModelComponent,
+    ModelInfoComponent,
   ],
   imports: [
     CommonModule,
diff --git 
a/submarine-workbench/workbench-web/src/app/pages/workbench/model/registered-model/registered-model.component.html
 
b/submarine-workbench/workbench-web/src/app/pages/workbench/model/registered-model/registered-model.component.html
deleted file mode 100644
index f342450..0000000
--- 
a/submarine-workbench/workbench-web/src/app/pages/workbench/model/registered-model/registered-model.component.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<!--
-  ~ Licensed to tde Apache Software Foundation (ASF) under one
-  ~ or more contributor license agreements.  See tde NOTICE file
-  ~ distributed witd tdis work for additional information
-  ~ regarding copyright ownership.  tde ASF licenses tdis file
-  ~ to you under tde Apache License, Version 2.0 (tde
-  ~ "License"); you may not use tdis file except in compliance
-  ~ witd tde License.  You may obtain a copy of tde License at
-  ~
-  ~   http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing,
-  ~ software distributed under tde License is distributed on an
-  ~ "AS IS" BASIS, WItdOUT WARRANTIES OR CONDITIONS OF ANY
-  ~ KIND, eitder express or implied.  See tde License for tde
-  ~ specific language governing permissions and limitations
-  ~ under tde License.
-  -->
-<div class="container">
-  <div>
-    <h1>{{ modelName }}</h1>
-  </div>
-  <div>
-    <div class="discription">Description: This is a description.</div>
-    <div class="basic-box">
-      <div class="tags-basic">Tags:</div>
-      <div class="tags-basic tags">image</div>
-    </div>
-    <div class="basic-box">Created: 2021-09-01 07:57</div>
-    <div class="basic-box">Updated: 2021-09-21 03:00</div>
-  </div>
-  <div class="info-container">
-    <div class="info">Model versions info</div>
-    <div class="info-tag">
-      <div class="info-box">Tags:</div>
-      <div class="info-box">
-        <textarea type="text" class="info-text" placeholder="Model Version 
tags..."></textarea>
-      </div>
-    </div>
-  </div>
-  <table>
-    <thead>
-      <tr>
-        <td>Version</td>
-        <td>Stage</td>
-        <td>Tags</td>
-        <td>Description</td>
-        <td>Created</td>
-        <td>Updated</td>
-      </tr>
-    </thead>
-    <tbody>
-      <tr>
-        <td><a [routerLink]="1">1</a></td>
-        <td></td>
-        <td></td>
-        <td>...</td>
-        <td>2021-09-01 07:57</td>
-        <td>2021-09-01 07:57</td>
-      </tr>
-      <tr>
-        <td><a [routerLink]="2">2</a></td>
-        <td></td>
-        <td></td>
-        <td>...</td>
-        <td>2021-09-30 07:09</td>
-        <td>2021-09-30 09:57</td>
-      </tr>
-    </tbody>
-  </table>
-</div>
diff --git 
a/submarine-workbench/workbench-web/src/app/pages/workbench/model/registered-model/registered-model.component.scss
 
b/submarine-workbench/workbench-web/src/app/pages/workbench/model/registered-model/registered-model.component.scss
deleted file mode 100644
index 4bc5b74..0000000
--- 
a/submarine-workbench/workbench-web/src/app/pages/workbench/model/registered-model/registered-model.component.scss
+++ /dev/null
@@ -1,79 +0,0 @@
-/*!
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-.basic-box {
-  margin-bottom: 5px;
-  font-size: 17px;
-  font-family: Arial;
-}
-td {
-  border: 1px solid black;
-  width: 200px;
-  height: 35px;
-  padding-left: 5px;
-}
-::placeholder {
-  font-size: 17px;
-}
-.info-box {
-  margin-bottom: 5px;
-  font-size: 17px;
-  font-family: Arial;
-  display: inline-block;
-}
-.container {
-  margin: 15px;
-  padding: 15px;
-  background-color: white;
-}
-.discription {
-  margin: 5px 0px 5px 0px;
-  font-size: 17px;
-  font-family: Arial, Helvetica, sans-serif;
-}
-.tags-basic {
-  display: inline-block;
-}
-.tags {
-  background-color: #53c653;
-  margin: 3px;
-  padding: 3px;
-}
-.info-container {
-  margin-top: 20px;
-  display: flex;
-  align-items: center;
-}
-.info {
-  margin-bottom: 5px;
-  font-size: 17px;
-  font-family: Arial, Helvetica, sans-serif;
-  font-weight: bold;
-  display: inline-block;
-}
-.info-tag {
-  margin-left: 30px;
-  display: flex;
-  align-items: center;
-}
-.info-text {
-  height: 35px;
-  width: 250px;
-  border: 1px solid black;
-  font-size: 17px;
-}
diff --git 
a/submarine-workbench/workbench-web/src/app/pages/workbench/model/registered-model/registered-model.component.ts
 
b/submarine-workbench/workbench-web/src/app/pages/workbench/model/registered-model/registered-model.component.ts
deleted file mode 100644
index a405b4d..0000000
--- 
a/submarine-workbench/workbench-web/src/app/pages/workbench/model/registered-model/registered-model.component.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import { Component, Input, OnInit } from '@angular/core';
-import { ActivatedRoute, Router } from '@angular/router';
-import { ModelInfo } from '@submarine/interfaces/model-info';
-
-@Component({
-  selector: 'app-registered-model',
-  templateUrl: './registered-model.component.html',
-  styleUrls: ['./registered-model.component.scss'],
-})
-export class RegisteredModelComponent implements OnInit {
-  modelName;
-
-  constructor(private router: Router, private route: ActivatedRoute) {}
-
-  ngOnInit(): void {
-    this.modelName = this.route.snapshot.params.name;
-  }
-}
diff --git 
a/submarine-workbench/workbench-web/src/app/services/model-version.service.ts 
b/submarine-workbench/workbench-web/src/app/services/model-version.service.ts
index d4ae587..9c1dbc5 100644
--- 
a/submarine-workbench/workbench-web/src/app/services/model-version.service.ts
+++ 
b/submarine-workbench/workbench-web/src/app/services/model-version.service.ts
@@ -37,19 +37,32 @@ export class ModelVersionService {
   constructor(private baseApi: BaseApiService, private httpClient: HttpClient) 
{}
 
   emitInfo(id: string) {
-      this.emitInfoSource.next(id);
+    this.emitInfoSource.next(id);
   }
 
   querySpecificModel(name: string, version: string) : 
Observable<ModelVersionInfo> {
-      const apiUrl = this.baseApi.getRestApi('/v1/model-version/' + name + '/' 
+ version + '/');
-      return this.httpClient.get<Rest<ModelVersionInfo>>(apiUrl).pipe(
-          switchMap((res) => {
-              if (res.success) {
-                  return of(res.result);
-              } else {
-                  throw this.baseApi.createRequestError(res.message, res.code, 
apiUrl, 'get');
-              }
-          })
-      );
+    const apiUrl = this.baseApi.getRestApi('/v1/model-version/' + name + '/' + 
version + '/');
+    return this.httpClient.get<Rest<ModelVersionInfo>>(apiUrl).pipe(
+      switchMap((res) => {
+        if (res.success) {
+          return of(res.result);
+        } else {
+          throw this.baseApi.createRequestError(res.message, res.code, apiUrl, 
'get');
+        }
+      })
+    );
+  }
+
+  queryModelAllVersions(name: string) : Observable<ModelVersionInfo[]> {
+    const apiUrl = this.baseApi.getRestApi('/v1/model-version/' + name);
+    return this.httpClient.get<Rest<ModelVersionInfo[]>>(apiUrl).pipe(
+      switchMap((res) => {
+        if (res.success) {
+          return of(res.result);
+        } else {
+          throw this.baseApi.createRequestError(res.message, res.code, apiUrl, 
'get');
+        }
+      })
+    );
   }
 }
\ No newline at end of file
diff --git 
a/submarine-workbench/workbench-web/src/app/services/model.service.ts 
b/submarine-workbench/workbench-web/src/app/services/model.service.ts
index 58ab99c..cd1e9a5 100644
--- a/submarine-workbench/workbench-web/src/app/services/model.service.ts
+++ b/submarine-workbench/workbench-web/src/app/services/model.service.ts
@@ -56,7 +56,7 @@ export class ModelService {
   }
 
   querySpecificModel(name: string): Observable<ModelInfo> {
-    const apiUrl = this.baseApi.getRestApi(`/v1/regitstered-model/${name}`);
+    const apiUrl = this.baseApi.getRestApi(`/v1/registered-model/${name}`);
     return this.httpClient.get<Rest<ModelInfo>>(apiUrl).pipe(
       switchMap((res) => {
         if (res.success) {

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

Reply via email to