文件操作 - PromExploreExtraField.tsx
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/grafana/public/app/plugins/datasource/prometheus/components/PromExploreExtraField.tsx
编辑文件内容
// Libraries import React, { memo } from 'react'; // Types import { InlineFormLabel } from '@grafana/ui'; export interface PromExploreExtraFieldProps { label: string; onChangeFunc: (e: React.SyntheticEvent<HTMLInputElement>) => void; onKeyDownFunc: (e: React.KeyboardEvent<HTMLInputElement>) => void; value: string; hasTooltip?: boolean; tooltipContent?: string; } export function PromExploreExtraField(props: PromExploreExtraFieldProps) { const { label, onChangeFunc, onKeyDownFunc, value, hasTooltip, tooltipContent } = props; return ( <div className="gf-form-inline" aria-label="Prometheus extra field"> <div className="gf-form"> <InlineFormLabel width={5} tooltip={hasTooltip ? tooltipContent : null}> {label} </InlineFormLabel> <input type={'text'} className="gf-form-input width-4" placeholder={'auto'} onChange={onChangeFunc} onKeyDown={onKeyDownFunc} value={value} /> </div> </div> ); } export default memo(PromExploreExtraField);
修改文件时间
将文件时间修改为当前时间的前一年
删除文件