You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by an...@apache.org on 2019/05/20 14:35:30 UTC

[incubator-dlab] 03/06: connect added controllers

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

ankovalyshyn pushed a commit to branch project_grid
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit 4943d9ebe6893780dc644c9b9b61b6ecc3b34549
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Mon May 20 16:31:27 2019 +0300

    connect added controllers
---
 .../computational-resources-list.component.html               |  2 +-
 .../computational-resources-list.component.ts                 | 11 +++++++----
 .../resources/resources-grid/resources-grid.component.html    |  2 +-
 .../app/resources/resources-grid/resources-grid.component.ts  |  8 ++++++--
 4 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/computational-resources-list.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/computational-resources-list.component.html
index 3881705..a495e61 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/computational-resources-list.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/computational-resources-list.component.html
@@ -56,5 +56,5 @@
     </div>
   </div>
   
-  <dlab-cluster-details #detailComputationalResource (buildGrid)="rebuildGrid()"></dlab-cluster-details>
+  <!-- <dlab-cluster-details #detailComputationalResource (buildGrid)="rebuildGrid()"></dlab-cluster-details> -->
   <dlab-scheduler #clusterScheduler (buildGrid)="rebuildGrid()"></dlab-scheduler>
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/computational-resources-list.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/computational-resources-list.component.ts
index a6d08db..55650ee 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/computational-resources-list.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/computational-resources-list.component.ts
@@ -18,10 +18,11 @@
  */
 
 import { Component, EventEmitter, Input, Output, ViewChild, Inject } from '@angular/core';
+import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
 import { ToastrService } from 'ngx-toastr';
 
 import { UserResourceService } from '../../../core/services';
-import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
+import { DetailComputationalResourcesComponent } from '../cluster-details';
 
 @Component({
   selector: 'computational-resources-list',
@@ -41,9 +42,9 @@ export class ComputationalResourcesListComponent {
   @Output() buildGrid: EventEmitter<{}> = new EventEmitter();
 
   constructor(
-    private userResourceService: UserResourceService,
     public dialog: MatDialog,
-    public toastr: ToastrService
+    public toastr: ToastrService,
+    private userResourceService: UserResourceService
   ) { }
 
   toggleResourceAction(resource, action: string) {
@@ -79,7 +80,9 @@ export class ComputationalResourcesListComponent {
   }
 
   detailComputationalResources(environment, resource): void {
-    this.detailComputationalResource.open({ isFooter: false }, environment, resource);
+    // this.detailComputationalResource.open({ isFooter: false }, environment, resource);
+    this.dialog.open(DetailComputationalResourcesComponent, { data: { environment, resource }})
+               .afterClosed().subscribe(() => this.rebuildGrid());
   };
 
   openScheduleDialog(resource) {
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 ddce580..8958fe9 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
@@ -155,7 +155,7 @@
 
 <!-- <detail-dialog #detailDialog (buildGrid)="buildGrid()"></detail-dialog> -->
 
-<computational-resource-create-dialog #computationalResourceModal (buildGrid)="buildGrid()"></computational-resource-create-dialog>
+<!-- <computational-resource-create-dialog #computationalResourceModal (buildGrid)="buildGrid()"></computational-resource-create-dialog> -->
 <confirmation-dialog #confirmationDialog (buildGrid)="buildGrid()"></confirmation-dialog>
 <cost-details-dialog #costDetailsDialog></cost-details-dialog>
 <!-- <install-libraries #installLibs (buildGrid)="buildGrid()"></install-libraries> -->
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 58c5766..7e06ea5 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
@@ -32,6 +32,7 @@ import { SortUtil } from '../../core/util';
 import { DetailDialogComponent } from '../exploratory/detail-dialog';
 import { AmiCreateDialogComponent } from '../exploratory/ami-create-dialog';
 import { InstallLibrariesComponent } from '../exploratory/install-libraries';
+import { ComputationalResourceCreateDialogComponent } from '../computational/computational-resource-create-dialog/computational-resource-create-dialog.component';
 
 import { DICTIONARY } from '../../../dictionary/global.dictionary';
 
@@ -57,7 +58,7 @@ export class ResourcesGridComponent implements OnInit {
   healthStatus: GeneralEnvironmentStatus;
   delimitersRegex = /[-_]?/g;
 
-  @ViewChild('computationalResourceModal') computationalResourceModal;
+  // @ViewChild('computationalResourceModal') computationalResourceModal;
   @ViewChild('confirmationDialog') confirmationDialog;
   @ViewChild('detailDialog') detailDialog;
   @ViewChild('costDetailsDialog') costDetailsDialog;
@@ -290,7 +291,10 @@ export class ResourcesGridComponent implements OnInit {
   exploratoryAction(data, action: string) {
     if (action === 'deploy') {
       this.notebookName = data.name;
-      this.computationalResourceModal.open({ isFooter: false }, data, this.environments);
+      // this.computationalResourceModal.open({ isFooter: false }, data, this.environments);
+
+      this.dialog.open(ComputationalResourceCreateDialogComponent, { data: { notebook: data, full_list: this.environments}})
+                 .afterClosed().subscribe(() => this.buildGrid());
     } else if (action === 'run') {
       this.userResourceService
         .runExploratoryEnvironment({ notebook_instance_name: data.name })


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