Bug 1738697 - Remove Mozilla-Inbound repository data from Perfherder UI (#7307)

* Bug 1738697 - Remove Mozilla-Inbound repository data from Perfherder UI

* Address PR changes
This commit is contained in:
Sorin Toma 2021-11-05 14:05:01 +02:00 коммит произвёл GitHub
Родитель 3b4504dd0f
Коммит dccb26f0be
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 11 добавлений и 6 удалений

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

@ -122,6 +122,10 @@ export default class CompareSelectorView extends React.Component {
(this.state.originalProject === 'try' &&
this.state.newProject === 'mozilla-central');
const filteredProjects = projects.filter(
(project) => project.name !== 'mozilla-inbound',
);
return (
<Container fluid className="my-5 pt-5 max-width-default">
<ErrorBoundary
@ -147,7 +151,7 @@ export default class CompareSelectorView extends React.Component {
</Row>
<Row className="justify-content-center">
<SelectorCard
projects={projects}
projects={filteredProjects}
updateState={(updates) => this.setState(updates)}
selectedRepo={originalProject}
title="Base"
@ -157,7 +161,7 @@ export default class CompareSelectorView extends React.Component {
errorMessages={errorMessages}
/>
<SelectorCard
projects={projects}
projects={filteredProjects}
updateState={(updates) => this.setState(updates)}
selectedRepo={newProject}
title="New"

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

@ -19,9 +19,7 @@ class CompareView extends React.PureComponent {
let timeRange = Math.min(oldTimestamp, newTimestamp);
timeRange = Math.round(now - timeRange);
const newTimeRange = phTimeRanges.find((time) => timeRange <= time.value);
// data from repository mozilla-inbound it's older than one year, making newTimeRange become undefined and causing an inifite loading loop
// this is a temporary solution until mozilla-inbound data will be removed from Perfherder UI
return newTimeRange !== undefined ? newTimeRange.value : -1;
return newTimeRange.value;
};
queryParams = (repository, interval, framework) => ({

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

@ -482,7 +482,10 @@ export default class TestDataModal extends React.Component {
{
options: projectOptions
.sort()
.filter((item) => !pinnedProjects.includes(item)),
.filter(
(item) =>
!pinnedProjects.includes(item) && item !== 'mozilla-inbound',
),
selectedItem: repositoryName.name || '',
pinnedProjects: pinnedProjects.filter((item) =>
projectOptions.includes(item),