Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions ui/css/treeherder-details-panel.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,11 @@ strong {
}

.details-panel-slide {
animation: details-panel-slide 0.4s ease-out;
height: 100%;
position: relative;
overflow: hidden;
}

@keyframes details-panel-slide {
0% {
transform: translateY(100%);
opacity: 0;
}
100% {
transform: translateY(0%);
opacity: 1;
}
}

div#details-panel-content .navbar,
div#tabs-panel .tab-headers {
border-radius: 0;
Expand Down
18 changes: 8 additions & 10 deletions ui/job-view/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -443,16 +443,14 @@ const App = () => {
</Panel>
<PanelResizeHandle className="resize-handle" />
<Panel defaultSize={100 - pushListPct} minSize={0}>
{currentRepo && (
<DetailsPanel
resizedHeight={detailsHeight}
currentRepo={currentRepo}
user={user}
classificationTypes={classificationTypes}
classificationMap={classificationMap}
frameworks={frameworks}
/>
)}
<DetailsPanel
resizedHeight={detailsHeight}
currentRepo={currentRepo}
user={user}
classificationTypes={classificationTypes}
classificationMap={classificationMap}
frameworks={frameworks}
/>
</Panel>
</PanelGroup>
<Notifications />
Expand Down
103 changes: 57 additions & 46 deletions ui/job-view/details/DetailsPanel.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { useCallback } from 'react';
import PropTypes from 'prop-types';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faSpinner } from '@fortawesome/free-solid-svg-icons';

import {
usePinnedJobsStore,
Expand Down Expand Up @@ -52,7 +54,7 @@ function DetailsPanel({
<div
id="details-panel"
style={{ height: `${resizedHeight}px` }}
className={selectedJobFull ? 'details-panel-slide' : 'hidden'}
className="details-panel-slide"
>
<PinBoard
currentRepo={currentRepo}
Expand All @@ -61,50 +63,59 @@ function DetailsPanel({
classificationTypes={classificationTypes}
selectedJobFull={selectedJobFull}
/>
{!!selectedJobFull && !!selectedJob && (
<div id="details-panel-content">
<SummaryPanel
selectedJobFull={selectedJobFull}
currentRepo={currentRepo}
classificationMap={classificationMap}
jobLogUrls={jobLogUrls}
logParseStatus={logParseStatus}
jobDetails={jobDetails}
jobDetailLoading={jobDetailLoading}
latestClassification={
classifications.length
? classifications[classifications.length - 1]
: null
}
logViewerUrl={logViewerUrl}
logViewerFullUrl={logViewerFullUrl}
bugs={bugs}
user={user}
/>
<span className="job-tabs-divider" />
<TabsPanel
selectedJob={selectedJob}
selectedJobFull={selectedJobFull}
currentRepo={currentRepo}
jobDetails={jobDetails}
jobArtifactsLoading={jobArtifactsLoading}
perfJobDetail={perfJobDetail}
repoName={currentRepo.name}
jobRevision={jobRevision}
suggestions={[]}
errors={undefined}
bugSuggestionsLoading={false}
logParseStatus={logParseStatus}
classifications={classifications}
classificationMap={classificationMap}
jobLogUrls={jobLogUrls}
bugs={bugs}
togglePinBoardVisibility={togglePinBoardVisibility}
logViewerFullUrl={logViewerFullUrl}
testGroups={testGroups}
/>
</div>
)}
<div id="details-panel-content">
{(jobDetailLoading || jobArtifactsLoading) && (
<div className="overlay">
<div>
<FontAwesomeIcon
icon={faSpinner}
pulse
className="th-spinner-lg"
title="Loading..."
/>
</div>
</div>
)}
<SummaryPanel
selectedJobFull={selectedJobFull}
currentRepo={currentRepo}
classificationMap={classificationMap}
jobLogUrls={jobLogUrls}
logParseStatus={logParseStatus}
jobDetails={jobDetails}
latestClassification={
classifications.length
? classifications[classifications.length - 1]
: null
}
logViewerUrl={logViewerUrl}
logViewerFullUrl={logViewerFullUrl}
bugs={bugs}
user={user}
/>
<span className="job-tabs-divider" />
<TabsPanel
selectedJob={selectedJob}
selectedJobFull={selectedJobFull}
currentRepo={currentRepo}
jobDetails={jobDetails}
jobArtifactsLoading={jobArtifactsLoading}
perfJobDetail={perfJobDetail}
repoName={currentRepo?.name}
jobRevision={jobRevision}
suggestions={[]}
errors={undefined}
bugSuggestionsLoading={false}
logParseStatus={logParseStatus}
classifications={classifications}
classificationMap={classificationMap}
jobLogUrls={jobLogUrls}
bugs={bugs}
togglePinBoardVisibility={togglePinBoardVisibility}
logViewerFullUrl={logViewerFullUrl}
testGroups={testGroups}
/>
</div>
<div id="clipboard-container">
<textarea id="clipboard" />
</div>
Expand All @@ -116,7 +127,7 @@ DetailsPanel.propTypes = {
currentRepo: PropTypes.shape({
name: PropTypes.string,
tc_root_url: PropTypes.string,
}).isRequired,
}),
user: PropTypes.shape({
isLoggedIn: PropTypes.bool,
isStaff: PropTypes.bool,
Expand Down
81 changes: 34 additions & 47 deletions ui/job-view/details/summary/SummaryPanel.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faSpinner } from '@fortawesome/free-solid-svg-icons';

import JobInfo from '../../../shared/JobInfo';

Expand All @@ -17,7 +15,6 @@ class SummaryPanel extends React.PureComponent {
bugs,
jobLogUrls = [],
jobDetails = [],
jobDetailLoading = false,
logViewerUrl = null,
logViewerFullUrl = null,
logParseStatus = 'pending',
Expand Down Expand Up @@ -60,49 +57,40 @@ class SummaryPanel extends React.PureComponent {
aria-label="Summary"
data-testid="summary-panel"
>
<ActionBar
selectedJobFull={selectedJobFull}
logParseStatus={logParseStatus}
currentRepo={currentRepo}
isTryRepo={currentRepo.is_try_repo}
jobDetails={jobDetails}
logViewerUrl={logViewerUrl}
logViewerFullUrl={logViewerFullUrl}
jobLogUrls={logs}
user={user}
/>
<div id="summary-panel-content">
{jobDetailLoading && (
<div className="overlay">
<div>
<FontAwesomeIcon
icon={faSpinner}
pulse
className="th-spinner-lg"
title="Loading..."
/>
</div>
</div>
)}

<ul className="list-unstyled">
{latestClassification && (
<ClassificationsPanel
job={selectedJobFull}
classification={latestClassification}
classificationMap={classificationMap}
bugs={bugs}
currentRepo={currentRepo}
/>
)}
<StatusPanel selectedJobFull={selectedJobFull} />
<JobInfo
job={selectedJobFull}
extraFields={[...logStatus, ...artifactStatus]}
{!!selectedJobFull && (
<>
<ActionBar
selectedJobFull={selectedJobFull}
logParseStatus={logParseStatus}
currentRepo={currentRepo}
isTryRepo={currentRepo?.is_try_repo}
jobDetails={jobDetails}
logViewerUrl={logViewerUrl}
logViewerFullUrl={logViewerFullUrl}
jobLogUrls={logs}
user={user}
/>
</ul>
</div>
<div id="summary-panel-content">
<ul className="list-unstyled">
{latestClassification && (
<ClassificationsPanel
job={selectedJobFull}
classification={latestClassification}
classificationMap={classificationMap}
bugs={bugs}
currentRepo={currentRepo}
/>
)}
<StatusPanel selectedJobFull={selectedJobFull} />
<JobInfo
job={selectedJobFull}
extraFields={[...logStatus, ...artifactStatus]}
currentRepo={currentRepo}
/>
</ul>
</div>
</>
)}
</div>
);
}
Expand All @@ -111,9 +99,9 @@ class SummaryPanel extends React.PureComponent {
SummaryPanel.propTypes = {
bugs: PropTypes.arrayOf(PropTypes.shape({})).isRequired,
user: PropTypes.shape({}).isRequired,
currentRepo: PropTypes.shape({}).isRequired,
currentRepo: PropTypes.shape({}),
classificationMap: PropTypes.shape({}).isRequired,
selectedJobFull: PropTypes.shape({}).isRequired,
selectedJobFull: PropTypes.shape({}),
latestClassification: PropTypes.shape({}),
jobLogUrls: PropTypes.arrayOf(PropTypes.shape({})),
jobDetails: PropTypes.arrayOf(
Expand All @@ -123,7 +111,6 @@ SummaryPanel.propTypes = {
title: PropTypes.string.isRequired,
}),
),
jobDetailLoading: PropTypes.bool,
logParseStatus: PropTypes.string,
logViewerUrl: PropTypes.string,
logViewerFullUrl: PropTypes.string,
Expand Down
Loading