aboutsummaryrefslogtreecommitdiff
path: root/captain/requtils.f90
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2021-05-06 16:00:59 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2021-05-06 16:00:59 -0400
commit55870299e41492ee8ab6c50116061f48f06fcd7d (patch)
tree046ea3e9d4dffe186dff78c3b5fb7d87aca9d08c /captain/requtils.f90
parenta67622fdc0dbe7f6be04667663f58b31fbf30a8d (diff)
downloadlevitating-55870299e41492ee8ab6c50116061f48f06fcd7d.tar.gz
levitating-55870299e41492ee8ab6c50116061f48f06fcd7d.zip
Individual job results can now be displayed via CGI
Diffstat (limited to 'captain/requtils.f90')
-rw-r--r--captain/requtils.f9026
1 files changed, 26 insertions, 0 deletions
diff --git a/captain/requtils.f90 b/captain/requtils.f90
index 742f8ac..b28500e 100644
--- a/captain/requtils.f90
+++ b/captain/requtils.f90
@@ -283,4 +283,30 @@ contains
end function render_jobs_links
+ subroutine get_job_page_title(req, title)
+ use captain_db
+ use server_response
+ implicit none
+
+ type(request), intent(in)::req
+ character(*), intent(out)::title
+
+ integer::job_id, i
+ character(32)::job_text
+ character(PLAYER_NAME_LENGTH)::instruction_name
+
+ ! All this to get the job id
+ call req%last_component(job_text)
+ i = index(job_text, ".")
+ job_text(i:len(job_text)) = " "
+ read(job_text, '(I8)') job_id
+
+ ! Request instruction name
+ i = get_job_instruction(job_id)
+ call get_instruction_name(i, instruction_name)
+
+ title = "Job "//trim(job_text)//" - "//trim(instruction_name)
+
+ end subroutine get_job_page_title
+
end module request_utils \ No newline at end of file