-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
351 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
var appConfig = { | ||
|
||
'version': '1.0.0', | ||
'version': '1.0.0', | ||
|
||
'allowAnonymous': true, | ||
'allowAnonymous': true, | ||
|
||
'anonymousRole': 'ROLE_ANONYMOUS', | ||
'anonymousRole': 'ROLE_ANONYMOUS', | ||
|
||
// Set this to the webService if mocking AuthService | ||
// Set this to the webService if mocking AuthService | ||
|
||
'authService': 'https://labs.library.tamu.edu/auth3', | ||
'webService': 'http://localhost:9001', | ||
'authService': 'https://labs.library.tamu.edu/auth3', | ||
'webService': 'http://localhost:9001', | ||
|
||
'storageType': 'session', | ||
'storageType': 'session', | ||
|
||
'logging': { | ||
'log': true, | ||
'info': true, | ||
'warn': true, | ||
'error': true, | ||
'debug': true | ||
}, | ||
'logging': { | ||
'log': true, | ||
'info': true, | ||
'warn': true, | ||
'error': true, | ||
'debug': true | ||
}, | ||
|
||
'stompDebug': false, | ||
'stompDebug': false, | ||
|
||
/* | ||
Determines the type of connection stomp will attempt to make with the service. | ||
TYPES: websocket, xhr-streaming, xdr-streaming, eventsource, iframe-eventsource, | ||
htmlfile, iframe-htmlfile, xhr-polling, xdr-polling, iframe-xhr-polling, | ||
jsonp-polling | ||
*/ | ||
'sockJsConnectionType': ['websocket', 'xhr-streaming', 'xhr-polling', 'xdr-streaming', 'xdr-polling', 'iframe-eventsource', 'iframe-htmlfile', 'jsonp-polling'], | ||
/* | ||
Determines the type of connection stomp will attempt to make with the service. | ||
TYPES: websocket, xhr-streaming, xdr-streaming, eventsource, iframe-eventsource, | ||
htmlfile, iframe-htmlfile, xhr-polling, xdr-polling, iframe-xhr-polling, | ||
jsonp-polling | ||
*/ | ||
'sockJsConnectionType': ['websocket', 'xhr-streaming', 'xhr-polling', 'xdr-streaming', 'xdr-polling', 'iframe-eventsource', 'iframe-htmlfile', 'jsonp-polling'], | ||
|
||
// Set this to 'admin' or 'user' if using mock AuthService | ||
// otherwise set to null or false | ||
// Set this to 'admin' or 'user' if using mock AuthService | ||
// otherwise set to null or false | ||
|
||
'mockRole': null | ||
'mockRole': null | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
app.service('ProjectsStatsService', function ($q, WsApi) { | ||
|
||
var projectsStats = []; | ||
|
||
var defer = $q.defer(); | ||
|
||
var process = function (response) { | ||
var apiRes = angular.fromJson(response.body); | ||
if (apiRes.meta.status === 'SUCCESS') { | ||
angular.extend(projectsStats, apiRes.payload['ArrayList<ProjectStats>']); | ||
defer.resolve(); | ||
} else { | ||
console.error(apiRes.meta); | ||
throw "Unable to retrieve remote projects"; | ||
} | ||
}; | ||
|
||
WsApi.listen(apiMapping.ProjectsStats.listen).then(null, null, function (response) { | ||
process(response); | ||
}); | ||
|
||
this.refreshProjectsStats = function () { | ||
WsApi.fetch(apiMapping.ProjectsStats.all).then(function (response) { | ||
process(response); | ||
}); | ||
}; | ||
|
||
this.getProjectsStats = function () { | ||
return projectsStats; | ||
}; | ||
|
||
this.getById = function (id) { | ||
return $q(function (resolve, reject) { | ||
this.ready.then(function () { | ||
for (var i in projectsStats) { | ||
if (projectsStats[i].id == id) { | ||
resolve(projectsStats[i]); | ||
} | ||
} | ||
}); | ||
}.bind(this)); | ||
}; | ||
|
||
this.refreshProjectsStats(); | ||
|
||
this.ready = defer.promise; | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.