Loading lib/galaxy/webapps/galaxy/api/jobs.py +1 −1 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ UserIdQueryParam: Optional[DecodedDatabaseIdField] = Query( ) ViewQueryParam: JobIndexViewEnum = Query( default="collection", default=JobIndexViewEnum.collection, title="View", description="Determines columns to return. Defaults to 'collection'.", ) Loading lib/galaxy/webapps/galaxy/services/jobs.py +2 −2 Original line number Diff line number Diff line Loading @@ -86,7 +86,7 @@ class JobsService(ServiceBase): # TODO: optimize if this crucial if check_security_of_jobs and not security_check(trans, job.history, check_accessible=True): raise exceptions.ItemAccessibilityException("Cannot access the request job objects.") job_dict = job.to_dict(view, system_details=is_admin) job_dict = job.to_dict(view.value, system_details=is_admin) if view == JobIndexViewEnum.admin_job_list: job_dict["decoded_job_id"] = job.id if user_details: Loading @@ -97,7 +97,7 @@ class JobsService(ServiceBase): def _check_nonadmin_access( self, view: str, view: JobIndexViewEnum, user_details: bool, decoded_user_id: Optional[DecodedDatabaseIdField], trans_user_id: Optional[int], Loading lib/galaxy_test/api/test_jobs.py +18 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,24 @@ class TestJobsApi(ApiTestCase, TestsTools): job = jobs[0] self._assert_has_keys(job, "command_line", "external_id", "handler") @pytest.mark.require_new_history def test_job_list_collection_view(self, history_id): self.__history_with_new_dataset(history_id) jobs_response = self._get("jobs?view=collection") self._assert_status_code_is_ok(jobs_response) jobs = jobs_response.json() job = jobs[0] self._assert_has_keys(job, "id", "tool_id", "state") @pytest.mark.require_new_history def test_job_list_default_view(self, history_id): self.__history_with_new_dataset(history_id) jobs_response = self._get(f"jobs?history_id={history_id}") self._assert_status_code_is_ok(jobs_response) jobs = jobs_response.json() job = jobs[0] self._assert_has_keys(job, "id", "tool_id", "state") @pytest.mark.require_new_history def test_index_state_filter(self, history_id): # Initial number of ok jobs Loading Loading
lib/galaxy/webapps/galaxy/api/jobs.py +1 −1 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ UserIdQueryParam: Optional[DecodedDatabaseIdField] = Query( ) ViewQueryParam: JobIndexViewEnum = Query( default="collection", default=JobIndexViewEnum.collection, title="View", description="Determines columns to return. Defaults to 'collection'.", ) Loading
lib/galaxy/webapps/galaxy/services/jobs.py +2 −2 Original line number Diff line number Diff line Loading @@ -86,7 +86,7 @@ class JobsService(ServiceBase): # TODO: optimize if this crucial if check_security_of_jobs and not security_check(trans, job.history, check_accessible=True): raise exceptions.ItemAccessibilityException("Cannot access the request job objects.") job_dict = job.to_dict(view, system_details=is_admin) job_dict = job.to_dict(view.value, system_details=is_admin) if view == JobIndexViewEnum.admin_job_list: job_dict["decoded_job_id"] = job.id if user_details: Loading @@ -97,7 +97,7 @@ class JobsService(ServiceBase): def _check_nonadmin_access( self, view: str, view: JobIndexViewEnum, user_details: bool, decoded_user_id: Optional[DecodedDatabaseIdField], trans_user_id: Optional[int], Loading
lib/galaxy_test/api/test_jobs.py +18 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,24 @@ class TestJobsApi(ApiTestCase, TestsTools): job = jobs[0] self._assert_has_keys(job, "command_line", "external_id", "handler") @pytest.mark.require_new_history def test_job_list_collection_view(self, history_id): self.__history_with_new_dataset(history_id) jobs_response = self._get("jobs?view=collection") self._assert_status_code_is_ok(jobs_response) jobs = jobs_response.json() job = jobs[0] self._assert_has_keys(job, "id", "tool_id", "state") @pytest.mark.require_new_history def test_job_list_default_view(self, history_id): self.__history_with_new_dataset(history_id) jobs_response = self._get(f"jobs?history_id={history_id}") self._assert_status_code_is_ok(jobs_response) jobs = jobs_response.json() job = jobs[0] self._assert_has_keys(job, "id", "tool_id", "state") @pytest.mark.require_new_history def test_index_state_filter(self, history_id): # Initial number of ok jobs Loading