panoptic 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0c9c24666cf21962529d267d1432b25fb3b2ba813ec8997c5a50373da1b76f2b
4
- data.tar.gz: 72eae4c018c7585f2abf3ec7968c94e9ccf223783d3f730e75d5796ff06b2f7b
3
+ metadata.gz: eaeaa4c54e9017c35ee6093fc0b3d0f57f8281e72dfdb11a4e48a297583bc803
4
+ data.tar.gz: 67409a3a5b05f276654733113cab9ad6c61c39b707dcba9b47caef8e0c6228c8
5
5
  SHA512:
6
- metadata.gz: 248f586bdf987718900bd83c4e9989b2f6b617853637e2a9ac690b94723e01cd5659126a01c812ee4ba7584ebfaa87778a1e3208cb6be442f415e348dfe6a1bc
7
- data.tar.gz: 5e58e532a16725fc88dfc90f1a7321a20fc4730957a31db28e5e14952381ac5192c1afda78547395b1de833b5cbef45750cacd0effe1e5b822402b1afddfc866
6
+ metadata.gz: 5b1eb3f3bc00012b3bf1542037a2e79386bf1e9adf2ca1190bbab33572954ed2a9fd8ca40c96ccc6496133b7f5e723a250456fbeee139c92deceeca41269afb2
7
+ data.tar.gz: 2d3bf8fd70b9432a20ef2826d51a0895c5af449584be8a3807a30906cd0d4ed4821e2c61469f0214997eec95e6a375ab1d8dea4b8ec64ffbfec95cfcce3d94b1
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Panoptic
4
+ class Jobs::RetriesController < ApplicationController
5
+ def create
6
+ @job = SolidQueue::Job.find(params[:job_id])
7
+
8
+ @job.retry
9
+ redirect_to jobs_path, notice: "Successfully retried Job ##{@job.id}"
10
+ end
11
+ end
12
+ end
@@ -1,19 +1,21 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
- <head>
4
- <title>Panoptic</title>
5
- <%= csrf_meta_tags %>
6
- <%= csp_meta_tag %>
3
+ <head>
4
+ <title>Panoptic</title>
5
+ <%= csrf_meta_tags %>
6
+ <%= csp_meta_tag %>
7
7
 
8
- <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
9
- </head>
10
- <body class="pb-4">
11
- <%= render "shared/navbar" %>
8
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
9
+ </head>
10
+ <body class="pb-4">
12
11
 
13
- <main class="container mt-2">
14
- <%= content_for?(:content) ? yield(:content) : yield %>
15
- </main>
12
+ <%= render "shared/navbar" %>
16
13
 
17
- <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
18
- </body>
14
+ <main class="container mt-2">
15
+ <%= render "shared/flashes" %>
16
+ <%= content_for?(:content) ? yield(:content) : yield %>
17
+ </main>
18
+
19
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
20
+ </body>
19
21
  </html>
@@ -5,6 +5,9 @@
5
5
  <td scope="col" class="font-monospace"><%= job.exception_class %></td>
6
6
  <td scope="col"><%= safe_time_tag job.enqueued_at %></td>
7
7
  <td scope="col">
8
- <%= link_to "Details", failed_job_path(job) %>
8
+ <%= link_to "Details", failed_job_path(job), class: "btn btn-link" %>
9
+ <%= button_to "Retry Job", job_retry_path(job),
10
+ class: "btn btn-link",
11
+ form_class: "d-inline" %>
9
12
  </td>
10
13
  </tr>
@@ -5,6 +5,8 @@
5
5
 
6
6
  <h1><%= @job.class_name %></h1>
7
7
 
8
+ <%= button_to "Retry Job", job_retry_path(@job), class: "btn btn-primary mb-3" %>
9
+
8
10
  <div class="alert alert-danger" role="alert">
9
11
  <h4 class="alert-heading"><%= @job.exception_class %></h4>
10
12
  <p class="font-monospace mb-0">
@@ -0,0 +1,7 @@
1
+ <% if flash[:notice] %>
2
+ <div class="alert alert-success" role="alert"><%= flash[:notice] %></div>
3
+ <% end %>
4
+
5
+ <% if flash[:alert] %>
6
+ <div class="alert alert-danger" role="alert"><%= flash[:alert] %></div>
7
+ <% end %>
data/config/routes.rb CHANGED
@@ -3,12 +3,12 @@ Panoptic::Engine.routes.draw do
3
3
 
4
4
  resources :queues, only: [:index]
5
5
 
6
- scope "jobs" do
7
- get "all", to: "jobs#index", as: "jobs"
6
+ resources :jobs, only: :index do
7
+ resource :retry, only: :create, module: :jobs
8
+ end
8
9
 
9
- scope module: "jobs" do
10
- resources :scheduled, only: :index, as: :scheduled_jobs
11
- resources :failed, only: [:index, :show], as: :failed_jobs
12
- end
10
+ scope module: :jobs do
11
+ resources :scheduled, only: :index, as: :scheduled_jobs
12
+ resources :failed, only: [:index, :show], as: :failed_jobs
13
13
  end
14
14
  end
@@ -1,3 +1,3 @@
1
1
  module Panoptic
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: panoptic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vincent Rolea
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-30 00:00:00.000000000 Z
11
+ date: 2024-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -52,7 +52,8 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '6.2'
55
- description: Web interface for the SoldiQueue queuing backend
55
+ description: Panoptic adds a real time web interface on top of SolidQueue to monitor
56
+ processes, queues and jobs
56
57
  email:
57
58
  - 3525369+virolea@users.noreply.github.com
58
59
  executables: []
@@ -63,6 +64,7 @@ files:
63
64
  - Rakefile
64
65
  - app/controllers/panoptic/application_controller.rb
65
66
  - app/controllers/panoptic/jobs/failed_controller.rb
67
+ - app/controllers/panoptic/jobs/retries_controller.rb
66
68
  - app/controllers/panoptic/jobs/scheduled_controller.rb
67
69
  - app/controllers/panoptic/jobs_controller.rb
68
70
  - app/controllers/panoptic/processes_controller.rb
@@ -86,6 +88,7 @@ files:
86
88
  - app/views/panoptic/processes/index.html.erb
87
89
  - app/views/panoptic/queues/_queue.html.erb
88
90
  - app/views/panoptic/queues/index.html.erb
91
+ - app/views/shared/_flashes.html.erb
89
92
  - app/views/shared/_navbar.html.erb
90
93
  - config/initializers/pagy.rb
91
94
  - config/routes.rb
@@ -118,5 +121,5 @@ requirements: []
118
121
  rubygems_version: 3.3.26
119
122
  signing_key:
120
123
  specification_version: 4
121
- summary: Web interface for the SoldiQueue queuing backend
124
+ summary: Web interface for the SolidQueue queuing backend
122
125
  test_files: []