Skip to content

Commit bb10cd0

Browse files
authored
Merge pull request #925 from ercole-io/fix-bugs
Fixing agnets with no data days value
2 parents be90442 + c8fc8cd commit bb10cd0

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/store/modules/troubleshooting/troubleshooting.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import _ from 'lodash'
12
import { axiosRequest } from '@/services/services.js'
23

34
export const state = () => ({
@@ -10,7 +11,16 @@ export const getters = {}
1011

1112
export const mutations = {
1213
SET_NO_DATA_AGENTS: (state, payload) => {
13-
state.noDataAgents = payload
14+
const getDays = _.map(payload, (val) => {
15+
let days = _.split(val.description, ' ')
16+
17+
return {
18+
...val,
19+
daysFromCreation: _.nth(days, -2),
20+
}
21+
})
22+
23+
state.noDataAgents = getDays
1424
},
1525
SET_MISSING_DBS: (state, payload) => {
1626
state.missingDbs = payload

0 commit comments

Comments
 (0)