mirror of
https://github.com/ansible/awx.git
synced 2026-02-16 02:30:01 -03:30
Leftover cleanup from 3.1 back to devel
This commit is contained in:
@@ -52,12 +52,10 @@ export default ['$scope', '$rootScope', '$location', '$log',
|
|||||||
// Set the item type label
|
// Set the item type label
|
||||||
if (list.fields.kind && $scope.options &&
|
if (list.fields.kind && $scope.options &&
|
||||||
$scope.options.hasOwnProperty('kind')) {
|
$scope.options.hasOwnProperty('kind')) {
|
||||||
$scope.options.kind.choices.every(function(choice) {
|
$scope.options.kind.choices.forEach(function(choice) {
|
||||||
if (choice[0] === item.kind) {
|
if (choice[0] === item.kind) {
|
||||||
itm.kind_label = choice[1];
|
itm.kind_label = choice[1];
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export default ['$scope', '$compile', '$stateParams', '$rootScope', '$location',
|
|||||||
ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Failed to get dashboard host graph data: ' + status });
|
ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Failed to get dashboard host graph data: ' + status });
|
||||||
});
|
});
|
||||||
|
|
||||||
Rest.setUrl(GetBasePath("jobs") + "?order_by=-finished&page_size=5&finished__isnull=false");
|
Rest.setUrl("api/v1/unified_jobs?order_by=-finished&page_size=5&finished__isnull=false&type=workflow_job,job");
|
||||||
Rest.get()
|
Rest.get()
|
||||||
.success(function (data) {
|
.success(function (data) {
|
||||||
$scope.dashboardJobsListData = data.results;
|
$scope.dashboardJobsListData = data.results;
|
||||||
@@ -99,7 +99,7 @@ export default ['$scope', '$compile', '$stateParams', '$rootScope', '$location',
|
|||||||
.error(function (data, status) {
|
.error(function (data, status) {
|
||||||
ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Failed to get dashboard: ' + status });
|
ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Failed to get dashboard: ' + status });
|
||||||
});
|
});
|
||||||
Rest.setUrl(GetBasePath("jobs") + "?order_by=-finished&page_size=5&finished__isnull=false");
|
Rest.setUrl("api/v1/unified_jobs?order_by=-finished&page_size=5&finished__isnull=false&type=workflow_job,job");
|
||||||
Rest.get()
|
Rest.get()
|
||||||
.success(function (data) {
|
.success(function (data) {
|
||||||
data = data.results;
|
data = data.results;
|
||||||
|
|||||||
@@ -55,12 +55,10 @@ export default ['$scope', '$rootScope', '$location', '$log', '$stateParams',
|
|||||||
// Set the item type label
|
// Set the item type label
|
||||||
if (list.fields.scm_type && $scope.options &&
|
if (list.fields.scm_type && $scope.options &&
|
||||||
$scope.options.hasOwnProperty('scm_type')) {
|
$scope.options.hasOwnProperty('scm_type')) {
|
||||||
$scope.options.scm_type.choices.every(function(choice) {
|
$scope.options.scm_type.choices.forEach(function(choice) {
|
||||||
if (choice[0] === item.scm_type) {
|
if (choice[0] === item.scm_type) {
|
||||||
itm.type_label = choice[1];
|
itm.type_label = choice[1];
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -272,7 +270,7 @@ export default ['$scope', '$rootScope', '$location', '$log', '$stateParams',
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
// ignore
|
// ignore
|
||||||
}
|
}
|
||||||
$scope.projects.every(function(project) {
|
$scope.projects.forEach(function(project) {
|
||||||
if (project.id === project_id) {
|
if (project.id === project_id) {
|
||||||
if (project.scm_type === "Manual" || Empty(project.scm_type)) {
|
if (project.scm_type === "Manual" || Empty(project.scm_type)) {
|
||||||
// Do not respond. Button appears greyed out as if it is disabled. Not disabled though, because we need mouse over event
|
// Do not respond. Button appears greyed out as if it is disabled. Not disabled though, because we need mouse over event
|
||||||
@@ -283,9 +281,7 @@ export default ['$scope', '$rootScope', '$location', '$log', '$stateParams',
|
|||||||
} else {
|
} else {
|
||||||
ProjectUpdate({ scope: $scope, project_id: project.id });
|
ProjectUpdate({ scope: $scope, project_id: project.id });
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user