init
This commit is contained in:
1
vendor/yiisoft/yii2-debug/assets/arrow.svg
vendored
Normal file
1
vendor/yiisoft/yii2-debug/assets/arrow.svg
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 50 50"><path fill="#444" d="M15.563 40.836a.997.997 0 0 0 1.414 0l15-15a1 1 0 0 0 0-1.414l-15-15a1 1 0 0 0-1.414 1.414L29.856 25.13 15.563 39.42a1 1 0 0 0 0 1.414z"/></svg>
|
||||
|
After Width: | Height: | Size: 249 B |
158
vendor/yiisoft/yii2-debug/assets/main.css
vendored
Normal file
158
vendor/yiisoft/yii2-debug/assets/main.css
vendored
Normal file
@@ -0,0 +1,158 @@
|
||||
.main-container {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
span.indent {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
ul.trace {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
margin: 2px 0 0 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
#db-panel-detailed-grid table tbody tr td {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.db-explain {
|
||||
position: absolute;
|
||||
bottom: 4px;
|
||||
right: 4px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.db-explain-text {
|
||||
display: none;
|
||||
margin: 10px 0 0px 0;
|
||||
font-size: 13px;
|
||||
width: 100%;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
#db-explain-all {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
font-size: 12px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
ul.assets {
|
||||
margin: 2px 0 0 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.callout {
|
||||
margin: 0 0 10px 0;
|
||||
padding: 5px;
|
||||
border: solid 1px #eee;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.callout-important {
|
||||
background-color: rgba(185, 74, 72, 0.2);
|
||||
border-color: rgba(185, 74, 72, 0.4);
|
||||
}
|
||||
|
||||
.callout-success {
|
||||
background-color: rgba(70, 136, 71, 0.2);
|
||||
border-color: rgba(70, 136, 71, 0.4);
|
||||
}
|
||||
|
||||
.callout-info {
|
||||
background-color: rgba(58, 135, 173, 0.2);
|
||||
border-color: rgba(58, 135, 173, 0.4);
|
||||
}
|
||||
|
||||
.list-group .glyphicon {
|
||||
float: right;
|
||||
}
|
||||
|
||||
td, th {
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.request-table td {
|
||||
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.request-table tr > th:first-child {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.config-php-info-table td.v {
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.not-set {
|
||||
color: #c55;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.detail-grid-view th {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* add sorting icons to gridview sort links */
|
||||
a.asc:after, a.desc:after {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
display: inline-block;
|
||||
font-family: 'Glyphicons Halflings';
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
line-height: 1;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
a.asc:after {
|
||||
content: /*"\e113"*/ "\e151";
|
||||
}
|
||||
|
||||
a.desc:after {
|
||||
content: /*"\e114"*/ "\e152";
|
||||
}
|
||||
|
||||
.sort-numerical a.asc:after {
|
||||
content: "\e153";
|
||||
}
|
||||
|
||||
.sort-numerical a.desc:after {
|
||||
content: "\e154";
|
||||
}
|
||||
|
||||
.sort-ordinal a.asc:after {
|
||||
content: "\e155";
|
||||
}
|
||||
|
||||
.sort-ordinal a.desc:after {
|
||||
content: "\e156";
|
||||
}
|
||||
|
||||
.mail-sorter {
|
||||
margin-top: 7px;
|
||||
}
|
||||
|
||||
.mail-sorter li {
|
||||
list-style: none;
|
||||
float: left;
|
||||
width: 12%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.nowrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.table-pointer tbody tr {
|
||||
cursor: pointer;
|
||||
}
|
||||
1
vendor/yiisoft/yii2-debug/assets/maximize.svg
vendored
Normal file
1
vendor/yiisoft/yii2-debug/assets/maximize.svg
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 50 50"><path fill="#444" d="M39.642 9.722a1.01 1.01 0 0 0-.382-.077H28.103a1 1 0 0 0 0 2h8.743L21.7 26.79a1 1 0 0 0 1.414 1.415L38.26 13.06v8.743a1 1 0 0 0 2 0V10.646a1.005 1.005 0 0 0-.618-.924z"/><path d="M39.26 27.985a1 1 0 0 0-1 1v10.66h-28v-28h10.683a1 1 0 0 0 0-2H9.26a1 1 0 0 0-1 1v30a1 1 0 0 0 1 1h30a1 1 0 0 0 1-1v-11.66a1 1 0 0 0-1-1z"/></svg>
|
||||
|
After Width: | Height: | Size: 430 B |
1
vendor/yiisoft/yii2-debug/assets/switch.svg
vendored
Normal file
1
vendor/yiisoft/yii2-debug/assets/switch.svg
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 50 50" version="1.1"><path d="m41.1 23c-0.6 0-1 0.4-1 1v10.7l-25.6-0.1c0 0 0-2 0-2.8 0-0.8-0.7-1-1-0.6l-3.5 3.5c-0.6 0.6-0.6 1.3 0 2l3.4 3.4c0.4 0.4 1.1 0.2 1-0.6l0-2.9c0 0 20.8 0.1 26.6 0 0.6 0 1-0.4 1-1v-11.7c0-0.6-0.4-1-1-1zM9 26.9 9 26.9 9 26.9 9 26.9"/><path d="m9 26.9c0.6 0 1-0.4 1-1v-10.7l25.6 0.1c0 0 0 2 0 2.8 0 0.8 0.7 1 1 0.6l3.5-3.5c0.6-0.6 0.6-1.3 0-2l-3.4-3.4c-0.4-0.4-1.1-0.2-1 0.6l0 2.9c0 0-20.8-0.1-26.6 0-0.6 0-1 0.4-1 1v11.7c0 0.6 0.4 1 1 1z"/></svg>
|
||||
|
After Width: | Height: | Size: 585 B |
213
vendor/yiisoft/yii2-debug/assets/timeline.css
vendored
Normal file
213
vendor/yiisoft/yii2-debug/assets/timeline.css
vendored
Normal file
@@ -0,0 +1,213 @@
|
||||
.debug-timeline-panel {
|
||||
border: 1px solid #ddd;
|
||||
position: relative;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.debug-timeline-panel.inline .debug-timeline-panel__item {
|
||||
height: 20px;
|
||||
margin-top: -20px;
|
||||
border-bottom: 0;
|
||||
}
|
||||
.debug-timeline-panel.inline .debug-timeline-panel__item:first-child {
|
||||
margin: 0;
|
||||
}
|
||||
.debug-timeline-panel.inline .debug-timeline-panel__item:not(.empty):hover {
|
||||
background-color: transparent;
|
||||
}
|
||||
.debug-timeline-panel.inline .debug-timeline-panel__items .time {
|
||||
box-shadow: inset 0px 0 3px -1px rgba(255, 255, 255, 0.7);
|
||||
}
|
||||
.debug-timeline-panel.inline .debug-timeline-panel__items .category {
|
||||
display: none;
|
||||
}
|
||||
.debug-timeline-panel.inline .ruler.ruler-start,
|
||||
.debug-timeline-panel.inline .ruler.ruler-end{
|
||||
display: none;
|
||||
}
|
||||
.debug-timeline-panel:not(.inline) .debug-timeline-panel__item a:focus{
|
||||
outline: none;
|
||||
}
|
||||
.debug-timeline-panel.affix .ruler b {
|
||||
z-index: 2;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
}
|
||||
.debug-timeline-panel .category {
|
||||
opacity: 1;
|
||||
font-size: 10px;
|
||||
position: absolute;
|
||||
line-height: 20px;
|
||||
padding: 0 10px;
|
||||
color: #222;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
}
|
||||
.debug-timeline-panel .category span {
|
||||
color: #7d7d7d;
|
||||
}
|
||||
.debug-timeline-panel .category span.memory[title] {
|
||||
cursor: help;
|
||||
border-bottom: 1px dotted #777;
|
||||
}
|
||||
.debug-timeline-panel .right > .category {
|
||||
right: 100%;
|
||||
}
|
||||
.debug-timeline-panel .left > .category {
|
||||
left: 100%;
|
||||
}
|
||||
.debug-timeline-panel .ruler {
|
||||
position: absolute;
|
||||
content: '';
|
||||
font-size: 10px;
|
||||
padding-left: 2px;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
border-left: 1px solid #ddd;
|
||||
}
|
||||
.debug-timeline-panel__header .ruler:first-child{
|
||||
border-left: none;
|
||||
}
|
||||
.debug-timeline-panel .ruler.ruler-start {
|
||||
top: auto;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.debug-timeline-panel .ruler.ruler-end {
|
||||
left: -1px;
|
||||
top: auto;
|
||||
}
|
||||
.debug-timeline-panel .ruler b {
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
color: black;
|
||||
font-weight: bold;
|
||||
white-space: nowrap;
|
||||
background-color: rgba(255,255,255,.4);
|
||||
min-width: 40px;
|
||||
line-height: 19px;
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
.debug-timeline-panel .time {
|
||||
position: relative;
|
||||
min-height: 20px;
|
||||
display: block;
|
||||
min-width: 1px;
|
||||
padding: 0;
|
||||
background-color: #989898;
|
||||
}
|
||||
.debug-timeline-panel .time + .tooltip .tooltip-inner{
|
||||
max-width: 300px;
|
||||
max-height: 180px;
|
||||
overflow: auto;
|
||||
word-wrap: break-word;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
.debug-timeline-panel__header {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
}
|
||||
.debug-timeline-panel__header,
|
||||
.debug-timeline-panel__item {
|
||||
min-height: 20px;
|
||||
border-bottom: 1px solid #ddd;
|
||||
overflow: hidden;
|
||||
}
|
||||
.debug-timeline-panel__header .control {
|
||||
position: absolute;
|
||||
margin-left: -20px;
|
||||
top:0;
|
||||
}
|
||||
.debug-timeline-panel__header .control button {
|
||||
display: none;
|
||||
padding: 0;
|
||||
}
|
||||
.debug-timeline-panel__header .control button:focus{
|
||||
outline: none;
|
||||
}
|
||||
.debug-timeline-panel__header .control button:hover{
|
||||
fill: #337ab7;
|
||||
}
|
||||
.debug-timeline-panel:not(.inline) .debug-timeline-panel__header .control button.inline,
|
||||
.debug-timeline-panel.inline .debug-timeline-panel__header .control button.open{
|
||||
display: block;
|
||||
}
|
||||
.debug-timeline-panel.affix .debug-timeline-panel__header .control{
|
||||
position: fixed;
|
||||
}
|
||||
.debug-timeline-panel__item:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
.debug-timeline-panel__item:nth-child(2n) {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
.debug-timeline-panel__item:hover {
|
||||
background-color: rgba(51, 122, 183, 0.16);
|
||||
}
|
||||
.debug-timeline-panel__item.empty {
|
||||
background-color: #f9f9f9;
|
||||
line-height: 20px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
.debug-timeline-panel__item.empty span {
|
||||
position: absolute;
|
||||
background-color: inherit;
|
||||
}
|
||||
.debug-timeline-panel__search {
|
||||
background-color: #f9f9f9;
|
||||
padding: 10px 10px 0px 10px;
|
||||
margin-bottom: 10px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.debug-timeline-panel__search > div {
|
||||
display: inline-block;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.debug-timeline-panel__search .duration {
|
||||
margin-right: 20px;
|
||||
}
|
||||
.debug-timeline-panel__search label {
|
||||
width: 80px;
|
||||
}
|
||||
.debug-timeline-panel__search input {
|
||||
font-size: 16px;
|
||||
padding: 4px;
|
||||
}
|
||||
.debug-timeline-panel__search input#timeline-duration {
|
||||
width: 55px;
|
||||
text-align: right;
|
||||
}
|
||||
.debug-timeline-panel__search input#timeline-category {
|
||||
min-width: 185px;
|
||||
}
|
||||
.debug-timeline-panel__memory {
|
||||
position: relative;
|
||||
margin-top: 18px;
|
||||
box-sizing: content-box;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
.debug-timeline-panel__memory svg{
|
||||
width: 100%;
|
||||
}
|
||||
.debug-timeline-panel__memory .scale {
|
||||
font-size: 12px;
|
||||
line-height: 16px;
|
||||
position: absolute;
|
||||
border-bottom: 1px dashed #000;
|
||||
width: 100%;
|
||||
padding-left: 6px;
|
||||
transition: bottom 0.2s ease;
|
||||
}
|
||||
|
||||
|
||||
@media (max-width:767px) {
|
||||
.debug-timeline-panel .ruler:nth-child(2n) b{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media (max-width: 991px) {
|
||||
.debug-timeline-panel__header .control{
|
||||
margin-left: -17px;
|
||||
}
|
||||
}
|
||||
|
||||
66
vendor/yiisoft/yii2-debug/assets/timeline.js
vendored
Normal file
66
vendor/yiisoft/yii2-debug/assets/timeline.js
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
var Timeline = function (options) {
|
||||
|
||||
this.options = options;
|
||||
var self = this;
|
||||
this.init = function () {
|
||||
if (this.options.$focus) {
|
||||
this.options.$focus.focus();
|
||||
delete this.options.$focus;
|
||||
}
|
||||
self.options.$timeline.find('.debug-timeline-panel__item a')
|
||||
.on('show.bs.tooltip', function () {
|
||||
var data = $(this).data('memory');
|
||||
if (data) {
|
||||
self.options.$memory.text(data[0]).css({'bottom': data[1]+'%'});
|
||||
}
|
||||
})
|
||||
.tooltip();
|
||||
return self;
|
||||
};
|
||||
this.setFocus = function ($elem) {
|
||||
this.options.$focus = $elem;
|
||||
return $elem;
|
||||
};
|
||||
this.affixTop = function (refresh) {
|
||||
if (!this.options.affixTop || refresh) {
|
||||
this.options.affixTop = self.options.$header.offset().top;
|
||||
}
|
||||
return this.options.affixTop;
|
||||
};
|
||||
|
||||
$(document).on('pjax:success', function () {
|
||||
self.init()
|
||||
});
|
||||
$(window).on('resize', function () {
|
||||
self.affixTop(true);
|
||||
});
|
||||
self.options.$header
|
||||
.on('dblclick', function () {
|
||||
self.options.$timeline.toggleClass('inline');
|
||||
})
|
||||
.on('click', 'button', function () {
|
||||
self.options.$timeline.toggleClass('inline');
|
||||
});
|
||||
self.options.$search.on('change', function () {
|
||||
self.setFocus($(this)).submit();
|
||||
});
|
||||
self.options.$timeline.affix({
|
||||
offset: {
|
||||
top: function () {
|
||||
return self.affixTop()
|
||||
}
|
||||
}
|
||||
});
|
||||
this.init();
|
||||
};
|
||||
|
||||
(new Timeline({
|
||||
'$timeline': $('.debug-timeline-panel'),
|
||||
'$header': $('.debug-timeline-panel__header'),
|
||||
'$search': $('.debug-timeline-panel__search input'),
|
||||
'$memory': $('.debug-timeline-panel__memory .scale')
|
||||
}));
|
||||
})();
|
||||
353
vendor/yiisoft/yii2-debug/assets/toolbar.css
vendored
Normal file
353
vendor/yiisoft/yii2-debug/assets/toolbar.css
vendored
Normal file
@@ -0,0 +1,353 @@
|
||||
|
||||
#yii-debug-toolbar-logo {
|
||||
position: fixed;
|
||||
right: 31px;
|
||||
bottom: 4px;
|
||||
}
|
||||
|
||||
@media print {
|
||||
.yii-debug-toolbar {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.yii-debug-toolbar {
|
||||
font: 11px Verdana, Arial, sans-serif;
|
||||
text-align: left;
|
||||
width: 96px;
|
||||
transition: width .3s ease;
|
||||
z-index: 1000000;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar_active {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar_position_top {
|
||||
margin: 0 0 20px 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar_position_bottom {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__bar {
|
||||
position: relative;
|
||||
padding: 0;
|
||||
font: 11px Verdana, Arial, sans-serif;
|
||||
text-align: left;
|
||||
overflow: hidden;
|
||||
box-sizing: content-box;
|
||||
|
||||
background: rgb(255, 255, 255);
|
||||
background: -moz-linear-gradient(top, rgb(255, 255, 255) 0%, rgb(247, 247, 247) 100%); /* FF3.6-15 */
|
||||
background: -webkit-linear-gradient(top, rgb(255, 255, 255) 0%, rgb(247, 247, 247) 100%); /* Chrome10-25,Safari5.1-6 */
|
||||
background: linear-gradient(to bottom, rgb(255, 255, 255) 0%, rgb(247, 247, 247) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f7f7f7', GradientType=0); /* IE6-9 */
|
||||
|
||||
border: 1px solid rgba(0, 0, 0, 0.11);
|
||||
|
||||
/* ensure debug toolbar text is displayed ltr even on rtl pages */
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar.yii-debug-toolbar_active:not(.yii-debug-toolbar_animating) .yii-debug-toolbar__bar {
|
||||
overflow: visible;
|
||||
}
|
||||
.yii-debug-toolbar:not(.yii-debug-toolbar_active) .yii-debug-toolbar__bar,
|
||||
.yii-debug-toolbar.yii-debug-toolbar_animating .yii-debug-toolbar__bar {
|
||||
height:40px;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__bar:after {
|
||||
content: '';
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__view {
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__view iframe {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
padding-top: 10px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar_iframe_active .yii-debug-toolbar__view {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar_iframe_animating .yii-debug-toolbar__view {
|
||||
transition: height .3s ease;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__block {
|
||||
float: left;
|
||||
margin: 0;
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.11);
|
||||
padding: 4px 8px;
|
||||
line-height: 32px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__block_active,
|
||||
.yii-debug-toolbar__ajax:hover {
|
||||
background: rgb(247, 247, 247); /* Old browsers */
|
||||
background: -moz-linear-gradient(top, rgb(247, 247, 247) 0%, rgb(224, 224, 224) 100%); /* FF3.6-15 */
|
||||
background: -webkit-linear-gradient(top, rgb(247, 247, 247) 0%, rgb(224, 224, 224) 100%); /* Chrome10-25,Safari5.1-6 */
|
||||
background: linear-gradient(to bottom, rgb(247, 247, 247) 0%, rgb(224, 224, 224) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f7f7f7', endColorstr='#e0e0e0', GradientType=0); /* IE6-9 */
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__block a {
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__block img {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__label {
|
||||
display: inline-block;
|
||||
padding: 2px 4px;
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
line-height: 14px;
|
||||
white-space: nowrap;
|
||||
vertical-align: baseline;
|
||||
color: #ffffff;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
background-color: #999999;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__label:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
a.yii-debug-toolbar__label:hover,
|
||||
a.yii-debug-toolbar__label:focus {
|
||||
color: #ffffff;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__label_important,
|
||||
.yii-debug-toolbar__label_error {
|
||||
background-color: #b94a48;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__label_important[href] {
|
||||
background-color: #953b39;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__label_warning,
|
||||
.yii-debug-toolbar__badge_warning {
|
||||
background-color: #f89406;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__label_warning[href] {
|
||||
background-color: #c67605;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__label_success {
|
||||
background-color: #468847;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__label_success[href] {
|
||||
background-color: #356635;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__label_info {
|
||||
background-color: #3a87ad;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__label_info[href] {
|
||||
background-color: #2d6987;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__label_inverse,
|
||||
.yii-debug-toolbar__badge_inverse {
|
||||
background-color: #333333;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__label_inverse[href],
|
||||
.yii-debug-toolbar__badge_inverse[href] {
|
||||
background-color: #1a1a1a;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__title {
|
||||
background: rgb(247, 247, 247); /* Old browsers */
|
||||
background: -moz-linear-gradient(top, rgb(247, 247, 247) 0%, rgb(224, 224, 224) 100%); /* FF3.6-15 */
|
||||
background: -webkit-linear-gradient(top, rgb(247, 247, 247) 0%, rgb(224, 224, 224) 100%); /* Chrome10-25,Safari5.1-6 */
|
||||
background: linear-gradient(to bottom, rgb(247, 247, 247) 0%, rgb(224, 224, 224) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f7f7f7', endColorstr='#e0e0e0', GradientType=0); /* IE6-9 */
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__block_last{ /* creates space for .yii-debug-toolbar__toggle, .yii-debug-toolbar__external */
|
||||
width: 80px;
|
||||
height: 40px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__toggle,
|
||||
.yii-debug-toolbar__external {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
font-size: 25px;
|
||||
font-weight: 100;
|
||||
line-height: 28px;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
|
||||
opacity: 0.5;
|
||||
filter: alpha(opacity=50);
|
||||
|
||||
transition: opacity .3s ease;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__toggle:hover,
|
||||
.yii-debug-toolbar__toggle:focus,
|
||||
.yii-debug-toolbar__external:hover,
|
||||
.yii-debug-toolbar__external:focus {
|
||||
color: #ffffff;
|
||||
text-decoration: none;
|
||||
opacity: 0.9;
|
||||
filter: alpha(opacity=90);
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__toggle-icon,
|
||||
.yii-debug-toolbar__external-icon {
|
||||
display: inline-block;
|
||||
|
||||
background-position: 50% 50%;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__toggle {
|
||||
right: 10px;
|
||||
bottom: 4px;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__toggle-icon {
|
||||
padding: 7px 0;
|
||||
width: 10px;
|
||||
height: 16px;
|
||||
background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNSIgaGVpZ2h0PSIxNSIgdmlld0JveD0iMCAwIDUwIDUwIj48cGF0aCBmaWxsPSIjNDQ0IiBkPSJNMTUuNTYzIDQwLjgzNmEuOTk3Ljk5NyAwIDAgMCAxLjQxNCAwbDE1LTE1YTEgMSAwIDAgMCAwLTEuNDE0bC0xNS0xNWExIDEgMCAwIDAtMS40MTQgMS40MTRMMjkuODU2IDI1LjEzIDE1LjU2MyAzOS40MmExIDEgMCAwIDAgMCAxLjQxNHoiLz48L3N2Zz4=');
|
||||
transition: -webkit-transform .3s ease-out;
|
||||
transition: transform .3s ease-out;
|
||||
-webkit-transform: rotate(180deg);
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
.yii-debug-toolbar_active .yii-debug-toolbar__toggle-icon {
|
||||
-webkit-transform: rotate(0);
|
||||
transform: rotate(0);
|
||||
}
|
||||
|
||||
.yii-debug-toolbar_iframe_active .yii-debug-toolbar__toggle-icon {
|
||||
-webkit-transform: rotate(90deg);
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__external {
|
||||
display: none;
|
||||
right: 50px;
|
||||
bottom: 4px;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar_iframe_active .yii-debug-toolbar__external {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__external-icon {
|
||||
padding: 8px 0;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNSIgaGVpZ2h0PSIxNSIgdmlld0JveD0iMCAwIDUwIDUwIj48cGF0aCBmaWxsPSIjNDQ0IiBkPSJNMzkuNjQyIDkuNzIyYTEuMDEgMS4wMSAwIDAgMC0uMzgyLS4wNzdIMjguMTAzYTEgMSAwIDAgMCAwIDJoOC43NDNMMjEuNyAyNi43OWExIDEgMCAwIDAgMS40MTQgMS40MTVMMzguMjYgMTMuMDZ2OC43NDNhMSAxIDAgMCAwIDIgMFYxMC42NDZhMS4wMDUgMS4wMDUgMCAwIDAtLjYxOC0uOTI0eiIvPjxwYXRoIGQ9Ik0zOS4yNiAyNy45ODVhMSAxIDAgMCAwLTEgMXYxMC42NmgtMjh2LTI4aDEwLjY4M2ExIDEgMCAwIDAgMC0ySDkuMjZhMSAxIDAgMCAwLTEgMXYzMGExIDEgMCAwIDAgMSAxaDMwYTEgMSAwIDAgMCAxLTF2LTExLjY2YTEgMSAwIDAgMC0xLTF6Ii8+PC9zdmc+');
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__switch-icon {
|
||||
margin-left: 10px;
|
||||
padding: 5px 10px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgdmlld0JveD0iMCAwIDUwIDUwIiB2ZXJzaW9uPSIxLjEiPjxwYXRoIGQ9Im00MS4xIDIzYy0wLjYgMC0xIDAuNC0xIDF2MTAuN2wtMjUuNi0wLjFjMCAwIDAtMiAwLTIuOCAwLTAuOC0wLjctMS0xLTAuNmwtMy41IDMuNWMtMC42IDAuNi0wLjYgMS4zIDAgMmwzLjQgMy40YzAuNCAwLjQgMS4xIDAuMiAxLTAuNmwwLTIuOWMwIDAgMjAuOCAwLjEgMjYuNiAwIDAuNiAwIDEtMC40IDEtMXYtMTEuN2MwLTAuNi0wLjQtMS0xLTF6TTkgMjYuOSA5IDI2LjkgOSAyNi45IDkgMjYuOSIvPjxwYXRoIGQ9Im05IDI2LjljMC42IDAgMS0wLjQgMS0xdi0xMC43bDI1LjYgMC4xYzAgMCAwIDIgMCAyLjggMCAwLjggMC43IDEgMSAwLjZsMy41LTMuNWMwLjYtMC42IDAuNi0xLjMgMC0ybC0zLjQtMy40Yy0wLjQtMC40LTEuMS0wLjItMSAwLjZsMCAyLjljMCAwLTIwLjgtMC4xLTI2LjYgMC0wLjYgMC0xIDAuNC0xIDF2MTEuN2MwIDAuNiAwLjQgMSAxIDF6Ii8+PC9zdmc+');
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__ajax {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.yii-debug-toolbar__ajax:hover .yii-debug-toolbar__ajax_info,
|
||||
.yii-debug-toolbar__ajax:focus .yii-debug-toolbar__ajax_info {
|
||||
visibility: visible;
|
||||
}
|
||||
.yii-debug-toolbar__ajax_info {
|
||||
visibility: hidden;
|
||||
transition: visibility .2s linear;
|
||||
background-color: white;
|
||||
box-shadow: inset 0 -10px 10px -10px #e1e1e1;
|
||||
position: absolute;
|
||||
bottom: 40px;
|
||||
left: -1px;
|
||||
padding: 10px;
|
||||
max-width: 480px;
|
||||
max-height: 480px;
|
||||
word-wrap: break-word;
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid rgba(0, 0, 0, 0.11);
|
||||
z-index: 1000001;
|
||||
}
|
||||
.yii-debug-toolbar__ajax a {
|
||||
color: #337ab7;
|
||||
}
|
||||
.yii-debug-toolbar__ajax table {
|
||||
width: 100%;
|
||||
table-layout: auto;
|
||||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.yii-debug-toolbar__ajax table td {
|
||||
padding: 4px;
|
||||
font-size: 12px;
|
||||
line-height: normal;
|
||||
vertical-align: top;
|
||||
border-top: 1px solid #ddd;
|
||||
}
|
||||
.yii-debug-toolbar__ajax table th {
|
||||
padding: 4px;
|
||||
font-size: 11px;
|
||||
line-height: normal;
|
||||
vertical-align: bottom;
|
||||
border-bottom: 2px solid #ddd;
|
||||
}
|
||||
.yii-debug-toolbar__ajax_request_status {
|
||||
color: white;
|
||||
padding: 2px 5px;
|
||||
}
|
||||
.yii-debug-toolbar__ajax_request_url {
|
||||
max-width: 170px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
348
vendor/yiisoft/yii2-debug/assets/toolbar.js
vendored
Normal file
348
vendor/yiisoft/yii2-debug/assets/toolbar.js
vendored
Normal file
@@ -0,0 +1,348 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
var findToolbar = function () {
|
||||
return document.querySelector('#yii-debug-toolbar');
|
||||
},
|
||||
ajax = function (url, settings) {
|
||||
var xhr = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');
|
||||
settings = settings || {};
|
||||
xhr.open(settings.method || 'GET', url, true);
|
||||
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
|
||||
xhr.setRequestHeader('Accept', 'text/html');
|
||||
xhr.onreadystatechange = function (state) {
|
||||
if (xhr.readyState === 4) {
|
||||
if (xhr.status === 200 && settings.success) {
|
||||
settings.success(xhr);
|
||||
} else if (xhr.status != 200 && settings.error) {
|
||||
settings.error(xhr);
|
||||
}
|
||||
}
|
||||
};
|
||||
xhr.send(settings.data || '');
|
||||
},
|
||||
url,
|
||||
div,
|
||||
toolbarEl = findToolbar(),
|
||||
toolbarAnimatingClass = 'yii-debug-toolbar_animating',
|
||||
barSelector = '.yii-debug-toolbar__bar',
|
||||
viewSelector = '.yii-debug-toolbar__view',
|
||||
blockSelector = '.yii-debug-toolbar__block',
|
||||
toggleSelector = '.yii-debug-toolbar__toggle',
|
||||
externalSelector = '.yii-debug-toolbar__external',
|
||||
|
||||
CACHE_KEY = 'yii-debug-toolbar',
|
||||
ACTIVE_STATE = 'active',
|
||||
|
||||
animationTime = 300,
|
||||
|
||||
activeClass = 'yii-debug-toolbar_active',
|
||||
iframeActiveClass = 'yii-debug-toolbar_iframe_active',
|
||||
iframeAnimatingClass = 'yii-debug-toolbar_iframe_animating',
|
||||
titleClass = 'yii-debug-toolbar__title',
|
||||
blockClass = 'yii-debug-toolbar__block',
|
||||
blockActiveClass = 'yii-debug-toolbar__block_active',
|
||||
requestStack = [];
|
||||
|
||||
if (toolbarEl) {
|
||||
url = toolbarEl.getAttribute('data-url');
|
||||
|
||||
ajax(url, {
|
||||
success: function (xhr) {
|
||||
div = document.createElement('div');
|
||||
div.innerHTML = xhr.responseText;
|
||||
|
||||
toolbarEl.parentNode && toolbarEl.parentNode.replaceChild(div, toolbarEl);
|
||||
|
||||
showToolbar(findToolbar());
|
||||
},
|
||||
error: function (xhr) {
|
||||
toolbarEl.innerText = xhr.responseText;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function showToolbar(toolbarEl) {
|
||||
var barEl = toolbarEl.querySelector(barSelector),
|
||||
viewEl = toolbarEl.querySelector(viewSelector),
|
||||
toggleEl = toolbarEl.querySelector(toggleSelector),
|
||||
externalEl = toolbarEl.querySelector(externalSelector),
|
||||
blockEls = barEl.querySelectorAll(blockSelector),
|
||||
iframeEl = viewEl.querySelector('iframe'),
|
||||
iframeHeight = function () {
|
||||
return (window.innerHeight * 0.7) + 'px';
|
||||
},
|
||||
isIframeActive = function () {
|
||||
return toolbarEl.classList.contains(iframeActiveClass);
|
||||
},
|
||||
showIframe = function (href) {
|
||||
toolbarEl.classList.add(iframeAnimatingClass);
|
||||
toolbarEl.classList.add(iframeActiveClass);
|
||||
|
||||
iframeEl.src = externalEl.href = href;
|
||||
viewEl.style.height = iframeHeight();
|
||||
setTimeout(function() {
|
||||
toolbarEl.classList.remove(iframeAnimatingClass);
|
||||
}, animationTime);
|
||||
},
|
||||
hideIframe = function () {
|
||||
toolbarEl.classList.add(iframeAnimatingClass);
|
||||
toolbarEl.classList.remove(iframeActiveClass);
|
||||
removeActiveBlocksCls();
|
||||
|
||||
externalEl.href = '#';
|
||||
viewEl.style.height = '';
|
||||
setTimeout(function() {
|
||||
toolbarEl.classList.remove(iframeAnimatingClass);
|
||||
}, animationTime);
|
||||
},
|
||||
removeActiveBlocksCls = function () {
|
||||
[].forEach.call(blockEls, function (el) {
|
||||
el.classList.remove(blockActiveClass);
|
||||
});
|
||||
},
|
||||
toggleToolbarClass = function (className) {
|
||||
toolbarEl.classList.add(toolbarAnimatingClass);
|
||||
if (toolbarEl.classList.contains(className)) {
|
||||
toolbarEl.classList.remove(className);
|
||||
} else {
|
||||
toolbarEl.classList.add(className);
|
||||
}
|
||||
setTimeout(function () {
|
||||
toolbarEl.classList.remove(toolbarAnimatingClass);
|
||||
}, animationTime);
|
||||
},
|
||||
toggleStorageState = function (key, value) {
|
||||
if (window.localStorage) {
|
||||
var item = localStorage.getItem(key);
|
||||
|
||||
if (item) {
|
||||
localStorage.removeItem(key);
|
||||
} else {
|
||||
localStorage.setItem(key, value);
|
||||
}
|
||||
}
|
||||
},
|
||||
restoreStorageState = function (key) {
|
||||
if (window.localStorage) {
|
||||
return localStorage.getItem(key);
|
||||
}
|
||||
},
|
||||
togglePosition = function () {
|
||||
if (isIframeActive()) {
|
||||
hideIframe();
|
||||
} else {
|
||||
toggleToolbarClass(activeClass);
|
||||
toggleStorageState(CACHE_KEY, ACTIVE_STATE);
|
||||
}
|
||||
};
|
||||
|
||||
toolbarEl.style.display = 'block';
|
||||
|
||||
if (restoreStorageState(CACHE_KEY) === ACTIVE_STATE) {
|
||||
toolbarEl.classList.add(activeClass);
|
||||
}
|
||||
|
||||
window.onresize = function () {
|
||||
if (toolbarEl.classList.contains(iframeActiveClass)) {
|
||||
viewEl.style.height = iframeHeight();
|
||||
}
|
||||
};
|
||||
|
||||
barEl.onclick = function (e) {
|
||||
var target = e.target,
|
||||
block = findAncestor(target, blockClass);
|
||||
|
||||
if (block && !block.classList.contains(titleClass)
|
||||
&& e.which !== 2 && !e.ctrlKey // not mouse wheel and not ctrl+click
|
||||
) {
|
||||
while (target !== this) {
|
||||
if (target.href) {
|
||||
removeActiveBlocksCls();
|
||||
block.classList.add(blockActiveClass);
|
||||
showIframe(target.href);
|
||||
}
|
||||
target = target.parentNode;
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
}
|
||||
};
|
||||
|
||||
toggleEl.onclick = togglePosition;
|
||||
}
|
||||
|
||||
function findAncestor(el, cls) {
|
||||
while ((el = el.parentElement) && !el.classList.contains(cls));
|
||||
return el;
|
||||
}
|
||||
|
||||
function renderAjaxRequests() {
|
||||
var requestCounter = document.getElementsByClassName('yii-debug-toolbar__ajax_counter');
|
||||
if (!requestCounter.length) {
|
||||
return;
|
||||
}
|
||||
var ajaxToolbarPanel = document.querySelector('.yii-debug-toolbar__ajax');
|
||||
var tbodies = document.getElementsByClassName('yii-debug-toolbar__ajax_requests');
|
||||
var state = 'ok';
|
||||
if (tbodies.length) {
|
||||
var tbody = tbodies[0];
|
||||
var rows = document.createDocumentFragment();
|
||||
if (requestStack.length) {
|
||||
var firstItem = requestStack.length > 20 ? requestStack.length - 20 : 0;
|
||||
for (var i = firstItem; i < requestStack.length; i++) {
|
||||
var request = requestStack[i];
|
||||
var row = document.createElement('tr');
|
||||
rows.appendChild(row);
|
||||
|
||||
var methodCell = document.createElement('td');
|
||||
methodCell.innerHTML = request.method;
|
||||
row.appendChild(methodCell);
|
||||
|
||||
var statusCodeCell = document.createElement('td');
|
||||
var statusCode = document.createElement('span');
|
||||
if (request.statusCode < 300) {
|
||||
statusCode.setAttribute('class', 'yii-debug-toolbar__ajax_request_status yii-debug-toolbar__label_success');
|
||||
} else if (request.statusCode < 400) {
|
||||
statusCode.setAttribute('class', 'yii-debug-toolbar__ajax_request_status yii-debug-toolbar__label_warning');
|
||||
} else {
|
||||
statusCode.setAttribute('class', 'yii-debug-toolbar__ajax_request_status yii-debug-toolbar__label_error');
|
||||
}
|
||||
statusCode.textContent = request.statusCode || '-';
|
||||
statusCodeCell.appendChild(statusCode);
|
||||
row.appendChild(statusCodeCell);
|
||||
|
||||
var pathCell = document.createElement('td');
|
||||
pathCell.className = 'yii-debug-toolbar__ajax_request_url';
|
||||
pathCell.innerHTML = request.url;
|
||||
pathCell.setAttribute('title', request.url);
|
||||
row.appendChild(pathCell);
|
||||
|
||||
var durationCell = document.createElement('td');
|
||||
durationCell.className = 'yii-debug-toolbar__ajax_request_duration';
|
||||
if (request.duration) {
|
||||
durationCell.innerText = request.duration + " ms";
|
||||
} else {
|
||||
durationCell.innerText = '-';
|
||||
}
|
||||
row.appendChild(durationCell);
|
||||
row.appendChild(document.createTextNode(' '));
|
||||
|
||||
var profilerCell = document.createElement('td');
|
||||
if (request.profilerUrl) {
|
||||
var profilerLink = document.createElement('a');
|
||||
profilerLink.setAttribute('href', request.profilerUrl);
|
||||
profilerLink.innerText = request.profile;
|
||||
profilerCell.appendChild(profilerLink);
|
||||
} else {
|
||||
profilerCell.innerText = 'n/a';
|
||||
}
|
||||
row.appendChild(profilerCell);
|
||||
|
||||
if (request.error) {
|
||||
if (state !== "loading" && i > requestStack.length - 4) {
|
||||
state = 'error';
|
||||
}
|
||||
} else if (request.loading) {
|
||||
state = 'loading'
|
||||
}
|
||||
row.className = 'yii-debug-toolbar__ajax_request';
|
||||
}
|
||||
while (tbody.firstChild) {
|
||||
tbody.removeChild(tbody.firstChild);
|
||||
}
|
||||
tbody.appendChild(rows);
|
||||
}
|
||||
ajaxToolbarPanel.style.display = 'block';
|
||||
}
|
||||
requestCounter[0].innerText = requestStack.length;
|
||||
var className = 'yii-debug-toolbar__label yii-debug-toolbar__ajax_counter';
|
||||
if (state === 'ok') {
|
||||
className += ' yii-debug-toolbar__label_success';
|
||||
} else if (state === 'error') {
|
||||
className += ' yii-debug-toolbar__label_error';
|
||||
}
|
||||
requestCounter[0].className = className;
|
||||
};
|
||||
|
||||
var proxied = XMLHttpRequest.prototype.open;
|
||||
|
||||
XMLHttpRequest.prototype.open = function (method, url, async, user, pass) {
|
||||
var self = this;
|
||||
/* prevent logging AJAX calls to static and inline files, like templates */
|
||||
if (url.substr(0, 1) === '/' && !url.match(new RegExp("{{ excluded_ajax_paths }}"))) {
|
||||
var stackElement = {
|
||||
loading: true,
|
||||
error: false,
|
||||
url: url,
|
||||
method: method,
|
||||
start: new Date()
|
||||
};
|
||||
requestStack.push(stackElement);
|
||||
this.addEventListener("readystatechange", function () {
|
||||
if (self.readyState == 4) {
|
||||
stackElement.duration = self.getResponseHeader("X-Debug-Duration") || new Date() - stackElement.start;
|
||||
stackElement.loading = false;
|
||||
stackElement.statusCode = self.status;
|
||||
stackElement.error = self.status < 200 || self.status >= 400;
|
||||
stackElement.profile = self.getResponseHeader("X-Debug-Tag");
|
||||
stackElement.profilerUrl = self.getResponseHeader("X-Debug-Link");
|
||||
renderAjaxRequests();
|
||||
}
|
||||
}, false);
|
||||
renderAjaxRequests();
|
||||
}
|
||||
proxied.apply(this, Array.prototype.slice.call(arguments));
|
||||
};
|
||||
|
||||
// catch fetch AJAX requests
|
||||
if (window.fetch) {
|
||||
var originalFetch = window.fetch;
|
||||
|
||||
window.fetch = function(input, init) {
|
||||
var method;
|
||||
var url;
|
||||
if (typeof input === "string") {
|
||||
method = (init && init.method) || 'GET';
|
||||
url = input;
|
||||
} else if (window.Request && input instanceof Request) {
|
||||
method = input.method;
|
||||
url = input.url;
|
||||
}
|
||||
var promise = originalFetch(input, init);
|
||||
|
||||
/* prevent logging AJAX calls to static and inline files, like templates */
|
||||
if (url.substr(0, 1) === '/' && !url.match(new RegExp("{{ excluded_ajax_paths }}"))) {
|
||||
var stackElement = {
|
||||
loading: true,
|
||||
error: false,
|
||||
url: url,
|
||||
method: method,
|
||||
start: new Date()
|
||||
};
|
||||
requestStack.push(stackElement);
|
||||
promise.then(function(response) {
|
||||
stackElement.duration = response.headers.get("X-Debug-Duration") || new Date() - stackElement.start;
|
||||
stackElement.loading = false;
|
||||
stackElement.statusCode = response.status;
|
||||
stackElement.error = response.status < 200 || response.status >= 400;
|
||||
stackElement.profile = response.headers.get("X-Debug-Tag");
|
||||
stackElement.profilerUrl = response.headers.get("X-Debug-Link");
|
||||
renderAjaxRequests();
|
||||
|
||||
return response;
|
||||
}).catch(function(error) {
|
||||
stackElement.loading = false;
|
||||
stackElement.error = true;
|
||||
renderAjaxRequests();
|
||||
|
||||
throw error;
|
||||
});
|
||||
renderAjaxRequests();
|
||||
}
|
||||
|
||||
return promise;
|
||||
};
|
||||
}
|
||||
|
||||
})();
|
||||
34
vendor/yiisoft/yii2-debug/assets/userswitch.js
vendored
Normal file
34
vendor/yiisoft/yii2-debug/assets/userswitch.js
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
var sendSetIdentity = function(e) {
|
||||
var form = $(this);
|
||||
var formData = form.serialize();
|
||||
$.ajax({
|
||||
url: form.attr("action"),
|
||||
type: form.attr("method"),
|
||||
data: formData,
|
||||
success: function (data) {
|
||||
window.top.location.reload();
|
||||
},
|
||||
error: function (data) {
|
||||
form.yiiActiveForm('updateMessages', data.responseJSON, true);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
$('#debug-userswitch__set-identity').on('beforeSubmit', sendSetIdentity)
|
||||
.on('submit', function(e){
|
||||
e.preventDefault();
|
||||
});
|
||||
$('#debug-userswitch__reset-identity').on('beforeSubmit', sendSetIdentity)
|
||||
.on('submit', function(e){
|
||||
e.preventDefault();
|
||||
});
|
||||
$('#debug-userswitch__filter').on("click", "tbody tr", function(event) {
|
||||
$('#debug-userswitch__set-identity #user_id').val($(this).data('key'));
|
||||
$('#debug-userswitch__set-identity').submit();
|
||||
event.stopPropagation();
|
||||
});
|
||||
})();
|
||||
Reference in New Issue
Block a user