foreman_datacenter 0.1.17 → 0.1.18
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 +4 -4
- data/app/controllers/foreman_datacenter/comments_controller.rb +18 -0
- data/app/models/foreman_datacenter/comment.rb +5 -0
- data/app/models/foreman_datacenter/device.rb +3 -0
- data/app/views/foreman_datacenter/comments/create.html.erb +2 -0
- data/app/views/foreman_datacenter/comments/edit.html.erb +3 -0
- data/app/views/foreman_datacenter/comments/new.html.erb +2 -0
- data/config/routes.rb +3 -0
- data/db/migrate/20170922110137_create_comments.rb +11 -0
- data/lib/foreman_datacenter/version.rb +1 -1
- metadata +7 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8352bba82a4ef07e0958ff9c75630adae67c8ee
|
4
|
+
data.tar.gz: 142eae2fa82b5b0cac2229c5a315ce38815d8c98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6619472342de107a5ca385befff75e630b9bca73781debc4b72ed47617c83c912202e9c7a9b459127fe29ac5c11927dacf655c054f795f45b45a58317790e91d
|
7
|
+
data.tar.gz: 5999ec8f590a3b7a16f88a98fcf05e59f644c457282494ed97d4a41c1fed24df1c163f6206e9834f7a6d28ba7c0a110dc240e3f233e26f1bf824783c053613a1
|
@@ -28,6 +28,9 @@ module ForemanDatacenter
|
|
28
28
|
has_one :management_device, :class_name => 'ForemanDatacenter::ManagementDevice'
|
29
29
|
has_one :site, :through => :rack
|
30
30
|
|
31
|
+
has_many :comments, :class_name => 'ForemanDatacenter::Comment',
|
32
|
+
dependent: :destroy
|
33
|
+
|
31
34
|
enum face: [:front, :rear]
|
32
35
|
enum side: [:left, :right, :full]
|
33
36
|
enum status: [:active, :offline]
|
data/config/routes.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
Foreman::Application.routes.draw do
|
2
|
+
|
2
3
|
# TODO: find a better way to do this
|
3
4
|
get 'datacenter/import_to_device', to: 'hosts#import_to_device',
|
4
5
|
as: 'import_to_device'
|
@@ -81,6 +82,8 @@ Foreman::Application.routes.draw do
|
|
81
82
|
resources :device_modules, except: [:show, :index], shallow: true
|
82
83
|
resources :management_devices, only: [:new, :create, :edit, :update, :destroy],
|
83
84
|
shallow: true
|
85
|
+
|
86
|
+
resources :comments, except: [:show, :index]
|
84
87
|
end
|
85
88
|
resources :device_interface_connections, only: [:index], path: 'connections' do
|
86
89
|
get :interfaces, on: :collection
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class CreateComments < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :comments do |t|
|
4
|
+
t.text :content
|
5
|
+
t.belongs_to :commentable, polymorphic: true
|
6
|
+
|
7
|
+
t.timestamps null: false
|
8
|
+
end
|
9
|
+
add_index :comments, [:commentable_id, :commentable_type]
|
10
|
+
end
|
11
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_datacenter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Ivanov
|
@@ -113,6 +113,7 @@ files:
|
|
113
113
|
- app/assets/javascripts/foreman_datacenter/shared.js
|
114
114
|
- app/assets/stylesheets/foreman_datacenter/device_interface_connections.css
|
115
115
|
- app/controllers/concerns/foreman_datacenter/hosts_controller_extensions.rb
|
116
|
+
- app/controllers/foreman_datacenter/comments_controller.rb
|
116
117
|
- app/controllers/foreman_datacenter/console_port_templates_controller.rb
|
117
118
|
- app/controllers/foreman_datacenter/console_ports_controller.rb
|
118
119
|
- app/controllers/foreman_datacenter/console_server_port_templates_controller.rb
|
@@ -151,6 +152,7 @@ files:
|
|
151
152
|
- app/helpers/foreman_datacenter/racks_helper.rb
|
152
153
|
- app/helpers/foreman_datacenter/shared_helper.rb
|
153
154
|
- app/models/concerns/foreman_datacenter/host_extensions.rb
|
155
|
+
- app/models/foreman_datacenter/comment.rb
|
154
156
|
- app/models/foreman_datacenter/console_port.rb
|
155
157
|
- app/models/foreman_datacenter/console_port_template.rb
|
156
158
|
- app/models/foreman_datacenter/console_server_port.rb
|
@@ -174,6 +176,9 @@ files:
|
|
174
176
|
- app/models/foreman_datacenter/rack.rb
|
175
177
|
- app/models/foreman_datacenter/rack_group.rb
|
176
178
|
- app/models/foreman_datacenter/site.rb
|
179
|
+
- app/views/foreman_datacenter/comments/create.html.erb
|
180
|
+
- app/views/foreman_datacenter/comments/edit.html.erb
|
181
|
+
- app/views/foreman_datacenter/comments/new.html.erb
|
177
182
|
- app/views/foreman_datacenter/console_port_templates/_form.html.erb
|
178
183
|
- app/views/foreman_datacenter/console_port_templates/new.html.erb
|
179
184
|
- app/views/foreman_datacenter/console_ports/_for_device.html.erb
|
@@ -317,6 +322,7 @@ files:
|
|
317
322
|
- db/migrate/20160920221011_remove_index_from_devices.rb
|
318
323
|
- db/migrate/20170824122025_add_side_to_device.rb
|
319
324
|
- db/migrate/20170918202630_add_racksize_to_device.rb
|
325
|
+
- db/migrate/20170922110137_create_comments.rb
|
320
326
|
- lib/foreman_datacenter.rb
|
321
327
|
- lib/foreman_datacenter/engine.rb
|
322
328
|
- lib/foreman_datacenter/version.rb
|