You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by tv...@apache.org on 2012/10/06 19:04:32 UTC

svn commit: r1395116 - in /openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app: ./ js/ js/templates/ js/util/ js/view/ js/view/panels/

Author: tveronezi
Date: Sat Oct  6 17:04:31 2012
New Revision: 1395116

URL: http://svn.apache.org/viewvc?rev=1395116&view=rev
Log:
https://issues.apache.org/jira/browse/TOMEE-447

Added:
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/Application.js
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/ApplicationChannel.js
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/ApplicationController.js
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/ApplicationModel.js
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/ApplicationTemplates.js
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/SampleScript.js
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/templates/
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/templates/application-tab-console-output-line.handlebars
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/templates/application-tab-console.handlebars
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/templates/application-tab-log.handlebars
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/templates/application-toolbar.handlebars
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/templates/application.handlebars
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/DelayedTask.js
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/I18N.js
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/Log.js
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/Obj.js
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/Sequence.js
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/Storage.js
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/view/
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/view/ApplicationToolbarView.js
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/view/ApplicationView.js
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/view/panels/
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/view/panels/console.js
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/view/panels/log.js
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/tomee.css

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/Application.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/Application.js?rev=1395116&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/Application.js (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/Application.js Sat Oct  6 17:04:31 2012
@@ -0,0 +1,33 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * This is the entry point for our javascript application.
+ * DO NOT add any logic here. All business logic should be implemented in the ApplicationController object.
+ * That is ok to add global utility methods here.
+ */
+"use strict";
+var TOMEE = {};
+$(document).ready(function () {
+    TOMEE.ApplicationController();
+});
+
+TOMEE.baseURL = function (url) {
+    return '/tomee/' + url;
+};
+

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/ApplicationChannel.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/ApplicationChannel.js?rev=1395116&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/ApplicationChannel.js (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/ApplicationChannel.js Sat Oct  6 17:04:31 2012
@@ -0,0 +1,147 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * This is the communication channel of our application.
+ * One can send a message through this object. Other object can register listeners to the messages coming from it.
+ *
+ * Some other frameworks use the term MessageBus for similar  utilities.
+ *
+ * This appliation has many instances of this class because it is usefull to have a private channel/messageBus between two components.
+ * In this application an example of that is the pagingToolChannel sending message to its parent.
+ *
+ */
+TOMEE.ApplicationChannel = (function () {
+
+    function createChannel(channelName) {
+        "use strict";
+
+        var name = channelName,
+            listeners = {};
+
+        /**
+         * Bind a listener to a given message
+         *
+         * @param messageKey this is the messageKey sent by another object
+         * @param callback this is your callback function. It contains one
+         * parameter with all values sent by the sender object
+         */
+        function bind(messageKey, callback) {
+            //avoiding "NullPointerException"
+            if (!listeners[messageKey]) {
+                listeners[messageKey] = $.Callbacks();
+            }
+
+            var myListeners = listeners[messageKey];
+            if (!myListeners.has(callback)) {
+                // wrap the callback method in order to avoid the standard
+                // jquery behaviour for callbacks exceptions
+                // (http://bugs.jquery.com/ticket/11193)
+                var callbackWrapper = function (paramsObj) {
+                    try {
+                        return callback(paramsObj);
+
+                    } catch (e) {
+                        console.error(
+                            'Cannot execute listener callback', e,
+                            'Channel', name,
+                            'key', messageKey,
+                            'Parameters', paramsObj
+                        );
+                    }
+                };
+
+                myListeners.add(callbackWrapper);
+            }
+        }
+
+        /**
+         * Unbind a listener to a given message
+         *
+         * @param messageKey this is the messageKey sent by another object
+         * @param callback the "function" object you used in the "bind" method
+         */
+        function unbind(messageKey, callback) {
+            if (!listeners[messageKey]) {
+                return;
+            }
+
+            var myListeners = listeners[messageKey];
+            myListeners.remove(callback);
+        }
+
+        /**
+         * Send a message
+         *
+         * @param messageKey your message key
+         * @param paramsObj the parameters to the listeners callback methods
+         */
+        function send(messageKey, paramsObj) {
+            console.log(
+                'Channel', name,
+                'key', messageKey,
+                'Parameters', paramsObj,
+                'Listeners available',
+                !(!listeners[messageKey])
+            );
+
+            if (!listeners[messageKey]) {
+                return;
+            }
+
+            var myListeners = listeners[messageKey];
+
+            //the safeParamsObj will never be null or undefined
+            var safeParamsObj = paramsObj;
+            if (!safeParamsObj) {
+                safeParamsObj = {};
+            }
+
+            myListeners.fire(safeParamsObj);
+        }
+
+        return {
+            bind:bind,
+            unbind:unbind,
+            send:send
+        };
+    }
+
+    ;
+
+    var channels = {};
+
+    function getChannel(name) {
+        if (!channels[name]) {
+            channels[name] = createChannel(name);
+        }
+        return channels[name];
+    }
+
+    return {
+        bind:function (name, key, callback) {
+            getChannel(name).bind(key, callback);
+        },
+        unbind:function (name, key, callback) {
+            getChannel(name).unbind(key, callback);
+        },
+        send:function (name, key, data) {
+            getChannel(name).send(key, data);
+        }
+    };
+})();
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/ApplicationController.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/ApplicationController.js?rev=1395116&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/ApplicationController.js (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/ApplicationController.js Sat Oct  6 17:04:31 2012
@@ -0,0 +1,52 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * This is the application controller. This is the central point for logic and to forward actions to the views.
+ * It contains all the views and model instances.
+ */
+TOMEE.ApplicationController = function () {
+    "use strict";
+
+    var channel = TOMEE.ApplicationChannel,
+        model = TOMEE.ApplicationModel(),
+        view = TOMEE.ApplicationView();
+
+    view.render();
+    model.sendMessage({
+        cmdName: 'GetLog',
+        aNumber: 1
+    });
+
+    channel.bind('ui-actions', 'execute-script', function(data) {
+        model.sendMessage({
+            cmdName: 'RunScript',
+            scriptCode: data.text
+        });
+    });
+
+    channel.bind('server-callback', 'RunScript', function(data) {
+        $.meow({
+            message: TOMEE.I18N.get('application.console.done')
+        });
+    });
+
+    return {
+
+    };
+};
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/ApplicationModel.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/ApplicationModel.js?rev=1395116&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/ApplicationModel.js (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/ApplicationModel.js Sat Oct  6 17:04:31 2012
@@ -0,0 +1,121 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * This object handles all the data manipulation.
+ *
+ * @param cfg
+ */
+TOMEE.ApplicationModel = function () {
+    "use strict";
+
+    var channel = TOMEE.ApplicationChannel,
+        appSocket = null,
+        reconnectTask = TOMEE.DelayedTask(),
+        reconnectDelay = 1000;
+
+    channel.bind('server-callback', 'socket-connection-message-received', function (data) {
+        var bean = $.parseJSON(data);
+        TOMEE.ApplicationChannel.send('new-data', bean);
+    });
+
+    channel.bind('server-callback', 'socket-connection-closed', function () {
+        reconnectTask.delay(connectSocket, reconnectDelay);
+    });
+
+    // First connection
+    connectSocket();
+
+    function connectSocket() {
+        try {
+            appSocket = createSocket();
+        } catch (e) {
+            reconnectTask.delay(connectSocket, reconnectDelay);
+        }
+    }
+
+    function createSocket() {
+        var socket = null,
+            host = (function () {
+                var suffix = '/tomee/socket';
+                var path = window.document.location.host + suffix;
+                if (window.location.protocol == 'http:') {
+                    return 'ws://' + path;
+                }
+                return 'wss://' + path;
+            })();
+
+        if ('WebSocket' in window) {
+            socket = new WebSocket(host);
+        } else if ('MozWebSocket' in window) {
+            socket = new MozWebSocket(host);
+        } else {
+            throw 'WebSocket is not supported by this browser.';
+        }
+
+        socket.onopen = function () {
+            channel.send('server-connection', 'socket-connection-opened', {});
+        };
+
+        socket.onclose = function () {
+            channel.send('server-connection', 'socket-connection-closed', {});
+        };
+
+
+        socket.onerror = function (message) {
+            channel.send('server-connection', 'socket-connection-error', {
+                message:message
+            });
+        };
+
+        socket.onmessage = function (message) {
+            var data = JSON.parse(message.data);
+            if (data.cmdName) {
+                // Commands callback calls
+                channel.send('server-callback', data.cmdName, {
+                    data:data
+                });
+            } else {
+                channel.send('server-callback', 'socket-message-received', {
+                    data:data
+                });
+            }
+        };
+
+        return socket;
+    }
+
+    function isSocketReady() {
+        return appSocket.readyState === appSocket.OPEN;
+    }
+
+    function sendMessage(bean) {
+        if (isSocketReady()) {
+            var str = JSON.stringify(bean);
+            appSocket.send(str);
+        } else {
+            setTimeout(function () {
+                sendMessage(bean);
+            }, 1000);
+        }
+    }
+
+    return {
+        sendMessage:sendMessage
+    }
+};
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/ApplicationTemplates.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/ApplicationTemplates.js?rev=1395116&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/ApplicationTemplates.js (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/ApplicationTemplates.js Sat Oct  6 17:04:31 2012
@@ -0,0 +1,53 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+TOMEE.ApplicationTemplates = (function (paths) {
+    "use strict";
+
+    var templates = {};
+
+    TOMEE.utils.forEach(paths, function (path) {
+        $.ajax({
+                url:'app/js/templates/' + path + '.handlebars',
+                method:'GET',
+                dataType:'text',
+                async:false,
+                success:function (data) {
+                    templates[path] = Handlebars.compile(data);
+                }
+            }
+        );
+
+    });
+
+    return {
+        getValue:function (templateName, cfg) {
+            var template = templates[templateName];
+            if (!template) {
+                throw 'Template not registered. "' + templateName + '"';
+            }
+            return template(cfg);
+        }
+    };
+})([
+    'application',
+    'application-toolbar',
+    'application-tab-console',
+    'application-tab-console-output-line',
+    'application-tab-log'
+]);
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/SampleScript.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/SampleScript.js?rev=1395116&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/SampleScript.js (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/SampleScript.js Sat Oct  6 17:04:31 2012
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+var myImports = new JavaImporter(
+    java.util.Properties,
+    javax.naming.InitialContext
+);
+
+with (myImports) {
+    var p = new Properties();
+    p.put("java.naming.factory.initial", "org.apache.openejb.client.LocalInitialContextFactory");
+
+    var ctx = new InitialContext(p);
+    var myBean =  ctx.lookup("openejb/DeployerBusinessRemote");
+    util.save('result', myBean.getUniqueFile());
+}
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/templates/application-tab-console-output-line.handlebars
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/templates/application-tab-console-output-line.handlebars?rev=1395116&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/templates/application-tab-console-output-line.handlebars (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/templates/application-tab-console-output-line.handlebars Sat Oct  6 17:04:31 2012
@@ -0,0 +1,5 @@
+<div class="tomee-console-output-line">
+    <p>{{time}} {{i18n "ms"}}</p>
+    <p>{{output}}</p>
+</div>
+<div class="line-separator"></div>
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/templates/application-tab-console.handlebars
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/templates/application-tab-console.handlebars?rev=1395116&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/templates/application-tab-console.handlebars (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/templates/application-tab-console.handlebars Sat Oct  6 17:04:31 2012
@@ -0,0 +1,12 @@
+<div class="tomee-console">
+    <div class="tomee-console-output"></div>
+    <div class="tomee-code"></div>
+    <div class="navbar navbar-fixed-bottom" style="position: absolute;">
+        <div class="navbar-inner">
+            <div class="container" style="width: auto; padding: 0 20px;">
+                <button type="button" class="btn pull-right tomee-execute-btn">{{i18n "application.console.run"}}</button>
+
+            </div>
+        </div>
+    </div>
+</div>
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/templates/application-tab-log.handlebars
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/templates/application-tab-log.handlebars?rev=1395116&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/templates/application-tab-log.handlebars (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/templates/application-tab-log.handlebars Sat Oct  6 17:04:31 2012
@@ -0,0 +1 @@
+<span>log</span>

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/templates/application-toolbar.handlebars
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/templates/application-toolbar.handlebars?rev=1395116&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/templates/application-toolbar.handlebars (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/templates/application-toolbar.handlebars Sat Oct  6 17:04:31 2012
@@ -0,0 +1,21 @@
+    <div class="navbar navbar-inverse navbar-fixed-top">
+      <div class="navbar-inner">
+        <div class="container-fluid">
+          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+          </a>
+          <a class="brand" href="#">{{i18n "application.name"}}</a>
+          <div class="nav-collapse collapse">
+            <p class="navbar-text pull-right">
+              Logged in as <a href="#" class="navbar-link">Username</a>
+            </p>
+            <ul class="nav">
+              <li class="toolbar-item active console"><a href="#">{{i18n "application.console"}}</a></li>
+              <li class="toolbar-item log"><a href="#">{{i18n "application.log"}}</a></li>
+            </ul>
+          </div><!--/.nav-collapse -->
+        </div>
+      </div>
+    </div>
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/templates/application.handlebars
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/templates/application.handlebars?rev=1395116&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/templates/application.handlebars (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/templates/application.handlebars Sat Oct  6 17:04:31 2012
@@ -0,0 +1 @@
+<div></div>
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/DelayedTask.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/DelayedTask.js?rev=1395116&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/DelayedTask.js (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/DelayedTask.js Sat Oct  6 17:04:31 2012
@@ -0,0 +1,38 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+TOMEE.DelayedTask = function () {
+    "use strict";
+
+    var currentTimer = null;
+
+    function delay(callback, millis) {
+        if (!callback) {
+            throw "You should give me a callback method to execute";
+        }
+
+        if (currentTimer !== null) {
+            clearTimeout(currentTimer);
+        }
+        currentTimer = setTimeout(callback, millis);
+    }
+
+    return {
+        delay:delay
+    };
+};
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/I18N.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/I18N.js?rev=1395116&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/I18N.js (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/I18N.js Sat Oct  6 17:04:31 2012
@@ -0,0 +1,54 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ "use strict";
+ */
+
+TOMEE.I18N = (function () {
+
+    var messages = {
+        'application.name':'Apache TomEE',
+
+        'ms': 'ms',
+
+        'application.console':'Console',
+        'application.console.run': 'Execute',
+        'application.console.done': 'Script executed.',
+        'application.console.run.time': 'Time',
+        'application.console.run.output.empty': 'Empty',
+
+        'application.log':'Log',
+
+        'dummy':'dummy'
+    };
+
+    var get = function (key) {
+        var result = messages[key];
+        if (!result) {
+            result = '[!' + key + '!]';
+            console.error('Missing i18n message.', key);
+        }
+        return result;
+    };
+
+    Handlebars.registerHelper('i18n', function(key) {
+        return get(key);
+    });
+
+    return {
+        get:get
+    };
+})();
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/Log.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/Log.js?rev=1395116&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/Log.js (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/Log.js Sat Oct  6 17:04:31 2012
@@ -0,0 +1,64 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+    "use strict";
+ */
+
+(function() {
+    var winConsole = window.console,
+
+        // These are the available methods.
+        // Add more to this list if necessary.
+        consoleEmpty = {
+            error: function() {},
+            log: function() {}
+        },
+
+        consoleProxy = (function() {
+            // This object wraps the "window.console"
+            var consoleWrapper = {};
+
+            function buildMethodProxy(key) {
+                if (winConsole[key] && typeof winConsole[key] === 'function') {
+                    consoleWrapper[key] = function() {
+                        var cFunc = winConsole[key];
+                        cFunc.call(winConsole, arguments);
+                    };
+                } else {
+                    consoleWrapper[key] = function() {
+                        consoleEmpty[key]();
+                    };
+                }
+            }
+
+            // Checking if the browser has the "console" object
+            if (winConsole) {
+                // Only the methods defined by the consoleMock
+                // are available for use.
+                for (var key in consoleEmpty) {
+                    if (consoleEmpty.hasOwnProperty(key)) {
+                        buildMethodProxy(key);
+                    }
+                }
+            } else {
+                consoleWrapper = consoleEmpty;
+            }
+
+            return consoleWrapper;
+        })();
+
+    window.console = consoleProxy;
+})();
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/Obj.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/Obj.js?rev=1395116&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/Obj.js (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/Obj.js Sat Oct  6 17:04:31 2012
@@ -0,0 +1,115 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ "use strict";
+ */
+
+TOMEE.utils = (function () {
+
+    var isPrimitive = function (value) {
+        if ('number' === (typeof value)) {
+            return true;
+        }
+
+        if ('string' === (typeof value)) {
+            return true;
+        }
+
+        if ('boolean' === (typeof value)) {
+            return true;
+        }
+
+        return false;
+    };
+
+    var getSafe = function (obj, defaultValue) {
+        if (obj instanceof Function) {
+            try {
+                return obj();
+
+            } catch (ex) {
+                return defaultValue;
+            }
+        }
+
+        if (obj) {
+            return obj;
+        }
+        return defaultValue;
+    };
+
+    var toArray = function (obj, objBuilder) {
+        if (!obj) {
+            return [];
+        }
+
+        if (obj instanceof Array) {
+            return obj;
+        }
+
+        var result = [];
+        for (var key in obj) {
+            result.push(objBuilder(key, obj[key]));
+        }
+
+        return result;
+    };
+
+    var getArray = function (obj) {
+        if (!obj) {
+            return [];
+        }
+
+        if (obj instanceof Array) {
+            return obj;
+        }
+
+        return [obj];
+    };
+
+    var getObject = function (obj) {
+        if (!obj) {
+            return {};
+        }
+        return obj;
+    };
+
+    var stringFormat = function (str, values) {
+        var result = str;
+        for (var key in values) {
+            var reg = new RegExp("\\{" + key + "\\}", "gm");
+            result = result.replace(reg, values[key]);
+        }
+        return result;
+    };
+
+    var forEach = function (value, callback) {
+        var arr = getArray(value);
+        for(var i = 0; i < arr.length; i++) {
+            callback(arr[i], i);
+        }
+    };
+
+    return {
+        isPrimitive:isPrimitive,
+        getSafe:getSafe,
+        toArray:toArray,
+        getArray:getArray,
+        getObject:getObject,
+        stringFormat:stringFormat,
+        forEach:forEach
+    }
+})();
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/Sequence.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/Sequence.js?rev=1395116&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/Sequence.js (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/Sequence.js Sat Oct  6 17:04:31 2012
@@ -0,0 +1,43 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+TOMEE.Sequence = (function () {
+    "use strict";
+
+    var sequenceMap = {};
+
+    var next = function (prefix) {
+        var myPrefix = prefix;
+        if (!myPrefix || myPrefix === '') {
+            myPrefix = 'TOMEE';
+        }
+
+        var sequence = sequenceMap[myPrefix];
+        if (!sequence) {
+            sequence = 0;
+            sequenceMap[myPrefix] = sequence;
+        }
+
+        sequenceMap[myPrefix] = sequence + 1;
+        return myPrefix + '-' + sequence;
+    };
+
+    return {
+        next: next
+    };
+})();
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/Storage.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/Storage.js?rev=1395116&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/Storage.js (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/util/Storage.js Sat Oct  6 17:04:31 2012
@@ -0,0 +1,53 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ "use strict";
+ */
+
+TOMEE.storage = (function () {
+
+    var defaultStore = (function() {
+        var myStore = {};
+
+        return {
+            getItem: function(key) {
+                return myStore[key];
+            },
+            setItem: function(key, value) {
+                myStore[key] = value;
+            }
+        };
+
+    })();
+
+    var session = TOMEE.utils.getSafe(window.sessionStorage, defaultStore);
+    var local = TOMEE.utils.getSafe(window.localStorage, defaultStore);
+
+    return {
+        getSession: function(key) {
+            return session.getItem(key);
+        },
+        setSession: function(key, value) {
+            session.setItem(key, value);
+        },
+        getLocal: function(key) {
+            return local.getItem(key);
+        },
+        setLocal: function(key, value) {
+            local.setItem(key, value);
+        }
+    }
+})();
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/view/ApplicationToolbarView.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/view/ApplicationToolbarView.js?rev=1395116&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/view/ApplicationToolbarView.js (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/view/ApplicationToolbarView.js Sat Oct  6 17:04:31 2012
@@ -0,0 +1,48 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+TOMEE.ApplicationToolbarView = function () {
+    "use strict";
+
+    var channel = TOMEE.ApplicationChannel,
+        el = $(TOMEE.ApplicationTemplates.getValue('application-toolbar', {}));
+
+    (function(keys) {
+        TOMEE.utils.forEach(keys, function(key) {
+            el.find('.' + key).bind('click', (function() {
+                updateSelected(key);
+            }));
+        });
+
+    })(['home', 'console', 'log']);
+
+    var updateSelected = function(key) {
+        el.find('.toolbar-item').removeClass('active');
+        el.find('.' + key).addClass('active');
+
+        channel.send('ui-actions', 'toolbar-click', {
+            key: key
+        });
+    };
+
+   return {
+        getEl:function () {
+            return el;
+        }
+    };
+};
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/view/ApplicationView.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/view/ApplicationView.js?rev=1395116&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/view/ApplicationView.js (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/view/ApplicationView.js Sat Oct  6 17:04:31 2012
@@ -0,0 +1,89 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+TOMEE.ApplicationView = function () {
+    "use strict";
+
+    var channel = TOMEE.ApplicationChannel,
+        panelMap = {
+            'console':TOMEE.ApplicationTabConsole(),
+            'log':TOMEE.ApplicationTabLog()
+        },
+        selected = null,
+        container = $(TOMEE.ApplicationTemplates.getValue('application', {})),
+        containerWrapper = $('<div class="tomee-container-wrapper"></div>'),
+        toolbar = TOMEE.ApplicationToolbarView(),
+        myWindow = $(window),
+        delayedContainerResize = TOMEE.DelayedTask();
+
+    container.appendTo(containerWrapper);
+
+    channel.bind('ui-actions', 'toolbar-click', function (data) {
+        switchPanel(data.key);
+    });
+
+    //disable default contextmenu
+    $(document).bind("contextmenu", function (e) {
+        return false;
+    });
+
+    myWindow.on('resize', function () {
+        delayedContainerResize.delay(updateContainerSize, 100);
+    });
+
+    function switchPanel(key) {
+        if (selected) {
+            selected.getEl().detach();
+            selected.onDetach();
+        }
+        selected = panelMap[key];
+        selected.getEl().appendTo(container);
+        selected.onAppend();
+    }
+
+    function updateContainerSize() {
+        var containerHeight,
+            containerWidth,
+            toolbarHeight = toolbar.getEl().height();
+        containerWrapper.css('top', toolbarHeight + 'px');
+
+        containerHeight = (myWindow.height() - toolbarHeight);
+        containerWidth = myWindow.width();
+
+        containerWrapper.css('height', containerHeight + 'px');
+        containerWrapper.css('width', containerWidth + 'px');
+
+        channel.send('ui-actions', 'container-resized', {
+            containerHeight:containerHeight,
+            containerWidth:containerWidth,
+            toolbarHeight: toolbarHeight
+        });
+    }
+
+    return {
+        render:function () {
+            var myBody = $('body');
+            myBody.append(toolbar.getEl());
+            myBody.append(containerWrapper);
+
+            switchPanel('console');
+
+            updateContainerSize();
+        }
+    };
+};
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/view/panels/console.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/view/panels/console.js?rev=1395116&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/view/panels/console.js (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/view/panels/console.js Sat Oct  6 17:04:31 2012
@@ -0,0 +1,69 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+TOMEE.ApplicationTabConsole = function () {
+    "use strict";
+
+    var channel = TOMEE.ApplicationChannel,
+        container = $(TOMEE.ApplicationTemplates.getValue('application-tab-console', {})),
+        codeArea = null;
+
+    container.find('.tomee-execute-btn').on('click', function () {
+        channel.send('ui-actions', 'execute-script', {
+            text:codeArea.getValue()
+        });
+    });
+
+    channel.bind('ui-actions', 'container-resized', function (data) {
+        var consoleOutput = container.find('.tomee-console-output'),
+            consoleEditor = container.find('.tomee-code'),
+            outputHeight = data.containerHeight - data.toolbarHeight - consoleEditor.height();
+
+        consoleOutput.css('padding-top', data.toolbarHeight + 'px');
+        consoleOutput.height(outputHeight);
+    });
+
+    channel.bind('server-callback', 'RunScript', function (params) {
+        var consoleOutput = container.find('.tomee-console-output'),
+            newLineData = {
+                time: params.data.timeSpent,
+                output: params.data.output
+            },
+            newLine = $(TOMEE.ApplicationTemplates.getValue(
+                'application-tab-console-output-line', newLineData));
+
+        consoleOutput.prepend(newLine);
+    });
+
+    return {
+        getEl:function () {
+            return container;
+        },
+        onAppend:function () {
+            if (!codeArea) {
+                codeArea = CodeMirror(container.children('.tomee-code').get(0), {
+                    lineNumbers:true,
+                    value:'// Add your code here.\n'
+                });
+            }
+            codeArea.focus();
+        },
+        onDetach:function () {
+        }
+    };
+};
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/view/panels/log.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/view/panels/log.js?rev=1395116&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/view/panels/log.js (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/js/view/panels/log.js Sat Oct  6 17:04:31 2012
@@ -0,0 +1,31 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+TOMEE.ApplicationTabLog = function () {
+    "use strict";
+
+    var container = $(TOMEE.ApplicationTemplates.getValue('application-tab-log', {}));
+
+    return {
+        getEl: function() {
+            return container;
+        },
+        onAppend: function() {},
+        onDetach: function() {}
+    };
+};
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/tomee.css
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/tomee.css?rev=1395116&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/tomee.css (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/app/tomee.css Sat Oct  6 17:04:31 2012
@@ -0,0 +1,43 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+.meows {
+    top: 35px;
+}
+
+. tomee-container-wrapper {
+    position: absolute;
+    top: 0px;
+    left: 0px;
+}
+
+.tomee-console-output {
+    background-color: #222222;
+    color: gray;
+    overflow: auto;
+    padding: 5px;
+}
+
+.tomee-console-output-line {
+    padding-top: 5px;
+}
+
+.line-separator {
+    height: 1px;
+    background: #717171;
+    border-bottom: 1px solid #313030;
+}