Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3248 from mdeniz/rss_notifications_ui
Rss Notifications
- Loading branch information
Showing
42 changed files
with
461 additions
and
174 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
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
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
20 changes: 20 additions & 0 deletions
20
src/api/app/controllers/webui/users/rss_tokens_controller.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
module Webui | ||
module Users | ||
class RssTokensController < WebuiController | ||
before_action :require_login | ||
|
||
def create | ||
token = User.current.rss_token | ||
if token | ||
flash[:success] = "Successfully re-generated your RSS feed url" | ||
token.regenerate_string | ||
token.save | ||
else | ||
flash[:success] = "Successfully generated your RSS feed url" | ||
User.current.create_rss_token | ||
end | ||
redirect_back(fallback_location: user_notifications_path) | ||
end | ||
end | ||
end | ||
end |
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,5 +1,5 @@ | ||
class CleanupNotifications < ApplicationJob | ||
def perform | ||
Notifications::RssFeedItem.cleanup | ||
Notification::RssFeedItem.cleanup | ||
end | ||
end |
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
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
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
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
class Token::Rss < Token | ||
end | ||
|
||
# == Schema Information | ||
# | ||
# Table name: tokens | ||
# | ||
# id :integer not null, primary key | ||
# string :string(255) indexed | ||
# user_id :integer not null, indexed | ||
# package_id :integer indexed | ||
# type :string(255) | ||
# | ||
# Indexes | ||
# | ||
# index_tokens_on_string (string) UNIQUE | ||
# package_id (package_id) | ||
# user_id (user_id) | ||
# | ||
# Foreign Keys | ||
# | ||
# tokens_ibfk_1 (user_id => users.id) | ||
# tokens_ibfk_2 (package_id => packages.id) | ||
# |
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,24 @@ | ||
class Token::Service < Token | ||
end | ||
|
||
# == Schema Information | ||
# | ||
# Table name: tokens | ||
# | ||
# id :integer not null, primary key | ||
# string :string(255) indexed | ||
# user_id :integer not null, indexed | ||
# package_id :integer indexed | ||
# type :string(255) | ||
# | ||
# Indexes | ||
# | ||
# index_tokens_on_string (string) UNIQUE | ||
# package_id (package_id) | ||
# user_id (user_id) | ||
# | ||
# Foreign Keys | ||
# | ||
# tokens_ibfk_1 (user_id => users.id) | ||
# tokens_ibfk_2 (package_id => packages.id) | ||
# |
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,8 +1,8 @@ | ||
Actions: | ||
<% event['actions'].each do |a| -%> | ||
<% if %w(submit maintenance_incident maintenance_release).include? a['type'] -%> | ||
<%= render partial: 'submit_action', locals: { a: a } -%> | ||
<%= render partial: 'event_mailer/submit_action', locals: { a: a } -%> | ||
<% else -%> | ||
<%= render partial: "#{a['type']}_action", locals: { a: a } -%> | ||
<%= render partial: "event_mailer/#{a['type']}_action", locals: { a: a } -%> | ||
<% end -%> | ||
<% end -%> |
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
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
Oops, something went wrong.