ish_manager 0.1.8.500 → 0.1.8.503

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: aad53e16372476d88874a2890715c1783fd15074abdf843eb7850c3a8bd462d9
4
- data.tar.gz: d8f8011c70d658b73bcb65837b03e742b470519ad3acf75b1ae6d0d6c95d4088
3
+ metadata.gz: b7465feb8b71a19de0c55e39cbf14d4016792bdcd20f5c0d10ab90397defcffb
4
+ data.tar.gz: 700d28696374331c9e7c8f3b1f87e74a13392c350a81e89588a4fdb48dfbb0bd
5
5
  SHA512:
6
- metadata.gz: 56c4796cde285294fc3aaed58fa574d6516173dbb0f953fe5d0528e004dcae4f43dc8447291b6bd7a179dbeccd6f2ead1fbf60cee48d75d6b73f22ce519d9ce8
7
- data.tar.gz: f64f1ade2b4cca7bf7a8a1d0e2e33bf58b7668ece0ddff25a21e0b28545a46c75fd7c12f9a2d9f0ffcc8d148be64d724417057fc3386291497cc58a973528555
6
+ metadata.gz: 29c2cd6c9c46744212e9f23b1b4e7890bd72da84783445270284c79c3b3d1ae06b91297c26d17695325be998daf30da7865162615274fc290533f2149843f209
7
+ data.tar.gz: c4350008f57978f1e09b13ebc0340b8953c01735c9a28b1d9e351b5c1e66bcc5fbf5261dd68e89b9c128c1d0260180becf271954e9664d1263cf9b935696d525
@@ -13,15 +13,32 @@ class ::IshManager::ApplianceTmplsController < IshManager::ApplicationController
13
13
  redirect_to action: :index
14
14
  else
15
15
  flash[:alert] = "Cannot create appliance tmplate: #{@appliance_tmpl.errors.full_messages.join(', ')}."
16
- render action: :index
16
+ redirect_to action: :index
17
17
  end
18
18
  end
19
19
 
20
+ def edit
21
+ @appliance_tmpl = Wco::ApplianceTmpl.find params[:id]
22
+ authorize! :edit, @appliance_tmpl
23
+ end
24
+
20
25
  def index
21
26
  authorize! :index, Wco::ApplianceTmpl
22
27
  @appliance_tmpls = Wco::ApplianceTmpl.all
23
28
  end
24
29
 
30
+ def update
31
+ @appliance_tmpl = Wco::ApplianceTmpl.find params[:id]
32
+ authorize! :update, @appliance_tmpl
33
+ flag = @appliance_tmpl.update params[:appliance].permit!
34
+ if flag
35
+ flash_notice 'success'
36
+ else
37
+ flash_alert "Cannot update appliance template: #{@appliance_tmpl.errors.full_messages.join(', ')}."
38
+ end
39
+ redirect_to action: :index
40
+ end
41
+
25
42
  ##
26
43
  ## private
27
44
  ##
@@ -1,7 +1,7 @@
1
1
 
2
2
  class ::IshManager::ServerhostsController < IshManager::ApplicationController
3
3
 
4
- # before_action :set_lists
4
+ before_action :set_lists
5
5
 
6
6
  def create
7
7
  @serverhost = Wco::Serverhost.new params[:serverhost].permit!
@@ -28,6 +28,11 @@ class ::IshManager::ServerhostsController < IshManager::ApplicationController
28
28
  @new_serverhost = Wco::Serverhost.new
29
29
  end
30
30
 
31
+ def show
32
+ @serverhost = Wco::Serverhost.find params[:id]
33
+ authorize! :show, @serverhost
34
+ end
35
+
31
36
  def update
32
37
  @serverhost = Wco::Serverhost.find params[:id]
33
38
  authorize! :update, @serverhost
@@ -48,13 +53,16 @@ class ::IshManager::ServerhostsController < IshManager::ApplicationController
48
53
  ##
49
54
  private
50
55
 
51
- # def set_lists
52
- # super
53
- # @new_serverhost = Wco::Serverhost.new
54
- # puts! @new_serverhost.class, 'ze'
55
- # puts! @new_serverhost, '@new_serverhost'
56
- # @new_serverhost.name = 'some name'
57
- # end
56
+ def set_lists
57
+ # super
58
+
59
+ # @new_serverhost = Wco::Serverhost.new
60
+ # puts! @new_serverhost.class, 'ze'
61
+ # puts! @new_serverhost, '@new_serverhost'
62
+ # @new_serverhost.name = 'some name'
63
+
64
+ @wco_leadsets_list = [[nil,nil]] + Wco::Leadset.all.map { |i| [ i.name, i.id ] }
65
+ end
58
66
 
59
67
  end
60
68
 
@@ -0,0 +1,35 @@
1
+
2
+ class IshManager::WcoLeadsetsController < IshManager::ApplicationController
3
+
4
+ def create
5
+ end
6
+
7
+ def edit
8
+ @wco_leadset = Wco::Leadset.find params[:id]
9
+ authorize! :edit, @wco_leadset
10
+ end
11
+
12
+ def index
13
+ authorize! :index, Wco::Leadset
14
+ @wco_leadsets = Wco::Leadset.all
15
+ end
16
+
17
+ def show
18
+ @wco_leadset = Wco::Leadset.find params[:id]
19
+ authorize! :show, @wco_leadset
20
+ end
21
+
22
+ def update
23
+ @wco_leadset = Wco::Leadset.find params[:id]
24
+ authorize! :update, @wco_leadset
25
+ flag = @wco_leadset.update params[:wco_leadset].permit!
26
+ if flag
27
+ flash_notice "ok"
28
+ else
29
+ flash_alert "sorry"
30
+ end
31
+ redirect_to action: :index
32
+ end
33
+
34
+ end
35
+
@@ -1,14 +1,23 @@
1
1
 
2
- - url = appliance_tmpl.new_record? ? appliance_tmpls_path : appliance_tmpls_path( appliance_tmpl )
2
+ - url = appliance_tmpl.new_record? ? appliance_tmpls_path : appliance_tmpl_path( appliance_tmpl )
3
3
 
4
4
  .appliance-tmpls--form
5
5
  = form_for appliance_tmpl, as: :appliance, url: url do |f|
6
- .input-field
6
+ .field
7
7
  = f.label :kind
8
8
  = f.text_field :kind
9
- .input-field
9
+ .field
10
+ = f.label :version
11
+ = f.text_field :version
12
+ .field
13
+ = f.label :descr
14
+ = f.text_area :descr
15
+ .field
10
16
  = f.label :image
11
- = f.text_field :image
17
+ = f.text_field :image, class: 'w-100'
18
+ .field
19
+ %label volume_zip
20
+ = f.text_field :volume_zip, class: 'w-100'
12
21
 
13
22
  .actions
14
23
  = f.submit 'Submit'
@@ -0,0 +1,4 @@
1
+
2
+ .appliance-tmpls-edit.maxwidth
3
+ %h5 Edit ApplianceTmpl `#{@appliance_tmpl}`
4
+ = render 'form', appliance_tmpl: @appliance_tmpl
@@ -6,9 +6,12 @@
6
6
  %ul
7
7
  - @appliance_tmpls.each do |i|
8
8
  %li
9
+ %span.gray= i.id.to_s
10
+ = link_to '[~]', edit_appliance_tmpl_path( i )
9
11
  %ul
10
- %li <b>Kind:</b> #{i.kind}
11
- %li <b>Image:</b> #{i.image}
12
+ - i.attributes.each do |k, v|
13
+ - next if %| _id created_at updated_at |.include? k
14
+ %li <b>#{k}:</b> #{v}
12
15
 
13
16
  %hr
14
17
  = render 'form', :appliance_tmpl => @new_appliance_tmpl
@@ -125,6 +125,8 @@
125
125
  %li
126
126
  = link_to 'Subscriptions', subscriptions_path
127
127
  = link_to '[+]', new_wco_subscription_path
128
+ %li
129
+ = link_to 'Wco::Leadset\'s', wco_leadsets_path
128
130
 
129
131
 
130
132
  .c
@@ -5,9 +5,10 @@
5
5
  .field
6
6
  = f.label :name
7
7
  = f.text_field :name
8
+
8
9
  .field
9
- = f.label :leadset_id
10
- = f.number_field :leadset_id
10
+ %label Wco::Leadset
11
+ = f.select :wco_leadset, options_for_select( @wco_leadsets_list, selected: serverhost.wco_leadset_id ), class: [ :select2 ]
11
12
  .field
12
13
  = f.label :next_port
13
14
  = f.number_field :next_port
@@ -15,15 +16,15 @@
15
16
  .field
16
17
  = f.label :ssh_host
17
18
  = f.text_field :ssh_host
18
- .field
19
- = f.label :ssh_username
20
- = f.text_field :ssh_username
21
- .field
22
- = f.label :ssh_key
23
- = f.text_field :ssh_key
24
- .field
25
- = f.label :nginx_root
26
- = f.text_field :nginx_root
19
+ -# .field
20
+ -# = f.label :ssh_username
21
+ -# = f.text_field :ssh_username
22
+ -# .field
23
+ -# = f.label :ssh_key
24
+ -# = f.text_field :ssh_key
25
+ -# .field
26
+ -# = f.label :nginx_root
27
+ -# = f.text_field :nginx_root
27
28
 
28
29
  .actions
29
30
  = f.submit 'Submit'
@@ -2,18 +2,18 @@
2
2
  .serverhosts--index
3
3
  %h5 Serverhosts (#{serverhosts.length})
4
4
 
5
- %ul.items
6
- - serverhosts.each do |i|
7
- %li
8
- = i.name
9
- %span.gray= i.id.to_s
10
- = link_to '[~]', edit_serverhost_path(i)
5
+ .items
6
+ - serverhosts.each do |s|
7
+ .card.inline-block
8
+ = s.name
9
+ %span.gray= s.id.to_s
10
+ = link_to '[~]', edit_serverhost_path(s)
11
11
  %ul
12
- %li.leadset_id <b>leadset_id:</b> #{i.leadset_id}
13
- %li.next_port <b>Next Port:</b> #{i.next_port}
14
- %li.ssh_host <b>ssh_host:</b> #{i.ssh_host}
15
- %li.ssh_username <b>ssh_username:</b> #{i.ssh_username}
16
- %li.ssh_key <b>ssh_key:</b> #{i.ssh_key}
17
- %li.nginx_root <b>nginx_root:</b> #{i.nginx_root}
18
- %li.appliances
19
- = render 'ish_manager/appliances/index', appliances: i.appliances
12
+ %li.wco-leadset <b>wco_leadset:</b> #{s.wco_leadset.name} (#{s.wco_leadset.id})
13
+ %li.next_port <b>Next Port:</b> #{s.next_port}
14
+ %li.ssh_host <b>ssh_host:</b> #{s.ssh_host}
15
+ -# %li.ssh_username <b>ssh_username:</b> #{s.ssh_username}
16
+ -# %li.ssh_key <b>ssh_key:</b> #{s.ssh_key}
17
+ %li.nginx_root <b>nginx_root:</b> #{s.nginx_root}
18
+ -# %li.appliances
19
+ -# = render 'ish_manager/appliances/index', appliances: s.appliances
@@ -0,0 +1,6 @@
1
+
2
+ .serverhosts-edit.max-width
3
+ %h5
4
+ = link_to '<-', serverhosts_path
5
+ Show serverhost `#{@serverhost.name}` #{link_to '[~]', edit_serverhost_path( @serverhost )}
6
+ = render 'form', serverhost: @serverhost
@@ -1,6 +1,6 @@
1
1
 
2
2
  .user-profiles-edit.max-width
3
3
  .header
4
- %h2.title Editing profile for: `#{@profile.email}`
4
+ %h2.title Editing profile `#{link_to @profile.email, user_profile_path(@profile) }`
5
5
 
6
6
  = render 'form', :profile => @profile
@@ -1,7 +1,9 @@
1
1
 
2
2
  .user-profiles-show.max-width
3
3
  .header
4
- %h2.title Profile #{@profile.email}
4
+ %h2.title Profile `#{@profile.email}`
5
+ %ul
6
+ %li <b>Leadset:</b> #{link_to @profile.leadset.name, leadset_path(@profile.leadset)}
5
7
 
6
8
  .newsitems
7
9
  .title Newsitems (#{@profile.newsitems.length})
@@ -0,0 +1,39 @@
1
+ - profile ||= user_profile
2
+
3
+ .user-profiles--show.max-width
4
+ .header
5
+ %h2.title Profile #{profile.email}
6
+
7
+ .newsitems
8
+ .title Newsitems (#{profile.newsitems.length})
9
+ - profile.newsitems.each do |newsitem|
10
+ = render 'ish_manager/newsitems/show', newsitem: newsitem
11
+
12
+ .premium-purchases
13
+ Payments (purchased items) (#{profile.payments.length}):
14
+ - profile.payments.each do |payment|
15
+ .Card.item
16
+ = payment
17
+
18
+
19
+ %ul
20
+ %li
21
+ <b>Email:</b> #{link_to profile.email, user_profile_path(profile)}
22
+ = link_to '[edit]', edit_user_profile_path( profile )
23
+ %li <b>Name:</b> #{profile.name}
24
+ %li <b>Role:</b> #{profile.role_name}
25
+ %li
26
+ <b>Profile Photo:</b>
27
+ = image_tag profile.profile_photo.photo.url(:thumb) rescue nil
28
+
29
+ .col.s8
30
+ %h5 Shared galleries
31
+ - profile.shared_galleries.unscoped.where( :is_trash => false ).each do |g|
32
+ &gt; #{link_to g.name, gallery_path(g.slug)} <br />
33
+ = render 'meta', :item => g
34
+ <hr />
35
+
36
+ %h5 Newsitems
37
+ - profile.newsitems.each do |n|
38
+ = render 'ish_manager/newsitems/item', n: n, profile_id: profile.id
39
+ <hr />
@@ -0,0 +1,12 @@
1
+
2
+ .wco-leadsets--form
3
+ = form_for wco_leadset do |f|
4
+ .field
5
+ %label name
6
+ = f.text_field :name
7
+ .field
8
+ %label domains, space-separated
9
+ = f.text_field :domains
10
+
11
+ .actions
12
+ = f.submit 'Submit'
@@ -0,0 +1,11 @@
1
+
2
+ .wco-leadsets--index
3
+ - leadsets.each do |leadset|
4
+ .Card
5
+ = link_to leadset.name, wco_leadset_path( leadset )
6
+ = link_to '[~]', edit_wco_leadset_path( leadset )
7
+ %ul.item
8
+ %li <b>Next Serverhost:</b> #{link_to leadset.next_serverhost.ssh_host, serverhost_path( leadset.next_serverhost ) }
9
+ %li <b>Domains:</b> #{leadset.domains}
10
+
11
+
@@ -0,0 +1,4 @@
1
+
2
+ .wco-leadsets-edit.maxwidth
3
+ %h5 Edit Wco::Leadset `#{link_to @wco_leadset.name, wco_leadset_path( @wco_leadset) }`
4
+ = render 'form', wco_leadset: @wco_leadset
@@ -0,0 +1,6 @@
1
+
2
+ .wco-leadsets-index.maxwidth
3
+ %h5 Wco::Leadset's
4
+
5
+ = render 'index', leadsets: @wco_leadsets
6
+
@@ -0,0 +1,8 @@
1
+
2
+ .wco-leadsets-show.maxwidth
3
+ %h5
4
+ = link_to '<-', wco_leadsets_path
5
+ Wco::Leadset `#{@wco_leadset.name}`
6
+ = render 'index', leadsets: [ @wco_leadset ]
7
+
8
+
data/config/routes.rb CHANGED
@@ -174,4 +174,6 @@ IshManager::Engine.routes.draw do
174
174
  ##
175
175
  resources :videos
176
176
 
177
+ resources :wco_leadsets
178
+
177
179
  end
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.500
4
+ version: 0.1.8.503
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-30 00:00:00.000000000 Z
11
+ date: 2023-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -526,6 +526,7 @@ files:
526
526
  - app/controllers/ish_manager/unsubscribes_controller.rb
527
527
  - app/controllers/ish_manager/user_profiles_controller.rb
528
528
  - app/controllers/ish_manager/videos_controller.rb
529
+ - app/controllers/ish_manager/wco_leadsets_controller.rb
529
530
  - app/helpers/ish_manager/application_helper.rb
530
531
  - app/helpers/ish_manager/images_helper.rb
531
532
  - app/jobs/ish_manager/application_job.rb
@@ -575,6 +576,7 @@ files:
575
576
  - app/views/ish_manager/analytics/index.haml
576
577
  - app/views/ish_manager/analytics/test.haml
577
578
  - app/views/ish_manager/appliance_tmpls/_form.haml
579
+ - app/views/ish_manager/appliance_tmpls/edit.haml
578
580
  - app/views/ish_manager/appliance_tmpls/index.haml
579
581
  - app/views/ish_manager/appliances/_form.haml
580
582
  - app/views/ish_manager/appliances/_index.haml
@@ -848,6 +850,7 @@ files:
848
850
  - app/views/ish_manager/serverhosts/_index.haml
849
851
  - app/views/ish_manager/serverhosts/edit.haml
850
852
  - app/views/ish_manager/serverhosts/index.haml
853
+ - app/views/ish_manager/serverhosts/show.haml
851
854
  - app/views/ish_manager/subscriptions/_form.haml
852
855
  - app/views/ish_manager/subscriptions/index.haml
853
856
  - app/views/ish_manager/subscriptions/new.haml
@@ -860,11 +863,11 @@ files:
860
863
  - app/views/ish_manager/trash/email_campaigns-trash/new.haml
861
864
  - app/views/ish_manager/unsubscribes/index.haml
862
865
  - app/views/ish_manager/user_profiles/_form.haml
863
- - app/views/ish_manager/user_profiles/_show.haml
864
866
  - app/views/ish_manager/user_profiles/edit.haml
865
867
  - app/views/ish_manager/user_profiles/index.haml
866
868
  - app/views/ish_manager/user_profiles/new.haml
867
869
  - app/views/ish_manager/user_profiles/show.haml
870
+ - app/views/ish_manager/user_profiles/trash/_show.haml
868
871
  - app/views/ish_manager/users/_index.haml
869
872
  - app/views/ish_manager/users/index.haml
870
873
  - app/views/ish_manager/videos/_form.haml
@@ -883,6 +886,11 @@ files:
883
886
  - app/views/ish_manager/videos/trash/_list_small.haml
884
887
  - app/views/ish_manager/videos/trash/_meta_edit.haml
885
888
  - app/views/ish_manager/videos/trash/_preview.haml
889
+ - app/views/ish_manager/wco_leadsets/_form.haml
890
+ - app/views/ish_manager/wco_leadsets/_index.haml
891
+ - app/views/ish_manager/wco_leadsets/edit.haml
892
+ - app/views/ish_manager/wco_leadsets/index.haml
893
+ - app/views/ish_manager/wco_leadsets/show.haml
886
894
  - app/views/layouts/ish_manager/application.haml
887
895
  - app/views/layouts/ish_manager/done/20230316 application.haml
888
896
  - app/views/layouts/ish_manager/email_iframe.haml
@@ -1,35 +0,0 @@
1
- - profile ||= user_profile
2
-
3
- .row
4
- .col.s4
5
- %ul
6
- %li
7
- <b>Email:</b> #{link_to profile.email, user_profile_path(profile)}
8
- = link_to '[edit]', edit_user_profile_path( profile )
9
- %li <b>Name:</b> #{profile.name}
10
- %li <b>Role:</b> #{profile.role_name}
11
- %li <b>User.email:</b> #{profile.user ? profile.user.email : nil}
12
- %li <b>City:</b> #{profile.current_city ? profile.current_city.name : nil}
13
- %li
14
- <b>Profile Photo:</b>
15
- = image_tag profile.profile_photo.photo.url(:thumb) rescue nil
16
-
17
- .col.s8
18
- %h5 Shared galleries
19
- - profile.shared_galleries.unscoped.where( :is_trash => false ).each do |g|
20
- &gt; #{link_to g.name, gallery_path(g.slug)} <br />
21
- = render 'meta', :item => g
22
- <hr />
23
-
24
- %h5 Newsitems
25
- - profile.newsitems.each do |n|
26
- = render 'ish_manager/newsitems/item', n: n, profile_id: profile.id
27
- <hr />
28
-
29
- %h5 Bookmarked Locations (#{profile.bookmarked_locations.length})
30
- %ul.browser-default
31
- - profile.bookmarked_locations.each do |n|
32
- %li
33
- = n.slug
34
-
35
-