import React, { FC } from 'react'; import { Button, Icon } from '@grafana/ui'; import { PluginDashboard } from '../../types'; export interface Props { dashboards: PluginDashboard[]; onImport: (dashboard: PluginDashboard, overwrite: boolean) => void; onRemove: (dashboard: PluginDashboard) => void; } const DashboardsTable: FC = ({ dashboards, onImport, onRemove }) => { function buttonText(dashboard: PluginDashboard) { return dashboard.revision !== dashboard.importedRevision ? 'Update' : 'Re-import'; } return ( {dashboards.map((dashboard, index) => { return ( ); })}
{dashboard.imported ? ( {dashboard.title} ) : ( {dashboard.title} )} {!dashboard.imported ? ( ) : ( )} {dashboard.imported && (
); }; export default DashboardsTable;