mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-30 22:18:46 +02:00
N°2435.1 Portal: Split portal composer.json in 2
- Autoloader for portal files in the itop-portal-base module - Dependencies moved to root composer.json - Add autoloader for /core and /application content
This commit is contained in:
@@ -0,0 +1 @@
|
||||
{{ include('@Twig/Exception/error.xml.twig') }}
|
||||
@@ -0,0 +1,4 @@
|
||||
/*
|
||||
{{ status_code }} {{ status_text }}
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="{{ _charset }}" />
|
||||
<title>An Error Occurred: {{ status_text }}</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Oops! An Error Occurred</h1>
|
||||
<h2>The server returned a "{{ status_code }} {{ status_text }}".</h2>
|
||||
|
||||
<div>
|
||||
Something is broken. Please let us know what you were doing when this error occurred.
|
||||
We will fix it as soon as possible. Sorry for any inconvenience caused.
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,4 @@
|
||||
/*
|
||||
{{ status_code }} {{ status_text }}
|
||||
|
||||
*/
|
||||
@@ -0,0 +1 @@
|
||||
{{ { 'error': { 'code': status_code, 'message': status_text } }|json_encode|raw }}
|
||||
@@ -0,0 +1 @@
|
||||
{{ include('@Twig/Exception/error.xml.twig') }}
|
||||
@@ -0,0 +1,7 @@
|
||||
Oops! An Error Occurred
|
||||
=======================
|
||||
|
||||
The server returned a "{{ status_code }} {{ status_text }}".
|
||||
|
||||
Something is broken. Please let us know what you were doing when this error occurred.
|
||||
We will fix it as soon as possible. Sorry for any inconvenience caused.
|
||||
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="{{ _charset }}" ?>
|
||||
|
||||
<error code="{{ status_code }}" message="{{ status_text }}" />
|
||||
@@ -0,0 +1 @@
|
||||
{{ include('@Twig/Exception/exception.xml.twig', { exception: exception }) }}
|
||||
@@ -0,0 +1,3 @@
|
||||
/*
|
||||
{{ include('@Twig/Exception/exception.txt.twig', { exception: exception }) }}
|
||||
*/
|
||||
@@ -0,0 +1,102 @@
|
||||
<div class="exception-summary {{ exception.message is empty ? 'exception-without-message' }}">
|
||||
<div class="exception-metadata">
|
||||
<div class="container">
|
||||
<h2 class="exception-hierarchy">
|
||||
{% for previousException in exception.allPrevious|reverse %}
|
||||
{{ previousException.class|abbr_class }}
|
||||
<span class="icon">{{ include('@Twig/images/chevron-right.svg') }}</span>
|
||||
{% endfor %}
|
||||
{{ exception.class|abbr_class }}
|
||||
</h2>
|
||||
<h2 class="exception-http">
|
||||
HTTP {{ status_code }} <small>{{ status_text }}</small>
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="exception-message-wrapper">
|
||||
<div class="container">
|
||||
<h1 class="break-long-words exception-message {{ exception.message|length > 180 ? 'long' }}">
|
||||
{{- exception.message|nl2br|format_file_from_text -}}
|
||||
</h1>
|
||||
|
||||
<div class="exception-illustration hidden-xs-down">
|
||||
{{ include('@Twig/images/symfony-ghost.svg') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="sf-tabs">
|
||||
<div class="tab">
|
||||
{% set exception_as_array = exception.toarray %}
|
||||
{% set _exceptions_with_user_code = [] %}
|
||||
{% for i, e in exception_as_array %}
|
||||
{% for trace in e.trace %}
|
||||
{% if (trace.file is not empty) and ('/vendor/' not in trace.file) and ('/var/cache/' not in trace.file) and not loop.last %}
|
||||
{% set _exceptions_with_user_code = _exceptions_with_user_code|merge([i]) %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
<h3 class="tab-title">
|
||||
{% if exception_as_array|length > 1 %}
|
||||
Exceptions <span class="badge">{{ exception_as_array|length }}</span>
|
||||
{% else %}
|
||||
Exception
|
||||
{% endif %}
|
||||
</h3>
|
||||
|
||||
<div class="tab-content">
|
||||
{% for i, e in exception_as_array %}
|
||||
{{ include('@Twig/Exception/traces.html.twig', { exception: e, index: loop.index, expand: i in _exceptions_with_user_code or (_exceptions_with_user_code is empty and loop.first) }, with_context = false) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if logger %}
|
||||
<div class="tab {{ logger.logs is empty ? 'disabled' }}">
|
||||
<h3 class="tab-title">
|
||||
Logs
|
||||
{% if logger.counterrors ?? false %}<span class="badge status-error">{{ logger.counterrors }}</span>{% endif %}
|
||||
</h3>
|
||||
|
||||
<div class="tab-content">
|
||||
{% if logger.logs %}
|
||||
{{ include('@Twig/Exception/logs.html.twig', { logs: logger.logs }, with_context = false) }}
|
||||
{% else %}
|
||||
<div class="empty">
|
||||
<p>No log messages</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="tab">
|
||||
<h3 class="tab-title">
|
||||
{% if exception_as_array|length > 1 %}
|
||||
Stack Traces <span class="badge">{{ exception_as_array|length }}</span>
|
||||
{% else %}
|
||||
Stack Trace
|
||||
{% endif %}
|
||||
</h3>
|
||||
|
||||
<div class="tab-content">
|
||||
{% for e in exception_as_array %}
|
||||
{{ include('@Twig/Exception/traces_text.html.twig', { exception: e, index: loop.index, num_exceptions: loop.length }, with_context = false) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if currentContent is not empty %}
|
||||
<div class="tab">
|
||||
<h3 class="tab-title">Output content</h3>
|
||||
|
||||
<div class="tab-content">
|
||||
{{ currentContent }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
/*
|
||||
{{ include('@Twig/Exception/exception.txt.twig', { exception: exception }) }}
|
||||
*/
|
||||
@@ -0,0 +1 @@
|
||||
{{ { 'error': { 'code': status_code, 'message': status_text, 'exception': exception.toarray } }|json_encode|raw }}
|
||||
@@ -0,0 +1 @@
|
||||
{{ include('@Twig/Exception/exception.xml.twig', { exception: exception }) }}
|
||||
@@ -0,0 +1,7 @@
|
||||
[exception] {{ status_code ~ ' | ' ~ status_text ~ ' | ' ~ exception.class }}
|
||||
[message] {{ exception.message }}
|
||||
{% for i, e in exception.toarray %}
|
||||
[{{ i + 1 }}] {{ e.class }}: {{ e.message }}
|
||||
{{ include('@Twig/Exception/traces.txt.twig', { exception: e }, with_context = false) }}
|
||||
|
||||
{% endfor %}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="{{ _charset }}" ?>
|
||||
|
||||
<error code="{{ status_code }}" message="{{ status_text }}">
|
||||
{% for e in exception.toarray %}
|
||||
<exception class="{{ e.class }}" message="{{ e.message }}">
|
||||
{{ include('@Twig/Exception/traces.xml.twig', { exception: e }, with_context = false) }}
|
||||
</exception>
|
||||
{% endfor %}
|
||||
</error>
|
||||
@@ -0,0 +1,142 @@
|
||||
{% extends '@Twig/layout.html.twig' %}
|
||||
|
||||
{% block head %}
|
||||
<style>
|
||||
.sf-reset .traces {
|
||||
padding-bottom: 14px;
|
||||
}
|
||||
.sf-reset .traces li {
|
||||
font-size: 12px;
|
||||
color: #868686;
|
||||
padding: 5px 4px;
|
||||
list-style-type: decimal;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.sf-reset #logs .traces li.error {
|
||||
font-style: normal;
|
||||
color: #AA3333;
|
||||
background: #f9ecec;
|
||||
}
|
||||
.sf-reset #logs .traces li.warning {
|
||||
font-style: normal;
|
||||
background: #ffcc00;
|
||||
}
|
||||
/* fix for Opera not liking empty <li> */
|
||||
.sf-reset .traces li:after {
|
||||
content: "\00A0";
|
||||
}
|
||||
.sf-reset .trace {
|
||||
border: 1px solid #D3D3D3;
|
||||
padding: 10px;
|
||||
overflow: auto;
|
||||
margin: 10px 0 20px;
|
||||
}
|
||||
.sf-reset .block-exception {
|
||||
-moz-border-radius: 16px;
|
||||
-webkit-border-radius: 16px;
|
||||
border-radius: 16px;
|
||||
margin-bottom: 20px;
|
||||
background-color: #f6f6f6;
|
||||
border: 1px solid #dfdfdf;
|
||||
padding: 30px 28px;
|
||||
word-wrap: break-word;
|
||||
overflow: hidden;
|
||||
}
|
||||
.sf-reset .block-exception div {
|
||||
color: #313131;
|
||||
font-size: 10px;
|
||||
}
|
||||
.sf-reset .block-exception-detected .illustration-exception,
|
||||
.sf-reset .block-exception-detected .text-exception {
|
||||
float: left;
|
||||
}
|
||||
.sf-reset .block-exception-detected .illustration-exception {
|
||||
width: 152px;
|
||||
}
|
||||
.sf-reset .block-exception-detected .text-exception {
|
||||
width: 670px;
|
||||
padding: 30px 44px 24px 46px;
|
||||
position: relative;
|
||||
}
|
||||
.sf-reset .text-exception .open-quote,
|
||||
.sf-reset .text-exception .close-quote {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
position: absolute;
|
||||
color: #C9C9C9;
|
||||
font-size: 8em;
|
||||
}
|
||||
.sf-reset .open-quote {
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.sf-reset .close-quote {
|
||||
bottom: -0.5em;
|
||||
right: 50px;
|
||||
}
|
||||
.sf-reset .block-exception p {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
.sf-reset .block-exception p a,
|
||||
.sf-reset .block-exception p a:hover {
|
||||
color: #565656;
|
||||
}
|
||||
.sf-reset .logs h2 {
|
||||
float: left;
|
||||
width: 654px;
|
||||
}
|
||||
.sf-reset .error-count, .sf-reset .support {
|
||||
float: right;
|
||||
width: 170px;
|
||||
text-align: right;
|
||||
}
|
||||
.sf-reset .error-count span {
|
||||
display: inline-block;
|
||||
background-color: #aacd4e;
|
||||
-moz-border-radius: 6px;
|
||||
-webkit-border-radius: 6px;
|
||||
border-radius: 6px;
|
||||
padding: 4px;
|
||||
color: white;
|
||||
margin-right: 2px;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.sf-reset .support a {
|
||||
display: inline-block;
|
||||
-moz-border-radius: 6px;
|
||||
-webkit-border-radius: 6px;
|
||||
border-radius: 6px;
|
||||
padding: 4px;
|
||||
color: #000000;
|
||||
margin-right: 2px;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.sf-reset .toggle {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.sf-reset .linked ul,
|
||||
.sf-reset .linked li {
|
||||
display: inline;
|
||||
}
|
||||
.sf-reset #output-content {
|
||||
color: #000;
|
||||
font-size: 12px;
|
||||
}
|
||||
.sf-reset #traces-text pre {
|
||||
white-space: pre;
|
||||
font-size: 12px;
|
||||
font-family: monospace;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{{ exception.message }} ({{ status_code }} {{ status_text }})
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% include '@Twig/Exception/exception.html.twig' %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,36 @@
|
||||
{% set channel_is_defined = (logs|first).channel is defined %}
|
||||
|
||||
<table class="logs">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Level</th>
|
||||
{% if channel_is_defined %}<th>Channel</th>{% endif %}
|
||||
<th class="full-width">Message</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for log in logs %}
|
||||
{% if log.priority >= 400 %}
|
||||
{% set status = 'error' %}
|
||||
{% elseif log.priority >= 300 %}
|
||||
{% set status = 'warning' %}
|
||||
{% else %}
|
||||
{% set severity = log.context.exception.severity|default(false) %}
|
||||
{% set status = severity is constant('E_DEPRECATED') or severity is constant('E_USER_DEPRECATED') ? 'warning' : 'normal' %}
|
||||
{% endif %}
|
||||
<tr class="status-{{ status }}">
|
||||
<td class="text-small" nowrap>
|
||||
<span class="colored text-bold">{{ log.priorityName }}</span>
|
||||
<span class="text-muted newline">{{ log.timestamp|date('H:i:s') }}</span>
|
||||
</td>
|
||||
{% if channel_is_defined %}
|
||||
<td class="text-small text-bold nowrap">
|
||||
{{ log.channel }}
|
||||
</td>
|
||||
{% endif %}
|
||||
<td>{{ log.message|format_log_message(log.context) }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,33 @@
|
||||
<div class="trace-line-header break-long-words {{ trace.file|default(false) ? 'sf-toggle' }}" data-toggle-selector="#trace-html-{{ prefix }}-{{ i }}" data-toggle-initial="{{ _display_code_snippet ? 'display' }}">
|
||||
{% if trace.file|default(false) %}
|
||||
<span class="icon icon-close">{{ include('@Twig/images/icon-minus-square.svg') }}</span>
|
||||
<span class="icon icon-open">{{ include('@Twig/images/icon-plus-square.svg') }}</span>
|
||||
{% endif %}
|
||||
|
||||
{% if trace.function %}
|
||||
<span class="trace-class">{{ trace.class|abbr_class }}</span>{% if trace.type is not empty %}<span class="trace-type">{{ trace.type }}</span>{% endif %}<span class="trace-method">{{ trace.function }}</span><span class="trace-arguments">({{ trace.args|format_args }})</span>
|
||||
{% endif %}
|
||||
|
||||
{% if trace.file|default(false) %}
|
||||
{% set line_number = trace.line|default(1) %}
|
||||
{% set file_link = trace.file|file_link(line_number) %}
|
||||
{% set file_path = trace.file|format_file(line_number)|striptags|replace({ (' at line ' ~ line_number): '' }) %}
|
||||
{% set file_path_parts = file_path|split(constant('DIRECTORY_SEPARATOR')) %}
|
||||
|
||||
<span class="block trace-file-path">
|
||||
in
|
||||
<a href="{{ file_link }}">{{ file_path_parts[:-1]|join(constant('DIRECTORY_SEPARATOR')) }}{{ constant('DIRECTORY_SEPARATOR') }}<strong>{{ file_path_parts|last }}</strong></a>
|
||||
(line {{ line_number }})
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if trace.file|default(false) %}
|
||||
<div id="trace-html-{{ prefix ~ '-' ~ i }}" class="trace-code sf-toggle-content">
|
||||
{{ trace.file|file_excerpt(trace.line, 5)|replace({
|
||||
'#DD0000': '#183691',
|
||||
'#007700': '#a71d5d',
|
||||
'#0000BB': '#222222',
|
||||
'#FF8000': '#969896'
|
||||
})|raw }}
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,6 @@
|
||||
{% if trace.function %}
|
||||
at {{ trace.class ~ trace.type ~ trace.function }}({{ trace.args|format_args_as_text }})
|
||||
{%- endif -%}
|
||||
{% if trace.file|default('') is not empty and trace.line|default('') is not empty %}
|
||||
{{- trace.function ? '\n (' : 'at '}}{{ trace.file|format_file(trace.line)|striptags|replace({ (' at line ' ~ trace.line): '' }) }}:{{ trace.line }}{{ trace.function ? ')' }}
|
||||
{%- endif %}
|
||||
@@ -0,0 +1,33 @@
|
||||
<div class="trace trace-as-html">
|
||||
<div class="trace-details">
|
||||
<div class="trace-head">
|
||||
<span class="sf-toggle" data-toggle-selector="#trace-html-{{ index }}" data-toggle-initial="{{ expand ? 'display' }}">
|
||||
<h3 class="trace-class">
|
||||
<span class="trace-namespace">
|
||||
{{ exception.class|split('\\')|slice(0, -1)|join('\\') }}
|
||||
{{- exception.class|split('\\')|length > 1 ? '\\' }}
|
||||
</span>
|
||||
{{ exception.class|split('\\')|last }}
|
||||
|
||||
<span class="icon icon-close">{{ include('@Twig/images/icon-minus-square-o.svg') }}</span>
|
||||
<span class="icon icon-open">{{ include('@Twig/images/icon-plus-square-o.svg') }}</span>
|
||||
</h3>
|
||||
|
||||
{% if exception.message is not empty and index > 1 %}
|
||||
<p class="break-long-words trace-message">{{ exception.message }}</p>
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div id="trace-html-{{ index }}" class="sf-toggle-content">
|
||||
{% set _is_first_user_code = true %}
|
||||
{% for i, trace in exception.trace %}
|
||||
{% set _display_code_snippet = _is_first_user_code and ('/vendor/' not in trace.file) and ('/var/cache/' not in trace.file) and (trace.file is not empty) %}
|
||||
{% if _display_code_snippet %}{% set _is_first_user_code = false %}{% endif %}
|
||||
<div class="trace-line">
|
||||
{{ include('@Twig/Exception/trace.html.twig', { prefix: index, i: i, trace: trace, _display_code_snippet: _display_code_snippet }, with_context = false) }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,10 @@
|
||||
{% if exception.trace|length %}
|
||||
{{ exception.class }}:
|
||||
{% if exception.message is not empty %}
|
||||
{{- exception.message }}
|
||||
{% endif %}
|
||||
|
||||
{% for trace in exception.trace %}
|
||||
{{ include('@Twig/Exception/trace.txt.twig', { trace: trace }, with_context = false) }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
@@ -0,0 +1,8 @@
|
||||
<traces>
|
||||
{% for trace in exception.trace %}
|
||||
<trace>
|
||||
{{ include('@Twig/Exception/trace.txt.twig', { trace: trace }, with_context = false) }}
|
||||
|
||||
</trace>
|
||||
{% endfor %}
|
||||
</traces>
|
||||
@@ -0,0 +1,30 @@
|
||||
<table class="trace trace-as-text">
|
||||
<thead class="trace-head">
|
||||
<tr>
|
||||
<th class="sf-toggle" data-toggle-selector="#trace-text-{{ index }}" data-toggle-initial="{{ 1 == index ? 'display' }}">
|
||||
<h3 class="trace-class">
|
||||
{% if num_exceptions > 1 %}
|
||||
<span class="text-muted">[{{ num_exceptions - index + 1 }}/{{ num_exceptions }}]</span>
|
||||
{% endif %}
|
||||
{{ exception.class|split('\\')|last }}
|
||||
<span class="icon icon-close">{{ include('@Twig/images/icon-minus-square-o.svg') }}</span>
|
||||
<span class="icon icon-open">{{ include('@Twig/images/icon-plus-square-o.svg') }}</span>
|
||||
</h3>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody id="trace-text-{{ index }}">
|
||||
<tr>
|
||||
<td>
|
||||
{% if exception.trace|length %}
|
||||
<pre class="stacktrace">
|
||||
{%- apply escape('html') -%}
|
||||
{{- include('@Twig/Exception/traces.txt.twig', { exception: exception, format: 'html' }, with_context = false) }}
|
||||
{% endapply %}
|
||||
</pre>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
Reference in New Issue
Block a user