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/06/24 10:56:37 UTC
[incubator-dlab] 02/07: [DLAB-787]: pass custom tag on cluster
creation
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 73c27984c54c658b7985ccd0f98c500fba90a262
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Wed Jun 19 16:44:37 2019 +0300
[DLAB-787]: pass custom tag on cluster creation
---
.../computational-resource-create-dialog.component.ts | 7 ++++---
.../computational-resource-create.model.ts | 12 +++++++-----
2 files changed, 11 insertions(+), 8 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..6b793d4 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
@@ -69,9 +69,9 @@ export class ComputationalResourceCreateDialogComponent implements OnInit {
) { }
ngOnInit() {
- this.initFormModel();
this.notebook_instance = this.data.notebook;
- this.resourcesList = this.data.resourcesList;
+ this.resourcesList = this.data.full_list;
+ this.initFormModel();
this.getTemplates(this.notebook_instance.project);
}
@@ -140,7 +140,8 @@ export class ComputationalResourceCreateDialogComponent implements OnInit {
instance_number: ['', [Validators.required, Validators.pattern(PATTERNS.nodeCountPattern), this.validInstanceNumberRange.bind(this)]],
preemptible_instance_number: [0, Validators.compose([Validators.pattern(PATTERNS.integerRegex), this.validPreemptibleRange.bind(this)])],
instance_price: [0, [this.validInstanceSpotRange.bind(this)]],
- configuration_parameters: ['', [this.validConfiguration.bind(this)]]
+ configuration_parameters: ['', [this.validConfiguration.bind(this)]],
+ custom_tag: [this.notebook_instance.custom_tag]
});
}
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create.model.ts b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create.model.ts
index cf642a4..00b34d7 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create.model.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resource-create-dialog/computational-resource-create.model.ts
@@ -32,7 +32,6 @@ export class ComputationalResourceModel {
public createComputationalResource(parameters, image, env, spot): Observable<{}> {
const config = parameters.configuration_parameters ? JSON.parse(parameters.configuration_parameters) : null;
- debugger;
if (DICTIONARY.cloud_provider === 'aws' && image.image === 'docker.dlab-dataengine-service') {
return this.userResourceService.createComputationalResource_DataengineService({
name: parameters.cluster_alias_name,
@@ -46,7 +45,8 @@ export class ComputationalResourceModel {
emr_slave_instance_spot: spot,
emr_slave_instance_spot_pct_price: parameters.emr_slave_instance_price,
config: config,
- project: env.project
+ project: env.project,
+ custom_tag: parameters.custom_tag
});
} else if (DICTIONARY.cloud_provider === 'gcp' && image.image === 'docker.dlab-dataengine-service') {
return this.userResourceService.createComputationalResource_DataengineService({
@@ -55,13 +55,14 @@ export class ComputationalResourceModel {
template_name: image.template_name,
notebook_name: env.name,
image: image.image,
- dataproc_master_instance_type: parameters.shape_master,
+ dataproc_master_instance_type: parameters.shape_master,
dataproc_slave_instance_type: parameters.shape_slave,
dataproc_version: image.version,
dataproc_master_count: 1,
dataproc_preemptible_count: parameters.preemptible_instance_number,
config: config,
- project: env.project
+ project: env.project,
+ custom_tag: parameters.custom_tag
});
} else {
return this.userResourceService.createComputationalResource_Dataengine({
@@ -72,7 +73,8 @@ export class ComputationalResourceModel {
image: image.image,
template_name: image.template_name,
config: config,
- project: env.project
+ project: env.project,
+ custom_tag: parameters.custom_tag
});
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org