From fc3d60ef8467ab9ce22f688f066238e67a13796b Mon Sep 17 00:00:00 2001 From: Profiler Team Date: Thu, 29 Feb 2024 15:47:07 -0800 Subject: [PATCH] Add tooltip for Memory Aggregation Stats PiperOrigin-RevId: 611620598 --- .../memory_profile_summary/BUILD | 2 + .../memory_profile_summary.ng.html | 45 ++++++++++++++++--- .../memory_profile_summary.scss | 12 +++++ .../memory_profile_summary_module.ts | 7 ++- 4 files changed, 57 insertions(+), 9 deletions(-) diff --git a/frontend/app/components/memory_profile/memory_profile_summary/BUILD b/frontend/app/components/memory_profile/memory_profile_summary/BUILD index c06a8adf..4b1d3ae7 100644 --- a/frontend/app/components/memory_profile/memory_profile_summary/BUILD +++ b/frontend/app/components/memory_profile/memory_profile_summary/BUILD @@ -16,6 +16,8 @@ xprof_ng_module( deps = [ "@npm//@angular/core", "@org_xprof//frontend/app/common/angular:angular_material_card", + "@org_xprof//frontend/app/common/angular:angular_material_icon", + "@org_xprof//frontend/app/common/angular:angular_material_tooltip", "@org_xprof//frontend/app/common/interfaces", "@org_xprof//frontend/app/common/utils", ], diff --git a/frontend/app/components/memory_profile/memory_profile_summary/memory_profile_summary.ng.html b/frontend/app/components/memory_profile/memory_profile_summary/memory_profile_summary.ng.html index 1095e27c..bfffb0de 100644 --- a/frontend/app/components/memory_profile/memory_profile_summary/memory_profile_summary.ng.html +++ b/frontend/app/components/memory_profile/memory_profile_summary/memory_profile_summary.ng.html @@ -65,11 +65,46 @@ diff --git a/frontend/app/components/memory_profile/memory_profile_summary/memory_profile_summary.scss b/frontend/app/components/memory_profile/memory_profile_summary/memory_profile_summary.scss index 260ea7bf..3dd40e21 100644 --- a/frontend/app/components/memory_profile/memory_profile_summary/memory_profile_summary.scss +++ b/frontend/app/components/memory_profile/memory_profile_summary/memory_profile_summary.scss @@ -51,3 +51,15 @@ ul { color: #e8710a; border-bottom: 1px dotted #e8710a; } + +.tooltip-icon-container { + position: relative; +} + +.tooltip-icon { + color: #e8710a; + font-size: 20px; + vertical-align: bottom; + cursor: pointer; +} + diff --git a/frontend/app/components/memory_profile/memory_profile_summary/memory_profile_summary_module.ts b/frontend/app/components/memory_profile/memory_profile_summary/memory_profile_summary_module.ts index d3c88bd8..240ef50a 100644 --- a/frontend/app/components/memory_profile/memory_profile_summary/memory_profile_summary_module.ts +++ b/frontend/app/components/memory_profile/memory_profile_summary/memory_profile_summary_module.ts @@ -1,15 +1,14 @@ import {CommonModule} from '@angular/common'; import {NgModule} from '@angular/core'; import {MatCardModule} from '@angular/material/card'; +import {MatIconModule} from '@angular/material/icon'; +import {MatTooltipModule} from '@angular/material/tooltip'; import {MemoryProfileSummary} from './memory_profile_summary'; @NgModule({ declarations: [MemoryProfileSummary], - imports: [ - CommonModule, - MatCardModule, - ], + imports: [CommonModule, MatCardModule, MatTooltipModule, MatIconModule], exports: [MemoryProfileSummary] }) export class MemoryProfileSummaryModule {