Bug 1746198 - Compare View - Fix pagination position (#7347)

* Bug 1746198 - Compare View - Fix pagination position

* Address PR changes
This commit is contained in:
Sorin Toma 2021-12-20 17:20:54 +02:00 коммит произвёл GitHub
Родитель f007685731
Коммит f4b1387185
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 43 добавлений и 38 удалений

Просмотреть файл

@ -597,21 +597,26 @@ li.pagination-active.active > button {
margin-left: 5px; margin-left: 5px;
} }
.download-json-pagination-container { .download-json-container {
display: flex; display: flex;
justify-content: space-between; justify-content: flex-end;
margin-bottom: 15px;
} }
.download-json-pagination-container .download-button { .download-json-container .download-button {
background-color: transparent !important; background-color: transparent !important;
color: #1f7d8e !important; color: #1f7d8e !important;
} }
.download-json-pagination-container .download-button:hover { .download-json-container .download-button:hover {
background-color: #1f7d8e !important; background-color: #1f7d8e !important;
color: white !important; color: white !important;
} }
.download-json-pagination-container .download-json-icon { .download-json-container .download-json-icon {
margin-right: 10px; margin-right: 10px;
} }
.bottom-pagination-container {
margin-top: 30px;
}

Просмотреть файл

@ -323,39 +323,39 @@ export default class CompareTableControls extends React.Component {
updateFilterText={this.updateFilterText} updateFilterText={this.updateFilterText}
dropdownOptions={dropdownOptions} dropdownOptions={dropdownOptions}
/> />
<div className="download-json-pagination-container">
<div /> <div />
{viewablePagesList {viewablePagesList
? hasMorePages() && ( ? hasMorePages() && (
<Row className="justify-content-center"> <Row className="justify-content-center">
<PaginationGroup <PaginationGroup
viewablePageNums={viewablePagesList} viewablePageNums={viewablePagesList}
updateParams={validated.updateParams} updateParams={validated.updateParams}
currentPage={page} currentPage={page}
count={countPages} count={countPages}
/>
</Row>
)
: null}
<div>
{formattedJSONData.length > 0 && (
<Button
className="btn download-button"
type="button"
href={`data:text/json;charset=utf-8,${encodeURIComponent(
JSON.stringify(formattedJSONData),
)}`}
download="perf-compare.json"
data-testid="download-button"
>
<FontAwesomeIcon
icon={faFileDownload}
className="download-json-icon"
/> />
JSON (experimental) </Row>
</Button> )
)} : null}
</div>
<div className="download-json-container">
{formattedJSONData.length > 0 && (
<Button
className="btn download-button"
type="button"
href={`data:text/json;charset=utf-8,${encodeURIComponent(
JSON.stringify(formattedJSONData),
)}`}
download="perf-compare.json"
data-testid="download-button"
>
<FontAwesomeIcon
icon={faFileDownload}
className="download-json-icon"
/>
JSON (experimental)
</Button>
)}
</div> </div>
{showNoise && showTestsWithNoise} {showNoise && showTestsWithNoise}
@ -382,7 +382,7 @@ export default class CompareTableControls extends React.Component {
{viewablePagesList {viewablePagesList
? hasMorePages() && ( ? hasMorePages() && (
<Row className="justify-content-center"> <Row className="justify-content-center bottom-pagination-container">
<PaginationGroup <PaginationGroup
viewablePageNums={viewablePagesList} viewablePageNums={viewablePagesList}
updateParams={validated.updateParams} updateParams={validated.updateParams}