Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DataCollector/DataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ public function collect(Request $request, Response $response, \Exception $except

public function getName()
{
return 'coresphere_console';
return 'web_console';
}
}
3 changes: 2 additions & 1 deletion Resources/config/toolbar_listener.yml
Original file line number Diff line number Diff line change
@@ -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"}
17 changes: 12 additions & 5 deletions Resources/public/css/console.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -192,6 +199,6 @@
}

.console_env_info {
color: rgba(200,200,200,0.7);
/*color: rgba(200,200,200,0.7);*/
float: right;
}
9 changes: 9 additions & 0 deletions Resources/translations/messages.bg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
coresphere_console:
headline:
index: "Конзола"
working_directory: 'Работната директория'
environment: 'Среда'
welcome_message: 'Въведете %command% за да видите достъпните команди.'
loading: 'Зареждане...'
suggestion_head: 'Имахте в предвид:'
empty_response: 'Изпълнено!'
15 changes: 15 additions & 0 deletions Resources/views/Console/console.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -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());
});*/
</script>
{% endblock %}
18 changes: 9 additions & 9 deletions Resources/views/Console/terminal.html.twig
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<h1>{{ 'coresphere_console.headline.index'|trans }}</h1>
{#<h1>{{ 'coresphere_console.headline.index'|trans }}</h1>#}
<div class="console_info_bar">
<strong>{{ 'coresphere_console.working_directory'|trans }}:</strong> {{ working_dir }}
<span class="console_env_info"><strong>{{ 'coresphere_console.environment'|trans }}:</strong> {{ environment }}</span>
</div>
<div id="coresphere_consolebundle_console" class="console">
<div class="console_info_bar">
{{ 'coresphere_console.working_directory'|trans }}: <strong>{{ working_dir }}</strong>
<span class="console_env_info">{{ 'coresphere_console.environment'|trans }}: <strong>{{ environment }}</strong></span>
<div class="console_prompt">
<div contenteditable="true" class="console_input"></div>
<div class="console_input_background"></div>
<div class="console_suggestions"></div>
</div>
<div class="console_log_container">
<ol class="console_log">

</ol>
</div>
<div class="console_prompt">
<div contenteditable="true" class="console_input"></div>
<div class="console_input_background"></div>
</div>
<div class="console_suggestions"></div>
</div>
41 changes: 32 additions & 9 deletions Resources/views/Toolbar/toolbar.html.twig
Original file line number Diff line number Diff line change
@@ -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 %}
<a href="{{ path('console') }}" class="coresphere_console_popover">
<img width="13" height="28" alt="Console" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAcCAYAAABh2p9gAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJ
bWFnZVJlYWR5ccllPAAAAG5JREFUeNpi/P//PwM1ARMDlcGogZQDlhMnTlAtmi0sLBip70IkNiOF
rsMwkKGiouL/CE42Bw4cAGOqGejg4AA3mGouRDaYnGSD1YXoFhCyhIVYm4l16UguvmB5keLCAVTk
UNOFjKO13ggwECDAAAMNHZ7ErsJjAAAAAElFTkSuQmCC"/>
</a>
<img width="20" height="28" alt="{{ 'coresphere_console.headline.index'|trans }}" title="{{ 'coresphere_console.headline.index'|trans }}" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAcCAYAAABh2p9gAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAG5JREFUeNpi/P//PwM1ARMDlcGogZQDlhMnTlAtmi0sLBip70IkNiOFrsMwkKGiouL/CE42Bw4cAGOqGejg4AA3mGouRDaYnGSD1YXoFhCyhIVYm4l16UguvmB5keLCAVTkUNOFjKO13ggwECDAAAMNHZ7ErsJjAAAAAElFTkSuQmCC" />
{% 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 %}
<span class="label">
<span class="icon"><img alt="{{ 'coresphere_console.headline.index'|trans }}" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAcCAYAAABh2p9gAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAG5JREFUeNpi/P//PwM1ARMDlcGogZQDlhMnTlAtmi0sLBip70IkNiOFrsMwkKGiouL/CE42Bw4cAGOqGejg4AA3mGouRDaYnGSD1YXoFhCyhIVYm4l16UguvmB5keLCAVTkUNOFjKO13ggwECDAAAMNHZ7ErsJjAAAAAElFTkSuQmCC" /></span>
<strong>{{ 'coresphere_console.headline.index'|trans }}</strong>
</span>
{% 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 %}