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 11:46:05 UTC

[incubator-dlab] 09/09: fixed management controls of calling components on resources

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 73b81d0fd415c4c426444f58cced639459529202
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Mon May 20 14:45:44 2019 +0300

    fixed management controls of calling components on resources
---
 .../resources/resources-grid/resources-grid.component.html    |  2 +-
 .../app/resources/resources-grid/resources-grid.component.ts  |  7 +++----
 .../webapp/src/app/resources/resources.component.html         |  2 +-
 .../resources/webapp/src/app/resources/resources.component.ts | 11 +++++++----
 .../resources/webapp/src/app/resources/resources.module.ts    |  2 +-
 .../webapp/src/app/shared/navbar/navbar.component.html        |  2 +-
 6 files changed, 14 insertions(+), 12 deletions(-)

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 dbd469c..ddce580 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
@@ -158,6 +158,6 @@
 <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>
+<!-- <install-libraries #installLibs (buildGrid)="buildGrid()"></install-libraries> -->
 <dlab-scheduler #envScheduler (buildGrid)="buildGrid()"></dlab-scheduler>
 <!-- <dlab-ami-create-dialog #createAmi (buildGrid)="buildGrid()"></dlab-ami-create-dialog> -->
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 93b7d4c..58c5766 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
@@ -31,6 +31,7 @@ import { ConfirmationDialogType } from '../../shared';
 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 { DICTIONARY } from '../../../dictionary/global.dictionary';
 
@@ -60,10 +61,7 @@ export class ResourcesGridComponent implements OnInit {
   @ViewChild('confirmationDialog') confirmationDialog;
   @ViewChild('detailDialog') detailDialog;
   @ViewChild('costDetailsDialog') costDetailsDialog;
-  @ViewChild('installLibs') installLibraries;
   @ViewChild('envScheduler') scheduler;
-  // @ViewChild('createAmi') createAMI;
-
 
   public filteringColumns: Array<any> = [
     { title: 'Environment name', name: 'name', className: 'th_name', filtering: {} },
@@ -304,7 +302,8 @@ export class ResourcesGridComponent implements OnInit {
     } else if (action === 'terminate') {
       this.confirmationDialog.open({ isFooter: false }, data, ConfirmationDialogType.TerminateExploratory);
     } else if (action === 'install') {
-      this.installLibraries.open({ isFooter: false }, data);
+      this.dialog.open(InstallLibrariesComponent, { data: data })
+                 .afterClosed().subscribe(() => this.buildGrid());
     } else if (action === 'schedule') {
       this.scheduler.open({ isFooter: false }, data, 'EXPLORATORY');
     } else if (action === 'ami') {
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.html
index ba9bfd1..dbaea83 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.html
@@ -49,4 +49,4 @@
 <resources-grid></resources-grid>
 
 <!-- <exploratory-environment-create-dialog #createAnalyticalModal (buildGrid)="refreshGrid()"></exploratory-environment-create-dialog> -->
-<dlab-manage-ungit #manageUngitDialog></dlab-manage-ungit>
+<!-- <dlab-manage-ungit #manageUngitDialog></dlab-manage-ungit> -->
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.ts
index 9260cd9..e0c71a0 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/resources.component.ts
@@ -24,8 +24,9 @@ import { MatDialog } from '@angular/material';
 
 import { ResourcesGridComponent } from './resources-grid/resources-grid.component';
 import { ExploratoryEnvironmentCreateComponent } from './exploratory/exploratory-environment-create-dialog/exploratory-environment-create-dialog.component';
-import { UserAccessKeyService, HealthStatusService } from '../core/services';
 import { ResourcesGridRowModel } from './resources-grid/resources-grid.model';
+import { UserAccessKeyService, HealthStatusService } from '../core/services';
+import { ManageUngitComponent } from './manage-ungit/manage-ungit.component';
 import { HTTP_STATUS_CODES, FileUtils } from '../core/util';
 
 @Component({
@@ -41,7 +42,7 @@ export class ResourcesComponent implements OnInit, OnDestroy {
   public healthStatus: any;
 
   @ViewChild('createAnalyticalModal') createAnalyticalModal;
-  @ViewChild('manageUngitDialog') manageUngitDialog;
+  // @ViewChild('manageUngitDialog') manageUngitDialog;
   @ViewChild(ResourcesGridComponent) resourcesGrid: ResourcesGridComponent;
 
   subscriptions: Subscription = new Subscription();
@@ -97,8 +98,10 @@ export class ResourcesComponent implements OnInit, OnDestroy {
   }
 
   public manageUngit(): void {
-    if (!this.manageUngitDialog.isOpened)
-        this.manageUngitDialog.open({ isFooter: false });
+    // if (!this.manageUngitDialog.isOpened)
+    //     this.manageUngitDialog.open({ isFooter: false });
+    this.dialog.open(ManageUngitComponent)
+               .afterClosed().subscribe(() => this.refreshGrid());
   }
 
   private getEnvironmentHealthStatus() {
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources.module.ts b/services/self-service/src/main/resources/webapp/src/app/resources/resources.module.ts
index 6c28e27..2e0bbce 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/resources.module.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/resources.module.ts
@@ -50,7 +50,7 @@ import {
     ManageUngitComponent,
     ConfirmDeleteAccountDialog
   ],
-  entryComponents: [ConfirmDeleteAccountDialog],
+  entryComponents: [ManageUngitComponent, ConfirmDeleteAccountDialog],
   exports: [ResourcesComponent]
 })
 export class ResourcesModule {}
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 8558fdc..eb341c5 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,7 +88,7 @@
           <a class="sub-nav-item"
              [routerLink]="['/environment_management']"
              [routerLinkActive]="['active']"
-             [routerLinkActiveOptions]="{exact:true}">Emvironment Management</a>
+             [routerLinkActiveOptions]="{exact:true}">Environment Management</a>
         </a>
         <a *ngIf="healthStatus?.billingEnabled" class="nav-item"
           [routerLink]="['/billing_report']"


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