rush_job 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -2
- data/app/assets/config/rush_job_manifest.js +0 -1
- data/app/assets/images/rush_job/{arrow-down.svg → arrow-down-dark.svg} +1 -1
- data/app/assets/images/rush_job/arrow-down-light.svg +3 -0
- data/app/assets/images/rush_job/{arrow-up.svg → arrow-up-dark.svg} +1 -1
- data/app/assets/images/rush_job/arrow-up-light.svg +3 -0
- data/app/assets/stylesheets/rush_job/application.scss +2 -0
- data/app/assets/stylesheets/rush_job/pages/_index.scss +12 -0
- data/app/assets/stylesheets/rush_job/themes/_dark.scss +3 -0
- data/app/assets/stylesheets/rush_job/themes/_light.scss +3 -0
- data/app/controllers/rush_job/themes_controller.rb +13 -0
- data/app/helpers/rush_job/application_helper.rb +7 -0
- data/app/helpers/rush_job/rush_jobs_helper.rb +4 -3
- data/app/views/layouts/rush_job/application.html.erb +1 -1
- data/app/views/rush_job/rush_jobs/index.html.erb +11 -5
- data/config/importmap.rb +2 -1
- data/config/routes.rb +1 -0
- data/lib/rush_job/engine.rb +4 -3
- data/lib/rush_job/version.rb +1 -1
- metadata +9 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a80fc522578d00f9313b67a63c0b2d8e8473ea03569ec8c83eb59894d3a8405
|
4
|
+
data.tar.gz: b53eb38eea3005a117a92aaa0332cf5f95ae307baaf5639f17bd527de91ec5f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d57ebaf610a4340cc24ebb69583d1fea64a56a945c7a4a2486d37d4e4fd1969809def22f63f85408e338c9d7e8013ea6e8b22e6c32d17f4404a70ffcc4e9128
|
7
|
+
data.tar.gz: 3ebd1910a18c140cc608b4b28cc3b8489ff261498d9450a8ff5ec99b6fc961d835c60521f76da4f12f5a39bdacc368a2b590469d653dbc921601dd71b63e8356
|
data/README.md
CHANGED
@@ -2,7 +2,8 @@
|
|
2
2
|
User interface for Delayed Job (https://github.com/collectiveidea/delayed_job) in Ruby on Rails
|
3
3
|
|
4
4
|
### Note
|
5
|
-
This has only been tested with SQLite and Postgresql.
|
5
|
+
- This has only been tested with SQLite and Postgresql.
|
6
|
+
- This app uses cookies to store the dark mode selection.
|
6
7
|
|
7
8
|
## Usage
|
8
9
|
You will need Delayed Job, `delayed_job`, and Delayed Job ActiveRecord, `delayed_job_active_record`, installed in a Ruby on Rails application for this gem to work properly.
|
@@ -13,7 +14,7 @@ Navigate to the `/rush_job` route in your application to see the Delayed Jobs. L
|
|
13
14
|
Add this line to your Ruby on Rails application's Gemfile:
|
14
15
|
|
15
16
|
```ruby
|
16
|
-
gem
|
17
|
+
gem 'rush_job', '~> 0.3.0'
|
17
18
|
```
|
18
19
|
|
19
20
|
And then execute:
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="rgb(0, 0, 0)" class="bi bi-arrow-down" viewBox="0 0 16 16">
|
2
2
|
<path fill-rule="evenodd" d="M8 1a.5.5 0 0 1 .5.5v11.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L7.5 13.293V1.5A.5.5 0 0 1 8 1z"/>
|
3
3
|
</svg>
|
@@ -0,0 +1,3 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="rgb(255, 255, 255)" class="bi bi-arrow-down" viewBox="0 0 16 16">
|
2
|
+
<path fill-rule="evenodd" d="M8 1a.5.5 0 0 1 .5.5v11.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L7.5 13.293V1.5A.5.5 0 0 1 8 1z"/>
|
3
|
+
</svg>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="rgb(0, 0, 0)" class="bi bi-arrow-up" viewBox="0 0 16 16">
|
2
2
|
<path fill-rule="evenodd" d="M8 15a.5.5 0 0 0 .5-.5V2.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L7.5 2.707V14.5a.5.5 0 0 0 .5.5z"/>
|
3
3
|
</svg>
|
@@ -0,0 +1,3 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="rgb(255, 255, 255)" class="bi bi-arrow-up" viewBox="0 0 16 16">
|
2
|
+
<path fill-rule="evenodd" d="M8 15a.5.5 0 0 0 .5-.5V2.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L7.5 2.707V14.5a.5.5 0 0 0 .5.5z"/>
|
3
|
+
</svg>
|
@@ -20,4 +20,16 @@
|
|
20
20
|
margin-left: 5%;
|
21
21
|
margin-right: 5%;
|
22
22
|
float: right;
|
23
|
+
}
|
24
|
+
|
25
|
+
.page-link.disabled, .disabled > .page-link {
|
26
|
+
color: rgb(68, 110, 155);
|
27
|
+
}
|
28
|
+
|
29
|
+
.page-item:first-child .page-link {
|
30
|
+
color: rgb(68, 110, 155);
|
31
|
+
}
|
32
|
+
|
33
|
+
.page-item:last-child .page-link {
|
34
|
+
color: rgb(68, 110, 155);
|
23
35
|
}
|
@@ -1,20 +1,21 @@
|
|
1
1
|
module RushJob
|
2
2
|
module RushJobsHelper
|
3
|
+
include ApplicationHelper
|
3
4
|
include SortHelper
|
4
5
|
include Pagy::Frontend
|
5
6
|
|
6
7
|
def sortable(column)
|
7
8
|
direction = column == sort_column && sort_direction == 'asc' ? 'desc' : 'asc'
|
8
|
-
link_to t(column), rush_job.root_path({ sort: column, direction: })
|
9
|
+
link_to t(column), rush_job.root_path({ sort: column, direction: }), class: "link-#{invert_theme}"
|
9
10
|
end
|
10
11
|
|
11
12
|
def sort_arrow(column)
|
12
13
|
return unless column == sort_column
|
13
14
|
|
14
15
|
if sort_direction == 'desc'
|
15
|
-
image_tag(
|
16
|
+
image_tag("rush_job/arrow-down-#{invert_theme}.svg", id: 'rush-job-down-arrow', alt: 'down arrow')
|
16
17
|
else
|
17
|
-
image_tag(
|
18
|
+
image_tag("rush_job/arrow-up-#{invert_theme}.svg", id: 'rush-job-up-arrow', alt: 'up arrow')
|
18
19
|
end
|
19
20
|
end
|
20
21
|
end
|
@@ -1,12 +1,12 @@
|
|
1
|
-
<div class="header-container">
|
1
|
+
<div class="header-container" role="heading" aria-level="1">
|
2
2
|
<div class="container text-center">
|
3
3
|
<div class="row align-items-center">
|
4
|
-
<div class="col-6">
|
4
|
+
<div class="col-6" role="banner">
|
5
5
|
<h2 class="delayed_title">
|
6
6
|
<%= t :delayed_title %>
|
7
7
|
</h2>
|
8
8
|
</div>
|
9
|
-
<div class="col-
|
9
|
+
<div class="col-3">
|
10
10
|
<button
|
11
11
|
type="button"
|
12
12
|
class="btn btn-primary"
|
@@ -14,15 +14,21 @@
|
|
14
14
|
<%= t :reload %>
|
15
15
|
</button>
|
16
16
|
</div>
|
17
|
+
<div class="col-3">
|
18
|
+
<%= form_with url: theme_path, method: 'patch' do |form| %>
|
19
|
+
<%= form.button "#{invert_theme.titleize} Mode", class: "btn btn-#{invert_theme}" %>
|
20
|
+
<% end %>
|
21
|
+
</div>
|
17
22
|
</div>
|
18
23
|
</div>
|
19
24
|
</div>
|
20
25
|
|
21
|
-
<div class="jobs-container">
|
26
|
+
<div class="jobs-container" role="main">
|
22
27
|
<div class="table-responsive">
|
23
28
|
<table class="table
|
24
29
|
table-bordered
|
25
|
-
table-striped
|
30
|
+
table-striped
|
31
|
+
table-<%= current_theme %>">
|
26
32
|
<thead>
|
27
33
|
<tr>
|
28
34
|
<th><%= sortable 'id' %><%= sort_arrow 'id' %></th>
|
data/config/importmap.rb
CHANGED
@@ -1,2 +1,3 @@
|
|
1
1
|
pin 'rush_job/application', preload: true
|
2
|
-
pin 'bootstrap', to: '
|
2
|
+
pin 'bootstrap', to: 'https://ga.jspm.io/npm:bootstrap@5.3.1/dist/js/bootstrap.esm.js'
|
3
|
+
pin '@popperjs/core', to: 'https://ga.jspm.io/npm:@popperjs/core@2.11.8/lib/index.js'
|
data/config/routes.rb
CHANGED
data/lib/rush_job/engine.rb
CHANGED
@@ -17,9 +17,10 @@ module RushJob
|
|
17
17
|
rush_job/application.css
|
18
18
|
rush_job/application.scss
|
19
19
|
rush_job/application.js
|
20
|
-
rush_job/arrow-up.svg
|
21
|
-
rush_job/arrow-
|
22
|
-
rush_job/
|
20
|
+
rush_job/arrow-up-light.svg
|
21
|
+
rush_job/arrow-up-dark.svg
|
22
|
+
rush_job/arrow-down-light.svg
|
23
|
+
rush_job/arrow-down-dark.svg
|
23
24
|
rush_job_manifest.js
|
24
25
|
]
|
25
26
|
end
|
data/lib/rush_job/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rush_job
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JavaKoala
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionview
|
@@ -287,13 +287,18 @@ files:
|
|
287
287
|
- README.md
|
288
288
|
- Rakefile
|
289
289
|
- app/assets/config/rush_job_manifest.js
|
290
|
-
- app/assets/images/rush_job/arrow-down.svg
|
291
|
-
- app/assets/images/rush_job/arrow-
|
290
|
+
- app/assets/images/rush_job/arrow-down-dark.svg
|
291
|
+
- app/assets/images/rush_job/arrow-down-light.svg
|
292
|
+
- app/assets/images/rush_job/arrow-up-dark.svg
|
293
|
+
- app/assets/images/rush_job/arrow-up-light.svg
|
292
294
|
- app/assets/javascript/rush_job/application.js
|
293
295
|
- app/assets/stylesheets/rush_job/application.scss
|
294
296
|
- app/assets/stylesheets/rush_job/pages/_index.scss
|
297
|
+
- app/assets/stylesheets/rush_job/themes/_dark.scss
|
298
|
+
- app/assets/stylesheets/rush_job/themes/_light.scss
|
295
299
|
- app/controllers/rush_job/application_controller.rb
|
296
300
|
- app/controllers/rush_job/rush_jobs_controller.rb
|
301
|
+
- app/controllers/rush_job/themes_controller.rb
|
297
302
|
- app/helpers/rush_job/application_helper.rb
|
298
303
|
- app/helpers/rush_job/rush_jobs_helper.rb
|
299
304
|
- app/helpers/rush_job/sort_helper.rb
|