You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by dg...@apache.org on 2020/09/24 11:59:25 UTC
[incubator-dlab] branch DLAB-1778 updated: [DLAB-1778]: Fixed date
on detail popups
This is an automated email from the ASF dual-hosted git repository.
dgnatyshyn pushed a commit to branch DLAB-1778
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/DLAB-1778 by this push:
new 8585dd9 [DLAB-1778]: Fixed date on detail popups
8585dd9 is described below
commit 8585dd972889265aad43ed498a9828e5e7c1255b
Author: Dmytro_Gnatyshyn <di...@ukr.net>
AuthorDate: Thu Sep 24 14:10:39 2020 +0300
[DLAB-1778]: Fixed date on detail popups
---
.../webapp/src/app/core/services/localization.service.ts | 4 +++-
.../cluster-details/cluster-details.component.ts | 15 ++++++++++++---
.../exploratory/detail-dialog/detail-dialog.component.ts | 3 ++-
3 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/localization.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/localization.service.ts
index ca4cafd..fc4aca2 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/services/localization.service.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/services/localization.service.ts
@@ -42,8 +42,10 @@ export class LocalizationService {
}
public static registerCulture(culture: string) {
- if (culture.indexOf('-') !== -1) {
+ console.log(culture);
+ if (culture === 'uk-UA') {
culture = culture.substr(0, culture.indexOf('-'));
+ console.log('inside', culture);
}
/* webpackInclude: /(uk|sv)\.js$/ */
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/cluster-details/cluster-details.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/computational/cluster-details/cluster-details.component.ts
index e2892b5..da84112 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/computational/cluster-details/cluster-details.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/computational/cluster-details/cluster-details.component.ts
@@ -71,7 +71,8 @@ export class DetailComputationalResourcesComponent implements OnInit {
this.upTimeInHours = (this.resource.up_time) ? DateUtils.diffBetweenDatesInHours(this.resource.up_time) : 0;
- this.upTimeSince = (this.resource.up_time) ? new Date(this.resource.up_time).toString() : '';
+ this.upTimeSince = (this.resource.up_time) ?
+ new Date(this.resource.up_time).toString().substr(0, new Date(this.resource.up_time).toString().indexOf('(')) : '';
this.initFormModel();
if (this.resource.image === 'docker.dlab-dataengine') this.getClusterConfiguration();
@@ -101,7 +102,13 @@ export class DetailComputationalResourcesComponent implements OnInit {
public editClusterConfiguration(data): void {
this.dataengineConfigurationService
- .editClusterConfiguration(data.configuration_parameters, this.environment.project, this.environment.name, this.resource.computational_name, this.PROVIDER)
+ .editClusterConfiguration(
+ data.configuration_parameters,
+ this.environment.project,
+ this.environment.name,
+ this.resource.computational_name,
+ this.PROVIDER
+ )
.subscribe(result => {
this.dialogRef.close();
},
@@ -129,7 +136,9 @@ export class DetailComputationalResourcesComponent implements OnInit {
clusterType: resource.dataEngineType === 'dataengine-service' ? 'Hadoop' : 'Master'
};
- this.auditService.sendDataToAudit({resource_name: resource.computational_name, info: JSON.stringify(clusterInfo), type: 'COMPUTE'}).subscribe();
+ this.auditService.sendDataToAudit(
+ {resource_name: resource.computational_name, info: JSON.stringify(clusterInfo), type: 'COMPUTE'}
+ ).subscribe();
}
copyBucketName(url: string) {
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.ts
index a3f55ff..22c4bfa 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.ts
@@ -73,7 +73,8 @@ export class DetailDialogComponent implements OnInit {
this.tooltip = false;
this.upTimeInHours = (this.notebook.time) ? DateUtils.diffBetweenDatesInHours(this.notebook.time) : 0;
- this.upTimeSince = (this.notebook.time) ? new Date(this.notebook.time).toString() : '';
+ this.upTimeSince = (this.notebook.time) ?
+ new Date(this.notebook.time).toString().substr(0, new Date(this.notebook.time).toString().indexOf('(')) : '';
this.initFormModel();
this.getClusterConfiguration();
if (this.notebook.edgeNodeStatus === 'terminated' ||
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org