Hi!
My Feedback:
Please create option to go to specfic page in logs of specific job. I really miss the option to skip for.ex 20 page to see logs on page 21.
Question:
Is it possible to manipulate link in browser to skip some pages in logs of the job? Right now, when I am opening specific job and changing index it is not allowing me to follow that url - webpage is reloading and index automatically changing to ‘0’.
My Orchestrator: 2022.10.2 (on premise)
Create URL possible solution:
I am building solution to generate links to log page from robots. My idea:
- robot in case of any error is sending mail with error detail.
- inside workflow there would be an activity to create url.
- URL created by activity will be pasted to mail message body.
Activity:
- Get information about job - Orchestrator HTTP Request.
"/odata/Jobs?%24filter=HostMachineName%20eq%20'"+Envirnonment.MachineName+"'%20and%20State%20in%20('Running'%2C'Stopping')&%24select=OrganizationUnitId%2CId%2CStartTime"
- From response I would get :
-
StartTime: cdate(J_Job(“value”).First()(“StartTime”))
-
Folder ID: J_Job(“value”).First()(“OrganizationUnitId”)
-
Job ID: J_Job(“value”).First()(“Id”)
-
endpoint: J_Job(“@odata.context”)
J_Job is var JObject. It was deserialized from Orchestrator HTTP Request response
- Next I would send count request:
"/odata/RobotLogs?%24filter=HostMachineName%20eq%20'"+Envirnonment.MachineName+"'%20AND%20TimeStamp%20gt%<STARTTIME>%20&%24top=1&%24count=true"
where <STARTTIME>
is value replaced with StartTime taken with the first request
- I will get count from second call:
int_Logs = cint(J_Logs("@odata.count"))
- I will count pages
int_PageSize = 25 (other possible values - 10 or 50)
Index = if (int_Logs mod int_PageSize = 0,cint(int_Logs /int_PageSize) - 1,cint(Math.Floor(int_Logs/int_PageSize)))
- With all that info I will create the link:
<endpoint>jobs/<Job_ID>/logs?tid=1&fid=<Folder_ID>&index=<Index>&size=<Page_Size>
I know that few people were looking for this kind of solution so I share (but it will not work entirely because of the behaviour I described in my question). At least link would be directing to logs of desired job, and I am going to paste index of the page also as an information in mail, so it would be possible to click multiple times to exact page where the log would be displayed.
@loginerror - tag for taking attention