foreman_datacenter 0.1.45 → 0.1.46
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/foreman_datacenter/device_roles.css +31 -0
- data/app/controllers/foreman_datacenter/comments_controller.rb +2 -2
- data/app/helpers/foreman_datacenter/application_helper.rb +26 -0
- data/app/models/foreman_datacenter/rack.rb +4 -0
- data/app/views/foreman_datacenter/comments/_comments.html.erb +1 -1
- data/app/views/foreman_datacenter/comments/create.html.erb +2 -0
- data/app/views/foreman_datacenter/comments/index.html.erb +9 -0
- data/app/views/foreman_datacenter/console_ports/index.html.erb +1 -1
- data/app/views/foreman_datacenter/device_interface_connections/index.html.erb +1 -1
- data/app/views/foreman_datacenter/device_roles/index.html.erb +2 -3
- data/app/views/foreman_datacenter/device_roles/show.html.erb +2 -2
- data/app/views/foreman_datacenter/device_roles/welcome.html.erb +13 -0
- data/app/views/foreman_datacenter/device_types/index.html.erb +2 -3
- data/app/views/foreman_datacenter/device_types/show.html.erb +9 -9
- data/app/views/foreman_datacenter/device_types/welcome.html.erb +13 -0
- data/app/views/foreman_datacenter/devices/index.html.erb +1 -1
- data/app/views/foreman_datacenter/devices/inventory.html.erb +2 -2
- data/app/views/foreman_datacenter/devices/show.html.erb +7 -7
- data/app/views/foreman_datacenter/devices/welcome.html.erb +13 -0
- data/app/views/foreman_datacenter/manufacturers/index.html.erb +2 -3
- data/app/views/foreman_datacenter/manufacturers/show.html.erb +2 -2
- data/app/views/foreman_datacenter/manufacturers/welcome.html.erb +13 -0
- data/app/views/foreman_datacenter/platforms/index.html.erb +2 -3
- data/app/views/foreman_datacenter/platforms/show.html.erb +2 -2
- data/app/views/foreman_datacenter/platforms/welcome.html.erb +13 -0
- data/app/views/foreman_datacenter/power_ports/index.html.erb +1 -1
- data/app/views/foreman_datacenter/rack_groups/index.html.erb +2 -3
- data/app/views/foreman_datacenter/rack_groups/show.html.erb +2 -2
- data/app/views/foreman_datacenter/rack_groups/welcome.html.erb +13 -0
- data/app/views/foreman_datacenter/racks/_device_position.html.erb +24 -27
- data/app/views/foreman_datacenter/racks/_unpositioned_devices.html.erb +20 -0
- data/app/views/foreman_datacenter/racks/index.html.erb +2 -3
- data/app/views/foreman_datacenter/racks/show.html.erb +12 -3
- data/app/views/foreman_datacenter/racks/welcome.html.erb +13 -0
- data/app/views/foreman_datacenter/sites/index.html.erb +2 -3
- data/app/views/foreman_datacenter/sites/show.html.erb +3 -3
- data/app/views/foreman_datacenter/sites/welcome.html.erb +13 -0
- data/app/views/hosts/import_to_device.html.erb +1 -1
- data/db/migrate/20160727161914_create_sites.rb +1 -1
- data/db/migrate/20160728123353_create_rack_groups.rb +1 -1
- data/db/migrate/20160728143149_create_racks.rb +1 -1
- data/db/migrate/20160728161636_create_platforms.rb +1 -1
- data/db/migrate/20160728162635_create_device_roles.rb +1 -1
- data/db/migrate/20160728163815_create_manufacturers.rb +1 -1
- data/db/migrate/20160728164858_create_device_types.rb +1 -1
- data/db/migrate/20160728171422_create_devices.rb +1 -1
- data/db/migrate/20160728194401_create_device_interfaces.rb +1 -1
- data/db/migrate/20160728195242_create_device_interface_connections.rb +1 -1
- data/db/migrate/20160804104103_create_interface_templates.rb +1 -1
- data/db/migrate/20160804142618_create_console_port_templates.rb +1 -1
- data/db/migrate/20160804164301_create_power_port_templates.rb +1 -1
- data/db/migrate/20160805080626_create_console_server_port_templates.rb +1 -1
- data/db/migrate/20160805084726_create_power_outlet_templates.rb +1 -1
- data/db/migrate/20160805100411_create_device_bay_templates.rb +1 -1
- data/db/migrate/20160809091611_create_device_bays.rb +1 -1
- data/db/migrate/20160809103211_create_power_outlets.rb +1 -1
- data/db/migrate/20160809104325_create_power_ports.rb +1 -1
- data/db/migrate/20160809112815_create_console_server_ports.rb +1 -1
- data/db/migrate/20160809113846_create_console_ports.rb +1 -1
- data/db/migrate/20160816224805_create_device_modules.rb +1 -1
- data/db/migrate/20160824212010_add_host_ref_to_devices.rb +1 -1
- data/db/migrate/20160828200938_add_ip_address_to_device_interfaces.rb +1 -1
- data/db/migrate/20160905211522_create_management_devices.rb +1 -1
- data/db/migrate/20160906205605_rename_field_in_management_devices.rb +1 -1
- data/db/migrate/20160909205537_add_name_index_to_racks.rb +1 -1
- data/db/migrate/20160920221011_remove_index_from_devices.rb +1 -1
- data/db/migrate/20170824122025_add_side_to_device.rb +1 -1
- data/db/migrate/20170918202630_add_racksize_to_device.rb +1 -1
- data/db/migrate/20170922110137_create_comments.rb +2 -2
- data/db/migrate/20170922174725_renaming_comments.rb +1 -1
- data/db/migrate/20170924194247_rename_device_comments_column.rb +1 -1
- data/db/migrate/20170929101032_add_parent_id_to_comments.rb +1 -1
- data/db/migrate/20171001130802_fix_parent_id_column_in_comments.rb +1 -1
- data/db/migrate/20171004221349_add_user_id_to_comments.rb +1 -1
- data/lib/foreman_datacenter/engine.rb +1 -1
- data/lib/foreman_datacenter/version.rb +1 -1
- data/lib/tasks/test_tasks.rake +13 -0
- data/test/controllers/foreman_datacenter/rack_groups_contoller_test.rb +91 -0
- data/test/controllers/foreman_datacenter/racks_contoller_test.rb +91 -0
- data/test/controllers/foreman_datacenter/sites_contoller_test.rb +91 -0
- data/test/fixtures/foreman_datacenter/rack_groups.yml +11 -0
- data/test/fixtures/foreman_datacenter/racks.yml +19 -0
- data/test/fixtures/foreman_datacenter/sites.yml +19 -0
- data/test/integration/foreman_datacenter/rack_group_test.rb +25 -0
- data/test/integration/foreman_datacenter/rack_test.rb +25 -0
- data/test/integration/foreman_datacenter/site_test.rb +29 -0
- metadata +34 -2
@@ -0,0 +1,19 @@
|
|
1
|
+
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
2
|
+
|
3
|
+
one:
|
4
|
+
id: 1
|
5
|
+
name: DC1
|
6
|
+
facility: test facility
|
7
|
+
asn: 1
|
8
|
+
physical_address: test physical address
|
9
|
+
shipping_address: test shipping address
|
10
|
+
comments: test comment
|
11
|
+
|
12
|
+
two:
|
13
|
+
id: 2
|
14
|
+
name: DC2
|
15
|
+
facility: another test facility
|
16
|
+
asn: 2
|
17
|
+
physical_address: another test physical address
|
18
|
+
shipping_address: another test shipping address
|
19
|
+
comments: another test comment
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'integration_test_helper'
|
2
|
+
|
3
|
+
module ForemanDatacenter
|
4
|
+
class RackGroupIntegrationTest < ActionDispatch::IntegrationTest
|
5
|
+
test "index page" do
|
6
|
+
assert_index_page(rack_groups_path,"Rack Groups","New Rack Group")
|
7
|
+
end
|
8
|
+
|
9
|
+
test "create new page" do
|
10
|
+
assert_new_button(rack_groups_path,"New Rack Group",new_rack_group_path)
|
11
|
+
fill_in "rack_group_name", :with => "Room 3"
|
12
|
+
fill_in "rack_group_site_id", :with => 1
|
13
|
+
assert_submit_button(rack_groups_path)
|
14
|
+
assert page.has_link? "Room 3"
|
15
|
+
end
|
16
|
+
|
17
|
+
test "edit page" do
|
18
|
+
visit rack_groups_path
|
19
|
+
click_link "Room 3"
|
20
|
+
fill_in "rack_group_name", :with => "Room4"
|
21
|
+
assert_submit_button(rack_groups_path)
|
22
|
+
assert page.has_link? "Room4"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'integration_test_helper'
|
2
|
+
|
3
|
+
module ForemanDatacenter
|
4
|
+
class RackIntegrationTest < ActionDispatch::IntegrationTest
|
5
|
+
test "index page" do
|
6
|
+
assert_index_page(racks_path,"Rack Groups","New Rack Group")
|
7
|
+
end
|
8
|
+
|
9
|
+
test "create new page" do
|
10
|
+
assert_new_button(rack_groups_path,"New Rack Group",new_rack_group_path)
|
11
|
+
fill_in "rack_group_name", :with => "Room 3"
|
12
|
+
fill_in "rack_group_site_id", :with => 1
|
13
|
+
assert_submit_button(rack_groups_path)
|
14
|
+
assert page.has_link? "Room 3"
|
15
|
+
end
|
16
|
+
|
17
|
+
test "edit page" do
|
18
|
+
visit rack_groups_path
|
19
|
+
click_link "Room 3"
|
20
|
+
fill_in "rack_group_name", :with => "Room4"
|
21
|
+
assert_submit_button(rack_groups_path)
|
22
|
+
assert page.has_link? "Room4"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'integration_test_helper'
|
2
|
+
|
3
|
+
module ForemanDatacenter
|
4
|
+
class SiteIntegrationTest < ActionDispatch::IntegrationTest
|
5
|
+
test "index page" do
|
6
|
+
assert_index_page(sites_path,"Sites","New Site")
|
7
|
+
end
|
8
|
+
|
9
|
+
test "create new page" do
|
10
|
+
assert_new_button(sites_path,"New Site",new_site_path)
|
11
|
+
fill_in "site_name", :with => "Site1"
|
12
|
+
fill_in "site_facility", :with => "test facility"
|
13
|
+
fill_in "site_asn", :with => 1
|
14
|
+
fill_in "site_physical_address", :with => "physical address"
|
15
|
+
fill_in "site_shipping_address", :with => "shipping address"
|
16
|
+
fill_in "site_comments", :with => "comments"
|
17
|
+
assert_submit_button(sites_path)
|
18
|
+
assert page.has_link? 'Site1'
|
19
|
+
end
|
20
|
+
|
21
|
+
test "edit page" do
|
22
|
+
visit sites_path
|
23
|
+
click_link "DC1"
|
24
|
+
fill_in "site_name", :with => "DC 1"
|
25
|
+
assert_submit_button(sites_path)
|
26
|
+
assert page.has_link? 'DC 1'
|
27
|
+
end
|
28
|
+
end
|
29
|
+
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.46
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Ivanov
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-02-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: deface
|
@@ -114,6 +114,7 @@ files:
|
|
114
114
|
- app/assets/javascripts/foreman_datacenter/shared.js
|
115
115
|
- app/assets/stylesheets/foreman_datacenter/comments.css
|
116
116
|
- app/assets/stylesheets/foreman_datacenter/device_interface_connections.css
|
117
|
+
- app/assets/stylesheets/foreman_datacenter/device_roles.css
|
117
118
|
- app/controllers/concerns/foreman_datacenter/hosts_controller_extensions.rb
|
118
119
|
- app/controllers/foreman_datacenter/comments_controller.rb
|
119
120
|
- app/controllers/foreman_datacenter/console_port_templates_controller.rb
|
@@ -139,6 +140,7 @@ files:
|
|
139
140
|
- app/controllers/foreman_datacenter/rack_groups_controller.rb
|
140
141
|
- app/controllers/foreman_datacenter/racks_controller.rb
|
141
142
|
- app/controllers/foreman_datacenter/sites_controller.rb
|
143
|
+
- app/helpers/foreman_datacenter/application_helper.rb
|
142
144
|
- app/helpers/foreman_datacenter/console_ports_helper.rb
|
143
145
|
- app/helpers/foreman_datacenter/console_server_ports_helper.rb
|
144
146
|
- app/helpers/foreman_datacenter/device_bays_helper.rb
|
@@ -182,7 +184,9 @@ files:
|
|
182
184
|
- app/views/foreman_datacenter/comments/_comments.html.erb
|
183
185
|
- app/views/foreman_datacenter/comments/_form.html.erb
|
184
186
|
- app/views/foreman_datacenter/comments/_item.html.erb
|
187
|
+
- app/views/foreman_datacenter/comments/create.html.erb
|
185
188
|
- app/views/foreman_datacenter/comments/edit.html.erb
|
189
|
+
- app/views/foreman_datacenter/comments/index.html.erb
|
186
190
|
- app/views/foreman_datacenter/comments/new.html.erb
|
187
191
|
- app/views/foreman_datacenter/console_port_templates/_form.html.erb
|
188
192
|
- app/views/foreman_datacenter/console_port_templates/new.html.erb
|
@@ -220,11 +224,13 @@ files:
|
|
220
224
|
- app/views/foreman_datacenter/device_roles/index.html.erb
|
221
225
|
- app/views/foreman_datacenter/device_roles/new.html.erb
|
222
226
|
- app/views/foreman_datacenter/device_roles/show.html.erb
|
227
|
+
- app/views/foreman_datacenter/device_roles/welcome.html.erb
|
223
228
|
- app/views/foreman_datacenter/device_types/_form.html.erb
|
224
229
|
- app/views/foreman_datacenter/device_types/edit.html.erb
|
225
230
|
- app/views/foreman_datacenter/device_types/index.html.erb
|
226
231
|
- app/views/foreman_datacenter/device_types/new.html.erb
|
227
232
|
- app/views/foreman_datacenter/device_types/show.html.erb
|
233
|
+
- app/views/foreman_datacenter/device_types/welcome.html.erb
|
228
234
|
- app/views/foreman_datacenter/devices/_console_port.html.erb
|
229
235
|
- app/views/foreman_datacenter/devices/_console_server_port.html.erb
|
230
236
|
- app/views/foreman_datacenter/devices/_device_bay.html.erb
|
@@ -243,6 +249,7 @@ files:
|
|
243
249
|
- app/views/foreman_datacenter/devices/inventory.html.erb
|
244
250
|
- app/views/foreman_datacenter/devices/new.html.erb
|
245
251
|
- app/views/foreman_datacenter/devices/show.html.erb
|
252
|
+
- app/views/foreman_datacenter/devices/welcome.html.erb
|
246
253
|
- app/views/foreman_datacenter/hosts/hosts/new_action.html.erb
|
247
254
|
- app/views/foreman_datacenter/hosts/new_action.html.erb
|
248
255
|
- app/views/foreman_datacenter/interface_templates/_form.html.erb
|
@@ -257,11 +264,13 @@ files:
|
|
257
264
|
- app/views/foreman_datacenter/manufacturers/index.html.erb
|
258
265
|
- app/views/foreman_datacenter/manufacturers/new.html.erb
|
259
266
|
- app/views/foreman_datacenter/manufacturers/show.html.erb
|
267
|
+
- app/views/foreman_datacenter/manufacturers/welcome.html.erb
|
260
268
|
- app/views/foreman_datacenter/platforms/_form.html.erb
|
261
269
|
- app/views/foreman_datacenter/platforms/edit.html.erb
|
262
270
|
- app/views/foreman_datacenter/platforms/index.html.erb
|
263
271
|
- app/views/foreman_datacenter/platforms/new.html.erb
|
264
272
|
- app/views/foreman_datacenter/platforms/show.html.erb
|
273
|
+
- app/views/foreman_datacenter/platforms/welcome.html.erb
|
265
274
|
- app/views/foreman_datacenter/power_outlet_templates/_form.html.erb
|
266
275
|
- app/views/foreman_datacenter/power_outlet_templates/new.html.erb
|
267
276
|
- app/views/foreman_datacenter/power_outlets/_for_device.html.erb
|
@@ -282,20 +291,24 @@ files:
|
|
282
291
|
- app/views/foreman_datacenter/rack_groups/index.html.erb
|
283
292
|
- app/views/foreman_datacenter/rack_groups/new.html.erb
|
284
293
|
- app/views/foreman_datacenter/rack_groups/show.html.erb
|
294
|
+
- app/views/foreman_datacenter/rack_groups/welcome.html.erb
|
285
295
|
- app/views/foreman_datacenter/racks/_device_position.html.erb
|
286
296
|
- app/views/foreman_datacenter/racks/_device_position.html.erb.back
|
287
297
|
- app/views/foreman_datacenter/racks/_form.html.erb
|
288
298
|
- app/views/foreman_datacenter/racks/_rack_groups.html.erb
|
299
|
+
- app/views/foreman_datacenter/racks/_unpositioned_devices.html.erb
|
289
300
|
- app/views/foreman_datacenter/racks/edit.html.erb
|
290
301
|
- app/views/foreman_datacenter/racks/index.html.erb
|
291
302
|
- app/views/foreman_datacenter/racks/new.html.erb
|
292
303
|
- app/views/foreman_datacenter/racks/show.html.erb
|
304
|
+
- app/views/foreman_datacenter/racks/welcome.html.erb
|
293
305
|
- app/views/foreman_datacenter/shared/_rack_device_select.html.erb
|
294
306
|
- app/views/foreman_datacenter/sites/_form.html.erb
|
295
307
|
- app/views/foreman_datacenter/sites/edit.html.erb
|
296
308
|
- app/views/foreman_datacenter/sites/index.html.erb
|
297
309
|
- app/views/foreman_datacenter/sites/new.html.erb
|
298
310
|
- app/views/foreman_datacenter/sites/show.html.erb
|
311
|
+
- app/views/foreman_datacenter/sites/welcome.html.erb
|
299
312
|
- app/views/hosts/import_to_device.html.erb
|
300
313
|
- config/routes.rb
|
301
314
|
- db/migrate/20160727161914_create_sites.rb
|
@@ -339,11 +352,21 @@ files:
|
|
339
352
|
- lib/foreman_datacenter/version.rb
|
340
353
|
- lib/tasks/devices_tasks.rake
|
341
354
|
- lib/tasks/foreman_datacenter_tasks.rake
|
355
|
+
- lib/tasks/test_tasks.rake
|
342
356
|
- locale/Makefile
|
343
357
|
- locale/en/foreman_datacenter.po
|
344
358
|
- locale/foreman_datacenter.pot
|
345
359
|
- locale/gemspec.rb
|
360
|
+
- test/controllers/foreman_datacenter/rack_groups_contoller_test.rb
|
361
|
+
- test/controllers/foreman_datacenter/racks_contoller_test.rb
|
362
|
+
- test/controllers/foreman_datacenter/sites_contoller_test.rb
|
346
363
|
- test/factories/foreman_datacenter_factories.rb
|
364
|
+
- test/fixtures/foreman_datacenter/rack_groups.yml
|
365
|
+
- test/fixtures/foreman_datacenter/racks.yml
|
366
|
+
- test/fixtures/foreman_datacenter/sites.yml
|
367
|
+
- test/integration/foreman_datacenter/rack_group_test.rb
|
368
|
+
- test/integration/foreman_datacenter/rack_test.rb
|
369
|
+
- test/integration/foreman_datacenter/site_test.rb
|
347
370
|
- test/test_plugin_helper.rb
|
348
371
|
- test/unit/foreman_datacenter_test.rb
|
349
372
|
homepage: https://github.com/cloudevelops/foreman_datacenter
|
@@ -372,4 +395,13 @@ summary: A plugin that lets you document your servers in a datacenter
|
|
372
395
|
test_files:
|
373
396
|
- test/unit/foreman_datacenter_test.rb
|
374
397
|
- test/factories/foreman_datacenter_factories.rb
|
398
|
+
- test/controllers/foreman_datacenter/sites_contoller_test.rb
|
399
|
+
- test/controllers/foreman_datacenter/racks_contoller_test.rb
|
400
|
+
- test/controllers/foreman_datacenter/rack_groups_contoller_test.rb
|
401
|
+
- test/integration/foreman_datacenter/rack_group_test.rb
|
402
|
+
- test/integration/foreman_datacenter/rack_test.rb
|
403
|
+
- test/integration/foreman_datacenter/site_test.rb
|
404
|
+
- test/fixtures/foreman_datacenter/rack_groups.yml
|
405
|
+
- test/fixtures/foreman_datacenter/sites.yml
|
406
|
+
- test/fixtures/foreman_datacenter/racks.yml
|
375
407
|
- test/test_plugin_helper.rb
|