|
|
@ -1,6 +1,7 @@ |
|
|
|
import { getLocalHostUUID } from '../../accessModule'; |
|
|
|
import { getLocalHostUUID } from '../../accessModule'; |
|
|
|
import { buildQueryResultReducer } from '../../buildQueryResultModifier'; |
|
|
|
|
|
|
|
import buildGetRequestHandler from '../buildGetRequestHandler'; |
|
|
|
import buildGetRequestHandler from '../buildGetRequestHandler'; |
|
|
|
|
|
|
|
import { buildQueryResultReducer } from '../../buildQueryResultModifier'; |
|
|
|
|
|
|
|
import { match } from '../../match'; |
|
|
|
import { sanitizeQS } from '../../sanitizeQS'; |
|
|
|
import { sanitizeQS } from '../../sanitizeQS'; |
|
|
|
|
|
|
|
|
|
|
|
type BuildQuerySubFunction = (result: Parameters<BuildQueryFunction>[0]) => { |
|
|
|
type BuildQuerySubFunction = (result: Parameters<BuildQueryFunction>[0]) => { |
|
|
@ -18,11 +19,11 @@ const MAP_TO_HANDLER: Record<string, BuildQuerySubFunction> = { |
|
|
|
afterQueryReturn: buildQueryResultReducer<{ |
|
|
|
afterQueryReturn: buildQueryResultReducer<{ |
|
|
|
[hostUUID: string]: { |
|
|
|
[hostUUID: string]: { |
|
|
|
[stateUUID: string]: { |
|
|
|
[stateUUID: string]: { |
|
|
|
|
|
|
|
badFile: string; |
|
|
|
|
|
|
|
badLine: number; |
|
|
|
hostName: string; |
|
|
|
hostName: string; |
|
|
|
hostUUID: string; |
|
|
|
hostUUID: string; |
|
|
|
ipAddress: string; |
|
|
|
ipAddress: string; |
|
|
|
stateName: string; |
|
|
|
|
|
|
|
stateNote: string; |
|
|
|
|
|
|
|
stateUUID: string; |
|
|
|
stateUUID: string; |
|
|
|
}; |
|
|
|
}; |
|
|
|
}; |
|
|
|
}; |
|
|
@ -33,12 +34,18 @@ const MAP_TO_HANDLER: Record<string, BuildQuerySubFunction> = { |
|
|
|
previous[hostUUIDKey] = {}; |
|
|
|
previous[hostUUIDKey] = {}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const ipAddress = stateName.slice(HOST_KEY_CHANGED_PREFIX.length); |
|
|
|
|
|
|
|
const [, badFile, badLine = '0'] = match( |
|
|
|
|
|
|
|
stateNote, |
|
|
|
|
|
|
|
/file=([^\s]+),line=(\d+)/, |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
previous[hostUUIDKey][stateUUID] = { |
|
|
|
previous[hostUUIDKey][stateUUID] = { |
|
|
|
|
|
|
|
badFile, |
|
|
|
|
|
|
|
badLine: parseInt(badLine), |
|
|
|
hostName, |
|
|
|
hostName, |
|
|
|
hostUUID, |
|
|
|
hostUUID, |
|
|
|
ipAddress: stateName.slice(HOST_KEY_CHANGED_PREFIX.length), |
|
|
|
ipAddress, |
|
|
|
stateName, |
|
|
|
|
|
|
|
stateNote, |
|
|
|
|
|
|
|
stateUUID, |
|
|
|
stateUUID, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|