-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Job/Statistics): use operation_statistics_descriptions from supp…
…orted_features [YTFRONT-3522]
- Loading branch information
1 parent
9a012e0
commit 8f76825
Showing
13 changed files
with
150 additions
and
104 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
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,2 +1,3 @@ | ||
export * from './StatisticTable'; | ||
export type {StatisticTree} from './types'; | ||
export * from './utils'; |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import format from '../../common/hammer/format'; | ||
|
||
const UNIT_TO_FORMATTER: Record<string, undefined | ((v?: number, settings?: object) => string)> = { | ||
['ms']: (v, settings) => | ||
format.TimeDuration(Math.round(v!), {format: 'milliseconds', ...settings}), | ||
['bytes']: (v, settings) => formatBytes(v, settings), | ||
['bytes * sec']: (v, settings) => formatBytes(v, settings, ' * sec'), | ||
['ms * bytes']: (v, settings) => formatBytes(v, settings, ' * ms'), | ||
['Mb*sec']: (v, settings) => formatBytes(v! * 1024 * 1024, settings, ' * sec'), | ||
}; | ||
|
||
function formatBytes(v?: number, settings?: object, suffix = '') { | ||
return isNaN(v!) ? format.NO_VALUE : format.Bytes(Math.round(v!), settings) + suffix; | ||
} | ||
|
||
export function formatByUnit(v?: number, unit?: string, settings?: object) { | ||
const formatFn = UNIT_TO_FORMATTER[unit!] ?? format.Number; | ||
return formatFn?.(v, settings); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.yt-job-statistics { | ||
margin-bottom: 50px; | ||
} |
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
7 changes: 0 additions & 7 deletions
7
...es/ui/src/ui/pages/operations/OperationDetail/tabs/statistics/OperationStatisticName.scss
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.