mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Update DebugView styles
This commit is contained in:
parent
41a268c69f
commit
713b01ebc7
2
.gitignore
vendored
2
.gitignore
vendored
@ -4,8 +4,6 @@ npm-debug.log
|
|||||||
/.buildpath
|
/.buildpath
|
||||||
/.project
|
/.project
|
||||||
/.settings
|
/.settings
|
||||||
css/GridField_print.css
|
|
||||||
admin/thirdparty/chosen/node_modules
|
|
||||||
node_modules/
|
node_modules/
|
||||||
coverage/
|
coverage/
|
||||||
/**/*.js.map
|
/**/*.js.map
|
||||||
|
@ -1,159 +1,145 @@
|
|||||||
/* This file is manually maintained, it is not generated from SCSS sources */
|
/* This file is manually maintained, it is not generated from SCSS sources */
|
||||||
|
|
||||||
body{
|
body {
|
||||||
background:#eee !important;
|
margin: 0;
|
||||||
margin:0;
|
overflow-x: hidden;
|
||||||
overflow-x:hidden;
|
padding: 0;
|
||||||
padding:0;
|
color: #66727d;
|
||||||
font-family:Helvetica,Arial,sans-serif;
|
background: #f6f7f8;
|
||||||
|
font-size: 15px;
|
||||||
|
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||||
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info{
|
h2 {
|
||||||
padding:18px;
|
margin: 0 0 12px;
|
||||||
position:relative;
|
|
||||||
z-index:9999;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.info,.info h1{
|
h3 {
|
||||||
margin:0 0 6px;
|
margin: 0 0 12px;
|
||||||
|
color: #333;
|
||||||
|
font-size: 18px;
|
||||||
|
line-height: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info h1{
|
p {
|
||||||
padding:0 32px 0 0;
|
margin-bottom: 6px;
|
||||||
font-size:24px;
|
|
||||||
text-shadow:0 1px #002137;
|
|
||||||
line-height:30px;
|
|
||||||
background: url("../images/logo_small.png") no-repeat right 3px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.info h3{
|
ul {
|
||||||
color:#003050;
|
margin: 0 0 18px;
|
||||||
font-size:16px;
|
padding: 0 0 0 18px;
|
||||||
line-height:18px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.info p{
|
b {
|
||||||
margin:0;
|
color: #4f5861;
|
||||||
font-size:14px;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info a{
|
a {
|
||||||
font-weight:700;
|
color: #4f5861;
|
||||||
text-decoration:none;
|
|
||||||
color:#7da4be;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.info a:active,.info a:hover{
|
a:hover,
|
||||||
text-decoration:underline;
|
a:active {
|
||||||
color:#7da4be;
|
color: #121212;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info li{
|
/* Info block */
|
||||||
font-size:14px;
|
.info {
|
||||||
margin:6px 0;
|
position: relative;
|
||||||
|
z-index: 9999;
|
||||||
|
padding: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header{
|
.info h1 {
|
||||||
background-color:#003050;
|
margin: 0 0 6px;
|
||||||
background-image:-webkit-gradient(linear,left top,left bottom,from(#002137),color-stop(10%,#003050),color-stop(90%,#003050),color-stop(90%,#002137));
|
padding: 0 32px 0 0;
|
||||||
background-image:-webkit-linear-gradient(#002137,#003050 10%,#003050 90%,#002137);
|
background: url("../images/logo_small.png") no-repeat right 3px;
|
||||||
background-image:linear-gradient(#002137,#003050 10%,#003050 90%,#002137);
|
font-size: 24px;
|
||||||
color:#fff;
|
line-height: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header h1{
|
.info h3 {
|
||||||
background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmdJREFUeNpiYCASxJ17p8BAAmAh0sD5QAyiFYk1mJGAoQFQQwWgQoKLjIQ+kG0w0EABqIEByOKLjYWZ/////48Yg5lwuPI+uqF/f/88TqyhKGEMdWU/ECegK/r358/Va8tnx5AceVBD9wOxAbqCX18+zbm+am7HpaktD9AcEQCNUBDYAAz7CxhhDFTYAKTqkSX+//37+N3tq4Xboh33ALmfYcEAVJsA9ZkAmhtABifCLIAZ/B5Z4Z9vX1ddXjK15srMzkdAA38iudQB6jNcAJRiFEEpBxbGAsiRtNxWLh3I/ITkSpC3QUGRTyBoYfGUiJFBmJiY/wIN/IAl2S1AdgAoQr88fdjHysMjwyks3ohkBCioEsFBEXv2zUdGRiY+JEmQIQ+hLoQZdgBo2BMmFpaYnx/e9a1yVu0AhT0QM0cefjSPhYs7DEm/IAs0TFewcvOmodmKnuSevLp0uouVi3sDMEJ3AX31GZ60uLjV0DLSJ7DB9/dsalHxDrcGukYbV+B9enJ/xu5Un2tA5i1YhCKVIwbIqQkUN+Ccd7Ip7+nlRZP9QakB3UCQwrc3LoVsDrY4BdTwF8nQAiB1HogdkNX//v5tOUpZwQgMZCDFZ906S51fQVUGmjk+7Un3vwRKRkgGYi1HYMkUmKJSQMGEUQgBLWBGyur/gIp+I6VjA2g6Rs8cDNAIbYalKIzkBvIuKDnjCGqMHAdKdi8vnCgE+uwESoQykAYc0MuRlfaKVdCg+o232MRT6AugRyjQ0BKgga/RDSUJgCI39vTrRxGHHszWzahQBfLZGagFgIaJAzE/NAXhBQABBgBJL0aZBy/F5wAAAABJRU5ErkJggg==) no-repeat right 3px;
|
color: #4f5861;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header h3{
|
/* Header */
|
||||||
color:#7da4be;
|
.header {
|
||||||
font-weight:400;
|
border-bottom: solid 1px #004e7f;
|
||||||
|
color: white;
|
||||||
|
background: #005a93;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header a,.header a:active,.header a:hover,.header p{
|
.header h1 {
|
||||||
color:#fff;
|
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmdJREFUeNpiYCASxJ17p8BAAmAh0sD5QAyiFYk1mJGAoQFQQwWgQoKLjIQ+kG0w0EABqIEByOKLjYWZ/////48Yg5lwuPI+uqF/f/88TqyhKGEMdWU/ECegK/r358/Va8tnx5AceVBD9wOxAbqCX18+zbm+am7HpaktD9AcEQCNUBDYAAz7CxhhDFTYAKTqkSX+//37+N3tq4Xboh33ALmfYcEAVJsA9ZkAmhtABifCLIAZ/B5Z4Z9vX1ddXjK15srMzkdAA38iudQB6jNcAJRiFEEpBxbGAsiRtNxWLh3I/ITkSpC3QUGRTyBoYfGUiJFBmJiY/wIN/IAl2S1AdgAoQr88fdjHysMjwyks3ohkBCioEsFBEXv2zUdGRiY+JEmQIQ+hLoQZdgBo2BMmFpaYnx/e9a1yVu0AhT0QM0cefjSPhYs7DEm/IAs0TFewcvOmodmKnuSevLp0uouVi3sDMEJ3AX31GZ60uLjV0DLSJ7DB9/dsalHxDrcGukYbV+B9enJ/xu5Un2tA5i1YhCKVIwbIqQkUN+Ccd7Ip7+nlRZP9QakB3UCQwrc3LoVsDrY4BdTwF8nQAiB1HogdkNX//v5tOUpZwQgMZCDFZ906S51fQVUGmjk+7Un3vwRKRkgGYi1HYMkUmKJSQMGEUQgBLWBGyur/gIp+I6VjA2g6Rs8cDNAIbYalKIzkBvIuKDnjCGqMHAdKdi8vnCgE+uwESoQykAYc0MuRlfaKVdCg+o232MRT6AugRyjQ0BKgga/RDSUJgCI39vTrRxGHHszWzahQBfLZGagFgIaJAzE/NAXhBQABBgBJL0aZBy/F5wAAAABJRU5ErkJggg==) no-repeat right 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.build,.options,.trace{
|
.header h3 {
|
||||||
padding:6px 12px;
|
color: #7da4be;
|
||||||
background:#eee !important;
|
font-weight: 400;
|
||||||
position:relative;
|
|
||||||
z-index:9999;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a{
|
.header a {
|
||||||
color:#666;
|
color: white;
|
||||||
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
a:hover{
|
.header a:active,
|
||||||
color:#222;
|
.header a:hover {
|
||||||
|
color: white;
|
||||||
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
a:active{
|
/* Content types */
|
||||||
color:#111;
|
.build,
|
||||||
|
.options,
|
||||||
|
.trace {
|
||||||
|
position: relative;
|
||||||
|
z-index: 9999;
|
||||||
|
padding: 20px;
|
||||||
|
background: #f6f7f8 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
p{
|
.options .description {
|
||||||
margin-bottom:6px;
|
display: block;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.3;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre{
|
.build .success {
|
||||||
margin-bottom:20px;
|
color: #3fa142;
|
||||||
background-color:#f5f5f5;
|
|
||||||
border:1px solid #eee;
|
|
||||||
border:1px solid rgba(0,0,0,.08);
|
|
||||||
color:#333;
|
|
||||||
padding:11px;
|
|
||||||
overflow:auto;
|
|
||||||
border-radius:4px;
|
|
||||||
box-shadow:inset 0 1px 1px rgba(0,0,0,.05);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pre span{
|
.build .error {
|
||||||
color:#999;
|
color: #d40404;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre .error{
|
.build .warning {
|
||||||
color:red;
|
color: #f0ad4e;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2{
|
.build .info {
|
||||||
margin:0 0 12px;
|
color: #5bc0de;
|
||||||
}
|
}
|
||||||
|
|
||||||
h3{
|
/* Backtrace styles */
|
||||||
margin:0 0 6px;
|
pre {
|
||||||
color:#333;
|
overflow: auto;
|
||||||
font-size:18px;
|
margin: 0;
|
||||||
line-height:24px;
|
padding: 12px;
|
||||||
|
background-color: #e9f0f4;
|
||||||
|
border: 1px solid #d9dee2;
|
||||||
|
color: #4f5861;
|
||||||
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul{
|
pre span {
|
||||||
margin:0 0 18px;
|
color: #999;
|
||||||
padding:0 0 0 18px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fieldset{
|
pre .error {
|
||||||
border:1px solid #b2b2b2;
|
color: #d40404;
|
||||||
margin-bottom:18px;
|
|
||||||
padding:17px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pass{
|
|
||||||
color:#060;
|
|
||||||
background:#e2f9e3;
|
|
||||||
border:1px solid #8dd38d;
|
|
||||||
border-radius:4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fail,.pass{
|
|
||||||
margin-top:18px;
|
|
||||||
padding:2px 20px 2px 40px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fail{
|
|
||||||
color:#c80700;
|
|
||||||
background:#ffe9e9;
|
|
||||||
border:1px solid #c80700;
|
|
||||||
border-radius:4px;
|
|
||||||
}
|
}
|
||||||
|
@ -178,7 +178,7 @@ class Backtrace
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$funcName .= "(" . implode(",", $args) .")";
|
$funcName .= "(" . implode(", ", $args) .")";
|
||||||
}
|
}
|
||||||
|
|
||||||
return $funcName;
|
return $funcName;
|
||||||
|
@ -182,7 +182,7 @@ class DevelopmentAdmin extends Controller
|
|||||||
$renderer = DebugView::create();
|
$renderer = DebugView::create();
|
||||||
echo $renderer->renderHeader();
|
echo $renderer->renderHeader();
|
||||||
echo $renderer->renderInfo("Defaults Builder", Director::absoluteBaseURL());
|
echo $renderer->renderInfo("Defaults Builder", Director::absoluteBaseURL());
|
||||||
echo "<div style=\"margin: 0 2em\">";
|
echo "<div class=\"build\">";
|
||||||
}
|
}
|
||||||
|
|
||||||
$da->buildDefaults();
|
$da->buildDefaults();
|
||||||
|
@ -793,30 +793,30 @@ abstract class DBSchemaManager
|
|||||||
} else {
|
} else {
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case "created":
|
case "created":
|
||||||
$color = "green";
|
$class = "success";
|
||||||
break;
|
break;
|
||||||
case "obsolete":
|
case "obsolete":
|
||||||
$color = "red";
|
$class = "error";
|
||||||
break;
|
break;
|
||||||
case "notice":
|
case "notice":
|
||||||
$color = "orange";
|
$class = "warning";
|
||||||
break;
|
break;
|
||||||
case "error":
|
case "error":
|
||||||
$color = "red";
|
$class = "error";
|
||||||
break;
|
break;
|
||||||
case "deleted":
|
case "deleted":
|
||||||
$color = "red";
|
$class = "error";
|
||||||
break;
|
break;
|
||||||
case "changed":
|
case "changed":
|
||||||
$color = "blue";
|
$class = "info";
|
||||||
break;
|
break;
|
||||||
case "repaired":
|
case "repaired":
|
||||||
$color = "blue";
|
$class = "info";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$color = "";
|
$class = "";
|
||||||
}
|
}
|
||||||
echo "<li style=\"color: $color\">$message</li>";
|
echo "<li class=\"$class\">$message</li>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -167,9 +167,22 @@ class DatabaseAdmin extends Controller
|
|||||||
{
|
{
|
||||||
$dataClasses = ClassInfo::subclassesFor('SilverStripe\ORM\DataObject');
|
$dataClasses = ClassInfo::subclassesFor('SilverStripe\ORM\DataObject');
|
||||||
array_shift($dataClasses);
|
array_shift($dataClasses);
|
||||||
|
|
||||||
|
if (!Director::is_cli()) {
|
||||||
|
echo "<ul>";
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($dataClasses as $dataClass) {
|
foreach ($dataClasses as $dataClass) {
|
||||||
singleton($dataClass)->requireDefaultRecords();
|
singleton($dataClass)->requireDefaultRecords();
|
||||||
print "Defaults loaded for $dataClass<br/>";
|
if (Director::is_cli()) {
|
||||||
|
echo "Defaults loaded for $dataClass\n";
|
||||||
|
} else {
|
||||||
|
echo "<li>Defaults loaded for $dataClass</li>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Director::is_cli()) {
|
||||||
|
echo "</ul>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -253,7 +266,7 @@ class DatabaseAdmin extends Controller
|
|||||||
if (Director::is_cli()) {
|
if (Director::is_cli()) {
|
||||||
echo "\nCREATING DATABASE TABLES\n\n";
|
echo "\nCREATING DATABASE TABLES\n\n";
|
||||||
} else {
|
} else {
|
||||||
echo "\n<p><b>Creating database tables</b></p>\n\n";
|
echo "\n<p><b>Creating database tables</b></p><ul>\n\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -287,12 +300,16 @@ class DatabaseAdmin extends Controller
|
|||||||
});
|
});
|
||||||
ClassInfo::reset_db_cache();
|
ClassInfo::reset_db_cache();
|
||||||
|
|
||||||
|
if (!$quiet && !Director::is_cli()) {
|
||||||
|
echo "</ul>";
|
||||||
|
}
|
||||||
|
|
||||||
if ($populate) {
|
if ($populate) {
|
||||||
if (!$quiet) {
|
if (!$quiet) {
|
||||||
if (Director::is_cli()) {
|
if (Director::is_cli()) {
|
||||||
echo "\nCREATING DATABASE RECORDS\n\n";
|
echo "\nCREATING DATABASE RECORDS\n\n";
|
||||||
} else {
|
} else {
|
||||||
echo "\n<p><b>Creating database records</b></p>\n\n";
|
echo "\n<p><b>Creating database records</b></p><ul>\n\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -344,6 +361,10 @@ class DatabaseAdmin extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$quiet && !Director::is_cli()) {
|
||||||
|
echo "</ul>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
touch(TEMP_FOLDER
|
touch(TEMP_FOLDER
|
||||||
|
@ -22,7 +22,7 @@ class BacktraceTest extends SapphireTest
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
'MyClass->myFunction(1,more than 20 charact...)',
|
'MyClass->myFunction(1, more than 20 charact...)',
|
||||||
Backtrace::full_func_name($func, true, 20)
|
Backtrace::full_func_name($func, true, 20)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user