wco_hosting 0.0.0.4 → 0.0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascript/wco_hosting/application.js +2 -0
- data/app/controllers/wco_hosting/appliance_tmpls_controller.rb +13 -2
- data/app/controllers/wco_hosting/subscriptions_controller.rb +11 -0
- data/app/views/layouts/wco_hosting/application.haml +8 -2
- data/app/views/wco_hosting/appliance_tmpls/_form.haml +4 -1
- data/app/views/wco_hosting/appliance_tmpls/index.haml +10 -5
- data/app/views/wco_hosting/leadsets/_form.haml +0 -2
- data/app/views/wco_hosting/leadsets/index.haml +18 -9
- data/app/views/wco_hosting/leadsets/show.haml +9 -1
- data/config/initializers/assets.rb +4 -0
- data/config/routes.rb +2 -1
- data/lib/wco_hosting.rb +1 -1
- metadata +26 -11
- data/app/controllers/wco_hosting/sessions_controller.rb-trash +0 -19
- data/app/views/wco/application/_alerts_notices.haml +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6da0e8ed660a78eb05d67da1791913175c8e9698fb722e73851237b33ee3b7ec
|
4
|
+
data.tar.gz: 22e1974799412265dda5e06d73d8d76224c591400caeca8b5baf5d89be760b77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11ae804a01e186eaea2b9e99f22bf5000ac98ba19e6e7e347cd14d6bd14957bda6d6268551eedb43fb8b1e13cef9378ef456f9e166b8ca78318c57923d5f1032
|
7
|
+
data.tar.gz: 50a9cdab5ec3cba265a0a56e6239b2fc7df7de70ae6a188e452a4bbd651aae433370ed450299f6bcaac559a589b530f6d28ba84ce0f0d9ace9608c417d6bd04e
|
@@ -4,9 +4,11 @@ class WcoHosting::ApplianceTmplsController < WcoHosting::ApplicationController
|
|
4
4
|
before_action :set_lists
|
5
5
|
|
6
6
|
def create
|
7
|
-
@appliance_tmpl = WcoHosting::ApplianceTmpl.new params[:
|
7
|
+
@appliance_tmpl = WcoHosting::ApplianceTmpl.new params[:tmpl].permit!
|
8
8
|
authorize! :create, @appliance_tmpl
|
9
9
|
|
10
|
+
@appliance_tmpl.price_id = Wco::Price.find( params[:tmpl][:wco_price_id] ).price_id
|
11
|
+
|
10
12
|
flag = @appliance_tmpl.save
|
11
13
|
if flag
|
12
14
|
flash[:notice] = 'Success.'
|
@@ -35,7 +37,15 @@ class WcoHosting::ApplianceTmplsController < WcoHosting::ApplicationController
|
|
35
37
|
def update
|
36
38
|
@appliance_tmpl = WcoHosting::ApplianceTmpl.find params[:id]
|
37
39
|
authorize! :update, @appliance_tmpl
|
38
|
-
|
40
|
+
|
41
|
+
price = Wco::Price.find( params[:tmpl][:price] )
|
42
|
+
price.product = @appliance_tmpl
|
43
|
+
price.save
|
44
|
+
|
45
|
+
params[:tmpl][:price_id] = price.price_id
|
46
|
+
params[:tmpl][:price] = price
|
47
|
+
|
48
|
+
flag = @appliance_tmpl.update params[:tmpl].permit!
|
39
49
|
if flag
|
40
50
|
flash_notice 'success'
|
41
51
|
else
|
@@ -50,6 +60,7 @@ class WcoHosting::ApplianceTmplsController < WcoHosting::ApplicationController
|
|
50
60
|
private
|
51
61
|
|
52
62
|
def set_lists
|
63
|
+
@prices_list = Wco::Price.list
|
53
64
|
@new_appliance_tmpl = WcoHosting::ApplianceTmpl.new
|
54
65
|
end
|
55
66
|
|
@@ -5,15 +5,21 @@
|
|
5
5
|
%title Wco Hosting
|
6
6
|
= csrf_meta_tags
|
7
7
|
= csp_meta_tag
|
8
|
+
-# = javascript_include_tag 'wco_hosting/application'
|
8
9
|
= stylesheet_link_tag "wco_hosting/application", media: "all"
|
9
10
|
%body
|
10
11
|
|
11
|
-
%
|
12
|
-
%nav
|
12
|
+
%h2 Wco Hosting
|
13
|
+
%nav.flex-row
|
14
|
+
%ul
|
15
|
+
%li= link_to 'ROOT', '/'
|
16
|
+
%li= link_to '/email', '/email'
|
17
|
+
%li= link_to '/wco', '/wco'
|
13
18
|
%ul
|
14
19
|
%li= link_to 'Wco::Leadsets', leadsets_path
|
15
20
|
%li= link_to 'ApplianceTmpl`s', appliance_tmpls_path
|
16
21
|
%li= link_to 'Appliances', appliances_path
|
22
|
+
-# %li= link_to 'Products', products_path
|
17
23
|
%li= link_to 'Serverhosts', serverhosts_path
|
18
24
|
%hr
|
19
25
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
- url = appliance_tmpl.new_record? ? appliance_tmpls_path : appliance_tmpl_path( appliance_tmpl )
|
3
3
|
|
4
4
|
.appliance-tmpls--form
|
5
|
-
= form_for appliance_tmpl, as: :
|
5
|
+
= form_for appliance_tmpl, as: :tmpl, url: url do |f|
|
6
6
|
.field
|
7
7
|
= f.label :kind
|
8
8
|
= f.text_field :kind
|
@@ -18,6 +18,9 @@
|
|
18
18
|
.field
|
19
19
|
%label volume_zip
|
20
20
|
= f.text_field :volume_zip, class: 'w-100'
|
21
|
+
.field
|
22
|
+
%label price
|
23
|
+
= f.select :price, options_for_select( @prices_list, selected: appliance_tmpl.price )
|
21
24
|
|
22
25
|
.actions
|
23
26
|
= f.submit 'Submit'
|
@@ -6,20 +6,25 @@
|
|
6
6
|
|
7
7
|
%table.bordered
|
8
8
|
%tr
|
9
|
-
%th
|
9
|
+
%th
|
10
10
|
%th kind
|
11
11
|
%th version
|
12
12
|
%th image
|
13
13
|
%th volume_zip
|
14
|
-
|
14
|
+
%th price
|
15
|
+
%td
|
15
16
|
|
16
17
|
- @appliance_tmpls.each do |tmpl|
|
17
18
|
%tr
|
18
|
-
%td
|
19
|
+
%td
|
20
|
+
= link_to '[~]', edit_appliance_tmpl_path(tmpl)
|
19
21
|
%td= tmpl.kind
|
20
22
|
%td= tmpl.version
|
21
23
|
%td= tmpl.image
|
22
24
|
%td= tmpl.volume_zip
|
23
|
-
|
24
|
-
|
25
|
+
%td
|
26
|
+
= tmpl.price
|
27
|
+
%br
|
28
|
+
= tmpl.price_id
|
29
|
+
%td= tmpl.inspect
|
25
30
|
|
@@ -2,12 +2,21 @@
|
|
2
2
|
.leadsets-index
|
3
3
|
%h5 Leadsets
|
4
4
|
|
5
|
-
%
|
6
|
-
|
7
|
-
%
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
5
|
+
%table.bordered
|
6
|
+
%tr
|
7
|
+
%th
|
8
|
+
%th company_url
|
9
|
+
%th serverhosts
|
10
|
+
%th customer_id
|
11
|
+
%td
|
12
|
+
- @leadsets.each do |item|
|
13
|
+
%tr
|
14
|
+
%td
|
15
|
+
= link_to '[~]', edit_leadset_path(item)
|
16
|
+
%td= link_to item.company_url, leadset_path(item)
|
17
|
+
%td= item.serverhosts.map(&:name).join(",")
|
18
|
+
%td= item.customer_id
|
19
|
+
%td
|
20
|
+
= item.inspect
|
21
|
+
|
22
|
+
|
@@ -1,5 +1,13 @@
|
|
1
1
|
|
2
2
|
.leadsets-show
|
3
|
-
%h5 Leadset
|
3
|
+
%h5 Leadset `#{@leadset.company_url}`
|
4
|
+
|
5
|
+
%ul
|
6
|
+
%li <b>Next Serverhost:</b> #{@leadset.next_serverhost}
|
7
|
+
%li
|
8
|
+
<b>Subscriptions (#{@leadset.subscriptions.length}):</b>
|
9
|
+
%ul
|
10
|
+
- @leadset.subscriptions.each do |item|
|
11
|
+
%li= item.inspect
|
4
12
|
|
5
13
|
= render '/wco_hosting/leadsets/form', leadset: @leadset
|
data/config/routes.rb
CHANGED
@@ -9,7 +9,8 @@ WcoHosting::Engine.routes.draw do
|
|
9
9
|
# get 'email_conversations/not-in/:tagname_not', to: '/wco/email_conversations#index', as: :email_conversations_in_not
|
10
10
|
# resources :email_conversations
|
11
11
|
|
12
|
-
resources :serverhosts
|
13
12
|
resources :leadsets
|
14
13
|
|
14
|
+
resources :serverhosts
|
15
|
+
|
15
16
|
end
|
data/lib/wco_hosting.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wco_hosting
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.0.
|
4
|
+
version: 0.0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Pudeyev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -39,19 +39,19 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 6.3.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: sass-rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: '5.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: '5.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: devise
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -67,7 +67,21 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 4.9.3
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: cancancan
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 3.5.0
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 3.5.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: wco_models
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
87
|
- - "~>"
|
@@ -179,19 +193,19 @@ dependencies:
|
|
179
193
|
- !ruby/object:Gem::Version
|
180
194
|
version: 4.0.0
|
181
195
|
- !ruby/object:Gem::Dependency
|
182
|
-
name:
|
196
|
+
name: stripe
|
183
197
|
requirement: !ruby/object:Gem::Requirement
|
184
198
|
requirements:
|
185
199
|
- - "~>"
|
186
200
|
- !ruby/object:Gem::Version
|
187
|
-
version:
|
201
|
+
version: 10.4.0
|
188
202
|
type: :runtime
|
189
203
|
prerelease: false
|
190
204
|
version_requirements: !ruby/object:Gem::Requirement
|
191
205
|
requirements:
|
192
206
|
- - "~>"
|
193
207
|
- !ruby/object:Gem::Version
|
194
|
-
version:
|
208
|
+
version: 10.4.0
|
195
209
|
description: https://wasya.co
|
196
210
|
email:
|
197
211
|
- victor@wasya.co
|
@@ -202,6 +216,7 @@ files:
|
|
202
216
|
- README.txt
|
203
217
|
- Rakefile
|
204
218
|
- app/assets/config/wco_hosting_manifest.js
|
219
|
+
- app/assets/javascript/wco_hosting/application.js
|
205
220
|
- app/assets/stylesheets/wco_hosting/application.css
|
206
221
|
- app/assets/stylesheets/wco_hosting/main.scss
|
207
222
|
- app/controllers/wco_hosting/appliance_tmpls_controller.rb
|
@@ -209,13 +224,12 @@ files:
|
|
209
224
|
- app/controllers/wco_hosting/application_controller.rb
|
210
225
|
- app/controllers/wco_hosting/leadsets_controller.rb
|
211
226
|
- app/controllers/wco_hosting/serverhosts_controller.rb
|
212
|
-
- app/controllers/wco_hosting/
|
227
|
+
- app/controllers/wco_hosting/subscriptions_controller.rb
|
213
228
|
- app/helpers/wco_hosting/application_helper.rb
|
214
229
|
- app/jobs/wco_hosting/application_job.rb
|
215
230
|
- app/mailers/wco_hosting/application_mailer.rb
|
216
231
|
- app/models/wco/ability.rb
|
217
232
|
- app/views/layouts/wco_hosting/application.haml
|
218
|
-
- app/views/wco/application/_alerts_notices.haml
|
219
233
|
- app/views/wco_hosting/appliance_tmpls/_form.haml
|
220
234
|
- app/views/wco_hosting/appliance_tmpls/edit.haml
|
221
235
|
- app/views/wco_hosting/appliance_tmpls/index.haml
|
@@ -229,6 +243,7 @@ files:
|
|
229
243
|
- app/views/wco_hosting/serverhosts/edit.haml
|
230
244
|
- app/views/wco_hosting/serverhosts/index.haml
|
231
245
|
- app/views/wco_hosting/serverhosts/new.haml
|
246
|
+
- config/initializers/assets.rb
|
232
247
|
- config/routes.rb
|
233
248
|
- lib/tasks/wco_hosting_tasks.rake
|
234
249
|
- lib/wco_hosting.rb
|
@@ -1,19 +0,0 @@
|
|
1
|
-
|
2
|
-
class WcoHosting::SessionsController < WcoHosting::ApplicationController
|
3
|
-
|
4
|
-
skip_before_action :verify_authenticity_token, only: :create
|
5
|
-
|
6
|
-
def new
|
7
|
-
render :new
|
8
|
-
end
|
9
|
-
|
10
|
-
def create
|
11
|
-
puts! params, '#create'
|
12
|
-
|
13
|
-
user_info = request.env['omniauth.auth']
|
14
|
-
puts! user_info, 'user_info'
|
15
|
-
|
16
|
-
render json: { status: :ok }
|
17
|
-
end
|
18
|
-
|
19
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
|
2
|
-
.row.max-width
|
3
|
-
.col-sm-12
|
4
|
-
- if notice&.class == String
|
5
|
-
.notice
|
6
|
-
= notice
|
7
|
-
.close [x]
|
8
|
-
- if notice&.class == Array
|
9
|
-
- notice.each do |i|
|
10
|
-
.notice
|
11
|
-
= i
|
12
|
-
.close [x]
|
13
|
-
- if alert&.class == String
|
14
|
-
.alert
|
15
|
-
= alert
|
16
|
-
.close [x]
|
17
|
-
- if alert&.class == Array
|
18
|
-
- alert.each do |i|
|
19
|
-
.alert
|
20
|
-
= i
|
21
|
-
.close [x]
|
22
|
-
|