Skip to content

Commit

Permalink
fixing column widths
Browse files Browse the repository at this point in the history
  • Loading branch information
cauemarcondes committed Jul 3, 2023
1 parent 5049cdb commit 9bcb259
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export const Grid = forwardRef(
const columns: EuiDataGridColumn[] = [
{
id: TopNFunctionSortField.Rank,
initialWidth: 90,
initialWidth: isDifferentialView ? 50 : 90,
displayAsText: i18n.translate('xpack.profiling.functionsView.rankColumnLabel', {
defaultMessage: 'Rank',
}),
Expand All @@ -114,14 +114,14 @@ export const Grid = forwardRef(
},
{
id: TopNFunctionSortField.Samples,
initialWidth: 200,
initialWidth: isDifferentialView ? 100 : 200,
displayAsText: i18n.translate('xpack.profiling.functionsView.samplesColumnLabel', {
defaultMessage: 'Samples (estd.)',
}),
},
{
id: TopNFunctionSortField.SelfCPU,
initialWidth: 200,
initialWidth: isDifferentialView ? 100 : 200,
display: (
<CPULabelWithHint
type="self"
Expand All @@ -133,7 +133,7 @@ export const Grid = forwardRef(
},
{
id: TopNFunctionSortField.TotalCPU,
initialWidth: 200,
initialWidth: isDifferentialView ? 100 : 200,
display: (
<CPULabelWithHint
type="total"
Expand All @@ -148,6 +148,7 @@ export const Grid = forwardRef(
const leadingControlColumns: EuiDataGridControlColumn[] = [];
if (showDiffColumn) {
columns.push({
initialWidth: 60,
id: TopNFunctionSortField.Diff,
displayAsText: i18n.translate('xpack.profiling.functionsView.diffColumnLabel', {
defaultMessage: 'Diff',
Expand All @@ -159,14 +160,14 @@ export const Grid = forwardRef(
columns.push(
{
id: TopNFunctionSortField.AnnualizedCo2,
initialWidth: 200,
initialWidth: isDifferentialView ? 100 : 200,
displayAsText: i18n.translate('xpack.profiling.functionsView.annualizedCo2', {
defaultMessage: 'Annualized CO2',
}),
},
{
id: TopNFunctionSortField.AnnualizedDollarCost,
initialWidth: 200,
initialWidth: isDifferentialView ? 100 : 200,
displayAsText: i18n.translate('xpack.profiling.functionsView.annualizedDollarCost', {
defaultMessage: `Annualized dollar cost`,
}),
Expand Down

0 comments on commit 9bcb259

Please sign in to comment.