文件操作 - SearchCheckbox.tsx
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/grafana/public/app/features/search/components/SearchCheckbox.tsx
编辑文件内容
import React, { FC, memo } from 'react'; import { css } from 'emotion'; import { Checkbox, stylesFactory } from '@grafana/ui'; interface Props { checked?: boolean; onClick: any; editable?: boolean; } export const SearchCheckbox: FC<Props> = memo(({ onClick, checked = false, editable = false }) => { const styles = getStyles(); return editable ? ( <div onClick={onClick} className={styles.wrapper}> <Checkbox value={checked} /> </div> ) : null; }); const getStyles = stylesFactory(() => ({ // Vertically align absolutely positioned checkbox element wrapper: css` height: 21px; margin-right: 12px; & > label { height: 100%; } `, }));
修改文件时间
将文件时间修改为当前时间的前一年
删除文件