Skip to content

Commit

Permalink
data grid size changes
Browse files Browse the repository at this point in the history
  • Loading branch information
zkoch committed Apr 16, 2024
1 parent 872e75d commit b2affb9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion website/src/components/DataGrid.astro
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import 'ag-grid-community/styles/ag-theme-quartz.css';
<label for="cdgRegionSelector">Europe (Paris)</label>
</div>
<br />
<div id="myGrid" class="ag-theme-quartz text-sm bg-stone-100 font-mono text-gray-950 dark:bg-stone-900 dark:text-white " style="width: 800px;"></div>
<div id="myGrid" class="ag-theme-quartz text-sm bg-stone-100 font-mono text-gray-950 dark:bg-stone-900 dark:text-white w-full"></div>
</form>

<script>
Expand Down
13 changes: 6 additions & 7 deletions website/src/utils/DataGridDefinitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const TokensDefinition = {
};

export const TotalTimeDefinition = {
title: "Total Time",
title: "Total",
definition: "The total time from the start of the request until the response is complete, i.e., the last token has been generated. Total time = TTFT + TPS * Tokens. Lower values = lower latency/faster performance."
};

Expand All @@ -64,8 +64,8 @@ const columnModel = {
field: "model",
headerName: ModelDefinition.title,
headerTooltip: ModelDefinition.definition,
headerClass: headerClass,
minWidth: 400,
//TODO: Make this ~200 on mobile screen size by default
minWidth: 300,
// tooltipField: "output"
};

Expand All @@ -75,7 +75,6 @@ const columnRegion = {
headerName: RegionDefinition.title,
headerTooltip: RegionDefinition.definition,
headerClass: headerClass,
maxWidth: 100
};

// TTR column
Expand All @@ -84,7 +83,6 @@ const columnTTR = {
headerName: TTRDefinition.title,
headerTooltip: TTRDefinition.definition,
headerClass: headerClass,
maxWidth: 90,
valueFormatter: (p: ValueFormatterParam) => p.value.toFixed(2)
};

Expand All @@ -94,6 +92,7 @@ const columnTTFT = {
headerName: TTFTDefinition.title,
headerTooltip: TTFTDefinition.definition,
headerClass: headerClass,
minWidth: 100,
// minWidth: 80,
// maxWidth: 90,
valueFormatter: (p: ValueFormatterParam) => p.value.toFixed(2)
Expand All @@ -105,6 +104,7 @@ const columnTPS = {
headerName: TPSDefinition.title,
headerTooltip: TPSDefinition.definition,
headerClass: headerClass,
minWidth: 100,
// minWidth: 90,
// maxWidth: 90,
valueFormatter: (p: ValueFormatterParam) => p.value.toFixed(2)
Expand All @@ -116,7 +116,6 @@ const columnNumTokens = {
headerName: TokensDefinition.title,
headerTooltip: TokensDefinition.definition,
headerClass: headerClass,
minWidth: 100,
// maxWidth: 100,
wrapHeaderText: true
};
Expand All @@ -127,6 +126,7 @@ const columnTotalTime = {
headerName: TotalTimeDefinition.title,
headerTooltip: TotalTimeDefinition.definition,
headerClass: headerClass,
minWidth: 100,
// minWidth: 100,
// maxWidth: 100,
wrapHeaderText: true,
Expand All @@ -140,7 +140,6 @@ export const gridOptions = {
enableCellTextSelection: true,
defaultColDef: {
filter: true,
resizable: false,
// minWidth: 80,
},
domLayout: 'autoHeight',
Expand Down

0 comments on commit b2affb9

Please sign in to comment.