[incubator-dlab] branch feature/projects updated: [DLAB-747]: prevent file upload on edit project form
This is an automated email from the ASF dual-hosted git repository. ankovalyshyn pushed a commit to branch feature/projects in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/feature/projects by this push: new 1840bbd [DLAB-747]: prevent file upload on edit project form 1840bbd is described below commit 1840bbdc4a1912fdace92c899211e1db95d70a57 Author: Andriana Kovalyshyn AuthorDate: Fri Jun 21 08:29:12 2019 +0300 [DLAB-747]: prevent file upload on edit project form --- .../administration/project/project-form/project-form.component.html | 6 +++--- .../administration/project/project-form/project-form.component.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.html b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.html index 45314de..7adb299 100644 --- a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.html +++ b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.html @@ -37,7 +37,7 @@ Upload - + {{ keyLabel }} @@ -45,8 +45,8 @@ Clear -Nextkeyboard_arrow_right +Next + keyboard_arrow_right diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.ts index a332f9e..8f1fde0 100644 --- a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.ts +++ b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.ts @@ -68,7 +68,7 @@ export class ProjectFormComponent implements OnInit { })); if (this.item) { this.editSpecificProject(this.item); - this.stepper.selectedIndex = 1; + this.stepper.selectedIndex = 2; } } - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 02/03: [DLAB-747]: patch project creation form with file; validation added
This is an automated email from the ASF dual-hosted git repository. ankovalyshyn pushed a commit to branch feature/projects in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 3e6be349efb8ae67787e1a0cf9ffdefe65f7c0ef Author: Andriana Kovalyshyn AuthorDate: Thu Jun 20 15:23:32 2019 +0300 [DLAB-747]: patch project creation form with file; validation added --- .../project/project-form/project-form.component.ts | 36 -- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.ts index 5a1e2ea..a332f9e 100644 --- a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.ts +++ b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.ts @@ -17,7 +17,7 @@ * under the License. */ -import { Component, OnInit, Input, Output, EventEmitter, ViewChild } from '@angular/core'; +import { Component, OnInit, Input, Output, EventEmitter, ViewChild, ChangeDetectorRef } from '@angular/core'; import { FormGroup, FormBuilder, Validators } from '@angular/forms'; import { ToastrService } from 'ngx-toastr'; import { Subscription } from 'rxjs'; @@ -38,6 +38,8 @@ export class ProjectFormComponent implements OnInit { public groupsList: any = []; public endpointsList: any = []; public projectList: Project[] = []; + public accessKeyValid: boolean; + public keyLabel: string = ''; @Input() item: any; @Output() update: EventEmitter<{}> = new EventEmitter(); @@ -51,7 +53,8 @@ export class ProjectFormComponent implements OnInit { private projectService: ProjectService, private projectDataService: ProjectDataService, private rolesService: RolesGroupsService, -private endpointService: EndpointService +private endpointService: EndpointService, +private cd: ChangeDetectorRef ) { } ngOnInit() { @@ -94,6 +97,25 @@ export class ProjectFormComponent implements OnInit { this.projectForm.controls.tag.setValue(user_tag.toLowerCase()); } + public onFileChange($event) { +const reader = new FileReader(); + +if($event.target.files && $event.target.files.length) { + const [file] = $event.target.files; + reader.readAsDataURL(file); + + reader.onload = () => { +this.projectForm.patchValue({ + key: reader.result +}); + +this.accessKeyValid = this.isValidKey(file.name); +this.keyLabel = this.getLabel(file); +this.cd.markForCheck(); + }; +} + } + public selectOptions(list, key, select?) { let filter = key === 'endpoints' ? list.map(el => el.name) : list; this.projectForm.controls[key].setValue(select ? filter : []); @@ -111,6 +133,7 @@ export class ProjectFormComponent implements OnInit { public editSpecificProject(item: Project) { this.projectForm = this._fb.group({ + 'key': [''], 'name': [item.name, Validators.required], 'endpoints': [item.endpoints], 'tag': [item.tag, Validators.required], @@ -118,6 +141,15 @@ export class ProjectFormComponent implements OnInit { }); } + private getLabel(file: File): string { +debugger; +return file ? !this.accessKeyValid ? 'Public key is required.' : file.name : ''; + } + + private isValidKey(value): boolean { +return value.toLowerCase().endsWith('.pub'); + } + private getGroupsData() { this.rolesService.getGroupsData().subscribe( (list: any) => this.groupsList = list.map(el => el.group), - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch feature/projects updated (c58af0b -> fef3054)
This is an automated email from the ASF dual-hosted git repository. ankovalyshyn pushed a change to branch feature/projects in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from c58af0b [DLAB-805]: added extra check if clusters creation are not allowed new 4de2536 [DLAB-747]: added key upload form new 3e6be34 [DLAB-747]: patch project creation form with file; validation added new fef3054 [DLAB-747]: patch project creation form with file 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: .../project-form/project-form.component.html | 32 ++- .../project-form/project-form.component.scss | 6 .../project/project-form/project-form.component.ts | 36 -- .../webapp/src/assets/styles/_dialogs.scss | 2 +- 4 files changed, 72 insertions(+), 4 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-747]: patch project creation form with file
This is an automated email from the ASF dual-hosted git repository. ankovalyshyn pushed a commit to branch feature/projects in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit fef3054506bbc81a336eb38baa2b44a41e4b63db Author: Andriana Kovalyshyn AuthorDate: Thu Jun 20 17:13:14 2019 +0300 [DLAB-747]: patch project creation form with file --- .../project-form/project-form.component.html | 49 +- .../project-form/project-form.component.scss | 6 +++ .../webapp/src/assets/styles/_dialogs.scss | 2 +- 3 files changed, 36 insertions(+), 21 deletions(-) diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.html b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.html index a48c10d..45314de 100644 --- a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.html +++ b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.html @@ -21,28 +21,35 @@ Key upload - - - - -Upload public key to start project creation - - - - help_outlineWhere can I get public key? - + + + + + +Upload public key to start project creation + + + + help_outlineWhere can I get public key? + + + + + + Upload + + + + {{ keyLabel }} + + + +Clear +Nextkeyboard_arrow_right - - - Upload - - - - {{ keyLabel }} - - - + Project @@ -99,6 +106,8 @@ Clear +keyboard_arrow_leftBack Nextkeyboard_arrow_right diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.scss b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.scss index bbdf8cd..8782430 100644 --- a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.scss +++ b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.scss @@ -41,3 +41,9 @@ font-weight: 300; } } + +.upload-key { + .row-wrap { +padding: 35px 25px; + } +} \ No newline at end of file diff --git a/services/self-service/src/main/resources/webapp/src/assets/styles/_dialogs.scss b/services/self-service/src/main/resources/webapp/src/assets/styles/_dialogs.scss index f163887..311048c 100644 --- a/services/self-service/src/main/resources/webapp/src/assets/styles/_dialogs.scss +++ b/services/self-service/src/main/resources/webapp/src/assets/styles/_dialogs.scss @@ -105,7 +105,7 @@ mat-dialog-container { text-align: center; box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12); .upload-icon { -background: url(/img/upload-icon.png) no-repeat; +background: url(/../../assets/img/upload-icon.png) no-repeat; background-size: 100%; display: inline-block; width: 17px; - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/03: [DLAB-747]: added key upload form
This is an automated email from the ASF dual-hosted git repository. ankovalyshyn pushed a commit to branch feature/projects in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 4de2536d1cb2bb613d2b5b78a6897f5395358321 Author: Andriana Kovalyshyn AuthorDate: Thu Jun 20 15:22:21 2019 +0300 [DLAB-747]: added key upload form --- .../project-form/project-form.component.html | 23 +- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.html b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.html index f16e70b..a48c10d 100644 --- a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.html +++ b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.html @@ -21,7 +21,28 @@ Key upload - KEY UPLOAD + + + + +Upload public key to start project creation + + + + help_outlineWhere can I get public key? + + + + + + Upload + + + + {{ keyLabel }} + + + Project - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch bugfix-DLAB-750 updated: DLAB-750 changed script for billing configuration
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch bugfix-DLAB-750 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/bugfix-DLAB-750 by this push: new 685f322 DLAB-750 changed script for billing configuration 685f322 is described below commit 685f3226e08ce94886a598ba6009e38d1ea1fb6b Author: bhliva AuthorDate: Thu Jun 20 13:58:37 2019 +0300 DLAB-750 changed script for billing configuration --- infrastructure-provisioning/src/ssn/scripts/configure_billing.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_billing.py b/infrastructure-provisioning/src/ssn/scripts/configure_billing.py index ef05e8a..7d07b50 100644 --- a/infrastructure-provisioning/src/ssn/scripts/configure_billing.py +++ b/infrastructure-provisioning/src/ssn/scripts/configure_billing.py @@ -68,8 +68,6 @@ def yml_billing(path): if args.cloud_provider == 'aws': if args.aws_job_enabled == 'true': args.tag_resource_id = 'resourceTags' + ':' + args.tag_resource_id -elif args.aws_job_enabled == 'false': -args.tag_resource_id = 'user' + ':' + args.tag_resource_id config_orig = config_orig.replace('', args.billing_bucket) config_orig = config_orig.replace('', args.aws_job_enabled) config_orig = config_orig.replace('', args.report_path) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch feature/projects updated: [DLAB-805]: added extra check if clusters creation are not allowed
This is an automated email from the ASF dual-hosted git repository. ankovalyshyn pushed a commit to branch feature/projects in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/feature/projects by this push: new c58af0b [DLAB-805]: added extra check if clusters creation are not allowed c58af0b is described below commit c58af0b987a6711d8c1d483b480f35d4331c8873 Author: Andriana Kovalyshyn AuthorDate: Thu Jun 20 11:39:13 2019 +0300 [DLAB-805]: added extra check if clusters creation are not allowed --- .../computational-resource-create-dialog.component.ts | 11 +++ .../resources/resources-grid/resources-grid.component.html| 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.ts index 85ade39..788039b 100644 --- a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.ts +++ b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create-dialog.component.ts @@ -234,10 +234,13 @@ export class ComputationalResourceCreateDialogComponent implements OnInit { clusterTypes => { this.clusterTypes = clusterTypes; this.selectedImage = clusterTypes[0]; -this.getComputationalResourceLimits(); -this.filterShapes(); - this.resourceForm.get('template_name').setValue(this.selectedImage.template_name) - }); + +if (this.selectedImage) { + this.getComputationalResourceLimits(); + this.filterShapes(); + this.resourceForm.get('template_name').setValue(this.selectedImage.template_name); +} + }, error => {}); } private filterShapes(): void { 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 80b35f0..6940685 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 @@ -151,12 +151,12 @@ developer_board Manage libraries - + - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org