Skip to content

Commit 5bc8092

Browse files
michaeldwandefunkt
authored andcommitted
Displaying namespace in footer and header
1 parent 79af174 commit 5bc8092

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

lib/resque/server/public/style.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ body { padding:0; margin:0; }
88
.header ul li a:hover { background:#333;}
99
.header ul li.current a { background:#ce1212; font-weight:bold; color:#fff;}
1010

11+
.header .namespace { position: absolute; right: 75px; top: 10px; color: #7A7A7A; }
12+
1113
.subnav { padding:2px 5% 7px 5%; background:#ce1212; font-size:90%;}
1214
.subnav li { display:inline;}
1315
.subnav li a { color:#fff; text-decoration:none; margin-right:10px; display:inline-block; background:#dd5b5b; padding:5px; -webkit-border-radius:3px; -moz-border-radius:3px;}

lib/resque/server/views/layout.erb

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<link href="<%=u 'reset.css' %>" media="screen" rel="stylesheet" type="text/css">
77
<link href="<%=u 'style.css' %>" media="screen" rel="stylesheet" type="text/css">
88
<script src="<%=u 'jquery-1.3.2.min.js' %>" type="text/javascript"></script>
9-
<script src="<%=u 'jquery.relatize_date.js' %>" type="text/javascript"></script>
9+
<script src="<%=u 'jquery.relatize_date.js' %>" type="text/javascript"></script>
1010
<script src="<%=u 'ranger.js' %>" type="text/javascript"></script>
1111
</head>
1212
<body>
@@ -16,23 +16,28 @@
1616
<%= tab tab_name %>
1717
<% end %>
1818
</ul>
19+
<% if Resque.redis.namespace != :resque %>
20+
<abbr class="namespace" title="Resque's Redis Namespace">
21+
<%= Resque.redis.namespace %>
22+
</abbr>
23+
<% end %>
1924
</div>
20-
25+
2126
<% if @subtabs %>
2227
<ul class='subnav'>
2328
<% for subtab in @subtabs %>
2429
<li <%= class_if_current "#{current_section}/#{subtab}" %>><a href="<%= current_section %>/<%= subtab %>"><span><%= subtab %></span></a></li>
2530
<% end %>
2631
</ul>
2732
<% end %>
28-
33+
2934
<div id="main">
3035
<%= yield %>
3136
</div>
3237

3338
<div id="footer">
3439
<p>Powered by <a href="http://github.com/defunkt/resque">Resque</a> v<%=Resque::Version%></p>
35-
<p>Connected to Redis on <%=Resque.redis.server%></p>
40+
<p>Connected to Redis namespace <%= Resque.redis.namespace %> on <%=Resque.redis.server%></p>
3641
</div>
3742

3843
</body>

0 commit comments

Comments
 (0)