wco_hosting 0.0.0.14 → 0.0.0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/wco_hosting/application.css +3 -11
- data/app/assets/stylesheets/wco_hosting/dark_theme.scss +16 -0
- data/app/controllers/wco_hosting/appliance_tmpls_controller.rb +24 -6
- data/app/controllers/wco_hosting/appliances_controller.rb +4 -4
- data/app/controllers/wco_hosting/domains_controller.rb +26 -0
- data/app/views/wco_hosting/_main_header.haml +1 -0
- data/app/views/wco_hosting/appliance_tmpls/_form.haml +19 -6
- data/app/views/wco_hosting/appliance_tmpls/edit.haml +25 -0
- data/app/views/wco_hosting/appliance_tmpls/index.haml +10 -6
- data/app/views/wco_hosting/appliances/edit.haml +32 -0
- data/app/views/wco_hosting/appliances/index.haml +12 -8
- data/app/views/wco_hosting/domains/_form.haml +15 -0
- data/app/views/wco_hosting/domains/edit.haml +3 -0
- data/app/views/wco_hosting/domains/index.haml +19 -0
- data/config/routes.rb +3 -1
- metadata +9 -4
- data/app/jobs/wco_hosting/application_job.rb +0 -4
- /data/app/controllers/wco_hosting/{leadsets_controller.rb → leadsets_controller.rb-trash} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e8cd038e6c0f50d7ff2b9924ee4f5055cd4bf89226b024d6c1d667c8e333b91
|
4
|
+
data.tar.gz: 646e87a7a35871573091fe37f5c6b058b8cd42a11b510fbcaef0886ad7045c20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20ebefc88ece17a4085c6f5d4fafb591b0b631a3af0b358417ea8ba79de0a46c63d85bde19f505c55d2eab30417b8fbd09f2cfb5b28db550c75773cb04c65561
|
7
|
+
data.tar.gz: c5483447b17ea644f8174ad378d1a64dbe514d127b592a0b890fadd8c480944a53b3ef2cdf9bb5ec0428e15e295ebafb7849f5e6101042f71db80d8e05c7be55
|
@@ -1,15 +1,7 @@
|
|
1
1
|
/*
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
-
* listed below.
|
4
2
|
*
|
5
|
-
|
6
|
-
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
3
|
+
*= require ./main
|
7
4
|
*
|
8
|
-
*
|
9
|
-
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
|
10
|
-
* files in this directory. Styles in this file should be added after the last require_* statement.
|
11
|
-
* It is generally better to create a new file per style scope.
|
5
|
+
* require ./dark_theme
|
12
6
|
*
|
13
|
-
|
14
|
-
*= require_self
|
15
|
-
*/
|
7
|
+
**/
|
@@ -4,6 +4,8 @@ class WcoHosting::ApplianceTmplsController < WcoHosting::ApplicationController
|
|
4
4
|
before_action :set_lists
|
5
5
|
|
6
6
|
def create
|
7
|
+
# params[:tmpl][:leadset_ids].delete ''
|
8
|
+
|
7
9
|
@appliance_tmpl = WcoHosting::ApplianceTmpl.new params[:tmpl].permit!
|
8
10
|
authorize! :create, @appliance_tmpl
|
9
11
|
|
@@ -17,6 +19,18 @@ class WcoHosting::ApplianceTmplsController < WcoHosting::ApplicationController
|
|
17
19
|
end
|
18
20
|
end
|
19
21
|
|
22
|
+
def destroy
|
23
|
+
@appliance_tmpl = WcoHosting::ApplianceTmpl.find params[:id]
|
24
|
+
authorize! :destroy, @appliance_tmpl
|
25
|
+
flag = @appliance_tmpl.delete
|
26
|
+
if flag
|
27
|
+
flash_notice 'ok'
|
28
|
+
else
|
29
|
+
flash_alert @appliance_tmpl
|
30
|
+
end
|
31
|
+
redirect_to action: 'index'
|
32
|
+
end
|
33
|
+
|
20
34
|
def edit
|
21
35
|
@appliance_tmpl = WcoHosting::ApplianceTmpl.find params[:id]
|
22
36
|
authorize! :edit, @appliance_tmpl
|
@@ -33,15 +47,17 @@ class WcoHosting::ApplianceTmplsController < WcoHosting::ApplicationController
|
|
33
47
|
end
|
34
48
|
|
35
49
|
def update
|
50
|
+
# params[:tmpl][:leadset_ids].delete ''
|
51
|
+
|
36
52
|
@appliance_tmpl = WcoHosting::ApplianceTmpl.find params[:id]
|
37
53
|
authorize! :update, @appliance_tmpl
|
38
54
|
|
39
|
-
price = Wco::Price.find( params[:tmpl][:price] )
|
40
|
-
price.product = @appliance_tmpl
|
41
|
-
price.save
|
55
|
+
# price = Wco::Price.find( params[:tmpl][:price] )
|
56
|
+
# price.product = @appliance_tmpl
|
57
|
+
# price.save
|
42
58
|
|
43
|
-
params[:tmpl][:price_id] = price.price_id
|
44
|
-
params[:tmpl][:price] = price
|
59
|
+
# params[:tmpl][:price_id] = price.price_id
|
60
|
+
# params[:tmpl][:price] = price
|
45
61
|
|
46
62
|
flag = @appliance_tmpl.update params[:tmpl].permit!
|
47
63
|
if flag
|
@@ -58,8 +74,10 @@ class WcoHosting::ApplianceTmplsController < WcoHosting::ApplicationController
|
|
58
74
|
private
|
59
75
|
|
60
76
|
def set_lists
|
61
|
-
|
77
|
+
@leadsets = Wco::Leadset.all
|
78
|
+
@leadsets_list = Wco::Leadset.list
|
62
79
|
@new_appliance_tmpl = WcoHosting::ApplianceTmpl.new
|
80
|
+
# @profiles_list = Wco::Profile.list
|
63
81
|
end
|
64
82
|
|
65
83
|
end
|
@@ -6,10 +6,10 @@ class WcoHosting::AppliancesController < WcoHosting::ApplicationController
|
|
6
6
|
@appliances = WcoHosting::Appliance.all
|
7
7
|
end
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
def edit
|
10
|
+
@appliance = WcoHosting::Appliance.find params[:id]
|
11
|
+
authorize! :edit, @appliance
|
12
|
+
end
|
13
13
|
|
14
14
|
# def update
|
15
15
|
# @serverhost = WcoHosting::Serverhost.find params[:id]
|
@@ -0,0 +1,26 @@
|
|
1
|
+
|
2
|
+
class WcoHosting::DomainsController < WcoHosting::ApplicationController
|
3
|
+
|
4
|
+
def index
|
5
|
+
authorize! :index, WcoHosting::Domain
|
6
|
+
@domains = WcoHosting::Domain.all
|
7
|
+
end
|
8
|
+
|
9
|
+
def edit
|
10
|
+
@domain = WcoHosting::Domain.find params[:id]
|
11
|
+
authorize! :edit, @domain
|
12
|
+
end
|
13
|
+
|
14
|
+
def update
|
15
|
+
@domain = WcoHosting::Domain.find params[:id]
|
16
|
+
authorize! :update, @domain
|
17
|
+
if @domain.update_attributes( params[:domain].permit! )
|
18
|
+
flash_notice @domain
|
19
|
+
else
|
20
|
+
flash_alert @domain
|
21
|
+
end
|
22
|
+
redirect_to action: :index
|
23
|
+
end
|
24
|
+
|
25
|
+
|
26
|
+
end
|
@@ -3,9 +3,15 @@
|
|
3
3
|
|
4
4
|
.appliance-tmpls--form
|
5
5
|
= form_for appliance_tmpl, as: :tmpl, url: url do |f|
|
6
|
+
.actions
|
7
|
+
= f.submit 'Submit'
|
8
|
+
|
9
|
+
|
10
|
+
-# = f.select :leadset_ids, options_for_select( @leadsets_list, selected: appliance_tmpl.leadset_ids ), {}, { multiple: true }
|
11
|
+
|
6
12
|
.d-flex
|
7
13
|
= f.label :kind
|
8
|
-
= f.text_field :kind
|
14
|
+
= f.text_field :kind, style: 'flex-grow: 1'
|
9
15
|
|
10
16
|
= f.label :version
|
11
17
|
= f.text_field :version
|
@@ -18,13 +24,20 @@
|
|
18
24
|
.field
|
19
25
|
%label volume_zip
|
20
26
|
= f.text_field :volume_zip, class: 'w-100'
|
21
|
-
.field
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
27
|
+
-# .field
|
28
|
+
-# %label Price in Cents
|
29
|
+
-# = f.number_field :tmp_price_cents
|
30
|
+
-# %label Price interval
|
31
|
+
-# = f.select :tmp_price_interval, options_for_select( Wco::Price::INTERVALS ), class: 'select2'
|
26
32
|
|
27
33
|
.actions
|
28
34
|
= f.submit 'Submit'
|
29
35
|
|
36
|
+
.prices
|
37
|
+
%label Prices
|
38
|
+
%ul
|
39
|
+
- appliance_tmpl.prices.each do |price|
|
40
|
+
%li= price.inspect
|
41
|
+
|
42
|
+
|
30
43
|
= appliance_tmpl.inspect
|
@@ -1,4 +1,29 @@
|
|
1
1
|
|
2
2
|
.appliance-tmpls-edit.maxwidth
|
3
3
|
%h5 Edit ApplianceTmpl `#{@appliance_tmpl}`
|
4
|
+
|
5
|
+
.field
|
6
|
+
%h5 Customers
|
7
|
+
%ul
|
8
|
+
- @leadsets.each do |leadset|
|
9
|
+
- price = leadset.appliance_tmpl_prices.where( product: @appliance_tmpl ).first
|
10
|
+
- price ||= Wco::Price.new({ product: @appliance_tmpl, appliance_tmpl_leadset: leadset })
|
11
|
+
- url = price.new_record? ? wco.prices_path : wco.price_path(price)
|
12
|
+
%li
|
13
|
+
= form_for price, url: url do |f|
|
14
|
+
= hidden_field_tag 'price[product_id]', price.product_id
|
15
|
+
= hidden_field_tag 'price[product_type]', price.product_type
|
16
|
+
= hidden_field_tag 'price[appliance_tmpl_leadset_id]', leadset.id
|
17
|
+
.d-flex
|
18
|
+
%b= leadset
|
19
|
+
|
20
|
+
%label Amount Cents
|
21
|
+
= f.number_field :amount_cents
|
22
|
+
%label interval
|
23
|
+
= f.select :interval, options_for_select( Wco::Price::INTERVALS ), class: 'select2'
|
24
|
+
= f.submit '>'
|
25
|
+
|
26
|
+
.gray= price.price_id || 'nil'
|
27
|
+
%hr
|
28
|
+
|
4
29
|
= render 'form', appliance_tmpl: @appliance_tmpl
|
@@ -11,7 +11,7 @@
|
|
11
11
|
%th version
|
12
12
|
%th image
|
13
13
|
%th volume_zip
|
14
|
-
%th
|
14
|
+
%th prices
|
15
15
|
|
16
16
|
- @appliance_tmpls.each do |tmpl|
|
17
17
|
%tr
|
@@ -22,9 +22,13 @@
|
|
22
22
|
%td= tmpl.image
|
23
23
|
%td= tmpl.volume_zip
|
24
24
|
%td
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
25
|
+
%ul
|
26
|
+
- tmpl.prices.each do |price|
|
27
|
+
%li
|
28
|
+
.d-flex
|
29
|
+
= button_to 'x', wco.price_path(price), method: :delete, data: { confirm: 'Are you sure?' }
|
30
|
+
= price
|
31
|
+
.gray.mini= price.price_id
|
32
|
+
-# %td
|
33
|
+
-# %td{ colspan: 6 }= tmpl.inspect
|
30
34
|
|
@@ -0,0 +1,32 @@
|
|
1
|
+
|
2
|
+
.appliances-edit.maxwidth
|
3
|
+
%h5 Appliance `#{@appliance}`
|
4
|
+
|
5
|
+
= form_for @appliance do |f|
|
6
|
+
.actions
|
7
|
+
= f.submit
|
8
|
+
.field
|
9
|
+
%label.bold Leadset:
|
10
|
+
= link_to @appliance.leadset, wco.leadset_path(@appliance.leadset)
|
11
|
+
.field
|
12
|
+
%label.bold Env:
|
13
|
+
= @appliance.environment
|
14
|
+
.field
|
15
|
+
%label.bold Tmpl:
|
16
|
+
= @appliance.appliance_tmpl
|
17
|
+
|
18
|
+
.actions
|
19
|
+
= f.submit
|
20
|
+
|
21
|
+
.logs
|
22
|
+
%h5 Logs
|
23
|
+
%ul
|
24
|
+
- @appliance.logs.each do |log|
|
25
|
+
%li
|
26
|
+
= log.created_at
|
27
|
+
%b= log.label
|
28
|
+
%pre.descr= log.message
|
29
|
+
|
30
|
+
= @appliance.inspect
|
31
|
+
|
32
|
+
|
@@ -1,21 +1,25 @@
|
|
1
1
|
|
2
|
-
.appliances-index
|
2
|
+
.appliances-index.maxwidth
|
3
3
|
%h5 Appliances
|
4
4
|
|
5
|
-
%table.bordered
|
5
|
+
%table.bordered.data-table
|
6
6
|
%tr
|
7
|
-
%th
|
7
|
+
%th
|
8
|
+
%th created_at
|
8
9
|
%th tmpl
|
9
10
|
%th host
|
10
11
|
%th service_name
|
11
|
-
|
12
|
+
|
12
13
|
- @appliances.each do |app|
|
13
14
|
%tr
|
14
|
-
%td
|
15
|
-
|
15
|
+
%td
|
16
|
+
= link_to '[~]', edit_appliance_path(app)
|
17
|
+
-# = link_to '[view]', appliance_path(app)
|
18
|
+
.gray.mini= app.id
|
19
|
+
%td
|
20
|
+
= app.created_at
|
21
|
+
%td= app.tmpl
|
16
22
|
%td= app.host
|
17
23
|
%td= app.service_name
|
18
|
-
%td
|
19
|
-
= app.inspect
|
20
24
|
|
21
25
|
|
@@ -0,0 +1,19 @@
|
|
1
|
+
|
2
|
+
.domains-index.maxwidth
|
3
|
+
%h5 Domains
|
4
|
+
|
5
|
+
%table.bordered
|
6
|
+
%thead
|
7
|
+
%td
|
8
|
+
%td name
|
9
|
+
%td status
|
10
|
+
-# %td
|
11
|
+
|
12
|
+
- @domains.each do |dom|
|
13
|
+
%tr
|
14
|
+
%td
|
15
|
+
= link_to '[~]', edit_domain_path(dom)
|
16
|
+
%td
|
17
|
+
= dom.name
|
18
|
+
%td= dom.status
|
19
|
+
-# %td= dom.inspect
|
data/config/routes.rb
CHANGED
@@ -5,11 +5,13 @@ WcoHosting::Engine.routes.draw do
|
|
5
5
|
resources :appliance_tmpls
|
6
6
|
resources :appliances
|
7
7
|
|
8
|
+
resources :domains
|
9
|
+
|
8
10
|
# get 'email_conversations/in/:tagname', to: '/wco/email_conversations#index', as: :email_conversations_in
|
9
11
|
# get 'email_conversations/not-in/:tagname_not', to: '/wco/email_conversations#index', as: :email_conversations_in_not
|
10
12
|
# resources :email_conversations
|
11
13
|
|
12
|
-
resources :leadsets
|
14
|
+
# resources :leadsets
|
13
15
|
|
14
16
|
resources :serverhosts
|
15
17
|
|
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.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Pudeyev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02-
|
11
|
+
date: 2024-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cancancan
|
@@ -232,15 +232,16 @@ files:
|
|
232
232
|
- app/assets/config/wco_hosting_manifest.js
|
233
233
|
- app/assets/javascript/wco_hosting/application.js
|
234
234
|
- app/assets/stylesheets/wco_hosting/application.css
|
235
|
+
- app/assets/stylesheets/wco_hosting/dark_theme.scss
|
235
236
|
- app/assets/stylesheets/wco_hosting/main.scss
|
236
237
|
- app/controllers/wco_hosting/appliance_tmpls_controller.rb
|
237
238
|
- app/controllers/wco_hosting/appliances_controller.rb
|
238
239
|
- app/controllers/wco_hosting/application_controller.rb
|
239
|
-
- app/controllers/wco_hosting/
|
240
|
+
- app/controllers/wco_hosting/domains_controller.rb
|
241
|
+
- app/controllers/wco_hosting/leadsets_controller.rb-trash
|
240
242
|
- app/controllers/wco_hosting/serverhosts_controller.rb
|
241
243
|
- app/controllers/wco_hosting/subscriptions_controller.rb
|
242
244
|
- app/helpers/wco_hosting/application_helper.rb
|
243
|
-
- app/jobs/wco_hosting/application_job.rb
|
244
245
|
- app/mailers/wco_hosting/application_mailer.rb
|
245
246
|
- app/views/layouts/wco_hosting/application.haml
|
246
247
|
- app/views/wco_hosting/_main_header.haml
|
@@ -248,8 +249,12 @@ files:
|
|
248
249
|
- app/views/wco_hosting/appliance_tmpls/edit.haml
|
249
250
|
- app/views/wco_hosting/appliance_tmpls/index.haml
|
250
251
|
- app/views/wco_hosting/appliance_tmpls/new.haml
|
252
|
+
- app/views/wco_hosting/appliances/edit.haml
|
251
253
|
- app/views/wco_hosting/appliances/index.haml
|
252
254
|
- app/views/wco_hosting/application/home.haml
|
255
|
+
- app/views/wco_hosting/domains/_form.haml
|
256
|
+
- app/views/wco_hosting/domains/edit.haml
|
257
|
+
- app/views/wco_hosting/domains/index.haml
|
253
258
|
- app/views/wco_hosting/leadsets/_form.haml
|
254
259
|
- app/views/wco_hosting/leadsets/index.haml
|
255
260
|
- app/views/wco_hosting/leadsets/show.haml
|
File without changes
|