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.
21 lines
691 B
21 lines
691 B
import React from 'react';
|
|
import { FuncDefs, FuncInstance } from '../gfunc';
|
|
import { GraphiteFunctionEditor } from './GraphiteFunctionEditor';
|
|
import { AddGraphiteFunction } from './AddGraphiteFunction';
|
|
import { SegmentSection } from '@grafana/ui';
|
|
|
|
type Props = {
|
|
functions: FuncInstance[];
|
|
funcDefs: FuncDefs;
|
|
};
|
|
|
|
export function FunctionsSection({ functions = [], funcDefs }: Props) {
|
|
return (
|
|
<SegmentSection label="Functions" fill={true}>
|
|
{functions.map((func: FuncInstance, index: number) => {
|
|
return !func.hidden && <GraphiteFunctionEditor key={index} func={func} />;
|
|
})}
|
|
<AddGraphiteFunction funcDefs={funcDefs} />
|
|
</SegmentSection>
|
|
);
|
|
}
|
|
|