Telegraf plugins alphabetized in the sidebar
parent
b033bd2ed8
commit
f4a291d1ff
|
@ -361,9 +361,9 @@ describe('dataLoader reducer', () => {
|
|||
const expected = {
|
||||
...INITIAL_STATE,
|
||||
telegrafPlugins: [
|
||||
redisTelegrafPlugin,
|
||||
diskTelegrafPlugin,
|
||||
cpuTelegrafPlugin,
|
||||
diskTelegrafPlugin,
|
||||
redisTelegrafPlugin,
|
||||
],
|
||||
}
|
||||
|
||||
|
|
|
@ -78,9 +78,12 @@ export default (state = INITIAL_STATE, action: Action): DataLoadersState => {
|
|||
case 'ADD_TELEGRAF_PLUGINS':
|
||||
return {
|
||||
...state,
|
||||
telegrafPlugins: _.uniqBy(
|
||||
[...state.telegrafPlugins, ...action.payload.telegrafPlugins],
|
||||
'name'
|
||||
telegrafPlugins: _.sortBy(
|
||||
_.uniqBy(
|
||||
[...state.telegrafPlugins, ...action.payload.telegrafPlugins],
|
||||
'name'
|
||||
),
|
||||
['name']
|
||||
),
|
||||
}
|
||||
case 'UPDATE_TELEGRAF_PLUGIN':
|
||||
|
|
Loading…
Reference in New Issue