Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Frost2012-12-13 07:49:19 -0500
committerChristopher Frost2012-12-13 07:52:49 -0500
commitb54b6ea517d0afe6070450dc948adc9fe9e80297 (patch)
tree33cd6713b67b0e51428aee68fc3fbc50c8fd650e
parentef5ccde3f9954b740f8ceb7d74119ebc7c025775 (diff)
downloadorg.eclipse.virgo.kernel-b54b6ea517d0afe6070450dc948adc9fe9e80297.tar.gz
org.eclipse.virgo.kernel-b54b6ea517d0afe6070450dc948adc9fe9e80297.tar.xz
org.eclipse.virgo.kernel-b54b6ea517d0afe6070450dc948adc9fe9e80297.zip
391637 - Web admin console logback configuration support, better position pop-ups
-rw-r--r--org.eclipse.virgo.management.console/src/main/webapp/js/common.js28
-rw-r--r--org.eclipse.virgo.management.console/src/main/webapp/js/logging.js7
-rw-r--r--org.eclipse.virgo.management.console/src/main/webapp/styles/logging.css3
3 files changed, 24 insertions, 14 deletions
diff --git a/org.eclipse.virgo.management.console/src/main/webapp/js/common.js b/org.eclipse.virgo.management.console/src/main/webapp/js/common.js
index 6774c2b6..367fcffe 100644
--- a/org.eclipse.virgo.management.console/src/main/webapp/js/common.js
+++ b/org.eclipse.virgo.management.console/src/main/webapp/js/common.js
@@ -441,21 +441,29 @@ var InfoBox = function(properties){
});
};
- self.show = function(){
+ self.show = function(relativeTo){
if(!self.isVisible){
$("li", self.dialogBox).removeClass('li-odd');
$("li:odd", self.dialogBox).addClass('li-odd');
- var position = $('#content').position();
- var infoBoxCount = $('.info-box').length;
- var floorCount = Math.floor(infoBoxCount/10);
- var xOffSet = floorCount * 250;
- infoBoxCount = infoBoxCount - (floorCount * 10);
- var zIndex = self.getHighestZIndex() + 1;
+ var displayPosition = {};
+ if(relativeTo){
+ var position = relativeTo.position();
+ displayPosition.x = position.left + 15;
+ displayPosition.y = position.top + 25;
+ } else {
+ var position = $('#content').position();
+ var infoBoxCount = $('.info-box').length;
+ var floorCount = Math.floor(infoBoxCount/10);
+ var xOffSet = floorCount * 250;
+ infoBoxCount = infoBoxCount - (floorCount * 10);
+ displayPosition.x = position.left + 40 + xOffSet + (infoBoxCount*25);
+ displayPosition.y = position.top + 50 + (infoBoxCount*25);
+ }
self.dialogBox.css({position: 'absolute',
- left: position.left + 40 + xOffSet + (infoBoxCount*25),
- top: position.top + 50 + (infoBoxCount*25),
- 'z-index': zIndex});
+ left: displayPosition.x,
+ top: displayPosition.y,
+ 'z-index': self.getHighestZIndex() + 1});
self.dialogBox.show();
$('body').append(self.dialogBox);
self.isVisible = true;
diff --git a/org.eclipse.virgo.management.console/src/main/webapp/js/logging.js b/org.eclipse.virgo.management.console/src/main/webapp/js/logging.js
index 853de9e0..1a80780f 100644
--- a/org.eclipse.virgo.management.console/src/main/webapp/js/logging.js
+++ b/org.eclipse.virgo.management.console/src/main/webapp/js/logging.js
@@ -35,14 +35,13 @@ var LoggerList = function(loggerList){
var rows = new Array();
$.each(loggerList, function(index, loggerName){
var row = new Array(loggerName);
- var td = $('<td />', {'class' : 'logger-update','onClick': 'loggingHandler.displayLoggerInfo("' + loggerName + '")'});
+ var td = $('<td />', {'id': 'click-' + loggerName.replace(new RegExp('\\.', 'g'), '_'), 'class': 'logger-update','onClick': 'loggingHandler.displayLoggerInfo("' + loggerName + '")'});
row.push(td.text('view/edit'));
rows.push(row);
});
self.loggerTable = util.makeTable({
clazz: 'logger-table',
- //{title: 'Level', type: 'alpha'}, {title: 'Effective Level', type: 'alpha'},
headers: [{title: 'Logger Name', type: 'alpha'}, {title: '', type: 'alpha'}],
rows: rows,
hoverable: true,
@@ -69,7 +68,7 @@ var LoggerList = function(loggerList){
var cssLoggerName = loggerName.replace(new RegExp('\\.', 'g'), '_');
util.doBulkQuery(request, function(response) {
- var name = 'updatelevel-' + cssLoggerName;
+ var name = 'updatelevel-' + cssLoggerName;
var title = 'Update a Logging level';
var content = $('<div />');
@@ -103,7 +102,7 @@ var LoggerList = function(loggerList){
link.append(linkButton);
content.append(link);
- var infoBox = new InfoBox({name: name, title: title, content: content, closeable: true}).show();
+ var infoBox = new InfoBox({name: name, title: title, content: content, closeable: true}).show($('#click-' + cssLoggerName).parent());
link.click({loggerName: loggerName, cssLoggerName: cssLoggerName}, function(event){
event.stopPropagation();
diff --git a/org.eclipse.virgo.management.console/src/main/webapp/styles/logging.css b/org.eclipse.virgo.management.console/src/main/webapp/styles/logging.css
index 0bf21587..9bd4ced0 100644
--- a/org.eclipse.virgo.management.console/src/main/webapp/styles/logging.css
+++ b/org.eclipse.virgo.management.console/src/main/webapp/styles/logging.css
@@ -8,6 +8,9 @@
* Christopher Frost - 2011
*/
+#logging-display {
+ margin-bottom: 30px;
+}
.logger-table .logger-update {
color: transparent;

Back to the top