ish_manager 0.1.8.499 → 0.1.8.503
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/ish_manager/appliance_tmpls_controller.rb +18 -1
- data/app/controllers/ish_manager/serverhosts_controller.rb +16 -8
- data/app/controllers/ish_manager/wco_leadsets_controller.rb +35 -0
- data/app/mailers/ish_manager/office_mailer.rb +1 -0
- data/app/views/ish_manager/appliance_tmpls/_form.haml +13 -4
- data/app/views/ish_manager/appliance_tmpls/edit.haml +4 -0
- data/app/views/ish_manager/appliance_tmpls/index.haml +5 -2
- data/app/views/ish_manager/application/_main_header_admin.haml +2 -0
- data/app/views/ish_manager/serverhosts/_form.haml +12 -11
- data/app/views/ish_manager/serverhosts/_index.haml +14 -14
- data/app/views/ish_manager/serverhosts/show.haml +6 -0
- data/app/views/ish_manager/user_profiles/edit.haml +1 -1
- data/app/views/ish_manager/user_profiles/show.haml +3 -1
- data/app/views/ish_manager/user_profiles/trash/_show.haml +39 -0
- data/app/views/ish_manager/wco_leadsets/_form.haml +12 -0
- data/app/views/ish_manager/wco_leadsets/_index.haml +11 -0
- data/app/views/ish_manager/wco_leadsets/edit.haml +4 -0
- data/app/views/ish_manager/wco_leadsets/index.haml +6 -0
- data/app/views/ish_manager/wco_leadsets/show.haml +8 -0
- data/config/routes.rb +2 -0
- metadata +11 -3
- data/app/views/ish_manager/user_profiles/_show.haml +0 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7465feb8b71a19de0c55e39cbf14d4016792bdcd20f5c0d10ab90397defcffb
|
4
|
+
data.tar.gz: 700d28696374331c9e7c8f3b1f87e74a13392c350a81e89588a4fdb48dfbb0bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
-
|
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
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
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 :
|
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
|
-
.
|
6
|
+
.field
|
7
7
|
= f.label :kind
|
8
8
|
= f.text_field :kind
|
9
|
-
.
|
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'
|
@@ -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
|
-
|
11
|
-
|
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
|
@@ -5,9 +5,10 @@
|
|
5
5
|
.field
|
6
6
|
= f.label :name
|
7
7
|
= f.text_field :name
|
8
|
+
|
8
9
|
.field
|
9
|
-
|
10
|
-
= f.
|
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
|
-
|
20
|
-
|
21
|
-
.field
|
22
|
-
|
23
|
-
|
24
|
-
.field
|
25
|
-
|
26
|
-
|
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
|
-
|
6
|
-
- serverhosts.each do |
|
7
|
-
|
8
|
-
=
|
9
|
-
%span.gray=
|
10
|
-
= link_to '[~]', edit_serverhost_path(
|
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.
|
13
|
-
%li.next_port <b>Next Port:</b> #{
|
14
|
-
%li.ssh_host <b>ssh_host:</b> #{
|
15
|
-
%li.ssh_username <b>ssh_username:</b> #{
|
16
|
-
%li.ssh_key <b>ssh_key:</b> #{
|
17
|
-
%li.nginx_root <b>nginx_root:</b> #{
|
18
|
-
%li.appliances
|
19
|
-
|
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
|
@@ -1,7 +1,9 @@
|
|
1
1
|
|
2
2
|
.user-profiles-show.max-width
|
3
3
|
.header
|
4
|
-
%h2.title Profile
|
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
|
+
> #{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,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
|
+
|
data/config/routes.rb
CHANGED
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.
|
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-
|
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
|
-
> #{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
|
-
|