You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@submarine.apache.org by pi...@apache.org on 2021/08/31 03:09:40 UTC

[submarine] branch master updated: SUBMARINE-987. Tags display in experiment list

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 160e1e4  SUBMARINE-987. Tags display in experiment list
160e1e4 is described below

commit 160e1e44e2450fd39ac28b1b3b9bbff31dc82b91
Author: noidname01 <ti...@gmail.com>
AuthorDate: Sat Aug 28 21:26:52 2021 +0800

    SUBMARINE-987. Tags display in experiment list
    
    ### What is this PR for?
    
    Tag created when creating an experiment should also display in the list of experiment .
    
    ### What type of PR is it?
    [Feature]
    
    ### Todos
    
    None
    
    ### 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`
    -->
    ### How should this be tested?
    
    https://issues.apache.org/jira/projects/SUBMARINE/issues/SUBMARINE-987
    
    ### Screenshots (if appropriate)
    
    ![2021-08-28 21-31-07 的螢幕擷圖](https://user-images.githubusercontent.com/55401762/131219627-543ea033-b1a1-4e4f-b77b-c6d59dde0088.png)
    
    ### Questions:
    * Do the license files need updating? No
    * Are there breaking changes for older versions? No
    * Does this need new documentation? No
    
    Author: noidname01 <ti...@gmail.com>
    
    Signed-off-by: Kevin <pi...@apache.org>
    
    Closes #729 from noidname01/SUBMARINE-987 and squashes the following commits:
    
    9936797c [noidname01] fix redundant
    4a446c86 [noidname01] fix patch problem in other branch
    1191e784 [noidname01] test patch
    579bf2a8 [noidname01] tags appearance
---
 .../java/org/apache/submarine/server/rest/ExperimentRestApi.java  | 2 +-
 .../org/apache/submarine/server/submitter/k8s/K8sSubmitter.java   | 8 ++++----
 .../experiment-list/experiment-list.component.html                | 4 ++++
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/ExperimentRestApi.java b/submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/ExperimentRestApi.java
index a803de9..4a1efa7 100644
--- a/submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/ExperimentRestApi.java
+++ b/submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/ExperimentRestApi.java
@@ -339,7 +339,7 @@ public class ExperimentRestApi {
       responses = {
           @ApiResponse(description = "successful operation", content = @Content(
               schema = @Schema(implementation = JsonResponse.class)))})
-  public Response deleteServe(@QueryParam("modelName") String modelName, 
+  public Response deleteServe(@QueryParam("modelName") String modelName,
       @QueryParam("modelVersion") String modelVersion, @QueryParam("namespace") String namespace) {
     try {
       ServeRequest spec = new ServeRequest()
diff --git a/submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/K8sSubmitter.java b/submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/K8sSubmitter.java
index bf1d645..ddc76af 100644
--- a/submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/K8sSubmitter.java
+++ b/submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/K8sSubmitter.java
@@ -162,7 +162,7 @@ public class K8sSubmitter implements Submitter {
     try {
       MLJob mlJob = ExperimentSpecParser.parseJob(spec);
       mlJob.getMetadata().setNamespace(getServerNamespace());
-
+      
       Object object = api.getNamespacedCustomObject(mlJob.getGroup(), mlJob.getVersion(),
           mlJob.getMetadata().getNamespace(), mlJob.getPlural(), mlJob.getMetadata().getName());
       experiment = parseExperimentResponseObject(object, ParseOp.PARSE_OP_RESULT);
@@ -366,7 +366,7 @@ public class K8sSubmitter implements Submitter {
     final String storage = NotebookUtils.STORAGE;
     final String pvcName = NotebookUtils.PVC_PREFIX + name;
     String namespace = getServerNamespace();
-    
+
     // parse notebook custom resource
     NotebookCR notebookCR;
     try {
@@ -466,7 +466,7 @@ public class K8sSubmitter implements Submitter {
   public List<Notebook> listNotebook(String id) throws SubmarineRuntimeException {
     List<Notebook> notebookList;
     String namespace = getServerNamespace();
-    
+
     try {
       Object object = api.listNamespacedCustomObject(NotebookCR.CRD_NOTEBOOK_GROUP_V1,
           NotebookCR.CRD_NOTEBOOK_VERSION_V1, namespace, NotebookCR.CRD_NOTEBOOK_PLURAL_V1,
@@ -684,7 +684,7 @@ public class K8sSubmitter implements Submitter {
     }
     return namespace;
   }
-  
+
   private enum ParseOp {
     PARSE_OP_RESULT,
     PARSE_OP_DELETE
diff --git a/submarine-workbench/workbench-web/src/app/pages/workbench/experiment/experiment-home/experiment-list/experiment-list.component.html b/submarine-workbench/workbench-web/src/app/pages/workbench/experiment/experiment-home/experiment-list/experiment-list.component.html
index 4741281..36c8816 100644
--- a/submarine-workbench/workbench-web/src/app/pages/workbench/experiment/experiment-home/experiment-list/experiment-list.component.html
+++ b/submarine-workbench/workbench-web/src/app/pages/workbench/experiment/experiment-home/experiment-list/experiment-list.component.html
@@ -32,6 +32,7 @@
       </th>
       <th>Experiment Name</th>
       <th>Experiment ID</th>
+      <th>Tags</th>
       <th>Status</th>
       <th>Finished Time</th>
       <th>Created Time</th>
@@ -52,6 +53,9 @@
         </a>
       </td>
       <td>
+        <nz-tag *ngFor="let tag of data.spec.meta.tags">{{tag}}</nz-tag>
+      </td>
+      <td>
         <nz-tag [nzColor]="statusColor[data.status]">{{ data.status }}</nz-tag>
       </td>
       <td>{{ data.finishedTime | date: 'M/d/yyyy, h:mm a' }}</td>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org