mirror of
https://github.com/grafana/grafana.git
synced 2025-02-15 01:53:33 -06:00
* Add and configure eslint-plugin-import * Fix the lint:ts npm command * Autofix + prettier all the files * Manually fix remaining files * Move jquery code in jest-setup to external file to safely reorder imports * Resolve issue caused by circular dependencies within Prometheus * Update .betterer.results * Fix missing // @ts-ignore * ignore iconBundle.ts * Fix missing // @ts-ignore
33 lines
1009 B
TypeScript
33 lines
1009 B
TypeScript
import React from 'react';
|
|
|
|
import { HorizontalGroup, PluginSignatureBadge } from '@grafana/ui';
|
|
|
|
import { CatalogPlugin } from '../types';
|
|
|
|
import { PluginEnterpriseBadge, PluginDisabledBadge, PluginInstalledBadge, PluginUpdateAvailableBadge } from './Badges';
|
|
|
|
type PluginBadgeType = {
|
|
plugin: CatalogPlugin;
|
|
};
|
|
|
|
export function PluginListItemBadges({ plugin }: PluginBadgeType) {
|
|
if (plugin.isEnterprise) {
|
|
return (
|
|
<HorizontalGroup height="auto" wrap>
|
|
<PluginEnterpriseBadge plugin={plugin} />
|
|
{plugin.isDisabled && <PluginDisabledBadge error={plugin.error} />}
|
|
<PluginUpdateAvailableBadge plugin={plugin} />
|
|
</HorizontalGroup>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<HorizontalGroup height="auto" wrap>
|
|
<PluginSignatureBadge status={plugin.signature} />
|
|
{plugin.isDisabled && <PluginDisabledBadge error={plugin.error} />}
|
|
{plugin.isInstalled && <PluginInstalledBadge />}
|
|
<PluginUpdateAvailableBadge plugin={plugin} />
|
|
</HorizontalGroup>
|
|
);
|
|
}
|