From 596c5fe17f34e9a2d2843b3e69cd57a8726b019c Mon Sep 17 00:00:00 2001 From: Valentin Hristov Date: Sun, 9 Jun 2013 13:28:58 +0300 Subject: [PATCH 1/2] bulgarian translations --- Resources/translations/messages.bg.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Resources/translations/messages.bg.yml diff --git a/Resources/translations/messages.bg.yml b/Resources/translations/messages.bg.yml new file mode 100644 index 0000000..b54aa92 --- /dev/null +++ b/Resources/translations/messages.bg.yml @@ -0,0 +1,9 @@ +coresphere_console: + headline: + index: "Конзола" + working_directory: 'Работната директория' + environment: 'Среда' + welcome_message: 'Въведете %command% за да видите достъпните команди.' + loading: 'Зареждане...' + suggestion_head: 'Имахте в предвид:' + empty_response: 'Изпълнено!' \ No newline at end of file From e43b4ab08b0a7ea6724b35a4e42671e895d35902 Mon Sep 17 00:00:00 2001 From: Valentin Hristov Date: Sun, 9 Jun 2013 19:58:10 +0300 Subject: [PATCH 2/2] integrate console in profiler page --- DataCollector/DataCollector.php | 2 +- Resources/config/toolbar_listener.yml | 3 +- Resources/public/css/console.css | 17 ++++++--- Resources/views/Console/console.html.twig | 15 ++++++++ Resources/views/Console/terminal.html.twig | 18 +++++----- Resources/views/Toolbar/toolbar.html.twig | 41 +++++++++++++++++----- 6 files changed, 71 insertions(+), 25 deletions(-) diff --git a/DataCollector/DataCollector.php b/DataCollector/DataCollector.php index ff84dae..e5fe1f6 100644 --- a/DataCollector/DataCollector.php +++ b/DataCollector/DataCollector.php @@ -25,6 +25,6 @@ public function collect(Request $request, Response $response, \Exception $except public function getName() { - return 'coresphere_console'; + return 'web_console'; } } diff --git a/Resources/config/toolbar_listener.yml b/Resources/config/toolbar_listener.yml index 0f86f58..3ae7d59 100644 --- a/Resources/config/toolbar_listener.yml +++ b/Resources/config/toolbar_listener.yml @@ -1,5 +1,6 @@ services: coresphere_console.toolbar: class: CoreSphere\ConsoleBundle\DataCollector\DataCollector + public: false tags: - - { name: data_collector, template: "CoreSphereConsoleBundle:Toolbar:toolbar", id: "coresphere_console" } + - {name: data_collector, template: "CoreSphereConsoleBundle:Toolbar:toolbar", id: "web_console", type: "service"} diff --git a/Resources/public/css/console.css b/Resources/public/css/console.css index 1f86c47..3306d02 100644 --- a/Resources/public/css/console.css +++ b/Resources/public/css/console.css @@ -5,7 +5,7 @@ color: rgba(240,240,240,1); font-family: Consolas, "Liberation Mono", Courier, monospace; font-size: 0.9em; - border: 5px solid rgba(210,210,210,1); + /*border: 5px solid rgba(210,210,210,1);*/ margin: 0 0 10em 0; } @@ -17,13 +17,19 @@ .console_info_bar { margin: 0; padding: 0.2em 15px 0.2em 0.2em; - background-color: rgba(5,5,5,1); + /*background-color: rgba(5,5,5,1);*/ + color: #BABABA; +} + +.console_info_bar strong { + color: #6C6159; } .console_log_container { - height: 25em; + min-height: 25em; + max-height: 800px; overflow: auto; - overflow-y: scroll; + overflow-y: auto; } .console_log { @@ -39,6 +45,7 @@ background-color: rgba(255,255,255, 1); color: rgba(30, 30, 30,1); position: relative; + margin-bottom: 10px; } .console_prompt::before { @@ -192,6 +199,6 @@ } .console_env_info { - color: rgba(200,200,200,0.7); + /*color: rgba(200,200,200,0.7);*/ float: right; } diff --git a/Resources/views/Console/console.html.twig b/Resources/views/Console/console.html.twig index 851af8e..cdcdc13 100644 --- a/Resources/views/Console/console.html.twig +++ b/Resources/views/Console/console.html.twig @@ -43,5 +43,20 @@ }); {% endautoescape %} }); + /*function consoleResize() { + var totalHeight = 0; + $("body").children().each(function(){ + if ($(this).attr('id') != 'coresphere_consolebundle_console') { + totalHeight = totalHeight + $(this).outerHeight(); + console.log($(this).html()); + } + }); + alert(totalHeight); + } + consoleResize(); + /*$("#coresphere_consolebundle_console").height($(window).height()); + $(window).resize(function(){ + $("#coresphere_consolebundle_console").height($(window).height()); + });*/ {% endblock %} diff --git a/Resources/views/Console/terminal.html.twig b/Resources/views/Console/terminal.html.twig index 9094001..540d926 100644 --- a/Resources/views/Console/terminal.html.twig +++ b/Resources/views/Console/terminal.html.twig @@ -1,17 +1,17 @@ -

{{ 'coresphere_console.headline.index'|trans }}

+{#

{{ 'coresphere_console.headline.index'|trans }}

#} +
+ {{ 'coresphere_console.working_directory'|trans }}: {{ working_dir }} + {{ 'coresphere_console.environment'|trans }}: {{ environment }} +
-
- {{ 'coresphere_console.working_directory'|trans }}: {{ working_dir }} - {{ 'coresphere_console.environment'|trans }}: {{ environment }} +
+
+
+
-
-
-
-
-
diff --git a/Resources/views/Toolbar/toolbar.html.twig b/Resources/views/Toolbar/toolbar.html.twig index 96b3bf1..ec3be38 100644 --- a/Resources/views/Toolbar/toolbar.html.twig +++ b/Resources/views/Toolbar/toolbar.html.twig @@ -1,15 +1,38 @@ -{% extends 'WebProfilerBundle:Profiler:layout.html.twig' %} +{% extends app.request.isXmlHttpRequest ? 'WebProfilerBundle:Profiler:ajax_layout.html.twig' : 'WebProfilerBundle:Profiler:layout.html.twig' %} {% block toolbar %} {% set icon %} - - Console - + {{ 'coresphere_console.headline.index'|trans }} {% endset %} - {% set text %}Console{% endset %} + {#% set text %}Console{% endset %#} - {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with { 'link': false } %} + {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with { 'link': profiler_url } %} +{% endblock %} + +{% block menu %} + + {{ 'coresphere_console.headline.index'|trans }} + {{ 'coresphere_console.headline.index'|trans }} + +{% endblock %} + +{% block panel %} + {{ render(controller('CoreSphereConsoleBundle:Console:console', { + 'token': token, + 'panel': 'console', + })) }} + {#% if 'explain' == page %} + {{ render(controller('DoctrineBundle:Profiler:explain', { + 'token': token, + 'panel': 'db', + 'connectionName': app.request.query.get('connection'), + 'query': app.request.query.get('query') + })) }} + {% else %} + {{ block('queries') }} + {% endif %#} + {# + 'connectionName': app.request.query.get('connection'), + 'query': app.request.query.get('query') +#} {% endblock %}