ish_manager 0.1.8.412 → 0.1.8.413

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: 00f50c9d4c8e8eb28c03a8cf7b5a3bf9dad3a1942b7171cf0bd24ef9e4023b42
4
- data.tar.gz: b8093f2152ec12c05daa5af3a57da34772492193c3413b129933520c24ad9c86
3
+ metadata.gz: ac60f7cd88786021285d1497b25f91540c45f639d1912ef070eb3329f2e1f15e
4
+ data.tar.gz: 21a8968131ae5f0075c774f3ad27cfdc0fe9d2927c0150f8c3d28f3366e03ef1
5
5
  SHA512:
6
- metadata.gz: 9542bb26d8e7eab5e96416006bf0003fa8a2e4947c48004b0a50df093e177884af300f51186a8d9c632b9629e2aafcdbfa480e76db88e4da59ab144a06a4eaa5
7
- data.tar.gz: e8547c17dc63d91f7858999446db3ea754109b37b9d0355c0394ccce58523f2a1dc392b2dcc32bdaf7374a53700311aab6f40005ddab3a33a43d441a174fdb04
6
+ metadata.gz: 7b4ea92b7f2208a3c80a2a4d478e29582ea2fd5aa37b99afdae807b6b8003f6fc21e0afef66d4ffb72195e25e4993e5ad2a7311b5be1ac2f6e5fa540235aadb6
7
+ data.tar.gz: 5195f3b41ac7dd1568878ef9ec5de62dbfde500ca3844ffe75e0f211b3f5433c724d1a9ead3578fd7508e4e3f71037513d9bea3945085539dd6d246b7a4ed0ad
@@ -1,3 +1,4 @@
1
+ require 'csv'
1
2
 
2
3
  class ::IshManager::EmailContextsController < ::IshManager::ApplicationController
3
4
 
@@ -97,6 +98,22 @@ class ::IshManager::EmailContextsController < ::IshManager::ApplicationControlle
97
98
  authorize! :show, @ctx
98
99
  end
99
100
 
101
+ def summary
102
+ authorize! :summary, Ish::EmailContext
103
+ @results = Ish::EmailContext.summary
104
+ puts! @results, 'r'
105
+
106
+ # headers["Content-Type"] ||= 'text/csv'
107
+
108
+ respond_to do |format|
109
+ format.html # show.html.erb
110
+ format.csv do
111
+ render layout: false
112
+ end
113
+ end
114
+
115
+ end
116
+
100
117
  def update
101
118
  @ctx = ::Ish::EmailContext.find params[:id]
102
119
  authorize! :update, @ctx
@@ -73,6 +73,7 @@
73
73
  %li
74
74
  = link_to "Contexts (#{Ctx.notsent.length})", notsent_email_contexts_path
75
75
  = link_to '[+]', new_email_context_path
76
+ = link_to 'summary', email_contexts_summary_path( format: :csv )
76
77
 
77
78
  %li
78
79
  = link_to "Leads (#{Lead.kept.length})", leads_path
@@ -0,0 +1,4 @@
1
+ <%= CSV.generate_line ['date', 'count'] -%>
2
+ <%- @results.each do |result| -%>
3
+ <%= CSV.generate_line [ result['_id'], result['total'] ] -%>
4
+ <%- end -%>
File without changes
data/config/routes.rb CHANGED
@@ -74,6 +74,7 @@ IshManager::Engine.routes.draw do
74
74
  get 'email_conversations/notin/:not_slug', to: 'email_conversations#index', as: :email_conversations_notin
75
75
  get 'email_conversations/show/:id', to: 'email_conversations#show', as: :email_conversation
76
76
 
77
+ get 'email_contexts/summary', to: 'email_contexts#summary', as: :email_contexts_summary
77
78
  get 'email_contexts/for_lead/:lead_id', to: 'email_contexts#index', as: :email_contexts_for_lead
78
79
  get 'email_contexts/iframe_src/:id', to: 'email_contexts#iframe_src', as: :email_context_iframe
79
80
  get 'email_contexts/new_with_template/:template_slug', to: 'email_contexts#new'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.412
4
+ version: 0.1.8.413
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-05 00:00:00.000000000 Z
11
+ date: 2023-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -395,6 +395,8 @@ files:
395
395
  - app/views/ish_manager/email_contexts/index.haml
396
396
  - app/views/ish_manager/email_contexts/new.haml
397
397
  - app/views/ish_manager/email_contexts/show.haml
398
+ - app/views/ish_manager/email_contexts/summary.csv.erb
399
+ - app/views/ish_manager/email_contexts/summary.haml
398
400
  - app/views/ish_manager/email_conversations/index.haml
399
401
  - app/views/ish_manager/email_conversations/show.haml
400
402
  - app/views/ish_manager/email_filters/_form.haml