mirror of
https://github.com/ansible/awx.git
synced 2026-03-01 08:48:46 -03:30
Merge pull request #395 from jaredevantabor/404-session-end
catch possible 404 error
This commit is contained in:
@@ -21,7 +21,18 @@ function JobStatusGraphData(Rest, getBasePath, processErrors, $rootScope, $q) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getData(period, jobType) {
|
function getData(period, jobType) {
|
||||||
var url = getBasePath('dashboard')+'graphs/jobs/?period='+period+'&job_type='+jobType;
|
var url, dash_path = getBasePath('dashboard');
|
||||||
|
if(dash_path === '' ){
|
||||||
|
processErrors(null,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null, {
|
||||||
|
hdr: 'Error!',
|
||||||
|
msg: "There was an error. Please try again."
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
url = dash_path + 'graphs/jobs/?period='+period+'&job_type='+jobType;
|
||||||
Rest.setUrl(url);
|
Rest.setUrl(url);
|
||||||
var result = Rest.get()
|
var result = Rest.get()
|
||||||
.catch(function(response) {
|
.catch(function(response) {
|
||||||
|
|||||||
Reference in New Issue
Block a user