</span>
)}
{items}
- {component.visibility === 'private' && <PrivateBadge className="spacer-left" />}
+ {component.visibility === 'private' && (
+ <PrivateBadge className="spacer-left" qualifier={component.qualifier} />
+ )}
</h1>
);
}
</h2>
{project.analysisDate && <ProjectCardQualityGate status={measures!['alert_status']} />}
<div className="pull-right text-right">
- {isPrivate && <PrivateBadge className="spacer-left" tooltipPlacement="left" />}
+ {isPrivate && (
+ <PrivateBadge className="spacer-left" qualifier="TRK" tooltipPlacement="left" />
+ )}
{hasTags && <TagsList tags={project.tags} customClass="spacer-left" />}
</div>
{project.analysisDate &&
</h2>
{project.analysisDate && <ProjectCardQualityGate status={measures['alert_status']} />}
<div className="pull-right text-right">
- {isPrivate && <PrivateBadge className="spacer-left" tooltipPlacement="left" />}
+ {isPrivate && (
+ <PrivateBadge className="spacer-left" qualifier="TRK" tooltipPlacement="left" />
+ )}
{hasTags && <TagsList tags={project.tags} customClass="spacer-left" />}
</div>
{project.analysisDate && (
</td>
<td className="thin nowrap">
- {project.visibility === Visibility.Private && <PrivateBadge />}
+ {project.visibility === Visibility.Private && (
+ <PrivateBadge qualifier={project.qualifier} />
+ )}
</td>
<td className="nowrap">
<td
className="thin nowrap"
>
- <PrivateBadge />
+ <PrivateBadge
+ qualifier="TRK"
+ />
</td>
<td
className="nowrap"
<td
className="thin nowrap"
>
- <PrivateBadge />
+ <PrivateBadge
+ qualifier="TRK"
+ />
</td>
<td
className="nowrap"
interface Props {
className?: string;
+ qualifier: string;
tooltipPlacement?: string;
}
-export default function PrivateBadge({ className, tooltipPlacement = 'bottom' }: Props) {
+export default function PrivateBadge({ className, qualifier, tooltipPlacement = 'bottom' }: Props) {
return (
- <Tooltip overlay={translate('visibility.private.description')} placement={tooltipPlacement}>
+ <Tooltip
+ overlay={translate('visibility.private.description', qualifier)}
+ placement={tooltipPlacement}>
<div className={classNames('outline-badge', className)}>
{translate('visibility.private')}
</div>
import PrivateBadge from '../PrivateBadge';
it('renders', () => {
- expect(shallow(<PrivateBadge />)).toMatchSnapshot();
+ expect(shallow(<PrivateBadge qualifier="TRK" />)).toMatchSnapshot();
});
exports[`renders 1`] = `
<Tooltip
- overlay="visibility.private.description"
+ overlay="visibility.private.description.TRK"
placement="bottom"
>
<div
visibility.public.description=This project is public. Anyone can browse and see the source code.
visibility.public.description.short=Anyone can browse and see the source code.
visibility.private=Private
-visibility.private.description=This project is private. Only authorized users can browse and see the source code.
+visibility.private.description.TRK=This project is private. Only authorized users can browse and see the source code.
+visibility.private.description.VW=This portfolio is private. Only authorized users can browse it.
+visibility.private.description.APP=This application is private. Only authorized users can browse it.
visibility.private.description.short=Only authorized users can browse and see the source code.