tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tveron...@apache.org
Subject svn commit: r1347581 - in /openejb/trunk/openejb/tomee: tomee-plus-webapp/src/main/webapp/WEB-INF/ tomee-webapp/src/main/webapp/WEB-INF/ tomee-webapp/src/main/webapp/js/tomee/ tomee-webapp/src/main/webapp/js/tomee/util/ tomee-webapp/src/main/webapp/js/...
Date Thu, 07 Jun 2012 12:09:10 GMT
Author: tveronezi
Date: Thu Jun  7 12:09:09 2012
New Revision: 1347581

URL: http://svn.apache.org/viewvc?rev=1347581&view=rev
Log:
https://issues.apache.org/jira/browse/TOMEE-205
* console skeleton

Modified:
    openejb/trunk/openejb/tomee/tomee-plus-webapp/src/main/webapp/WEB-INF/web.xml
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/WEB-INF/web.xml
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/js/tomee/ApplicationController.js
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/js/tomee/ApplicationModel.js
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/js/tomee/util/I18N.js
    openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/js/tomee/view/ApplicationViewHome.js

Modified: openejb/trunk/openejb/tomee/tomee-plus-webapp/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-plus-webapp/src/main/webapp/WEB-INF/web.xml?rev=1347581&r1=1347580&r2=1347581&view=diff
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-plus-webapp/src/main/webapp/WEB-INF/web.xml (original)
+++ openejb/trunk/openejb/tomee/tomee-plus-webapp/src/main/webapp/WEB-INF/web.xml Thu Jun
 7 12:09:09 2012
@@ -83,7 +83,7 @@
     </servlet>
 
     <servlet>
-        <servlet-name>WsConsole</servlet-name>
+        <servlet-name>ConsoleServlet</servlet-name>
         <servlet-class>org.apache.tomee.webapp.servlet.ConsoleServlet</servlet-class>
     </servlet>
 
@@ -123,8 +123,8 @@
     </servlet-mapping>
 
     <servlet-mapping>
-        <servlet-name>WsConsole</servlet-name>
-        <url-pattern>/ws/console/*</url-pattern>
+        <servlet-name>ConsoleServlet</servlet-name>
+        <url-pattern>/console/*</url-pattern>
     </servlet-mapping>
 
     <!-- basic security to replace context.xml and allow remote accesses -->

Modified: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/WEB-INF/web.xml?rev=1347581&r1=1347580&r2=1347581&view=diff
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/WEB-INF/web.xml (original)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/WEB-INF/web.xml Thu Jun  7 12:09:09
2012
@@ -83,7 +83,7 @@
     </servlet>
 
     <servlet>
-        <servlet-name>WsConsole</servlet-name>
+        <servlet-name>ConsoleServlet</servlet-name>
         <servlet-class>org.apache.tomee.webapp.servlet.ConsoleServlet</servlet-class>
     </servlet>
 
@@ -123,8 +123,8 @@
     </servlet-mapping>
 
     <servlet-mapping>
-        <servlet-name>WsConsole</servlet-name>
-        <url-pattern>/ws/console/*</url-pattern>
+        <servlet-name>ConsoleServlet</servlet-name>
+        <url-pattern>/console/*</url-pattern>
     </servlet-mapping>
 
     <!-- basic security to replace context.xml and allow remote accesses -->

Modified: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/js/tomee/ApplicationController.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/js/tomee/ApplicationController.js?rev=1347581&r1=1347580&r2=1347581&view=diff
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/js/tomee/ApplicationController.js
(original)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/js/tomee/ApplicationController.js
Thu Jun  7 12:09:09 2012
@@ -139,6 +139,15 @@ TOMEE.ApplicationController = function (
         view.setLoggedUser(params.user);
     });
 
+    channel.bind('trigger.console.exec', function (params) {
+        model.execute(params.codeType, params.codeText);
+    });
+
+    channel.bind('app.console.executed', function (params) {
+        //TODO Implement me
+        throw "app.console.executed not implemented";
+    });
+
     var view = TOMEE.ApplicationView({
         channel:channel,
         groups:{

Modified: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/js/tomee/ApplicationModel.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/js/tomee/ApplicationModel.js?rev=1347581&r1=1347580&r2=1347581&view=diff
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/js/tomee/ApplicationModel.js
(original)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/js/tomee/ApplicationModel.js
Thu Jun  7 12:09:09 2012
@@ -74,6 +74,21 @@ TOMEE.ApplicationModel = function (cfg) 
         },
         getSystemInfo:function () {
             return systemInfo;
+        },
+        execute: function(codeType, codeText) {
+            request({
+                method:'POST',
+                url:TOMEE.baseURL('console'),
+                data: {
+                    engineName: codeType,
+                    scriptCode: codeText
+                },
+                success:function (data) {
+                    systemInfo = data;
+                    channel.send('app.console.executed', data);
+                }
+            });
+
         }
     };
 }
\ No newline at end of file

Modified: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/js/tomee/util/I18N.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/js/tomee/util/I18N.js?rev=1347581&r1=1347580&r2=1347581&view=diff
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/js/tomee/util/I18N.js (original)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/js/tomee/util/I18N.js Thu Jun
 7 12:09:09 2012
@@ -38,6 +38,10 @@ TOMEE.I18N = (function () {
         'application.mdbs': 'MDBs',
         'application.ws': 'Webservices',
 
+        'application.console.execute': 'Execute',
+        'application.console.Javascript': 'Javascript',
+        'application.console.Groovy': 'Groovy',
+
         'dummy':'dummy'
     };
 

Modified: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/js/tomee/view/ApplicationViewHome.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/js/tomee/view/ApplicationViewHome.js?rev=1347581&r1=1347580&r2=1347581&view=diff
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/js/tomee/view/ApplicationViewHome.js
(original)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/js/tomee/view/ApplicationViewHome.js
Thu Jun  7 12:09:09 2012
@@ -134,15 +134,22 @@ TOMEE.ApplicationViewHome = function (cf
             },
             children: [
                 {
+                    elName:'scriptSelector',
                     tag:'select',
                     children: [
                         {
                             tag:'option',
-                            html: 'Javascript'
+                            html: TOMEE.I18N.get('application.console.Javascript'),
+                            attributes: {
+                                value: 'JavaScript'
+                            }
                         },
                         {
                             tag:'option',
-                            html: 'Groovy'
+                            html: TOMEE.I18N.get('application.console.Groovy'),
+                            attributes: {
+                                value: 'Groovy'
+                            }
                         }
                     ]
                 },
@@ -150,7 +157,7 @@ TOMEE.ApplicationViewHome = function (cf
                     elName:'executeBtn',
                     tag:'button',
                     cls:'btn',
-                    html: 'execute'
+                    html: TOMEE.I18N.get('application.console.execute')
                 }
             ]
         });
@@ -159,6 +166,14 @@ TOMEE.ApplicationViewHome = function (cf
         el.append(elText.main);
         el.append(elBottomBar.main);
 
+        elBottomBar.main.bind('click', function() {
+            var text = elText.main.val();
+            var script = elBottomBar.scriptSelector.val();
+            channel.send('trigger.console.exec', {
+                codeType: script,
+                codeText: text
+            });
+        });
 
         return {
             getEl:function () {



Mime
View raw message