[incubator-dlab] branch DLAB-1940 created (now 6c7a0cf)

2020-07-13 Thread lfrolov
This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a change to branch DLAB-1940
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git.


  at 6c7a0cf  [DLAB-1940]: added check of endpoint name during AMI 
deregistering

This branch includes the following new commits:

 new 6c7a0cf  [DLAB-1940]: added check of endpoint name during AMI 
deregistering

The 1 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-unsubscr...@dlab.apache.org
For additional commands, e-mail: commits-h...@dlab.apache.org



[incubator-dlab] 01/01: [DLAB-1940]: added check of endpoint name during AMI deregistering

2020-07-13 Thread lfrolov
This is an automated email from the ASF dual-hosted git repository.

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

commit 6c7a0cfa0b49b6f0ff1ed70a58ed1470c4725008
Author: leonidfrolov 
AuthorDate: Mon Jul 13 19:14:57 2020 +0300

[DLAB-1940]: added check of endpoint name during AMI deregistering
---
 .../src/general/scripts/aws/project_terminate.py  | 6 +++---
 .../src/general/scripts/azure/project_terminate.py| 8 
 .../src/general/scripts/gcp/project_terminate.py  | 2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git 
a/infrastructure-provisioning/src/general/scripts/aws/project_terminate.py 
b/infrastructure-provisioning/src/general/scripts/aws/project_terminate.py
index 3495b13..9243ff5 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/project_terminate.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/project_terminate.py
@@ -34,7 +34,7 @@ import boto3
 import requests
 
 
-def terminate_edge_node(tag_name, project_name, tag_value, nb_sg, edge_sg, 
de_sg, emr_sg, endpoint_name):
+def terminate_edge_node(tag_name, project_name, tag_value, nb_sg, edge_sg, 
de_sg, emr_sg, endpoint_name, service_base_name):
 print('Terminating EMR cluster')
 try:
 clusters_list = dlab.meta_lib.get_emr_list(tag_name)
@@ -77,7 +77,7 @@ def terminate_edge_node(tag_name, project_name, tag_value, 
nb_sg, edge_sg, de_sg
 
 print("Deregistering project specific notebook's AMI")
 try:
-dlab.actions_lib.deregister_image(project_name)
+
dlab.actions_lib.deregister_image('{}-{}-{}-*'.format(service_base_name, 
project_name, endpoint_name))
 except Exception as err:
 dlab.fab.append_result("Failed to deregister images.", str(err))
 sys.exit(1)
@@ -140,7 +140,7 @@ if __name__ == "__main__":
 try:
 terminate_edge_node(project_conf['tag_name'], 
project_conf['project_name'], project_conf['tag_value'],
 project_conf['nb_sg'], 
project_conf['edge_sg'], project_conf['de_sg'],
-project_conf['emr_sg'], 
project_conf['endpoint_name'])
+project_conf['emr_sg'], 
project_conf['endpoint_name'], project_conf['service_base_name'])
 except Exception as err:
 traceback.print_exc()
 dlab.fab.append_result("Failed to terminate project.", str(err))
diff --git 
a/infrastructure-provisioning/src/general/scripts/azure/project_terminate.py 
b/infrastructure-provisioning/src/general/scripts/azure/project_terminate.py
index 765959f..a78480c 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/project_terminate.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/project_terminate.py
@@ -33,7 +33,7 @@ import requests
 import traceback
 
 
-def terminate_edge_node(resource_group_name, service_base_name, project_tag, 
subnet_name, vpc_name):
+def terminate_edge_node(resource_group_name, service_base_name, project_tag, 
subnet_name, vpc_name, endpoint_name):
 print("Terminating EDGE, notebook and dataengine virtual machines")
 try:
 for vm in 
AzureMeta.compute_client.virtual_machines.list(resource_group_name):
@@ -115,8 +115,8 @@ def terminate_edge_node(resource_group_name, 
service_base_name, project_tag, sub
 print("Removing project specific images")
 try:
 for image in AzureMeta.list_images():
-if service_base_name == image.tags["SBN"] and 'project_tag' in 
image.tags \
-and project_tag == image.tags["project_tag"]:
+if service_base_name == image.tags["SBN"] and project_tag == 
image.tags["project_tag"] \
+and endpoint_name == image.tags["endpoint_tag"]:
 AzureActions.remove_image(resource_group_name, image.name)
 print("Image {} has been removed".format(image.name))
 except Exception as err:
@@ -174,7 +174,7 @@ if __name__ == "__main__":
 try:
 terminate_edge_node(project_conf['resource_group_name'], 
project_conf['service_base_name'],
 project_conf['project_tag'], 
project_conf['private_subnet_name'],
-project_conf['vpc_name'])
+project_conf['vpc_name'], 
project_conf['endpoint_name'])
 except Exception as err:
 traceback.print_exc()
 dlab.fab.append_result("Failed to terminate edge.", str(err))
diff --git 
a/infrastructure-provisioning/src/general/scripts/gcp/project_terminate.py 
b/infrastructure-provisioning/src/general/scripts/gcp/project_terminate.py
index 96c021d..3d795e0 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/project_terminate.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/project_terminate.py
@@ -89,7 +89,7 @@ def 

[incubator-dlab] branch DLAB-1748 updated: [DLAB-1748]: made some changes for r pkg installation

2020-07-13 Thread lfrolov
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1748 by this push:
 new 9ab3b43  [DLAB-1748]: made some changes for r pkg installation
9ab3b43 is described below

commit 9ab3b43ed7d435ecd34c10ef0dd57c6ca818851d
Author: leonidfrolov 
AuthorDate: Mon Jul 13 18:57:57 2020 +0300

[DLAB-1748]: made some changes for r pkg installation
---
 .../src/general/lib/os/fab.py  | 58 +++---
 1 file changed, 28 insertions(+), 30 deletions(-)

diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py 
b/infrastructure-provisioning/src/general/lib/os/fab.py
index 6973d6b..595d427 100644
--- a/infrastructure-provisioning/src/general/lib/os/fab.py
+++ b/infrastructure-provisioning/src/general/lib/os/fab.py
@@ -87,7 +87,8 @@ def install_pip_pkg(requisites, pip_version, lib_group):
 version = \
 [i for i in ver if pip_pkg.split("==")[0].lower() in 
i][0].split(
 '==')[1]
-dep = sudo('cat /tmp/tee.tmp | grep "Installing collected 
packages: "').replace('\r\n', '').strip()[31:]
+sudo('if grep -w -i -E  "Installing collected packages:" 
/tmp/tee.tmp > /tmp/{0}install_{1}.log; then  echo "" > 
/tmp/{0}install_{1}.log;fi'.format(pip_version, pip_pkg))
+dep = sudo('cat /tmp/{0}install_{1}.list'.format(pip_version, 
pip_pkg)).replace('\r\n', '').strip()[31:]
 if dep == '' or dep == pip_pkg.split("==")[0]:
 dep = []
 else:
@@ -401,52 +402,49 @@ def ensure_ciphers():
 
 def install_r_pkg(requisites):
 status = list()
-error_parser = "ERROR:|error:|Cannot|failed|Please run|requires|Error"
+error_parser = "ERROR:|error:|Cannot|failed|Please 
run|requires|Error|Skipping"
 try:
 for r_pkg in requisites:
-if r_pkg[1] == '':
-r_pkg = pip_pkg[0]
-if r_pkg == 'sparklyr':
+name, vers = r_pkg
+if vers == '':
+if name == 'sparklyr':
 run('sudo -i R -e \'install.packages("{0}", 
repos="https://cloud.r-project.org;, dep=TRUE)\' 2>&1 | '
-'tee /tmp/tee.tmp; if ! grep -w -E  "({1})" 
/tmp/tee.tmp > /tmp/install_{0}.log; then  echo "" >'
-' /tmp/install_{0}.log;fi'.format(r_pkg, error_parser))
+'tee /tmp/tee.tmp; if ! grep -w -E  "({1})" 
/tmp/tee.tmp > /tmp/install_{0}.log; then  echo "" > 
/tmp/install_{0}.log;fi'.format(name, error_parser))
 else:
 sudo('R -e \'install.packages("{0}", 
repos="https://cloud.r-project.org;, dep=TRUE)\' 2>&1 | '
- 'tee /tmp/tee.tmp; if ! grep -w -E  "({1})" 
/tmp/tee.tmp >  /tmp/install_{0}.log; then  echo "" >'
- ' /tmp/install_{0}.log;fi'.format(r_pkg, 
error_parser))
+ 'tee /tmp/tee.tmp; if ! grep -w -E  "({1})" 
/tmp/tee.tmp >  /tmp/install_{0}.log; then  echo "" > 
/tmp/install_{0}.log;fi'.format(name, error_parser))
 else:
-if r_pkg == 'sparklyr':
-run('sudo -i R -e \'devtools::install_version("{0}", 
version = "{1}", repos = "http://cran.us.r-project.org;, '
-'dep=TRUE)\' 2>&1 | tee /tmp/tee.tmp; if ! grep -w -E  
"({2})" /tmp/tee.tmp > /tmp/install_{0}.log; '
-'then  echo "" > 
/tmp/install_{0}.log;fi'.format(r_pkg[0], r_pkg[1], error_parser))
+if name == 'sparklyr':
+run('sudo -i R -e \'devtools::install_version("{0}", 
version = "{1}", repos = "http://cran.us.r-project.org;, dep=TRUE)\' 2>&1 | '
+'tee /tmp/tee.tmp; if ! grep -w -E  "({2})" 
/tmp/tee.tmp > /tmp/install_{0}.log; then  echo "" > 
/tmp/install_{0}.log;fi'.format(name, vers, error_parser))
 else:
-sudo('R -e \'devtools::install_version("{0}", version = 
"{1}", repos = "http://cran.us.r-project.org;, '
- 'dep=TRUE)\' 2>&1 | tee /tmp/tee.tmp; if ! grep -w -E 
 "({2})" /tmp/tee.tmp > /tmp/install_{0}.log; '
- 'then  echo "" > 
/tmp/install_{0}.log;fi'.format(r_pkg[0], r_pkg[1], args.version))
+sudo('R -e \'devtools::install_version("{0}", version = 
"{1}", repos = "http://cran.us.r-project.org;, dep=TRUE)\' 2>&1 | '
+ 'tee /tmp/tee.tmp; if ! grep -w -E  "({2})" 
/tmp/tee.tmp > /tmp/install_{0}.log; then  echo "" > 
/tmp/install_{0}.log;fi'.format(name, vers, error_parser))
 dep = sudo('grep "(NA -> " /tmp/tee.tmp | awk \'{print 
$1}\'').replace('\r\n', ' ')
-if dep == r_pkg or dep == '':
+if dep == name or dep == '':
 

[incubator-dlab] branch develop updated: [DLAB-1934] Fixed audit issues (#819)

2020-07-13 Thread dgnatyshyn
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/develop by this push:
 new 1e7757d  [DLAB-1934] Fixed audit issues (#819)
1e7757d is described below

commit 1e7757d13feb5b73bde2de06fdb21ca3544d1f2b
Author: Dmytro Gnatyshyn <42860905+dg1...@users.noreply.github.com>
AuthorDate: Mon Jul 13 18:36:21 2020 +0300

[DLAB-1934] Fixed audit issues (#819)
---
 .../management-grid/management-grid.component.scss |  3 +++
 .../audit/audit-grid/audit-grid.component.ts   | 26 +-
 .../resources-grid/resources-grid.component.scss   |  4 ++--
 3 files changed, 20 insertions(+), 13 deletions(-)

diff --git 
a/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.scss
 
b/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.scss
index 7bde8bd..00f13e0 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.scss
+++ 
b/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.scss
@@ -19,6 +19,9 @@
 
 .data-grid {
   &.management {
+.settings{
+  min-width: 7%;
+}
 .mat-column-checkbox{
   padding-left: 10px;
   padding-right: 0px;
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/reports/audit/audit-grid/audit-grid.component.ts
 
b/services/self-service/src/main/resources/webapp/src/app/reports/audit/audit-grid/audit-grid.component.ts
index 4bb0d6c..7b112ee 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/reports/audit/audit-grid/audit-grid.component.ts
+++ 
b/services/self-service/src/main/resources/webapp/src/app/reports/audit/audit-grid/audit-grid.component.ts
@@ -115,7 +115,7 @@ export class AuditGridComponent implements OnInit {
   }
 
   public openActionInfo(element: AuditItem): void {
-if (element.type === 'GROUP' && element.info.indexOf('role') !== -1 || 
element.type === 'BUCKET') {
+if (element.type === 'GROUP' && element.info.indexOf('role') !== -1) {
   this.dialog.open(AuditInfoDialogComponent, { data: {element, dialogSize: 
'big'}, panelClass: 'modal-xl-m' });
 } else {
   this.dialog.open(AuditInfoDialogComponent, { data: {element, dialogSize: 
'small'}, panelClass: 'modal-md' });
@@ -176,12 +176,14 @@ export class AuditGridComponent implements OnInit {
   
   
   
-
+
   
+
 
   Action
Description 
 
+
 
   
 File
@@ -189,7 +191,10 @@ export class AuditGridComponent implements OnInit {
{{action[0]}}
 
 
-  
+  
 {{description}}
   
 
@@ -222,22 +227,21 @@ export class AuditGridComponent implements OnInit {
 
   
 
-  {{data.element.action | titlecase}} by 
scheduler.1
-
+  {{data.element.action | titlecase}} by 
scheduler.
   
-{{data.element.info}} {{data.element.resourceName}}.2
-{{data.element.info}}.
+{{data.element.info}} {{data.element.resourceName}}.
+{{data.element.info}}.
 
-  Create edge node for endpoint {{data.element.resourceName}}, requested in project {{data.element.project}}
-  .
+  Create edge node for endpoint {{data.element.resourceName}}, requested in project {{data.element.project}}.
+
   
 
 
{{data.element.action | titlecase}} by scheduler, requested for 
notebook {{data.element.info.split(' 
')[data.element.info.split(' ').length - 1] }}.
   
 
-  Follow compute {{info.cluster}}{{info.custerType}} 
link, requested for notebook {{info.notebook}}.
-  {{data.element.action | titlecase}} computational resource {{data.element.resourceName}}, requested for notebook 
{{data.element.info.split(' ')[data.element.info.split(' 
').length - 1] }}.
+  Follow compute {{info.cluster}}{{info.clusterType}} 
link, requested for notebook {{info.notebook}}.
+  {{data.element.action | titlecase}} compute {{data.element.resourceName}}, requested for notebook 
{{data.element.info.split(' ')[data.element.info.split(' 
').length - 1] }}.
   

[incubator-dlab] 01/01: [DLAB-1934] Fixed audit issues

2020-07-13 Thread dgnatyshyn
This is an automated email from the ASF dual-hosted git repository.

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

commit 479bd8035db73ce23769d23e48e03df32407d742
Author: Dmytro_Gnatyshyn 
AuthorDate: Mon Jul 13 18:33:57 2020 +0300

[DLAB-1934] Fixed audit issues
---
 .../management-grid/management-grid.component.scss |  3 +++
 .../audit/audit-grid/audit-grid.component.ts   | 26 +-
 .../resources-grid/resources-grid.component.scss   |  4 ++--
 3 files changed, 20 insertions(+), 13 deletions(-)

diff --git 
a/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.scss
 
b/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.scss
index 7bde8bd..00f13e0 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.scss
+++ 
b/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.scss
@@ -19,6 +19,9 @@
 
 .data-grid {
   &.management {
+.settings{
+  min-width: 7%;
+}
 .mat-column-checkbox{
   padding-left: 10px;
   padding-right: 0px;
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/reports/audit/audit-grid/audit-grid.component.ts
 
b/services/self-service/src/main/resources/webapp/src/app/reports/audit/audit-grid/audit-grid.component.ts
index 4bb0d6c..7b112ee 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/reports/audit/audit-grid/audit-grid.component.ts
+++ 
b/services/self-service/src/main/resources/webapp/src/app/reports/audit/audit-grid/audit-grid.component.ts
@@ -115,7 +115,7 @@ export class AuditGridComponent implements OnInit {
   }
 
   public openActionInfo(element: AuditItem): void {
-if (element.type === 'GROUP' && element.info.indexOf('role') !== -1 || 
element.type === 'BUCKET') {
+if (element.type === 'GROUP' && element.info.indexOf('role') !== -1) {
   this.dialog.open(AuditInfoDialogComponent, { data: {element, dialogSize: 
'big'}, panelClass: 'modal-xl-m' });
 } else {
   this.dialog.open(AuditInfoDialogComponent, { data: {element, dialogSize: 
'small'}, panelClass: 'modal-md' });
@@ -176,12 +176,14 @@ export class AuditGridComponent implements OnInit {
   
   
   
-
+
   
+
 
   Action
Description 
 
+
 
   
 File
@@ -189,7 +191,10 @@ export class AuditGridComponent implements OnInit {
{{action[0]}}
 
 
-  
+  
 {{description}}
   
 
@@ -222,22 +227,21 @@ export class AuditGridComponent implements OnInit {
 
   
 
-  {{data.element.action | titlecase}} by 
scheduler.1
-
+  {{data.element.action | titlecase}} by 
scheduler.
   
-{{data.element.info}} {{data.element.resourceName}}.2
-{{data.element.info}}.
+{{data.element.info}} {{data.element.resourceName}}.
+{{data.element.info}}.
 
-  Create edge node for endpoint {{data.element.resourceName}}, requested in project {{data.element.project}}
-  .
+  Create edge node for endpoint {{data.element.resourceName}}, requested in project {{data.element.project}}.
+
   
 
 
{{data.element.action | titlecase}} by scheduler, requested for 
notebook {{data.element.info.split(' 
')[data.element.info.split(' ').length - 1] }}.
   
 
-  Follow compute {{info.cluster}}{{info.custerType}} 
link, requested for notebook {{info.notebook}}.
-  {{data.element.action | titlecase}} computational resource {{data.element.resourceName}}, requested for notebook 
{{data.element.info.split(' ')[data.element.info.split(' 
').length - 1] }}.
+  Follow compute {{info.cluster}}{{info.clusterType}} 
link, requested for notebook {{info.notebook}}.
+  {{data.element.action | titlecase}} compute {{data.element.resourceName}}, requested for notebook 
{{data.element.info.split(' ')[data.element.info.split(' 
').length - 1] }}.
 
 
 
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.scss
 

[incubator-dlab] branch DLAB_1934 created (now 479bd80)

2020-07-13 Thread dgnatyshyn
This is an automated email from the ASF dual-hosted git repository.

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


  at 479bd80  [DLAB-1934] Fixed audit issues

This branch includes the following new commits:

 new 479bd80  [DLAB-1934] Fixed audit issues

The 1 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-unsubscr...@dlab.apache.org
For additional commands, e-mail: commits-h...@dlab.apache.org



[incubator-dlab] branch DLAB-515 updated: [DLAB-515] - [AWS] EMR kernels connection via sparkmagic/livy fixed

2020-07-13 Thread mykolabodnar
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-515 by this push:
 new 8b86370  [DLAB-515] - [AWS] EMR kernels connection via sparkmagic/livy 
fixed
8b86370 is described below

commit 8b86370d49076134bf26662a10fb94eaf1b0deea
Author: bodnarmykola 
AuthorDate: Mon Jul 13 17:27:38 2020 +0300

[DLAB-515] - [AWS] EMR kernels connection via sparkmagic/livy fixed
---
 .../jupyter_dataengine-service_create_configs.py   | 42 ++
 .../jupyter_install_dataengine-service_kernels.py  | 19 ++
 2 files changed, 40 insertions(+), 21 deletions(-)

diff --git 
a/infrastructure-provisioning/src/general/scripts/aws/jupyter_dataengine-service_create_configs.py
 
b/infrastructure-provisioning/src/general/scripts/aws/jupyter_dataengine-service_create_configs.py
index 46cda9c..9a95b71 100644
--- 
a/infrastructure-provisioning/src/general/scripts/aws/jupyter_dataengine-service_create_configs.py
+++ 
b/infrastructure-provisioning/src/general/scripts/aws/jupyter_dataengine-service_create_configs.py
@@ -53,6 +53,7 @@ parser.add_argument('--pip_mirror', type=str, default='')
 parser.add_argument('--numpy_version', type=str, default='')
 parser.add_argument('--application', type=str, default='')
 parser.add_argument('--master_ip', type=str, default='')
+parser.add_argument('--python_version', type=str, default='')
 args = parser.parse_args()
 
 emr_dir = '/opt/' + args.emr_version + '/jars/'
@@ -170,10 +171,23 @@ def install_sparkamagic_kernels(args):
 local('sudo jupyter-kernelspec install 
{}/sparkmagic/kernels/sparkkernel --user'.format(sparkmagic_dir))
 local('sudo jupyter-kernelspec install 
{}/sparkmagic/kernels/pysparkkernel --user'.format(sparkmagic_dir))
 local('sudo jupyter-kernelspec install 
{}/sparkmagic/kernels/sparkrkernel --user'.format(sparkmagic_dir))
+pyspark_kernel_name = 'PySpark (Python-{0} / Spark-{1} ) 
[{2}]'.format(args.python_version, args.spark_version,
+ 
args.cluster_name)
+local('sed -i \'s|PySpark|{0}|g\' 
/home/{1}/.local/share/jupyter/kernels/pysparkkernel/kernel.json'.format(
+pyspark_kernel_name, args.os_user))
+spark_kernel_name = 'PySpark (Scala-{0} / Spark-{1} ) 
[{2}]'.format(args.scala_version, args.spark_version,
+ 
args.cluster_name)
+local('sed -i \'s|Spark|{0}|g\' 
/home/{1}/.local/share/jupyter/kernels/sparkkernel/kernel.json'.format(
+spark_kernel_name, args.os_user))
+sparkr_kernel_name = 'SparkR (R-{0} / Spark-{1} ) 
[{2}]'.format(args.r_version, args.spark_version,
+
args.cluster_name)
+local('sed -i \'s|SparkR|{0}|g\' 
/home/{1}/.local/share/jupyter/kernels/sparkrkernel/kernel.json'.format(
+sparkr_kernel_name, args.os_user))
 local('mkdir -p /home/' + args.os_user + '/.sparkmagic')
 local('cp -f /tmp/sparkmagic_config_template.json /home/' + 
args.os_user + '/.sparkmagic/config.json')
 local('sed -i \'s|LIVY_HOST|{0}|g\' 
/home/{1}/.sparkmagic/config.json'.format(
 args.master_ip, args.os_user))
+local('sudo chown -R {0}:{0} 
/home/{0}/.sparkmagic/'.format(args.os_user))
 except:
 sys.exit(1)
 
@@ -184,17 +198,17 @@ if __name__ == "__main__":
 parser.print_help()
 else:
 install_sparkamagic_kernels(args)
-result = prepare(emr_dir, yarn_dir)
-if result == False :
-jars(args, emr_dir)
-yarn(args, yarn_dir)
-install_emr_spark(args)
-pyspark_kernel(kernels_dir, args.emr_version, args.cluster_name, 
args.spark_version, args.bucket,
-   args.project_name, args.region, args.os_user, 
args.application, args.pip_mirror, args.numpy_version)
-toree_kernel(args)
-if args.r_version != 'false':
-print('R version: {}'.format(args.r_version))
-r_kernel(args)
-spark_defaults(args)
-configuring_notebook(args.emr_version)
-add_breeze_library_emr(args)
+#result = prepare(emr_dir, yarn_dir)
+#if result == False :
+#jars(args, emr_dir)
+#yarn(args, yarn_dir)
+#install_emr_spark(args)
+#pyspark_kernel(kernels_dir, args.emr_version, args.cluster_name, 
args.spark_version, args.bucket,
+#   args.project_name, args.region, args.os_user, 
args.application, args.pip_mirror, args.numpy_version)
+#toree_kernel(args)
+#if args.r_version != 'false':
+#print('R version: {}'.format(args.r_version))
+#r_kernel(args)
+#spark_defaults(args)
+   

[incubator-dlab] branch DLAB-1749 updated (6737547 -> 507cb3d)

2020-07-13 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

ofuks pushed a change to branch DLAB-1749
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git.


from 6737547  [DLAB-1749] BE support library installation of particular 
version
 add 9d5dbc5  [DLAB-1919]First part of audit changes
 add 4ef5ba3  [DLAB-1919] Second part of changes
 add c03a9c1  Added log for opening terminal(UI)
 add 9c1384b  [DLAB-1924]:Implemented UI changes for scheduler (#814)
 add c873985  Merge remote-tracking branch 'origin/develop' into develop
 add 70f2594  [DLAB-1925] Change total instance number for EMR, fixed 
billing on resource (#815)
 add 1d9fc97  [DLAB-1921] Fixed creation Group defect (#813)
 add ca3f908  [DLAB-1929] Allowed only one active Data Engine Service per 
notebook (#816)
 new 507cb3d  Merge branch 'develop' into DLAB-1749

The 1 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.


Summary of changes:
 .../com/epam/dlab/backendapi/dao/AuditDAOImpl.java |  7 ++
 .../dlab/backendapi/domain/AuditActionEnum.java|  2 +-
 .../dlab/backendapi/domain/AuditCreateDTO.java |  2 +
 .../backendapi/domain/AuditResourceTypeEnum.java   |  3 +-
 .../backendapi/resources/UserGroupResource.java|  2 +-
 .../dlab/backendapi/resources/dto/GroupDTO.java|  3 +-
 .../backendapi/service/ExploratoryService.java |  2 +
 .../backendapi/service/impl/AuditServiceImpl.java  |  3 +-
 .../service/impl/ComputationalServiceImpl.java | 41 ++-
 .../service/impl/EndpointServiceImpl.java  |  8 +--
 .../service/impl/ExploratoryServiceImpl.java   | 58 +++-
 .../service/impl/ProjectServiceImpl.java   | 53 +++---
 .../service/impl/SchedulerJobServiceImpl.java  | 40 +--
 .../administration/project/project-data.service.ts | 13 ++--
 .../project-list/project-list.component.html   |  4 +-
 .../cluster-details/cluster-details.component.html |  5 +-
 ...utational-resource-create-dialog.component.html |  2 +-
 ...mputational-resource-create-dialog.component.ts |  7 +-
 .../resources-grid/resources-grid.component.html   |  4 +-
 .../resources-grid/resources-grid.component.ts |  6 ++
 .../resources/scheduler/scheduler.component.html   | 13 ++--
 .../app/resources/scheduler/scheduler.component.ts |  9 +--
 .../notification-dialog.component.ts   | 17 ++---
 .../src/app/shared/navbar/navbar.component.scss|  4 ++
 .../resources/ImageExploratoryResourceTest.java|  2 +-
 .../resources/UserGroupResourceTest.java   |  8 +--
 .../service/impl/ExploratoryServiceImplTest.java   | 32 -
 .../service/impl/SchedulerJobServiceImplTest.java  | 80 +++---
 28 files changed, 243 insertions(+), 187 deletions(-)


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



[incubator-dlab] 01/01: Merge branch 'develop' into DLAB-1749

2020-07-13 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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

commit 507cb3da25cb226ffc087d4be6d4cfe2fd513a81
Merge: 6737547 ca3f908
Author: Oleh Fuks 
AuthorDate: Mon Jul 13 17:25:39 2020 +0300

Merge branch 'develop' into DLAB-1749

 .../com/epam/dlab/backendapi/dao/AuditDAOImpl.java |  7 ++
 .../dlab/backendapi/domain/AuditActionEnum.java|  2 +-
 .../dlab/backendapi/domain/AuditCreateDTO.java |  2 +
 .../backendapi/domain/AuditResourceTypeEnum.java   |  3 +-
 .../backendapi/resources/UserGroupResource.java|  2 +-
 .../dlab/backendapi/resources/dto/GroupDTO.java|  3 +-
 .../backendapi/service/ExploratoryService.java |  2 +
 .../backendapi/service/impl/AuditServiceImpl.java  |  3 +-
 .../service/impl/ComputationalServiceImpl.java | 41 ++-
 .../service/impl/EndpointServiceImpl.java  |  8 +--
 .../service/impl/ExploratoryServiceImpl.java   | 58 +++-
 .../service/impl/ProjectServiceImpl.java   | 53 +++---
 .../service/impl/SchedulerJobServiceImpl.java  | 40 +--
 .../administration/project/project-data.service.ts | 13 ++--
 .../project-list/project-list.component.html   |  4 +-
 .../cluster-details/cluster-details.component.html |  5 +-
 ...utational-resource-create-dialog.component.html |  2 +-
 ...mputational-resource-create-dialog.component.ts |  7 +-
 .../resources-grid/resources-grid.component.html   |  4 +-
 .../resources-grid/resources-grid.component.ts |  6 ++
 .../resources/scheduler/scheduler.component.html   | 13 ++--
 .../app/resources/scheduler/scheduler.component.ts |  9 +--
 .../notification-dialog.component.ts   | 17 ++---
 .../src/app/shared/navbar/navbar.component.scss|  4 ++
 .../resources/ImageExploratoryResourceTest.java|  2 +-
 .../resources/UserGroupResourceTest.java   |  8 +--
 .../service/impl/ExploratoryServiceImplTest.java   | 32 -
 .../service/impl/SchedulerJobServiceImplTest.java  | 80 +++---
 28 files changed, 243 insertions(+), 187 deletions(-)


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



[incubator-dlab] branch DLAB-1749 updated: [DLAB-1749] BE support library installation of particular version

2020-07-13 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1749 by this push:
 new 6737547  [DLAB-1749] BE support library installation of particular 
version
6737547 is described below

commit 67375474d8bc94440e6e43e8abd22c94c1d7c2d9
Author: Oleh Fuks 
AuthorDate: Mon Jul 13 17:24:20 2020 +0300

[DLAB-1749] BE support library installation of particular version
---
 .../main/java/com/epam/dlab/backendapi/dao/ExploratoryLibDAO.java   | 4 ++--
 .../java/com/epam/dlab/backendapi/resources/dto/LibraryStatus.java  | 6 ++
 .../com/epam/dlab/backendapi/service/impl/LibraryServiceImpl.java   | 4 +++-
 .../epam/dlab/backendapi/service/impl/LibraryServiceImplTest.java   | 4 ++--
 4 files changed, 13 insertions(+), 5 deletions(-)

diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ExploratoryLibDAO.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ExploratoryLibDAO.java
index 9842673..7fbb47a 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ExploratoryLibDAO.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ExploratoryLibDAO.java
@@ -59,10 +59,10 @@ public class ExploratoryLibDAO extends BaseDAO {
public static final String LIB_GROUP = "group";
public static final String LIB_NAME = "name";
public static final String LIB_VERSION = "version";
+   public static final String LIB_AVAILABLE_VERSION = "available_versions";
+   public static final String LIB_ADDED_PACKAGES = "add_pkgs";
private static final String LIB_INSTALL_DATE = "install_date";
private static final String LIB_ERROR_MESSAGE = "error_message";
-   private static final String LIB_AVAILABLE_VERSION = 
"available_versions";
-   private static final String LIB_ADDED_PACKAGES = "add_pkgs";
private static final String COMPUTATIONAL_NAME_FIELD = 
"computational_name";
 
/**
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibraryStatus.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibraryStatus.java
index cec0306..eb70c20 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibraryStatus.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibraryStatus.java
@@ -25,6 +25,8 @@ import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
+import java.util.List;
+
 @Data
 @AllArgsConstructor
 @NoArgsConstructor
@@ -38,4 +40,8 @@ public class LibraryStatus {
 private String status;
 @JsonProperty
 private String error;
+@JsonProperty("available_versions")
+private List availableVersions;
+@JsonProperty("add_pkgs")
+private List addedPackages;
 }
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/LibraryServiceImpl.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/LibraryServiceImpl.java
index 87bd5d4..70b5b16 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/LibraryServiceImpl.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/LibraryServiceImpl.java
@@ -238,6 +238,8 @@ public class LibraryServiceImpl implements LibraryService {
String version = 
document.getString(ExploratoryLibDAO.LIB_VERSION);
String group = document.getString(ExploratoryLibDAO.LIB_GROUP);
String status = document.getString(ExploratoryLibDAO.STATUS);
+   List availableVersions = (List) 
document.get(ExploratoryLibDAO.LIB_AVAILABLE_VERSION);
+   List addedPackages = (List) 
document.get(ExploratoryLibDAO.LIB_ADDED_PACKAGES);
String error = 
document.getString(ExploratoryLibDAO.ERROR_MESSAGE);
 
LibKey libKey = new LibKey(name, version, group);
@@ -247,7 +249,7 @@ public class LibraryServiceImpl implements LibraryService {
model.put(libKey, statuses);
}
 
-   statuses.add(new LibraryStatus(exploratoryName, resourceType, 
status, error));
+   statuses.add(new LibraryStatus(exploratoryName, resourceType, 
status, error, availableVersions, addedPackages));
}
 
@SuppressWarnings("unchecked")
diff --git 
a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/LibraryServiceImplTest.java
 
b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/LibraryServiceImplTest.java
index f926b17..76d2360 100644
--- 
a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/LibraryServiceImplTest.java
+++ 

[incubator-dlab] 01/03: [DLAB-1750] Added validation for existing and installed libs

2020-07-13 Thread dgnatyshyn
This is an automated email from the ASF dual-hosted git repository.

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

commit e2e5f74412e3dfd74689135638d8102b532a69db
Author: Dmytro_Gnatyshyn 
AuthorDate: Mon Jul 13 16:13:21 2020 +0300

[DLAB-1750] Added validation for existing and installed libs
---
 .../exploratory/install-libraries/install-libraries.component.html | 2 +-
 .../exploratory/install-libraries/install-libraries.component.ts   | 3 ---
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git 
a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html
 
b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html
index c4c96b0..285014d 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html
+++ 
b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html
@@ -73,7 +73,7 @@
 
   
   {{ 
item.name }}
-
+{{ item.version }}
   
 
   selected
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
 
b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
index ea50a7d..063e406 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
+++ 
b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
@@ -189,7 +189,6 @@ export class InstallLibrariesComponent implements OnInit, 
OnDestroy {
 
   public addLibrary(item): void {
 const lib = item.split(':').filter(v => !!v);
-console.log(lib);
 this.model.selectedLibs.push({ group: this.group, name: lib[0], version: 
lib[1] || 'N/A' });
 this.query = '';
 this.libSearch.setValue('');
@@ -315,7 +314,6 @@ export class InstallLibrariesComponent implements OnInit, 
OnDestroy {
 } else {
   this.model.getLibrariesList(this.group, this.query)
 .subscribe(libs => {
-  console.log(libs);
   this.filteredList = libs;
 });
 }
@@ -375,7 +373,6 @@ export class InstallLibrariesComponent implements OnInit, 
OnDestroy {
   }
 
   showlibinfo(lib: any) {
-console.log(lib);
 this.isLibInfoOpened[lib.name] = !this.isLibInfoOpened[lib.name];
   }
 }


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



[incubator-dlab] 02/03: Merge branch 'DLAB-1749' of github.com:apache/incubator-dlab into DLAB-1749

2020-07-13 Thread dgnatyshyn
This is an automated email from the ASF dual-hosted git repository.

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

commit a45f5aced953c7932d46eb61153358fd5a172223
Merge: e2e5f74 a4ce996
Author: Dmytro_Gnatyshyn 
AuthorDate: Mon Jul 13 16:14:04 2020 +0300

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

 .../epam/dlab/dto/exploratory/LibInstallDTO.java   |  2 +-
 .../dlab/backendapi/dao/ExploratoryLibDAO.java | 38 +++---
 2 files changed, 35 insertions(+), 5 deletions(-)


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



[incubator-dlab] branch DLAB-1749 updated (a4ce996 -> cdecfd1)

2020-07-13 Thread dgnatyshyn
This is an automated email from the ASF dual-hosted git repository.

dgnatyshyn pushed a change to branch DLAB-1749
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git.


from a4ce996  [DLAB-1749] BE support library installation of particular 
version
 new e2e5f74  [DLAB-1750] Added validation for existing and installed libs
 new a45f5ac  Merge branch 'DLAB-1749' of github.com:apache/incubator-dlab 
into DLAB-1749
 new cdecfd1  [DLAB-1750] Added validation for existing and installed libs

The 3 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.


Summary of changes:
 .../install-libraries/install-libraries.component.html  | 12 ++--
 .../install-libraries/install-libraries.component.scss  |  7 ++-
 .../install-libraries/install-libraries.component.ts| 17 ++---
 .../install-libraries/install-libraries.model.ts|  2 +-
 4 files changed, 27 insertions(+), 11 deletions(-)


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



[incubator-dlab] 03/03: [DLAB-1750] Added validation for existing and installed libs

2020-07-13 Thread dgnatyshyn
This is an automated email from the ASF dual-hosted git repository.

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

commit cdecfd13ebe2d02e5b4880dacc5833046fae2f38
Author: Dmytro_Gnatyshyn 
AuthorDate: Mon Jul 13 16:30:02 2020 +0300

[DLAB-1750] Added validation for existing and installed libs
---
 .../install-libraries/install-libraries.component.html | 10 +-
 .../install-libraries/install-libraries.component.scss |  7 ++-
 .../install-libraries/install-libraries.component.ts   | 14 ++
 .../install-libraries/install-libraries.model.ts   |  2 +-
 4 files changed, 26 insertions(+), 7 deletions(-)

diff --git 
a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html
 
b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html
index 285014d..409faeb 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html
+++ 
b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html
@@ -62,7 +62,15 @@
 [value]="query"
 [matAutocomplete]="auto"
   >
-  add
+  
+
+  add
+
+  
 
   
 
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.scss
 
b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.scss
index b87846d..55b68d8 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.scss
+++ 
b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.scss
@@ -158,8 +158,13 @@ ul.resources{
 }
 
 .add-icon{
-  margin-right: 10px;
   cursor: pointer;
+  position: absolute;
+  top: -13px;
+  right: 10px;
+  .mat-icon{
+font-size: 24px;
+  }
 }
 
 .search-box {
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
 
b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
index 063e406..a3af674 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
+++ 
b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
@@ -29,6 +29,11 @@ import { LibrariesInstallationService } from 
'../../../core/services';
 import { SortUtils, HTTP_STATUS_CODES } from '../../../core/util';
 import {FilterLibsModel} from './filter-libs.model';
 
+interface Library {
+  name: string;
+  version: string;
+}
+
 
 @Component({
   selector: 'install-libraries',
@@ -77,6 +82,7 @@ export class InstallLibrariesComponent implements OnInit, 
OnDestroy {
   @ViewChild('groupSelect', { static: false }) group_select;
   @ViewChild('resourceSelect', { static: false }) resource_select;
   public isLibInfoOpened = {  };
+  private isLibExist: boolean;
 
   constructor(
 @Inject(MAT_DIALOG_DATA) public data: any,
@@ -91,14 +97,12 @@ export class InstallLibrariesComponent implements OnInit, 
OnDestroy {
 
   ngOnInit() {
 this.open(this.data);
-this.uploadLibGroups();
 this.libSearch.valueChanges.pipe(
   debounceTime(1000))
   .subscribe(newValue => {
 this.query = newValue || '';
 this.filterList();
   });
-this.getInstalledLibsByResource();
   }
 
   ngOnDestroy() {
@@ -161,7 +165,6 @@ export class InstallLibrariesComponent implements OnInit, 
OnDestroy {
   this.destination && this.destination.type === 'СOMPUTATIONAL'
 ? this.model.computational_name = this.destination.name
 : this.model.computational_name = null;
-
   this.uploadLibGroups();
   this.getInstalledLibsByResource();
 }
@@ -313,7 +316,10 @@ export class InstallLibrariesComponent implements OnInit, 
OnDestroy {
   });
 } else {
   this.model.getLibrariesList(this.group, this.query)
-.subscribe(libs => {
+.subscribe((libs: Library[]) => {
+  console.log('libs', libs);
+  console.log(this.query.slice(0, this.query.indexOf(':')));
+  this.isLibExist = libs.some(v => v.name === this.query.slice(0, 
this.query.indexOf(':')));
   this.filteredList = libs;
 });
 }
diff --git 

[incubator-dlab] branch develop updated: [DLAB-1918] Empty Budget values (#817)

2020-07-13 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/develop by this push:
 new f2cb252  [DLAB-1918] Empty Budget values (#817)
f2cb252 is described below

commit f2cb252b2009f1f486fe7e7ac201cd2ba5e4da8e
Author: Pavel Papou <61992304+ppapou-c...@users.noreply.github.com>
AuthorDate: Mon Jul 13 09:47:21 2020 -0400

[DLAB-1918] Empty Budget values (#817)

[DLAB-1918] Empty Budget values
---
 .../java/com/epam/dlab/backendapi/service/impl/ProjectServiceImpl.java   | 1 -
 1 file changed, 1 deletion(-)

diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ProjectServiceImpl.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ProjectServiceImpl.java
index 530784a..a6a51bf 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ProjectServiceImpl.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ProjectServiceImpl.java
@@ -224,7 +224,6 @@ public class ProjectServiceImpl implements ProjectService {
 public void updateBudget(UserInfo userInfo, List 
dtos) {
final List projects = dtos
.stream()
-   .filter(dto -> Objects.nonNull(dto.getBudget()))
.map(this::getUpdateProjectDTO)
.collect(Collectors.toList());
 


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



[incubator-dlab] branch DLAB-515 updated: Update fab.py

2020-07-13 Thread mykolabodnar
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-515 by this push:
 new 9b5f77a  Update fab.py
9b5f77a is described below

commit 9b5f77a21531bfd7e09e7172fb501e214d4a7c77
Author: bodnarmykola <46999086+bodnarmyk...@users.noreply.github.com>
AuthorDate: Mon Jul 13 16:41:58 2020 +0300

Update fab.py

fab.py fixed
---
 infrastructure-provisioning/src/general/lib/os/fab.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py 
b/infrastructure-provisioning/src/general/lib/os/fab.py
index 2acb5f8..d693f4d 100644
--- a/infrastructure-provisioning/src/general/lib/os/fab.py
+++ b/infrastructure-provisioning/src/general/lib/os/fab.py
@@ -181,9 +181,9 @@ def configure_jupyter(os_user, jupyter_conf_file, 
templates_dir, jupyter_version
 http_proxy = run('echo $http_proxy')
 https_proxy = run('echo $https_proxy')
 #sudo('sed -i \'/\[Service\]/ a\Environment=\"HTTP_PROXY={}\"\'  
/tmp/jupyter-notebook.service'.format(
-http_proxy))
+#http_proxy))
 #sudo('sed -i \'/\[Service\]/ a\Environment=\"HTTPS_PROXY={}\"\'  
/tmp/jupyter-notebook.service'.format(
-https_proxy))
+#https_proxy))
 java_home = run("update-alternatives --query java | grep -o 
\'/.*/java-8.*/jre\'").splitlines()[0]
 sudo('sed -i \'/\[Service\]/ a\Environment=\"JAVA_HOME={}\"\'  
/tmp/jupyter-notebook.service'.format(
 java_home))
@@ -918,4 +918,4 @@ def manage_npm_pkg(command):
 npm_count += 1
 time.sleep(50)
 except:
-sys.exit(1)
\ No newline at end of file
+sys.exit(1)


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



[incubator-dlab] branch DLAB-1749 updated: [DLAB-1749] BE support library installation of particular version

2020-07-13 Thread ofuks
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-1749 by this push:
 new a4ce996  [DLAB-1749] BE support library installation of particular 
version
a4ce996 is described below

commit a4ce996e0ca52701c9399fab71b8f7b23565dd7f
Author: Oleh Fuks 
AuthorDate: Mon Jul 13 14:42:00 2020 +0300

[DLAB-1749] BE support library installation of particular version
---
 .../epam/dlab/dto/exploratory/LibInstallDTO.java   |  2 +-
 .../dlab/backendapi/dao/ExploratoryLibDAO.java | 38 +++---
 2 files changed, 35 insertions(+), 5 deletions(-)

diff --git 
a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/LibInstallDTO.java
 
b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/LibInstallDTO.java
index 1752560..78f6e89 100644
--- 
a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/LibInstallDTO.java
+++ 
b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/LibInstallDTO.java
@@ -55,7 +55,7 @@ public class LibInstallDTO {
private List availableVersions;
 
@JsonProperty("add_pkgs")
-   private List transitiveDependencies;
+   private List addedPackages;
 
public LibInstallDTO(String group, String name, String version) {
this.group = group;
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ExploratoryLibDAO.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ExploratoryLibDAO.java
index bcec258..9842673 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ExploratoryLibDAO.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/ExploratoryLibDAO.java
@@ -61,6 +61,8 @@ public class ExploratoryLibDAO extends BaseDAO {
public static final String LIB_VERSION = "version";
private static final String LIB_INSTALL_DATE = "install_date";
private static final String LIB_ERROR_MESSAGE = "error_message";
+   private static final String LIB_AVAILABLE_VERSION = 
"available_versions";
+   private static final String LIB_ADDED_PACKAGES = "add_pkgs";
private static final String COMPUTATIONAL_NAME_FIELD = 
"computational_name";
 
/**
@@ -204,7 +206,7 @@ public class ExploratoryLibDAO extends BaseDAO {
push(EXPLORATORY_LIBS, 
convertToBson(library)));
return true;
} else {
-   Document values = updateLibraryFields(library, null);
+   Document values = addLibraryFields(library);
if (reinstall) {

values.append(libraryFieldFilter(LIB_INSTALL_DATE), null);

values.append(libraryFieldFilter(LIB_ERROR_MESSAGE), null);
@@ -242,7 +244,7 @@ public class ExploratoryLibDAO extends BaseDAO {
push(COMPUTATIONAL_LIBS + "." + 
computationalName, convertToBson(library)));
return true;
} else {
-   Document values = 
updateComputationalLibraryFields(computationalName, library, null);
+   Document values = 
addComputationalLibraryFields(computationalName, library);
if (reinstall) {

values.append(computationalLibraryFieldFilter(computationalName, 
LIB_INSTALL_DATE), null);

values.append(computationalLibraryFieldFilter(computationalName, 
LIB_ERROR_MESSAGE), null);
@@ -313,6 +315,15 @@ public class ExploratoryLibDAO extends BaseDAO {
return and(eq(LIB_GROUP, group), eq(LIB_NAME, name));
}
 
+   private Document addLibraryFields(LibInstallDTO lib) {
+   Document values = new Document(libraryFieldFilter(STATUS), 
lib.getStatus());
+   if (lib.getVersion() != null) {
+   values.append(libraryFieldFilter(LIB_VERSION), 
lib.getVersion());
+   }
+
+   return values;
+   }
+
private Document updateLibraryFields(LibInstallDTO lib, Date uptime) {
Document values = new Document(libraryFieldFilter(STATUS), 
lib.getStatus());
if (lib.getVersion() != null) {
@@ -321,7 +332,12 @@ public class ExploratoryLibDAO extends BaseDAO {
if (uptime != null) {
values.append(libraryFieldFilter(LIB_INSTALL_DATE), 
uptime);
}
-
+   if (lib.getAvailableVersions() != null) {
+   
values.append(libraryFieldFilter(LIB_AVAILABLE_VERSION), 
lib.getAvailableVersions());
+   }
+   if (lib.getAddedPackages() != null) {
+   

[incubator-dlab] 01/03: Merge branch 'DLAB-1750' into DLAB-1749

2020-07-13 Thread dgnatyshyn
This is an automated email from the ASF dual-hosted git repository.

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

commit a9a4c9da9b89e81b9600815229d0a0c7b202c9b2
Merge: d681f82 03fd607
Author: Dmytro_Gnatyshyn 
AuthorDate: Mon Jul 13 11:00:02 2020 +0300

Merge branch 'DLAB-1750' into DLAB-1749

# Conflicts:
#   
services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/index.ts
#   
services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html
#   
services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts

 .../exploratory/install-libraries/index.ts |  6 +-
 .../install-libraries.component.html   | 44 ---
 .../install-libraries.component.scss   | 76 +-
 .../install-libraries.component.ts | 91 +-
 4 files changed, 201 insertions(+), 16 deletions(-)


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



[incubator-dlab] 03/03: [DLAB-1750] Added possibility to install lib with different version

2020-07-13 Thread dgnatyshyn
This is an automated email from the ASF dual-hosted git repository.

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

commit 18104f0daa598f11546bf758d0102dc41b186e29
Author: Dmytro_Gnatyshyn 
AuthorDate: Mon Jul 13 13:01:42 2020 +0300

[DLAB-1750] Added possibility to install lib with different version
---
 .../install-libraries/install-libraries.component.html | 17 +
 .../install-libraries/install-libraries.component.scss |  5 +
 .../install-libraries/install-libraries.component.ts   | 18 +++---
 3 files changed, 29 insertions(+), 11 deletions(-)

diff --git 
a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html
 
b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html
index 610f67f..c4c96b0 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html
+++ 
b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.html
@@ -56,23 +56,24 @@
 
   
-  search
-  
-
+  add
+
+  
+
   
 
   
 
-{{ item.version }}
+
   
   {{ 
item.name }}
-{{ item.version }}
+
   
 
   selected
@@ -84,11 +85,11 @@
 
   
 
-
+
   No matches found
 
 
-  {{ validity_format }}
+  {{ validity_format }}
 
   
 
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.scss
 
b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.scss
index d8dfe57..b87846d 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.scss
+++ 
b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.scss
@@ -157,6 +157,11 @@ ul.resources{
   font-weight: 600;
 }
 
+.add-icon{
+  margin-right: 10px;
+  cursor: pointer;
+}
+
 .search-box {
   display: flex;
   padding: 20px 25px 10px;
diff --git 
a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
 
b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
index d87805c..ea50a7d 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
+++ 
b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/install-libraries.component.ts
@@ -187,13 +187,22 @@ export class InstallLibrariesComponent implements OnInit, 
OnDestroy {
 return this.isInSelectedList || this.isInstalled;
   }
 
-  public selectLibrary(item): void {
-this.model.selectedLibs.push({ group: this.group, name: item.name, 
version: item.version });
+  public addLibrary(item): void {
+const lib = item.split(':').filter(v => !!v);
+console.log(lib);
+this.model.selectedLibs.push({ group: this.group, name: lib[0], version: 
lib[1] || 'N/A' });
 this.query = '';
 this.libSearch.setValue('');
 this.filteredList = null;
   }
 
+  public selectLibrary(item): void {
+// this.model.selectedLibs.push({ group: this.group, name: item.name, 
version: item.version });
+// this.query = '';
+this.libSearch.setValue(item.name + ':');
+this.filteredList = null;
+  }
+
   public removeSelectedLibrary(item): void {
 this.model.selectedLibs.splice(this.model.selectedLibs.indexOf(item), 1);
   }
@@ -305,7 +314,10 @@ export class InstallLibrariesComponent implements OnInit, 
OnDestroy {
   });
 } else {
   this.model.getLibrariesList(this.group, this.query)
-.subscribe(libs => this.filteredList = libs);
+.subscribe(libs => {
+  console.log(libs);
+  this.filteredList = libs;
+});
 }
   }
 


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



[incubator-dlab] branch DLAB-1749 updated (d681f82 -> 18104f0)

2020-07-13 Thread dgnatyshyn
This is an automated email from the ASF dual-hosted git repository.

dgnatyshyn pushed a change to branch DLAB-1749
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git.


from d681f82  [DLAB-1749] BE support library installation of particular 
version
 add 88429c0  [DLAB-1751]: Added dependencies info for lib list
 add 2ff620b  upd libs
 add 03fd607  [DLAB-1750] Added lib versions from UI
 new a9a4c9d  Merge branch 'DLAB-1750' into DLAB-1749
 new 6412708  small fix
 new 18104f0  [DLAB-1750] Added possibility to install lib with different 
version

The 3 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.


Summary of changes:
 .../exploratory/install-libraries/index.ts |   6 +-
 .../install-libraries.component.html   |  61 
 .../install-libraries.component.scss   |  81 ++-
 .../install-libraries.component.ts | 109 -
 4 files changed, 230 insertions(+), 27 deletions(-)


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



[incubator-dlab] 02/03: small fix

2020-07-13 Thread dgnatyshyn
This is an automated email from the ASF dual-hosted git repository.

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

commit 64127083cd349dabf4526d1f601de2b28642da48
Author: Dmytro_Gnatyshyn 
AuthorDate: Mon Jul 13 11:06:29 2020 +0300

small fix
---
 .../webapp/src/app/resources/exploratory/install-libraries/index.ts | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/index.ts
 
b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/index.ts
index ab8f8b8..ae9969a 100644
--- 
a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/index.ts
+++ 
b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/install-libraries/index.ts
@@ -26,7 +26,7 @@ import { BubbleModule } from '../../../shared';
 import { FormControlsModule } from '../../../shared/form-controls';
 
 import { KeysPipeModule, LibSortPipeModule, HighLightPipeModule } from 
'../../../core/pipes';
-import {InstallLibrariesComponent, ErrorMessageDialogComponent, 
LibInfoDialogComponent} from './install-libraries.component';
+import {InstallLibrariesComponent, ErrorLibMessageDialogComponent, 
LibInfoDialogComponent} from './install-libraries.component';
 export * from './install-libraries.component';
 
 @NgModule({
@@ -41,8 +41,8 @@ export * from './install-libraries.component';
 MaterialModule,
 BubbleModule
   ],
-  declarations: [InstallLibrariesComponent, ErrorMessageDialogComponent, 
LibInfoDialogComponent],
-  entryComponents: [InstallLibrariesComponent, ErrorMessageDialogComponent, 
LibInfoDialogComponent],
+  declarations: [InstallLibrariesComponent, ErrorLibMessageDialogComponent, 
LibInfoDialogComponent],
+  entryComponents: [InstallLibrariesComponent, ErrorLibMessageDialogComponent, 
LibInfoDialogComponent],
   exports: [InstallLibrariesComponent]
 })
 export class InstallLibrariesModule {}


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



[incubator-dlab] branch DLAB-515 updated: [DLAB-515] - [AWS] EMR kernels connection via sparkmagic/livy implemented

2020-07-13 Thread mykolabodnar
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-515 by this push:
 new 3521c5f  [DLAB-515] - [AWS] EMR kernels connection via sparkmagic/livy 
implemented
3521c5f is described below

commit 3521c5f9ae61eaeb98413e04a785efb0f920a354
Author: bodnarmykola 
AuthorDate: Mon Jul 13 11:40:17 2020 +0300

[DLAB-515] - [AWS] EMR kernels connection via sparkmagic/livy implemented
---
 .../src/general/files/aws/deeplearning_Dockerfile|  1 +
 .../src/general/files/aws/jupyter_Dockerfile |  1 +
 .../src/general/lib/os/debian/notebook_lib.py|  5 +++--
 .../src/general/lib/os/fab.py|  4 ++--
 .../aws/jupyter_dataengine-service_create_configs.py | 17 +
 .../jupyter_install_dataengine-service_kernels.py|  7 ++-
 .../templates/os/sparkmagic_config_template.json | 20 
 7 files changed, 50 insertions(+), 5 deletions(-)

diff --git 
a/infrastructure-provisioning/src/general/files/aws/deeplearning_Dockerfile 
b/infrastructure-provisioning/src/general/files/aws/deeplearning_Dockerfile
index fb6551f..587a1b6 100644
--- a/infrastructure-provisioning/src/general/files/aws/deeplearning_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/aws/deeplearning_Dockerfile
@@ -42,6 +42,7 @@ COPY general/templates/os/inactive.service /root/templates/
 COPY general/templates/os/inactive.timer /root/templates/
 COPY general/files/os/toree-assembly-0.3.0.jar /root/files/
 COPY general/files/os/toree_kernel.tar.gz /root/files/
+COPY general/templates/os/sparkmagic_config_template.json /root/templates/
 COPY general/templates/os/pyspark_dataengine-service_template.json 
/root/templates/
 COPY general/templates/os/r_dataengine-service_template.json /root/templates/
 COPY general/templates/os/toree_dataengine-service_* /root/templates/
diff --git 
a/infrastructure-provisioning/src/general/files/aws/jupyter_Dockerfile 
b/infrastructure-provisioning/src/general/files/aws/jupyter_Dockerfile
index 4c83fac..a2d6198 100644
--- a/infrastructure-provisioning/src/general/files/aws/jupyter_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/aws/jupyter_Dockerfile
@@ -35,6 +35,7 @@ COPY general/templates/os/pyspark_local_template.json 
/root/templates/
 COPY general/templates/os/py3spark_local_template.json /root/templates/
 COPY general/templates/os/pyspark_dataengine-service_template.json 
/root/templates/
 COPY general/templates/os/r_dataengine-service_template.json /root/templates/
+COPY general/templates/os/sparkmagic_config_template.json /root/templates/
 COPY general/templates/os/r_template.json /root/templates/
 COPY general/templates/os/run_template.sh /root/templates/
 COPY general/templates/os/toree_dataengine-service_* /root/templates/
diff --git 
a/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py 
b/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py
index 4e1efe1..7310d0d 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py
@@ -268,12 +268,13 @@ def ensure_python3_libraries(os_user):
 try:
 #manage_pkg('-y install', 'remote', 'python3-setuptools')
 manage_pkg('-y install', 'remote', 'python3-pip')
+manage_pkg('-y install', 'remote', 'libkrb5-dev')
 sudo('pip3 install 
setuptools=={}'.format(os.environ['notebook_setuptools_version']))
 try:
-sudo('pip3 install tornado=={0} ipython==7.9.0 ipykernel=={1} 
--no-cache-dir' \
+sudo('pip3 install tornado=={0} ipython==7.9.0 ipykernel=={1} 
sparkmagic --no-cache-dir' \
  .format(os.environ['notebook_tornado_version'], 
os.environ['notebook_ipykernel_version']))
 except:
-sudo('pip3 install tornado=={0} ipython==5.0.0 ipykernel=={1} 
--no-cache-dir' \
+sudo('pip3 install tornado=={0} ipython==5.0.0 ipykernel=={1} 
sparkmagic --no-cache-dir' \
  .format(os.environ['notebook_tornado_version'], 
os.environ['notebook_ipykernel_version']))
 sudo('pip3 install -U pip=={} 
--no-cache-dir'.format(os.environ['conf_pip_version']))
 sudo('pip3 install boto3 --no-cache-dir')
diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py 
b/infrastructure-provisioning/src/general/lib/os/fab.py
index d664a5b..2acb5f8 100644
--- a/infrastructure-provisioning/src/general/lib/os/fab.py
+++ b/infrastructure-provisioning/src/general/lib/os/fab.py
@@ -180,9 +180,9 @@ def configure_jupyter(os_user, jupyter_conf_file, 
templates_dir, jupyter_version
 sudo("sed -i 's|OS_USR|{}|' 
/tmp/jupyter-notebook.service".format(os_user))
 http_proxy =