Ver código fonte

Minor updates.

pull/24/head
Ben Kurtovic 12 anos atrás
pai
commit
910a24a89f
3 arquivos alterados com 18 adições e 11 exclusões
  1. +2
    -2
      pages/earwigbot.mako
  2. +7
    -1
      pages/support/header.mako
  3. +9
    -8
      static/css/main.css

+ 2
- 2
pages/earwigbot.mako Ver arquivo

@@ -9,7 +9,7 @@

def format_date(d):
start = datetime.strptime(d, "%a %b %d %H:%M:%S %Y")
since = start.strftime("%b %d, %Y at %H:%M:%S UTC")
since = start.strftime("%b %d, %Y %H:%M:%S UTC")
diff = (datetime.utcnow() - start)
if diff.days:
uptime = "{0} days".format(diff.days)
@@ -36,7 +36,7 @@
lines = result.splitlines()[1:]
re_key = "^(.*?):\s"
re_val = ":\s*(.*?)$"
data = dict((re.search(re_key, line).group(1), re.search(re_val, line).group(1)) for line in lines)
data = dict((re.search(re_key, line).group(1), re.search(re_val, line).group(1)) for line in lines if re.search(re_key, line) and re.search(re_val, line))
since, uptime = format_date(data["submission_time"])
host = data["sge_o_host"]
return ["online", since, uptime, host]


+ 7
- 1
pages/support/header.mako Ver arquivo

@@ -1,4 +1,4 @@
<%page args="environ, title, slug=None"/>\
<%page args="environ, title, slug=None, add_css=(), add_js=()"/>\
<%namespace name="index" file="/index.mako" import="get_tools"/>\
<%!
from itertools import count
@@ -20,7 +20,13 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>${title} - earwig@toolserver</title>
<link rel="stylesheet" href="${root}/static/css/main.css" type="text/css" />
% for filename in add_css:
<link rel="stylesheet" href="${root}/static/css/${filename}" type="text/css" />
% endfor
<script src="${root}/static/js/potd.js" type="text/javascript"></script>
% for filename in add_js:
<script src="${root}/static/js/${filename}" type="text/javascript"></script>
% endfor
</head>
<body onload="potd_set_background()">
<div id="header">


+ 9
- 8
static/css/main.css Ver arquivo

@@ -7,7 +7,7 @@ body {
}

ul, ol {
line-height: 1.75;
line-height: 1.5;
}

div#header {
@@ -18,9 +18,9 @@ div#header {
}

div#container {
line-height: 1.5;
line-height: 1.25;
margin: 0 60px 100px 60px;
padding: 2px 15px 10px 15px;
padding: 5px 15px 10px 15px;
border: 1px solid #777;
background-color: #FFF;
}
@@ -64,11 +64,6 @@ table#footer-box {
height: 100%;
}

fieldset#result {
margin: 25px 5px 5px 5px;
border: 2px solid #676;
}

div.toolbox {
margin: 15px 0 15px 0;
padding: 0 6px 0 6px;
@@ -76,6 +71,12 @@ div.toolbox {
background-color: #F5F5F5;
}

div.divider {
border-bottom: 1px solid #AAA;
margin-top: 15px;
margin-bottom: 15px;
}

p.toolname {
font-size: 18px;
margin: 6px 0 6px 0;


Carregando…
Cancelar
Salvar