-
-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert GoodJob into a single mountable engine (instead of a plugin p…
…lus optional engine)
- Loading branch information
1 parent
af4aa5b
commit cf51d76
Showing
64 changed files
with
131 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
release: bin/test_app_rake heroku:release | ||
release: bin/test_app heroku:release | ||
web: bin/test_app server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<title>Good Job Dashboard</title> | ||
<meta charset="utf-8"> | ||
<meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport"> | ||
<%= csrf_meta_tags %> | ||
<%= csp_meta_tag %> | ||
<%# Assets must use *_url route helpers to avoid being overriden by config.asset_host %> | ||
<%= stylesheet_link_tag bootstrap_url(format: :css, v: GoodJob::VERSION), skip_pipeline: true %> | ||
<%= stylesheet_link_tag style_url(format: :css, v: GoodJob::VERSION) %> | ||
<%= javascript_include_tag bootstrap_url(format: :js, v: GoodJob::VERSION), nonce: true %> | ||
<%= javascript_include_tag chartjs_url(format: :js, v: GoodJob::VERSION), nonce: true %> | ||
<%= javascript_include_tag scripts_url(format: :js, v: GoodJob::VERSION), nonce: true %> | ||
<%= javascript_include_tag rails_ujs_url(format: :js, v: GoodJob::VERSION), nonce: true %> | ||
</head> | ||
<body> | ||
<nav class="navbar navbar-expand-lg navbar-light bg-light"> | ||
<div class="container-fluid"> | ||
<%= link_to "GoodJob 👍", root_path, class: 'navbar-brand mb-0 h1' %> | ||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
|
||
<div class="collapse navbar-collapse" id="navbarSupportedContent"> | ||
<ul class="navbar-nav me-auto"> | ||
<li class="nav-item"> | ||
<%= link_to "All Executions", root_path, class: ["nav-link", ("active" if current_page?(root_path))] %> | ||
</li> | ||
<li class="nav-item"> | ||
<%= link_to "All Jobs", jobs_path, class: ["nav-link", ("active" if current_page?(jobs_path))] %> | ||
</li> | ||
<li class="nav-item"> | ||
<%= link_to "Cron Schedules", cron_entries_path, class: ["nav-link", ("active" if current_page?(cron_entries_path))] %> | ||
</li> | ||
<li class="nav-item"> | ||
<%= link_to "Processes", processes_path, class: ["nav-link", ("active" if current_page?(processes_path))] %> | ||
</li> | ||
<li class="nav-item"> | ||
<div class="nav-link"> | ||
<span class="badge bg-secondary">More views coming soon</span> | ||
</div> | ||
</li> | ||
</ul> | ||
<div> | ||
<input type="checkbox" id="toggle-poll" name="toggle-poll" data-gj-action='change#togglePoll' <%= 'checked' if params[:poll].present? %>> | ||
<label for="toggle-poll">Live Poll</label> | ||
</div> | ||
</div> | ||
</div> | ||
</nav> | ||
|
||
<div class="container-fluid"> | ||
<div class="card border-warning text-dark my-3"> | ||
<div class="card-body"> | ||
<p class="card-text">🚧 GoodJob's dashboard is a work in progress. Please contribute ideas and code on <a href="https://github.com/bensheldon/good_job/issues" target="_blank" rel="nofollow noopener noreferrer">Github</a>.</p> | ||
</div> | ||
</div> | ||
|
||
<% if notice %> | ||
<div class="alert alert-success alert-dismissible fade show d-flex align-items-center offset-md-3 col-6" role="alert"> | ||
<%= render "good_job/shared/icons/check", class: "flex-shrink-0 me-2" %> | ||
<div><%= notice %></div> | ||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button> | ||
</div> | ||
<% elsif alert %> | ||
<div class="alert alert-warning alert-dismissible fade show d-flex align-items-center offset-md-3 col-6" role="alert"> | ||
<%= render "good_job/shared/icons/exclamation", class: "flex-shrink-0 me-2" %> | ||
<div><%= alert %></div> | ||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button> | ||
</div> | ||
<% end %> | ||
<%= yield %> | ||
</div> | ||
|
||
<footer class="footer mt-auto py-3 bg-light fixed-bottom" id="footer" data-gj-poll-replace> | ||
<div class="container-fluid"> | ||
<div class="row"> | ||
<div class="col-6"> | ||
<span class="text-muted"> | ||
Last updated: <time id="page-updated-at" datetime="<%= Time.current.utc.iso8601 %>"><%= Time.current %></time> | ||
</span> | ||
</div> | ||
|
||
<div class="col-6 text-end"> | ||
Remember, you're doing a Good Job too! | ||
</div> | ||
</div> | ||
</div> | ||
</footer> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,15 @@ | ||
#!/usr/bin/env ruby | ||
APP_PATH = File.expand_path('../spec/test_app/config/application', __dir__) | ||
require_relative '../spec/test_app/config/boot' | ||
require 'rails/commands' | ||
# | ||
# Note: this command cannot be named "rails" because it will break generator specs with the message: | ||
# "Can't initialize a new Rails application within the directory of another, please change to a non-Rails directory first." | ||
|
||
ENGINE_ROOT = File.expand_path("..", __dir__) | ||
ENGINE_PATH = File.expand_path("../lib/good_job/engine", __dir__) | ||
APP_PATH = File.expand_path("../spec/test_app/config/application", __dir__) | ||
|
||
# Set up gems listed in the Gemfile. | ||
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) | ||
require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"]) | ||
|
||
require "rails/all" | ||
require "rails/engine/commands" |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
spec/lib/good_job/railtie_spec.rb → spec/lib/good_job/engine_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters