app.controller('home.history', ['$scope', '$q', '$http', 'config', function($scope, $q, $http, config) {
	$scope.recent_deploys = []

	$scope.global_recent_deploys = function() {
		var deferred = $q.defer()

		$http.get(config.skadi_host+"/v1/deployments", c)
			.success(function(deployments) {
				deferred.resolve(deployments)
			})

		return deferred.promise
	}

	$scope.global_recent_deploys()
		.then(function(deploys) {
			$scope.recent_deploys = deploys
		})
}])
