Leftover cleanup from 3.1 back to devel

This commit is contained in:
Michael Abashian
2017-02-28 12:03:33 -05:00
parent 1fefa4cfdd
commit bfcbd8a823
3 changed files with 5 additions and 11 deletions

View File

@@ -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;
}); });
} }
}); });

View File

@@ -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;

View File

@@ -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;
}); });
}; };