mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-03 23:54:00 +01:00
40 lines
765 B
JavaScript
40 lines
765 B
JavaScript
(function() {
|
|
|
|
'use strict';
|
|
|
|
angular
|
|
.module('harbor.services.project')
|
|
.factory('StatProjectService', StatProjectService);
|
|
|
|
StatProjectService.$inject = ['$http', '$q', '$timeout'];
|
|
|
|
function StatProjectService($http, $q, $timeout) {
|
|
|
|
var mockData = {
|
|
'projects': 30,
|
|
'public_projects': 50,
|
|
'total_projects': 120,
|
|
'repositories': 50,
|
|
'public_repositories': 40,
|
|
'total_repositories': 110
|
|
};
|
|
|
|
function async() {
|
|
var deferred = $q.defer();
|
|
|
|
$timeout(function() {
|
|
deferred.resolve(mockData);
|
|
}, 500);
|
|
|
|
return deferred.promise;
|
|
}
|
|
|
|
return statProject;
|
|
|
|
function statProject() {
|
|
return async();
|
|
}
|
|
|
|
}
|
|
|
|
})(); |