Browse Source

SONAR-11067 Align status dots in Branches Admin page

tags/7.5
Stas Vilchik 5 years ago
parent
commit
adbae423e8

+ 1
- 1
server/sonar-web/src/main/js/apps/projectBranches/components/App.tsx View File

<thead> <thead>
<tr> <tr>
<th>{translate('branch')}</th> <th>{translate('branch')}</th>
<th className="thin nowrap text-right">{translate('status')}</th>
<th className="thin nowrap">{translate('status')}</th>
<th className="thin nowrap text-right big-spacer-left"> <th className="thin nowrap text-right big-spacer-left">
{translate('branches.last_analysis_date')} {translate('branches.last_analysis_date')}
</th> </th>

+ 2
- 2
server/sonar-web/src/main/js/apps/projectBranches/components/BranchRow.tsx View File

<div className="outline-badge spacer-left">{translate('branches.main_branch')}</div> <div className="outline-badge spacer-left">{translate('branches.main_branch')}</div>
)} )}
</td> </td>
<td className="thin nowrap text-right">
<BranchStatus branchLike={branchLike} helpTooltipClassName="table-cell-doc" />
<td className="thin nowrap">
<BranchStatus branchLike={branchLike} />
</td> </td>
<td className="thin nowrap text-right big-spacer-left"> <td className="thin nowrap text-right big-spacer-left">
{branchLike.analysisDate && <DateFromNow date={branchLike.analysisDate} />} {branchLike.analysisDate && <DateFromNow date={branchLike.analysisDate} />}

+ 1
- 1
server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/__snapshots__/App-test.tsx.snap View File

branch branch
</th> </th>
<th <th
className="thin nowrap text-right"
className="thin nowrap"
> >
status status
</th> </th>

+ 3
- 6
server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/__snapshots__/BranchRow-test.tsx.snap View File

</div> </div>
</td> </td>
<td <td
className="thin nowrap text-right"
className="thin nowrap"
> >
<BranchStatus <BranchStatus
branchLike={ branchLike={
"name": "master", "name": "master",
} }
} }
helpTooltipClassName="table-cell-doc"
/> />
</td> </td>
<td <td
1234 – Feature PR 1234 – Feature PR
</td> </td>
<td <td
className="thin nowrap text-right"
className="thin nowrap"
> >
<BranchStatus <BranchStatus
branchLike={ branchLike={
"title": "Feature PR", "title": "Feature PR",
} }
} }
helpTooltipClassName="table-cell-doc"
/> />
</td> </td>
<td <td
feature feature
</td> </td>
<td <td
className="thin nowrap text-right"
className="thin nowrap"
> >
<BranchStatus <BranchStatus
branchLike={ branchLike={
"type": "SHORT", "type": "SHORT",
} }
} }
helpTooltipClassName="table-cell-doc"
/> />
</td> </td>
<td <td

+ 2
- 4
server/sonar-web/src/main/js/components/common/BranchStatus.tsx View File

* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
import * as React from 'react'; import * as React from 'react';
import * as classNames from 'classnames';
import StatusIndicator from './StatusIndicator'; import StatusIndicator from './StatusIndicator';
import Level from '../ui/Level'; import Level from '../ui/Level';
import BugIcon from '../icons-components/BugIcon'; import BugIcon from '../icons-components/BugIcon';
interface Props { interface Props {
branchLike: T.BranchLike; branchLike: T.BranchLike;
concise?: boolean; concise?: boolean;
helpTooltipClassName?: string;
} }


export default function BranchStatus({ branchLike, concise = false, helpTooltipClassName }: Props) {
export default function BranchStatus({ branchLike, concise = false }: Props) {
if (isShortLivingBranch(branchLike) || isPullRequest(branchLike)) { if (isShortLivingBranch(branchLike) || isPullRequest(branchLike)) {
if (!branchLike.status) { if (!branchLike.status) {
return null; return null;
</li> </li>
{shouldDisplayHelper && ( {shouldDisplayHelper && (
<HelpTooltip <HelpTooltip
className={classNames('spacer-left', helpTooltipClassName)}
className="spacer-left"
overlay={translateWithParameters( overlay={translateWithParameters(
'branches.short_lived.quality_gate.description', 'branches.short_lived.quality_gate.description',
totalIssues totalIssues

Loading…
Cancel
Save