-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
overview page frontend code cleanup 1: performance_summary
PiperOrigin-RevId: 570555423
- Loading branch information
1 parent
206f547
commit b68d688
Showing
12 changed files
with
334 additions
and
365 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,43 @@ | ||
import {DataTableCell} from './data_table'; | ||
|
||
/** The base interface for a information of performance summary view. */ | ||
export interface SummaryInfo { | ||
type?: string; | ||
level?: number; // Top level metric is level 1, use to control styles | ||
title: string; | ||
descriptions?: string[]; | ||
tooltip?: string; | ||
value?: string; | ||
valueColor?: string; | ||
propertyValues?: string[]; | ||
// Nested child metrics info | ||
childrenInfo?: SummaryInfo[]; | ||
} | ||
|
||
/** freeform k-v pair property interface */ | ||
export interface GeneralProps { | ||
[key: string]: string; | ||
} | ||
|
||
/** | ||
* Interface for performance summary configuration object. | ||
* Will be translated into SummaryInfo object. | ||
*/ | ||
export interface SummaryInfoConfig { | ||
title: string; | ||
tooltip?: string; | ||
// goodMetric equals true means the higher the better | ||
goodMetric?: boolean; | ||
description?: string; | ||
valueKey?: string; | ||
sdvKey?: string; | ||
childrenInfoConfig?: SummaryInfoConfig[]; | ||
// custom callback to read value | ||
// valueKey and getValue are mutual exclusive | ||
getValue?: (arg: DataTableCell[]) => string; | ||
// custom callback function to get a nested metrics list | ||
getChildValues?: (arg: GeneralProps|DataTableCell[]) => string[]; | ||
unit?: string; | ||
valueColor?: string; | ||
trainingOnly?: boolean; | ||
inferenceOnly?: boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.