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
/.project
/.settings
css/GridField_print.css
admin/thirdparty/chosen/node_modules
node_modules/
coverage/
/**/*.js.map

View File

@ -1,64 +1,76 @@
/* This file is manually maintained, it is not generated from SCSS sources */
body {
background:#eee !important;
margin: 0;
overflow-x: hidden;
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 {
padding:18px;
position: relative;
z-index: 9999;
}
.info,.info h1{
margin:0 0 6px;
padding: 20px;
}
.info h1 {
margin: 0 0 6px;
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;
font-size: 24px;
line-height: 30px;
}
.info h3 {
color:#003050;
color: #4f5861;
font-size: 16px;
line-height: 18px;
}
.info p{
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;
background-image:-webkit-gradient(linear,left top,left bottom,from(#002137),color-stop(10%,#003050),color-stop(90%,#003050),color-stop(90%,#002137));
background-image:-webkit-linear-gradient(#002137,#003050 10%,#003050 90%,#002137);
background-image:linear-gradient(#002137,#003050 10%,#003050 90%,#002137);
color:#fff;
border-bottom: solid 1px #004e7f;
color: white;
background: #005a93;
}
.header h1 {
@ -70,43 +82,58 @@ body{
font-weight: 400;
}
.header a,.header a:active,.header a:hover,.header p{
color:#fff;
.header a {
color: white;
text-decoration: underline;
}
.build,.options,.trace{
padding:6px 12px;
background:#eee !important;
.header a:active,
.header a:hover {
color: white;
text-decoration: none;
}
/* Content types */
.build,
.options,
.trace {
position: relative;
z-index: 9999;
padding: 20px;
background: #f6f7f8 !important;
}
a{
color:#666;
.options .description {
display: block;
font-size: 14px;
line-height: 1.3;
}
a:hover{
color:#222;
.build .success {
color: #3fa142;
}
a:active{
color:#111;
.build .error {
color: #d40404;
}
p{
margin-bottom:6px;
.build .warning {
color: #f0ad4e;
}
.build .info {
color: #5bc0de;
}
/* Backtrace styles */
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;
border-radius:4px;
box-shadow:inset 0 1px 1px rgba(0,0,0,.05);
margin: 0;
padding: 12px;
background-color: #e9f0f4;
border: 1px solid #d9dee2;
color: #4f5861;
font-size: 14px;
}
pre span {
@ -114,46 +141,5 @@ pre span{
}
pre .error {
color:red;
}
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;
color: #d40404;
}

View File

@ -182,7 +182,7 @@ class DevelopmentAdmin extends Controller
$renderer = DebugView::create();
echo $renderer->renderHeader();
echo $renderer->renderInfo("Defaults Builder", Director::absoluteBaseURL());
echo "<div style=\"margin: 0 2em\">";
echo "<div class=\"build\">";
}
$da->buildDefaults();

View File

@ -793,30 +793,30 @@ abstract class DBSchemaManager
} else {
switch ($type) {
case "created":
$color = "green";
$class = "success";
break;
case "obsolete":
$color = "red";
$class = "error";
break;
case "notice":
$color = "orange";
$class = "warning";
break;
case "error":
$color = "red";
$class = "error";
break;
case "deleted":
$color = "red";
$class = "error";
break;
case "changed":
$color = "blue";
$class = "info";
break;
case "repaired":
$color = "blue";
$class = "info";
break;
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');
array_shift($dataClasses);
if (!Director::is_cli()) {
echo "<ul>";
}
foreach ($dataClasses as $dataClass) {
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()) {
echo "\nCREATING DATABASE TABLES\n\n";
} 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();
if (!$quiet && !Director::is_cli()) {
echo "</ul>";
}
if ($populate) {
if (!$quiet) {
if (Director::is_cli()) {
echo "\nCREATING DATABASE RECORDS\n\n";
} 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