aboutsummaryrefslogtreecommitdiff
path: root/src/main/webapp/apps
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2012-12-26 13:30:42 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2012-12-26 13:30:42 +0100
commit348ec4e14aeaf4e98fcab96f0ae7242d178db69b (patch)
tree642b16e2fa6ffcfaf1429571d2f4771acc620e2e /src/main/webapp/apps
parent97b1b1eeacd72845cc7065c86d68444881370275 (diff)
downloadesper-testing-348ec4e14aeaf4e98fcab96f0ae7242d178db69b.tar.gz
esper-testing-348ec4e14aeaf4e98fcab96f0ae7242d178db69b.tar.bz2
esper-testing-348ec4e14aeaf4e98fcab96f0ae7242d178db69b.tar.xz
esper-testing-348ec4e14aeaf4e98fcab96f0ae7242d178db69b.zip
o Starting on a better front page.
Diffstat (limited to 'src/main/webapp/apps')
-rw-r--r--src/main/webapp/apps/core/PersonService.js9
-rw-r--r--src/main/webapp/apps/frontPageApp/frontPage.html24
-rw-r--r--src/main/webapp/apps/frontPageApp/frontPageApp.js12
-rw-r--r--src/main/webapp/apps/jenkinsApp/JenkinsServerService.js2
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'});