Rewrite of some admin stuff, just minor changes.

This commit is contained in:
Philipp Naderer 2011-01-09 00:04:28 +00:00
parent 43aebf6810
commit f89cd1cc4e
3 changed files with 148 additions and 118 deletions

View file

@ -9,49 +9,40 @@ simple site hosting system with many advanced
<% gettext "Total sites hosted here" suffix=: %> <% root.size %><br /> <% gettext "Total sites hosted here" suffix=: %> <% root.size %><br />
<% gettext "Number of public sites" suffix=: %> <% root.sites.size %> <% gettext "Number of public sites" suffix=: %> <% root.sites.size %>
</p> </p>
<table border="0" cellpadding="1" cellspacing="0">
<colgroup> <div class="updatedSites">
<col width="150" /> <h2>Updated Sites</h2>
<col width="*" />
</colgroup>
<% root.loop updates skin=$Site#listItem limit=25 %> <% root.loop updates skin=$Site#listItem limit=25 %>
</table> </div>
<% #create %> <% #create %>
<p class="storyTitle"><% response.title %></p> <h1 class="storyTitle"><% response.title %></h1>
<div>
<% gettext "To create a new site you need to fill out the form below." %> <p><% gettext "To create a new site you need to fill out the form below." %></p>
</div>
<div class="small">
<p><% gettext 'The name will be part of the URL of your site. E.g. if you <p><% gettext 'The name will be part of the URL of your site. E.g. if you
enter “{0}” as the name your site will be reachable via this url: {1}' enter “{0}” as the name your site will be reachable via this url: {1}'
<% example.name %> <% example.href prefix="<p><code>" suffix=</code></p> %> %></p> <% example.name %> <% example.href prefix="<code>" suffix=</code> %> %></p>
<p><% gettext "Please note that you cannot change the name after the site was <p><% gettext "Please note that you cannot change the name after the site was
created." %> <% gettext "The title will appear in the header of every page created." %> <% gettext "The title will appear in the header of every page
of your site. You can change it anytime you want." %></p> of your site. You can change it anytime you want." %></p>
<form method="post" class="form" action="<% response.action %>">
<div class="row">
<label for="name" class="col" style="width: 70px;"><% gettext Name suffix=":" %></label>
<% newSite.input name %>
</div> </div>
<p>
<form method="post" action="<% response.action %>"> <div class="row">
<table border="0" cellspacing="0" cellpadding="3"> <label for="title" class="col" style="width: 70px;"><% gettext Title suffix=":" %></label>
<tr> <% newSite.input title %>
<td class="small"><% gettext Name suffix=: %></td> </div>
<td><% newSite.input name %></td>
</tr> <button type="submit" class="normal" name="create" value="1"><% gettext Create %></button>
<tr>
<td class="small"><% gettext Title suffix=: %></td>
<td><% newSite.input title %></td>
</tr>
<tr>
<td></td>
<td>
<br />
<button type="submit" class="normal small" name="create" value="1"><% gettext Create %></button>
<a href="" class="cancel"><% gettext Cancel %></a>
</td>
</tr>
</table>
</form> </form>
</p>
<% #sites %> <% #sites %>
<p><% gettext "This is the directory of public sites hosted here, in <p><% gettext "This is the directory of public sites hosted here, in
@ -73,84 +64,100 @@ alphabetical order." %></p>
<% session.error default=<% param.error %> %> <% session.error default=<% param.error %> %>
<% #health %> <% #health %>
<p class="storyTitle"><% response.title %></p> <h1 class="storyTitle"><% response.title %></h1>
<% site.skin Root#status %> <% site.skin Root#status %>
<br /><br />
<p><strong><% gettext Details %></strong></p> <h2><% gettext Details %></h2>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<colgroup> <div class="form">
<col width="40%" />
<col width="*" /> <div class="row">
</colgroup> <span class="col" style="width: 300px;"><% gettext Uptime suffix=":" %></span>
<tr> <% ngettext '{0} Day' '{0} Days' <% param.uptime %> %>
<td class="small"><% gettext Uptime %>:</td> </div>
<td><% ngettext '{0} Day' '{0} Days' <% param.uptime %> %></td>
</tr> <div class="row">
<tr> <span class="col" style="width: 300px;"><% gettext 'Active Threads' suffix=":" %></span>
<td class="small"><% gettext 'Active Threads' %>:</td> <% param.activeThreads %>
<td><% param.activeThreads %></td> </div>
</tr>
<tr> <div class="row">
<td class="small"><% gettext 'Free Threads' %>:</td> <span class="col" style="width: 300px;"><% gettext 'Free Threads' suffix=":" %></span>
<td><% param.freeThreads %></td> <% param.freeThreads %>
</tr> </div>
<tr>
<td class="small"><% gettext 'Number of Requests (last 5 min)' %>:</td> <div class="row">
<td><% param.requestsPerUnit default=n.a. %></td> <span class="col" style="width: 300px;"><% gettext 'Number of Requests (last 5 min)' suffix=":" %></span>
</tr> <% param.requestsPerUnit default=n.a. %>
<tr> </div>
<td class="small"><% gettext 'Total Requests' %>:</td>
<td><% param.requestCount %></td> <div class="row">
</tr> <span class="col" style="width: 300px;"><% gettext 'Total Requests' suffix=":" %></span>
<tr> <% param.requestCount %>
<td class="small"><% gettext 'Number of Errors (last 5 min) %>:</td> </div>
<td><% param.errorsPerUnit default=n.a. %></td>
</tr> <div class="row">
<tr> <span class="col" style="width: 300px;"><% gettext 'Number of Errors (last 5 min)' suffix=":" %></span>
<td class="small"><% gettext 'Total Errors' %>:</td> <% param.errorsPerUnit default=n.a. %>
<td><% param.errorCount %></td> </div>
</tr>
<tr> <div class="row">
<td class="small"><% gettext 'Total Xml-Rpc Requests' %>:</td> <span class="col" style="width: 300px;"><% gettext 'Total Errors' suffix=":" %></span>
<td><% param.xmlrpcCount %></td> <% param.errorCount %>
</tr> </div>
<tr>
<td class="small"><% gettext 'Cached Objects' %>:</td> <div class="row">
<td><% gettext '{0} of {1}' <% param.cacheusage %> <% param.cacheSize %> %></td> <span class="col" style="width: 300px;"><% gettext 'Total Xml-Rpc Requests' suffix=":" %></span>
</tr> <% param.xmlrpcCount %>
<tr> </div>
<td class="small"><% gettext 'Number of Sessions' %>:</td>
<td><% param.sessions %></td> <div class="row">
</tr> <span class="col" style="width: 300px;"><% gettext 'Cached Objects' suffix=":" %></span>
<tr> <% gettext '{0} of {1}' <% param.cacheusage %> <% param.cacheSize %> %>
<td class="small"><% gettext 'Free Memory' %>:</td> </div>
<td><% param.freeMemory suffix=" MB" %></td>
</tr> <div class="row">
<tr> <span class="col" style="width: 300px;"><% gettext 'Number of Sessions' suffix=":" %></span>
<td class="small"><% gettext 'Used Memory' %>:</td> <% param.sessions %>
<td><% param.usedMemory suffix=" MB" %></td> </div>
</tr>
<tr> <div class="row">
<td class="small"><% gettext 'Total Memory' %>:</td> <span class="col" style="width: 300px;"><% gettext 'Free Memory' suffix=":" %></span>
<td><% param.totalMemory suffix=" MB" %></td> <% param.freeMemory suffix=" MB" %>
</tr> </div>
<tr>
<td class="small"><% gettext 'Queued Log Entries' %>:</td> <div class="row">
<td><% param.entries %></td> <span class="col" style="width: 300px;"><% gettext 'Used Memory' suffix=":" %></span>
</tr> <% param.usedMemory suffix=" MB" %>
<tr> </div>
<td class="small"><% gettext 'Queued Requests' %>:</td>
<td><% param.requests %></td> <div class="row">
</tr> <span class="col" style="width: 300px;"><% gettext 'Total Memory' suffix=":" %></span>
<tr> <% param.totalMemory suffix=" MB" %>
<td class="small"><% gettext 'Queued Mails' %>:</td> </div>
<td><% param.mails %></td>
</tr> <div class="row">
<tr> <span class="col" style="width: 300px;"><% gettext 'Queued Log Entries' suffix=":" %></span>
<td class="small"><% gettext 'Queued Callbacks' %>:</td> <% param.entries %>
<td><% param.callbacks %></td> </div>
</tr>
</table> <div class="row">
<span class="col" style="width: 300px;"><% gettext 'Queued Requests' suffix=":" %></span>
<% param.requests %>
</div>
<div class="row">
<span class="col" style="width: 300px;"><% gettext 'Queued Mails' suffix=":" %></span>
<% param.mails %>
</div>
<div class="row">
<span class="col" style="width: 300px;"><% gettext 'Queued Callbacks' suffix=":" %></span>
<% param.callbacks %>
</div>
</div>
<% #stylesheet %> <% #stylesheet %>
/* Enable HTML5 in non-HTML5 browsers */ /* Enable HTML5 in non-HTML5 browsers */
@ -505,6 +512,25 @@ button.normal.small {
} }
/* Updated sites liste (frontpage) */
.updatedSites {
margin-top: 18px;
}
.updatedSites h2 {
font-weight: bold;
margin-bottom: 6px;
}
.updatedSites .row {
margin: 0 0 3px 0;
}
.updatedSites .row time {
color: #777;
margin-right: 10px;
}
/*********************************************************** /***********************************************************
ul.skinmgrTree { ul.skinmgrTree {
padding-left:15px; padding-left:15px;

View file

@ -1,2 +1,2 @@
<% #status %> <% #status %>
<% gettext 'System is up and running.' %> <p><% gettext 'System is up and running.' %></p>

View file

@ -144,7 +144,7 @@ $(document).ready(function() {
<% #stylesheet %> <% #stylesheet %>
/** YUI 3 reset.css **/ /** YUI 3 reset.css **/
s/* /*
Copyright (c) 2009, Yahoo! Inc. All rights reserved. Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License: Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt http://developer.yahoo.net/yui/license.txt
@ -309,6 +309,10 @@ body {
margin: 10px 0; margin: 10px 0;
} }
h1, h2, h3, h4, h5, h6 {
font-weight: bold;
}
a { a {
color: #2e4e94; color: #2e4e94;
} }
@ -336,7 +340,7 @@ header a:hover {
header a:focus:after, header a:focus:after,
header a:hover:after { header a:hover:after {
content: ''; content: '';
} }
header { header {