Commit e37598e8 authored by Peter Harrison's avatar Peter Harrison

Adding Bootstrap to project

Wrote a initial example play screen for experimentation with bootstrap
and angular.
Modified Rule Controller to restrict read access to rules.
parent 185dbb8b
......@@ -101,7 +101,7 @@ public class RuleController {
return rule;
}
@PreAuthorize("hasPermission(#boardId, 'BOARD', 'READ,WRITE,ADMIN')")
@PreAuthorize("hasPermission(#boardId, 'BOARD', 'ADMIN')")
@RequestMapping(value = "/{ruleId}", method=RequestMethod.GET)
public @ResponseBody Rule getRule(@PathVariable String boardId,
@PathVariable String ruleId) throws Exception {
......@@ -109,7 +109,7 @@ public class RuleController {
return ruleCache.getItem(boardId, ruleId);
}
@PreAuthorize("hasPermission(#boardId, 'BOARD', 'READ,WRITE,ADMIN')")
@PreAuthorize("hasPermission(#boardId, 'BOARD', 'ADMIN')")
@RequestMapping(value = "", method=RequestMethod.GET)
public @ResponseBody Map<String,String> listRules(@PathVariable String boardId) throws Exception {
......@@ -152,7 +152,7 @@ public class RuleController {
return jmsTemplate;
}
@PreAuthorize("hasPermission(#boardId, 'BOARD', 'READ,WRITE,ADMIN')")
@PreAuthorize("hasPermission(#boardId, 'BOARD', 'ADMIN')")
@RequestMapping(value = "/{boardId}/processgraph", method=RequestMethod.GET)
public String processGraph(@PathVariable String boardId, Model model) throws Exception {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
require('../../js/transition.js')
require('../../js/alert.js')
require('../../js/button.js')
require('../../js/carousel.js')
require('../../js/collapse.js')
require('../../js/dropdown.js')
require('../../js/modal.js')
require('../../js/tooltip.js')
require('../../js/popover.js')
require('../../js/scrollspy.js')
require('../../js/tab.js')
require('../../js/affix.js')
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div ng-app="myApp" ng-controller="boardCtrl">
<nav class="navbar-form navbar-left navbar-inverse">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Gravity</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Board<span class="caret"></span></a>
<ul class="dropdown-menu">
<li ng-repeat="(key, value) in boards"><a href="{{key}}">{{value}}</a></li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="../navbar-fixed-top/">Logout</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
</div>
<div class="container">
<!-- Main component for a primary marketing message or call to action -->
<div class="jumbotron">
<h1>Gravity</h1>
<p>Gravity combines the simplicity and elegance of kanban boards
for controlling business workflows with a powerful automation engine
that allows businesses to eliminate repetitive electronic tasks.
It puts managers in the driving seat of their business processes.
If you are a manager frustrated with the glacial speed at which your
business processes can adapt to changing conditions you could benefit
from Gravity Workflow Automation.</p>
</div>
</div> <!-- /container -->
<script src= "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script>
var app = angular.module('myApp', []);
app.controller('boardCtrl', function($scope, $http) {
$http.get("/gravity/spring/board")
.success(function (response) {$scope.boards = response;});
});
</script>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment