Update DebugView styles

This commit is contained in:
Loz Calver 2017-05-16 17:04:10 +01:00
parent 41a268c69f
commit 713b01ebc7
7 changed files with 130 additions and 125 deletions

2
.gitignore vendored
View File

@ -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

View File

@ -1,64 +1,76 @@
/* 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;
font-family:Helvetica,Arial,sans-serif; color: #66727d;
background: #f6f7f8;
font-size: 15px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
line-height: 1.5;
} }
h2 {
margin: 0 0 12px;
}
h3 {
margin: 0 0 12px;
color: #333;
font-size: 18px;
line-height: 24px;
}
p {
margin-bottom: 6px;
}
ul {
margin: 0 0 18px;
padding: 0 0 0 18px;
}
b {
color: #4f5861;
font-weight: bold;
}
a {
color: #4f5861;
}
a:hover,
a:active {
color: #121212;
}
/* Info block */
.info { .info {
padding:18px;
position: relative; position: relative;
z-index: 9999; z-index: 9999;
} padding: 20px;
.info,.info h1{
margin:0 0 6px;
} }
.info h1 { .info h1 {
margin: 0 0 6px;
padding: 0 32px 0 0; padding: 0 32px 0 0;
font-size:24px;
text-shadow:0 1px #002137;
line-height:30px;
background: url("../images/logo_small.png") no-repeat right 3px; background: url("../images/logo_small.png") no-repeat right 3px;
font-size: 24px;
line-height: 30px;
} }
.info h3 { .info h3 {
color:#003050; color: #4f5861;
font-size: 16px; font-size: 16px;
line-height: 18px; line-height: 18px;
} }
.info p{ /* Header */
margin:0;
font-size:14px;
}
.info a{
font-weight:700;
text-decoration:none;
color:#7da4be;
}
.info a:active,.info a:hover{
text-decoration:underline;
color:#7da4be;
}
.info li{
font-size:14px;
margin:6px 0;
}
.header { .header {
background-color:#003050; border-bottom: solid 1px #004e7f;
background-image:-webkit-gradient(linear,left top,left bottom,from(#002137),color-stop(10%,#003050),color-stop(90%,#003050),color-stop(90%,#002137)); color: white;
background-image:-webkit-linear-gradient(#002137,#003050 10%,#003050 90%,#002137); background: #005a93;
background-image:linear-gradient(#002137,#003050 10%,#003050 90%,#002137);
color:#fff;
} }
.header h1 { .header h1 {
@ -70,43 +82,58 @@ body{
font-weight: 400; font-weight: 400;
} }
.header a,.header a:active,.header a:hover,.header p{ .header a {
color:#fff; color: white;
text-decoration: underline;
} }
.build,.options,.trace{ .header a:active,
padding:6px 12px; .header a:hover {
background:#eee !important; color: white;
text-decoration: none;
}
/* Content types */
.build,
.options,
.trace {
position: relative; position: relative;
z-index: 9999; z-index: 9999;
padding: 20px;
background: #f6f7f8 !important;
} }
a{ .options .description {
color:#666; display: block;
font-size: 14px;
line-height: 1.3;
} }
a:hover{ .build .success {
color:#222; color: #3fa142;
} }
a:active{ .build .error {
color:#111; color: #d40404;
} }
p{ .build .warning {
margin-bottom:6px; color: #f0ad4e;
} }
.build .info {
color: #5bc0de;
}
/* Backtrace styles */
pre { pre {
margin-bottom:20px;
background-color:#f5f5f5;
border:1px solid #eee;
border:1px solid rgba(0,0,0,.08);
color:#333;
padding:11px;
overflow: auto; overflow: auto;
border-radius:4px; margin: 0;
box-shadow:inset 0 1px 1px rgba(0,0,0,.05); padding: 12px;
background-color: #e9f0f4;
border: 1px solid #d9dee2;
color: #4f5861;
font-size: 14px;
} }
pre span { pre span {
@ -114,46 +141,5 @@ pre span{
} }
pre .error { pre .error {
color:red; color: #d40404;
}
h2{
margin:0 0 12px;
}
h3{
margin:0 0 6px;
color:#333;
font-size:18px;
line-height:24px;
}
ul{
margin:0 0 18px;
padding:0 0 0 18px;
}
fieldset{
border:1px solid #b2b2b2;
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;
} }

View File

@ -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();

View File

@ -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>";
} }
} }
} }

View File

@ -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