- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
private fun GetDeviceInfo(request: HttpServerRequest): HashMap<String, Info>
{
val deviceInfo = request.getParam(NAME_ID)?.let { id ->
(Ports.ById(id) ?: Ports.ByDeviceId(id))?.let(DeviceInfo.Companion::Create)
?: Files.FromPath(id)?.let { file ->
FileInfo.GetInfo(file)
} ?: (Core.GetTask(id) as? Scenario)?.SourceFile?.let(::FileInfo)
}
return deviceInfo?.let { hashMapOf(REQUEST_RESULT to it) } ?: hashMapOf()
}
Комментарии (15) RSS