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/10/20 12:53:00 UTC

[incubator-datalab] branch DATALAB-2051 created (now 5996f37)

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

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


      at 5996f37  [DATALAB-2051]: Sorted notebooks on roles page

This branch includes the following new commits:

     new 20489fa  Merge branch 'develop' of github.com:apache/incubator-dlab into develop
     new 5996f37  [DATALAB-2051]: Sorted notebooks on roles page

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



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


[incubator-datalab] 02/02: [DATALAB-2051]: Sorted notebooks on roles page

Posted by dg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 5996f3718e338eaf916942fbc17d523e2af0eb53
Author: Dmytro_Gnatyshyn <di...@ukr.net>
AuthorDate: Tue Oct 20 15:52:30 2020 +0300

    [DATALAB-2051]: Sorted notebooks on roles page
---
 .../webapp/src/app/administration/roles/roles.component.ts        | 5 ++---
 .../src/main/resources/webapp/src/app/core/util/sortUtils.ts      | 8 ++++++++
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/roles/roles.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/roles/roles.component.ts
index b725635..61057da 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/roles/roles.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/roles/roles.component.ts
@@ -22,7 +22,7 @@ import { ValidatorFn, FormControl } from '@angular/forms';
 import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
 import { ToastrService } from 'ngx-toastr';
 import {RolesGroupsService, HealthStatusService, ApplicationSecurityService, AppRoutingService} from '../../core/services';
-import { CheckUtils } from '../../core/util';
+import {CheckUtils, SortUtils} from '../../core/util';
 import { DICTIONARY } from '../../../dictionary/global.dictionary';
 import {ProgressBarService} from '../../core/services/progress-bar.service';
 import {ConfirmationDialogComponent, ConfirmationDialogType} from '../../shared/modal-dialog/confirmation-dialog';
@@ -76,8 +76,7 @@ export class RolesComponent implements OnInit {
           this.rolesList = roles.map((role) => {
               return {role: role.description, type: role.type, cloud: role.cloud};
           });
-          this.rolesList = this.rolesList.sort((a, b) => (a.cloud > b.cloud) ? 1 : ((b.cloud > a.cloud) ? -1 : 0));
-          this.rolesList = this.rolesList.sort((a, b) => (a.type > b.type) ? 1 : ((b.type > a.type) ? -1 : 0));
+          this.rolesList = SortUtils.sortByKeys(this.rolesList, ['role', 'cloud', 'type']);
           this.updateGroupData(groups);
           this.stepperView = false;
         },
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/util/sortUtils.ts b/services/self-service/src/main/resources/webapp/src/app/core/util/sortUtils.ts
index 3d204ba..18567bd 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/util/sortUtils.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/util/sortUtils.ts
@@ -59,4 +59,12 @@ export class SortUtils {
     return d > 0 ? arr.reduce((acc, val) => acc.concat(Array.isArray(val) ? this.flatDeep(val, d - 1) : val), [])
       : arr.slice();
   }
+
+  public static sortByKeys(array, keys) {
+    keys.forEach(key => {
+      array = array.sort((a, b) => (a[key] > b[key]) ? 1 : ((b[key] > a[key]) ? -1 : 0));
+    });
+    return array;
+  }
+
 }


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


[incubator-datalab] 01/02: Merge branch 'develop' of github.com:apache/incubator-dlab into develop

Posted by dg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 20489fad0937f7f5cee975bbca3ec32cfe1bc22c
Merge: 152d2aa 785453a
Author: Dmytro_Gnatyshyn <di...@ukr.net>
AuthorDate: Tue Oct 20 13:14:05 2020 +0300

    Merge branch 'develop' of github.com:apache/incubator-dlab into develop

 .../src/general/scripts/gcp/dataengine-service_create.py       |  6 +++---
 .../scripts/gcp/jupyter_install_dataengine-service_kernels.py  |  8 ++++----
 .../scripts/gcp/rstudio_dataengine-service_create_configs.py   |  8 ++++----
 .../scripts/gcp/rstudio_install_dataengine-service_kernels.py  |  5 +++--
 .../scripts/gcp/zeppelin_dataengine-service_create_configs.py  | 10 +++++-----
 .../scripts/gcp/zeppelin_install_dataengine-service_kernels.py |  5 +++--
 .../management/management-grid/management-grid.component.html  |  2 +-
 .../management/management-grid/management-grid.component.ts    |  6 +++++-
 .../reporting/reporting-grid/reporting-grid.component.html     |  4 ++--
 .../reporting/reporting-grid/reporting-grid.component.ts       |  4 ++++
 .../cluster-details/cluster-details.component.html             |  2 +-
 .../install-libraries/install-libraries.component.html         |  3 +--
 .../install-libraries/install-libraries.component.ts           |  5 +++++
 .../app/resources/resources-grid/resources-grid.component.html |  2 +-
 .../app/resources/resources-grid/resources-grid.component.ts   |  4 ++++
 15 files changed, 46 insertions(+), 28 deletions(-)


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