mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Merge pull request #1196 from cpuguy83/move_status_to_navbar_brand_area
Move status to navbar brand area
This commit is contained in:
commit
538dd2c7f5
5 changed files with 37 additions and 27 deletions
BIN
web/assets/images/status-sd8051fd480.png
Executable file → Normal file
BIN
web/assets/images/status-sd8051fd480.png
Executable file → Normal file
Binary file not shown.
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.8 KiB |
|
@ -113,10 +113,10 @@ header.row .pagination {
|
|||
margin-bottom: 10px;
|
||||
border-width: 0px;
|
||||
}
|
||||
.summary_bar #live-poll {
|
||||
line-height: 28px;
|
||||
.nav #live-poll {
|
||||
line-height: 25px;
|
||||
}
|
||||
.summary_bar #live-poll.active {
|
||||
#live-poll.active {
|
||||
background-color: #009300;
|
||||
}
|
||||
.summary_bar ul {
|
||||
|
@ -196,6 +196,10 @@ td form {
|
|||
text-shadow: none;
|
||||
}
|
||||
|
||||
.navbar .brand .status {
|
||||
color: #585454;
|
||||
}
|
||||
|
||||
.navbar-footer .navbar ul.nav {
|
||||
text-align: center;
|
||||
float: none;
|
||||
|
@ -232,8 +236,8 @@ img.smallogo {
|
|||
|
||||
.status-sprite {
|
||||
background-image: url(../images/status-sd8051fd480.png);
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
height: 20px;
|
||||
width: 18px;
|
||||
display: inline-block;
|
||||
}
|
||||
.status-active {
|
||||
|
@ -241,7 +245,7 @@ img.smallogo {
|
|||
}
|
||||
|
||||
.status-idle {
|
||||
background-position: 0 -80px;
|
||||
background-position: 0 -90px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
<div class="navbar-inner">
|
||||
<div class="container">
|
||||
<a class="brand" href="<%= root_path %>"><%= Sidekiq::NAME %></a>
|
||||
<a class="brand" href="<%= root_path %>">
|
||||
<%= Sidekiq::NAME %>
|
||||
<%= erb :_status %>
|
||||
</a>
|
||||
<ul class="nav">
|
||||
<% tabs.each do |title, url| %>
|
||||
<% if url == '' %>
|
||||
|
@ -18,6 +21,15 @@
|
|||
<a href="<%= root_path %><%= url %>"><%= t(title) %></a>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<ul class="nav pull-right">
|
||||
<li>
|
||||
<%= erb :_poll %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
14
web/views/_poll.erb
Normal file
14
web/views/_poll.erb
Normal file
|
@ -0,0 +1,14 @@
|
|||
<% if params[:poll] %>
|
||||
<script>
|
||||
setInterval("window.location.reload(true)", 2000);
|
||||
</script>
|
||||
<% end %>
|
||||
<% unless current_path == '' %>
|
||||
<div class="span2 pull-right actions">
|
||||
<% if params[:poll] %>
|
||||
<a id="live-poll" class="btn btn-block btn-primary active" href="<%= root_path %><%= current_path %>"><%= t('StopPolling') %></a>
|
||||
<% else %>
|
||||
<a id="live-poll" class="btn btn-block btn-primary" href="<%= root_path %><%= current_path %>?poll=true"><%= t('LivePoll') %></a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
|
@ -7,11 +7,6 @@
|
|||
<link href="<%= root_path %>stylesheets/application.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="<%= root_path %>javascripts/application.js"></script>
|
||||
<script type="text/javascript" src="<%= root_path %>javascripts/locales/jquery.timeago.<%= locale %>.js"></script>
|
||||
<% if params[:poll] %>
|
||||
<script>
|
||||
setInterval("window.location.reload(true)", 2000);
|
||||
</script>
|
||||
<% end %>
|
||||
</head>
|
||||
<body class="admin">
|
||||
<div class="navbar navbar-fixed-top">
|
||||
|
@ -22,21 +17,6 @@
|
|||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="span12 summary_bar">
|
||||
<div class="row">
|
||||
<h4 class="span10">
|
||||
<span class="title"><%= t('Status') %></span>
|
||||
<%= erb :_status %>
|
||||
</h4>
|
||||
<% unless current_path == '' %>
|
||||
<div class="span2 pull-right actions">
|
||||
<% if params[:poll] %>
|
||||
<a id="live-poll" class="btn btn-block btn-primary active" href="<%= root_path %><%= current_path %>"><%= t('StopPolling') %></a>
|
||||
<% else %>
|
||||
<a id="live-poll" class="btn btn-block btn-primary" href="<%= root_path %><%= current_path %>?poll=true"><%= t('LivePoll') %></a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= erb :_summary %>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue