Skip to content

Commit

Permalink
Merge branch 'release/3.3.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
jcarvalho committed Aug 28, 2014
2 parents 37b4919 + d8bef3e commit 39d7999
Show file tree
Hide file tree
Showing 32 changed files with 115 additions and 64 deletions.
2 changes: 1 addition & 1 deletion bennu-portal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.fenixedu</groupId>
<artifactId>bennu</artifactId>
<version>3.3.1</version>
<version>3.3.2</version>
</parent>

<artifactId>bennu-portal</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.fenixedu.bennu.core.json.JsonUpdater;
import org.fenixedu.bennu.core.json.JsonViewer;
import org.fenixedu.bennu.portal.domain.MenuContainer;
import org.fenixedu.bennu.portal.domain.MenuFunctionality;
import org.fenixedu.bennu.portal.domain.MenuItem;
import org.fenixedu.bennu.portal.domain.PortalConfiguration;
import org.fenixedu.commons.i18n.LocalizedString;
Expand Down Expand Up @@ -60,6 +61,10 @@ public JsonElement view(MenuItem obj, JsonBuilder ctx) {
json.add("title", ctx.view(PortalConfiguration.getInstance().getApplicationTitle()));
}
json.add("menu", ctx.view(container.getOrderedChild(), MenuItemAdapter.class));
} else {
MenuFunctionality functionality = obj.getAsMenuFunctionality();
json.addProperty("key", functionality.getItemKey());
json.addProperty("provider", functionality.getProvider());
}
return json;
}
Expand Down
2 changes: 1 addition & 1 deletion client/bennu-admin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.fenixedu</groupId>
<artifactId>bennu-client-aggregator</artifactId>
<version>3.3.1</version>
<version>3.3.2</version>
</parent>

<artifactId>bennu-admin</artifactId>
Expand Down
7 changes: 4 additions & 3 deletions client/bennu-admin/src/main/webapp/bennu-admin/js/menu.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
bennuAdmin.controller('MenuController', [ '$scope', '$routeParams', '$http', function($scope, $routeParams, $http) {
$scope.id = $routeParams.id;
$scope.handleError = function(data) { $scope.error = data; };
$scope.handleError = function(data) { $scope.error = data; $scope.saving = false; };
$scope.deleteSelected = function() {
if($scope.selected.id) {
$http.delete(contextPath + "/api/bennu-portal/menu/" + $scope.selected.id).success(function (data) {
Expand All @@ -20,9 +20,10 @@ bennuAdmin.controller('MenuController', [ '$scope', '$routeParams', '$http', fun
data.path = $scope.selected.path; data.parent = $scope.selected.parent;
promise = $http.post(contextPath + "/api/bennu-portal/menu", data);
}
$scope.error = null; $scope.saving = true;
promise.success(function (data) {
var node = $scope.selected.node;
$scope.selected = data;
$scope.selected = data; $scope.saving = false;
data.node = node;
node.setTitle(i18n(data.title));
}).error($scope.handleError);
Expand Down Expand Up @@ -85,7 +86,7 @@ bennuAdmin.controller('MenuController', [ '$scope', '$routeParams', '$http', fun
});
var tree = $("#tree").fancytree("getTree");
$("#tree").bind("fancytreeactivate", function(event, data) {
$scope.selected = data.node.data.item;
$scope.selected = data.node.data.item; $scope.error = null;
if(!$scope.$$phase) {
$scope.$apply();
}
Expand Down
73 changes: 49 additions & 24 deletions client/bennu-admin/src/main/webapp/bennu-admin/template/Menu.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
.fancytree-container {
outline: none;
}
#tree {
margin-top: 9px;
}
.info {
border-left: 1px solid #eee;
}
</style>

<div class="row">
Expand All @@ -21,56 +27,75 @@
</div>
</div>

<div class="col-lg-8" ng-show="selected">
<div class="col-lg-8 info" ng-show="selected">
<div class="alert alert-danger" ng-if="error">
<strong>Error: </strong>{{error.message}}{{error.stacktrace}}
</div>
<h4>{{ selected.title | i18n }} ({{ selected.fullPath }})</h4>
<h4>{{ selected.title | i18n }} ({{ selected.fullPath }})
<span class="badge pull-right">{{selected.id}}</span>
</h4>

<fieldset id="menu-form">
<fieldset id="menu-form" class="form-horizontal">
<div class="notifications top-right"></div>
<div class="form-group">
<label class="col-sm-2 control-label" for="title">Title</label>
<div class="col-sm-offset-2" ng-repeat="locale in locales">
<input type="text" lang="{{locale.tag}}" id="title" name="title" ng-model="selected.title[locale.tag]" placeholder="Title" required>
<span class="add-on">{{locale.tag}}</span>
<div class="col-sm-10">
<div class="input-group" ng-repeat="locale in locales">
<input type="text" lang="{{locale.tag}}" id="title" name="title" ng-model="selected.title[locale.tag]" placeholder="Title" class="form-control" required>
<span class="input-group-addon"><code>{{locale.tag}}</code></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="description">Description</label>
<div class="col-sm-offset-2" ng-repeat="locale in locales">
<input type="text" lang="{{locale.tag}}" id="description" name="description"
ng-model="selected.description[locale.tag]" placeholder="Description" required>
<span class="add-on">{{locale.tag}}</span>
<div class="col-sm-10">
<div ng-repeat="locale in locales" class="input-group">
<input type="text" lang="{{locale.tag}}" id="description" name="description"
ng-model="selected.description[locale.tag]" placeholder="Description" class="form-control" required>
<span class="input-group-addon"><code>{{locale.tag}}</code></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="path">Path</label>
<input type="text" name="path" ng-model="selected.path"
placeholder="Path" class="input-block-level" required ng-readonly="selected.id">
<div class="col-sm-10">
<input type="text" name="path" ng-model="selected.path"
placeholder="Path" class="form-control" required ng-readonly="selected.id">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="layout">Layout</label>
<input type="text" name="layout" ng-model="selected.layout"
placeholder="Layout" class="input-block-level" required>
<div class="col-sm-10">
<input type="text" name="layout" ng-model="selected.layout"
placeholder="Layout" class="form-control" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="visible">Visible</label>
<input type="checkbox" name="visible" ng-model="selected.visible" readonly="true">
<div class="col-sm-10">
<input type="checkbox" name="visible" ng-model="selected.visible" readonly="true">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="accessExpression">Access Expression</label>
<input type="text" name="accessExpression" data-group="advanced" ng-model="selected.accessExpression" placeholder="Access Expression" class="input-xlarge">
</div>
<div class="col-sm-offset-2">
<button ng-click="saveSelected()" class="btn btn-success btn-sm">Save</button>
<button data-target="#modal-delete-menu" role="button" class="btn btn-danger btn-sm" data-toggle="modal">Delete</button>
<span ng-if="!selected.functionality && selected.id">
<button ng-click="loadApps()" data-target="#modal-install-application" data-toggle="modal" class="btn btn-primary btn-sm">Install Application</button>
<button ng-click="createChild()" class="btn btn-primary btn-sm">Create Child</button>
</span>
<div class="col-sm-10">
<input type="text" name="accessExpression" data-group="advanced" ng-model="selected.accessExpression" placeholder="Access Expression" class="form-control">
</div>
</div>
</fieldset>
<div class="col-sm-offset-2">
<button ng-click="saveSelected()" class="btn btn-success btn-sm" ng-if="!saving">Save</button>
<button class="btn btn-success btn-sm" disabled ng-if="saving">Saving...</button>
<button data-target="#modal-delete-menu" role="button" class="btn btn-danger btn-sm" data-toggle="modal">Delete</button>
<span ng-if="!selected.functionality && selected.id">
<button ng-click="loadApps()" data-target="#modal-install-application" data-toggle="modal" class="btn btn-primary btn-sm">Install Application</button>
<button ng-click="createChild()" class="btn btn-primary btn-sm">Create Child</button>
</span>
<span ng-if="selected.functionality" class="pull-right">
<span class="label label-default" title="Provider">{{selected.provider}}</span>
<span class="label label-primary" title="Key">{{selected.key}}</span>
</span>
</div>

<div id="modal-delete-menu" class="modal fade">
<div class="modal-dialog">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ <h4>GC: {{gc.name}}</h4>
</div>

<div class="container" ng-if="threads">
<h3>Threads</h3>
<h3>Threads <button class="btn btn-default btn-xs" ng-click="threadDump()"><span class="glyphicon glyphicon-refresh"></span></button></h3>
<div class="col-lg-2">
<a href="" class="label label-primary" ng-click="threadDumpFilter = {}">All&nbsp;<span class="badge">{{threads.totalThreads}}</span></a><br />
<a href="" class="label label-success" ng-click="threadDumpFilter = {state: 'RUNNABLE'}">Runnable&nbsp;<span class="badge">{{threads.RUNNABLE}}</span></a><br />
Expand All @@ -162,7 +162,8 @@ <h3>Threads</h3>
</div>

<div class="col-lg-10">
<div class="row" ng-repeat="thread in threads.threads | filter:threadDumpFilter:true ">
<input type="text" ng-model="threadFilter" class="pull-right" placeholder="Filter"/>
<div class="row" ng-repeat="thread in threads.threads | filter:threadDumpFilter:true | filter:threadFilter">
<h5><span class="label" ng-class="getLabelClass(thread.state)">&nbsp;</span>&nbsp;<a href="" ng-click="thread.shown = !thread.shown">{{thread.name}} ({{thread.id}})</a></h5>
<pre ng-show="thread.shown" style="overflow-y: scroll">{{thread.stacktrace}}</pre>
</div>
Expand Down
2 changes: 1 addition & 1 deletion client/bennu-io-ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.fenixedu</groupId>
<artifactId>bennu-client-aggregator</artifactId>
<version>3.3.1</version>
<version>3.3.2</version>
</parent>

<artifactId>bennu-io-ui</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion client/bennu-scheduler-ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.fenixedu</groupId>
<artifactId>bennu-client-aggregator</artifactId>
<version>3.3.1</version>
<version>3.3.2</version>
</parent>

<artifactId>bennu-scheduler-ui</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ bennuScheduler.controller('LogsCtrl', ['$scope', '$http', '$routeParams', functi
$scope.reload = function () {
$http.get(url).success(function (data) {
$scope.logs = data.logs;
angular.forEach($scope.logs, function(value) { value.date = moment(value.begin).format("DD MMMM YYYY HH:mm:ss"); });
});
}
$scope.reload();
Expand Down Expand Up @@ -151,6 +152,7 @@ bennuScheduler.controller('CustomLogDetailsCtrl', ['$scope', '$http', '$routePar
$scope.refreshLog();
}
}, 3000);
$scope.codemirrorLoaded = function(_editor) { setTimeout(function() { _editor.refresh();}, 200); }
$scope.refreshLog();
}]);

Expand Down Expand Up @@ -196,6 +198,7 @@ bennuScheduler.controller('CustomTaskLogsCtrl', ['$scope', '$http', '$routeParam
$scope.reload = function () {
$http.get(url).success(function (data) {
$scope.logs = data.logs;
angular.forEach($scope.logs, function(value) { value.date = moment(value.begin).format("DD MMMM YYYY HH:mm:ss"); });
});
}
$scope.reload();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.CodeMirror {
/* Set height, width, borders, and global font properties here */
font-family: monospace;
height: 300px;
min-height: 300px;
}
.CodeMirror-scroll {
/* Set scrolling behaviour here */
Expand Down Expand Up @@ -155,6 +155,7 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
position: relative;
-moz-box-sizing: content-box;
box-sizing: content-box;
min-height: 300px;
}
.CodeMirror-sizer {
position: relative;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ <h3>
Custom Task Logs
<small>{{type}}</small>

<button class="pull-right btn btn-default" ng-click="reload()"><i class="glyphicon glyphicon-refresh"/></button>
<a href="#/custom" class="pull-right btn btn-default" ng-if="type">« Back</a>
<div class="pull-right btn-group">
<a href="#/custom" class="btn btn-default" ng-if="type">« Back</a>
<button class="btn btn-default" ng-click="reload()"><i class="glyphicon glyphicon-refresh"/></button>
</div>
</h3>

Search: <input type="text" ng-model="filter"/>
Expand Down Expand Up @@ -37,8 +39,8 @@ <h3>
<i class="glyphicon glyphicon-play" />
</td>
<td>
<a href="#custom/{{log.taskName}}" class="btn btn-success" ng-if="!type">More</a>
<a href="#custom/{{log.taskName}}/{{log.id}}" class="btn btn-success">Details</a>
<a href="#custom/{{log.taskName}}" class="btn btn-success" ng-if="!type">More</a>
</td>
</tr>
</tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ <h3>
Task Log
<small>{{log.taskName}}</small>

<button class="pull-right btn btn-default" ng-click="refreshLog()"><i class="glyphicon glyphicon-refresh"/></button>
<a href="#/logs/{{log.taskName}}" class="pull-right btn btn-default" ng-if="!log.javaCode">« Back</a>
<a href="#/custom/{{log.taskName}}" class="pull-right btn btn-default" ng-if="log.javaCode">« Back</a>
<div class="pull-right btn-group">
<a href="#/logs/{{log.taskName}}" class="btn btn-default" ng-if="!log.javaCode">« Back</a>
<a href="#/custom/{{log.taskName}}" class="btn btn-default" ng-if="log.javaCode">« Back</a>
<button class="btn btn-default" ng-click="refreshLog()"><i class="glyphicon glyphicon-refresh"/></button>
</div>

</h3>

<table class="table">
Expand Down Expand Up @@ -44,7 +47,7 @@ <h3>
<td>
<div class="control-group">
<div class="controls">
<ui-codemirror ui-codemirror-opts="editorOptions" ng-model="log.javaCode"></textarea>
<div ui-codemirror="{onLoad: codemirrorLoaded}" ui-codemirror-opts="editorOptions" ng-model="log.javaCode"></div>
</div>
</div>
<div class="control-group">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@ <h3>
Task Logs
<small>{{type}}</small>

<button class="pull-right btn btn-default" ng-click="reload()"><i class="glyphicon glyphicon-refresh"/></button>
<a href="#/logs" class="pull-right btn btn-default" ng-if="type">« Back</a>
<div class="pull-right btn-group">
<a href="#/logs" class="btn btn-default" ng-if="type">« Back</a>
<button class="btn btn-default" ng-click="reload()"><i class="glyphicon glyphicon-refresh"/></button>
</div>
</h3>

<div class="text-center" ng-if="logs == null">
<h3>Loading...</h3>
</div>

<div ng-if="logs">
<div ng-show="logs">
Search: <input type="text" ng-model="filter"/>
</div>
<table class="table table-condensed" ng-show="logs != null">
Expand All @@ -41,8 +43,8 @@ <h3>Loading...</h3>
<i class="glyphicon glyphicon-play" />
</td>
<td>
<a href="#logs/{{log.taskName}}" class="btn btn-success" ng-if="!type">More</a>
<a href="#logs/{{log.taskName}}/{{log.id}}" class="btn btn-success">Details</a>
<a href="#logs/{{log.taskName}}" class="btn btn-success" ng-if="!type">More</a>
</td>
</tr>
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion client/bundle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.fenixedu</groupId>
<artifactId>bennu-client-aggregator</artifactId>
<version>3.3.1</version>
<version>3.3.2</version>
</parent>

<artifactId>bennu-client</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>

<artifactId>bennu-client-aggregator</artifactId>
<version>3.3.1</version>
<version>3.3.2</version>
<name>Bennu Framework Client Components Aggregating Pom</name>
<packaging>pom</packaging>

Expand Down
2 changes: 1 addition & 1 deletion maven/archetypes/bennu-project-archetype/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.fenixedu</groupId>
<artifactId>bennu-archetypes</artifactId>
<version>3.3.1</version>
<version>3.3.2</version>
</parent>

<artifactId>bennu-project-archetype</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion maven/archetypes/bennu-webapp-archetype/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.fenixedu</groupId>
<artifactId>bennu-archetypes</artifactId>
<version>3.3.1</version>
<version>3.3.2</version>
</parent>

<artifactId>bennu-webapp-archetype</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion maven/archetypes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.fenixedu</groupId>
<artifactId>bennu-maven</artifactId>
<version>3.3.1</version>
<version>3.3.2</version>
</parent>

<artifactId>bennu-archetypes</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion maven/bennu-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.fenixedu</groupId>
<artifactId>bennu-maven</artifactId>
<version>3.3.1</version>
<version>3.3.2</version>
</parent>

<artifactId>bennu-maven-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>

<artifactId>bennu-maven</artifactId>
<version>3.3.1</version>
<version>3.3.2</version>
<packaging>pom</packaging>

<name>Bennu Maven Tools</name>
Expand Down
Loading

0 comments on commit 39d7999

Please sign in to comment.