wco_hosting 0.0.0.17 → 0.0.0.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 925161dea305615f15641b1d225e64ed138116934c5b47cf10c202519b76020d
4
- data.tar.gz: 97db1e81f6629066cbe060c03ee2b49a3e4094f61feecdce4eb14d5813dda266
3
+ metadata.gz: 0a833374d68bff85c800bfbd5eec19de231e7182a704d7b5fc76e1fccc5b9431
4
+ data.tar.gz: 10d188ae205ccd47288f5227eb89241ad8b2f510a64df6d96267e125e65dfbe4
5
5
  SHA512:
6
- metadata.gz: 2d0e22a2fdc1b9b025472b4f6a23e7b141efeaac2b7ad3df8ae45036d38cdaec820b6df70c7419249c1712964cc62b48af2a5d7f1e338fd247a547e0553ec6a6
7
- data.tar.gz: c7d4a7ba01588caf892f0386e4e7f74f45425d377a13cf010b66e790225915a9de63f4cd38ae1ab4102c77d2602f1ae82dd5a00ad5272fa5c42913a887e169f4
6
+ metadata.gz: 0136b005bbb91977057e15461a83518fa49e4f80c8bf8d16444e4ce25a2e5518e1544c1d3c28c7be139199d39136f146bbdfa28b5cb62a57d3223e54a250ff42
7
+ data.tar.gz: 3f9640501dd2a70d9419c82d6e92f221b91ba05095bdba7f5abe926d0cf52b02505c9930c7b8bc5bd1bdd4951247b82e9a1bb4353058e623ba0eb0601d5e90e8
@@ -11,6 +11,11 @@ class WcoHosting::AppliancesController < WcoHosting::ApplicationController
11
11
  authorize! :edit, @appliance
12
12
  end
13
13
 
14
+ def show
15
+ @appliance = WcoHosting::Appliance.find params[:id]
16
+ authorize! :show, @appliance
17
+ end
18
+
14
19
  # def update
15
20
  # @serverhost = WcoHosting::Serverhost.find params[:id]
16
21
  # authorize! :update, @serverhost
@@ -1,7 +1,5 @@
1
1
 
2
- class WcoHosting::ApplicationController < ActionController::Base
3
-
4
- check_authorization
2
+ class WcoHosting::ApplicationController < Wco::ApplicationController
5
3
 
6
4
  def home
7
5
  authorize! :index, ::WcoHosting::Appliance
@@ -11,6 +11,12 @@ class WcoHosting::DomainsController < WcoHosting::ApplicationController
11
11
  authorize! :edit, @domain
12
12
  end
13
13
 
14
+ def show
15
+ @domain = WcoHosting::Domain.find params[:id]
16
+ authorize! :show, @domain
17
+ @subdomains = WcoHosting::Appliance.where( domain: @domain.name ).map( &:subdomain )
18
+ end
19
+
14
20
  def update
15
21
  @domain = WcoHosting::Domain.find params[:id]
16
22
  authorize! :update, @domain
@@ -4,6 +4,24 @@
4
4
  %meta{content: "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}
5
5
  %title Wco Hosting
6
6
 
7
+ = javascript_include_tag "//code.jquery.com/jquery-3.3.1.min.js"
8
+
9
+ = javascript_include_tag "//cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"
10
+ = stylesheet_link_tag "//cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css"
11
+
12
+ = stylesheet_link_tag "//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css", :media => 'all'
13
+ = stylesheet_link_tag "//fonts.googleapis.com/icon?family=Material+Icons"
14
+
15
+ = stylesheet_link_tag "//cdn.jsdelivr.net/npm/bootstrap@4.3.1/dist/css/bootstrap.min.css"
16
+ = javascript_include_tag "//cdn.jsdelivr.net/npm/popper.js@1.14.7/dist/umd/popper.min.js"
17
+ = javascript_include_tag "//cdn.jsdelivr.net/npm/bootstrap@4.3.1/dist/js/bootstrap.min.js"
18
+
19
+ = stylesheet_link_tag "//cdn.jsdelivr.net/npm/select2@4.0.0/dist/css/select2.min.css"
20
+ = javascript_include_tag "//cdn.jsdelivr.net/npm/select2@4.0.0/dist/js/select2.min.js", defer: 'defer'
21
+
22
+ = stylesheet_link_tag "//cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.css"
23
+ = javascript_include_tag "//cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.js"
24
+
7
25
  = javascript_include_tag "wco/application"
8
26
  = stylesheet_link_tag "wco/application", media: "all"
9
27
 
@@ -25,3 +43,6 @@
25
43
  %script{:src => "https://js.stripe.com/v3/"}
26
44
  :javascript
27
45
  stripe = Stripe('#{::STRIPE_PK}', { apiVersion: '2020-08-27' });
46
+
47
+ = render '/wco/main_footer'
48
+ = render '/wco_email/analytics' if Rails.env.production?
@@ -5,10 +5,6 @@
5
5
  = form_for appliance_tmpl, as: :tmpl, url: url do |f|
6
6
  .actions
7
7
  = f.submit 'Submit'
8
-
9
-
10
- -# = f.select :leadset_ids, options_for_select( @leadsets_list, selected: appliance_tmpl.leadset_ids ), {}, { multiple: true }
11
-
12
8
  .d-flex
13
9
  = f.label :kind
14
10
  = f.text_field :kind, style: 'flex-grow: 1'
@@ -24,20 +20,5 @@
24
20
  .field
25
21
  %label volume_zip
26
22
  = f.text_field :volume_zip, class: 'w-100'
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'
32
-
33
23
  .actions
34
- = f.submit 'Submit'
35
-
36
- .prices
37
- %label Prices
38
- %ul
39
- - appliance_tmpl.prices.each do |price|
40
- %li= price.inspect
41
-
42
-
43
- = appliance_tmpl.inspect
24
+ = f.submit 'Submit'
@@ -2,28 +2,6 @@
2
2
  .appliance-tmpls-edit.maxwidth
3
3
  %h5 Edit ApplianceTmpl `#{@appliance_tmpl}`
4
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
- &nbsp;
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
- &nbsp;
26
- .gray= price.price_id || 'nil'
27
- %hr
5
+
28
6
 
29
7
  = render 'form', appliance_tmpl: @appliance_tmpl
@@ -22,6 +22,8 @@
22
22
  %td= tmpl.image
23
23
  %td= tmpl.volume_zip
24
24
  %td
25
+ %b Product:
26
+ .gray= tmpl.product_id
25
27
  %ul
26
28
  - tmpl.prices.each do |price|
27
29
  %li
@@ -3,23 +3,25 @@
3
3
  %h5 Appliances
4
4
 
5
5
  %table.bordered.data-table
6
- %tr
7
- %th &nbsp;
8
- %th created_at
9
- %th tmpl
10
- %th host
11
- %th service_name
6
+ %thead
7
+ %td &nbsp;
8
+ %td created_at
9
+ %td tmpl
10
+ %td host
11
+ %td service_name
12
+ %td port
12
13
 
13
14
  - @appliances.each do |app|
14
15
  %tr
15
16
  %td
16
17
  = link_to '[~]', edit_appliance_path(app)
17
18
  -# = link_to '[view]', appliance_path(app)
18
- .gray.mini= app.id
19
+ .gray.mini= link_to app.id, appliance_path(app)
19
20
  %td
20
21
  = app.created_at
21
22
  %td= app.tmpl
22
23
  %td= app.host
23
24
  %td= app.service_name
25
+ %td= app.port
24
26
 
25
27
 
@@ -0,0 +1,27 @@
1
+
2
+ .appliances-edit.maxwidth
3
+ %h5 Appliance `#{@appliance}`
4
+
5
+ %ul
6
+ %li
7
+ %label.bold Leadset:
8
+ = link_to @appliance.leadset, wco.leadset_path(@appliance.leadset)
9
+ %li
10
+ %label.bold Env:
11
+ = @appliance.environment
12
+ %li
13
+ %label.bold Tmpl:
14
+ = @appliance.appliance_tmpl
15
+
16
+ .logs
17
+ %h5 Logs
18
+ %ul
19
+ - @appliance.logs.each do |log|
20
+ %li
21
+ = log.created_at
22
+ %b= log.label
23
+ %pre.descr= log.message
24
+
25
+ = @appliance.inspect
26
+
27
+
@@ -14,6 +14,6 @@
14
14
  %td
15
15
  = link_to '[~]', edit_domain_path(dom)
16
16
  %td
17
- = dom.name
17
+ = link_to dom.name, domain_path(dom)
18
18
  %td= dom.status
19
19
  -# %td= dom.inspect
@@ -0,0 +1,7 @@
1
+
2
+ .domains-show
3
+ %h5 Domain `#{@domain}`
4
+
5
+ %ul
6
+ - @subdomains.each do |sub|
7
+ %li= sub
@@ -7,16 +7,17 @@
7
7
  %table.bordered
8
8
  %tr
9
9
  %th name
10
- %th next_port
11
- %th public_ip
12
10
  %th ssh_host
11
+ %th public_ip
12
+ %th next_port
13
13
  -# %td &nbsp;
14
- - @serverhosts.each do |s|
14
+ - @serverhosts.each do |ser|
15
15
  %tr
16
16
  %td
17
- = link_to s.name, edit_serverhost_path(s)
18
- %td= s.ssh_host
19
- %td= s.next_port
20
- %td= s.public_ip
21
- -# %td= s.inspect
17
+ = link_to '[~]', edit_serverhost_path(ser)
18
+ = ser.name
19
+ %td= ser.ssh_host
20
+ %td= ser.public_ip
21
+ %td= ser.next_port
22
+ -# %td= ser.inspect
22
23
 
@@ -1,4 +1,10 @@
1
1
 
2
2
  Rails.application.config.assets.version = '1.0'
3
3
 
4
- Rails.application.config.assets.precompile += %w( application.js application.css )
4
+ Rails.application.config.assets.precompile += %w(
5
+ wco_models/application.js
6
+ wco_models/application.css
7
+
8
+ application.js
9
+ application.css
10
+ );
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.17
4
+ version: 0.0.0.19
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-14 00:00:00.000000000 Z
11
+ date: 2024-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cancancan
@@ -249,10 +249,12 @@ files:
249
249
  - app/views/wco_hosting/appliance_tmpls/new.haml
250
250
  - app/views/wco_hosting/appliances/edit.haml
251
251
  - app/views/wco_hosting/appliances/index.haml
252
+ - app/views/wco_hosting/appliances/show.haml
252
253
  - app/views/wco_hosting/application/home.haml
253
254
  - app/views/wco_hosting/domains/_form.haml
254
255
  - app/views/wco_hosting/domains/edit.haml
255
256
  - app/views/wco_hosting/domains/index.haml
257
+ - app/views/wco_hosting/domains/show.haml
256
258
  - app/views/wco_hosting/leadsets/_form.haml
257
259
  - app/views/wco_hosting/leadsets/index.haml
258
260
  - app/views/wco_hosting/leadsets/show.haml