feat(ui) - custom metrics - series name on delete
This commit is contained in:
parent
aae818a5e7
commit
782d6b313e
4 changed files with 8 additions and 4 deletions
|
|
@ -24,6 +24,10 @@ function SeriesName(props: Props) {
|
|||
ref.current.focus()
|
||||
}
|
||||
}, [editing])
|
||||
|
||||
useEffect(() => {
|
||||
setName(props.name)
|
||||
}, [props.name])
|
||||
|
||||
// const { name } = props;
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -47,9 +47,9 @@ function FilterList(props: Props) {
|
|||
onSelect={props.onChangeEventsOrder}
|
||||
value={{ value: filter.eventsOrder }}
|
||||
list={ [
|
||||
{ name: 'THEN', value: 'then' },
|
||||
{ name: 'AND', value: 'and' },
|
||||
{ name: 'OR', value: 'or' },
|
||||
{ name: 'THEN', value: 'then' },
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ const defaultInstance = CustomMetric({
|
|||
series: List([
|
||||
{
|
||||
name: 'Series 1',
|
||||
filter: new Filter({ filters: List(), eventsOrder: 'and' }),
|
||||
filter: new Filter({ filters: List(), eventsOrder: 'then' }),
|
||||
},
|
||||
])
|
||||
})
|
||||
|
|
@ -159,7 +159,7 @@ export const addSeries = (series = null) => (dispatch, getState) => {
|
|||
const seriesIndex = instance.series.size;
|
||||
const newSeries = series || {
|
||||
name: `Series ${seriesIndex + 1}`,
|
||||
filter: new Filter({ filters: [], eventsOrder: 'and' }),
|
||||
filter: new Filter({ filters: [], eventsOrder: 'then' }),
|
||||
};
|
||||
|
||||
dispatch({
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import Record from 'Types/Record';
|
|||
import { List } from 'immutable';
|
||||
import Filter from 'Types/filter';
|
||||
import { validateName } from 'App/validate';
|
||||
import Period, { LAST_24_HOURS, LAST_30_MINUTES, YESTERDAY, LAST_7_DAYS } from 'Types/app/period';
|
||||
import { LAST_7_DAYS } from 'Types/app/period';
|
||||
import { filterMap } from 'Duck/search';
|
||||
|
||||
export const FilterSeries = Record({
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue