wco_hosting 0.0.0.23 → 0.0.0.26

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: cff885e1e36cf5412a159cd74c0b3cf7134ceb21ec3c8a3ba691c34ddb404746
4
- data.tar.gz: 133c12ae6f3f43365bec9df2bf249b206f9629f0854f1bb8e01369f07338b00c
3
+ metadata.gz: 94d1250ed739bbb7c84bd8b4a4a5242cac48a700a367d5d37ba15ec2801fd65f
4
+ data.tar.gz: f1f048e745653292ef32b83f04216f148bc3f44d418be39fcd3507447feb7283
5
5
  SHA512:
6
- metadata.gz: f4a953cd44c0f5937dac0a7f1f236f80c374fe824785468514cb678ac55d226c4023e1a62e37d376fda7c68b14a806d1d4114314c55b2253a551ecbe9bad76f3
7
- data.tar.gz: 700eebd07c51fb588669353e4899b3c07e706e3b852c751e74e3027d2d4ea1585b5d1c750fece28a2441c441fa1f3e79ca98267a1fcd40c453748b8ab2a202bf
6
+ metadata.gz: a727924cdeff8601df79753b10c262d48179078dca21d1ad7f2be286ef2f1b764ec5dc18b30c54875e0136cfcaff5dd06eb4ca7aeb76ae625426603adbdb4560
7
+ data.tar.gz: f030dce6e1e4024f2d0fc20acdf97f6778bc0a5b2a99e8e8d49d80963f3084f9987f64171830e419a18434b946cf6c76da7015b652f4c53ba0aeb4c2f80ed94c
@@ -28,3 +28,9 @@ table.bordered {
28
28
  }
29
29
  }
30
30
 
31
+
32
+ .appliance-tmpls--form {
33
+ textarea {
34
+ font-family: monospace;
35
+ }
36
+ }
@@ -12,7 +12,6 @@ class WcoHosting::AppliancesController < WcoHosting::ApplicationController
12
12
  end
13
13
 
14
14
  def new
15
-
16
15
  authorize! :new, @new_appliance
17
16
  end
18
17
 
@@ -21,16 +20,16 @@ class WcoHosting::AppliancesController < WcoHosting::ApplicationController
21
20
  authorize! :show, @appliance
22
21
  end
23
22
 
24
- # def update
25
- # @serverhost = WcoHosting::Serverhost.find params[:id]
26
- # authorize! :update, @serverhost
27
- # if @serverhost.update_attributes( params[:serverhost].permit! )
28
- # flash_notice @serverhost
29
- # else
30
- # flash_alert @serverhost
31
- # end
32
- # redirect_to action: :index
33
- # end
23
+ def update
24
+ @appliance = WcoHosting::Appliance.find params[:id]
25
+ authorize! :update, @appliance
26
+ if @appliance.update_attributes( params[:appliance].permit! )
27
+ flash_notice @appliance
28
+ else
29
+ flash_alert @appliance
30
+ end
31
+ redirect_to action: :index
32
+ end
34
33
 
35
34
  ##
36
35
  ## private
@@ -1,9 +1,17 @@
1
1
 
2
2
  class WcoHosting::DomainsController < WcoHosting::ApplicationController
3
3
 
4
- def index
5
- authorize! :index, WcoHosting::Domain
6
- @domains = WcoHosting::Domain.all
4
+ def create
5
+ @domain = WcoHosting::Domain.new params[:domain].permit!
6
+ authorize! :create, @domain
7
+
8
+ if @domain.save
9
+ flash_notice @domain
10
+ else
11
+ flash_alert @domain
12
+ end
13
+
14
+ redirect_to action: :index
7
15
  end
8
16
 
9
17
  def edit
@@ -11,6 +19,17 @@ class WcoHosting::DomainsController < WcoHosting::ApplicationController
11
19
  authorize! :edit, @domain
12
20
  end
13
21
 
22
+ def index
23
+ authorize! :index, WcoHosting::Domain
24
+ @domains = WcoHosting::Domain.all
25
+ end
26
+
27
+
28
+ def new
29
+ @domain = WcoHosting::Domain.new
30
+ authorize! :new, @domain
31
+ end
32
+
14
33
  def show
15
34
  @domain = WcoHosting::Domain.find params[:id]
16
35
  authorize! :show, @domain
@@ -1,9 +1,17 @@
1
1
 
2
2
  class WcoHosting::EnvironmentsController < WcoHosting::ApplicationController
3
3
 
4
- def index
5
- authorize! :index, WcoHosting::Environment
6
- @environments = WcoHosting::Environment.all
4
+ def create
5
+ @environment = WcoHosting::Environment.new params[:environment].permit!
6
+ authorize! :create, @environment
7
+
8
+ if @environment.save
9
+ flash_notice 'success'
10
+ else
11
+ flash_alert @environment
12
+ end
13
+
14
+ redirect_to action: :index
7
15
  end
8
16
 
9
17
  def edit
@@ -11,6 +19,17 @@ class WcoHosting::EnvironmentsController < WcoHosting::ApplicationController
11
19
  authorize! :edit, @environment
12
20
  end
13
21
 
22
+ def index
23
+ authorize! :index, WcoHosting::Environment
24
+ @environments = WcoHosting::Environment.all
25
+ end
26
+
27
+
28
+ def new
29
+ authorize! :new, WcoHosting::Environment
30
+ @environment = WcoHosting::Environment.new
31
+ end
32
+
14
33
  def show
15
34
  @environment = WcoHosting::Environment.find params[:id]
16
35
  authorize! :show, @environment
@@ -28,5 +47,10 @@ class WcoHosting::EnvironmentsController < WcoHosting::ApplicationController
28
47
  redirect_to action: :index
29
48
  end
30
49
 
50
+ private
51
+
52
+ def set_lists
53
+ @leadsets_list = Wco::Leadset.list
54
+ end
31
55
 
32
56
  end
@@ -34,7 +34,7 @@
34
34
  = render 'wco/main_header'
35
35
  = render "/wco_hosting/main_header"
36
36
 
37
- = render '/wco/alerts_notices'
37
+ = render '/wco/application/alerts_notices'
38
38
  %hr
39
39
 
40
40
  = yield
@@ -20,6 +20,11 @@
20
20
  = link_to 'Tasks/Agents', tasks_path
21
21
  &nbsp;
22
22
  = link_to '[+]', new_task_path
23
- %li= link_to 'Domains', domains_path
24
- %li= link_to 'Serverhosts', serverhosts_path
23
+ %li
24
+ = link_to 'Domains', domains_path
25
+ = link_to '[+]', new_domain_path
26
+ %li
27
+ = link_to 'Serverhosts', serverhosts_path
28
+ = link_to '[+]', new_serverhost_path
29
+
25
30
 
@@ -22,7 +22,7 @@
22
22
  .actions
23
23
  = f.submit 'Go'
24
24
  .d-flex
25
- %label kind (name)
25
+ %label kind
26
26
  = f.text_field :kind, style: 'flex-grow: 1'
27
27
  %label version
28
28
  = f.text_field :version
@@ -31,24 +31,32 @@
31
31
  .field
32
32
  = f.label :descr
33
33
  = f.text_area :descr
34
- .field
34
+ .a
35
35
  %label :ecs_task_definition_erb
36
36
  = f.text_area :ecs_task_definition_erb
37
37
 
38
+ .a
39
+ %label :docker_compose_erb
40
+ .comment
41
+ Available variables: @appliance ,
42
+ = f.text_area :docker_compose_erb
43
+
38
44
 
39
45
  .field
40
- = f.label :image
46
+ %label :image
41
47
  = f.text_field :image, class: 'w-100'
42
48
 
43
49
  .field
44
50
  %label volume_zip_url
45
51
  = f.text_field :volume_zip_url, class: 'w-100'
52
+
46
53
  .field
47
54
  %label volume_zip_exe
48
55
  = f.text_field :volume_zip_exe, class: 'w-100'
49
56
 
50
57
  .field
51
- %label deleted_at
58
+ %label :deleted_at
52
59
  = f.text_field :deleted_at
60
+
53
61
  .actions
54
62
  = f.submit 'Go'
@@ -1,4 +1,4 @@
1
1
 
2
- .appliance-tmpls-new
2
+ .appliance-tmpls-new.maxwidth
3
3
  %h5 New ApplianceTmpl `#{@appliance_tmpl}`
4
4
  = render 'form', appliance_tmpl: @appliance_tmpl
@@ -7,5 +7,8 @@
7
7
  .d-flex
8
8
  %label environment
9
9
  = f.select :environment_id, options_for_select( @environments_list, selected: appliance.environment_id ), {}, { class: 'select2' }
10
+ .field
11
+ %label slug
12
+ = f.text_field :slug
10
13
  .actions
11
14
  = f.submit 'Go'
@@ -1,32 +1,6 @@
1
1
 
2
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
3
+ %h5 Edit Appliance `#{@appliance}`
4
+ = render 'form', appliance: @appliance
31
5
 
32
6
 
@@ -12,6 +12,7 @@
12
12
  %td host
13
13
  -# %td service_name
14
14
  %td port
15
+ %td slug
15
16
 
16
17
  - @appliances.each do |app|
17
18
  %tr
@@ -25,5 +26,5 @@
25
26
  %td= app.host
26
27
  -# %td= app.service_name
27
28
  %td= app.port
28
-
29
+ %td= app.slug
29
30
 
@@ -0,0 +1,4 @@
1
+
2
+ .domains-new.maxwidth
3
+ %h5 New Domain
4
+ = render 'form', domain: @domain
@@ -0,0 +1,12 @@
1
+
2
+ .environments--form
3
+ = form_for environment do |f|
4
+ .field
5
+ %label for
6
+ = f.select :leadset_id, options_for_select(@leadsets_list, selected: environment.leadset_id || params[:leadset_id])
7
+ .field
8
+ %label Name
9
+ = f.text_field :name
10
+
11
+ .actions
12
+ = f.submit 'Submit'
@@ -0,0 +1,7 @@
1
+
2
+ .environments-index.maxwidth
3
+ %h5 Environments
4
+ %ul
5
+ - @environments.each do |env|
6
+
7
+ %li= env.inspect
@@ -0,0 +1,4 @@
1
+
2
+ .enrivonments-new.maxwidth
3
+ %h5 New Environment
4
+ = render 'form', environment: @environment
@@ -4,5 +4,4 @@ module WcoHosting; end
4
4
 
5
5
  class WcoHosting::Engine < ::Rails::Engine
6
6
  isolate_namespace WcoHosting
7
- # isolate_namespace Wco
8
7
  end
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.23
4
+ version: 0.0.0.26
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-04-13 00:00:00.000000000 Z
11
+ date: 2025-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cancancan
@@ -262,7 +262,11 @@ files:
262
262
  - app/views/wco_hosting/domains/_form.haml
263
263
  - app/views/wco_hosting/domains/edit.haml
264
264
  - app/views/wco_hosting/domains/index.haml
265
+ - app/views/wco_hosting/domains/new.haml
265
266
  - app/views/wco_hosting/domains/show.haml
267
+ - app/views/wco_hosting/environments/_form.haml
268
+ - app/views/wco_hosting/environments/index.haml
269
+ - app/views/wco_hosting/environments/new.haml
266
270
  - app/views/wco_hosting/files/_form.haml
267
271
  - app/views/wco_hosting/files/_table.haml
268
272
  - app/views/wco_hosting/files/edit.haml