diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2012-12-26 13:30:42 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2012-12-26 13:30:42 +0100 |
commit | 348ec4e14aeaf4e98fcab96f0ae7242d178db69b (patch) | |
tree | 642b16e2fa6ffcfaf1429571d2f4771acc620e2e /src/main/webapp | |
parent | 97b1b1eeacd72845cc7065c86d68444881370275 (diff) | |
download | esper-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')
-rw-r--r-- | src/main/webapp/WEB-INF/tags/common/head-element.tagx | 2 | ||||
-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 | ||||
-rw-r--r-- | src/main/webapp/index.jspx | 51 | ||||
-rw-r--r-- | src/main/webapp/shiro.jspx | 45 |
7 files changed, 102 insertions, 43 deletions
diff --git a/src/main/webapp/WEB-INF/tags/common/head-element.tagx b/src/main/webapp/WEB-INF/tags/common/head-element.tagx index 5321612..e552b7b 100644 --- a/src/main/webapp/WEB-INF/tags/common/head-element.tagx +++ b/src/main/webapp/WEB-INF/tags/common/head-element.tagx @@ -15,7 +15,7 @@ <script type="text/javascript" src="/external/headjs-0.99/head.min.js"><!-- --></script> <script type="text/javascript"> head.js( - {jquery: "/external/jquery-1.8.3/jquery.js"}, + {jquery: "/external/jquery-1.7.1.js"}, {angularjs: "/external/angular-1.0.3/angular.js"}, {angularjsResource: "/external/angular-1.0.3/angular-resource.js"} ); 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'}); diff --git a/src/main/webapp/index.jspx b/src/main/webapp/index.jspx index 113d10e..ee4ff63 100644 --- a/src/main/webapp/index.jspx +++ b/src/main/webapp/index.jspx @@ -1,56 +1,25 @@ <html xmlns:common="urn:jsptagdir:/WEB-INF/tags/common" xmlns:jsp="http://java.sun.com/JSP/Page" - xmlns:shiro="http://shiro.apache.org/tags"> + ng-app="frontPageApp"> <jsp:output doctype-root-element="HTML" doctype-system="about:legacy-compat"/> <jsp:directive.page contentType="text/html;charset=UTF-8"/> -<common:head-element/> +<common:head-element> + <common:headjs label="PersonService" resource="/apps/core/PersonService.js"/> + <common:headjs label="frontPageApp" resource="/apps/frontPageApp/frontPageApp.js"/> +</common:head-element> <body> +<!-- <div id="content"> - <!-- - <div class="hero-unit"> - <div class="container"> - <h1>Fin header</h1> - - <p> - Awesome - </p> - </div> - </div> - --> - - <div class="container"> - <div class="page-header"> - <h1>Shiro Values</h1> - </div> - - <p> - <table> - <tr> - <th>guest</th> - <td><shiro:guest>Yes</shiro:guest></td> - </tr> - <tr> - <th>authenticated</th> - <td><shiro:authenticated>Yes</shiro:authenticated></td> - </tr> - <tr> - <th>notAuthenticated</th> - <td><shiro:notAuthenticated>Yes</shiro:notAuthenticated></td> - </tr> - <tr> - <th>principal</th> - <td><shiro:principal>Yes</shiro:principal></td> - </tr> - </table> - </p> - </div> - + <div class="container" ng-view=""><!– –></div> </div> +--> +<div id="content" ng-view=""><!-- --></div> <common:footer/> + </body> </html> diff --git a/src/main/webapp/shiro.jspx b/src/main/webapp/shiro.jspx new file mode 100644 index 0000000..590f313 --- /dev/null +++ b/src/main/webapp/shiro.jspx @@ -0,0 +1,45 @@ +<html xmlns:common="urn:jsptagdir:/WEB-INF/tags/common" + xmlns:jsp="http://java.sun.com/JSP/Page" + xmlns:shiro="http://shiro.apache.org/tags"> +<jsp:output doctype-root-element="HTML" doctype-system="about:legacy-compat"/> +<jsp:directive.page contentType="text/html;charset=UTF-8"/> + +<common:head-element/> + +<body> + +<div id="content"> + + <div class="container"> + <div class="page-header"> + <h1>Shiro Values</h1> + </div> + + <p> + <table> + <tr> + <th>guest</th> + <td><shiro:guest>Yes</shiro:guest></td> + </tr> + <tr> + <th>authenticated</th> + <td><shiro:authenticated>Yes</shiro:authenticated></td> + </tr> + <tr> + <th>notAuthenticated</th> + <td><shiro:notAuthenticated>Yes</shiro:notAuthenticated></td> + </tr> + <tr> + <th>principal</th> + <td><shiro:principal>Yes</shiro:principal></td> + </tr> + </table> + </p> + </div> + +</div> + +<common:footer/> +</body> + +</html> |