You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by dy...@apache.org on 2022/02/17 14:17:13 UTC

[incubator-datalab] branch develop updated: [DATALAB-2686] added truncate pipe

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

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


The following commit(s) were added to refs/heads/develop by this push:
     new 0c254b6  [DATALAB-2686] added truncate pipe
     new 5718aa5  Merge pull request #1423 from GennadiyShpak/feat/DATALAB-2686/solution-header-improvement
0c254b6 is described below

commit 0c254b6773ac85a7a696dc8458c2765ca17c24f9
Author: Hennadii_Shpak <bo...@gmail.com>
AuthorDate: Thu Feb 17 16:05:10 2022 +0200

    [DATALAB-2686] added truncate pipe
---
 .../src/main/resources/webapp/src/app/shared/navbar/index.ts          | 4 +++-
 .../main/resources/webapp/src/app/shared/navbar/navbar.component.html | 2 +-
 .../main/resources/webapp/src/app/shared/navbar/navbar.component.ts   | 1 +
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/index.ts b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/index.ts
index 0041163..9ab3d55 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/index.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/index.ts
@@ -26,6 +26,7 @@ import { NavbarComponent } from './navbar.component';
 import { NotificationDialogModule } from '../modal-dialog/notification-dialog';
 import {EdgeActionDialogModule} from '../modal-dialog/edge-action-dialog';
 import {OdahuActionDialogModule} from '../modal-dialog/odahu-action-dialog';
+import { TruncateTextPipeModule } from '../../core/pipes/truncate-text-pipe';
 
 
 export * from './navbar.component';
@@ -39,7 +40,8 @@ export * from './navbar.component';
     EdgeActionDialogModule,
     ProgressDialogModule,
     BubbleModule,
-    OdahuActionDialogModule
+    OdahuActionDialogModule,
+    TruncateTextPipeModule,
   ],
   declarations: [NavbarComponent],
   exports: [NavbarComponent, RouterModule]
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.html b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.html
index 2b040c6..64ccc94 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.html
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.html
@@ -59,7 +59,7 @@
         <p>
           <strong>Revision: </strong>
           <span class="ellipsis commit" matTooltip="{{ metadata?.commit }}"
-            matTooltipPosition="above">{{ metadata?.commit }}</span>
+            matTooltipPosition="above">{{ metadata?.commit | truncateTextPipe: commitMaxLength }}</span>
         </p>
         <p>
           <a class="helper_instruction" [attr.href]="metadata?.release_notes" target="_blank">
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.ts b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.ts
index da813f7..b01184d 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.ts
@@ -95,6 +95,7 @@ export class NavbarComponent implements OnInit, OnDestroy {
   subscriptions: Subscription = new Subscription();
   sideBarNames!: Record<string, string>;
   userData!: UserInfo;
+  commitMaxLength: number = 22;
 
   constructor(
     public toastr: ToastrService,

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