Skip to content

Commit 8fa8731

Browse files
committed
imporvements to the dashboard
1 parent e839ac2 commit 8fa8731

2 files changed

Lines changed: 14 additions & 7 deletions

File tree

β€Ždashboard/stats_maker.pyβ€Ž

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,14 @@ def get_used():
3030

3131
def get_uptime():
3232
raw = get_result('/usr/gnu/bin/uptime')
33-
parts = raw.split()[2:5]
34-
days = int(parts[0])
35-
hours, minutes = parts[2][:-1].split(':')
33+
if 'days' in raw:
34+
parts = raw.split()[2:5]
35+
days = int(parts[0])
36+
hours, minutes = parts[2][:-1].split(':')
37+
else:
38+
parts = raw.split()
39+
days = 0
40+
hours, minutes = parts[2][:-1].split(':')
3641
hours = int(hours)
3742
minutes = int(minutes)
3843
return '%d days, %d hours, %s minutes' % (days, hours, minutes)

β€Ždashboard/styles.cssβ€Ž

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
body {
22
width: 600px;
3-
color: #000;
4-
background: #fff;
3+
color: #ccc;
4+
background: #000;
55
font-family: Futura, sans;
66
size: 24pt;
77
}
88

99
body #server_stats, body #website_stats {
1010
float: left;
1111
-webkit-border-radius: 10px;
12-
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#555), to(#000));
12+
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#555), to(#333));
1313
color: #ccc;
1414
width: 250px;
1515
padding: 10px;
@@ -40,8 +40,10 @@ h2, h3 {
4040
}
4141

4242
.warning {
43+
padding: 0 8px;
44+
margin: 0 -8px 10px;
4345
-webkit-border-radius: 10px;
44-
background: -webkit-gradient(radial, 50% -20, 0, 50% 0, 200, from(#900), to(rgba(204,0,0,.25)));
46+
background: -webkit-gradient(radial, 50% -20, 0, 50% 0, 200, from(#c00), to(rgba(204,0,0,.25)));
4547
}
4648

4749
#server_stats div>span {

0 commit comments

Comments
 (0)