perf: 删除job-execution/asset-detail接口

This commit is contained in:
wangruidong
2024-03-18 17:32:25 +08:00
committed by 老广
parent 80a506e99f
commit 90d4914280
3 changed files with 1 additions and 53 deletions

View File

@@ -23,8 +23,7 @@ from ops.models import Job, JobExecution
from ops.serializers.job import JobSerializer, JobExecutionSerializer, FileSerializer, JobTaskStopSerializer
__all__ = [
'JobViewSet', 'JobExecutionViewSet', 'JobRunVariableHelpAPIView',
'JobAssetDetail', 'JobExecutionTaskDetail', 'UsernameHintsAPI'
'JobViewSet', 'JobExecutionViewSet', 'JobRunVariableHelpAPIView', 'JobExecutionTaskDetail', 'UsernameHintsAPI'
]
from ops.tasks import run_ops_job_execution
@@ -226,17 +225,6 @@ class JobExecutionViewSet(OrgBulkModelViewSet):
return Response({'task_id': task_id}, status=200)
class JobAssetDetail(APIView):
rbac_perms = {
'get': ['ops.view_jobexecution'],
}
def get(self, request, **kwargs):
execution_id = request.query_params.get('execution_id', '')
execution = get_object_or_404(JobExecution, id=execution_id, creator=request.user)
return Response(data=execution.assent_result_detail)
class JobExecutionTaskDetail(APIView):
rbac_perms = {
'GET': ['ops.view_jobexecution'],