Description
Follow this logic and display better message:
On loading app details page, send a request to <ats-address>/ws/v1/timeline/TEZ_APPLICATION/tez_<app-id>
- If it succeed, display the details page as we do now.
- If it fails, send a request to <ats-address>/ws/v1/timeline/TEZ_DAG_ID?primaryFilter=applicationId%3A<app-id>
- If it succeed, then we know that DAGs under the app are available and assume that the user doesn't have permission to access app level data.
- If AHS is accessible, display application data from there in the details page.
- else if AHS is not accessible, display a message in app details tab, something like "Data is not available. Check if you are authorized to access application data!".
- Also display the DAGs tab, for the user to see DAGs under that app.
- If it fails, display error message as we do now.
- If it succeed, then we know that DAGs under the app are available and assume that the user doesn't have permission to access app level data.