mirror of
https://github.com/grafana/grafana.git
synced 2024-12-02 13:39:19 -06:00
NewDataSourcePage: Restore signature badge lost in merge (#23832)
This commit is contained in:
parent
e35f27ea8f
commit
2f5bea27b1
@ -5,13 +5,23 @@ export interface CardProps {
|
||||
logoUrl?: string;
|
||||
title: string;
|
||||
description?: string;
|
||||
labels?: React.ReactNode;
|
||||
actions?: React.ReactNode;
|
||||
onClick?: () => void;
|
||||
ariaLabel?: string;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export const Card: React.FC<CardProps> = ({ logoUrl, title, description, actions, onClick, ariaLabel, className }) => {
|
||||
export const Card: React.FC<CardProps> = ({
|
||||
logoUrl,
|
||||
title,
|
||||
description,
|
||||
labels,
|
||||
actions,
|
||||
onClick,
|
||||
ariaLabel,
|
||||
className,
|
||||
}) => {
|
||||
const mainClassName = cx('add-data-source-item', className);
|
||||
|
||||
return (
|
||||
@ -20,6 +30,7 @@ export const Card: React.FC<CardProps> = ({ logoUrl, title, description, actions
|
||||
<div className="add-data-source-item-text-wrapper">
|
||||
<span className="add-data-source-item-text">{title}</span>
|
||||
{description && <span className="add-data-source-item-desc">{description}</span>}
|
||||
{labels && <div>{labels}</div>}
|
||||
</div>
|
||||
{actions && <div className="add-data-source-item-actions">{actions}</div>}
|
||||
</div>
|
||||
|
@ -145,36 +145,17 @@ const DataSourceTypeCard: FC<DataSourceTypeCardProps> = props => {
|
||||
{!isPhantom && <Button>Select</Button>}
|
||||
</>
|
||||
}
|
||||
className={isPhantom && 'add-data-source-item--phantom'}
|
||||
onClick={onClick}
|
||||
aria-label={e2e.pages.AddDataSource.selectors.dataSourcePlugins(plugin.name)}
|
||||
>
|
||||
<img className="add-data-source-item-logo" src={plugin.info.logos.small} />
|
||||
<div className="add-data-source-item-text-wrapper">
|
||||
<span className="add-data-source-item-text">{plugin.name}</span>
|
||||
{plugin.info.description && <span className="add-data-source-item-desc">{plugin.info.description}</span>}
|
||||
{!isPhantom && (
|
||||
labels={
|
||||
!isPhantom && (
|
||||
<div>
|
||||
<PluginSignatureBadge status={plugin.signature} />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="add-data-source-item-actions">
|
||||
{learnMoreLink && (
|
||||
<LinkButton
|
||||
variant="secondary"
|
||||
href={`${learnMoreLink.url}?utm_source=grafana_add_ds`}
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
onClick={onLearnMoreClick}
|
||||
icon="external-link-alt"
|
||||
>
|
||||
{learnMoreLink.name}
|
||||
</LinkButton>
|
||||
)}
|
||||
{!isPhantom && <Button>Select</Button>}
|
||||
</div>
|
||||
</Card>
|
||||
)
|
||||
}
|
||||
className={isPhantom && 'add-data-source-item--phantom'}
|
||||
onClick={onClick}
|
||||
aria-label={e2e.pages.AddDataSource.selectors.dataSourcePlugins(plugin.name)}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user