Fix infrabench sort default: use task instead of missing section column
This commit is contained in:
parent
8ec5c28623
commit
7f53ce6878
1 changed files with 7 additions and 3 deletions
|
|
@ -87,9 +87,13 @@ private function authorizeOwner(): void
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function sortColumn(array $allowed): string
|
private function sortColumn(array $allowed, string $default = null): string
|
||||||
{
|
{
|
||||||
return in_array($this->sortBy, $allowed, true) ? $this->sortBy : $allowed[0];
|
if (in_array($this->sortBy, $allowed, true)) {
|
||||||
|
return $this->sortBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $default ?? $allowed[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
private function sortDir(): string
|
private function sortDir(): string
|
||||||
|
|
@ -249,7 +253,7 @@ private function sortDir(): string
|
||||||
</flux:table.rows>
|
</flux:table.rows>
|
||||||
</flux:table>
|
</flux:table>
|
||||||
@else
|
@else
|
||||||
@php($sortCol = $this->sortColumn(self::SORTABLE_METRIC))
|
@php($sortCol = $this->sortColumn(self::SORTABLE_METRIC, $this->run->suite === 'infrabench' ? 'task' : 'section'))
|
||||||
<flux:table>
|
<flux:table>
|
||||||
<flux:table.columns>
|
<flux:table.columns>
|
||||||
@if (in_array($this->run->suite, ['softbench', 'prosebench', 'psychbench']))
|
@if (in_array($this->run->suite, ['softbench', 'prosebench', 'psychbench']))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue