You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by dg...@apache.org on 2020/12/03 13:57:32 UTC

[incubator-datalab] 05/05: [DATALAB-2163]: Merge odahu (UI part) to develop

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

dgnatyshyn pushed a commit to branch develop_odahu_UI
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git

commit d06929900f7b53deb9e991d9ed9670bf0b2b046b
Author: Dmytro_Gnatyshyn <di...@ukr.net>
AuthorDate: Thu Dec 3 15:55:50 2020 +0200

    [DATALAB-2163]: Merge odahu (UI part) to develop
---
 .../app/administration/administration.module.ts    |  5 ++--
 .../legion-deployment-data.service.ts              | 27 -----------------
 .../create-odahu-cluster.component.html}           | 12 ++++----
 .../create-odahu-cluster.component.scss}           |  2 +-
 .../create-odahu-cluster.component.ts}             | 20 ++++++-------
 .../create-odahu-claster}/index.ts                 | 12 ++++----
 .../{legion-deployment => odahu}/index.ts          | 20 ++++++-------
 .../app/administration/odahu/odahu-data.service.ts | 27 +++++++++++++++++
 .../odahu-grid/odahu-grid.component.html}          | 18 +++++------
 .../odahu-grid/odahu-grid.component.scss}          |  4 +--
 .../odahu-grid/odahu-grid.component.ts}            | 28 ++++++++---------
 .../odahu.component.html}                          |  6 ++--
 .../odahu.component.scss}                          |  0
 .../odahu.component.ts}                            | 30 +++++++++----------
 .../resources/webapp/src/app/app.routing.module.ts | 10 +++----
 .../resources/webapp/src/app/core/core.module.ts   |  4 +--
 .../webapp/src/app/core/services/index.ts          |  2 +-
 ...ment.service.ts => odahu-deployment.service.ts} |  2 +-
 .../webapp/src/app/core/util/errorUtils.ts         |  2 +-
 .../detail-dialog/detail-dialog.component.html     | 35 +++++++++++++++++++++-
 .../detail-dialog/detail-dialog.component.scss     | 27 +++++++++++++++--
 .../detail-dialog/detail-dialog.component.ts       | 10 ++++++-
 .../resources-grid/resources-grid.component.html   |  2 +-
 .../resources-grid/resources-grid.component.scss   |  2 +-
 .../resources-grid/resources-grid.component.ts     | 13 ++++----
 .../src/app/shared/navbar/navbar.component.html    | 10 +++----
 26 files changed, 198 insertions(+), 132 deletions(-)

diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/administration.module.ts b/services/self-service/src/main/resources/webapp/src/app/administration/administration.module.ts
index e535bda..6d5b6d0 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/administration.module.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/administration.module.ts
@@ -23,10 +23,11 @@ import { CommonModule } from '@angular/common';
 import { ManagenementModule } from './management';
 import { ProjectModule } from './project';
 import { RolesModule } from './roles';
+import {OdahuModule} from './odahu';
 
 @NgModule({
-  imports: [CommonModule, ManagenementModule, ProjectModule, RolesModule],
+  imports: [CommonModule, ManagenementModule, ProjectModule, RolesModule, OdahuModule],
   declarations: [],
-  exports: [ManagenementModule, ProjectModule, RolesModule]
+  exports: [ManagenementModule, ProjectModule, RolesModule, OdahuModule]
 })
 export class AdministrationModule { }
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-deployment-data.service.ts b/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-deployment-data.service.ts
deleted file mode 100644
index 83dfeaf..0000000
--- a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-deployment-data.service.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import { Injectable } from '@angular/core';
-import {BehaviorSubject, Observable} from 'rxjs';
-import {LegionDeploymentService} from '../../core/services';
-
-
-@Injectable({
-  providedIn: 'root'
-})
-
-export class LegionDeploymentDataService {
-  _legionClasters = new BehaviorSubject<any>(null);
-
-  constructor(private legionDeploymentService: LegionDeploymentService) {
-    this.getClastersList();
-  }
-
-  public updateClasters(): void {
-    this.getClastersList();
-  }
-
-  private getClastersList(): void {
-   this.legionDeploymentService.getOduhuClustersList().subscribe(
-      (response: any ) => {
-        return this._legionClasters.next(response);
-      });
-  }
-}
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/create-legion-claster/create-legion-cluster.component.html b/services/self-service/src/main/resources/webapp/src/app/administration/odahu/create-odahu-claster/create-odahu-cluster.component.html
similarity index 84%
rename from services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/create-legion-claster/create-legion-cluster.component.html
rename to services/self-service/src/main/resources/webapp/src/app/administration/odahu/create-odahu-claster/create-odahu-cluster.component.html
index ff04e55..836e630 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/create-legion-claster/create-legion-cluster.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/odahu/create-odahu-claster/create-odahu-cluster.component.html
@@ -1,11 +1,11 @@
-<div class="create-legion-cluster" id="dialog-box">
+<div class="create-odahu-cluster" id="dialog-box">
   <header class="dialog-header">
     <h4 class="modal-title">Create Odahu cluster</h4>
     <button type="button" class="close" (click)="dialogRef.close()">&times;</button>
   </header>
   <div class="dialog-content selection">
     <div id="scrolling" class="content-box mat-reset scrolling-content">
-      <form [formGroup]="createLegionClusterForm" *ngIf="createLegionClusterForm" novalidate>
+      <form [formGroup]="createOdahuForm" *ngIf="createOdahuForm" novalidate>
         <div class="control-group">
           <label class="label">Select project</label>
           <div class="control selector-wrapper">
@@ -48,10 +48,10 @@
           <label class="label">Name</label>
           <div class="control">
             <input type="text" class="form-control" placeholder="Enter Name" formControlName="name">
-            <span class="error" *ngIf="!createLegionClusterForm.controls.name.valid && createLegionClusterForm.controls.name.dirty && !createLegionClusterForm.controls.name.hasError('duplication')">
+            <span class="error" *ngIf="!createOdahuForm.controls.name.valid && createOdahuForm.controls.name.dirty && !createOdahuForm.controls.name.hasError('duplication')">
               Odahu cluster name can only contain letters and numbers
             </span>
-            <span class="error" *ngIf="createLegionClusterForm.controls.name.hasError('duplication')">This Odahu cluster name already exists.</span>
+            <span class="error" *ngIf="createOdahuForm.controls.name.hasError('duplication')">This Odahu cluster name already exists.</span>
           </div>
         </div>
 
@@ -60,7 +60,7 @@
           <div class="control">
             <input type="text" class="form-control" placeholder="Enter custom tag" formControlName="custom_tag">
           <span class="error"
-            *ngIf="!createLegionClusterForm.controls.custom_tag.valid && createLegionClusterForm.controls.custom_tag.dirty">
+            *ngIf="!createOdahuForm.controls.custom_tag.valid && createOdahuForm.controls.custom_tag.dirty">
             Custom tag can only contain letters, numbers, hyphens and '_' but can not end with special characters</span>
           </div>
         </div>
@@ -81,7 +81,7 @@
         <div class="text-center m-top-30">
           <button mat-raised-button type="button" class="butt action" (click)="dialogRef.close()">Cancel</button>
           <button mat-raised-button type="button" class="butt butt-success action"
-                  [disabled]="!createLegionClusterForm.valid" (click)="createOdahuCluster(createLegionClusterForm.value)">
+                  [disabled]="!createOdahuForm.valid" (click)="createOdahuCluster(createOdahuForm.value)">
             Create
           </button>
         </div>
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/create-legion-claster/create-legion-cluster.component.scss b/services/self-service/src/main/resources/webapp/src/app/administration/odahu/create-odahu-claster/create-odahu-cluster.component.scss
similarity index 73%
rename from services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/create-legion-claster/create-legion-cluster.component.scss
rename to services/self-service/src/main/resources/webapp/src/app/administration/odahu/create-odahu-claster/create-odahu-cluster.component.scss
index 324f0df..51dcf57 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/create-legion-claster/create-legion-cluster.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/odahu/create-odahu-claster/create-odahu-cluster.component.scss
@@ -1,4 +1,4 @@
-.create-legion-cluster{
+.create-odahu-cluster{
   .error{
     position: absolute;
     left: 0;
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/create-legion-claster/create-legion-cluster.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/odahu/create-odahu-claster/create-odahu-cluster.component.ts
similarity index 84%
rename from services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/create-legion-claster/create-legion-cluster.component.ts
rename to services/self-service/src/main/resources/webapp/src/app/administration/odahu/create-odahu-claster/create-odahu-cluster.component.ts
index 7aa941d..20e84b4 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/create-legion-claster/create-legion-cluster.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/odahu/create-odahu-claster/create-odahu-cluster.component.ts
@@ -23,21 +23,21 @@ import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
 import { ToastrService } from 'ngx-toastr';
 
 import { Project } from '../../project/project.component';
-import { ProjectService, LegionDeploymentService } from '../../../core/services';
+import { ProjectService, OdahuDeploymentService } from '../../../core/services';
 
 import { DICTIONARY } from '../../../../dictionary/global.dictionary';
 import {CheckUtils, PATTERNS} from '../../../core/util';
 
 
 @Component({
-  selector: 'create-legion-cluster',
-  templateUrl: 'create-legion-cluster.component.html',
-  styleUrls: ['./create-legion-cluster.component.scss']
+  selector: 'create-odahu-cluster',
+  templateUrl: 'create-odahu-cluster.component.html',
+  styleUrls: ['./create-odahu-cluster.component.scss']
 })
 
-export class CreateLegionClusterComponent implements OnInit {
+export class CreateOdahuClusterComponent implements OnInit {
   readonly DICTIONARY = DICTIONARY;
-  public createLegionClusterForm: FormGroup;
+  public createOdahuForm: FormGroup;
 
   projects: Project[] = [];
   endpoints: Array<String> = [];
@@ -45,10 +45,10 @@ export class CreateLegionClusterComponent implements OnInit {
   constructor(
     @Inject(MAT_DIALOG_DATA) public data: any,
     public toastr: ToastrService,
-    public dialogRef: MatDialogRef<CreateLegionClusterComponent>,
+    public dialogRef: MatDialogRef<CreateOdahuClusterComponent>,
     private _fb: FormBuilder,
     private projectService: ProjectService,
-    private legionDeploymentService: LegionDeploymentService,
+    private odahuDeploymentService: OdahuDeploymentService,
   ) {
   }
 
@@ -76,7 +76,7 @@ export class CreateLegionClusterComponent implements OnInit {
   }
 
   private initFormModel(): void {
-    this.createLegionClusterForm = this._fb.group({
+    this.createOdahuForm = this._fb.group({
       name: ['', [Validators.required, Validators.pattern(PATTERNS.namePattern), this.checkDuplication.bind(this)]],
       project: ['', Validators.required],
       endpoint: ['', [Validators.required]],
@@ -86,7 +86,7 @@ export class CreateLegionClusterComponent implements OnInit {
 
   private createOdahuCluster(value): void {
     this.dialogRef.close();
-    this.legionDeploymentService.createOdahuNewCluster(value).subscribe(() => {
+    this.odahuDeploymentService.createOdahuNewCluster(value).subscribe(() => {
       this.toastr.success('Odahu cluster creation is processing!', 'Success!');
       }, error => this.toastr.error(error.message || 'Odahu cluster creation failed!', 'Oops!')
     );
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/create-legion-claster/index.ts b/services/self-service/src/main/resources/webapp/src/app/administration/odahu/create-odahu-claster/index.ts
similarity index 81%
rename from services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/create-legion-claster/index.ts
rename to services/self-service/src/main/resources/webapp/src/app/administration/odahu/create-odahu-claster/index.ts
index 1baadfb..bd465fa 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/create-legion-claster/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/odahu/create-odahu-claster/index.ts
@@ -24,9 +24,9 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
 import { MaterialModule } from '../../../shared/material.module';
 import { FormControlsModule } from '../../../shared/form-controls';
 import { KeysPipeModule, UnderscorelessPipeModule } from '../../../core/pipes';
-import {CreateLegionClusterComponent} from "./create-legion-cluster.component";
+import {CreateOdahuClusterComponent} from './create-odahu-cluster.component';
 
-export * from './create-legion-cluster.component';
+export * from './create-odahu-cluster.component';
 
 @NgModule({
   imports: [
@@ -38,8 +38,8 @@ export * from './create-legion-cluster.component';
     KeysPipeModule,
     UnderscorelessPipeModule,
   ],
-  declarations: [CreateLegionClusterComponent],
-  entryComponents: [CreateLegionClusterComponent],
-  exports: [CreateLegionClusterComponent]
+  declarations: [CreateOdahuClusterComponent],
+  entryComponents: [CreateOdahuClusterComponent],
+  exports: [CreateOdahuClusterComponent]
 })
-export class CreateLegionClusterModule { }
+export class CreateOdahuClusterModule { }
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/index.ts b/services/self-service/src/main/resources/webapp/src/app/administration/odahu/index.ts
similarity index 71%
rename from services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/index.ts
rename to services/self-service/src/main/resources/webapp/src/app/administration/odahu/index.ts
index fa28e36..1564326 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/odahu/index.ts
@@ -25,11 +25,11 @@ import { MaterialModule } from '../../shared/material.module';
 import { FormControlsModule } from '../../shared/form-controls';
 import { UnderscorelessPipeModule } from '../../core/pipes/underscoreless-pipe';
 
-import {BubbleModule} from "../../shared/bubble";
-import {LegionDeploymentComponent} from "./legion-deployment.component";
-import {LegionDeploymentDataService} from "./legion-deployment-data.service";
-import {LegionListComponent} from "./legion-list/legion-list.component";
-import {CreateLegionClusterModule} from "./create-legion-claster";
+import {BubbleModule} from '../../shared/bubble';
+import {OdahuComponent} from './odahu.component';
+import {OdahuDataService} from './odahu-data.service';
+import {OdahuGridComponent} from './odahu-grid/odahu-grid.component';
+import {CreateOdahuClusterModule} from './create-odahu-claster';
 
 @NgModule({
   imports: [
@@ -40,11 +40,11 @@ import {CreateLegionClusterModule} from "./create-legion-claster";
     FormControlsModule,
     UnderscorelessPipeModule,
     BubbleModule,
-    CreateLegionClusterModule
+    CreateOdahuClusterModule
   ],
-  declarations: [LegionDeploymentComponent, LegionListComponent],
+  declarations: [OdahuComponent, OdahuGridComponent],
   entryComponents: [],
-  providers: [LegionDeploymentDataService],
-  exports: [LegionDeploymentComponent]
+  providers: [OdahuDataService],
+  exports: [OdahuComponent]
 })
-export class LegionDeploymentModule { }
+export class OdahuModule { }
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/odahu/odahu-data.service.ts b/services/self-service/src/main/resources/webapp/src/app/administration/odahu/odahu-data.service.ts
new file mode 100644
index 0000000..d8a30a6
--- /dev/null
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/odahu/odahu-data.service.ts
@@ -0,0 +1,27 @@
+import { Injectable } from '@angular/core';
+import {BehaviorSubject, Observable} from 'rxjs';
+import {OdahuDeploymentService} from '../../core/services';
+
+
+@Injectable({
+  providedIn: 'root'
+})
+
+export class OdahuDataService {
+  _odahuClasters = new BehaviorSubject<any>(null);
+
+  constructor(private odahuDeploymentService: OdahuDeploymentService) {
+    this.getClastersList();
+  }
+
+  public updateClasters(): void {
+    this.getClastersList();
+  }
+
+  private getClastersList(): void {
+   this.odahuDeploymentService.getOduhuClustersList().subscribe(
+      (response: any ) => {
+        return this._odahuClasters.next(response);
+      });
+  }
+}
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-list/legion-list.component.html b/services/self-service/src/main/resources/webapp/src/app/administration/odahu/odahu-grid/odahu-grid.component.html
similarity index 83%
rename from services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-list/legion-list.component.html
rename to services/self-service/src/main/resources/webapp/src/app/administration/odahu/odahu-grid/odahu-grid.component.html
index a670b2f..73d7952 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-list/legion-list.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/odahu/odahu-grid/odahu-grid.component.html
@@ -1,5 +1,5 @@
 
-<table mat-table [dataSource]="dataSource" class="legion-clasters-table mat-elevation-z6 selection">
+<table mat-table [dataSource]="dataSource" class="odahu-clasters-table mat-elevation-z6 selection">
   <ng-container matColumnDef="project">
     <th mat-header-cell *matHeaderCellDef class="project"> Project name </th>
     <td mat-cell *matCellDef="let element" class="project">
@@ -18,24 +18,24 @@
     <td mat-footer-cell *matFooterCellDef></td>
   </ng-container>
 
-  <ng-container matColumnDef="legion-name">
-    <th mat-header-cell *matHeaderCellDef class="legion-name"> Odahu cluster name </th>
-    <td mat-cell *matCellDef="let element" class="legion-name">
+  <ng-container matColumnDef="odahu-name">
+    <th mat-header-cell *matHeaderCellDef class="odahu-name"> Odahu cluster name </th>
+    <td mat-cell *matCellDef="let element" class="odahu-name">
       <span *ngIf="element && element.name">{{element.name}}</span>
     </td>
     <td mat-footer-cell *matFooterCellDef></td>
   </ng-container>
 
-  <ng-container matColumnDef="legion-status">
-    <th mat-header-cell *matHeaderCellDef class="legion-status"> Odahu cluster status </th>
-    <td mat-cell *matCellDef="let element" class="legion-status">
+  <ng-container matColumnDef="odahu-status">
+    <th mat-header-cell *matHeaderCellDef class="odahu-status"> Odahu cluster status </th>
+    <td mat-cell *matCellDef="let element" class="odahu-status">
       <span *ngIf="element && element.name" [ngClass]="element.status.toLowerCase()">{{ element.status | titlecase}}</span>
     </td>
     <td mat-footer-cell *matFooterCellDef></td>
   </ng-container>
 
   <ng-container matColumnDef="actions">
-    <th mat-header-cell *matHeaderCellDef class="legion-actions"></th>
+    <th mat-header-cell *matHeaderCellDef class="odahu-actions"></th>
     <td mat-cell *matCellDef="let element" class="settings">
       <span *ngIf="element && element.name" #settings (click)="actions.toggle($event, settings)" class="actions" [ngClass]="{'disabled': element.status !== 'RUNNING' && element.status !== 'STOPPED'}"></span>
       <bubble-up #actions class="list-menu" position="bottom-left" alternative="top-left">
@@ -88,7 +88,7 @@
 
   <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
   <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
-  <tr [hidden]="legionClustersList && legionClustersList.length" mat-footer-row *matFooterRowDef="['placeholder']"></tr>
+  <tr [hidden]="odahuList && odahuList.length" mat-footer-row *matFooterRowDef="['placeholder']"></tr>
 </table>
 
 
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-list/legion-list.component.scss b/services/self-service/src/main/resources/webapp/src/app/administration/odahu/odahu-grid/odahu-grid.component.scss
similarity index 94%
rename from services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-list/legion-list.component.scss
rename to services/self-service/src/main/resources/webapp/src/app/administration/odahu/odahu-grid/odahu-grid.component.scss
index 21fc43e..62e6200 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-list/legion-list.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/odahu/odahu-grid/odahu-grid.component.scss
@@ -1,7 +1,7 @@
-.legion-clasters-table {
+.odahu-clasters-table {
   width: 100%;
 
-  .project, .endpoint, .legion-name, .legion-status{
+  .project, .endpoint, .odahu-name, .odahu-status{
     width: 23%;
   }
 
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-list/legion-list.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/odahu/odahu-grid/odahu-grid.component.ts
similarity index 55%
rename from services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-list/legion-list.component.ts
rename to services/self-service/src/main/resources/webapp/src/app/administration/odahu/odahu-grid/odahu-grid.component.ts
index 7e7913e..817d12b 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-list/legion-list.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/odahu/odahu-grid/odahu-grid.component.ts
@@ -1,35 +1,35 @@
 import { Component, OnInit } from '@angular/core';
 import {Subscription} from 'rxjs';
-import {LegionDeploymentDataService} from '../legion-deployment-data.service';
+import {OdahuDataService} from '../odahu-data.service';
 import { MatTableDataSource } from '@angular/material/table';
-import {LegionDeploymentService} from '../../../core/services';
+import {OdahuDeploymentService} from '../../../core/services';
 import {ToastrService} from 'ngx-toastr';
 import {MatDialog} from '@angular/material/dialog';
 import {OdahuActionDialogComponent} from '../../../shared/modal-dialog/odahu-action-dialog';
 
 @Component({
-  selector: 'legion-list',
-  templateUrl: './legion-list.component.html',
-  styleUrls: ['./legion-list.component.scss']
+  selector: 'odahu-grid',
+  templateUrl: './odahu-grid.component.html',
+  styleUrls: ['./odahu-grid.component.scss']
 })
-export class LegionListComponent implements OnInit {
-  private legionClustersList: any[];
+export class OdahuGridComponent implements OnInit {
+  private odahuList: any[];
   private subscriptions: Subscription = new Subscription();
   public dataSource: MatTableDataSource<any>;
-  displayedColumns: string[] = [ 'legion-name', 'project', 'endpoint-url', 'legion-status', 'actions'];
+  displayedColumns: string[] = [ 'odahu-name', 'project', 'endpoint-url', 'odahu-status', 'actions'];
 
   constructor(
-    private legionDeploymentDataService: LegionDeploymentDataService,
-    private legionDeploymentService: LegionDeploymentService,
+    private odahuDataService: OdahuDataService,
+    private odahuDeploymentService: OdahuDeploymentService,
     public toastr: ToastrService,
     public dialog: MatDialog
   ) { }
 
   ngOnInit() {
-    this.subscriptions.add(this.legionDeploymentDataService._legionClasters.subscribe(
+    this.subscriptions.add(this.odahuDataService._odahuClasters.subscribe(
       (value) => {
         if (value) {
-          this.legionClustersList = value;
+          this.odahuList = value;
           this.dataSource = new MatTableDataSource(value);
         }
       }));
@@ -38,8 +38,8 @@ export class LegionListComponent implements OnInit {
   private odahuAction(element: any, action: string) {
     this.dialog.open(OdahuActionDialogComponent, {data: {type: action, item: element}, panelClass: 'modal-sm'})
       .afterClosed().subscribe(result => {
-        result && this.legionDeploymentService.odahuAction(element,  action).subscribe(v =>
-          this.legionDeploymentDataService.updateClasters(),
+        result && this.odahuDeploymentService.odahuAction(element,  action).subscribe(v =>
+          this.odahuDataService.updateClasters(),
           error => this.toastr.error(`Odahu cluster ${action} failed!`, 'Oops!')
         ) ;
       }, error => this.toastr.error(error.message || `Odahu cluster ${action} failed!`, 'Oops!')
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-deployment.component.html b/services/self-service/src/main/resources/webapp/src/app/administration/odahu/odahu.component.html
similarity index 95%
rename from services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-deployment.component.html
rename to services/self-service/src/main/resources/webapp/src/app/administration/odahu/odahu.component.html
index 1368180..a59a5d5 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-deployment.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/odahu/odahu.component.html
@@ -21,7 +21,7 @@
 <div class="base-retreat">
   <div class="sub-nav">
     <div>
-      <button mat-raised-button class="butt butt-create" (click)="createLegionCluster()">
+      <button mat-raised-button class="butt butt-create" (click)="createOdahuCluster()">
         <i class="material-icons">add</i>Create new
       </button>
     </div>
@@ -35,8 +35,8 @@
   <mat-divider></mat-divider>
 
   <div>
-    <legion-list>
-    </legion-list>
+    <odahu-grid>
+    </odahu-grid>
   </div>
 </div>
 
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-deployment.component.scss b/services/self-service/src/main/resources/webapp/src/app/administration/odahu/odahu.component.scss
similarity index 100%
rename from services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-deployment.component.scss
rename to services/self-service/src/main/resources/webapp/src/app/administration/odahu/odahu.component.scss
diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-deployment.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/odahu/odahu.component.ts
similarity index 50%
rename from services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-deployment.component.ts
rename to services/self-service/src/main/resources/webapp/src/app/administration/odahu/odahu.component.ts
index 263debf..642b311 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/legion-deployment/legion-deployment.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/odahu/odahu.component.ts
@@ -1,10 +1,10 @@
 import { Component, OnInit } from '@angular/core';
-import {LegionDeploymentDataService} from './legion-deployment-data.service';
+import {OdahuDataService} from './odahu-data.service';
 import {Subscription} from 'rxjs';
 import {MatDialog} from '@angular/material/dialog';
 import {ToastrService} from 'ngx-toastr';
-import {CreateLegionClusterComponent} from './create-legion-claster/create-legion-cluster.component';
-import {HealthStatusService, LegionDeploymentService} from '../../core/services';
+import {CreateOdahuClusterComponent} from './create-odahu-claster/create-odahu-cluster.component';
+import {HealthStatusService, OdahuDeploymentService} from '../../core/services';
 
 export interface OdahuCluster {
   name: string;
@@ -13,35 +13,35 @@ export interface OdahuCluster {
 }
 
 @Component({
-  selector: 'dlab-legion-deployment',
-  templateUrl: './legion-deployment.component.html',
-  styleUrls: ['./legion-deployment.component.scss']
+  selector: 'datalab-odahu',
+  templateUrl: './odahu.component.html',
+  styleUrls: ['./odahu.component.scss']
 })
-export class LegionDeploymentComponent implements OnInit {
+export class OdahuComponent implements OnInit {
 
-  private legionClastersList: any[];
+  private odahuList: any[];
   private subscriptions: Subscription = new Subscription();
   private healthStatus;
 
   constructor(
-    private legionDeploymentDataService: LegionDeploymentDataService,
+    private odahuDataService: OdahuDataService,
     private dialog: MatDialog,
     public toastr: ToastrService,
-    public legionDeploymentService: LegionDeploymentService,
+    public odahuDeploymentService: OdahuDeploymentService,
     private healthStatusService: HealthStatusService,
   ) { }
 
   ngOnInit() {
     this.getEnvironmentHealthStatus();
-    this.subscriptions.add(this.legionDeploymentDataService._legionClasters.subscribe(
+    this.subscriptions.add(this.odahuDataService._odahuClasters.subscribe(
       (value) => {
-        if (value) this.legionClastersList = value;
+        if (value) this.odahuList = value;
       }));
     this.refreshGrid();
   }
 
-  public createLegionCluster(): void {
-    this.dialog.open(CreateLegionClusterComponent, {  data: this.legionClastersList, panelClass: 'modal-lg' })
+  public createOdahuCluster(): void {
+    this.dialog.open(CreateOdahuClusterComponent, {  data: this.odahuList, panelClass: 'modal-lg' })
       .afterClosed().subscribe((result) => {
       result && this.getEnvironmentHealthStatus();
       this.refreshGrid();
@@ -54,6 +54,6 @@ export class LegionDeploymentComponent implements OnInit {
   }
 
   public refreshGrid(): void {
-    this.legionDeploymentDataService.updateClasters();
+    this.odahuDataService.updateClasters();
   }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/app.routing.module.ts b/services/self-service/src/main/resources/webapp/src/app/app.routing.module.ts
index 3fa6e65..461c5f7 100644
--- a/services/self-service/src/main/resources/webapp/src/app/app.routing.module.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/app.routing.module.ts
@@ -34,7 +34,7 @@ import { RolesComponent } from './administration/roles/roles.component';
 import { SwaggerComponent } from './swagger/swagger.component';
 import { AuthorizationGuard, CheckParamsGuard, CloudProviderGuard, AdminGuard, AuditGuard } from './core/services';
 import {AuditComponent} from './reports/audit/audit.component';
-import {LegionDeploymentComponent} from './administration/legion-deployment/legion-deployment.component';
+import {OdahuComponent} from './administration/odahu/odahu.component';
 
 const routes: Routes = [{
   path: 'login',
@@ -62,10 +62,10 @@ const routes: Routes = [{
       canActivate: [AuthorizationGuard, AdminGuard],
     },
      {
-      path: 'odahu',
-      component: LegionDeploymentComponent,
-      canActivate: [AuthorizationGuard],
-    }, {
+    //   path: 'odahu',
+    //   component: OdahuComponent,
+    //   canActivate: [AuthorizationGuard, AdminGuard],
+    // }, {
       path: 'roles',
       component: RolesComponent,
       canActivate: [AuthorizationGuard, AdminGuard],
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/core.module.ts b/services/self-service/src/main/resources/webapp/src/app/core/core.module.ts
index b2a5c61..ae6221a 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/core.module.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/core.module.ts
@@ -48,7 +48,7 @@ import { NoCacheInterceptor } from './interceptors/nocache.interceptor';
 import { ErrorInterceptor } from './interceptors/error.interceptor';
 
 import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
-import {AuditGuard, LegionDeploymentService} from './services';
+import {AuditGuard, OdahuDeploymentService} from './services';
 
 @NgModule({
   imports: [CommonModule],
@@ -85,7 +85,7 @@ export class CoreModule {
         ProjectService,
         EndpointService,
         UserAccessKeyService,
-        LegionDeploymentService,
+        OdahuDeploymentService,
 
         { provide: MatDialogRef, useValue: {} },
         { provide: MAT_DIALOG_DATA, useValue: [] },
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/index.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/index.ts
index fd4bc4e..4e9a898 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/index.ts
@@ -39,4 +39,4 @@ export * from './dataengineConfiguration.service';
 export * from './storage.service';
 export * from './project.service';
 export * from './endpoint.service';
-export * from './legion-deployment.service';
+export * from './odahu-deployment.service';
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/legion-deployment.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/odahu-deployment.service.ts
similarity index 96%
rename from services/self-service/src/main/resources/webapp/src/app/core/services/legion-deployment.service.ts
rename to services/self-service/src/main/resources/webapp/src/app/core/services/odahu-deployment.service.ts
index 2230bc0..f6fe528 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/legion-deployment.service.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/odahu-deployment.service.ts
@@ -8,7 +8,7 @@ import { ErrorUtils } from '../util';
   providedIn: 'root'
 })
 
-export class LegionDeploymentService {
+export class OdahuDeploymentService {
   constructor(private applicationServiceFacade: ApplicationServiceFacade) { }
 
   public createOdahuNewCluster(data): Observable<{}> {
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/util/errorUtils.ts b/services/self-service/src/main/resources/webapp/src/app/core/util/errorUtils.ts
index c3c9179..5d25db2 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/util/errorUtils.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/util/errorUtils.ts
@@ -20,6 +20,7 @@
 
 import { throwError as observableThrowError } from 'rxjs';
 import { CheckUtils } from './checkUtils';
+import {logger} from 'codelyzer/util/logger';
 
 export class ErrorUtils {
 
@@ -41,7 +42,6 @@ export class ErrorUtils {
 
   public static handleServiceError(errorMessage) {
     const error = CheckUtils.isJSON(errorMessage.error) ? JSON.parse(errorMessage.error) : errorMessage.error;
-
     return observableThrowError({
       status: error.code,
       statusText: errorMessage.statusText,
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.html
index d73dae3..5d297e6 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.html
@@ -23,7 +23,20 @@
     <button type="button" class="close" (click)="dialogRef.close()">&times;</button>
   </header>
   <div class="dialog-content">
-    <div *ngIf="data ">
+    <div *ngIf="data.legion">
+      <table class="detail-header">
+        <tr>
+          <td>{{odahu.name}}</td>
+          <td>
+            <span class="status" ngClass="{{odahu.status || ''}}">
+              {{odahu.status}}
+            </span>
+          </td>
+          <td>{{odahu.shape}}</td>
+        </tr>
+      </table>
+    </div>
+    <div *ngIf="data.notebook">
       <table class="detail-header">
         <tr>
           <td>{{notebook.template_name || notebook.name}}</td>
@@ -258,5 +271,25 @@
       </div>
     </div>
 
+    <div class="legion-info" *ngIf="data.odahu">
+      <div class="content-box">
+        <div class="detail-info" *ngIf="!odahu.error_message">
+        <div  class="links_block">
+          <div *ngFor="let url of odahu.url" class="odahu-links">
+            <div class="odahu-link">
+              <span class="description">{{url.description }}: &nbsp;</span>
+              <a class="ellipsis" matTooltip="{{ url.url}}" matTooltipPosition="above" href="{{ url.url}}"
+                 target="_blank">{{ url.url}}
+              </a>
+            </div>
+            <div class="grafana" *ngIf="url.description === 'Grafana'">
+              <div><span>Gafana user:&nbsp;</span><span class="creds">{{odahu.bucket_name}}</span></div>
+              <div><span>Gafana password:&nbsp;</span><span class="creds">{{odahu.shared_bucket_name}}</span></div>
+            </div>
+          </div>
+        </div>
+    </div>
+      </div>
+    </div>
   </div>
 </div>
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.scss b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.scss
index e91c04b..fed1aa5 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.scss
@@ -27,8 +27,31 @@
 
 .links_block {
 
-  >p {
-    display: flex;
+  .odahu-links:not(:last-child){
+    margin-bottom: 20px;
+  }
+
+  .grafana{
+    white-space: nowrap;
+    padding-left: 30px;
+    color: $blue-grey-color;
+
+    div{
+      display: flex;
+
+      span{
+        font-size: 13px;
+        font-weight: 500;
+
+        &.creds{
+          font-weight: 600;
+        }
+      }
+    }
+  }
+
+  >p, .odahu-link {
+     display: flex;
 
     .description {
       white-space: nowrap;
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.ts
index dfda98c..cd1b574 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.ts
@@ -47,7 +47,7 @@ export class DetailDialogComponent implements OnInit {
   bucketStatus: object = {};
   isBucketAllowed = true;
   isCopyIconVissible: {bucket} = {bucket: false};
-
+  public odahu: any;
   public configurationForm: FormGroup;
   @ViewChild('configurationNode') configuration;
 
@@ -61,7 +61,15 @@ export class DetailDialogComponent implements OnInit {
     public toastr: ToastrService,
     public auditService: AuditService
   ) {
+    if (data.notebook) {
+      this.notebook = data.notebook;
+      this.PROVIDER = this.data.notebook.cloud_provider;
+    }
 
+    if (data.odahu) {
+      this.odahu = data.odahu;
+      this.PROVIDER = this.data.odahu.cloud_provider || 'azure';
+    }
   }
 
   ngOnInit() {
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.html
index 6af8f68..2124f24 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.html
@@ -117,7 +117,7 @@
         <tr *ngFor="let element of element.exploratory; let i = index" class="element-row mat-row">
           <td class="name-col">
             <span *ngIf="element.shape !== 'odahu cluster'" matTooltip="{{ element.name }}" matTooltipPosition="above" (click)="printDetailEnvironmentModal(element)">{{ element.name }}</span>
-            <span *ngIf="element.shape === 'odahu cluster'" matTooltip="{{ element.name }}" matTooltipPosition="above" (click)="printDetailLegionModal(element)">{{ element.name }}</span>
+            <span *ngIf="element.shape === 'odahu cluster'" matTooltip="{{ element.name }}" matTooltipPosition="above" (click)="printDetailOdahuModal(element)">{{ element.name }}</span>
           </td>
           <td class="status-col status" ngClass="{{ element.status.toLowerCase() || ''}}">
             {{element.status | underscoreless }}
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.scss b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.scss
index 3e1bb78..6ef7e50 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.scss
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.scss
@@ -446,7 +446,7 @@ table.resources {
   text-align: center;
 }
 
-.legion-icon{
+.odahu-icon{
   vertical-align: middle;
   margin-left: 10px;
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.ts
index dcfa052..cdb4407 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.ts
@@ -22,7 +22,7 @@ import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
 import { animate, state, style, transition, trigger } from '@angular/animations';
 import { ToastrService } from 'ngx-toastr';
 import { MatDialog } from '@angular/material/dialog';
-import {ProjectService, UserResourceService, LegionDeploymentService} from '../../core/services';
+import {ProjectService, UserResourceService, OdahuDeploymentService} from '../../core/services';
 import { ExploratoryModel, Exploratory } from './resources-grid.model';
 import { FilterConfigurationModel } from './filter-configuration.model';
 import { GeneralEnvironmentStatus } from '../../administration/management/management.model';
@@ -133,7 +133,7 @@ export class ResourcesGridComponent implements OnInit {
     private progressBarService: ProgressBarService,
     private projectService: ProjectService,
     private auditService: AuditService,
-    private legionDeploymentService: LegionDeploymentService,
+    private odahuDeploymentService: OdahuDeploymentService,
   ) { }
 
   ngOnInit(): void {
@@ -229,8 +229,8 @@ export class ResourcesGridComponent implements OnInit {
       .afterClosed().subscribe(() => this.buildGrid());
   }
 
-  public printDetailLegionModal(data): void {
-    this.dialog.open(DetailDialogComponent, { data: {legion: data}, panelClass: 'modal-lg' })
+  public printDetailOdahuModal(data): void {
+    this.dialog.open(DetailDialogComponent, { data: {odahu: data}, panelClass: 'modal-lg' })
       .afterClosed().subscribe(() => this.buildGrid());
   }
 
@@ -254,7 +254,8 @@ export class ResourcesGridComponent implements OnInit {
           error => this.toastr.error(error.message || 'Exploratory starting failed!', 'Oops!'));
     } else if (action === 'stop') {
       const compute =  data.resources.filter(cluster => cluster.status === 'running');
-      this.dialog.open(ConfirmationDialogComponent, { data: { notebook: data, compute, type: ConfirmationDialogType.StopExploratory }, panelClass: 'modal-sm' })
+      this.dialog.open(ConfirmationDialogComponent,
+        { data: { notebook: data, compute, type: ConfirmationDialogType.StopExploratory }, panelClass: 'modal-sm' })
         .afterClosed().subscribe((res) => {
         res && this.buildGrid();
       });
@@ -455,7 +456,7 @@ export class ResourcesGridComponent implements OnInit {
   private odahuAction(element: any, action: string) {
     this.dialog.open(OdahuActionDialogComponent, {data: {type: action, item: element}, panelClass: 'modal-sm'})
       .afterClosed().subscribe(result => {
-        result && this.legionDeploymentService.odahuAction(element,  action).subscribe(v =>
+        result && this.odahuDeploymentService.odahuAction(element,  action).subscribe(v =>
             this.buildGrid(),
           error => this.toastr.error(`Odahu cluster ${action} failed!`, 'Oops!')
         ) ;
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.html b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.html
index 0a71174..89de5e0 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.html
@@ -88,11 +88,11 @@
               <span *ngIf="isExpanded; else projects">Projects</span>
               <ng-template #projects><i class="material-icons">dns</i></ng-template>
             </a>
-            <a class="sub-nav-item" [style.margin-left.px]="isExpanded ? '30' : '0'" [routerLink]="['/odahu']"
-               [routerLinkActive]="['active']" [routerLinkActiveOptions]="{exact:true}">
-              <span *ngIf="isExpanded; else legion">Odahu deployment</span>
-              <ng-template #legion><i class="material-icons">get_app</i></ng-template>
-            </a>
+<!--            <a class="sub-nav-item" [style.margin-left.px]="isExpanded ? '30' : '0'" [routerLink]="['/odahu']"-->
+<!--               [routerLinkActive]="['active']" [routerLinkActiveOptions]="{exact:true}">-->
+<!--              <span *ngIf="isExpanded; else odahu">Odahu deployment</span>-->
+<!--              <ng-template #odahu><i class="material-icons">get_app</i></ng-template>-->
+<!--            </a>-->
             <a class="sub-nav-item" [style.margin-left.px]="isExpanded ? '30' : '0'"
               [routerLink]="['/environment_management']" [routerLinkActive]="['active']"
               [routerLinkActiveOptions]="{exact:true}">


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org