mirror of
https://github.com/harness/drone.git
synced 2025-05-11 22:50:11 +08:00
fix: [AH-492]: show size coming from BE in layers table (#2893)
* fix: [AH-492]: show size coming from BE in layers table
This commit is contained in:
parent
9227b297bb
commit
34bee25c56
@ -16,10 +16,12 @@
|
||||
|
||||
import React, { useMemo } from 'react'
|
||||
import classNames from 'classnames'
|
||||
import { defaultTo } from 'lodash-es'
|
||||
import type { Column } from 'react-table'
|
||||
import { TableV2 } from '@harnessio/uicore'
|
||||
import type { DockerLayerEntry } from '@harnessio/react-har-service-client'
|
||||
|
||||
import { DEFAULT_LAYER_SIZE } from '@ar/pages/version-details/utils'
|
||||
import { LayerActionCell, LayerCodeCell, LayerIndexCell, LayerSizeCell } from './LayersTableCells'
|
||||
import css from './LayersTable.module.scss'
|
||||
|
||||
@ -56,7 +58,7 @@ export default function LayersTable(props: LayersTableProps): JSX.Element {
|
||||
return data.map((each, index) => ({
|
||||
id: index + 1,
|
||||
code: each.command,
|
||||
size: '0 B'
|
||||
size: defaultTo(each.size, DEFAULT_LAYER_SIZE)
|
||||
}))
|
||||
}
|
||||
return []
|
||||
|
@ -14,6 +14,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export const DEFAULT_LAYER_SIZE = '0 B'
|
||||
|
||||
export function prettifyManifestJSON(manifest: string): string {
|
||||
try {
|
||||
return JSON.stringify(JSON.parse(manifest), null, 2)
|
||||
|
Loading…
Reference in New Issue
Block a user