diff options
Diffstat (limited to 'src/main/webapp/apps')
-rw-r--r-- | src/main/webapp/apps/core/PersonService.js | 9 | ||||
-rw-r--r-- | src/main/webapp/apps/frontPageApp/frontPage.html | 24 | ||||
-rw-r--r-- | src/main/webapp/apps/frontPageApp/frontPageApp.js | 12 | ||||
-rw-r--r-- | src/main/webapp/apps/jenkinsApp/JenkinsServerService.js | 2 |
4 files changed, 46 insertions, 1 deletions
diff --git a/src/main/webapp/apps/core/PersonService.js b/src/main/webapp/apps/core/PersonService.js new file mode 100644 index 0000000..75265a8 --- /dev/null +++ b/src/main/webapp/apps/core/PersonService.js @@ -0,0 +1,9 @@ +'use strict'; + +function PersonService($resource) { + return $resource('/resource/core/person/:uuid', {uuid: '@uuid'}); +} + +angular. + module('personService', ['ngResource']). + factory('PersonService', PersonService); diff --git a/src/main/webapp/apps/frontPageApp/frontPage.html b/src/main/webapp/apps/frontPageApp/frontPage.html new file mode 100644 index 0000000..bfa2477 --- /dev/null +++ b/src/main/webapp/apps/frontPageApp/frontPage.html @@ -0,0 +1,24 @@ +<div class="container"> + +<div class="page-header"> + <h1>Users</h1> +</div> + +<p> + <table> + <thead> + <th>Name</th> + <th>Level</th> + <th>Count</th> + <th>Progress</th> + <th>Goal</th> + </thead> + <tbody ng-repeat="person in persons"> + <tr> + <td>{{person.name}}</td> + <td>{{person.badges.length}}</td> + </tr> + </table> +</p> + +</div> diff --git a/src/main/webapp/apps/frontPageApp/frontPageApp.js b/src/main/webapp/apps/frontPageApp/frontPageApp.js new file mode 100644 index 0000000..4c5df8b --- /dev/null +++ b/src/main/webapp/apps/frontPageApp/frontPageApp.js @@ -0,0 +1,12 @@ +'use strict'; + +var frontPageApp = angular.module('frontPageApp', ['personService']).config(function ($routeProvider, $locationProvider) { + $routeProvider. + when('/', {controller: FrontPageCtrl, templateUrl: '/apps/frontPageApp/frontPage.html?noCache=' + noCache}); +}); + +function FrontPageCtrl($scope, $location, PersonService) { + PersonService.query(function (persons) { + $scope.persons = persons; + }); +} diff --git a/src/main/webapp/apps/jenkinsApp/JenkinsServerService.js b/src/main/webapp/apps/jenkinsApp/JenkinsServerService.js index 054a9bb..b26c9b1 100644 --- a/src/main/webapp/apps/jenkinsApp/JenkinsServerService.js +++ b/src/main/webapp/apps/jenkinsApp/JenkinsServerService.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; function JenkinsServerService($resource) { return $resource('/resource/jenkins/server/:uuid', {uuid: '@uuid'}); |