文件操作 - Alignments.tsx
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/grafana/public/app/plugins/datasource/cloud-monitoring/components/Alignments.tsx
编辑文件内容
import React, { FC } from 'react'; import { SelectableValue } from '@grafana/data'; import { Segment } from '@grafana/ui'; export interface Props { onChange: (perSeriesAligner: string) => void; templateVariableOptions: Array<SelectableValue<string>>; alignOptions: Array<SelectableValue<string>>; perSeriesAligner: string; } export const Alignments: FC<Props> = ({ perSeriesAligner, templateVariableOptions, onChange, alignOptions }) => { return ( <> <div className="gf-form-inline"> <div className="gf-form offset-width-9"> <label className="gf-form-label query-keyword width-15">Aligner</label> <Segment onChange={({ value }) => onChange(value!)} value={[...alignOptions, ...templateVariableOptions].find(s => s.value === perSeriesAligner)} options={[ { label: 'Template Variables', options: templateVariableOptions, }, { label: 'Alignment options', expanded: true, options: alignOptions, }, ]} placeholder="Select Alignment" ></Segment> </div> </div> </> ); };
修改文件时间
将文件时间修改为当前时间的前一年
删除文件