Skip to content

Commit 11af6cf

Browse files
cliveverghesecopybara-github
authored andcommitted
Internal Cleanup.
PiperOrigin-RevId: 829628249
1 parent cad0435 commit 11af6cf

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed

frontend/app/common/interfaces/data_table.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ export type OpProfileProto = opProfileProto.Profile;
254254
/** All overview page data table type. */
255255
export type OverviewPageDataTable =
256256
GeneralAnalysis|InputPipelineAnalysis|RecommendationResult|RunEnvironment|
257-
SimpleDataTable|NormalizedAcceleratorPerformance;
257+
SimpleDataTable|NormalizedAcceleratorPerformance|PodViewerTopology;
258258

259259
/** All overview page data tuple type. */
260260
export type OverviewPageDataTuple = [
@@ -265,6 +265,7 @@ export type OverviewPageDataTuple = [
265265
SimpleDataTable,
266266
NormalizedAcceleratorPerformance,
267267
SimpleDataTable,
268+
PodViewerTopology,
268269
];
269270

270271
/* tslint:disable enforce-name-casing */

frontend/app/components/overview_page/overview_page.ng.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
</smart-suggestion-view>
4848
<ng-content select="[sblView]"></ng-content>
4949
<ng-content select="[tfDataView]"></ng-content>
50+
<ng-content select="[topology]"></ng-content>
5051
</div>
5152
</div>
5253
</div>

frontend/app/components/pod_viewer/topology_graph/topology_graph.ng.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<div class="mat-title">
33
{{deviceType}} {{xDimension}}x{{yDimension}}
44
</div>
5-
<div class="topology-header">
6-
<div class="control-row-left">
5+
<div class="topology-header" *ngIf="(metricList && metricList.length) || (channelDb && channelDb.length)">
6+
<div class="control-row-left" >
77
<span class="selected-metric-label control">{{selectedMetricLabel}}</span>
88
<button mat-icon-button [matMenuTriggerFor]="mecticMenu" aria-label="Metric menu">
99
<mat-icon>arrow_drop_down</mat-icon>
@@ -100,7 +100,7 @@
100100
<pre>{{tooltipText}}</pre>
101101
</div>
102102

103-
<div class="color-table">
103+
<div class="color-table" *ngIf="podStatsPerCore">
104104
<div
105105
*ngFor="let colorInfo of colorInfos">
106106
<div class="color-cell" [style.backgroundColor]="colorInfo.color"></div>

frontend/app/components/pod_viewer/topology_graph/topology_graph.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
.container {
2727
position: relative;
28+
z-index: 0;
2829
}
2930

3031
.label {
@@ -48,7 +49,7 @@
4849
border-radius: 8px;
4950
border: 1px solid #333;
5051
background-color: #eee;
51-
z-index:-2;
52+
z-index: -2;
5253
}
5354

5455
.node {
@@ -63,7 +64,7 @@
6364

6465
.node pre {
6566
margin: 8px 0px 0px 2px;
66-
font-size:13px;
67+
font-size: 13px;
6768
color: white;
6869
}
6970

@@ -94,7 +95,7 @@
9495

9596
.selected-metric-item {
9697
font-weight: bold;
97-
background: rgba(0, 0, 0, 0.02)
98+
background: rgba(0, 0, 0, 0.02);
9899
}
99100

100101
.channel-input {

frontend/app/components/pod_viewer/topology_graph/topology_graph.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ export class TopologyGraph implements OnChanges, OnDestroy {
348348
private updateNodes() {
349349
this.nodes = [];
350350

351-
if (!this.topology || !this.podStatsPerCore) {
351+
if (!this.topology) {
352352
return;
353353
}
354354

@@ -375,7 +375,7 @@ export class TopologyGraph implements OnChanges, OnDestroy {
375375
this.nodes[chipz].nodes.push(nodeInfo);
376376
}
377377
});
378-
} else {
378+
} else if (this.podStatsPerCore) {
379379
this.nodes[0] = {nodes: []};
380380
Object.keys(this.podStatsPerCore).forEach(coreId => {
381381
const podStatsRecord = this.podStatsPerCore![coreId];

0 commit comments

Comments
 (0)