Repo cleanup
This commit is contained in:
parent
59872f579a
commit
e941353b64
444 changed files with 1485 additions and 21978 deletions
|
|
@ -0,0 +1,22 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
Rails.application.config.after_initialize do
|
||||
class Ticket::Article
|
||||
include Ticket::Article::EnqueueCommunicateCdrSignalJob
|
||||
end
|
||||
|
||||
# Handle Signal group setup for split tickets
|
||||
class Link
|
||||
include Link::SetupSplitSignalGroup
|
||||
end
|
||||
|
||||
icon = File.read('public/assets/images/icons/cdr_signal.svg')
|
||||
doc = File.open('public/assets/images/icons.svg') { |f| Nokogiri::XML(f) }
|
||||
if !doc.at_css('#icon-cdr-signal')
|
||||
doc.at('svg').add_child(icon)
|
||||
Rails.logger.debug 'signal icon added to icon set'
|
||||
else
|
||||
Rails.logger.debug 'signal icon already in icon set'
|
||||
end
|
||||
File.write('public/assets/images/icons.svg', doc.to_xml)
|
||||
end
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
Rails.application.config.after_initialize do
|
||||
|
||||
class Ticket::Article
|
||||
include Ticket::Article::EnqueueCommunicateCdrWhatsappJob
|
||||
end
|
||||
|
||||
icon = File.read('public/assets/images/icons/cdr_whatsapp.svg')
|
||||
doc = File.open('public/assets/images/icons.svg') { |f| Nokogiri::XML(f) }
|
||||
if !doc.at_css('#icon-cdr-whatsapp')
|
||||
doc.at('svg').add_child(icon)
|
||||
Rails.logger.debug 'whatsapp icon added to icon set'
|
||||
else
|
||||
Rails.logger.debug 'whatsapp icon already in icon set'
|
||||
end
|
||||
File.write('public/assets/images/icons.svg', doc.to_xml)
|
||||
end
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Configuration for direct Signal CLI REST API access
|
||||
# The SIGNAL_CLI_URL environment variable points to the signal-cli-rest-api container
|
||||
# Default: http://signal-cli-rest-api:8080
|
||||
#
|
||||
# This enables Zammad to poll for Signal messages directly without going through bridge-worker
|
||||
|
||||
Rails.application.config.after_initialize do
|
||||
signal_cli_url = ENV.fetch('SIGNAL_CLI_URL', 'http://signal-cli-rest-api:8080')
|
||||
Rails.logger.info "Signal CLI API URL configured: #{signal_cli_url}"
|
||||
end
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
Zammad::Application.routes.draw do
|
||||
api_path = Rails.configuration.api_path
|
||||
|
||||
match api_path + '/cdr_signal_channels', to: 'cdr_signal_channels#index', via: :get
|
||||
end
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
Zammad::Application.routes.draw do
|
||||
api_path = Rails.configuration.api_path
|
||||
|
||||
match api_path + '/ticket_article_types', to: 'cdr_ticket_article_types#index', via: :get
|
||||
end
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
Zammad::Application.routes.draw do
|
||||
api_path = Rails.configuration.api_path
|
||||
|
||||
match "#{api_path}/channels_cdr_signal", to: 'channels_cdr_signal#index', via: :get
|
||||
match "#{api_path}/channels_cdr_signal", to: 'channels_cdr_signal#add', via: :post
|
||||
match "#{api_path}/channels_cdr_signal/:id", to: 'channels_cdr_signal#update', via: :put
|
||||
match "#{api_path}/channels_cdr_signal_webhook/:token", to: 'channels_cdr_signal#webhook', via: :post
|
||||
match "#{api_path}/channels_cdr_signal_webhook/:token/update_group", to: 'channels_cdr_signal#update_group', via: :post
|
||||
match "#{api_path}/channels_cdr_signal_disable", to: 'channels_cdr_signal#disable', via: :post
|
||||
match "#{api_path}/channels_cdr_signal_enable", to: 'channels_cdr_signal#enable', via: :post
|
||||
match "#{api_path}/channels_cdr_signal", to: 'channels_cdr_signal#destroy', via: :delete
|
||||
match "#{api_path}/channels_cdr_signal_rotate_token", to: 'channels_cdr_signal#rotate_token', via: :post
|
||||
match "#{api_path}/channels_cdr_signal_set_notification", to: 'channels_cdr_signal#set_notification_channel', via: :post
|
||||
match "#{api_path}/channels_cdr_signal_unset_notification", to: 'channels_cdr_signal#unset_notification_channel', via: :post
|
||||
end
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
Zammad::Application.routes.draw do
|
||||
api_path = Rails.configuration.api_path
|
||||
|
||||
match "#{api_path}/channels_cdr_voice", to: 'channels_cdr_voice#index', via: :get
|
||||
match "#{api_path}/channels_cdr_voice", to: 'channels_cdr_voice#add', via: :post
|
||||
match "#{api_path}/channels_cdr_voice/:id", to: 'channels_cdr_voice#update', via: :put
|
||||
match "#{api_path}/channels_cdr_voice_webhook/:token", to: 'channels_cdr_voice#webhook', via: :post
|
||||
match "#{api_path}/channels_cdr_voice_disable", to: 'channels_cdr_voice#disable', via: :post
|
||||
match "#{api_path}/channels_cdr_voice_enable", to: 'channels_cdr_voice#enable', via: :post
|
||||
match "#{api_path}/channels_cdr_voice", to: 'channels_cdr_voice#destroy', via: :delete
|
||||
match "#{api_path}/channels_cdr_voice_rotate_token", to: 'channels_cdr_voice#rotate_token', via: :post
|
||||
end
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
Zammad::Application.routes.draw do
|
||||
api_path = Rails.configuration.api_path
|
||||
|
||||
match "#{api_path}/channels_cdr_whatsapp", to: 'channels_cdr_whatsapp#index', via: :get
|
||||
match "#{api_path}/channels_cdr_whatsapp", to: 'channels_cdr_whatsapp#add', via: :post
|
||||
match "#{api_path}/channels_cdr_whatsapp/:id", to: 'channels_cdr_whatsapp#update', via: :put
|
||||
match "#{api_path}/channels_cdr_whatsapp_webhook/:token", to: 'channels_cdr_whatsapp#webhook', via: :post
|
||||
match "#{api_path}/channels_cdr_whatsapp_bot_webhook/:bot_token", to: 'channels_cdr_whatsapp#bot_webhook', via: :post
|
||||
match "#{api_path}/channels_cdr_whatsapp_disable", to: 'channels_cdr_whatsapp#disable', via: :post
|
||||
match "#{api_path}/channels_cdr_whatsapp_enable", to: 'channels_cdr_whatsapp#enable', via: :post
|
||||
match "#{api_path}/channels_cdr_whatsapp", to: 'channels_cdr_whatsapp#destroy', via: :delete
|
||||
match "#{api_path}/channels_cdr_whatsapp_rotate_token", to: 'channels_cdr_whatsapp#rotate_token', via: :post
|
||||
end
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
Zammad::Application.routes.draw do
|
||||
scope Rails.configuration.api_path do
|
||||
match '/formstack/webhook', to: 'formstack#webhook', via: :post
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
Zammad::Application.routes.draw do
|
||||
scope Rails.configuration.api_path do
|
||||
match '/opensearch', to: 'opensearch#index', via: :get
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue