mirror of
https://github.com/grafana/grafana.git
synced 2025-08-01 02:51:49 +08:00

committed by
Torkel Ödegaard

parent
40b771c04d
commit
16d5df1cba
@ -7,24 +7,12 @@ interface Props {
|
|||||||
|
|
||||||
const PluginListItem: FC<Props> = props => {
|
const PluginListItem: FC<Props> = props => {
|
||||||
const { plugin } = props;
|
const { plugin } = props;
|
||||||
let icon;
|
|
||||||
|
|
||||||
if (plugin.type === 'datasource') {
|
|
||||||
icon = 'gicon gicon-datasources';
|
|
||||||
} else if (plugin.type === 'panel') {
|
|
||||||
icon = 'icon-gf icon-gf-panel';
|
|
||||||
} else {
|
|
||||||
icon = 'icon-gf icon-gf-apps';
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<li className="card-item-wrapper">
|
<li className="card-item-wrapper">
|
||||||
<a className="card-item" href={`plugins/${plugin.id}/`}>
|
<a className="card-item" href={`plugins/${plugin.id}/`}>
|
||||||
<div className="card-item-header">
|
<div className="card-item-header">
|
||||||
<div className="card-item-type">
|
<div className="card-item-type">{plugin.type}</div>
|
||||||
<i className={icon} />
|
|
||||||
{plugin.type}
|
|
||||||
</div>
|
|
||||||
{plugin.hasUpdate && (
|
{plugin.hasUpdate && (
|
||||||
<div className="card-item-notice">
|
<div className="card-item-notice">
|
||||||
<span bs-tooltip="plugin.latestVersion">Update available!</span>
|
<span bs-tooltip="plugin.latestVersion">Update available!</span>
|
||||||
|
@ -14,9 +14,6 @@ exports[`Render should render component 1`] = `
|
|||||||
<div
|
<div
|
||||||
className="card-item-type"
|
className="card-item-type"
|
||||||
>
|
>
|
||||||
<i
|
|
||||||
className="icon-gf icon-gf-panel"
|
|
||||||
/>
|
|
||||||
panel
|
panel
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -63,9 +60,6 @@ exports[`Render should render has plugin section 1`] = `
|
|||||||
<div
|
<div
|
||||||
className="card-item-type"
|
className="card-item-type"
|
||||||
>
|
>
|
||||||
<i
|
|
||||||
className="icon-gf icon-gf-panel"
|
|
||||||
/>
|
|
||||||
panel
|
panel
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
Reference in New Issue
Block a user