Skip to content

Commit

Permalink
make everything look the same as before
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 25, 2018
1 parent cb5f1c7 commit 05722a7
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 26 deletions.
3 changes: 3 additions & 0 deletions lib/Mojolicious/Plugin/Minion/resources/public/minion/app.css
Expand Up @@ -44,6 +44,9 @@ pre {
.hiddenRow {
padding: 0 !important;
}
.navbar {
border-bottom: solid 1px #ddd;
}
.table thead tr th {
border-top: 0 !important;
}
Expand Down
Expand Up @@ -23,7 +23,7 @@
%= content_for 'head'
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<nav class="navbar navbar-expand-lg navbar-light bg-light mb-3">
<div class="container">
%= link_to 'minion_dashboard' => (class => 'navbar-brand') => begin
<picture>
Expand Down
Expand Up @@ -5,7 +5,10 @@
<li class="page-item active"><a class="page-link"><%= $i %></a></li>
% }
% else {
<li class="page-item"><%= link_to $i => url_with->query([limit => $i]) => (class => 'page-link') %></li>
<li class="page-item">
<%= link_to $i => url_with->query([limit => $i])
=> (class => 'page-link') %>
</li>
% }
% }
</ul>
Expand Down
@@ -1,5 +1,5 @@
<div class="row">
<div class="col-md-12">
<div class="col-md-12 align-middle">
% if (my $info = flash 'info') {
<div class="alert alert-dismissible alert-info" role="alert">
<button type="button" class="close" data-dismiss="alert"
Expand Down
Expand Up @@ -14,7 +14,9 @@
% }
% else {
<li class="page-item">
<a class="page-link" href="<%= url_with->query([offset => 0]) %>">First</a>
<a class="page-link" href="<%= url_with->query([offset => 0]) %>">
First
</a>
% }
</li>
% if ($current_page == 1) {
Expand All @@ -23,7 +25,10 @@
% }
% else {
<li class="page-item">
<a class="page-link" href="<%= url_with->query([offset => $prev_offset]) %>">Previous</a>
<a class="page-link"
href="<%= url_with->query([offset => $prev_offset]) %>">
Previous
</a>
% }
</li>
% my $start = $current_page >= 3 ? $current_page - 2 : 1;
Expand All @@ -36,7 +41,8 @@
% }
% else {
<li class="page-item">
<a class="page-link" href="<%= url_with->query([offset => ($i - 1) * $limit]) %>">
<a class="page-link"
href="<%= url_with->query([offset => ($i - 1) * $limit]) %>">
<%= $i %>
</a>
</li>
Expand All @@ -48,7 +54,8 @@
% }
% else {
<li class="page-item">
<a class="page-link" href="<%= url_with->query([offset => $next_offset]) %>">
<a class="page-link"
href="<%= url_with->query([offset => $next_offset]) %>">
Next
</a>
% }
Expand All @@ -59,7 +66,10 @@
% }
% else {
<li class="page-item">
<a class="page-link" href="<%= url_with->query([offset => $last_offset]) %>">Last</a>
<a class="page-link"
href="<%= url_with->query([offset => $last_offset]) %>">
Last
</a>
% }
</li>
</ul>
Expand Down
Expand Up @@ -14,15 +14,16 @@
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
% if (@$parents) {
<%= link_to
Parents => url_for('minion_jobs')->query(id => $parents) => (class => 'dropdown-item') %>
<%= link_to Parents => url_for('minion_jobs')->query(id => $parents)
=> (class => 'dropdown-item') %>
% }
% if (@$children) {
<%= link_to
Children => url_for('minion_jobs')->query(id => $children) => (class => 'dropdown-item') %>
<%= link_to Children => url_for('minion_jobs')->query(id => $children)
=> (class => 'dropdown-item') %>
% }
% if ($id) {
<%= link_to Worker => url_for('minion_workers')->query(id => $id) => (class => 'dropdown-item') %>
<%= link_to Worker => url_for('minion_workers')->query(id => $id)
=> (class => 'dropdown-item') %>
% }
</div>
</div>
Expand All @@ -35,13 +36,16 @@
<div class="d-flex justify-content-between">
<div>
<div class="btn-group" role="group">
<button class="btn btn-outline-secondary" name="do" value="retry" type="submit">
<button class="btn btn-outline-secondary" name="do" value="retry"
type="submit">
<i class="fas fa-redo" aria-hidden="true"></i> Retry
</button>
<button class="btn btn-outline-secondary" name="do" value="stop" type="submit">
<button class="btn btn-outline-secondary" name="do" value="stop"
type="submit">
<i class="fas fa-ban" aria-hidden="true"></i> Stop
</button>
<button class="btn btn-outline-secondary" name="do" value="remove" type="submit">
<button class="btn btn-outline-secondary" name="do" value="remove"
type="submit">
<i class="fas fa-times" aria-hidden="true"></i> Remove
</button>
</div>
Expand Down
Expand Up @@ -22,18 +22,16 @@
% }
% end

<div class="row center-md">
<div class="col-md-4"></div>
<div class="col-md-4">
<div class="d-flex justify-content-between">
<div></div>
<div>
<p class="text-center">
% if (@$workers) {
<%= $offset + 1 %>-<%= $offset + @$workers %> of <%= $total %>
% }
</p>
</div>
<div class="col-md-4">
%= include 'minion/_limit'
</div>
%= include 'minion/_limit'
</div>

<div class="row">
Expand Down Expand Up @@ -91,8 +89,6 @@
</div>
</div>

<div class="row">
<div class="col-md-12">
%= include 'minion/_pagination'
</div>
<div class="d-flex justify-content-center">
%= include 'minion/_pagination'
</div>
2 changes: 2 additions & 0 deletions t/pg_admin.t
Expand Up @@ -111,6 +111,8 @@ $t->get_ok('/minion/epoch/epoch.css')->status_is(200)
->content_type_is('text/css');
$t->get_ok('/minion/fontawesome/fontawesome.css')->status_is(200)
->content_type_is('text/css');
$t->get_ok('/minion/popper/popper.js')->status_is(200)
->content_type_is('application/javascript');
$t->get_ok('/minion/webfonts/fa-brands-400.eot')->status_is(200);
$t->get_ok('/minion/webfonts/fa-brands-400.ttf')->status_is(200);
$t->get_ok('/minion/webfonts/fa-brands-400.woff')->status_is(200);
Expand Down

0 comments on commit 05722a7

Please sign in to comment.