You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/app/react/kubernetes/datatables/DefaultDatatableSettings.tsx

42 lines
963 B

import { TableSettingsMenuAutoRefresh } from '@@/datatables/TableSettingsMenuAutoRefresh';
import {
BasicTableSettings,
RefreshableTableSettings,
} from '@@/datatables/types';
import {
SystemResourcesSettings,
SystemResourcesTableSettings,
} from './SystemResourcesSettings';
export interface TableSettings
extends BasicTableSettings,
RefreshableTableSettings,
SystemResourcesTableSettings {}
export function DefaultDatatableSettings({
settings,
}: {
settings: TableSettings;
}) {
return (
<>
<SystemResourcesSettings
value={settings.showSystemResources}
onChange={(value) => {
settings.setShowSystemResources(value);
}}
/>
<TableSettingsMenuAutoRefresh
value={settings.autoRefreshRate}
onChange={handleRefreshRateChange}
/>
</>
);
function handleRefreshRateChange(autoRefreshRate: number) {
settings.setAutoRefreshRate(autoRefreshRate);
}
}